subject
Mathematics, 14.05.2021 01:20 902coo

The DSA document includes a recommended algorithm for testing a number for primality. 1. [Choose w] Let w be a random odd integer. Then (w − 1) is even and can be expressed in the form 2am with m odd. That is, 2a is the largest power of 2 that divides (w − 1).
2. [Generate b] Let b be a random integer in the range 1 < b < w.
3. [Exponentiate] Set j = 0 and z = bm mod w.
4. [Done] If j = 0 and z = 1, or if z = w − 1, then w passes the test and may be prime; go to step 8.
5. [Terminate?] If j > 0 and z = 1, then w is not prime; terminate algorithm for this w.
6. [Increase j] Set j = j + 1. If j < a, set z = z2 mod w and go to step 4.
7. [Terminate] w is not prime; terminate algorithm for this w.
8. [Test again] If enough random values of b have been tested, then accept w as prime and terminate algorithm; otherwise, go to step 2.

Required:
a. Explain how the algorithm works.
b. Show that it is equivalent to the Miller–Rabin test.

ansver
Answers: 3

Another question on Mathematics

question
Mathematics, 21.06.2019 18:00
What power can you write to represent the volume of the cube shown? write the power as an expression with a base and an exponent and then find the volume of the cube
Answers: 3
question
Mathematics, 21.06.2019 20:30
Cody was 165cm tall on the first day of school this year, which was 10% taller than he was on the first day of school last year.
Answers: 1
question
Mathematics, 21.06.2019 21:00
Estimate the area under the curve f(x) = 16 - x^2 from x = 0 to x = 3 by using three inscribed (under the curve) rectangles. answer to the nearest integer.
Answers: 1
question
Mathematics, 22.06.2019 02:00
Which expression represents the total perimeter of her sandwich, and if x = 1.2, what is the approximate length of the crust?
Answers: 2
You know the right answer?
The DSA document includes a recommended algorithm for testing a number for primality. 1. [Choose w]...
Questions
question
Mathematics, 30.05.2020 17:01