Chapter 7: 41E (page 467)
Question: Use pseudocode to write out the probabilistic primality test described in Example 16.
Short Answer
Answer
The probabilistic primality test is described as:
procedureprobabilistic prime
Composite: = false
While composite = falseand
Choose uniformly at random with
Apply Miller’s test to base
Iffails the test thencomposite = true
Ifcomposite = true then print{“composite”)
elseprint (“probably prime”)
return unknown