跳到主要内容

京都大学 情報学研究科 数理工学専攻 2021年8月実施 グラフ理論

Author

祭音Myyura

Description

日本語版

GG を点集合 VV,枝集合 EE から成る単純連結無向グラフとし,各枝 eEe\in E には実数値の重み w(e)w(e) が付与されている. 点の部分集合 XVX \subseteq V に対し XXVXV \setminus X の間の枝の集合を E(X)E(X) と記す. 枝の部分集合 SES \subseteq E に対して w(S)eSw(e)w(S) \triangleq \sum_{e \in S} w(e), wmax(S)maxeSw(e)w_{\text{max}} (S) \triangleq \max_{e \in S} w(e) と定める.以下の問いに答えよ.

(i) (X,F)(X, F), XVX \neq VGG の部分木とし,GG の最小木には木 (X,F)(X, F) を含むものが存在すると仮定する.aF=uvE(X)a_F = uv \in E(X)E(X)E(X) の中で重み最小の枝とする.このとき GG の最小木には (X{u,v},F{aF})(X \cup \{u, v\}, F \cup \{a_F\}) を含むものが存在することを証明せよ.

(ii) 最小木を求めるプリム法を記述し,その正当性を証明せよ.

(iii) (V,T)(V, T^*)GG の最小木とする.このとき GG の任意の全域木 (V,T)(V, T) に対して wmax(T)wmax(T)w_{\text{max}}(T^*) \le w_{\text{max}}(T) が成り立つことを証明せよ.

English Version

Let GG be a simple and connected undirected graph with a vertex set VV and an edge set EE such that each edge eEe\in E is weighted by a real value w(e)w(e). For a subset XVX \subseteq V of vertices, let E(X)E(X) denote the set of edges between XX and VXV \setminus X. For a subset SES \subseteq E of edges, define w(S)eSw(e)w(S) \triangleq \sum_{e \in S} w(e) and wmax(S)maxeSw(e)w_{\text{max}} (S) \triangleq \max_{e \in S} w(e). Answer the following questions.

(i) Let (X,F)(X, F), XVX \neq V be a subtree of GG and assume that one of the minimum spanning trees of GG contains the tree (X,F)(X, F). Let aF=uvE(X)a_F = uv \in E(X) be an edge with the minimum weight among the edges in E(X)E(X). Prove that one of the minimum spanning trees of GG contains (X{u,v},F{aF})(X \cup \{u, v\}, F \cup \{a_F\})

(ii) Describe Prim’s method for computing a minimum spanning tree and prove its correctness.

(iii) Let (V,T)(V, T^*) be a minimum spanning tree of GG. Prove that wmax(T)wmax(T)w_{\text{max}}(T^*) \le w_{\text{max}}(T) holds for every spanning tree (V,T)(V, T) of GG.

题目描述

G=(V,E)G=(V,E) 为带实数边权 w(e)w(e) 的简单连通无向图。对 XVX\subseteq V,令 E(X)E(X) 为连接 XXVXV\setminus X 的边集;对 SES\subseteq E,定义

w(S)=eSw(e),wmax(S)=maxeSw(e).w(S)=\sum_{e\in S}w(e),\qquad w_{\max}(S)=\max_{e\in S}w(e).

回答:

  1. (X,F)(X,F)XVX\ne V)是 GG 的一棵子树,并假设某棵最小生成树包含 (X,F)(X,F)。令 aF=uvE(X)a_F=uv\in E(X)E(X)E(X) 中权重最小的边。证明存在一棵最小生成树包含 (X{u,v},F{aF})(X\cup\{u,v\},F\cup\{a_F\})
  2. 描述求最小生成树的 Prim 算法,并证明其正确性。
  3. (V,T)(V,T^*) 是最小生成树。证明对任意生成树 (V,T)(V,T)
    wmax(T)wmax(T).w_{\max}(T^*)\le w_{\max}(T).

考点

  • 最小生成树的割性质:用交换论证证明扩展当前子树时选择跨割最轻边仍能嵌入某棵最小生成树。
  • Prim 算法正确性:以逐步保持“当前树包含于某棵最小生成树”的不变量完成证明。
  • 最小瓶颈生成树性质:证明最小生成树同时最小化所用边中的最大权重。

Kai

(i)

Let T=(V,E)T^* = (V, E^*) be one minimum spanning tree that contains the tree (X,F)(X, F).

If aFEa_F \in E^*, then TT^* itself contains (Xu,v,FaF)(X\cup{u,v},F\cup{a_F}), so there is nothing to prove.

Since aFEa_F \notin E^*, the graph TafT^* \cup a_f contains a cycle CC (called the fundamental cycle of afa_f). Hence along the cycle CC, there must be another edge baFb \neq a_F that also cross the same cut, i.e.,

bEE(X)b \in E^* \cap E(X)

We substitute edge bb by edge aFa_F and let TT' denote the tree after substitution, i.e. T=(V,E{aF}{b})T' = (V, E^* \cup \{a_F\} \setminus \{b\}).

Since aFE(X)a_F \in E(X) is an edge with the minimum weight among the edges in E(X)E(X), we know that w(aF)w(b)w(a_F) \le w(b).

Hence

w(T)=w(T)w(b)+w(aF)w(T).w(T') = w(T^*) - w(b) + w(a_F) \le w(T^*).

Hence TT' is a minimum spanning tree of GG contains (X{u,v},F{aF})(X \cup \{u, v\}, F \cup \{a_F\})

(ii)

PrimAlgorithm(G=(V, E)):
choose an arbitrary vertex s in V
F = {}
X = {s}
while X is not equal to V do:
find an edge e = uv (u in X and v in V\X) of minimum weight among E(X)
F = F + {e}
X = X + {v}

output F

We prove the correctness of Prim's algorithm by induction.

The induction hypothesis will be that after each iteration, the tree TT is a subgraph of some minimum spanning tree TT^*.

This is trivially true at the start, since initially TT is just a single node and no edges.

Suppose that at some point in the algorithm we have T=(X,F)T = (X, F) which a subgraph of some minimum spanning tree TT^*. Since the Prim's algorithm finds an edge e=uvE(X)e = uv \in E(X) of minimum weight, from (i) we know that there exists a minimum spanning tree of GG that contains (X{u,v},F{e})(X \cup \{u, v\}, F \cup \{e\}). Therefore the induction hypothesis is preserved after this iteration.

When the algorithm terminates, we have X=VX=V. Since one new vertex and one new edge are added in each iteration, FF has V1|V|-1 edges and (V,F)(V,F) is a spanning tree. By the induction argument, (V,F)(V,F) is contained in some minimum spanning tree. Therefore Prim’s algorithm correctly outputs a minimum spanning tree of GG.

(iii)

Prove by contradiction: Assume that there exists a spanning tree T=(V,E)T' = (V, E') of GG such that wmax(T)>wmax(E)w_{\text{max}}(T^*) > w_{\text{max}}(E'). Obviously TET^* \neq E'.

Let emax=uve^{*}_{\max}=uv be an edge of maximum weight in TT^*. The graph T{emax}T' \cup \{e^{*}_{\max}\} contains a cycle C(emax)C(e^{*}_{\max}) (called the fundamental cycle of emaxe^{*}_{\max} with respect to TT').

Since wmax(T)>wmax(E)w_{\text{max}}(T^*) > w_{\text{max}}(E'), for every edge eC(emax),eemaxe \in C(e^{*}_{\max}), e \neq e^{*}_{\max} we have

w(e)wmax(E)<wmax(T)=w(emax)w(e) \le w_{\text{max}}(E') < w_{\text{max}}(T^*) = w(e^{*}_{\max})

Since C(emax){emax}C(e^{*}_{\max}) \setminus \{e^{*}_{\max}\} is a path from uu to vv in TT', there exists an edge fC(emax){emax}f \in C(e^{*}_{\max})\setminus \{e^{*}_{\max}\} that connects T{emax}T^* \setminus \{e^{*}_{\max}\}.

Then we have

w(T{emax}+{f})=w(T)w(emax)+w(f)<w(T)w(T^* \setminus \{e^{*}_{\max}\} + \{f\}) = w(T^*) - w(e^{*}_{\max}) + w(f) <w(T^*)

i.e. the tree T{emax}+{f}T^* \setminus \{e^{*}_{\max}\} + \{f\} is a spanning tree of lower weight than TT^*, a contradiction.