Dynamic programming for php algorithm learning

Source: Internet
Author: User
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 )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.