[理工] 103 交大資演 NP問題
Assume P != NP
For each of the following problems, decide whether it is a P-problem or an
NP-hard (or NP-Complete) problem, or neither.
(1) Find a shortest simple path between two nodes in a directed graph with
negative and/or postive edge weights, and containing negative weight cycles.
想請教一下板上各位榜首大哥大姐, 這題林立宇題庫班的時候答案給 neither
原因是因為負 cylce 會讓這個問題變得沒有意義, 但題目已經說明是simple path了
path 本身的定義就是不包含重複點, 不知道各位大哥哥大姊姊會怎麼解釋這題 ~ 感恩
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.133.195.20
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1453562277.A.662.html
推
01/23 23:24, , 1F
01/23 23:24, 1F
→
01/23 23:26, , 2F
01/23 23:26, 2F
→
01/23 23:28, , 3F
01/23 23:28, 3F
推
01/23 23:33, , 4F
01/23 23:33, 4F
推
01/23 23:38, , 5F
01/23 23:38, 5F
推
01/24 02:17, , 6F
01/24 02:17, 6F
推
01/24 09:55, , 7F
01/24 09:55, 7F
→
01/24 10:46, , 8F
01/24 10:46, 8F
→
01/24 11:20, , 9F
01/24 11:20, 9F
→
01/24 13:42, , 10F
01/24 13:42, 10F
推
01/24 19:11, , 11F
01/24 19:11, 11F
→
01/24 19:11, , 12F
01/24 19:11, 12F
→
01/24 19:11, , 13F
01/24 19:11, 13F
→
01/24 19:38, , 14F
01/24 19:38, 14F
推
01/24 20:25, , 15F
01/24 20:25, 15F
→
01/24 20:28, , 16F
01/24 20:28, 16F
→
01/24 20:28, , 17F
01/24 20:28, 17F
→
01/24 20:29, , 18F
01/24 20:29, 18F
→
01/24 20:29, , 19F
01/24 20:29, 19F
→
01/24 20:30, , 20F
01/24 20:30, 20F
推
01/24 20:34, , 21F
01/24 20:34, 21F
→
01/24 20:34, , 22F
01/24 20:34, 22F
→
01/24 20:57, , 23F
01/24 20:57, 23F
→
01/24 20:58, , 24F
01/24 20:58, 24F
推
01/24 21:00, , 25F
01/24 21:00, 25F
→
01/24 21:08, , 26F
01/24 21:08, 26F
推
01/24 21:22, , 27F
01/24 21:22, 27F
→
01/24 21:23, , 28F
01/24 21:23, 28F
→
01/24 21:24, , 29F
01/24 21:24, 29F
→
01/24 21:25, , 30F
01/24 21:25, 30F
→
01/24 22:04, , 31F
01/24 22:04, 31F
→
01/24 22:05, , 32F
01/24 22:05, 32F
→
01/24 22:06, , 33F
01/24 22:06, 33F
→
01/24 22:08, , 34F
01/24 22:08, 34F
→
01/24 22:12, , 35F
01/24 22:12, 35F
→
01/24 22:13, , 36F
01/24 22:13, 36F
→
01/24 22:44, , 37F
01/24 22:44, 37F
→
01/24 22:44, , 38F
01/24 22:44, 38F
→
01/24 22:44, , 39F
01/24 22:44, 39F
有問林立宇老師了, 這題是NP沒錯, 附上林立宇老師的說法
因為 longest path problem 可以 reduce 到這個問題的 decision 版本:
在限制 instance graph 含有正 cycle 的情形下,
longest path problem 仍為 NP-complete
所以將 LP 問題之 problem instance G 中所有邊的 weight 皆取負
則可成為此問題的一個 problem instance G'
這樣找到 G' 的 shortest simple path 就相當於找到 G 的 longest simple path
※ 編輯: amge1524 (220.133.195.20), 01/24/2016 22:55:21
推
01/24 23:15, , 40F
01/24 23:15, 40F
→
01/24 23:21, , 41F
01/24 23:21, 41F
→
01/24 23:21, , 42F
01/24 23:21, 42F
→
01/24 23:30, , 43F
01/24 23:30, 43F
推
01/24 23:44, , 44F
01/24 23:44, 44F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):
理工
12
44