In the divide-and-conquer strategy, we solved a problem recursively, applying three steps to each level of recursion.
1. Decomposition, divide the problem into sub-problems, the form of sub-problem is the same as the original problem, but smaller
2. Solve, recursively solve the sub-problem, if the size of the sub-problem is small enough, then stop recursion, directly solve
3. Merging, solution of the problem of the handle to the solution of the original problem
When the sub-problem is large enough, recursion is required, and that is the recursive condition
When the problem is small enough, you don't need recursion, that's the basic situation.
Three ways to solve recursion:
The substituting method guesses a realm, and uses the mathematical inductive method to prove that the boundary
Recursive tree method transforms recursion into a tree whose nodes represent the cost of recursive calls at different levels, and then uses boundaries and techniques to solve recursive
The main method can be solved as a recursive boundary of the following formula
Introduction to algorithm fourth chapter on the strategy of Division and Administration