Dynamic Planning Algorithm and Splitting Algorithm

Source: Internet
Author: User

The dynamic planning algorithm is similar to the divide and conquer method. Its basic idea is to break down the problem to be solved into several subproblems, first solve the subproblems, and then obtain the original solution from the subproblems. Different from the divide and conquer method, it is suitable for the problem solved by dynamic programming. The subproblems obtained by decomposition are often not independent of each other. If the sub-governance method is used to solve such problems, the number of sub-problems obtained by the decomposition is too large, so that it takes time to solve the original problem. However, the number of different subproblems often has a polynomial magnitude. Some subproblems have been repeatedly calculated many times when the division and control method is used to solve the problem. If we can save the answers to the resolved sub-questions and find the answers that have been solved as needed, we can avoid a large number of repeated computations to obtain a polynomial time algorithm. To achieve this goal, we can use a table to record the answers to all resolved subquestions. Whether or not this subproblem is used in the future, as long as it has been computed, the results will be filled in the table. This is the basic idea of dynamic planning. The specific dynamic planning algorithms are diverse, but they have the same table filling format.

A dynamic planning algorithm is usually used to solve a problem with an optimal nature. There may be many feasible solutions to these problems. Each solution corresponds to a value, and we want to find the solution with (maximum or minimum. To design a dynamic planning algorithm, follow these steps:

  1. Find out the nature of the optimal solution and portray its structural features.
  2. Recursively defines the optimal value.
  3. Calculate the optimal value in bottom-up mode.
  4. Construct an optimal solution based on the information obtained when the optimal value is calculated.

STEP (1 )~ (3) It is the basic step of the dynamic planning algorithm. When you only need to find the optimal value, step (4) can be omitted. If you need to find an optimal solution for the problem, you must perform step (4 ). At this time, when calculating the optimal value in step (3), more information is usually required to quickly construct an optimal solution based on the recorded information in step (4.

 

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.