primality_v3 - PRIMES is in P Manindra Agrawal Neeraj Kayal...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PRIMES is in P Manindra Agrawal Neeraj Kayal Nitin Saxena * Department of Computer Science & Engineering Indian Institute of Technology Kanpur Kanpur-208016, INDIA Email: { manindra,kayaln,nitinsa } @iitk.ac.in Abstract We present an unconditional deterministic polynomial-time algorithm that determines whether an input number is prime or composite. 1 Introduction Prime numbers are of fundamental importance in mathematics in general, and number theory in par- ticular. So it is of great interest to study different properties of prime numbers. Of special interest are those properties that allow one to efficiently determine if a number is prime. Such efficient tests are also useful in practice: a number of cryptographic protocols need large prime numbers. Let PRIMES denote the set of all prime numbers. The definition of prime numbers already gives a way of determining if a number n is in PRIMES: try dividing n by every number m n if any m divides n then it is composite otherwise prime. This test was already known since the time of ancient Greeksit is a specialization of the Sieve of Eratosthenes (ca. 240 BC) that generates all primes less then n . The test, however, is inefficient: it takes ( n ) steps to determine if n is prime. An efficient test should need only a polynomial (in the size of the input = d log n e ) number of steps. A property that almost gives an efficient test is Fermats Little Theorem: for any prime number p , and any number a not divisible by p , a p- 1 = 1 (mod p ). Given an a and n it can be efficiently checked if a n- 1 = 1 (mod n ) using repeated squaring to compute ( n- 1) th power of a . However, it is not a correct test since many composites n also satisfy it for some a s ( all a s in case of Carmichael numbers [Car10]). Nevertheless, Fermats Little Theorem became the basis for many efficient primality tests. Since the beginning of complexity theory in 1960swhen the notions of problem complexity were formalized and various complexity classes were definedthis problem (referred as primality testing prob- lem) has been investigated intensively. It is trivial to see that the problem is in the class co-NP: if n is not prime it has an easily verifiable short certificate, viz., a non-trivial factor of n . In 1974, Pratt observed that the problem is in the class NP too [Pra75] (thus putting it in NP co-NP). In 1975, Miller [Mil76] used a property based on Fermats Little Theorem to obtain a deterministic polynomial-time algorithm for primality testing assuming Extended Riemann Hypothesis (ERH) . Within a year, his test was modified by Rabin [Rab80] to yield an unconditional but randomized polynomial- time algorithm. Independently, Solovay and Strassen [SS77] obtained, in 1974, a different randomized polynomial-time algorithm using the property that for a prime n , ( a n ) = a n- 1 2 (mod n ) for every a ( ( ) is the Jacobi symbol). Their algorithm can also be made deterministic under ERH. Since then, a number ofthe Jacobi symbol)....
View Full Document

Page1 / 9

primality_v3 - PRIMES is in P Manindra Agrawal Neeraj Kayal...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online