Divide and conquer introduction [00PK]

Divide and conquer is a typical problem solving strategy that works as follows:

  1. Break up the input into (smaller) subproblems.
  2. Solve the subproblems recursively.
  3. Combine the subproblem solutions into an overall solution.
When it works, this is a beautiful technique and very amenable to analysis:
  • To implement a divide-and-conquer strategy, we can use recursion.
  • To prove the correctness of a divide-and-conquer strategy, we can use proof by induction.
  • To analyze the asymptotic runtime of a divide-and-conquer strategy, we can use recurrence relations and the Master Theorem.