第12章グラフ理論
The Brute Force Method総当たり法
The method we have been using to find a Hamilton cycle of least weight in a complete graph is a brute force algorithm, so it is called the brute force method. The steps in the brute force method are:
英語のヒント
完全グラフの重みがいちばん小さいハミルトン閉路を見つけるのに使ってきた方法は総当たりアルゴリズムなので、総当たり法という。総当たり法の手順は次のとおりである:
Step 1: Calculate the number of distinct Hamilton cycles and the number of possible weights.
英語のヒント
手順1:異なるハミルトン閉路の数とありうる重みの数を計算する。
Step 2: List all possible Hamilton cycles.
英語のヒント
手順2:ありうるハミルトン閉路をすべて挙げる。
Step 3: Find the weight of each cycle.
英語のヒント
手順3:各閉路の重みを求める。
Step 4: Identify the Hamilton cycle of lowest weight.
英語のヒント
手順4:重みがいちばん小さいハミルトン閉路を見きわめる。
Example 12.44例題 12.44
Applying the Brute Force Method総当たり法を当てはめる
On the next assignment, the air force officer must leave from Travis Air Force base, visit Beal, Edwards, and Vandenberg Air Force bases each exactly once and return to Travis Air Force base. There is no need to visit Los Angeles Air Force base. Use Figure 12.194 to find the shortest route.
英語のヒント
次の任務で、空軍の将校はトラヴィス空軍基地を出発し、ビール、エドワーズ、ヴァンデンバーグの各空軍基地をちょうど1回訪れ、トラヴィス空軍基地に戻らなければならない。ロサンゼルス空軍基地を訪れる必要はない。図12.194を使って最短の経路を見つけよ。

Figure 12.194図12.194
Distances between Five California Air Force Bases
英語のヒント
カリフォルニアの5つの空軍基地のあいだの距離
Solution解答
Step 1: Since there are 4 vertices, there will be cycles, but half of them will be the reverse of the others; so, there will be possible distances.
英語のヒント
手順1:頂点が4個なので、閉路は個あるが、その半分は残りの逆である。だから、ありうる距離は個である。
Step 2: List all the Hamilton cycles in the subgraph of the graph in Figure 12.195.
英語のヒント
手順2:図12.195のグラフの部分グラフのハミルトン閉路をすべて挙げる。

Figure 12.195図12.195
Subgraph with Cities B, E, T, and V
英語のヒント
都市B、E、T、Vの部分グラフ
To find the 6 cycles, focus on the three vertices in the middle, B, E, and V. The arrangements of these vertices are BEV, BVE, EBV, EVB, VBE, and VEB. These would correspond to the 6 cycles:
英語のヒント
6つの閉路を見つけるには、途中の3つの頂点B、E、Vに注目する。これらの頂点の並びはBEV、BVE、EBV、EVB、VBE、VEBである。これらは次の6つの閉路に対応する:
Step 3: Find the weight of each path. You can reduce your work by observing the cycles that are reverses of each other.
英語のヒント
手順3:各パスの重みを求める。互いに逆である閉路に気づけば、作業を減らせる。
4: Reverse of cycle 2, 1071
英語のヒント
4:閉路2の逆、1071
5: Reverse of cycle 3, 1572
英語のヒント
5:閉路3の逆、1572
6: Reverse of cycle 1, 1097
英語のヒント
6:閉路1の逆、1097
Step 4: Identify a Hamilton cycle of least weight.
英語のヒント
手順4:重みがいちばん小さいハミルトン閉路を見きわめる。
The second path, T → B → V → E → T, and its reverse, T → E → V → B → T, have the least weight. The solution is that the officer should travel from Travis Air Force base to Beal Air Force Base, to Vandenberg Air Force base, to Edwards Air Force base, and return to Travis Air Force base, or the same route in reverse.
英語のヒント
2番目のパスT → B → V → E → Tとその逆T → E → V → B → Tの重みがいちばん小さい。解は、将校がトラヴィス空軍基地からビール空軍基地、ヴァンデンバーグ空軍基地、エドワーズ空軍基地へ行ってトラヴィス空軍基地に戻るか、同じ経路を逆向きに進むことである。
Now suppose that the officer needed a cycle that visited all 5 of the Air Force bases in Figure 12.194. There would be different arrangements of vertices and distances to compare using the brute force method. If you consider 10 Air Force bases, there would be different arrangements and distances to consider. There must be another way!
英語のヒント
今度は、将校が図12.194の5つの空軍基地すべてを訪れる閉路を必要としているとする。頂点の異なる並びは個あり、総当たり法で比べる距離は個ある。10の空軍基地を考えると、異なる並びは個、考える距離は個になる。別の方法があるはずである!