Assuming that the number of bit multiplications required to multiply a b-bit number by a c-bit number is exactly
bc, and that the kth power of a b-bit number has exact bk bits, find the asymptotic number
of bit multiplications required to find the nth power of a b-bit integer, in terms of b and n.
- directly from the recursive definition of exponentiation (that is, the one that defines xn in
terms of xn-1)
- using the divide-and-conquer algorithm for exponentiation (that is, the algorithm analogous to the one on p.
879 of Cormen et al), assuming that n is a power of 2.
- using the divide-and-conquer algorithm for exponentiation (that is, the algorithm analogous to the one on p.
879 of Cormen et al), assuming that n is 1 less than a power of 2.
Note that this question does not involve modular arithmetic.
EXTRA CREDIT: For 2 points per part, find exact (nonasymptotic) solutions to each of the three parts of this
question, in terms of b and n.