Great Internet Mersenne Prime Search
Great Internet Mersenne Prime Search
Great Internet Mersenne Prime Search
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Great</strong> <strong>Internet</strong><br />
<strong>Mersenne</strong> <strong>Prime</strong> <strong>Search</strong><br />
(GIMPS)<br />
Stephen Ratzlaff
What is a <strong>Mersenne</strong> <strong>Prime</strong><br />
• If M n = 2 n -1 is prime then it is a <strong>Mersenne</strong><br />
<strong>Prime</strong><br />
• If 2 n -1 is prime then n must be prime<br />
o I won't show you the proof<br />
o So it is usually written as M P = 2 P -1
GIMPS<br />
• <strong>Search</strong>es for <strong>Mersenne</strong> prime numbers<br />
• Distributed computing project<br />
o Central server hands out work to volunteers<br />
o Volunteers calculate primality of numbers<br />
o Volunteers report back to server their results
Volunteers<br />
• Theory is that most people do not use<br />
their computer's to the fullest all the time.<br />
• They can volunteer their spare resources<br />
to help the community<br />
o Low priority process<br />
o A little extra power<br />
o Low impact to user<br />
o Huge benefit to community
<strong>Prime</strong>Net<br />
• Network of volunteers and server that run<br />
GIMPS<br />
• ~130 TFLOP/s<br />
o Current 30 day average
<strong>Prime</strong>Net Server<br />
• Distributes work to clients<br />
o Primality Tests<br />
Faster clients<br />
o Test Candidates<br />
Slower clients<br />
• Collects results from clients
Work Assignments<br />
• Elimination by factoring<br />
o M P can be factored then it is not a<br />
prime<br />
• Lucas-Lehmer primality test<br />
o Very expensive test<br />
Test for 1 prime is currently estimated at 45 days<br />
on my PC
Elimination by Factoring<br />
• Slower computers are given the assigned<br />
these jobs<br />
• This can eliminate candidates quicker<br />
than if done by the Lucas-Lehmer test<br />
• If it passes x amount of iterations then the<br />
candidate gets passed onto the Lucas-<br />
Lehmer test
Lucas-Lehmer Primality Test<br />
• Test for <strong>Mersenne</strong> primality<br />
• Assigned to faster computers<br />
// Determine if Mp = 2p − 1 is prime<br />
Lucas–Lehmer(p)<br />
var s = 4<br />
var M = 2p − 1<br />
repeat p − 2 times:<br />
s = ((s × s) − 2) mod M<br />
if s = 0 return PRIME else return COMPOSITE
Double Checking<br />
• Because floating points are used there is<br />
some error<br />
• After the first round check is done a<br />
double check is assigned by the <strong>Prime</strong>Net<br />
Server<br />
• 1.5% error rate
Results<br />
• Factoring Test<br />
o Not prime, factor is recorded<br />
o No factors, needs more testing<br />
• Lucas-Lehmer Test<br />
o Not prime<br />
o <strong>Prime</strong>
It's a pretty cool concept<br />
• Central server hands out work<br />
assignments<br />
• A bunch of volunteers work on small<br />
problems<br />
• As seen a lot of raw processing power<br />
can be harnessed through this method.
Demo
Notes<br />
• GIMPS Homepage<br />
o http://www.mersenne.org/<br />
• M P = 2 P -1 proof<br />
o http://primes.utm.edu/notes/proofs/Theorem2<br />
.html<br />
• Lucas Lehmer Proof<br />
o http://primes.utm.edu/notes/proofs/LucasLeh<br />
mer.html