跳到主要内容

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

Author​

祭音Myyura

Description​

大学公表の原題

日本語版​

G=(V,E)G = (V, E) を節点集合 VV、枝集合 EE から成る単純強連結有向グラフ、N=[G,w]N = [G, w] を GG の各枝 e∈Ee \in E に実数値の重み w(e)w(e) を与えて得られるネットワークとする。 節点 uu から節点 vv への有向枝は (u,v)(u, v) と書き、その枝重みは w(u,v)w(u,v) とも書く。 節点 uu から節点 vv への距離 dist(u,v)\text{dist}(u,v) を NN における uu から vv への単純路上の枝重みの和の最小値と定める。 枝重み和が負である有向閉路を負閉路と呼ぶ。以下の問いに答えよ。

(i) 次の条件を満たす節点の実数値重み p(v)p(v), v∈Vv \in V が存在するとき、NN に負閉路が存在しないことを証明せよ。

w(u,v)+p(u)−p(v)≧0,∀(u,v)∈E.w(u, v) + p(u) - p(v) \geqq 0, \quad \forall (u, v) \in E.

(ii) 次を満たす節点 s∈Vs \in V と枝 (u,v)∈E(u,v) \in E の組が存在するとき、NN に負閉路が存在することを証明せよ。

dist(s,u)+w(u,v)<dist(s,v)\text{dist}(s, u) + w(u, v) < \text{dist}(s, v)

(iii) 各枝の重みが非負であると仮定する。 ある部分集合 S⊆VS \subseteq V と節点 s∈Ss \in S に対して、SS から V∖SV \setminus S へ向かう枝 (u,v)∈E(u, v) \in E の中で dist(s,u)+w(u,v)\text{dist}(s, u) + w(u,v) の値が最小とする枝を (u∗,v∗)(u^*, v^*) とする。 このとき、dist(s,v∗)=dist(s,u∗)+w(u∗,v∗)\text{dist}(s, v^*) = \text{dist}(s, u^*) + w(u^*, v^*) が成り立つことを証明せよ。

English Version​

Let G=(V,E)G = (V, E) denote a simple, strongly connected digraph with a vertex set VV and an edge set EE, and let N=[G,w]N= [G, w] denote a network obtained from GG by assigning a real value w(e)w(e) ot each edge e∈Ee \in E as its weight. A directed edge from a vertex uu to a vertex vv is denoted by (u,v)(u, v) and its weight is writen as w(u,v)w(u, v). Define the distance dist(u,v)\text{dist}(u, v) from a vertex uu to a vertex vv to be the minimum summation of weights of edges in a simple path from uu to vv in NN. 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 NN has no negative cycle if there is a set of real weights p(v),v∈Vp(v), v \in V such that

w(u,v)+p(u)−p(v)≧0,∀(u,v)∈E.w(u, v) + p(u) - p(v) \geqq 0, \quad \forall (u, v) \in E.

(ii) Prove that NN has a negative cycle if there is a pair of a vertex s∈Vs \in V and an edge (u,v)∈E(u, v) \in E such that

dist(s,u)+w(u,v)<dist(s,v)\text{dist}(s, u) + w(u, v) < \text{dist}(s, v)

(iii) Assume that the weight of each edge is non-negative. For a subset S⊆VS \subseteq V and a vertex s∈Ss \in S, let (u∗,v∗)(u^*, v^*) be an edge that minimizes dist(s,u)+w(u,v)\text{dist}(s, u) + w(u,v) among all edges (u,v)∈E(u, v) \in E directed from SS to V∖SV \setminus S. Prove that dist(s,v∗)=dist(s,u∗)+w(u∗,v∗)\text{dist}(s, v^*) = \text{dist}(s, u^*) + w(u^*, v^*).

题目描述​

设 G=(V,E)G=(V,E) 为简单强连通有向图,网络 N=[G,w]N=[G,w] 由给每条有向边 e∈Ee\in E 赋实权 w(e)w(e) 得到。用 (u,v)(u,v) 表示从 uu 到 vv 的边,权重记为 w(u,v)w(u,v);dist⁡(u,v)\operatorname{dist}(u,v) 是 NN 中从 uu 到 vv 的简单有向路的最小边权和。总权重为负的有向回路称为负环。回答:

  1. 若存在顶点实数势函数 p(v)p(v) 满足

    w(u,v)+p(u)−p(v)≧0,∀(u,v)∈E,w(u,v)+p(u)-p(v)\geqq0,\qquad\forall (u,v)\in E,

    证明 NN 中不存在负环。

  2. 若存在 s∈Vs\in V 与 (u,v)∈E(u,v)\in E 满足

    dist⁡(s,u)+w(u,v)<dist⁡(s,v),\operatorname{dist}(s,u)+w(u,v)<\operatorname{dist}(s,v),

    证明 NN 中存在负环。

  3. 假设所有边权非负。对 S⊆VS\subseteq V、s∈Ss\in S,在所有从 SS 指向 V∖SV\setminus S 的边中,令 (u∗,v∗)(u^*,v^*) 使 dist⁡(s,u)+w(u,v)\operatorname{dist}(s,u)+w(u,v) 最小。证明

    dist⁡(s,v∗)=dist⁡(s,u∗)+w(u∗,v∗).\operatorname{dist}(s,v^*)= \operatorname{dist}(s,u^*)+w(u^*,v^*).

Kai​

(i)​

Please refer to 京都大学 情報学研究科 数理工学専攻 2023年8月実施 グラフ理論.

For any directed cycle CC,

∑(u,v)∈Cw(u,v)=∑(u,v)∈C(w(u,v)+p(u)−p(v))≥0,\sum_{(u,v)\in C}w(u,v) =\sum_{(u,v)\in C}\bigl(w(u,v)+p(u)-p(v)\bigr)\geq0,

because the potential terms telescope. Hence no directed cycle has negative weight.

(ii)​

Let Ps,uP_{s,u} denote a simple path from ss to uu of distance dist(s,u)\text{dist}(s, u). Let Ps,v′P'_{s, v} denote the path by concatenating Ps,uP_{s,u} and edge (u,v)(u,v).

If dist(s,u)+w(u,v)<dist(s,v)\text{dist}(s, u) + w(u, v) < \text{dist}(s, v), then by the definition of "distance" we know that Ps,v′P'_{s, v} is not a simple path otherwise dist(s,u)+w(u,v)≥dist(s,v)\text{dist}(s, u) + w(u, v) \geq \text{dist}(s, v).

Since Ps,uP_{s,u} is a simple path but Ps,v′P'_{s, v} is not, we have v∈V(Ps,u)v \in V(P_{s,u}). Hence there exists a cycle CC in Ps,v′P'_{s, v} which can be written as (v,…,u,v)(v, \ldots, u, v).

Let Ps,uvP_{s,u}^v denote the subpath of Ps,uP_{s,u} ends at vv (note that Ps,uvP_{s,u}^v is also a simple path). If CC is not a negative cycle, i.e., w(C)≥0w(C) \geq 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)\begin{aligned} w(P_{s,u}^v) &= w(P_{s,u}) - w(C) + w(u,v) \\ &= \text{dist}(s,u) - w(C) + w(u,v) \\ &< \text{dist}(s,v) \end{aligned}

which contradicts the definition of dist(s,v)\text{dist}(s,v). Therefore, CC 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)(u,v)

dist(s,v)≤dist(s,u)+w(u,v)\text{dist}(s,v) \leq \text{dist}(s,u) + w(u,v)

Hence

dist(s,v∗)≤dist(s,u∗)+w(u∗,v∗)\text{dist}(s,v^*) \leq \text{dist}(s,u^*) + w(u^*,v^*)

Any path from ss to v∗v^* must go through an edge from SS to V∖SV \setminus S. Hence, let Ps,v∗={s,…,u′,v′,…,v∗}P_{s, v^*} = \{s, \ldots, u', v', \ldots, v^*\} denote a shortest simple path from ss to v∗v^*. Let (u′,v′)(u',v') be the first edge on Ps,v∗P_{s,v^*} that crosses from SS to V∖SV \setminus S and let P1={s,…,u′}P_1 = \{s, \ldots, u'\} and P2={v′,…,v∗}P_2 = \{v', \ldots, v^*\} denote the subpaths of Ps,v∗P_{s, 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∗))\begin{aligned} \text{dist}(s,v^*) &= w(P_{s, v^*}) = w(P_1) + w(u'v') + w(P_2) \\ &\geq w(P_1) + w(u'v') \ \ (\text{the weight of each edge is non-negative}) \\ &\geq \text{dist}(s,u') + w(u'v') \\ &\geq \text{dist}(s,u^*) + w(u^*,v^*) \ \ (\text{definition of }(u^*,v^*)) \end{aligned}

Therefore,

dist(s,v∗)=dist(s,u∗)+w(u∗,v∗)\text{dist}(s,v^*) = \text{dist}(s,u^*) + w(u^*,v^*)