※ 引述《windows2k (KERORO軍曹)》之銘言:
: ※ 引述《DJWS (...)》之銘言:
: : 前幾天找到了 min-cost max-flow 簡介
: : 他提到只要將 max-flow 找出來, 然後不斷的找 negative cost cycle
: : 就可以將 min-cost flow 做出來了
: : 然而 negative cost cycle 要怎麼找呢?
: 將cost當做邊,當成一個graph
: 跑bellman ford algorithm就能找出graph中是否有negative cost cycle
我知道 Bellman-Ford algo 可以判斷圖中是否有 negative cycle
但是要怎麼找出組成那個 cycle 的 edge 們呢?
此外 文件上說找 negative cost cycle 找負越多的越好 能有效縮短時間
要怎麼才能找出負最多的 negative cost cycle 呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.167.1.212