Lab 2 Fall 2012

This lab is to review parts of Chapter 1 of the text book. Please go to your lab, do the problems to get your full credit for the lab.
  1. Implement modexp algorithm in C++. Do exercise 1.25 (Optional) Do exercise 1.25 (using your program) and do it using Fermat's little theorem.
  2. Using pencil and paper find x,y and d such that 89*x+55*y=1 using Extended Euclidean Algorithm (Here a is 89 and b is 55 - 89,55 are Fibonacci Numbers) - Try both cases d = 1. a - 0.b and d = 1.a + 0. b
  3. Implement primality testing algorithm in C++. Generate all prime numbers between 3 and 1000.
  4. (Optional) Implement Extended Euclidean Algorithm in C++.