2016.4.2 Teacher Wang Lecture notes (Dynamic planning)

Source: Internet
Author: User

I. Several points in the dynamic planning

1. State (analogy to function), that is, to determine the minimum number of variables required to obtain the optimal solution, it is necessary to ensure that there are fewer variables, and the optimal solution is correct

2. State transfer (analogy to recursive understanding): State transfer requires a recursive equation, the initial value of the state-the recursive boundary,

Because recursion is very slow, we turn recursion into a for loop, which improves efficiency, but the processing of the order of the For loop is critical.

3. Solve--Array (order), Memory search

Solution method One; recursion of the array: You can avoid slow recursion, the dimension of the array is the parameter in the state (so you need to consider the problem of dimensionality reduction),

This implementation method, the order of the For loop is also key

Solution method Two: memory search; When finding out the order of each State is difficult to determine, then recursion, this is not the general recursion, the general recursion speed is slow, because do a lot of repeated calculations,

With a memory search, when you do a repeat calculation, you return the value that you calculated before, instead of the calculation, this is the memory search. (This requires an array to open, with space for time).

4. Characteristics; Optimal substructure: The question of how to take the current state apart?

5. Optimization:

Note that the cost of optimization must be small, otherwise optimization will have little meaning. Specific optimizations vary depending on the topic. There is no common method.

2016.4.2 Teacher Wang Lecture notes (Dynamic planning)

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.