Zoklet.net

Go Back   Zoklet.net > Science > Math, Science, and Engineering

Reply
 
Thread Tools
  #1  
Old 09-15-2009, 04:40 PM
rabbit boy rabbit boy is offline
Member
 
Join Date: Jan 2009
Thanks: 0
Thanked 10 Times in 7 Posts
Post Miller-Rabin primality test

http://en.wikipedia.org/wiki/Miller&...primality_test
http://herbert.gandraxa.com/herbert/mrp.asp

The Miller-Rabin test is a method for testing whether an integer is prime or composite. Wikipedia says:
The more bases a we test, the better the accuracy of the test. It can be shown that for any odd composite n, at least 3/4 of the bases a are witnesses for the compositeness of n.[2][3] The Miller–Rabin test is strictly stronger than the Solovay–Strassen primality test in the sense that for every composite n, the set of strong liars for n is a subset of the set of Euler liars for n, and for many n, the subset is proper. If n is composite then the Miller–Rabin primality test declares n probably prime with a probability at most 4^ − k. On the other hand, the Solovay–Strassen primality test declares n probably prime with a probability at most 2^ − k.

On average the probability that a composite number is declared probably prime is significantly smaller than 4^ − k. Damgård, Landrock and Pomerance[4] compute some explicit bounds. Such bounds can, for example, be used to generate primes; however, they should not be used to verify primes with unknown origin, since in cryptographic applications an adversary might try to send you a pseudoprime in a place where a prime number is required. In such cases, only the error bound of 4^ − k can be relied upon.
Right above this, k is the number of iterations that you go through.

So does this mean that if you do 100 iterations, the odds of it getting a false positive are 4^-100?

And according to the second link, it can be deterministic for numbers less than 10^16 in its particular implementation.
Interactively demonstrates the Miller-Rabin Primality Test on a step-by-step basis. This implementation is deterministic for odd integers smaller than 341,550,071,728,321.

Note, that the test is actually known to be deterministic for all values below 10^16 [1], i.e., it will find any of the 279,238,341,033,925 primes below this value [2].
So how did they determine when it was deterministic? Did they just test it for a certain number of iterations and see when the first pseudoprime popped up?
Reply With Quote
  #2  
Old 09-15-2009, 05:01 PM
rabbit boy rabbit boy is offline
Member
 
Join Date: Jan 2009
Thanks: 0
Thanked 10 Times in 7 Posts
Post Re: Miller-Rabin primality test

http://leto.net/x/2009/01/primes-pri...psuedopri.html

Here's an article in plain English that describes what I'm talking about. It says that the BPSW test is a lot better.

It also links to a page that actually gives some pseudoprimes for a given number of iterations of the Miller-Rabin test:

http://www.trnicely.net/misc/mpzspsp.html
Reply With Quote
Reply

Bookmarks

Tags
millerrabin, primality, test

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The gay test ILTST Generally Speaking 11 06-22-2009 05:49 PM
Test zuperxtreme Bat Country 8 05-28-2009 10:16 PM
The Test. JustAnotherAsshole Better Living Through Chemistry 6 02-08-2009 12:14 PM


All times are GMT. The time now is 08:45 PM.


Hot Topics
On IRC
Users: 4
Messages/minute: 0
Topic: "http://www.zoklet.net/..."
Users: 21
Messages/minute: 0
Topic: "ask ibm why atlantis is real"
Users: 9
Messages/minute: 0
Topic: "vaginaboob"
Advertisements
Your ad could go right HERE! Contact us!

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.