1. Run the three algorithms from the previous exercise to compute the following values: 232 mod 202, 2 32 mod 2020, and 232 mod 315. How do their speeds compare?
2. Prove (7.3.2): for integers k > 0, a, and b, we have a + b mod k = [(a mod k) + (b mod k)] mod k. Begin your proof as follows: We can write a = ck + r and b = dk + t for r,t ∈ {0, . . . , k − 1} (as guaranteed by Theorem 7.1). Then use mod-and-div and Lemma 7.2.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here