看板 Grad-ProbAsk 關於我們 聯絡資訊
If a dynamic programming problem satisfies the optimal substructure property, then a locally optimal solution is a global optimal. The worst case running time and expected running time are equal to within cons tant factors for any randomized algorithm. (這個敘述跟dp沒有關係,放在一起問 而已) 請問這兩個敘述錯在哪邊? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.139.0.113 ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1549533431.A.A39.html
dumpling1234: 第一個是區域 跟 全域 寫反了 02/07 18:29
dumpling1234: 第二個 我理解為 avg case worst case 的差別 所以 02/07 18:31
dumpling1234: 不一定是只差constant 02/07 18:31
eigen555: 像是 quick sort 的 avg 是 nlogn worst 是 n^2 02/07 18:48
haniwang: 感謝兩位! 02/07 21:54
ko330: 第一題的敘述是greedy 02/07 21:58
Leaving: 樓上不是哦 DP也有optimal substructure 02/07 23:30
Leaving: 就是錯在一樓說的地方沒錯 02/07 23:31
FlakizK: 第一題的應該是 Dijkstra 的敘述,greedy沒錯 02/08 03:02
Leaving: 我的意思是 greedy和DP都有optimal substructure 02/08 06:54
Leaving: 所以並不是因為它沒說是greedy才錯 02/08 06:56