diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -718,3 +718,25 @@ When you have completed this objective, you should be able to * [ ] Study Section 35.5 of the textbook. * [ ] Do Exercises 35.5-2 and Problem 35-3 from the textbook as part of Assignment 4. + +# Divide-and-Conquer + +We solve a problem recursively, applying three steps at each level of the +recursion. + +1. Divide the problem into a number of subproblems that are smaller instances of the same problem. +1. Conquer the subproblems by solving them recursively. If the subproblem sizes + are small enough, however, just solve the subproblems in a straightforward + manner. +1. Combine the solutions to the subproblems into the solution for the original problem. + +When the subproblems are large enough to solve recursively, we call that the +*recursive case*. Once the subproblems become small enough that we no longer +recurse, we say that the recursion "bottoms out" and that we have gotten down to +the *base case*. + +## Recurrenes + +Give us a natural way to characterize the running times of divide and conquer +algorithms. A *recurrence* is an equation or inequality that describes a +function in terms of its value on smaller inputs. |
