プリンキピア

第12章グラフ理論

Check Your Understanding理解を確かめよう

1.
The advantage of a greedy algorithm is that it is more efficient.
英語のヒント
貪欲アルゴリズムの利点は、より効率がよいことである。
Solution解答
A brute force algorithm lists every possible solution and then compares them to find the best possible solution. This can take a lot of time when in the real world there can be many choices.
英語のヒント
総当たりアルゴリズムは、ありうるすべての解を挙げ、それらを比べて可能な最良の解を見つける。現実の世界では選択肢が多いことがあるので、これには長い時間がかかることがある。
The greedy algorithm chooses the best choice at every branch of the path, continuing to make the best choice at each stage and finally linking those choices together into an overall solution. This might miss the best possible solution overall but is much faster than the brute force algorithm.
英語のヒント
貪欲アルゴリズムは、パスの各枝で最良の選択を選び、各段階で最良の選択をし続け、最後にそれらの選択をつないで全体の解にする。これは全体で可能な最良の解を逃すことがあるが、総当たりアルゴリズムよりずっと速い。
True
英語のヒント
正しい
2.
The disadvantage of a brute force algorithm is that it does not always give the ideal solution.
英語のヒント
総当たりアルゴリズムの欠点は、いつも理想の解を与えるとはかぎらないことである。
Solution解答
A brute force algorithm lists every possible solution and then compares them to find the best possible solution. This can take a lot of time but will always find the ideal solution.
英語のヒント
総当たりアルゴリズムは、ありうるすべての解を挙げ、それらを比べて可能な最良の解を見つける。これには長い時間がかかることがあるが、つねに理想の解を見つける。
False
英語のヒント
誤り
3.
The nearest neighbor method is an example of a brute force algorithm.
英語のヒント
最近傍法は総当たりアルゴリズムの例である。
Solution解答
A brute force algorithm lists every possible solution and then compares them to find the best possible solution. This can take a lot of time when in the real world there can be many choices.
英語のヒント
総当たりアルゴリズムは、ありうるすべての解を挙げ、それらを比べて可能な最良の解を見つける。現実の世界では選択肢が多いことがあるので、これには長い時間がかかることがある。
The nearest neighbor algorithm chooses the best choice at every branch of the path, continuing to make the best choice at each stage and finally linking those choices together into an overall solution. This might miss the best possible solution overall but is much faster than the brute force algorithm.
英語のヒント
最近傍アルゴリズムは、パスの各枝で最良の選択を選び、各段階で最良の選択をし続け、最後にそれらの選択をつないで全体の解にする。これは全体で可能な最良の解を逃すことがあるが、総当たりアルゴリズムよりずっと速い。
False
英語のヒント
誤り
4.
The brute force method is an example of a greedy algorithm.
英語のヒント
総当たり法は貪欲アルゴリズムの例である。
Solution解答
A brute force algorithm lists every possible solution and then compares them to find the best possible solution. This can take a lot of time when in the real world there can be many choices.
英語のヒント
総当たりアルゴリズムは、ありうるすべての解を挙げ、それらを比べて可能な最良の解を見つける。現実の世界では選択肢が多いことがあるので、これには長い時間がかかることがある。
The greedy algorithm chooses the best choice at every branch of the path, continuing to make the best choice at each stage and finally linking those choices together into an overall solution. This might miss the best possible solution overall but is much faster than the brute force algorithm.
英語のヒント
貪欲アルゴリズムは、パスの各枝で最良の選択を選び、各段階で最良の選択をし続け、最後にそれらの選択をつないで全体の解にする。これは全体で可能な最良の解を逃すことがあるが、総当たりアルゴリズムよりずっと速い。
False
英語のヒント
誤り
5.
The brute force method is used to find a Hamilton cycle of least weight in a complete graph.
英語のヒント
総当たり法は、完全グラフの重みがいちばん小さいハミルトン閉路を見つけるのに使う。
Solution解答
A brute force algorithm lists every possible weighted Hamilton cycle and then compares them to find the cycle with the least weight.
英語のヒント
総当たりアルゴリズムは、ありうるすべての重みつきハミルトン閉路を挙げ、それらを比べて重みがいちばん小さい閉路を見つける。
True
英語のヒント
正しい
6.
The nearest neighbor method is used to find the ideal solution to the traveling salesperson problem.
英語のヒント
最近傍法は、巡回セールスパーソン問題の理想の解を見つけるのに使う。
Solution解答
The nearest neighbor algorithm chooses the best choice at every branch of the path, continuing to make the best choice at each stage and finally linking those choices together into an overall solution. This might miss the best possible solution overall but is much faster than the brute force algorithm.
英語のヒント
最近傍アルゴリズムは、パスの各枝で最良の選択を選び、各段階で最良の選択をし続け、最後にそれらの選択をつないで全体の解にする。これは全体で可能な最良の解を逃すことがあるが、総当たりアルゴリズムよりずっと速い。
False
英語のヒント
誤り
7.
The traveling salesman problem involves finding the shortest route to travel between two points.
英語のヒント
巡回セールスマン問題は、2点のあいだを移動する最短の経路を見つけることにかかわる。
Solution解答
The traveling salesman problem is the shortest route to travel to multiple points and return to the original location.
英語のヒント
巡回セールスマン問題は、複数の点へ移動してもとの場所に戻る最短の経路である。
False
英語のヒント
誤り
8.
The traveling salesman problem can be represented as finding a Hamilton cycle of least weight on a weighted graph.
英語のヒント
巡回セールスマン問題は、重みつきグラフの重みがいちばん小さいハミルトン閉路を見つけることとして表せる。
Solution解答
True
英語のヒント
正しい
9.
There is always more than one Hamilton cycle of least weight, a given Hamilton cycle and the reverse of that Hamilton cycle.
英語のヒント
重みがいちばん小さいハミルトン閉路はつねに2つ以上ある。与えられたハミルトン閉路と、そのハミルトン閉路の逆である。
Solution解答
True
英語のヒント
正しい
10.
The greatest possible number of distinct weights for the Hamilton cycles of a complete graph with n vertices is (n-1)!
英語のヒント
頂点がn個の完全グラフのハミルトン閉路の異なる重みの最大の数は(n-1)!である。
Solution解答
The number of distinct Hamilton cycles of a complete graph with n vertices is (n−1)!.
英語のヒント
頂点がn個の完全グラフの異なるハミルトン閉路の数は(n−1)!である。
Since half of those cycles are the reverse of the others, there are only (n−1)!2 distinct weighted cycles.
英語のヒント
閉路の半分は残りの逆なので、重みが異なる閉路は(n−1)!2個だけである。
False
英語のヒント
誤り
For the following exercises, determine whether the algorithm described is a greedy algorithm or a brute force algorithm.
英語のヒント
次の問題では、説明されたアルゴリズムが貪欲アルゴリズムか総当たりアルゴリズムかを判断せよ。
1.
The algorithm for creating graph colorings in the section Navigating Graphs involved coloring the vertex of highest degree first, coloring as many other vertices as possible each color from highest to lowest degree, then repeating this process for the remaining vertices.
英語のヒント
節「グラフをたどる」のグラフの彩色を作るアルゴリズムでは、まず次数がいちばん大きい頂点を塗り、次数の大きいものから小さいものへ、各色でできるだけ多くのほかの頂点を塗り、それから残りの頂点についてこの手順を繰り返した。
2.
Pallets of goods are to be transported on 10 flatbed trucks which have weight limits. To determine which goods will be shipped together, all the possible ways to divide the goods into 10 groups is listed and the total weight of each group is calculated.
英語のヒント
品物のパレットを、重量制限のある10台の平台トラックで運ぶ。どの品物を一緒に運ぶかを決めるために、品物を10の集団に分けるありうる方法をすべて挙げ、各集団の重さの合計を計算する。
3.
A wedding planner is creating a seating arrangement for the reception dinner. The couple has provided a list of which guests must be seated together. The wedding planner prefers to use the fewest tables possible so that there is more space to mingle at the reception. The planner creates a list of all possible seating arrangements and selects one that meets these criteria.
英語のヒント
ウェディングプランナーが披露宴の夕食の席順を作っている。夫婦は、どの客を一緒に座らせなければならないかのリストを渡した。ウェディングプランナーは、披露宴で交流する空間が増えるように、できるだけ少ないテーブルを使いたい。プランナーはありうる席順のリストをすべて作り、これらの基準に合うものを1つ選ぶ。
4.
Packages must be loaded into freight cars to be transported by train. It is preferred to use the fewest freight cars possible to keep the costs down. As each freight car is packed, the package with the largest girth that will fit in the freight car is loaded and this is repeated until the freight car can hold no more packages. When a freight car can hold no more packages, the next freight car is loaded.
英語のヒント
荷物を貨車に積んで列車で運ばなければならない。費用を抑えるために、できるだけ少ない貨車を使うことが望ましい。各貨車に積むとき、その貨車に入る荷物のうち胴回りがいちばん大きいものを積み、貨車にそれ以上荷物が入らなくなるまでこれを繰り返す。貨車にそれ以上荷物が入らなくなると、次の貨車に積む。
For the following exercises, use the figure to calculate the number of distinct Hamilton cycles beginning at the given vertex in the given graph. How many of those could possibly result in a different weight?
英語のヒント
次の問題では、図を使って、与えられたグラフの与えられた頂点で始まる異なるハミルトン閉路の数を計算せよ。そのうちいくつが異なる重みになりうるか。
Four graphs. Graph A has four vertices: a, b, c, and d. The edges are labeled as follows: a b, 3; b d, 3; d c, 1; c a, 2; a d, 1; b c, 2. Graph B has five vertices: e, f, g, h, and I. The edges are labeled as follows: e f, 2-thirds; f g, 5-twelfths; g h, 1-twelfth; h i, 3-fourths; i e, 1-fourth; e h, 1-half; e g, 1-sixth; f i, -third; f h, 5-sixths; g i, 1. Graph C has five vertices: i, j, k, m, and n. The curved edges are labeled as follows: k m, 20; m n, 30; n j, 40; j i, 50; i k, 10. The straight edges are labeled as follows: k j, 90; k n, 60; m i, 100; m j, 70; n i, 80. Graph d has four vertices; o, p, q, and r. The edges are labeled as follows: o p, 1.7; p q, 4.3; q r, 3.5; r o, 2.9 p r, 3.; o p, 1.2.
5.
Graph A, vertex a
英語のヒント
グラフA、頂点a
6.
Graph B, vertex e
英語のヒント
グラフB、頂点e
7.
Graph C, vertex k
英語のヒント
グラフC、頂点k
8.
Graph D, vertex o
英語のヒント
グラフD、頂点o
For the following exercises, use the figure to list all the distinct Hamilton cycles beginning at the given vertex in the given graph. Indicate which pairs of Hamilton cycles are reverses of each other.
英語のヒント
次の問題では、図を使って、与えられたグラフの与えられた頂点で始まる異なるハミルトン閉路をすべて挙げよ。ハミルトン閉路のどの組が互いに逆であるかを示せ。
Four graphs. Graph A has four vertices: a, b, c, and d. The edges are labeled as follows: a b, 3; b d, 3; d c, 1; c a, 2; a d, 1; b c, 2. Graph B has five vertices: e, f, g, h, and I. The edges are labeled as follows: e f, 2-thirds; f g, 5-twelfths; g h, 1-twelfth; h i, 3-fourths; i e, 1-fourth; e h, 1-half; e g, 1-sixth; f i, -third; f h, 5-sixths; g i, 1. Graph C has five vertices: i, j, k, m, and n. The curved edges are labeled as follows: k m, 20; m n, 30; n j, 40; j i, 50; i k, 10. The straight edges are labeled as follows: k j, 90; k n, 60; m i, 100; m j, 70; n i, 80. Graph d has four vertices; o, p, q, and r. The edges are labeled as follows: o p, 1.7; p q, 4.3; q r, 3.5; r o, 2.9 p r, 3.; o p, 1.2.
9.
Graph A, vertex a
英語のヒント
グラフA、頂点a
10.
Graph B, vertex e
英語のヒント
グラフB、頂点e
11.
Graph C, vertex k
英語のヒント
グラフC、頂点k
12.
Graph D, vertex o
英語のヒント
グラフD、頂点o
For the following exercises, use the figure to find a Hamilton cycle of least weight for the given graph, beginning at the given vertex, and using the brute force method. What is the weight of the cycle?
英語のヒント
次の問題では、図を使って、与えられた頂点で始めて総当たり法を使い、与えられたグラフの重みがいちばん小さいハミルトン閉路を見つけよ。その閉路の重みはいくらか。
Four graphs. Graph A has four vertices: a, b, c, and d. The edges are labeled as follows: a b, 3; b d, 3; d c, 1; c a, 2; a d, 1; b c, 2. Graph B has five vertices: e, f, g, h, and I. The edges are labeled as follows: e f, 2-thirds; f g, 5-twelfths; g h, 1-twelfth; h i, 3-fourths; i e, 1-fourth; e h, 1-half; e g, 1-sixth; f i, -third; f h, 5-sixths; g i, 1. Graph C has five vertices: i, j, k, m, and n. The curved edges are labeled as follows: k m, 20; m n, 30; n j, 40; j i, 50; i k, 10. The straight edges are labeled as follows: k j, 90; k n, 60; m i, 100; m j, 70; n i, 80. Graph d has four vertices; o, p, q, and r. The edges are labeled as follows: o p, 1.7; p q, 4.3; q r, 3.5; r o, 2.9 p r, 3.; o p, 1.2.
13.
Graph A, vertex a
英語のヒント
グラフA、頂点a
14.
Graph B, vertex e
英語のヒント
グラフB、頂点e
15.
Graph C, vertex k
英語のヒント
グラフC、頂点k
16.
Graph D, vertex o
英語のヒント
グラフD、頂点o
For the following exercises, use the figure to find a Hamilton cycle of low weight for the given graph, beginning at the given vertex, and using the nearest neighbor method. What is the weight of the cycle?
英語のヒント
次の問題では、図を使って、与えられた頂点で始めて最近傍法を使い、与えられたグラフの重みの小さいハミルトン閉路を見つけよ。その閉路の重みはいくらか。
Four graphs. Graph A has four vertices: a, b, c, and d. The edges are labeled as follows: a b, 3; b d, 3; d c, 1; c a, 2; a d, 1; b c, 2. Graph B has five vertices: e, f, g, h, and I. The edges are labeled as follows: e f, 2-thirds; f g, 5-twelfths; g h, 1-twelfth; h i, 3-fourths; i e, 1-fourth; e h, 1-half; e g, 1-sixth; f i, -third; f h, 5-sixths; g i, 1. Graph C has five vertices: i, j, k, m, and n. The curved edges are labeled as follows: k m, 20; m n, 30; n j, 40; j i, 50; i k, 10. The straight edges are labeled as follows: k j, 90; k n, 60; m i, 100; m j, 70; n i, 80. Graph d has four vertices; o, p, q, and r. The edges are labeled as follows: o p, 1.7; p q, 4.3; q r, 3.5; r o, 2.9 p r, 3.; o p, 1.2.
17.
Graph A, vertex a
英語のヒント
グラフA、頂点a
18.
Graph B, vertex e
英語のヒント
グラフB、頂点e
19.
Graph C, vertex k
英語のヒント
グラフC、頂点k
20.
Graph D, vertex o
英語のヒント
グラフD、頂点o
For the following exercises, use your solutions to Exercises 13–20 to compare the results of the brute force method to the results of the nearest neighbor method for each graph. Indicate whether the Hamilton cycle was the same or different and whether the weights were the same or different. If the weights are different, indicate which method gave the lower weight. Are your observations consistent with the characteristics of brute force algorithms and greedy algorithms? Explain your reasoning.
英語のヒント
次の問題では、問題13〜20の解を使って、各グラフについて総当たり法の結果と最近傍法の結果を比べよ。ハミルトン閉路が同じか異なるか、重みが同じか異なるかを示せ。重みが異なるなら、どちらの方法が小さい重みを与えたかを示せ。あなたの観察は総当たりアルゴリズムと貪欲アルゴリズムの特徴と一致するか。理由を説明せよ。
21.
Graph A, vertex a
英語のヒント
グラフA、頂点a
22.
Graph B, vertex e
英語のヒント
グラフB、頂点e
23.
Graph C, vertex k
英語のヒント
グラフC、頂点k
24.
Graph D, vertex o
英語のヒント
グラフD、頂点o
For the following exercises, use the table to create a complete weighted graph in which the vertices are the given cities, and the weights are the distances between them.
英語のヒント
次の問題では、表を使って、頂点が与えられた都市で重みがそのあいだの距離である重みつき完全グラフを作れ。
Cities都市UVWXYZ
U08937495428
V890766892112
W37760455249
X49684506647
Y54925266029
Z281124947290
Distances between Cities U, V, W, X, Y, and Z in kilometers
英語のヒント
都市U、V、W、X、Y、Zのあいだの距離(キロメートル)
25.
U, V, W, X
26.
U, W, Y, Z
27.
U, X, Y, Z
28.
U, V, W, X, Y
29.
U, W, X, Y, Z
30.
U, V, W, X, Y, Z
For the following exercises, use your solutions to Exercises 25–30 and the nearest neighbor method to find a Hamilton cycle to solve the traveling salesperson problem of finding a reasonably short route to leave from city U, visit each of the other cities listed and return to city U. Indicate the distance required to travel the route you found.
英語のヒント
次の問題では、問題25〜30の解と最近傍法を使って、都市Uを出発し、挙げられたほかの各都市を訪れ、都市Uに戻るそれなりに短い経路を見つける巡回セールスパーソン問題を解くハミルトン閉路を見つけよ。見つけた経路を移動するのに必要な距離を示せ。
31.
U, V, W, X
32.
U, W, Y, Z
33.
U, X, Y, Z
34.
U, V, W, X, Y
35.
U, W, X, Y, Z
36.
U, V, W, X, Y, Z
For the following exercises, use your solutions to Exercises 25–30 and the brute force method to find a Hamilton cycle of lowest weight to solve the traveling salesperson problem of finding a shortest route to leave from city U, visit each of the other cities listed and return to city U. Indicate the distance required to travel the route you found.
英語のヒント
次の問題では、問題25〜30の解と総当たり法を使って、都市Uを出発し、挙げられたほかの各都市を訪れ、都市Uに戻る最短の経路を見つける巡回セールスパーソン問題を解く、重みがいちばん小さいハミルトン閉路を見つけよ。見つけた経路を移動するのに必要な距離を示せ。
37.
U, V, W, X
38.
U, W, Y, Z
39.
U, X, Y, Z
40.
U, V, W, X, Y
41.
U, W, X, Y, Z
For the following exercises, use your solutions to the indicated exercises to compare the results of the brute force method to the results of the nearest neighbor method for each traveling salesman problem of finding a reasonably short route to leave from city U, visit each of the other cities listed and return to city U. Indicate whether the greedy algorithm resulted in a Hamilton cycle of the same weight, lower weight, or higher weight. Is this consistent with the characteristics of brute force algorithms and greedy algorithms? Explain your reasoning
英語のヒント
次の問題では、指定された問題の解を使って、都市Uを出発し、挙げられたほかの各都市を訪れ、都市Uに戻るそれなりに短い経路を見つける各巡回セールスマン問題について、総当たり法の結果と最近傍法の結果を比べよ。貪欲アルゴリズムの結果が、重みが同じ、小さい、大きいハミルトン閉路のどれだったかを示せ。これは総当たりアルゴリズムと貪欲アルゴリズムの特徴と一致するか。理由を説明せよ
42.
Exercises 32 and 38: U, W, Y, Z
英語のヒント
問題32と38:U、W、Y、Z
43.
Exercises 31 and 37: U, V, W, X
英語のヒント
問題31と37:U、V、W、X
44.
Exercises 34 and 40: U, V, W, X, Y
英語のヒント
問題34と40:U、V、W、X、Y
45.
Exercises 35 and 41: U, W, X, Y, Z
英語のヒント
問題35と41:U、W、X、Y、Z
46.
Exercises 33 and 39: U, X, Y, Z
英語のヒント
問題33と39:U、X、Y、Z
The products at a particular factory are manufactured in phases. The same equipment is utilized for each phase, but it must be formatted differently to accomplish different tasks. The transition time to convert between a format for one task and another task varies. The times are given in Table 12.13. In the following exercises, use the table and the nearest neighbor method to find an order in which to complete the tasks, which keeps the transition times down and ends with the same set up as it began so that the factory is ready to start the next batch. Assume that there are no restrictions on which tasks can be completed in which order. Hint: The nearest neighbor algorithm may give a different result depending on which vertex is the starting vertex, so, you must check all possibilities.
英語のヒント
ある工場の製品は段階を追って製造される。各段階で同じ設備を使うが、異なる作業を行うために設定を変えなければならない。ある作業の設定から別の作業の設定へ切り替える時間はさまざまである。その時間を表12.13に示す。次の問題では、表と最近傍法を使って、切り替え時間を抑え、始めと同じ設定で終わって工場が次の一回分を始められる作業の順を見つけよ。どの作業をどの順で完了できるかに制約はないとする。ヒント:最近傍アルゴリズムはどの頂点を出発の頂点にするかによって異なる結果を与えることがあるので、すべての可能性を確かめなければならない。
Task作業ABCDEFG
A0751304512070100
B750140651152560
C1301400355520125
D4565350503040
E1201155550095145
F7025203095015
G1006012540145150
Manufacturing Equipment Transition Times in Minutes
英語のヒント
製造設備の切り替え時間(分)
47.
A, C, D, F, G
48.
B, D, E, F, G
49.
A, B, C, D, E, F
50.
B, C, D, E, F, G
51.
A, B, C, D, E, F, G