プリンキピア

第12章グラフ理論

The Traveling Salesperson Problem巡回セールスパーソン問題

Now let’s focus our attention on the graph theory application known as the traveling salesperson problem (TSP) in which we must find the shortest route to visit a number of locations and return to the starting point.
英語のヒント
次に、いくつかの場所を訪れて出発点に戻る最短の経路を見つけなければならない、巡回セールスパーソン問題(TSP)として知られるグラフ理論の応用に注目しよう。
Recall from Hamilton Cycles, the officer in the U.S. Air Force who is stationed at Vandenberg Air Force base and must drive to visit three other California Air Force bases before returning to Vandenberg. The officer needed to visit each base once. We looked at the weighted graph in Figure 12.192 representing the four U.S. Air Force bases: Vandenberg, Edwards, Los Angeles, and Beal and the distances between them.
英語のヒント
ハミルトン閉路で見た、ヴァンデンバーグ空軍基地に駐屯し、カリフォルニアのほかの3つの空軍基地を車で訪れてからヴァンデンバーグに戻らなければならないアメリカ空軍の将校を思い出そう。将校は各基地を1回ずつ訪れる必要があった。4つのアメリカ空軍基地、ヴァンデンバーグ、エドワーズ、ロサンゼルス、ビールとそのあいだの距離を表す図12.192の重みつきグラフを見た。
A graph represents the four California air force bases. The graph has four vertices: E, B, V, and L. The edge, E B is labeld 410 miles. The edge, B V is labeled 396 miles. The edge, V L is labeled 159 miles. The edge, L E is labeled 106 miles. The edge, L B is labeled 439 miles. The edge, E V is labeled 207 miles.
Figure 12.192図12.192
Graph of Four California Air Force Bases
英語のヒント
カリフォルニアの4つの空軍基地のグラフ
Any route that visits each base and returns to the start would be a Hamilton cycle on the graph. If the officer wants to travel the shortest distance, this will correspond to a Hamilton cycle of lowest weight. We saw in Table 12.11 that there are six distinct Hamilton cycles (directed cycles) in a complete graph with four vertices, but some lie on the same cycle (undirected cycle) in the graph.
英語のヒント
各基地を訪れて出発点に戻る経路は、どれもグラフのハミルトン閉路である。将校がいちばん短い距離を移動したいなら、これは重みがいちばん小さいハミルトン閉路に対応する。表12.11で、頂点が4個の完全グラフには異なるハミルトン閉路(有向閉路)が6つあるが、グラフの同じ閉路(無向閉路)の上にあるものがあることを見た。
Table 12.11表12.11
Hamilton Cycles in a Complete Graph with Four Vertices
英語のヒント
頂点が4個の完全グラフのハミルトン閉路
Complete Graph完全グラフCycle閉路Cycle閉路Cycle閉路
A graph has four vertices, a, b, c, and d. Edges connect a b, b c, c d, d a, a c, and b d.
A graph has four vertices, a, b, c, and d.  Edges connect a b, b c, c d, d a, a c, and b d. The edges, a c, and b d are in dashed lines.
A graph has four vertices, a, b, c, and d. Edges connect a b, b c, c d, d a, a c, and b d. The edges, a d, and b c are in dashed lines.
A graph has four vertices, a, b, c, and d. Edges connect a b, b c, c d, d a, a c, and b d. The edges, a b, and d c are in dashed lines.
Clockwise Hamilton Cycle時計回りのハミルトン閉路
A graph has four vertices, a, b, c, and d. Edges connect a b, b c, c d, d a, a c, and b d. The edges, a c, and b d are in dashed lines. Directed arrows flow from a to b, b to c, c to d, and d to a.
a → b → c → d → a
A graph has four vertices, a, b, c, and d. Edges connect a b, b c, c d, d a, a c, and b d. The edges, ad, and bc are in dashed lines. Directed edges flow from a to b, b to d, d to c, and c to a.
a → b → d → c → a
A graph has four vertices, a, b, c, and d. Edges connect a b, b c, c d, d a, a c, and b d. The edges, a b, and dc are in dashed lines. Directed edges flow from a to c, c to b, b to d, and d to a.
a → c → b → d → a
Counterclockwise Hamilton Cycle反時計回りのハミルトン閉路
A graph has four vertices, a, b, c, and d. Edges connect a b, b c, c d, d a, a c, and b d. The edges, a c, and b d are in dashed lines. Directed edges flow from a to d, d to c, c to b, and b to a.
a → d → c → b → a
A graph has four vertices, a, b, c, and d. Edges connect a b, b c, c d, d a, a c, and b d. The edges, a d, and bc are in dashed lines. The directed edges flow from a to c, c to d, d to b, and b to a.
a → c → d → b → a
A graph has four vertices, a, b, c, and d. Edges connect a b, b c, c d, d a, a c, and b d. The edges, a b, and dc are in dashed lines. The edges flow from a to d, d to b, b to c, and c to a.
a → d → b → c → a
Since the distance between bases is the same in either direction, it does not matter if the officer travels clockwise or counterclockwise. So, there are really only three possible distances as shown in Figure 12.193.
英語のヒント
基地のあいだの距離はどちらの向きでも同じなので、将校が時計回りに進んでも反時計回りに進んでも変わらない。だから、図12.193に示すように、ありうる距離は実際には3つだけである。
Three graphs represent the four California air force bases. Each graph has four vertices: E, B, V, and L. The edge, E B is labeled 410 miles. The edge, B V is labeled 396 miles. The edge, V L is labeled 159 miles. The edge, L E is labeled 106 miles. The edge, L B is labeled 439 miles. The edge, E V is labeled 207 miles. In the first graph, the edges, E V, and L B are in dashed lines. In the second graph, the edges, E L and B V are in dashed lines. In the third graph, the edges, E B and L V are in dashed lines.
Three graphs represent the four California air force bases. Each graph has four vertices: E, B, V, and L. The edge, E B is labeled 410 miles. The edge, B V is labeled 396 miles. The edge, V L is labeled 159 miles. The edge, L E is labeled 106 miles. The edge, L B is labeled 439 miles. The edge, E V is labeled 207 miles. In the first graph, the edges, E V, and L B are in dashed lines. In the second graph, the edges, E L and B V are in dashed lines. In the third graph, the edges, E B and L V are in dashed lines.
Three graphs represent the four California air force bases. Each graph has four vertices: E, B, V, and L. The edge, E B is labeled 410 miles. The edge, B V is labeled 396 miles. The edge, V L is labeled 159 miles. The edge, L E is labeled 106 miles. The edge, L B is labeled 439 miles. The edge, E V is labeled 207 miles. In the first graph, the edges, E V, and L B are in dashed lines. In the second graph, the edges, E L and B V are in dashed lines. In the third graph, the edges, E B and L V are in dashed lines.
Figure 12.193図12.193
Three Possible Distances
英語のヒント
ありうる3つの距離
The possible distances are:
英語のヒント
ありうる距離は次のとおりである:
396+410+106+159=1071207+410+439+159=1215396+439+106+207=1148
So, a Hamilton cycle of least weight is V → B → E → L → V (or the reverse direction). The officer should travel from Vandenberg to Beal to Edwards, to Los Angeles, and back to Vandenberg.
英語のヒント
だから、重みがいちばん小さいハミルトン閉路はV → B → E → L → V(または逆向き)である。将校はヴァンデンバーグからビール、エドワーズ、ロサンゼルスへ行き、ヴァンデンバーグに戻るべきである。

Finding Weights of All Hamilton Cycles in Complete Graphs完全グラフのすべてのハミルトン閉路の重みを求める

Notice that we listed all of the Hamilton cycles and found their weights when we solved the TSP about the officer from Vandenberg. This is a skill you will need to practice. To make sure you don't miss any, you can calculate the number of possible Hamilton cycles in a complete graph. It is also helpful to know that half of the directed cycles in a complete graph are the same cycle in reverse direction, so, you only have to calculate half the number of possible weights, and the rest are duplicates.
英語のヒント
ヴァンデンバーグの将校のTSPを解いたとき、ハミルトン閉路をすべて挙げてその重みを求めたことに注意しよう。これは練習する必要のある技能である。漏らさないように、完全グラフのありうるハミルトン閉路の数を計算できる。また、完全グラフの有向閉路の半分は同じ閉路の逆向きであることを知っておくと役に立つ。だから、ありうる重みの数の半分を計算するだけでよく、残りは重複である。
Example 12.43例題 12.43

Calculating Possible Weights of Hamilton Cyclesハミルトン閉路のありうる重みを計算する

Suppose you have a complete weighted graph with vertices N, M, O, and P.
英語のヒント
頂点N、M、O、Pをもつ重みつき完全グラフがあるとする。
  1. Use the formula (n−1)! to calculate the number of distinct Hamilton cycles in the graph.
    英語のヒント
    公式(n−1)!を使って、このグラフの異なるハミルトン閉路の数を計算せよ。
  2. Use the formula (n−1)!2 to calculate the greatest number of different weights possible for the Hamilton cycles.
    英語のヒント
    公式(n−1)!2を使って、ハミルトン閉路のありうる異なる重みの最大の数を計算せよ。
  3. Are all of the distinct Hamilton cycles listed here? How do you know?
    Cycle 1: N → M → O → P → N
    Cycle 2: N → M → P → O → N
    Cycle 3: N → O → M → P → N
    Cycle 4: N → O → P → M → N
    Cycle 5: N → P → M → O → N
    Cycle 6: N → P → O → M → N
    英語のヒント
    ここに異なるハミルトン閉路がすべて挙げられているか。どうしてわかるか。閉路1:N → M → O → P → N 閉路2:N → M → P → O → N 閉路3:N → O → M → P → N 閉路4:N → O → P → M → N 閉路5:N → P → M → O → N 閉路6:N → P → O → M → N
  4. Which pairs of cycles must have the same weights? How do you know?
    英語のヒント
    閉路のどの組の重みが同じでなければならないか。どうしてわかるか。
Solution解答
  1. There are 4 vertices; so, n=4. This means there are (n−1)!=(4−1)!=3⋅2⋅1=6 distinct Hamilton cycles beginning at any given vertex.
    英語のヒント
    頂点が4個なので、n=4である。つまり、どの頂点から始めても異なるハミルトン閉路は(n−1)!=(4−1)!=3⋅2⋅1=6個ある。
  2. Since n=4, there are (n−1)!2=(4−1)!2=62=3 possible weights.
    英語のヒント
    n=4なので、ありうる重みは(n−1)!2=(4−1)!2=62=3個である。
  3. Yes, they are all distinct cycles and there are 6 of them.
    英語のヒント
    はい、すべて異なる閉路で、6個ある。
  4. Cycles 1 and 6 have the same weight, Cycles 2 and 4 have the same weight, and Cycles 3 and 5 have the same weight, because these pairs follow the same route through the graph but in reverse.
    英語のヒント
    閉路1と6の重みは同じで、閉路2と4の重みは同じで、閉路3と5の重みは同じである。これらの組はグラフの同じ経路を逆向きにたどるからである。