当前位置:网站首页>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
边栏推荐
- 《统计学》第八版贾俊平第八章假设检验知识点总结及课后习题答案
- 《統計學》第八版賈俊平第七章知識點總結及課後習題答案
- Statistics, 8th Edition, Jia Junping, Chapter 6 Summary of knowledge points of statistics and sampling distribution and answers to exercises after class
- 函数:求两个正数的最大公约数和最小公倍
- Based on authorized access, cross host, and permission allocation under sqlserver
- 【指针】八进制转换为十进制
- Keil5 MDK's formatting code tool and adding shortcuts
- Solutions to common problems in database development such as MySQL
- [issue 18] share a Netease go experience
- 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
猜你喜欢
New version of postman flows [introductory teaching chapter 01 send request]
Database monitoring SQL execution
《统计学》第八版贾俊平第九章分类数据分析知识点总结及课后习题答案
《统计学》第八版贾俊平第六章统计量及抽样分布知识点总结及课后习题答案
Login the system in the background, connect the database with JDBC, and do small case exercises
Wu Enda's latest interview! Data centric reasons
SystemVerilog discusses loop loop structure and built-in loop variable I
servlet中 servlet context与 session与 request三个对象的常用方法和存放数据的作用域。
“人生若只如初见”——RISC-V
Fundamentals of digital circuit (IV) data distributor, data selector and numerical comparator
随机推荐
Quaternion -- basic concepts (Reprint)
Zhejiang University Edition "C language programming experiment and exercise guide (3rd Edition)" topic set
指針:最大值、最小值和平均值
《统计学》第八版贾俊平第七章知识点总结及课后习题答案
How does SQLite count the data that meets another condition under the data that has been classified once
How to learn automated testing in 2022? This article tells you
函数:用牛顿迭代法求方程的根
Why can swing implement a form program by inheriting the JFrame class?
[pointer] find the value of the largest element in the two-dimensional array
刷视频的功夫,不如看看这些面试题你掌握了没有,慢慢积累月入过万不是梦。
Login the system in the background, connect the database with JDBC, and do small case exercises
数字电路基础(一)数制与码制
Intranet information collection of Intranet penetration (4)
[pointer] find the largest string
Keil5 MDK's formatting code tool and adding shortcuts
关于超星脚本出现乱码问题
ByteDance ten years of experience, old bird, took more than half a year to sort out the software test interview questions
【指针】八进制转换为十进制
数字电路基础(三)编码器和译码器
Fundamentals of digital circuit (IV) data distributor, data selector and numerical comparator