|
An English-Persian Dictionary of |
Algorithms and Data Structures |
Version 1.3 |
|
Home > Links to Implementations > Miller-Rabin |
Definition: A heuristic test for prime numbers. It repeatedly checks if the number being tested, n, is pseudoprime to a randomly chosen base, a and there are only trivial square roots of 1, modulo n. In other words, n is surely composite if an-1 = 1 (mod n), where 0 < a < n. Some composites may be incorrectly judged to be prime. Note: For k repetitions, the chance of incorrectly judging an odd integer greater than 2 to be prime is 2-k. For randomly chosen large integers, a small number of repetitions, say 3, is enough. After [CLR90, pp 838-844]. Author: PEB ImplementationFrederic Raynal's Miller-Rabin Primality test (pseudo-code) pages, with mathematical background, implementation, demonstration, etc. |
Entry modified Wed Sep 12 09:53:35 2001.