原书出处
Introduction to Algorithms, Fourth Edition
21 第21章 最小生成树
v).c is minimized 7 UNION(u, v) 8 T = T ∪ {(u, v).orig} 9 u.mark = TRUE 10 v.mark = TRUE
11 G′.V = {FIND-SET(v) : v ∈ G.V} 12 G′.E = Ø 13 for each edge (x, y) ∈ G.E 14 u = FIND-SET(x) 15 v = FIND-SET(y) 16 if u ≠ v 17 if (u, v) ∉ G′.E 18 G′.E = G′.E ∪ {(u, v)} 19 (u, v).orig′ = (x, y).orig 20 (u, v).c′ = (x, y).c 21 elseif (x, y).c < (u, v).c′ 22 (u, v).orig′ = (x, y).orig 23 (u, v).c′ = (x, y).c 24 construct adjacency lists G′.Adj for G′ 25 return G′ and T
21-3 Alternative minimum-spanning-tree algorithms Consider the three algorithms MAYBE-MST
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter021.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea