Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 3.3.25* (Rabin-Miller algorithm versus Solovay-Strassen algorithm)
Exercise 3.3.25* (Rabin-Miller algorithm versus Solovay-Strassen algorithm)
Let be an odd positive integer, and let and be defined as in Problems 21 and 24. Show that .
Answers
To write this solution, I used the course of Saux Picart, Rannou, “Cours de calcul formel”, p.77-79.
Proof. Here is an odd positive integer, such that , where .
Recall that
Let ( ) be any element of . Then
-
Assume first that . Then , where , since is even. Hence
It remains to show that . Since ,
where is odd, and , thus , which gives
So . This shows that .
-
Assume now that for some integer , .
We begin by computing for the prime divisors of . Let be such a prime divisor. Then is odd, and there are some integers such that . Since is odd,
where , thus
Since is also odd,
By Fermat’s Theorem, . Assume, for the sake of contradiction, that . Then . This is impossible, because is odd. This contradiction shows that . Moreover
-
If , then
so .
-
If , then
To summarize, under the hypothesis , if is a prime divisor of , then , and
Now we can compare and .
-
Suppose first that . From , we deduce
Write , where the are not necessarily distinct. Then . By equation (1), the only (distinct or not) whose contribution in this product is are the such that , so that . If there are such prime factors , then . By renumbering the , we may suppose that these are and the others are , which satisfy ( ), so that for some integers , and
Since , , thus
By the binomial formula,
thus , so is even and . This shows that , so .
-
It remains the case where . Then , so . With the same notations as in the previous case,
Therefore, since is odd, , thus , and . So .
-
In all cases, . We have proved that
□
Note: This shows that there are more bases for which is an Euler’s pseudo-prime to the base (satisfying ), than bases for which is a strong pseudo prime to the base . This explains that the strong pseudo-prime test (algorithm of Rabin-Miller) is more efficient that the algorithm of Solovay-Strassen, based on the Euler’s pseudo-primes.