[理工] [資結]-成大97-資工所

看板Grad-ProbAsk作者 (ㄚ蔡)時間16年前 (2010/03/06 18:22), 編輯推噓3(304)
留言7則, 5人參與, 最新討論串1/1
請教一下第二大題第5小題的答案是? 題目如下 Consider the following two problems in which we are given a directed graph G=(V,E) and vertices u,v belong to V Unweighted shortest path problem (Find a path from u to v consisting of the fewest edges) Unweighted longest simple path problem (Find a path from u to v consisting of the most edges) (a)Determine which problem can be solved using dynamic programming (b)Determine which problem cannot be solved using dynamic programming a小題感覺可以用BFS 用DP兩題都沒有頭緒 麻煩幫解答 感謝^^ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.216.152.217

03/06 18:24, , 1F
(a) Unweighted shortest path problem
03/06 18:24, 1F

03/06 18:24, , 2F
(b) Unweighted longest simple path problem
03/06 18:24, 2F

03/06 18:25, , 3F
shortest path就dijkstra's longest simple path是NPC
03/06 18:25, 3F

03/06 18:26, , 4F
楓葉本 p.342
03/06 18:26, 4F

03/06 18:27, , 5F
找到了 感謝~
03/06 18:27, 5F

03/06 22:45, , 6F
求最短路徑 Dij是greedy...Bellman-Ford才是Dynamic
03/06 22:45, 6F

03/06 22:45, , 7F
說他是NPC不代表不能用Dynamic Programming解..
03/06 22:45, 7F
文章代碼(AID): #1BaYpfaO (Grad-ProbAsk)