• Home
  • Blog
  • java program that implements the Rabin-Miller algorithm. Program should take 2 inputs 1) An integer n 2) t the number of test trails to perform. The program should output Composite if n is not an integer and Inconclusive if n is most likely an integer,

java program that implements the Rabin-Miller algorithm. Program should take 2 inputs 1) An integer n 2) t the number of test trails to perform. The program should output Composite if n is not an integer and Inconclusive if n is most likely an integer,

0 comments

The program should take two inputs 1) An integer n 2) t the number

of test trails to perform. The program should output “Composite” if n is not an integer

and “Inconclusive” if n is most likely an integer, after performing a maximum of t trails.

Test 1

1) Set t = 10 for this test

2) Use your code to generate all the prime numbers between 10,000 and 20,000.

Provide a screen shot to show your program generating this output.

3) Plot a graph showing the number of prime numbers found for the ranges 10,000 –

10,100; 10,101 – 10,200; ……;19,901 – 20,000 i.e. you should plot 200 values using a

program like Excel

4) Discuss any patterns you notice in the graph

Test 2

1) Set t = 1 for this test

2) Select 20 odd, non-prime and positive integers at random

3) Pass these values through you program and note how many return “Inconclusive”

4) Document your results and discuss

I also need a MAKEFILE that automates the building/compiling of the code.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}