当前位置:网站首页>Detailed introduction to dynamic programming (with examples)
Detailed introduction to dynamic programming (with examples)
2022-07-06 14:48:00 【sakeww】
Catalog
- Dynamic Programming:
- Topic explanation :
- The first question is : Fibonacci sequence
- The second question is : String segmentation (Word Break)
- Third question : Trigonometric matrix (Triangle)
- Fourth question : The total number of paths (Unique Paths)
- Fifth question : Minimum path sum (Minimum Path Sum)
- Sixth question : knapsack problem
- Question seven Palindrome segmentation (Palindrome Partitioning)
- The eighth question Edit distance (Edit Distance)
- Question 9 Different subsequences (Distinct Subsequences)
Dynamic Programming:
Definition :
DP Definition :
Dynamic programming is an extension of the idea of partition , Generally speaking, it means making big things small , The art of trivialization .
In the process of dividing big problems into small ones , Save the results of these small problems , And these results can be used directly when dealing with larger problems later .
characteristic :
Dynamic programming has the following three characteristics
- The original problem is decomposed into several similar subproblems .
- All subproblems need to be solved only once .
- Store the solution of the subproblem
The essence :
It is the definition of the problem state and the state transfer equation ( States and the recursive relationship between States )
Consideration angle :
Dynamic programming is generally considered from the following four perspectives :
- State definition
- The transfer equation between States is defined
- Initialization of state
- Return results
Requirements for state definition :
The defined state must form a recursive relationship
One sentence summary :
Three characteristics, four elements and two essences
Applicable scenario :
Maximum / minimum value , Not feasible , Is it right? , Number of schemes
Topic explanation :
The first question is : Fibonacci sequence
https://blog.csdn.net/sakeww/article/details/122770286
The second question is : String segmentation (Word Break)
https://blog.csdn.net/sakeww/article/details/122857096
Third question : Trigonometric matrix (Triangle)
https://blog.csdn.net/sakeww/article/details/122861135
Fourth question : The total number of paths (Unique Paths)
https://blog.csdn.net/sakeww/article/details/122863621
Fifth question : Minimum path sum (Minimum Path Sum)
https://blog.csdn.net/sakeww/article/details/122864886
Sixth question : knapsack problem
https://blog.csdn.net/sakeww/article/details/122867718
Question seven Palindrome segmentation (Palindrome Partitioning)
https://blog.csdn.net/sakeww/article/details/122894050
The eighth question Edit distance (Edit Distance)
https://blog.csdn.net/sakeww/article/details/122899542
Question 9 Different subsequences (Distinct Subsequences)
https://blog.csdn.net/sakeww/article/details/122900255
边栏推荐
- Sentinel overall workflow
- Numpy快速上手指南
- 数字电路基础(四) 数据分配器、数据选择器和数值比较器
- Lintcode logo queries the two nearest saplings
- Database monitoring SQL execution
- Matplotlib绘图快速入门
- Always of SystemVerilog usage_ comb 、always_ iff
- Using flask_ Whooshalchemyplus Jieba realizes global search of flask
- Intranet information collection of Intranet penetration (3)
- [pointer] find the largest string
猜你喜欢
Software testing interview summary - common interview questions
How to earn the first pot of gold in CSDN (we are all creators)
移植蜂鸟E203内核至达芬奇pro35T【集创芯来RISC-V杯】(一)
内网渗透之内网信息收集(三)
Résumé des points de connaissance et des réponses aux exercices après la classe du chapitre 7 de Jia junping dans la huitième édition des statistiques
《统计学》第八版贾俊平第十一章一元线性回归知识点总结及课后习题答案
Query method of database multi table link
Statistics 8th Edition Jia Junping Chapter IX summary of knowledge points of classified data analysis and answers to exercises after class
How does SQLite count the data that meets another condition under the data that has been classified once
1.支付系统
随机推荐
[pointer] the array is stored in reverse order and output
Statistics 8th Edition Jia Junping Chapter 5 probability and probability distribution
Résumé des points de connaissance et des réponses aux exercices après la classe du chapitre 7 de Jia junping dans la huitième édition des statistiques
Keil5-MDK的格式化代码工具及添加快捷方式
Intranet information collection of Intranet penetration (3)
“人生若只如初见”——RISC-V
Harmonyos application development -- address book management system telmanagesys based on listcontainer [phonebook][api v6]
How to transform functional testing into automated testing?
Function: find the root of the equation by Newton iterative method
【指针】数组逆序重新存放后并输出
数字电路基础(一)数制与码制
Function: calculates the number of uppercase letters in a string
《统计学》第八版贾俊平第十一章一元线性回归知识点总结及课后习题答案
The four connection methods of JDBC are directly coded
servlet中 servlet context与 session与 request三个对象的常用方法和存放数据的作用域。
Wang Shuang's detailed learning notes of assembly language II: registers
Database monitoring SQL execution
Circular queue (C language)
My first blog
Statistics 8th Edition Jia Junping Chapter 3 after class exercises and answer summary