Dynamic programming is a way and method to solve the optimization problem. The optimal solution of the final problem can be derived from the optimal solution of the first child problem. Dynamic programming is a way and method to solve the optimization problem. The optimal solution of the final problem can be derived from the optimal solution of the first child problem.
For dynamic planning of this algorithm, I have not learned very thoroughly. I simply sum up my learning experience as follows:
The dynamic planning concept integrates the recursive and divide-and-conquer ideas. However, unlike the division-based approach, the optimal solution of each branch in the state record solution process is used in the dynamic planning solution, this saves a lot of repeated branch computing.
The most important and difficult two steps of dynamic planning are to find the state of the sub-problem and the derivation relationship between states.
Dynamic planning is more likely to be used: to find the maximum and minimum values, whether feasible solutions are available, and the number of feasible solutions.
First, let's take a look at the most common question and try out the Fibonacci series (if you do not know it, please baidu). What is the value at a certain position?
Application Division and control method solution code
The above is the content of dynamic planning for php algorithm learning. For more information, see PHP Chinese network (www.php1.cn )!