プリンキピア

第12章グラフ理論

12.1 Graph Basics12.1 グラフの基本

A close-up view of three people holding cell phones.
Figure 12.2図12.2
Cell phone networks connect individuals. (credit: "Business people using their phones" by Rawpixel Ltd./Flickr, CC BY 2.0)
英語のヒント
携帯電話のネットワークは個人をつなぐ。(出典:Rawpixel Ltd. の "Business people using their phones"/Flickr、CC BY 2.0)

Learning Objectives学習目標

After completing this section, you should be able to:
英語のヒント
この節を終えると、次のことができるようになる。
  1. Identify parts of a graph.
    英語のヒント
    グラフの部分を見きわめる。
  2. Model applications of graph basics.
    英語のヒント
    グラフの基本の応用をモデル化する。
When you hear the word, graph, what comes to mind? You might think of the 𝑥𝑦-coordinate system you learned about earlier in this course, or you might think of the line graphs and bar charts that are used to display data in news reports. The graphs we discuss in this chapter are probably very different from what you think of as a graph. They look like a bunch of dots connected by short line segments. The dots represent a group of objects and the line segments represent the connections, or relationships, between them. The objects might be bus stops, computers, Snapchat accounts, family members, or any other objects that have direct connections to each other. The connections can be physical or virtual, formal or casual, scientific or social. Regardless of the kind of connections, the purpose of the graph is to help us visualize the structure of the entire network to better understand the interactions of the objects within it.
英語のヒント
グラフという語を聞くと、何が思い浮かぶだろうか。この授業で前に学んだ𝑥𝑦座標系を思うかもしれないし、ニュースでデータを示すのに使う折れ線グラフや棒グラフを思うかもしれない。この章で論じるグラフは、おそらくあなたがグラフと考えるものとはかなり違う。短い線分でつないだ点の集まりのように見える。点は物の集まりを表し、線分はそれらのあいだのつながり、つまり関係を表す。物はバス停、コンピュータ、Snapchatのアカウント、家族、あるいは互いに直接つながりをもつほかのどんな物でもよい。つながりは物理的でも仮想的でも、正式でも気軽でも、科学的でも社会的でもよい。つながりの種類にかかわらず、グラフの目的は、ネットワーク全体の構造を目に見えるようにして、そのなかの物のやりとりをよりよく理解する助けになることである。

Parts of a Graphグラフの部分

In a graph, the objects are represented with dots and their connections are represented with lines like those in Figure 12.3. Figure 12.3 displays a simple graph labeled G and a multigraph labeled H. The dots are called vertices; an individual dot is a vertex, which is one object of a set of objects, some of which may be connected. We often label vertices with letters. For example, Graph G has vertices a, b, c, and d, and Multigraph H has vertices, e, f, g, and h. Each line segment or connection joining two vertices is referred to as an edge. H is considered a multigraph because it has a double edge between f and h, and a double edge between h and g. Another reason H is called a multigraph is that it has a loop connecting vertex e to itself; a loop is an edge that joins a vertex to itself. Loops and double edges are not allowed in a simple graph.
英語のヒント
グラフでは、図12.3のように、物を点で、そのつながりを線で表す。図12.3は、Gとラベルのついた単純グラフとHとラベルのついた多重グラフを示している。点を頂点といい、1つの点は頂点である。頂点は物の集まりの1つの物で、そのいくつかはつながっていることがある。頂点には文字でラベルをつけることが多い。たとえば、グラフGの頂点はa、b、c、dで、多重グラフHの頂点はe、f、g、hである。2つの頂点を結ぶ各線分、つまりつながりを辺という。Hはfとhのあいだに二重辺があり、hとgのあいだにも二重辺があるので多重グラフとみなされる。Hが多重グラフと呼ばれるもう1つの理由は、頂点eをそれ自身につなぐループがあることである。ループとは、頂点をそれ自身に結ぶ辺である。単純グラフではループも二重辺も認められない。
To sum up, a simple graph is a collection of vertices and any edges that may connect them, such that every edge connects two vertices with no loops and no two vertices are joined by more than one edge. A multigraph is a graph in which there may be loops or pairs of vertices that are joined by more than one edge. In this chapter, most of our work will be with simple graphs, which we will call graphs for convenience.
英語のヒント
まとめると、単純グラフとは、頂点とそれらをつなぐ辺の集まりで、どの辺も2つの頂点をつなぎ、ループがなく、2つの頂点が複数の辺で結ばれることがないものである。多重グラフとは、ループや、複数の辺で結ばれた頂点の組があってもよいグラフである。この章では、ほとんどの場合単純グラフを扱い、便宜上それをグラフと呼ぶ。
Two graphs are labeled graph G and multigraph H. Graph G has four vertices, a, b, c, and d. Two edges connect a with b and c. Two edges connect c with b and d. Multigraph H has four vertices, e, f, g, and h. A double edge connects f and h. A double edge connects h and g. Two edges connect e with f and h. A loop connects vertex e to itself.
Figure 12.3図12.3
A Graph and a Multigraph
英語のヒント
グラフと多重グラフ
It is not necessary for the edges in a graph to be straight. In fact, you can draw an edge any way you want. In graph theory, the focus is on which vertices are connected, not how the connections are drawn (see Figure 12.4). In a graph, each edge can be named by the two letters of the associated vertices. The four edges in Graph X in Figure 12.4 are ab, ac, ad, and ae. The order of the letters is not important when you name the edge of a graph. For example, ab refers to the same edge as ba.
英語のヒント
グラフの辺がまっすぐである必要はない。実際、辺はどう描いてもよい。グラフ理論で注目するのは、どの頂点がつながっているかであって、つながりがどう描かれているかではない(図12.4を見よ)。グラフでは、各辺を対応する頂点の2つの文字で名づけられる。図12.4のグラフXの4つの辺はab、ac、ad、aeである。グラフの辺を名づけるとき、文字の順序は重要ではない。たとえば、abはbaと同じ辺を指す。
Two graphs are labeled graph X. In each graph, six vertices are present: a, b, c, d, e, and f. Edges connect a with b, c, d, and e. In the first graph, the edges are straight lines. In the second graph, the edges are curved.
Figure 12.4図12.4
Different Representations of the Same Graph
英語のヒント
同じグラフの異なる表現
Example 12.1例題 12.1

Identifying Edges and Vertices辺と頂点を見きわめる

Name all the vertices and edges of graph F in Figure 12.5.
英語のヒント
図12.5のグラフFのすべての頂点と辺を挙げよ。
A graph labeled graph F. The graph has five vertices: V, W, X, Y, and Z. Four edges connect X with V, W, Y, and Z. Two edges connect W with V and Z.
Figure 12.5図12.5
Graph F
英語のヒント
グラフF
Solution解答
The vertices are v, w, x, y, and z. The edges are vw, vx, wx, wz, xy, and xz.
英語のヒント
頂点はv、w、x、y、zである。辺はvw、vx、wx、wz、xy、xzである。
Since the purpose of a graph is to represent the connections between objects, it is very important to know if two vertices share a common edge. The two vertices at either end of a given edge are referred to as neighboring, or adjacent. For example, in Figure 12.5, vertices x and w are adjacent, but vertices y and w are not.
英語のヒント
グラフの目的は物のあいだのつながりを表すことなので、2つの頂点が共通の辺をもつかどうかを知ることはとても重要である。ある辺の両端の2つの頂点を、隣り合う、つまり隣接しているという。たとえば、図12.5で、頂点xとwは隣接しているが、頂点yとwは隣接していない。
Example 12.2例題 12.2

Identifying Vertices That Are Not Adjacent隣接していない頂点を見きわめる

Name all the pairs of vertices of graph F in Figure 12.5 that are not adjacent.
英語のヒント
図12.5のグラフFで、隣接していない頂点の組をすべて挙げよ。
Solution解答
The pairs of vertices that are not adjacent in graph F are v and y, v and z, w and y, and y and z.
英語のヒント
グラフFで隣接していない頂点の組は、vとy、vとz、wとy、yとzである。