Skip to content

Latest commit

 

History

History
 
 

review-dynamicprogramming

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Review: Dynamic Programming Problems


Dynamic programming problems scare me A LOT.

Yeah, it could be quite frustrating, if you haven’t found the key assertions.


Dynamic Programming is an algorithmic paradigm that solves a given complex problem by breaking it into subproblems and stores the results of subproblems to avoid computing the same results again.

The main idea behind DP is to save duplicated caculations.

Trade space for time.


Basic Abstractions

NameSummary
optimal substructure
DP vs recursive+memoization

Scenarios Code Skeleton Questions

NameExample

Key Parts In DP Problems:

  1. Key observation is crucial. Watch careful for how the states transit?
  • Walk through with smaller cases manually. And detect the pattern.

Different Types Of DP Functions:


The most impressive problems to me:


See all dynamicprogramming problems: #dynamicprogramming [display-posts tag=”dynamicprogramming” posts_per_page=”100” orderby=”title”]

See more blog_posts.

linkedin
github
slack

notes

动态规划
动态规划(dynamic programming)多应用于子问题重叠的情况,每个子问题只求解一次.动态规划方法通常用来求解最优化问题的一个最优解.

设计动态规划方法的4个步骤:

刻画一个最优解的结构特征
递归地定义最优解的值
计算最优解的值,通常采用自底向上的方法
利用计算出的信息构造一个最优解
最优子结构(optimal substructure)
问题的最优解由相关子问题的最优解组合而成,而这些子问题可以独立求解.