1.2: Multiply using the Russian Peasant's Algorithm.
1.3: For Naive multiplication, carry out algorithm development Step 2.
1.4: (a) Write a recursive algorithm [Step 1] for computing ab
(where both a and b are positive integers). (b) Prove that it is
correct [Step 2]. (c) Analyze the number of recursive calls it makes
[Step 3] (it should be logarithmic). You can assume you have built-in
(unit-time) multiplication and bit shifting, but not exponentiation or
general division.
1.5: Demonstrate that by drawing the
appropriate graph. You might use ``gnuplot'' to do this by plotting
both of these functions and showing which is bigger.
1.6: Prove by induction that , where T(1) = 1 and . You may use the fact that .
1.7: CLR Exercise 2.1-2 (pg 31).
1.8: CLR Problem 2-6 (pg 40). [Extra Credit, but it's very cool.]