京都大学 情報学研究科 数理工学専攻 2021年8月実施 グラフ理論
Author
祭音Myyura
Description
日本語版
G を点集合 V,枝集合 E から成る単純連結無向グラフとし,各枝 e∈E には実数値の重み w(e) が付与されている.
点の部分集合 X⊆V に対し X と V∖X の間の枝の集合を E(X) と記す.
枝の部分集合 S⊆E に対して w(S)≜∑e∈Sw(e), wmax(S)≜maxe∈Sw(e) と定める.以下の問いに答えよ.
(i) (X,F), X=V を G の部分木とし,G の最小木には木 (X,F) を含むものが存在すると仮定する.aF=uv∈E(X) を E(X) の中で重み最小の枝とする.このとき G の最小木には (X∪{u,v},F∪{aF}) を含むものが存在することを証明せよ.
(ii) 最小木を求めるプリム法を記述し,その正当性を証明せよ.
(iii) (V,T∗) を G の最小木とする.このとき G の任意の全域木 (V,T) に対して wmax(T∗)≤wmax(T) が成り立つことを証明せよ.
English Version
Let G be a simple and connected undirected graph with a vertex set V and an edge set E such that each edge e∈E is weighted by a real value w(e).
For a subset X⊆V of vertices, let E(X) denote the set of edges between X and V∖X.
For a subset S⊆E of edges, define w(S)≜∑e∈Sw(e) and wmax(S)≜maxe∈Sw(e).
Answer the following questions.
(i) Let (X,F), X=V be a subtree of G and assume that one of the minimum spanning trees of G contains the tree (X,F).
Let aF=uv∈E(X) be an edge with the minimum weight among the edges in E(X).
Prove that one of the minimum spanning trees of G contains (X∪{u,v},F∪{aF})
(ii) Describe Prim’s method for computing a minimum spanning tree and prove its correctness.
(iii) Let (V,T∗) be a minimum spanning tree of G.
Prove that wmax(T∗)≤wmax(T) holds for every spanning tree (V,T) of G.
题目描述
设 G=(V,E) 为带实数边权 w(e) 的简单连通无向图。对 X⊆V,令 E(X) 为连接 X 与 V∖X 的边集;对 S⊆E,定义
w(S)=e∈S∑w(e),wmax(S)=e∈Smaxw(e).
回答:
- 设 (X,F)(X=V)是 G 的一棵子树,并假设某棵最小生成树包含 (X,F)。令
aF=uv∈E(X) 为 E(X) 中权重最小的边。证明存在一棵最小生成树包含
(X∪{u,v},F∪{aF})。
- 描述求最小生成树的 Prim 算法,并证明其正确性。
- 设 (V,T∗) 是最小生成树。证明对任意生成树 (V,T),
wmax(T∗)≤wmax(T).
- 最小生成树的割性质:用交换论证证明扩展当前子树时选择跨割最轻边仍能嵌入某棵最小生成树。
- Prim 算法正确性:以逐步保持“当前树包含于某棵最小生成树”的不变量完成证明。
- 最小瓶颈生成树性质:证明最小生成树同时最小化所用边中的最大权重。
Kai
(i)
Let T∗=(V,E∗) be one minimum spanning tree that contains the tree (X,F).
If aF∈E∗, then T∗ itself contains (X∪u,v,F∪aF), so there is nothing to prove.
Since aF∈/E∗, the graph T∗∪af contains a cycle C (called the fundamental cycle of af). Hence along the cycle C, there must be another edge b=aF that also cross the same cut, i.e.,
b∈E∗∩E(X)
We substitute edge b by edge aF and let T′ denote the tree after substitution, i.e. T′=(V,E∗∪{aF}∖{b}).
Since aF∈E(X) is an edge with the minimum weight among the edges in E(X), we know that w(aF)≤w(b).
Hence
w(T′)=w(T∗)−w(b)+w(aF)≤w(T∗).
Hence T′ is a minimum spanning tree of G contains (X∪{u,v},F∪{aF})
(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 T is a subgraph of some minimum spanning tree T∗.
This is trivially true at the start, since initially T is just a single node and no edges.
Suppose that at some point in the algorithm we have T=(X,F) which a subgraph of some minimum spanning tree T∗.
Since the Prim's algorithm finds an edge e=uv∈E(X) of minimum weight, from (i) we know that there exists a minimum spanning tree of G that contains (X∪{u,v},F∪{e}). Therefore the induction hypothesis is preserved after this iteration.
When the algorithm terminates, we have X=V. Since one new vertex and one new edge are added in each iteration, F has ∣V∣−1 edges and (V,F) is a spanning tree. By the induction argument, (V,F) is contained in some minimum spanning tree. Therefore Prim’s algorithm correctly outputs a minimum spanning tree of G.
(iii)
Prove by contradiction:
Assume that there exists a spanning tree T′=(V,E′) of G such that wmax(T∗)>wmax(E′). Obviously T∗=E′.
Let emax∗=uv be an edge of maximum weight in T∗.
The graph T′∪{emax∗} contains a cycle C(emax∗) (called the fundamental cycle of emax∗ with respect to T′).
Since wmax(T∗)>wmax(E′), for every edge e∈C(emax∗),e=emax∗ we have
w(e)≤wmax(E′)<wmax(T∗)=w(emax∗)
Since C(emax∗)∖{emax∗} is a path from u to v in T′, there exists an edge f∈C(emax∗)∖{emax∗} that connects T∗∖{emax∗}.
Then we have
w(T∗∖{emax∗}+{f})=w(T∗)−w(emax∗)+w(f)<w(T∗)
i.e. the tree T∗∖{emax∗}+{f} is a spanning tree of lower weight than T∗, a contradiction.