Chris Pollett>
Old Classes>
CS255 |
HW#4 --- last modified April 21 2019 00:11:41.Due date: Apr 24 Files to be submitted: Purpose: To gain experience with online and number theoretic algorithms. Related Course Outcomes: The main course outcomes covered by this assignment are: LO6 -- Analyze or code a number theoretic algorithm Specification: This homework will consist of two parts, a written part and a coding part. Both parts will be submitted in the Hw4.zip file. The written part should be in a file Hw4.pdf. For the written part of the homework you should write solutions for the following questions. In what you turn in, make sure to write the names and student ids for each group member. For each problem, first copy and paste the question, then write your solution to it beneath it.
For the coding part of the homework, I want you to code either a Java or Python implementation of a prime number finder. Your prime number finder should make use of the Miller Rabin algorithm. I will run your program from the command line using the format: java PrimeFinder length num_trials or python PrimeFinder.py length_num num_trials For example, java PrimeFinder 3 7 On a given input PrimeFinder should find the least number that passes num_trials many Miller Rabin trials of length between length_num and length_num +1 and output it in binary. On the particular example above, the output should be: 101 By Sylvester's Theorem, we know there is always a prime in this range. For 0.5pts of your coding points described below, plot `log_2(x-2^{n-1})` vs `n` where `x` is your output for values `n` between 100 and 200. Say what you observe. Point Breakdown
|