プリンキピア

第12章グラフ理論

Paths and Trailsパスと小道

A walk is the most basic way of navigating a graph because it has no restrictions except staying on the graph. When there are restrictions on which vertices or edges we can visit, we will call the walk by a different name. For example, if we want to find a walk that avoids travelling the same edge twice, we will say we want to find a trail (or directed trail). If we want to find a walk that avoids visiting the same vertex twice, we will say, we want to find a path (or directed path).
英語のヒント
歩道はグラフの上にとどまること以外に制限がないので、グラフをたどるもっとも基本的な方法である。訪れられる頂点や辺に制限があるときは、歩道を別の名前で呼ぶ。たとえば、同じ辺を2回通らない歩道を見つけたいなら、小道(または有向小道)を見つけたいという。同じ頂点を2回訪れない歩道を見つけたいなら、パス(または有向パス)を見つけたいという。
Walks, trails, and paths are all related.
英語のヒント
歩道、小道、パスはすべて関係している。
  1. All paths are trails, but trails that visit the same vertex twice are not paths.
    英語のヒント
    すべてのパスは小道だが、同じ頂点を2回訪れる小道はパスではない。
  2. All trails are walks, but walks in which an edge is visited twice would not be trails.
    英語のヒント
    すべての小道は歩道だが、辺を2回訪れる歩道は小道ではない。
We can visualize the relationship as in Figure 12.78.
英語のヒント
この関係は図12.78のように見られる。
Three concentric ovals represent paths, trails, and walks. The first (inner) oval labeled paths reads, no repeated edges or vertices. The second oval labeled trails reads, no repeated edges. The third oval is labeled walks.
Figure 12.78図12.78
Walks, Trails, and Paths
英語のヒント
歩道、小道、パス
Let’s practice identifying walks, trails, and paths using the graphs in Figure 12.79.
英語のヒント
図12.79のグラフを使って、歩道、小道、パスを見きわめる練習をしよう。
Two graphs are labeled graph A and graph K. Graph A has five vertices: b, c, d, e, and f. The edges connect b c, c f, b d, b e, d e, and e f. Graph K has five vertices: m, n, o, p, and q. The edges connect m n, n o, n q, q o, o p, n p, and m p.
Figure 12.79図12.79
Graphs A and K
英語のヒント
グラフAとK
Example 12.20例題 12.20

Identifying Walks, Paths, and Trails歩道、パス、小道を見きわめる

Consider each sequence of vertices from Graph A in Figure 12.79. Determine if it is only a walk, both a walk and a path, both a walk and a trail, all three, or none of these.
英語のヒント
図12.79のグラフAの頂点の各列を考えよ。それが歩道だけか、歩道かつパスか、歩道かつ小道か、3つすべてか、どれでもないかを判断せよ。
  1. b → c → d → e → f
  2. c → b → d → b → e
  3. c → f → e → d → b → c
  4. b → e → f → c → b → d
Solution解答
  1. First, check to see if the sequence of vertices is a walk by making sure that the vertices are consecutive. As you can see in Figure 12.80, there is no edge between vertex c and vertex d.
    英語のヒント
    まず、頂点が連続していることを確かめて、頂点の列が歩道かどうかを確認する。図12.80でわかるように、頂点cと頂点dのあいだに辺はない。
    Graph A has five vertices: b, c, d, e, and f. The edges connect b c, c f, b d, b e, d e, and e f. A sequence of arrows flows from b to c, c to d, d to e, and e to f.
    Figure 12.80図12.80
    This means that the sequence is not a walk. If it is not a walk, then it can’t be a path and it cannot be a trail, so, it is none of these.
    英語のヒント
    つまり、この列は歩道ではない。歩道でないなら、パスでも小道でもありえないので、どれでもない。
  2. First, check to see if the sequence is a walk. As you can see in Figure 12.81, the vertices are consecutive.
    英語のヒント
    まず、列が歩道かどうかを確認する。図12.81でわかるように、頂点は連続している。
    Graph A has five vertices: b, c, d, e, and f. The edges connect b c, c f, b d, b e, d e, and e f. An arrow labeled 1 flows from c to b. An arrow labeled 2 flows from b to d. An arrow labeled 3 flows from d to e. An arrow labeled 4 flows from b to e.
    Figure 12.81図12.81
    This means that the sequence is a walk. Since the vertex b is visited twice, this walk is not a path. Since edge 𝑏𝑑 is traveled twice, this walk is not a trail. So, the sequence is only a walk.
    英語のヒント
    つまり、この列は歩道である。頂点bを2回訪れるので、この歩道はパスではない。辺𝑏𝑑を2回通るので、この歩道は小道ではない。だから、この列は歩道だけである。
  3. First, check to see if the sequence is a walk. We can see in Figure 12.82 that the vertices are consecutive, which means it is a walk.
    英語のヒント
    まず、列が歩道かどうかを確認する。図12.82で頂点が連続していることがわかるので、歩道である。
    Graph A has five vertices: b, c, d, e, and f. The edges connect b c, c f, b d, b e, d e, and e f. An arrow labeled 1 flows from c to f. An arrow labeled 2 flows from f to e. An arrow labeled 3 flows from e to d. An arrow labeled 4 flows from d to b. An arrow labeled 5 flows from b to c.
    Figure 12.82図12.82
    Next, check to see if any vertex is visited twice. Remember, we do not consider beginning and ending at the same vertex to be visiting a vertex twice. So, no vertex was visited twice. This means we have a walk that is also a path. Next check to see if any edge was visited twice; none were. So, the sequence is a walk, a path, and a trail.
    英語のヒント
    次に、2回訪れる頂点があるかどうかを確認する。同じ頂点で始まり終わることは頂点を2回訪れるとはみなさないことを思い出そう。だから、2回訪れた頂点はない。つまり、パスでもある歩道である。次に、2回訪れた辺があるかどうかを確認する。ない。だから、この列は歩道、パス、小道である。
  4. First, check to see if the sequence is a walk. We can see in Figure 12.83 that the vertices are consecutive, which means it is a walk.
    英語のヒント
    まず、列が歩道かどうかを確認する。図12.83で頂点が連続していることがわかるので、歩道である。
    Graph A has five vertices: b, c, d, e, and f. The edges connect b c, c f, b d, b e, d e, and e f. An arrow labeled 1 flows from b to e. An arrow labeled 2 flows from e to f. An arrow labeled 3 flows from f to c. An arrow labeled 4 flows from c to b. An arrow labeled 5 flows from b to d.
    Figure 12.83図12.83
    Next check to see if any vertex is visited twice. Since vertex b is visited twice, this is not a path. Finally, check to see if any edges are traveled twice. Since no edges are traveled twice, this is a trail. So, the sequence of vertices is a walk and a trail.
    英語のヒント
    次に、2回訪れる頂点があるかどうかを確認する。頂点bを2回訪れるので、これはパスではない。最後に、2回通る辺があるかどうかを確認する。2回通る辺はないので、これは小道である。だから、頂点の列は歩道かつ小道である。