Math 2.0

Number theory Concept

Miller–Rabin primality test

Builds on Primality testFermat's little theoremModular exponentiation

Summary

The Miller–Rabin test is a probabilistic primality test for an odd integer n>2n > 2. Write n−1=2sdn - 1 = 2^s d with dd odd, and choose a base aa with 1<a<n−11 < a < n - 1. The number nn passes for base aa if ad≡1(modn)a^d \equiv 1 \pmod n, or if a2rd≡−1(modn)a^{2^r d} \equiv -1 \pmod n for some rr with 0≤r<s0 \le r < s. Each odd prime nn passes for each base. If nn fails for some base, then nn is composite.

Remarks

The prime case follows from Fermat's little theorem and the fact that ±1\pm 1 are the only square roots of 11 modulo a prime. If nn is an odd composite number, then at most 14\frac{1}{4} of the bases let it pass. So kk random bases give an error probability of at most 4−k4^{-k}. Gary Miller found the test in 1976, in a deterministic form that depends on the extended Riemann hypothesis. Michael Rabin made it an unconditional probabilistic test in 1980.

Reading path

To understand this page from the ground up, read these 7 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Divisibility definition
  2. Modular exponentiation concept
  3. Congruence modulo n definition
  4. Prime number definition
  5. Fermat's little theorem statement
  6. Primality test concept
  7. Miller–Rabin primality test concept

Where this leads

2 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test, lead section
  2. Web https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test, Strong probable primes
About this page
Tag0SZCSYHW60
URIm2://0SZCSYHW60
Aliasesrabin-miller-primality-test
Kindconcept
WritingW1 stated
MSC11Y11
SpecializesPrimality test
UsesPrimality test, Fermat's little theorem, Modular exponentiation
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W2

  • edge defines in: at least one definition (0 of 1)
  • edge instance_of in: at least two examples (0 of 2)
  • edge not_instance_of in: at least one non-example (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Used by