Lecture 6: Fast Powering and Binary Divide and Conquer Recurrences

Background Material

Optional Reading

Topics

  1. Karatsuba's recurrence when sizes of the recursive calls differ
  2. Number of bits in the binary representation of a number
  3. Binary powering
  4. Analysis of binary powering
    1. Recurrence relation: M(e) = number of multiplications to compute a^e. M(e) = 1 + M(floor(e/2)) even e, M(e) = 2 + M(floor(e/2)) odd e, M(0) = M(1) = 0.
    2. Solution: M(e) = floor(lg(e)) + nu(e) -1, where nu(e) = number of 1 bits in the binary representation of e.

Slides

  1. none.

Maple worksheets and programs

Created: Oct. 26, 2006 by jjohnson@cs.drexel.edu