跳到主要内容

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

Author

祭音Myyura

Description

日本語版

G=(V,E)G = (V, E) を節点集合 VV、枝集合 EE から成る単純強連結有向グラフ、N=[G,w]N = [G, w]GG の各枝 eEe \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), vVv \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) 次を満たす節点 sVs \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) 各枝の重みが非負であると仮定する。 ある部分集合 SVS \subseteq V と節点 sSs \in S に対して、SS から VSV \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 eEe \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),vVp(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 sVs \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 SVS \subseteq V and a vertex sSs \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 VSV \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] 由给每条有向边 eEe\in E 赋实权 w(e)w(e) 得到。用 (u,v)(u,v) 表示从 uuvv 的边,权重记为 w(u,v)w(u,v)dist(u,v)\operatorname{dist}(u,v)NN 中从 uuvv 的简单有向路的最小边权和。总权重为负的有向回路称为负环。回答:

  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. 若存在 sVs\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. 假设所有边权非负。对 SVS\subseteq VsSs\in S,在所有从 SS 指向 VSV\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^*).

考点

  • 最短路势函数与重赋权:沿回路累加约化边权,证明满足非负约化权时不可能存在负环。
  • 负环判定:由违反最短路三角不等式的边构造含负权闭合游走,进而推出负环存在。
  • Dijkstra 贪心性质:在非负边权下证明跨割最小候选可以正确确定新顶点的最短距离。

Kai

(i)

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

(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,vP'_{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,vP'_{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,vP'_{s, v} is not, we have vV(Ps,u)v \in V(P_{s,u}). Hence there exists a cycle CC in Ps,vP'_{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 vv^* must go through an edge from SS to VSV \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 vv. Let (u,v)(u',v') be the first edge on Ps,vP_{s,v^*} that crosses from SS to VSV \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,vP_{s, v^*}. Then,

dist(s,v)=w(Ps,v)=w(P1)+w(uv)+w(P2)w(P1)+w(uv)  (the weight of each edge is non-negative)dist(s,u)+w(uv)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^*)