Dynamic Programming III Michael Tsai 20111014 2 start Slides: 29 Download presentation Dynamic Programming III Michael Tsai 2011/10/14 2 (複習start) 7 Dynamic Programming出招 1. 找出Optimal Substructure 8 9 10 Optimal Substructure 大問題的解裡面有小問題的解! 11 Overlapping subproblem 不同問題需要同樣子問題的解! 14 (複習end) 15 翻譯機問題 the machicolation 16 翻譯機問題 Optimal Binary Search Tree …… 17 18 i 0 0. 05 1 2 3 4 5 0. 10 0. 05 0. 10 0. 20 0. 10 0. 05 0. 10 20 Dynamic Programming出招 1. 找出Optimal Substructure 23 Dynamic Programming出招 2. 列出遞迴式子 (表示花費) 25 Dynamic Programming出招 3. 計算花費 i w w 11 22 33 44 55 66 j 00 11 22 33 44 55 26 e的填表順序 i ee j 00 11 22 33 44 55 11 22 橘色是會用到的subproblem 33 44 55 66 一次填一條對角線 27 大家來練習 0 0. 05 1 2 3 4 5 0. 10 0. 05 0. 10 0. 20 0. 10 0. 05 0. 10 29 Dynamic Programming出招 4. 印出Optimal Binary Search Tree結果 會出現在hw 3 15. 5 -1 on p. 403