CS-235. Problem Set 5


  1. Ex.2.13
  2. Ex.2.15
  3. Ex.3.21
  4. Ex.3.22
  5. Ex.3.25
  6. Prove Theorem 4.5
  7. Ex.4.1
  8. Ex.4.2
  9. Extra Credit: Ex.2.17
  10. Ex.3.31
     Extra credit:  Implement your own
    mod function (without using the standard % operator). Use it to implement exponentiation modulo n: write function mexp( a, e, n ) , returning ae mod n (the algorithm is from 3.31). The arguments  a, e, n are integer type and so is the function's output.  Test this function on some random (large) numbers and make sure that the function returns output in reasonable time and does not overflow.
  11. Extra credit: Ex.3.19