Chapter 1: Q14E (page 49)
Suppose you want to compute the nth Fibonacci number , modulo an integer . Can you find an efficient way to do this?
Short Answer
The final running time after computing each step of is
Chapter 1: Q14E (page 49)
Suppose you want to compute the nth Fibonacci number , modulo an integer . Can you find an efficient way to do this?
The final running time after computing each step of is
All the tools & learning materials you need for study success - in one app.
Get started for freeWhat is the least significant decimal digit of ? (Hint: For distinct primesp,q, and any a is not equal to role="math" localid="1658726105638" , we proved the formula role="math" localid="1658726171933" in Section 1.4.2.)
Consider the problem of computing .
(a) If is an role="math" localid="1658397956489" -bit number, how many bits long is , approximately ( form)?
(b) Give an algorithm to compute and analyze its running time.
Calculate using any method you choose. (Hint: 127 is prime.)
Show that if is a nontrivial square root of 1 modulo N , that is if but , then must be composite. (For instance,; thus 4 is a nontrivial square root of 1 modulo 15.)
If p is prime, how many elements of have an inverse modulo ?
What do you think about this solution?
We value your feedback to improve our textbook solutions.