Divide, Conquer, Combine
- This is chapter 5.
- Divide, Conquer, and Combine is a problem solving technique
- Break the problem into sub parts.
- Solve the problem on these sub parts.
- Combine the solutions to form a single final solution.
- This frequently involves at least a recursive definition.
- Do we need to review recursion?
- Analyzing code with recursion frequently involves solving a recurrence relation.
- This is a function defined recursively.
- In my experience, some of these can become tricky.
- You should have studied this in MATH 270, but ....
- They note that divide and conquer works well when you have a polynomial time brute force algorithm
- You can generally reduce this with a divide-conquer-combine algorithm.