京都大学 情報学研究科 数理工学専攻 2018年8月実施 グラフ理論
Author
祭音Myyura
Description
日本語版
G=(V,E) を節点集合 V、枝集合 E から成る単純強連結有向グラフ、N=[G,w] を G の各枝 e∈E に実数値の重み w(e) を与えて得られるネットワークとする。
節点 u から節点 v への有向枝は (u,v) と書き、その枝重みは w(u,v) とも書く。
節点 u から節点 v への距離 dist(u,v) を N における u から v への単純路上の枝重みの和の最小値と定める。
枝重み和が負である有向閉路を負閉路と呼ぶ。以下の問いに答えよ。
(i) 次の条件を満たす節点の実数値重み p(v), v∈V が存在するとき、N に負閉路が存在しないことを証明せよ。
w(u,v)+p(u)−p(v)≧0,∀(u,v)∈E.
(ii) 次を満たす節点 s∈V と枝 (u,v)∈E の組が存在するとき、N に負閉路が存在することを証明せよ。
dist(s,u)+w(u,v)<dist(s,v)
(iii) 各枝の重みが非負であると仮定する。
ある部分集合 S⊆V と節点 s∈S に対して、S から V∖S へ向かう枝 (u,v)∈E の中で dist(s,u)+w(u,v) の値が最小とする枝を (u∗,v∗) とする。
このとき、dist(s,v∗)=dist(s,u∗)+w(u∗,v∗) が成り立つことを証明せよ。
English Version
Let G=(V,E) denote a simple, strongly connected digraph with a vertex set V and an edge set E, and let N=[G,w] denote a network obtained from G by assigning a real value w(e) ot each edge e∈E as its weight.
A directed edge from a vertex u to a vertex v is denoted by (u,v) and its weight is writen as w(u,v).
Define the distance dist(u,v) from a vertex u to a vertex v to be the minimum summation of weights of edges in a simple path from u to v in N.
A directed cycle is called a negative cycle if the sum of edge weights in the cycle is negative.
Answer the following questions.
(i) Prove that N has no negative cycle if there is a set of real weights p(v),v∈V such that
w(u,v)+p(u)−p(v)≧0,∀(u,v)∈E.
(ii) Prove that N has a negative cycle if there is a pair of a vertex s∈V and an edge (u,v)∈E such that
dist(s,u)+w(u,v)<dist(s,v)
(iii) Assume that the weight of each edge is non-negative.
For a subset S⊆V and a vertex s∈S, let (u∗,v∗) be an edge that minimizes dist(s,u)+w(u,v) among all edges (u,v)∈E directed from S to V∖S.
Prove that dist(s,v∗)=dist(s,u∗)+w(u∗,v∗).
题目描述
设 G=(V,E) 为简单强连通有向图,网络 N=[G,w] 由给每条有向边 e∈E 赋实权 w(e) 得到。用 (u,v) 表示从 u 到 v 的边,权重记为 w(u,v);dist(u,v) 是 N 中从 u 到 v 的简单有向路的最小边权和。总权重为负的有向回路称为负环。回答:
- 若存在顶点实数势函数 p(v) 满足
w(u,v)+p(u)−p(v)≧0,∀(u,v)∈E,
证明 N 中不存在负环。
- 若存在 s∈V 与 (u,v)∈E 满足
dist(s,u)+w(u,v)<dist(s,v),
证明 N 中存在负环。
- 假设所有边权非负。对 S⊆V、s∈S,在所有从 S 指向 V∖S 的边中,令 (u∗,v∗) 使
dist(s,u)+w(u,v) 最小。证明
dist(s,v∗)=dist(s,u∗)+w(u∗,v∗).
- 最短路势函数与重赋权:沿回路累加约化边权,证明满足非负约化权时不可能存在负环。
- 负环判定:由违反最短路三角不等式的边构造含负权闭合游走,进而推出负环存在。
- Dijkstra 贪心性质:在非负边权下证明跨割最小候选可以正确确定新顶点的最短距离。
Kai
(i)
Please refer to 京都大学 情報学研究科 数理工学専攻 2023年8月実施 グラフ理論.
(ii)
Let Ps,u denote a simple path from s to u of distance dist(s,u).
Let Ps,v′ denote the path by concatenating Ps,u and edge (u,v).
If dist(s,u)+w(u,v)<dist(s,v), then by the definition of "distance" we know that Ps,v′ is not a simple path otherwise dist(s,u)+w(u,v)≥dist(s,v).
Since Ps,u is a simple path but Ps,v′ is not, we have v∈V(Ps,u).
Hence there exists a cycle C in Ps,v′ which can be written as (v,…,u,v).
Let Ps,uv denote the subpath of Ps,u ends at v (note that Ps,uv is also a simple path).
If C is not a negative cycle, i.e., w(C)≥0, then we have
w(Ps,uv)=w(Ps,u)−w(C)+w(u,v)=dist(s,u)−w(C)+w(u,v)<dist(s,v)
which contradicts the definition of dist(s,v). Therefore, C is a negative cycle.
(iii)
(Note: this question is actually asking a proof of correctness of Dijkstra's algorithm)
Since the weight of each edge is non-negative, there does not exist negative cycle.
By the contrapositive of Question (2), since there is no negative cycle, for every edge (u,v)
dist(s,v)≤dist(s,u)+w(u,v)
Hence
dist(s,v∗)≤dist(s,u∗)+w(u∗,v∗)
Any path from s to v∗ must go through an edge from S to V∖S.
Hence, let Ps,v∗={s,…,u′,v′,…,v∗} denote a shortest simple path from s to v.
Let (u′,v′) be the first edge on Ps,v∗ that crosses from S to V∖S and let P1={s,…,u′} and P2={v′,…,v∗} denote the subpaths of Ps,v∗.
Then,
dist(s,v∗)=w(Ps,v∗)=w(P1)+w(u′v′)+w(P2)≥w(P1)+w(u′v′) (the weight of each edge is non-negative)≥dist(s,u′)+w(u′v′)≥dist(s,u∗)+w(u∗,v∗) (definition of (u∗,v∗))
Therefore,
dist(s,v∗)=dist(s,u∗)+w(u∗,v∗)