Symmetry (Jun 2020)

On the Number of Witnesses in the Miller–Rabin Primality Test

  • Shamil Talgatovich Ishmukhametov,
  • Bulat Gazinurovich Mubarakov,
  • Ramilya Gakilevna Rubtsova

DOI
https://doi.org/10.3390/sym12060890
Journal volume & issue
Vol. 12, no. 6
p. 890

Abstract

Read online

In this paper, we investigate the popular Miller–Rabin primality test and study its effectiveness. The ability of the test to determine prime integers is based on the difference of the number of primality witnesses for composite and prime integers. Let W ( n ) denote the set of all primality witnesses for odd n. By Rabin’s theorem, if n is prime, then each positive integer a n is a primality witness for n. For composite n, the power of W ( n ) is less than or equal to φ ( n ) / 4 where φ ( n ) is Euler’s Totient function. We derive new exact formulas for the power of W ( n ) depending on the number of factors of tested integers. In addition, we study the average probability of errors in the Miller–Rabin test and show that it decreases when the length of tested integers increases. This allows us to reduce estimations for the probability of the Miller–Rabin test errors and increase its efficiency.

Keywords