Data Structures and Algorithms in Java
Data Structures and Algorithms in Java
6th Edition
ISBN: 9781118771334
Author: Michael T. Goodrich
Publisher: WILEY
bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 47C

Communication security is extremely important in computer networks, and one way many network protocols achieve security is to encrypt messages. Typical cryptographic schemes for the secure transmission of messages over such networks are based on the fact that no efficient algorithms are known for factoring large integers. Hence, if we can represent a secret message by a large prime number p, we can transmit, over the network, the number r = p · q, where q > p is another large prime number that acts as the encryption key. An eavesdropper who obtains the transmitted number r on the network would have to factor r in order to figure out the secret message p.

Using factoring to figure out a message is hard without knowing the encryption key q. To understand why, consider the following naive factoring algorithm:

for (int p=2; p < r; p++)

if (r % p == 0)

return "The secret message is p!";

  1. a. Suppose the eavesdropper’s computer can divide two 100-bit integers in μs (1 millionth of a second). Estimate the worst-case time to decipher the secret message p if the transmitted message r has 100 bits.
  2. b. What is the worst-case time complexity of the above algorithm? Since the input to the algorithm is just one large number r, assume that the input size n is the number of bytes needed to store r, that is, n = ( log 2 r ) / 8 + 1 , and that each division takes time O(n).
Blurred answer
Students have asked these similar questions
Given f(x)=x2+6x and g(x)=1−x2, find f+g, f−g, fg, and fg.    Enclose numerators and denominators in parentheses. For example, (a−b)/(1+n).
The Legendre Polynomials are a sequence of polynomials with applications in numerical analysis. They can be defined by the following recurrence relation: for any natural number n > 1. Po(x) = 1, P₁(x) = x, Pn(x) = − ((2n − 1)x Pn-1(x) — (n − 1) Pn-2(x)), n Write a function P(n,x) that returns the value of the nth Legendre polynomial evaluated at the point x. Hint: It may be helpful to define P(n,x) recursively.
Let l be a line in the x-y plane. If l is a vertical line, its equation is x 5a for some real number a. Suppose l is not a vertical line and its slope is m. Then the equation of l is y 5mx 1b, where b is the y-intercept. If l passes through the point (x0, y0,), the equation of l can be written as y 2y0 5m(x 2x0 ). If (x1, y1) and (x2, y2) are two points in the x-y plane and x1 ≠ x2, the slope of line passing through these points is m 5(y2 2y1 )/(x2 2x1 ). Write a program that prompts the user two points in the x-y plane. The program outputs the equation of the line and uses if statements to determine and output whether the line is vertical, horizontal, increasing, or decreasing. If l is a non-vertical line, output its equation in the form y 5mx 1b.

Chapter 4 Solutions

Data Structures and Algorithms in Java

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Introduction to Big O Notation and Time Complexity (Data Structures & Algorithms #7); Author: CS Dojo;https://www.youtube.com/watch?v=D6xkbGLQesk;License: Standard YouTube License, CC-BY