← 学习库 Discrete Mathematics (Levin) · 中英对照 目录

4.0 Prelude to Graph Theory 图论·导言

本页译自 LibreTexts · Discrete Mathematics (Levin) 第 4.0 章。公式经 MathJax 渲染,自定义宏已注入。

Investigate! 探究!

In the time of Euler, in the town of Königsberg in Prussia, there was a river containing two islands. The islands were connected to the banks of the river by seven bridges (as seen below). The bridges were very beautiful, and on their days off, townspeople would spend time walking over the bridges. As time passed, a question arose: was it possible to plan a walk so that you cross each bridge once and only once? Euler was able to answer this question. Are you?

gt-bridges-art.svg
在欧拉的时代,普鲁士的柯尼斯堡城(Königsberg)有一条河,河中坐落着两座岛。这两座岛由七座桥与河岸相连(如下图所示)。那些桥十分精美,城镇居民在休息日便会去桥上散步。久而久之,一个问题浮现出来:能否规划一次散步,使得每座桥都恰好经过一次?欧拉给出了这个问题的答案。你呢?

Graph Theory is a relatively new area of mathematics, first studied by the super famous mathematician Leonhard Euler in 1735. Since then it has blossomed in to a powerful tool used in nearly every branch of science and is currently an active area of mathematics research.

图论是数学中相对较新的领域,最早由极富盛名的数学家莱昂哈德·欧拉(Leonhard Euler)于 1735 年研究。此后,它已蓬勃发展为一门强有力的工具,被应用于几乎每一个科学分支,并且至今仍是数学研究中十分活跃的领域。

The problem above, known as the Seven Bridges of Königsberg, is the problem that originally inspired graph theory. Consider a “different” problem: Below is a drawing of four dots connected by some lines. Is it possible to trace over each line once and only once (without lifting up your pencil, starting and ending on a dot)?

gt-bridges-graph.svg
上述被称为「柯尼斯堡七桥问题」(Seven Bridges of Königsberg)的谜题,正是最初启发图论的问题。考虑一个「不同的」问题:下面是一幅由若干线条连接四个点的图画。能否沿着每条线描一遍且只描一遍(笔不离开纸面,且起点与终点都落在某个点上)?

There is an obvious connection between these two problems. Any path in the dot and line drawing corresponds exactly to a path over the bridges of Königsberg.

这两个问题之间存在明显的联系。点线图里的任意一条路径,都恰好对应柯尼斯堡七桥之上的一条路径。

Pictures like the dot and line drawing are called graphs. Graphs are made up of a collection of dots called vertices and lines connecting those dots called edges. When two vertices are connected by an edge, we say they are adjacent. The nice thing about looking at graphs instead of pictures of rivers, islands and bridges is that we now have a mathematical object to study. We have distilled the “important” parts of the bridge picture for the purposes of the problem. It does not matter how big the islands are, what the bridges are made out of, if the river contains alligators, etc. All that matters is which land masses are connected to which other land masses, and how many times. This was the great insight that Euler had.

像点线图这样的图画被称为图(graph)。图由一组称为顶点(vertex)的点,以及连接这些点的、称为边(edge)的线组成。当两个顶点由一条边相连时,称它们相邻(adjacent)。研究图而非河流、岛屿与桥梁的图画,好处在于我们现在有了一个可供研究的数学对象。为解决这个问题,我们已经把桥的图画中「重要的」部分提炼了出来。岛屿有多大、桥由什么材料建成、河里有没有短吻鳄,这些都无关紧要。唯一重要的是:哪些陆地与哪些其他陆地相连,以及相连的次数。这正是欧拉的伟大洞见。

We will return to the question of finding paths through graphs later. But first, here are a few other situations you can represent with graphs:

我们稍后会回到「在图中寻找路径」的问题。不过在此之前,还有另外几个可以用图来表示的情境:

Example 1

示例 1

Al, Bob, Cam, Dan, and Euclid are all members of the social networking website Facebook. The site allows members to be “friends” with each other. It turns out that Al and Cam are friends, as are Bob and Dan. Euclid is friends with everyone. Represent this situation with a graph.

阿尔(Al)、鲍勃(Bob)、卡姆(Cam)、丹(Dan)和欧几里得(Euclid)都是社交网站 Facebook 的成员。该网站允许成员彼此成为「好友」。结果,阿尔与卡姆是好友,鲍勃与丹也是好友。欧几里得与所有人都是好友。用一幅图来表示这一情形。

Solution

解答

Each person will be represented by a vertex and each friendship will be represented by an edge. That is, two vertices will be adjacent (there will be an edge between them) if and only if the people represented by those vertices are friends. We get the following graph:

gt-facebook.svg
每个人用一个顶点表示,每段友谊用一条边表示。也就是说,两个顶点相邻(它们之间有一条边)当且仅当这两个顶点所代表的人是好友。我们得到如下的图:

Example 2

示例 2

Each of three houses must be connected to each of three utilities. Is it possible to do this without any of the utility lines crossing?

三座房屋中的每一座都必须与三种公用设施中的每一种相连。能否做到让所有管线互不交叉?

Solution

解答

We will answer this question later. For now, notice how we would ask this question in the context of graph theory. We are really asking whether it is possible to redraw the graph below without any edges crossing (except at vertices). Think of the top row as the houses, bottom row as the utilities.

gt-k33.svg
我们稍后会回答这个问题。眼下请注意,在图论的语境中我们会如何提出这个问题。我们真正要问的是:能否重画下面这幅图,使得任意两条边都不相交(在顶点处相交除外)。把上面一排看作房屋,下面一排看作公用设施。