SlideShare a Scribd company logo
1 of 10
Download to read offline
PRIMES is in P: A Breakthrough for Everyman
F. Bornemann (based on Agarwal ’04)

Dhruv Gairola
Computational Complexity, Michael Soltys
gairold@mcmaster.ca ; dhruvgairola.blogspot.ca

October 22, 2013

Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

1 / 10
Overview

1

Primality Testing
Introduction
Existing Methods

2

Contribution
Intuition
AKS Algorithm
Time Complexity

3

Reception

4

Conclusion

Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

2 / 10
Primality Testing : Introduction

Primes are greater than 1 and have no positive divisors other than 1
and itself. Non primes are composite numbers.
PRIMES is the decisional problem of determining whether or not a
given integer n is prime.
Important in cryptography (e.g., RSA)
Finding large ”random” primes.
Number of primes less than x is about x / ln x.
Test O(k) random k-bit numbers you will probably find a prime.

Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

3 / 10
Primality Testing : Existing Methods
Sieve of Eratosthenes
Ancient, iterative method to generate primes between 1 and n.
Simple but exponential, esp. in crypto where we are interested in large
numbers.

Fermats Little Theorem
If p is prime, for every a coprime to p, ap−1 ≡ 1 (mod p)
Try lots of a’s, if always holds p is probably prime.
Carmichael numbers (rare).

Rabin Miller Test
Randomized, fast.
Definitely composites; finds primes with high probability .
PRIMES ∈ co-RP (i.e., false positives exist but no false negatives).

ECPP (Elliptic curve primality proving)
Result is error free but expected polynomial running time.

No deterministic, polynomial time algorithm! (Miller 1976?)
Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

4 / 10
Contribution : Intuition

AKS algorithm : deterministic and polynomial time. Based on
generalization of Fermat’s Little Theorem.
Theorem : Suppose a and p are coprime with p > 1. p is prime iff
(X + a)p ≡ X p + a (mod p)
X is an indeterminate variable.
Formally, we have the identity (X + a)p = X p + a in the ring Z[X] of
polynomials of one variable X over the finite field Z of p elements.

Check different values of a, but there are p possible choices of a.

Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

5 / 10
Contribution : Intuition (2)

Don’t look at (X + a)p , look at remainder after division by (X r − 1)
where r is coprime to a.
Fewer coefficients to compare with :
(X + a)p ≡ X p + a (mod X r − 1, p)
i.e., mod by X r − 1 first and then mod by n.
True for certain composites. Impose certain conditions, arrive at key
AKS theorem.
Proof is rather long, but ”simple” enough.

Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

6 / 10
Contribution : AKS Algorithm

AKS Algorithm (pseudocode of AKS Theorem)
1

Decide if p is a power of a natural number. If so, go to step 5.

2

Choose variables satisfying the hypotheses of the AKS theorem.

3

For a = 1, . . . , (s − 1) do the following:
(i) If a is a divisor of p, go to step 5.
(ii) If (X − a)p ≡ X p − a (mod X r − 1, p), go to step 5.

4

p is prime. Done.

5

p is composite. Done.

Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

7 / 10
Contribution : Time Complexity

˜
Original paper : O(log 10.5 n)
10.5 n · poly (loglogn)).
i.e., O(log
i.e., O(log 10.5 n · (loglogn)O(1) ).
˜
Assuming Sophie Germain conjecture : O(log 6 n).
A Sophie-Germain prime is a prime q such that r = 2q + 1 is also
prime. Conjectured that infinitely many Sophie-Germain primes.
Computation of variables in the AKS theorem becomes faster.

Other improvements are no longer ”simple” to understand.

Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

8 / 10
Reception

Media
Misleading portrayal.
e.g., NYT ”quick and definitively”; WSJ ”One beautiful mind from
India is putting the Internet on alert”.

Scientific Community
Godel Prize, Fulkerson Prize.
Proposed extensions.

Industry
Not utilized. Variations of Rabin Miller used instead.
Randomized algorithms faster with extremely low probability of error.

Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

9 / 10
Conclusion

Deterministic, polynomial
algorithm for primality
testing.
Important result in
complexity theory but
efficient algorithms still
preferred practically.
Million dollar prize :
Riemann hypothesis.

Dhruv Gairola (McMaster Univ.)

PRIMES is in P

October 22, 2013

10 / 10

More Related Content

What's hot

Computational logic First Order Logic
Computational logic First Order LogicComputational logic First Order Logic
Computational logic First Order Logicbanujahir1
 
Computational logic First Order Logic_part2
Computational logic First Order Logic_part2Computational logic First Order Logic_part2
Computational logic First Order Logic_part2banujahir1
 
140106 isaim-okayama
140106 isaim-okayama140106 isaim-okayama
140106 isaim-okayamagumitaro2012
 
Computational logic Propositional Calculus proof system
Computational logic Propositional Calculus proof system Computational logic Propositional Calculus proof system
Computational logic Propositional Calculus proof system banujahir1
 
The Number of Transitive P- Groups Of Degree P3
The Number of Transitive P- Groups Of Degree P3The Number of Transitive P- Groups Of Degree P3
The Number of Transitive P- Groups Of Degree P3inventionjournals
 
October 16, 2013
October 16, 2013October 16, 2013
October 16, 2013khyps13
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languagesparmeet834
 
Ac2640014009
Ac2640014009Ac2640014009
Ac2640014009IJMER
 
DiffCalculus: September 10, 2012
DiffCalculus: September 10, 2012DiffCalculus: September 10, 2012
DiffCalculus: September 10, 2012Carlos Vázquez
 
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyFormal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyLaguna State Polytechnic University
 
Stability criterion of periodic oscillations in a (15)
Stability criterion of periodic oscillations in a (15)Stability criterion of periodic oscillations in a (15)
Stability criterion of periodic oscillations in a (15)Alexander Decker
 
Entrega2_MALGTN_DEFINITVA
Entrega2_MALGTN_DEFINITVAEntrega2_MALGTN_DEFINITVA
Entrega2_MALGTN_DEFINITVAGuillem Sala
 
Abstract Algebra Cheat Sheet
Abstract Algebra Cheat SheetAbstract Algebra Cheat Sheet
Abstract Algebra Cheat SheetMoe Han
 

What's hot (18)

Predicates
PredicatesPredicates
Predicates
 
Computational logic First Order Logic
Computational logic First Order LogicComputational logic First Order Logic
Computational logic First Order Logic
 
Computational logic First Order Logic_part2
Computational logic First Order Logic_part2Computational logic First Order Logic_part2
Computational logic First Order Logic_part2
 
140106 isaim-okayama
140106 isaim-okayama140106 isaim-okayama
140106 isaim-okayama
 
Computational logic Propositional Calculus proof system
Computational logic Propositional Calculus proof system Computational logic Propositional Calculus proof system
Computational logic Propositional Calculus proof system
 
The Number of Transitive P- Groups Of Degree P3
The Number of Transitive P- Groups Of Degree P3The Number of Transitive P- Groups Of Degree P3
The Number of Transitive P- Groups Of Degree P3
 
Formal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of InferenceFormal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of Inference
 
October 16, 2013
October 16, 2013October 16, 2013
October 16, 2013
 
Formal Logic - Lesson 1 - Introduction to Logic
Formal Logic - Lesson 1 - Introduction to LogicFormal Logic - Lesson 1 - Introduction to Logic
Formal Logic - Lesson 1 - Introduction to Logic
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
Ac2640014009
Ac2640014009Ac2640014009
Ac2640014009
 
DiffCalculus: September 10, 2012
DiffCalculus: September 10, 2012DiffCalculus: September 10, 2012
DiffCalculus: September 10, 2012
 
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyFormal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
 
Crystallographic groups
Crystallographic groupsCrystallographic groups
Crystallographic groups
 
Stability criterion of periodic oscillations in a (15)
Stability criterion of periodic oscillations in a (15)Stability criterion of periodic oscillations in a (15)
Stability criterion of periodic oscillations in a (15)
 
Entrega2_MALGTN_DEFINITVA
Entrega2_MALGTN_DEFINITVAEntrega2_MALGTN_DEFINITVA
Entrega2_MALGTN_DEFINITVA
 
Abstract Algebra Cheat Sheet
Abstract Algebra Cheat SheetAbstract Algebra Cheat Sheet
Abstract Algebra Cheat Sheet
 
Logic&proof
Logic&proofLogic&proof
Logic&proof
 

Similar to PRIMES is in P

A Theory of the Learnable; PAC Learning
A Theory of the Learnable; PAC LearningA Theory of the Learnable; PAC Learning
A Theory of the Learnable; PAC Learningdhruvgairola
 
PAGOdA poster
PAGOdA posterPAGOdA poster
PAGOdA posterDBOnto
 
10 logic+programming+with+prolog
10 logic+programming+with+prolog10 logic+programming+with+prolog
10 logic+programming+with+prologbaran19901990
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdfsmarwaneid
 
GDSC SSN - solution Challenge : Fundamentals of Decision Making
GDSC SSN - solution Challenge : Fundamentals of Decision MakingGDSC SSN - solution Challenge : Fundamentals of Decision Making
GDSC SSN - solution Challenge : Fundamentals of Decision MakingGDSCSSN
 
CPSC 125 Ch 1 sec 4
CPSC 125 Ch 1 sec 4CPSC 125 Ch 1 sec 4
CPSC 125 Ch 1 sec 4David Wood
 
Introduction of predicate logics
Introduction of predicate  logicsIntroduction of predicate  logics
Introduction of predicate logicschauhankapil
 
Theorems on polynomial functions
Theorems on polynomial functionsTheorems on polynomial functions
Theorems on polynomial functionsLeo Crisologo
 
p_enclosure_presentation_long
p_enclosure_presentation_longp_enclosure_presentation_long
p_enclosure_presentation_longTommi Brander
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
The Chase in Database Theory
The Chase in Database TheoryThe Chase in Database Theory
The Chase in Database TheoryJan Hidders
 
Some Generalization of Eneström-Kakeya Theorem
Some Generalization of Eneström-Kakeya TheoremSome Generalization of Eneström-Kakeya Theorem
Some Generalization of Eneström-Kakeya Theoreminventionjournals
 

Similar to PRIMES is in P (20)

A Theory of the Learnable; PAC Learning
A Theory of the Learnable; PAC LearningA Theory of the Learnable; PAC Learning
A Theory of the Learnable; PAC Learning
 
1. Logic and Proofs.ppt
1. Logic and Proofs.ppt1. Logic and Proofs.ppt
1. Logic and Proofs.ppt
 
PAGOdA poster
PAGOdA posterPAGOdA poster
PAGOdA poster
 
Raices primitivas
Raices primitivasRaices primitivas
Raices primitivas
 
Primitive-Roots.pptx
Primitive-Roots.pptxPrimitive-Roots.pptx
Primitive-Roots.pptx
 
10 logic+programming+with+prolog
10 logic+programming+with+prolog10 logic+programming+with+prolog
10 logic+programming+with+prolog
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
Pnp
PnpPnp
Pnp
 
GDSC SSN - solution Challenge : Fundamentals of Decision Making
GDSC SSN - solution Challenge : Fundamentals of Decision MakingGDSC SSN - solution Challenge : Fundamentals of Decision Making
GDSC SSN - solution Challenge : Fundamentals of Decision Making
 
CloSapn
CloSapnCloSapn
CloSapn
 
CPSC 125 Ch 1 sec 4
CPSC 125 Ch 1 sec 4CPSC 125 Ch 1 sec 4
CPSC 125 Ch 1 sec 4
 
Introduction of predicate logics
Introduction of predicate  logicsIntroduction of predicate  logics
Introduction of predicate logics
 
Theorems on polynomial functions
Theorems on polynomial functionsTheorems on polynomial functions
Theorems on polynomial functions
 
p_enclosure_presentation_long
p_enclosure_presentation_longp_enclosure_presentation_long
p_enclosure_presentation_long
 
Chapter1p2.pptx
Chapter1p2.pptxChapter1p2.pptx
Chapter1p2.pptx
 
Chapter1p2.pptx
Chapter1p2.pptxChapter1p2.pptx
Chapter1p2.pptx
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
The Chase in Database Theory
The Chase in Database TheoryThe Chase in Database Theory
The Chase in Database Theory
 
Some Generalization of Eneström-Kakeya Theorem
Some Generalization of Eneström-Kakeya TheoremSome Generalization of Eneström-Kakeya Theorem
Some Generalization of Eneström-Kakeya Theorem
 

More from dhruvgairola

A Generic Algebraic Model for the Analysis of Cryptographic Key Assignment Sc...
A Generic Algebraic Model for the Analysis of Cryptographic Key Assignment Sc...A Generic Algebraic Model for the Analysis of Cryptographic Key Assignment Sc...
A Generic Algebraic Model for the Analysis of Cryptographic Key Assignment Sc...dhruvgairola
 
Differences bet. versions of UML diagrams.
Differences bet. versions of UML diagrams.Differences bet. versions of UML diagrams.
Differences bet. versions of UML diagrams.dhruvgairola
 
Discussion : Info sharing across private DBs
Discussion : Info sharing across private DBsDiscussion : Info sharing across private DBs
Discussion : Info sharing across private DBsdhruvgairola
 

More from dhruvgairola (7)

A Generic Algebraic Model for the Analysis of Cryptographic Key Assignment Sc...
A Generic Algebraic Model for the Analysis of Cryptographic Key Assignment Sc...A Generic Algebraic Model for the Analysis of Cryptographic Key Assignment Sc...
A Generic Algebraic Model for the Analysis of Cryptographic Key Assignment Sc...
 
Differences bet. versions of UML diagrams.
Differences bet. versions of UML diagrams.Differences bet. versions of UML diagrams.
Differences bet. versions of UML diagrams.
 
Beginning jQuery
Beginning jQueryBeginning jQuery
Beginning jQuery
 
Beginning CSS.
Beginning CSS.Beginning CSS.
Beginning CSS.
 
Discussion : Info sharing across private DBs
Discussion : Info sharing across private DBsDiscussion : Info sharing across private DBs
Discussion : Info sharing across private DBs
 
Ajax
AjaxAjax
Ajax
 
Potters wheel
Potters wheelPotters wheel
Potters wheel
 

Recently uploaded

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

PRIMES is in P

  • 1. PRIMES is in P: A Breakthrough for Everyman F. Bornemann (based on Agarwal ’04) Dhruv Gairola Computational Complexity, Michael Soltys gairold@mcmaster.ca ; dhruvgairola.blogspot.ca October 22, 2013 Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 1 / 10
  • 2. Overview 1 Primality Testing Introduction Existing Methods 2 Contribution Intuition AKS Algorithm Time Complexity 3 Reception 4 Conclusion Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 2 / 10
  • 3. Primality Testing : Introduction Primes are greater than 1 and have no positive divisors other than 1 and itself. Non primes are composite numbers. PRIMES is the decisional problem of determining whether or not a given integer n is prime. Important in cryptography (e.g., RSA) Finding large ”random” primes. Number of primes less than x is about x / ln x. Test O(k) random k-bit numbers you will probably find a prime. Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 3 / 10
  • 4. Primality Testing : Existing Methods Sieve of Eratosthenes Ancient, iterative method to generate primes between 1 and n. Simple but exponential, esp. in crypto where we are interested in large numbers. Fermats Little Theorem If p is prime, for every a coprime to p, ap−1 ≡ 1 (mod p) Try lots of a’s, if always holds p is probably prime. Carmichael numbers (rare). Rabin Miller Test Randomized, fast. Definitely composites; finds primes with high probability . PRIMES ∈ co-RP (i.e., false positives exist but no false negatives). ECPP (Elliptic curve primality proving) Result is error free but expected polynomial running time. No deterministic, polynomial time algorithm! (Miller 1976?) Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 4 / 10
  • 5. Contribution : Intuition AKS algorithm : deterministic and polynomial time. Based on generalization of Fermat’s Little Theorem. Theorem : Suppose a and p are coprime with p > 1. p is prime iff (X + a)p ≡ X p + a (mod p) X is an indeterminate variable. Formally, we have the identity (X + a)p = X p + a in the ring Z[X] of polynomials of one variable X over the finite field Z of p elements. Check different values of a, but there are p possible choices of a. Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 5 / 10
  • 6. Contribution : Intuition (2) Don’t look at (X + a)p , look at remainder after division by (X r − 1) where r is coprime to a. Fewer coefficients to compare with : (X + a)p ≡ X p + a (mod X r − 1, p) i.e., mod by X r − 1 first and then mod by n. True for certain composites. Impose certain conditions, arrive at key AKS theorem. Proof is rather long, but ”simple” enough. Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 6 / 10
  • 7. Contribution : AKS Algorithm AKS Algorithm (pseudocode of AKS Theorem) 1 Decide if p is a power of a natural number. If so, go to step 5. 2 Choose variables satisfying the hypotheses of the AKS theorem. 3 For a = 1, . . . , (s − 1) do the following: (i) If a is a divisor of p, go to step 5. (ii) If (X − a)p ≡ X p − a (mod X r − 1, p), go to step 5. 4 p is prime. Done. 5 p is composite. Done. Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 7 / 10
  • 8. Contribution : Time Complexity ˜ Original paper : O(log 10.5 n) 10.5 n · poly (loglogn)). i.e., O(log i.e., O(log 10.5 n · (loglogn)O(1) ). ˜ Assuming Sophie Germain conjecture : O(log 6 n). A Sophie-Germain prime is a prime q such that r = 2q + 1 is also prime. Conjectured that infinitely many Sophie-Germain primes. Computation of variables in the AKS theorem becomes faster. Other improvements are no longer ”simple” to understand. Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 8 / 10
  • 9. Reception Media Misleading portrayal. e.g., NYT ”quick and definitively”; WSJ ”One beautiful mind from India is putting the Internet on alert”. Scientific Community Godel Prize, Fulkerson Prize. Proposed extensions. Industry Not utilized. Variations of Rabin Miller used instead. Randomized algorithms faster with extremely low probability of error. Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 9 / 10
  • 10. Conclusion Deterministic, polynomial algorithm for primality testing. Important result in complexity theory but efficient algorithms still preferred practically. Million dollar prize : Riemann hypothesis. Dhruv Gairola (McMaster Univ.) PRIMES is in P October 22, 2013 10 / 10