Initial knowledge dynamic Programming

Source: Internet
Author: User

1. Features of the problem that can be solved with dynamic planning:

1) The problem has the most sub-structural properties. If the optimal solution of the problem contains the solution of the sub-problem is also optimal, it is said that the problem has the best sub-structural properties

2) No effect. Once a number of current state values are determined, the evolution of the process thereafter is related to the values of the several states, and it is not the case that the previous method was taken or the path evolved to the current number of States.

2. Ideas:

1) The original problem is decomposed into several sub-problems, the sub-problem and the original problem form the same or similar, but the size has become smaller. Sub-problem solved, the original problem can be solved. Once the solution to the sub-problem is found, it is saved, so only one request

2) Determine the state: The time complexity of the whole problem is the number of States multiplied by the time required to calculate each state, the state can be a number (for example, a number triangle for maximum and), or a row (such as a two-dimensional array), or it can be other forms.

3) Determine the value of the initial state/boundary state.

4) Determine how the state transition equation is migrated between different states

Example: Longest ascending sub-sequence hdu1069, number triangle

Two common forms of motion Regulation: recursive (easy to explode), recursive (can use dynamic scrolling array, but attention to order, direction)

  

Initial knowledge dynamic Programming

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.