|
|
|
|
Solovay-Strassen test
|
(Algorithm)
|
|
|
It is known that an odd number is prime if and only if for every such that we have
 |
(1) |
where
is the Jacobi symbol. (The only if part is obvious; the if part follows from Theorem 1.) From this we can derive the following algorithm.
- Choose a random number
between and .
- Check if
(for example using the Euclidean algorithm). If it is not, then is not prime and is a divisor of .
- Check if Equation (1) holds. If it does not, then
is not prime. Otherwise is a candidate for primality.
By repeating this algorithm we can increase the chance that the result is correct. In order to estimate the probability of error, we make use of Theorem 1, which says that every independent iteration of the algorithm has a chance of at most of being wrong. Hence, after iterations there is at most a chance of getting a wrong result.
Proof. It suffices to exhibit one element
 which does not satisfy Equation ( 1). Indeed, if there exists one such element, then the set of all elements which do satisfy Equation ( 1) forms a proper subgroup of
 , from which we conclude that the elements satisfying Equation ( 1) number no more than half of the elements of
 .
We consider separately the cases where is squarefree and not squarefree. If is squarefree, let be a prime dividing and let be a quadratic non-residue mod .
Using the Chinese Remainder Theorem, choose an integer
such that:
The Jacobi symbol
 is given by
We will assume that
 and derive a contradiction. The equation
implies that
 . However, since
 , we must have
 , so that
 , which is a contradiction.
Now suppose that is not squarefree. Let be a prime such that
, and set
. By the binomial theorem, we have
so the multiplicative order of  is equal to  , and hence in particular
 , since
 . On the other hand,
so  does not satisfy Equation ( 1). 
|
"Solovay-Strassen test" is owned by mathwizard. [ full author list (2) ]
|
|
(view preamble)
Cross-references: multiplicative order, binomial theorem, implies, contradiction, Chinese remainder theorem, quadratic non-residue, squarefree, number, proper subgroup, integer, composite, odd, iteration, independent, estimate, order, primality, equation, divisor, Euclidean algorithm, random number, algorithm, obvious, Jacobi symbol, prime, odd number
There is 1 reference to this entry.
This is version 4 of Solovay-Strassen test, born on 2004-07-01, modified 2007-10-06.
Object id is 5978, canonical name is SolovayStrassenTest.
Accessed 4198 times total.
Classification:
| AMS MSC: | 11Y11 (Number theory :: Computational number theory :: Primality) |
|
|
|
|
|
|
Pending Errata and Addenda
|
|
|
|
|
|
|
|
|
|
|