2

Looking into the Miller-Rabin Primality Test.

At some point it is stated that if $b \approx \log_2(n) \ge 32$ then the probability of a number $n$ being prime after passing $k$ tests is: $4^{-k}$.

Now, the numbers below $2^k$ are, by definition, $2^k$ and, hence, the probability of getting any given number from that interval is: $2^{-k}$.

If both statements are correct, then, it looks to me that for any number above $n > 2^{32}$ it is sufficient to perform $k > \log_2(n)$ (actually even $k > \log_4(n) = \frac{\log_2(n)}{2}$) Miller-Rabin tests to ensure primality (for example using first $k$ primes).

However, the Miller test (which would be deterministic) is a lot stricter than this, requiring to test all numbers below $2 \log^2(n)$ (actually below $\min(n - 2, 2 \log^2(n))$) (relying on the -- unproven, as far as I know -- extended Riemann hypothesis), although it has been argued that this limit may be reduced to: $\frac{\log(n) \log(\log(n))}{\log(2)}$.

Could anybody please provide some clarification over this?


I have also the following correlated questions:

  • are there any combination of the Miller-Rabin bases that are equivalent for any $n$?
  • why is it common (but not the most effective) to pick up primes for constituting a base?
    • is there any "improved orthogonality" for this choice?
    • is there any work indicating that if numbers below $x$ are primes if they pass Miller-Rabin for the first $k$ primes, then numbers below $y$ are primes if they pass Miller-Rabin for the first $k + 1$ primes with $y > x$?

Any help is appreciated.

norok2
  • 121
  • What do you mean with "equivalent" in this context ? In the case you mean a collection of bases that is sufficient for every integer $n$, the answer is that there is no such collection. For every finite collection of bases, infinite many composites pass the test. – Peter Oct 30 '19 at 11:10
  • @Peter I mean that two bases are equivalent if the same numbers (or an unbound subset of them) passes the test. Obviously, there are many equivalent bases in finite ranges, e.g. below say 2047 all the bases containing 2 will be equivalent. It is more toward investigating whether it can be said that e.g. if I have a base 2 and 3 would witness al least all the numbers witnessed by 6. – norok2 Oct 30 '19 at 11:16

0 Answers0