プリンキピア

第12章グラフ理論

Constructing a Spanning Tree Using Pathsパスを使って全域木を作る

Suppose that you wanted to find a spanning tree within a graph. One approach is to find paths within the graph. You can start at any vertex, go any direction, and create a path through the graph stopping only when you can’t continue without backtracking as shown in Figure 12.216.
英語のヒント
グラフのなかに全域木を見つけたいとする。1つのやり方は、グラフのなかのパスを見つけることである。図12.216に示すように、どの頂点から始めてもよく、どの方向へ進んでもよく、引き返さずに進めなくなったときだけ止まって、グラフを通るパスを作る。
A graph with 23 vertices and 35 edges. Ten edges are highlighted in green. Two vertices are labeled started here and stopped here.
Figure 12.216図12.216
First Phase to Construct a Spanning Tree
英語のヒント
全域木を作る最初の段階
Once you have stopped, pick a vertex along the path you drew as a starting point for another path. Make sure to visit only vertices you have not visited before as shown in Figure 12.217.
英語のヒント
止まったら、描いたパスの上の頂点を別のパスの出発点に選ぶ。図12.217に示すように、まだ訪れていない頂点だけを訪れるようにする。
A graph with 23 vertices and 35 edges. Ten edges are highlighted in blue. Ten edges are highlighted in green. Two vertices are labeled started here and stopped here.
Figure 12.217図12.217
Intermediate Phase to Construct a Spanning Tree
英語のヒント
全域木を作る途中の段階
Repeat this process until all vertices have been visited as shown in Figure 12.218.
英語のヒント
図12.218に示すように、すべての頂点を訪れるまでこの手順を繰り返す。
A graph with 23 vertices and 35 edges. Ten edges are highlighted in blue. Ten edges are highlighted in green. Two vertices are labeled started here and stopped here. Two edges are highlighted in purple.
Figure 12.218図12.218
Final Phase to Construct a Spanning Tree
英語のヒント
全域木を作る最後の段階
The end result is a tree that spans the entire graph as shown in Figure 12.219.
英語のヒント
最終結果は、図12.219に示すように、グラフ全体に広がる木である。
A graph with 23 vertices and 22 edges.
Figure 12.219図12.219
The Resulting Spanning Tree
英語のヒント
できあがった全域木
Notice that this subgraph is a tree because it is connected and acyclic. It also visits every vertex of the original graph, so it is a spanning tree. However, it is not the only spanning tree for this graph. By making different turns, we could create any number of distinct spanning trees.
英語のヒント
この部分グラフは連結で非巡回なので木であることに注意しよう。もとのグラフのすべての頂点も訪れるので、全域木である。しかし、これはこのグラフの唯一の全域木ではない。異なる曲がり方をすれば、異なる全域木をいくつでも作れる。
Example 12.50例題 12.50

Constructing Spanning Trees全域木を作る

Construct two distinct spanning trees for the graph in Figure 12.220.
英語のヒント
図12.220のグラフの異なる全域木を2つ作れ。
Graph L has 11 vertices and 19 edges. The graph resembles a square resting below a triangle on either side. The triangles are connected via a trapezoid. The squares have diagonal lines.
Figure 12.220図12.220
Graph L
英語のヒント
グラフL
Solution解答
Two possible solutions are given in Figure 12.221 and Figure 12.222.
英語のヒント
ありうる解を2つ、図12.221と図12.222に示す。
Two graphs depict removing edges from graph L. The first graph has 11 vertices and 19 edges. It resembles a square resting below a triangle on either side. The triangles are connected via a trapezoid. The squares have diagonal lines. 6 edges are in green, 2 edges are in purple, and 2 edges are in blue. Green represents phase 1, blue represents phase 2, and purple represents phase 3. The second graph is the final tree. The black edges from the first graph are removed.
Figure 12.221図12.221
First Spanning Tree for Graph L
英語のヒント
グラフLの1つ目の全域木
Two graphs depict removing edges from graph L. The first graph has 11 vertices and 19 edges. It resembles a square resting below a triangle on either side. The triangles are connected via a trapezoid. The squares have diagonal lines. 6 edges are in green, 2 edges are in purple, and 2 edges are in blue. Green represents phase 1, blue represents phase 2, and purple represents phase 3. The second graph is the final tree. The black edges from the first graph are removed.
Figure 12.222図12.222
Second Spanning Tree for Graph L
英語のヒント
グラフLの2つ目の全域木

Revealing Spanning Trees全域木を浮かび上がらせる

Another approach to finding a spanning tree in a connected graph involves removing unwanted edges to reveal a spanning tree. Consider Graph D in Figure 12.223.
英語のヒント
連結グラフの全域木を見つける別のやり方は、いらない辺を除いて全域木を浮かび上がらせることである。図12.223のグラフDを考えよう。
Graph D has 10 vertices. The vertices are labeled from a to j. The edges are c d, c a, d a, a g, a h, g h, a b, b e, b f, e f, b i, b j, and I j.
Figure 12.223図12.223
Graph D
英語のヒント
グラフD
Graph D has 10 vertices. A spanning tree of Graph D must have 9 edges, because the number of edges is one less than the number of vertices in any tree. Graph D has 13 edges so 4 need to be removed. To determine which 4 edges to remove, remember that trees do not have cycles. There are four triangles in Graph D that we need to break up. We can accomplish this by removing 1 edge from each of the triangles. There are many ways this can be done. Two of these ways are shown in Figure 12.224.
英語のヒント
グラフDには頂点が10個ある。どの木でも辺の数は頂点の数より1少ないので、グラフDの全域木の辺は9本でなければならない。グラフDの辺は13本なので、4本を除く必要がある。どの4本を除くかを決めるには、木に閉路がないことを思い出そう。グラフDには壊す必要のある三角形が4つある。各三角形から辺を1本除けばこれができる。その方法は多くある。そのうち2つを図12.224に示す。
Four graphs depict removing edges from graph D. In the first graph, the vertices are labeled from a to j. The edges are c d, c a, d a, a g, a h, g h, a b, b e, b f, e f, b i, b j, and i j. The edges, a c, e f, g h, and b j are shown in dashed lines. The second graph is the same as that of the first with edges, a c, e f, g h, and b j removed. In the third graph, the vertices are labeled from a to j. The edges are c d, c a, d a, a g, a h, g h, a b, b e, b f, e f, b i, b j, and i j. The edges, a c, a g, b f, and b i are shown in dashed lines. The fourth graph is the same as that of the first with edges, a c, a g, b f, and b i removed.
Four graphs depict removing edges from graph D. In the first graph, the vertices are labeled from a to j. The edges are c d, c a, d a, a g, a h, g h, a b, b e, b f, e f, b i, b j, and i j. The edges, a c, e f, g h, and b j are shown in dashed lines. The second graph is the same as that of the first with edges, a c, e f, g h, and b j removed. In the third graph, the vertices are labeled from a to j. The edges are c d, c a, d a, a g, a h, g h, a b, b e, b f, e f, b i, b j, and i j. The edges, a c, a g, b f, and b i are shown in dashed lines. The fourth graph is the same as that of the first with edges, a c, a g, b f, and b i removed.
Figure 12.224図12.224
Removing Four Edges from Graph D
英語のヒント
グラフDから4本の辺を除く
Example 12.51例題 12.51

Removing Edges to Find Spanning Trees辺を除いて全域木を見つける

Use the graph in Figure 12.225 to answer each question.
英語のヒント
図12.225のグラフを使って各問いに答えよ。
Graph V has 9 vertices. The vertices are labeled from a to i. The edges are f c, f a, c a, c d, d a, a b, b e, e h, h i, I g, and g b.
Figure 12.225図12.225
Graph V
英語のヒント
グラフV
  1. Determine the number of edges that must be removed to reveal a spanning tree.
    英語のヒント
    全域木を浮かび上がらせるのに除かなければならない辺の数を求めよ。
  2. Name all the undirected cycles in Graph V.
    英語のヒント
    グラフVの無向閉路をすべて挙げよ。
  3. Find two distinct spanning trees of Graph V.
    英語のヒント
    グラフVの異なる全域木を2つ見つけよ。
Solution解答
  1. Graph V has nine vertices so a spanning tree for the graph must have 8 edges. Since Graph V has 11 edges, 3 edges must be removed to reveal a spanning tree.
    英語のヒント
    グラフVには頂点が9個あるので、このグラフの全域木の辺は8本でなければならない。グラフVの辺は11本なので、全域木を浮かび上がらせるのに3本の辺を除かなければならない。
  2. (a, c, d), (a, c, f), (a, d, c, f), and (b, e, h, i, g)
    英語のヒント
    (a, c, d)、(a, c, f)、(a, d, c, f)、(b, e, h, i, g)
  3. To find the first spanning tree, remove edge ac, which will break up both of the triangles, remove edge cf , which will break up the quadrilateral, and remove be, which will break up the pentagon, to give us the spanning tree shown in Figure 12.226.
    英語のヒント
    1つ目の全域木を見つけるには、両方の三角形を壊す辺acを除き、四角形を壊す辺cfを除き、五角形を壊すbeを除く。すると図12.226に示す全域木が得られる。
    A graph has 9 vertices. The vertices are labeled from a to i. The edges are f a, c d, d a, a b, b g, g i, I h, and h e.
    Figure 12.226図12.226
    Spanning Tree Formed Removing ac, cf, and be
    英語のヒント
    ac、cf、beを除いてできた全域木
    To find another spanning tree, remove ad, which will break up (a, c, d) and (a, d, c, f), remove af to break up (a, c, f), and remove hi to break up (b, e, h, i, g). This will give us the spanning tree in Figure 12.227.
    英語のヒント
    別の全域木を見つけるには、(a, c, d)と(a, d, c, f)を壊すadを除き、(a, c, f)を壊すafを除き、(b, e, h, i, g)を壊すhiを除く。すると図12.227の全域木が得られる。
    A graph has 9 vertices. The vertices are labeled from a to i. The edges are f c, c d, c a, a b, b e, e h, b g, and g i.
    Figure 12.227図12.227
    Spanning Tree Formed Removing ad, af, and hi
    英語のヒント
    ad、af、hiを除いてできた全域木