卷別
資料結構與演算法
選擇國立臺灣大學 2026 · 考試 · 第 25 題
考科演算法
(4 points) Let be a connected, undirected, weighted graph with distinct and positive edge weights. Let be a subset of edges that is contained in some minimum spanning tree of . Which of the following statements is always true?
- (A)Any minimum-weight edge in the graph is safe for .
- (B)For any cut , the lightest edge crossing the cut is safe for , regardless of whether the cut respects .
- (C)If an edge is the lightest edge on some cycle in , then must belong to every minimum spanning tree (MST).
- (D)If a cut respects , then the lightest edge crossing this cut is safe for .
- (E)Any edge chosen by Prim's algorithm from an arbitrary start vertex is safe for every subset .