当前位置:网站首页>On dynamic programming
On dynamic programming
2022-06-25 21:14:00 【Rabbit cloud program】
Concept
Dynamic programming (Dynamic Programming,DP) It is the process of solving the optimization of decision-making process . A method of solving complex problems by decomposing the original problem into relatively simple subproblems . In the backpack problem 、 Production and operation problems 、 Money management issues 、 The allocation of resources 、 The shortest path problem and the reliability problem of complex systems are widely used .
In my student days acm competition , Is a required algorithm topic , It is also the algorithm question that appears most frequently in the interview of large technology companies , Many types of topics , No fixed template , Very flexible , It's hard to think , The difficulty is in the upper middle , There is no obvious routine .
In fact, learn dynamic planning well , It's not just about mastering the algorithm model , And for ourselves , Use a dynamic planning idea to deal with our own affairs and problems , Or you can put this idea into your life , Put it in your frustration , Very skillful and interesting , If you have this in mind , It's a lot easier .
Algorithm implementation description
Dynamic algorithm and divide and conquer algorithm , The recursive algorithm is similar to , The basic idea is to decompose the problem to be solved into several sub problems , First solve the subproblem , Then the solution of the original problem is obtained from the solution of these subproblems . What's different from divide and conquer is , The decomposed subproblems are not independent of each other , Some subproblems are interdependent , Repeat the calculation to solve . It depends on whether the problem can be solved by dynamic programming .
Three elements
The stage of the problem
The state of each phase
The recursive relationship between the previous stage and the later stage .
The recurrence relation must be transformed from the problem with small order to the problem with large order , So dynamic programming can be solved by recursion .
The whole solving process can be described by an optimal decision table , The optimal decision table is a two-dimensional table , Where the line represents the stage of the decision , The list shows the status of the problem , Form needs
边栏推荐
- Node installation method you don't know
- Interviewer: why does TCP shake hands three times and break up four times? Most people can't answer!
- [important notice] developer document update (12.13-12.19)
- [data recovery in North Asia] a data recovery case in which the upper virtual machine data is lost due to the hard disk failure and disconnection of raid6 disk array
- 同花顺炒股软件开户是合法的吗?安全吗
- [nailing scenario capability package] video conference (official conference system)
- 8 minutes to understand the wal mechanism of tdengine
- [nail scenario capability package] hospital visitor verification
- Leetcode theme [array] -31- next spread
- [deep learning series] - visual interpretation of neural network
猜你喜欢

Yolov4 improved version comes out! Yolov4 extended edition! Yolov4 launched scaled-yolov4: scaling cross stage partial network
R language momentum and Markowitz portfolio model implementation

Idea implements hot deployment

Rounding related calculation
![[buucry] sensor (Manchester code)](/img/ab/066923f1aa1e8dd8dcc572cb60a25d.jpg)
[buucry] sensor (Manchester code)

OSI notes sorting
Tencent music knowledge map search practice

UDP Vs TCP (Powercert animated videos)

js (1)
2022 "gold, silver and four" is a must for job hopping. You must know 100 questions in 2022 intermediate and advanced Android interview to realize your big factory dream
随机推荐
New generation engineers teach you how to play with alluxio + ml (Part 2)
The live registration is hot to start | the first show of Apache dolphin scheduler meetup in 2022!
Must see the summary! In depth learning era, you should read 10 articles to understand image classification!
Compile 6relayd using the cross compiler
Flexible scale out: from file system to distributed file system
[machine learning] machine learning from zero to mastery -- teaching you how to use decision tree to predict contact lens types
R language momentum and Markowitz portfolio model implementation
COMP9024
2022 oceanbase technical essay contest officially opened | come and release your force
109 practical shell scripts
Introduction to interface test, interface protocol and common interface test tools
How to close gracefully after using jedis
C language dynamic memory allocation
[machine learning] machine learning from zero to mastery -- teach you to recognize handwritten digits using KNN
C language soul torture: do you know the difference between the two?
Yolov4 improved version comes out! Yolov4 extended edition! Yolov4 launched scaled-yolov4: scaling cross stage partial network
Lesson 4 beautifulsoup
Feature Engineering in simple terms – a practice guide based on openmldb (Part 1)
Beginner to embedded development
Soft test intermediate simple notes