Divide and Conquer

When a is even...

eqnarray55

When a is odd...

eqnarray65

We solve the problem by breaking it into roughly equal-size subproblems, solving them separately, then combining the results (in this case, there's just one subproblem).

Rule #2 of Good Algorithm Design: Divide-and-Conquer!


next up previous
Next: Analysis Up: RECURSION Previous: Exponentiation