Question: Using Miller-Rabin primality test algorithm to write a Java program which can test if an integer is a prime. The input of the algorithm is
Using Miller-Rabin primality test algorithm to write a Java program which can test if an integer is a prime. The input of the algorithm is a large positive integer. The output is the number *** is a prime or the number *** is not a prime. The error probability of the algorithm should be no more than 1/256 . Use this program to test some big integers. In Java, there is a class BigInteger. You can use methods of that class except the method isProbablePrime.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
