Symposium Presentation (2)cs.indstate.edu/info/posters/sure2013-salman-toure.pdf · Computers Used...
Transcript of Symposium Presentation (2)cs.indstate.edu/info/posters/sure2013-salman-toure.pdf · Computers Used...
Goals
• 5000th largestknownprime• Mustbeabout300,000digits
• 20th largestSophieGermain prime• Mustbeabout30,000digits
PrimeNumber
• Canonlybedividedbyitselfandone.
• Examples: 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47…
Results
• Aftervariousimprovementstocodeefficiency…
• Weareabout½waythroughthesearchfor30,000digitSophieGermain primeafter2weeksofcomputertime
• Searchingfor300,000digitprimewilltakeanother2weeks ofcomputertime
ComputersUsed
About220cores:• 20dual-core3.2Gzi5machines,• 30quad-core3.1Gzi5machines,• 15quad-core2.8Gzi5machines.
PrimeNumberTest:TrialDivision
•Divisionofnbyasequenceofnumbergreaterthan1andlessthann.•Helpseliminateunwantednumbers
Example,47
47canonlybedividedby{1,47}
Example,49
49Canbedividedby{1,7,49}
PrimeNumberTest:FermatTest
•an-1 modn=1•Ifthenumberpassesthetestthenitmightbeaprime,butifitdoesnot,thenitisnotaprime.•Example:
n=4 n=5a=3 a=333 mod4 34 mod527mod4=3 81mod5=1Failed Passed
PrimeNumberTest:LucasTest
•Findprimefactorsofn.•Runasequenceoftest(almostsimilartotheFermatequation)onthem.•Example:
n=47n– 1=46Factors:{2,23}
PrimeNumberTest:LucasTest
Howrareareprimenumbers ?
𝝅(𝒏) – #ofprimesupto𝒏
𝝅 𝒏 ∼ 𝒏
𝒍𝒏 𝒏
1digitnumbers:4 areprime2digitnumbers:21 areprime30,000digitnumbers:about1/70,000 areprime300,000digit numbers:about1/700,000 areprime
Sohpie Germain Primes
• 𝑛 and2𝑛 + 1 arebothprime
• 30,000digitnumbers• ∼ ( 8
9:,:::)< areSophieGermain primes
HowlongdoesittaketogetaprimeandaSG
•PrimeNumber300,000digits•9.8× 10^149986 years(TrialDivision)•2695 years(FermatTest)
•SophieGermaine30,000digits•6976years(TrialDivision)•98 days(FermatTest)
Methodused
Isnprime?Loop(){1- Trialdivisiontryn/2
n/3n/5…..n/9973
2- Fermat'stest:𝒂𝒏>𝟏𝒎𝒐𝒅𝒏 = 𝟏3- Lucastheorem}