1 / 29

Primes in P

Primes in P. Deterministic polynomial-time algorithm of Agrawal, Kayal and Saxena Presented by Vladimir Braverman . History. Sieve of Eratosthenes 240BC Randomized, polynomial-time algorithm of Miller-Rabin, 1980 (practically used)

guang
Download Presentation

Primes in P

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Primes in P • Deterministic polynomial-time algorithm of Agrawal, Kayal and Saxena • Presented by Vladimir Braverman

  2. History • Sieve of Eratosthenes 240BC • Randomized, polynomial-time algorithm of Miller-Rabin, 1980 (practically used) • Adleman, Pomerance and Rumeley (APR) a deterministic algorithm, an almost polynomial time NloglogN , 1983 • Agrawal, Kayal and Saxena, deterministic, polinomial-time algorithm 2002

  3. Impact • Data security • Number Theory • Theory of algorithms • Doesn’t have a practical value yet

  4. The Heroes • Neeraj Kayal and Nitin Saxena are PhD students (22 years old). • Indian Institute of Technology, Kanpur • Agrawal was recently awarded the Clay Research Award, one of the coveted honors in mathematical research.

  5. Number Theory Finite Fields Group Theory Primes in P Polynomial identity idea Algorithms in Number Theory

  6. Content • Background • Algorithms in number theory • Rings • Number Theory • Basic idea: Polynomial identity • Algorithm • Pseudo code • Correctness • Running time

  7. Algorithms in number theory • Lemma 1 • 0 < a,b < n • ab can be calculated in O(log3 (n)) • Maximal integer less than b/a can be calculated in O(log2 (n)) • a mod b can be calculated in O(log2 (n)) • Gcd(a,b) can be calculated in O(log3 (n))

  8. Algebra • A ring is a set together with addition and multiplication • 1. Additive associativity: • 2. Additive commutativity: • 3. Additive identity. • 4. Additive inverse • 5. Multiplicative associativity: • 6. Left and right distributivity: • A ring is therefore an Abelian group under addition and a semigroup under multiplication.

  9. Algebra (cont) • A polynomialf is defined to be a formal expression of the form • where the coefficients a0, ... , an are elements of some ringR and X is considered to be a formal symbol. • Two polynomials are considered to be equal if and only if the sequences of their coefficients are equal.

  10. Algebra (end) • Polynomials with coefficients in R can be added by simply adding corresponding coefficients and multiplied using the distributive low and the rules • Xa = aX for all elements a of the ring R • XkXl = Xk+l for all natural numbers k and l. • The set of all polynomials with coefficients in the ring R forms itself a ring, the ring of polynomials over R, which is denoted by R[X].

  11. Algorithms in number theory (cont) • Lemma 2 Let 1 < a,b, r and n = max(a,r). Than ab mod r can be calculated in O(log2 (n) + log(b) log2(r)) • Lemma 3 Let 1< a,r < n. The r coefficients of (x-a)n mod (xr-1) in Zn[x] can be computed in O(r2 log3 (n)) time.

  12. Algorithms in number theory (cont) • Lemma 4 Let n > 2 be an integer. There is an algorithm that decides in O(√n log2 (n)) whether n is prime. Algorithm: • r:=2; s:=4 (s = r2) • While s <= n • Do If n mod r = 0 return NO • Else r:=r+1; s:=2r-1 • Endif • EndWhile • Return Yes

  13. Algorithms in number theory (cont) • Lemma 4 (cont) • The correctness follows from the fact that n is not prime iff there is an integer r <= √n that divides n. • The while-loop makes at most √n iterations each one taking (log2 n) time.

  14. Algorithms in number theory (end) • Lemma 5 Let n > 2 be an integer. There is an algorithm that computes the largest prime factor of n in O(√n log2 (n)). • Lemma 6 Let n > 2 be an integer. There is an algorithm that decides in O(log4 (n) log (log (n)) ) whether there exist integers a,b such that n = ab.

  15. Number theory • Lemma 7 If p is prime number than for any i < p (pi) = 0 mod p Proof (pi) = p(p-1)…(p-i+1) / i! Since gcd(p, i!) = 1 the lemma is proved

  16. Number theory(cont) • Lemma 8 If p is prime number than for any a, ap = a mod p Proof (induction) • a = 1 • a -> a+1 (a+1)p =  (pi) ai (a+1)p = ap+1 = a+1 mod p

  17. Polynomial identity • Theorem 1 Let a, n be integers • If n is a prime number, then (x-a)n = xn-a in the ring Zn[x] • If gcd(a, n) =1 and n is not a prime number, then (x-a)n <> xn-a in the ring Zn[x]

  18. Proof of Theorem 1 (x-a)n = (ni) xi(-a)n-I. • Prime case • If n is prime, (ni) = 0 mod n, according to Lemma 7 • Therefore (x-a)n = xn – an = xn – a mod n, according to Lemma 8 • n is not a prime and gcd(n,a) = 1 q – prime factor of n, qk | n, k – maximal gcd (a,q) = 1 and gcd (an-q, qk) = 1

  19. Proof of Theorem 1(Cont) Lemma: qk doesn’t divide (nq) Proof: (by contradiction) • Suppose, (nq) = b qk. Than, n(n-1)…(n-q+1)/q! = b qk. n = (q-1)! b qk+1 /(n-1)…(n-q+1). • For each 0 < j < q , q doesn’t divide (n-j). Indeed, since q | n and (n-j) = 0 mod q we have j = 0 mod q. • Therefore, (q-1)! b /(n-1)…(n-q+1) is an integer and qk+1 | n that contradicts with maximal property of k

  20. Proof of Theorem 1(Cont) • (x-a)p The coefficient of xp is (nq)(-1)n-qan-q • If it is divisible by n, than (nq)an-q = bn Hence, (nq)an-q/qk = bn / qk • Right-hand side is integer and gcd(an-q,qk) = 1 • Therefore qk | (nq) that contradicts Lemma • We proved that (x-a)n <> xn-a in the ring Zn[x]

  21. Improved polynomial identity • Theorem 2 Let n be an integer and let q, r be prime numbers and • gcd (m,n) = 1 for all m < r • q divides r-1 • q ≥ 2√r log(n) + 2 • n(r-1)/q≠ 1 mod r • (x-a)a = (xn-a) mod (xr-1) in Zn[x] for a < 2√r log(n) + 1 Then n is a power of prime number.

  22. Lemma 9 There exist constants 0 < c1 < c2 such that for any large n, there exists a prime number r c1 log6(n) < r < c2 log6(n) r-1 has a prime factor q, q ≥ 2√r log(n) + 2 n(r-1)/q≠ 1 mod r

  23. Algorithm Prime(n) • r := 2; found := false; • While r < n and found = false • Do if gcd(r,n) ≠ 1 then return NO • If r is a prime and r > 2 • Then q := largest prime factor of r-1 • If q ≥ 2√r log(n) + 2 and n(r-1)/q ≠ 1 mod r • Then found = true • Endif • Endif • If found = false then r++ endif • Endwhile

  24. Algorithm Prime(n) (Cont) • For a:= 1 to 2√r log(n) + 1 • Do if (x-a)a ≠ (xn-a) mod (xr-1) in Zn[x] • Then return NO • Endif • Endfor • If n = ab for some integers a,b ≥ 2 • Then return NO • Else return YES • Endif

  25. Correctness of the algorithm (Sketch of the proof ) • If n is prime, • Algorithm doesn’t return NO during While loop, since gcd(n,r) = 1 • By Theorem 1, (x-a)a ≠ (xn-a) mod (xr-1) in Zn[x] Thus, the algorithm doesn’t return NO during For loop • N is not in the form ab, therefore YES is returned • If n is not a prime, then, according to Theorem 2, the algorithm returns NO

  26. Running time (Sketch of the proof ) • While loop

  27. Running time(Cont) • For loop • Testing if n is perfect power • O(log4(n) log(log(n))) , by Lemma 6

  28. References • Agrawal, Kayal and Saxena. Primes in P • M. Smid. Primality testing in polynomial time • F. Bornemann. PRIMES Is in P: A breakthrough for “Everyman”

  29. END

More Related