Capítulo I. OBJETO DE ESTUDIO Y METODOLOGÍA
I.2. Problema de investigación
All graphs considered so far were “undirected”—their edges were unordered pairs of vertices. Many situations involve one-way streets and schemes similar to the following ones:
To reflect such situations, one introduces directed graphs, where every edge has a direction.
4.5.1 Definition. A directed graph G is a pair (V, E), where E is a subset of the Cartesian product V × V . The ordered pairs (x, y) ∈ E are called directed edges. We say that a directed edge e = (x, y) has head y and tail x, or4 that e is an edge from x to y.
Further we could introduce directed graphs with multiple edges, and also for each notion or problem for undirected graphs, we could look at its directed analogy. Sometimes the results for directed graphs are simple modifications of the results for undirected graphs. In some other problems, the directed and undirected cases differ substan-tially, and as a rule, the directed version is then more difficult to handle. In this book, we deal almost exclusively with undirected graphs. Let us make an exception here and introduce Eulerian di-rected graphs and describe one of their cute applications.
An attentive reader might have noticed that a directed graph G = (V, E) is the same object as a relation on the set V . Nevertheless, both these notions are introduced, since directed graphs are investigated in different contexts than relations.
4Here is some alternative terminology. The artificial word digraph is often used for a directed graph. A directed edge is sometimes called an arrow, a (directed) arc, etc. An oriented graph is a special type of directed graph, where we do not admit directed edges (x, y) and (y, x) simultaneously.
4.5 Eulerian directed graphs 139 It is quite natural to define a directed tour in a directed graph G = (V, E) as a sequence
(v0, e1, v1, e2, . . . , em, vm)
such that ei = (vi−1, vi)∈ E for each i = 1, 2, . . . , m and, moreover, ei = ej whenever i = j. Similarly we can define a directed walk, directed path, and directed cycle.5
We say that a directed graph (V, E) is Eulerian if it has a closed directed tour containing all vertices and passing each directed edge exactly once. Eulerian directed graphs can again be characterized nicely. Before stating the theorem, we should add a few more notions.
For a given vertex v in a directed graph G = (V, E), let us denote the number of directed edges ending in v (i.e. having v as the head) by deg+G(v). Similarly, deg−G(v) stands for the number of directed edges originating in v. The number deg+G(v) is called the indegree of v, and deg−G(v) is the outdegree of v.
Each directed graph G = (V, E) can be assigned an undirected graph sym(G) = (V, ¯E), where
E =¯ %
{x, y}: (x, y) ∈ E or (y, x) ∈ E&
.
The graph sym (G) is called the symmetrization of the graph G.
Now we can formulate the promised characterization of Eulerian directed graphs.
4.5.2 Proposition. A directed graph is Eulerian if and only if its symmetrization is connected6 and deg+G(v) = deg−G(v) holds for each vertex v ∈ V (G).
A proof of this proposition is very similar to the proof of Theo-rem 4.4.1, and we leave it as an exercise.
An application. A wheel has a sequence of n digits 0 and 1 written along its circumference. We can read k consecutive digits through a slot:
5A directed cycle is sometimes simply called a cycle in the literature, or the neologism dicycle is also occasionally used, which may sound more like a name for some obscure vehicle.
6A directed graph whose symmetrization is connected is called weakly connec-ted (a policeman who can ignore one-way street signs can get from any vertex to any other one). On the other hand, in a strongly connected directed graph, any two vertices can be connected by a directed path, in both directions.
The sequence of n digits should be such that the position of the wheel can always be detected unambiguously from the k digits in the slot, no matter how the wheel is rotated. (Imagine a device for controlling the angular position of a radar or something else your fantasy can envisage.) For a given k, we want to manufacture a wheel with n as large as possible (so that the angular position can be controlled fairly precisely). A mathematical formulation of the problem is the following:
Problem. Find a cyclic sequence of digits 0 and 1, as long as pos-sible, such that no two k-tuples of consecutive digits coincide (here a cyclic sequence means positioning the digits on the circumference of a circle).
Let (k) denote the maximum possible number of digits in such a sequence for a given k. We prove the following surprising result:
Proposition. For each k≥ 1 we have (k) = 2k.
Proof. Since the number of distinct k-digit sequences made of digits 0 and 1 is 2k, the length of the cyclic sequence cannot be longer than 2k. It remains to construct a cyclic sequence of length 2k with the required property. The case k = 1 is easy, so let us assume k≥ 2.
Define a graph G = (V, E) in the following manner:
• V is the set of all sequences of 0s and 1s of length k − 1 (so
|V | = 2k−1).
• The directed edges are all pairs of (k − 1)-digit sequences of the
form
(a1, . . . , ak−1), (a2, . . . , ak) .
Directed edges are in a bijective correspondence with k-digit sequences
(a1, a2, . . . , ak),
and hence |E| = 2k. For brevity, let us denote the directed edge
(a1, . . . , ak−1), (a2, . . . , ak)
by (a1, a2, . . . , ak). No confusion should arise.
4.5 Eulerian directed graphs 141
0 1
10
01
00 11
00
11 01 10
000
111
110 001 100
011 010
101
k = 2 k = 3
Fig. 4.5 The directed graphs in the wheel problem.
The reader will probably agree that deg−G(v) = deg+G(v) = 2 for each vertex v ∈ V . The symmetrization of G is connected, because by repeatedly omitting the last term of a (k− 1)-digit sequence and adding 0s to its beginning we can convert any sequence to the seq-uence of 0s. Hence G is an Eulerian directed graph. Examples for k = 2 and k = 3 are shown in Fig. 4.5.
Set|E| = 2k = K, and let (e1, . . . , eK) be the sequence of edges in some directed Eulerian tour in G. Each edge ei has the form ei = (ai1, . . . , aik). The desired cyclic sequence of digits 0 and 1 of length K for our wheel can be defined as (a11, a21, . . . , aK1 ). That is, we take the first element from each ei. Each subsequence of k consecutive digits in this sequence corresponds to traversing one directed edge of the Eulerian tour, and since no directed edge is repeated in the tour, no two k-digit segments coincide. This proves (k) = 2k.
For example, for k = 2, from the graph in Fig 4.5 we can find a tour 00, 01, 11, 10 and the corresponding cyclic sequence 0011, and for k = 3 we get a tour 000, 001, 011, 111, 110, 101, 010, 100 and the corresponding cyclic sequence 00011101. 2 Let us remark that the noteworthy graphs constructed in the pre-ceding proof are called the De Bruijn graphs. Although they are exp-onentially large in k, the neighbors of a given vertex can be found quickly. They are sometimes used as interconnecting networks in parallel computing. Other graphs with similar properties are the k-dimensional cubes: the vertex set is again all sequences of 0s and 1s of length k, and two sequences are adjacent if and only if they differ in exactly one coordinate.
Exercises
1. Prove Proposition 4.5.2.
2. Design an algorithm for finding an Eulerian directed tour in a directed graph.
3. When can a directed graph be drawn with a single line (not necessarily a closed one)? Each directed edge must be drawn exactly once and in the direction from its tail to its head.
4. Let G = (V, E) be a graph. An orientation of G is any oriented graph G = (V, E) arising by replacing each edge {u, v} ∈ E either by the directed edge (u, v) or by the directed edge (v, u).
(a) Prove that if all degrees of G are even then an orientation H of G exists with deg+H(v) = deg−H(v) for all vertices v∈ V (G).
(b) Prove that a directed graph G satisfying deg+G(v) = deg−G(v) for all vertices v is strongly connected if and only if it is weakly connected.
5. ∗Let G = (V, E) be a directed graph, and let w : E→ R be a function assigning a real number to each edge. A function p : V → R defined on vertices is called a potential for w if w(e) = p(v)− p(u) holds for every directed edge e = (u, v). Prove that a potential for w exists if and only if the sum of the values of w over the edges of any directed cycle in G is 0.
6. ∗Prove that the following two conditions for a strongly connected dir-ected graph G are equivalent:
(i) G contains a directed cycle of an even length.
(ii) The vertices of G can be colored by 2 colors (each vertex receives one color) in such a way that for each vertex u there exists a directed edge (u, v) with v having the color different from the color of u.
7. ∗∗Knights from two enemy castles are sitting at a round table and negotiating for peace. The number of knights with an enemy sitting on their right-hand side is the same as the number of knights with an ally on their right-hand side. Prove that the total number of knights is divisible by 4.
8. ∗A tournament is a directed graph such that for any two distinct ver-tices u, v, exactly one of the directed edges (u, v) and (v, u) is present in the graph. Prove that each tournament has a directed path passing through all vertices (such a path is called Hamiltonian).
9. ∗Prove that in any tournament (see Exercise 8 for a definition), there exists a vertex v that can be reached from any other vertex by a directed path of length at most 2.
4.6 2-connectivity 143
4.6 2-connectivity
A graph G is called k-vertex-connected if it has at least k + 1 vertices and it remains connected after removing any k−1 vertices. A graph G is called k-edge-connected if we obtain a connected graph by deleting any k− 1 edges of G. The maximum k such that G is k-vertex-connected is called the vertex connectivity of G, and similarly for edge connectivity.
If a graph is a scheme of a city public transport network, a railway network, telephone cables, etc., its higher connectivity gives hope for a reasonable functioning of the network even in critical conditions, when one or several nodes or connections of the network fail. The notions of vertex connectivity and edge connectivity are theoretically and prac-tically quite important in graph theory. They are related to so-called network flows, which are not treated in this book. Here we restrict our attention to 2-vertex-connectivity, which will be needed in a chapter on planar graphs, and which will also serve as an illustration for some proof methods and constructions.
Instead of 2-vertex-connectivity we will briefly say 2-connectivity.
To be on the safe side, let us give the definition once more:
4.6.1 Definition (2-connectivity). A graph G is called 2-connec-ted if it has at least 3 vertices, and by deleting any single vertex we obtain a connected graph.
It is easy to check that a 2-connected graph is also connected (here we need the assumption that a 2-connected graph has at least 3 vertices—we recommend the reader to think this over). In this section we give alternative descriptions of 2-connected graphs. Before we begin with this, we introduce the notation for several graph-theoretic operations. It simplifies formulas considerably and will also be useful later on.
4.6.2 Definition (Some graph operations). Let G = (V, E) be a graph. We define various new graphs created from G:
• (Edge deletion)
G− e = (V, E \ {e}), where e∈ E is an edge of G;
• (Adding a new edge)
G + ¯e = (V, E∪ {¯e}), where ¯e∈V
2
\ E is a pair of vertices that is not an edge of G;
e G e
v
G− e G− v G%e
G + e
Fig. 4.6 Examples of graph operations.
• (Vertex deletion) G− v =
V \ {v}, {e ∈ E : v ∈ e} ,
where v ∈ V (we delete the vertex v and all edges having v as an endpoint);
• (Edge subdivision)
G%e =
V ∪ {z}, (E \%
{x, y}&
)∪%
{x, z}, {z, y}&
,
where e ={x, y} ∈ E is an edge, and z ∈ V is a new vertex (we
“draw a new vertex z” on the edge{x, y}).
We say that a graph G is a subdivision of the graph G if G is isomorphic to a graph created from G by successive operations of edge subdivision.
Examples of the operations just defined are shown in Fig. 4.6.
Let us go back to 2-connectivity. Here is the first remarkable equivalent characterization:
4.6.3 Theorem. A graph G is 2-connected if and only if there exi-sts, for any two vertices of G, a cycle in G containing these two vertices.
Let us remark that this theorem is a particular case of a very imp-ortant result called Menger’s theorem, which says the following. If x
4.6 2-connectivity 145 and y are two vertices in a k-vertex-connected graph, then there exist k paths from x to y that are mutually disjoint except for sharing the vertices x and y.
Proof. The given condition is, no doubt, sufficient, since if two vertices v, v lie on a common cycle then there exist two paths con-necting them having no common vertices except for the end-vertices, and so v and v can never fall into distinct components by removing a single vertex.
We now prove the reverse implication. The existence of a com-mon cycle for v, v will be established by induction on dG(v, v), the distance of the vertices v and v.
First let dG(v, v) = 1. This means that {v, v} = e ∈ E(G).
By 2-connectivity of G, the graph G− e is connected (if it were disconnected, at least one of the graphs G− v, G − v would also be disconnected). Therefore there exists a path from v to vin the graph G−e, and this path together with the edge e forms the required cycle containing both v and v.
Next, suppose that any pair of vertices at distance less than k lies on a common cycle, for some k≥ 2. Consider two vertices v, v ∈ V at distance k. Let P = (v = v0, e1, v1, . . . , ek, vk = v) be a shortest path from v to v. Since dG(v, vk−1) = k−1, a cycle exists containing both v and vk−1. This cycle consists of two paths, P1 and P2, from v to vk−1. Now consider the graph G− vk−1. It is connected, and hence it has a path ˇP from v to v. This path thus doesn’t contain vk−1. Let us look at the last vertex on the path ˇP (when going from v to v) belonging to one of the paths P1, P2, and denote this vertex by w, as in the illustration:
v
vk−1
v
w P1
P2
Pˇ
Without loss of generality, suppose that w is a vertex of P1. Then the desired cycle containing v and v is formed by the path P2, by the portion of the path P1 between v and w, and by the portion of the path ˇP between w and v (drawn by a thick line). 2
4.6.4 Observation. A graph G is 2-connected if and only if any subdivision of G is 2-connected.
Proof. It is enough to show that, for any edge e ∈ E(G), G is 2-connected if and only if G%e is 2-connected. If v ∈ V (G) is a vertex of G, it is easy to see that G− v is connected if and only if (G%e)−v is connected. Therefore, if G%e is 2-connected then so is G.
For the reverse implication, it remains to show that for a 2-connected G, the graph (G%e)− z is connected, where z is the newly added vertex. This follows from the fact (observed in the previous proof) that G− e is connected for a 2-connected G. 2 The next characterization of 2-connected graphs is particularly suitable for proofs. We show how 2-connected graphs are built from simpler graphs.
4.6.5 Theorem (2-connected graph synthesis). A graph G is 2-connected if and only if it can be created from a triangle (i.e. from K3) by a sequence of edge subdivisions and edge additions.
Such a synthesis is illustrated below:
G
% % +
% + +
Proof. Every graph that can be produced from K3 by the above-mentioned operations is obviously 2-connected. So, we need to prove that we can construct each 2-connected graph.
4.6 2-connectivity 147 Actually, we show the possibility of creating any 2-connected graph by a somewhat different construction. We start with a cy-cle G0, and if a graph Gi−1has already been built, a graph Gi arises by adding a path Pi connecting two vertices of the graph Gi−1. The path Pi only shares its end-vertices with Gi−1, while all edges and all inner vertices are new. As illustrated in the following drawing,
G0
P1
P2
P3
we successively glue “ears” to the graph G (and, indeed, the decom-position is commonly called an ear decomdecom-position).
Since adding a path can be simulated by an edge addition and edge subdivisions,7 it suffices to show that every 2-connected graph G can be produced by a repeated ear addition.
Let us pick a cycle G0 in the graph G arbitrarily. Suppose that graphs Gj = (Ej, Vj) for j ≤ i have already been defined, with properties as described above. If Gi = G the proof is over, so let us assume that Ei = E(G). Since G is connected, there exists an edge e∈ E(G) \ Ei such that e∩ Vi= ∅.
If both vertices of e lie in Vi then we put Gi+1= Gi+ e. In the other case, let e ={v, v}, where v ∈ Vi, v ∈ Vi:
v
v
v
G0 G1
Consider the graph G−v. This is connected (since G is 2-connected), and therefore a path P exists connecting the vertex vto some vertex v ∈ Vi, where v is the only vertex of the path P belonging to Vi
7One has to be careful here: if v, v ∈ V (Gi−1) are already connected by an edge and if we want to connect them by a new path, we cannot start by adding the edge{v, v} (at least if we do not allow multiple edges). We have to subdivide the edge{v, v} first, then again add the edge {v, v}, and then continue extending the path by subdivisions if needed.
(to this end, take the shortest path joining v to Vi in the graph G−v). Then we can define the graph Gi+1by adding the edge e and the path P to Gi, i.e. Vi+1= Vi∪ V (P ), Ei+1= Ei∪ {e} ∪ E(P ). 2 Exercises
1. Prove that for any two edges of a 2-connected graph, a cycle exists containing both of them.
2. Let G be a critical 2-connected graph; this means that G is 2-connected but no graph G− e for e ∈ E(G) is 2-connected.
(a) Prove that at least one vertex of G has degree 2.
(b) For each n, find an example of a critical 2-connected graph with a vertex of degree at least n.
(c)∗For each n, give an example of a critical 2-connected graph with a vertex of degree≥ n, which is at distance at least n from each vertex of degree 2.
3. (a) Is it true that any critical 2-connected graph (see Exercise 2) can be obtained from a cycle by successive gluing of “ears” (paths) of length at least 2?
(b) Is it true that any critical 2-connected graph can be obtained from a cycle by a successive gluing of “ears” in such a way that each of the intermediate graphs created along the way is also critical 2-connected?
4. Prove that any 2-connected graph has a strongly connected orientation (see Section 4.5 for these notions).
5. ∗Determine the vertex connectivity of the k-dimensional cube. The k-dimensional cube was defined at the end of Section 4.5.
6. ∗Let d≥ 3 be an integer, and let G be a d-regular graph (every vertex has degree d) which is d-edge-connected. Prove that such a G is tough, meaning that removing any k vertices disconnects G into at most k connected components (for all k≥ 1).
7. (Mader’s theorem)∗∗Let G be a graph on n vertices such that|E(G)| ≥ (2k− 3)(n − k + 1) + 1, where k is natural number with 2k − 1 ≤ n.
By induction on n, prove that G has a k-vertex-connected subgraph.