Publication | Closed Access
A Fast Monte-Carlo Test for Primality
643
Citations
3
References
1977
Year
Mathematical ProgrammingEngineeringComputational Number TheoryComputational ComplexityIncorrect DecisionStatistical InferenceComputer ScienceRandom NumberMonte Carlo SamplingRandomized AlgorithmStatisticsPseudorandom Number GeneratorUniform DistributionFast Monte-carlo Test
Let n be an odd integer. Take a random number a from a uniform distribution on the set $\{1, 2,\cdots, n -1\}$. If a and n are relatively prime, compute the residue $\varepsilon \equiv a^{(n - 1)/2}(\bmod n)$, where $ - 1 \leqq \varepsilon < n - 2$, and the Jacobi symbol $\delta = (a /n)$. If $\varepsilon = 6$, decide that n is prime. If either $\gcd (a,n) > 1$ or $\varepsilon \ne \delta $ decide that n is composite. Obviously, if n is prime, the decision made will be correct. We will show below, that for composite n the probability of an incorrect decision is $\leqq 1 / 2$. The number of multiprecision operations needed for the whole procedure is $< 6\log _2 n$. m-fold repetition using independent random numbers yields a Monte-Carlo test for primality with error probabilities 0 (if n is prime) and $< 2^{-m}$(if n is composite) and with multiprecision arithmetic cost $< 6m\log _2 n$.
| Year | Citations | |
|---|---|---|
Page 1
Page 1