Problem Set #3

CS 255
due April 4, 2001

20 points
  1. Find the exact number of bit multiplications required to find the nth power of a b-bit integer directly from the recursive definition of exponentiation, assuming that the kth power of a b-bit number has bk bits, and that multiplication of a b-bit number by a c-bit number has cost exactly bc.

  2. Redo the problem above, assuming that the divide-and-conquer algorithm is used for exponentiation, and that n is a power of 2.

  3. Redo the problem above, assuming that n is one less than a power of 2.