1 / 9

Ander Chen ACM Class Zhiyuan College Shanghai Jiao Tong University Email:Andercxt@gmail

动态规划中一些概念 的 进阶理解. Ander Chen ACM Class Zhiyuan College Shanghai Jiao Tong University Email:Andercxt@gmail.com Tel:+86 182 1707 1623. 总述. 解决复杂问题的方法. 运筹学内容. 归纳法思想. 基本概念. 最优子结构. 无后效性 两个不大好的例子. 状态 再提上面的例子. 优势与劣势. 存储子问题的解而避免计算重复的子问题. 空间换时间. 效率直接和状态数挂钩. 例题一.

obelia
Download Presentation

Ander Chen ACM Class Zhiyuan College Shanghai Jiao Tong University Email:Andercxt@gmail

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 动态规划中一些概念的 进阶理解 Ander Chen ACM Class Zhiyuan College Shanghai Jiao Tong University Email:Andercxt@gmail.com Tel:+86 182 1707 1623

  2. 总述 • 解决复杂问题的方法 • 运筹学内容 • 归纳法思想

  3. 基本概念 • 最优子结构 • 无后效性 • 两个不大好的例子 • 状态 • 再提上面的例子

  4. 优势与劣势 • 存储子问题的解而避免计算重复的子问题 • 空间换时间 • 效率直接和状态数挂钩

  5. 例题一 • 给定一个网格图,每个点可能有一定权值的宝藏,一个点可以被挖掘的条件是它左上、上与右上的点已被挖掘或它的y坐标为-1。给定一个网格图,每个点可能有一定权值的宝藏,一个点可以被挖掘的条件是它左上、上与右上的点已被挖掘或它的y坐标为-1 • 从解的形态入手

  6. 例题二 • 数轴上有N个水珠,初始时每个水珠含有M个单位的水,因为天气很热,水以1单位/秒的速度蒸发.有一只甲虫,初始时在原点,以1单位长度/秒的速度爬行,喝水时间不计,问甲虫最多能喝到多少单位的水. • 最优解中,蚂蚁的行径路径是有规律的 • 与上题相比,用最优解作为状态设计的切入点

  7. 例题三 • N行M列的棋盘求有多少种车的放置方案 • F[i,opt]?F[i,j]? • 状态中记录的信息并不需要太多,但信息越多往往能让你的状态更加“合法”

  8. 例题四 • 求一个长度为N的数字序列和一个长度为M的数字序列配对(只有相同数字才能配对),且每个配对有且仅有与另一个配对交叉,求最多的交叉数。 • 枚举最后一对的位置,将问题划归即可。 • F[i,j,i',j']? F[i,j]?F[i',j']?

  9. Thank you! Make Presentation much more fun

More Related