Chapter 1: Q25E (page 49)
Calculate using any method you choose. (Hint: 127 is prime.)
Short Answer
is equal to
Chapter 1: Q25E (page 49)
Calculate using any method you choose. (Hint: 127 is prime.)
is equal to
All the tools & learning materials you need for study success - in one app.
Get started for freeA positive integer is a power if it is of the form , where ,role="math" localid="1658399000008" are positive integers and .
(a) Give an efficient algorithm that takes as input a number and determines whether it is a square, that is, whether it can be written as for some positive integer . What is the running time of your algorithm?
(b) Show that if (with role="math" localid="1658399171717" , , and all positive integers), then either role="math" localid="1658399158890" .
(c) Give an efficient algorithm for determining whether a positive integer is a power. Analyze its running time.
On page 38, we claimed that since about a fraction of n-bit numbers are prime, on average it is sufficient to draw random n -bit numbers before hitting a prime. We now justify this rigorously. Suppose a particular coin has a probability p of coming up heads. How many times must you toss it, on average, before it comes up heads? (Hint: Method 1: start by showing that the correct expression is . Method 2: if E is the average number of coin tosses, show that ).
The grade-school algorithm for multiplying two n-bit binary numbers x and y consist of addingtogethern copies of r, each appropriately left-shifted. Each copy, when shifted, is at most 2n bits long.
In this problem, we will examine a scheme for adding n binary numbers, each m bits long, using a circuit or a parallel architecture. The main parameter of interest in this question is therefore the depth of the circuit or the longest path from the input to the output of the circuit. This determines the total time taken for computing the function.
To add two m-bit binary numbers naively, we must wait for the carry bit from position i-1before we can figure out the ith bit of the answer. This leads to a circuit of depth. However, carry-lookahead circuits (seewikipedia.comif you want to know more about this) can add indepth.
In the RSA cryptosystem, Alice’s public key is available to everyone. Suppose that her private key d is compromised and becomes known to Eve. Show that if (a common choice) then Eve can efficiently factor N.
Show that if and if Divides
What do you think about this solution?
We value your feedback to improve our textbook solutions.