← 回題庫

卷別

資料結構與演算法

選擇

國立臺灣大學 2026 · 考試 · 第 25 題

考科演算法

(4 points) Let G=(V,E)G = (V, E) be a connected, undirected, weighted graph with distinct and positive edge weights. Let A⊆EA \subseteq E be a subset of edges that is contained in some minimum spanning tree of GG. Which of the following statements is always true?

  • (A)
    Any minimum-weight edge in the graph is safe for AA.
  • (B)
    For any cut (S,V∖S)(S, V \setminus S), the lightest edge crossing the cut is safe for AA, regardless of whether the cut respects AA.
  • (C)
    If an edge ee is the lightest edge on some cycle in GG, then ee must belong to every minimum spanning tree (MST).
  • (D)
    If a cut (S,V∖S)(S, V \setminus S) respects AA, then the lightest edge crossing this cut is safe for AA.
  • (E)
    Any edge chosen by Prim's algorithm from an arbitrary start vertex is safe for every subset A⊆EA \subseteq E.

標準解析

AI 已複查