作者Murasaki0110 (Paradise Lost)
看板Grad-ProbAsk
標題[理工] 演算法 MCST
時間Sat Jun 16 23:09:35 2012
What is wrong with the following algorithm for computing the minimum-cost
spanning tree of a given weighted undirected graph?
If the input is just a single-node graph, return the single node. Otherwise,
divide the graph into 2 subgraphs, recursively compute their minimum-cost
spanning trees, and then connect the 2 spanning trees with an edge between
the two subgraphs that has the minumum weight.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.45.27.36
→ antiasus:好歹你也貼一下你不懂的地方吧... 06/16 23:33
→ wsx02:可以看一下MST的定義 這是哪個學校的期末考題呀0.0? 06/16 23:37
→ Murasaki0110:剛剛洗澡的時候想通了,多謝 06/16 23:47