Summary of Introduction to algorithms-Chapter 18 Dynamic Planning (3) Basic 2

Source: Internet
Author: User

We recommend that you first look at the preface: http://www.cnblogs.com/tanky_woo/archive/2011/04/09/2010263.html

This section shows the summary of Introduction to algorithms-Chapter 16. 15th dynamic planning (1) basic introduction.

Two elements of the optimization problem using dynamic planning:Optimal sub-structureAndOverlapping subproblems.

Let's take a look at the optimal sub-structure:

In the 17th summary, the optimal sub-structure has been designed in the assembly line Scheduling Problem to prove that the optimal sub-structure problem can be solved using the "cutting technology" mentioned in the book, that is, if there is a better solution, there is a conflict in the optimal solution.

Let's look at the overlapping sub-problems:

When a recursive algorithm constantly calls the same issue, we say the most problematic issue includes "overlapping subproblems ".

Is the above sentence hard to understand?

Take a look at the comparison below:

Recursive Algorithms: from top to bottom, each subproblem that occurs repeatedly in the recursive tree must be resolved once.

Dynamic Planning: bottom-up, only one solution for each.

Based on the triangle evaluation examples summarized in article 16th, we can see that, from the bottom up, each subproblem is solved only once.

 

The above theory is a bit strong. I started to learn DP and read the HDOJ courseware. If you are interested, you can check it out.

In this section, we mainly talked about finding the state transition equation. In the 16th triangle evaluation examples and the 17th assembly line scheduling examples, the recursive formulas are state transition equations.

The following sections are well understood:

-----------------------

Several Concepts of dynamic planning:
Stage: divides the problem into stages based on the spatial sequence or temporal sequence.
State: describes the nature of a thing. Different things have different properties, so they are characterized by different States. The solution status of the problem is described in stages.
Decision-making: select an operation for each stage based on the requirements of the question.
State transition equation: Describes the evolution of States related to stages using mathematical formulas.

Dynamic planning is an important branch of operational research and a method to optimize the multi-stage decision-making process.

The multi-stage decision-making process divides the research process into several interrelated stages. When solving the problem, a decision should be made for each stage. After the previous decision is determined, decisions in the next stage are often affected.

Dynamic planning is based on the "principle of optimization ".
The "principle of optimization" can be stated as: no matter what the initial state and the first decision is, the remaining decision forms an optimal decision sequence relative to the new state generated by the previous decision.

The subsequence of the optimal decision sequence must be the subsequence of the local optimal decision sequence.
It contains a non-local optimal decision subsequence, which must not be an optimal decision sequence.

The guiding ideology of dynamic planning is:

When making each decision, list various possible local solutions, and then discard the local solutions that certainly cannot obtain the optimal solution based on some judgment conditions. In this way, each step is filtered to ensure that the global conditions are optimal. Filtering is equivalent to the maximum effective pruning (from the search perspective), and the efficiency is very high. But it is different from greedy. The greedy method can only achieve local optimization, but cannot guarantee global optimization, because some problems do not conform to the principle of optimization.

-----------------------

 

We can see that recursion is DFS, while DP is BFS, which means that for DP, it is calculated layer by layer from the underlying layer, and then selects the optimal layer, layer-by-layer optimization and overall optimization.

 

In fact, it is better to do more questions (⊙ o ⊙). Don't think I am a question controller. In fact, to be honest, it is better to do a question over N times. To put it bluntly, algorithm math is a family of algorithms, which are mathematics. When I walk through high school, I know that I have to do more math problems, especially on the axis. It is better to read N times to do it again, this is also the same. Just do a few questions and you will know that DP is a magic horse!

Tanky Woo label: DP, dynamic planning

In my independent blog: http://www.wutianqi.com /? P = 2500

You are welcome to learn from each other and make progress!

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.