Computational Topology Lecture notes
Francis Lazarus and Arnaud de Mesmay
2016-2018 Contents
1 Panorama4 1.0.1 Topology...... 4 1.0.2 Computational Topology...... 6
2 Planar Graphs8 2.1 Topology...... 9 2.1.1 The Jordan Curve Theorem...... 10 2.1.2 Euler’s Formula...... 12 2.2 Kuratowski’s Theorem...... 15 2.2.1 The Subdivision Version...... 15 2.2.2 The Minor Version...... 19 2.3 Other Planarity Characterizations...... 19 2.4 Planarity Test...... 22 2.5 Drawing with Straight Lines...... 27
3 Surfaces and Embedded Graphs 32 3.1 Surfaces...... 32 3.1.1 Surfaces and cellularly embedded graphs...... 32 3.1.2 Polygonal schemata...... 35 3.1.3 Classification of surfaces...... 36 3.2 Maps...... 39 3.3 The Genus of a Map...... 43 3.4 Homotopy...... 45 3.4.1 Groups, generators and relations...... 46 3.4.2 Fundamental groups, the combinatorial way...... 46 3.4.3 Fundamental groups, the topological way...... 50 3.4.4 Covering spaces...... 52
4 The Homotopy Test 55 4.1 Dehn’s Algorithm...... 56 4.2 van Kampen Diagrams...... 58 4.2.1 Disk Diagrams...... 58 4.2.2 Annular Diagrams...... 59 4.3 Gauss-Bonnet Formula...... 59 4.4 Quad Systems...... 61 4.5 Canonical Representatives...... 62 4.5.1 The Four Bracket Lemma...... 62
1 CONTENTS 2
4.5.2 Bracket Flattening...... 64 4.5.3 Canonical Representatives...... 65 4.6 The Homotopy Test...... 67
5 Minimum Weight Bases 68 5.1 Minimum Basis of the Fundamental Group of a Graph...... 69 5.2 Minimum Basis of the Cycle Space of a Graph...... 70 5.2.1 The Greedy Algorithm...... 70 5.3 Uniqueness of Shortest Paths...... 73 5.4 First Homology Group of Surfaces...... 74 5.4.1 Back to Graphs...... 74 5.4.2 Homology of Surfaces...... 75 5.5 Minimum Basis of the Fundamental Group of a Surface...... 77 5.5.1 Dual Maps and Cutting...... 77 5.5.2 Homotopy Basis Associated with a Tree-Cotree Decomposition. 77 5.5.3 The Greedy Homotopy Basis...... 78 5.6 Minimum Basis of the First Homology Group of a Surface...... 80 5.6.1 Homology Basis Associated with a Tree-Cotree Decomposition. 80 5.6.2 The Greedy Homology Basis...... 80
6 Homology 83 6.1 Complexes...... 83 6.2 Homology...... 85 6.2.1 Chain complexes...... 85 6.2.2 Simplicial homology...... 86 6.2.3 Examples and the question of the coefficient ring...... 87 6.2.4 Betti numbers and Euler-Poincaré formula...... 88 6.2.5 Homology as a functor...... 88 6.3 Homology computations...... 89 6.3.1 Over a field...... 89 6.3.2 Computation of the Betti numbers: the Delfinado-Edelsbrunner algorithm...... 89 6.3.3 Over the integers: the Smith-Poincaré reduction algorithm.... 90
7 Persistent Homology 93 7.1 Persistence Modules...... 94 7.1.1 Classification of Persistence Modules...... 95 7.1.2 Restrictions of Persistence Modules...... 97 7.2 Application to Topological Inference...... 98 7.3 Computing the Barcode...... 99 7.3.1 Compatible Boundary Basis...... 101 7.3.2 Algorithm...... 102 7.4 Persistence Diagrams...... 103 7.4.1 Stability of Persistence Diagrams...... 104 CONTENTS 3
8 Knots and 3-Dimensional Computational Topology 106 8.1 Knots...... 107 8.2 Knot diagrams...... 108 8.3 The knot complement...... 111 8.3.1 Homotopy...... 112 8.3.2 Homology...... 114 8.3.3 Triangulations...... 114 8.4 An algorithm for unknot recognition...... 115 8.4.1 Normal surface theory...... 116 8.4.2 Trivial knot and spanning disks...... 118 8.4.3 Normalization of spanning disks...... 120 8.4.4 Haken sum, fundamental and vertex normal surfaces...... 123 8.5 Knotless graphs...... 126
9 Undecidability in Topology 128 9.1 The Halting Problem...... 129 9.1.1 Turing Machines...... 129 9.1.2 Undecidability of the Halting Problem...... 130 9.2 Decision Problems in Group Theory...... 131 9.3 Decision Problems in Topology...... 134 9.3.1 The Contractibility and Transformation Problems...... 134 9.3.2 The Homeomorphism Problem...... 136 9.4 Proof of the Undecidability of the Group Problems...... 139 2 9.4.1 Z -Machines...... 139 9.4.2 Useful Constructs in Combinatorial Group Theory...... 140 9.4.3 Undecidability of the Generalized Word Problem...... 141 1
Panorama
Contents 1.0.1 Topology...... 4 1.0.2 Computational Topology...... 6
1.0.1 Topology. Topology deals with the study of spaces. One of its goals is to answer the following broad class of questions:
“Are these two spaces the same?”
This naturally leads to the following subquestions:
What is a space? General topology typically defines topological spaces via open • and closed sets. In order to avoid pathological examples, and with an eye towards applications, we will take a more concrete approach1: in this course, topological spaces will be obtained in the form of complexes, that is, by gluing together fundamental blocks. For example, gluing segments yields a graph, while by gluing together triangles one can obtain a surface (or something more compli- cated). The usual notions of distance on these fundamental blocks naturally induce a notion of proximity on such a complex, and therefore a topology whose properties are convenient to understand geometrically.
1This is by no means original: see introductory textbooks on algebraic topology, for example Hatcher [Hat02] or Stillwell [Sti93].
4 1. PANORAMA 5
What is “the same” ? It very much depends on the context. The most common • equivalence relation is homeomorphism, which is a continuous map with a continuous inverse function. But in some contexts, when a space is embedded in another space, one will be interested in distinguishing between different embeddings. There, a convenient notion is isotopy : two embedded spaces will be considered the same if one can deform continuously one into the other one.
Let us look at examples.
Example 1: By gluing triangles or quadrilaterals, one can easily obtain a sphere (left figure), or a torus (right figure).
Are these two spaces homeomorphic? Obviously not: the torus has a hole. But what is a hole? Two naive answers will guide us to the two fundamental constructs of algebraic topology:
Homotopy: On the sphere, every closed curve can be deformed into a single • point. While on the torus, a curve going around the hole can not. Such a curve is not homotopic to a point.
Homology: On the sphere, every closed curve separates the sphere into two • regions. While on the torus, a curve going around the hole is not separating. Such a curve is not trivial in homology.
These intuitions can be formalized into algebraic objects which will constitute invariants (actually, functors) that one can use to distinguish topological spaces.
3 Example 2: By gluing segments in R , one can obtain the following knots.
1 Are they homeomorphic? Certainly: they are both homeomorphic to the circle S . But are they isotopic: can one be deformed into the other without crossing itself? The answer is negative, but this is not that easy to prove. One way to see it is that the knot on the left bounds a disk, while the one on the right does not. Studying which surfaces one can find in a 3-dimensional space is the goal of normal surface theory. 1. PANORAMA 6
1.0.2 Computational Topology. Computational topology deals with effective computations on topological spaces. The main question now becomes:
“How to compute whether these two spaces are the same?”
Note that since we study spaces described by gluings of fundamental blocks, in most instances this can be made into a well-defined algorithmic problem, with a finite input. One can then wonder about the complexity of this problem, and aim to design the most efficient algorithm, or conversely prove hardness results. Throughout the course, we will investigate the complexity of various instances of this question, with practical algorithms computing homeomorphism, homotopy, homology or isotopy for example.
Outline. We will work by increasing progressively the dimension, and thus the com- plexity of the objects we consider.
2 1. We start with one of the simplest topological spaces : the plane R . Describing it as a union of small blocks amounts to the study of planar graphs. This topo- logical constraint on graphs has a strong impact on their combinatorics, which we will study through various angles.
2. Next come surfaces, which look locally like the plane. From a mathematical point of view, these are still fairly simple, as they can be easily classified. But once again, there is a very fruitful interplay between the topology of surfaces and the combinatorics of embedded graphs. Moreover, surfaces are a convenient and easy framework to introduce homotopy and homology and we will present efficient algorithms for the computation of these invariants.
3. In dimension 3, we will introduce knots and 3-manifolds. Distinguishing vari- ous knots is hard: the whole field of knot theory is dedicated to this. We will see through various examples why this is hard, and will introduce normal surface theory, one of the main tools used for computational problems in 3 dimensions. As an application, we will use it to provide an algorithm to recognize trivial knots in NP.
4. As soon as we hit dimension 4, we start to hit the limits of computational topol- ogy: many problems are not only hard, they are undecidable. We will introduce simplicial complexes, which are the main model for high-dimensional topo- logical spaces, and show that deciding homeomorphism of such complexes is already undecidable in dimension 4, as is testing the homotopy of curves in 2-dimensional complexes.
5. Although computing homotopy and homeomorphism quickly becomes intractable in high dimensions, homology does not: its simple algebraic structure allows 1. PANORAMA 7
for efficient computations that scale well with the dimension. This can be lever- aged as a tool for big data: the techniques of topological data analysis aim at recognizing topological features in point clouds by computing their persistent homology. As we shall see, this is a surprisingly powerful way to infer informa- tion from a structured point cloud.
Applications. The approach in this course is to focus on the mathematical motiva- tions to study topological objects and their computation. This does not mean that this is all devoid of applications. Quite the contrary: topological spaces are ubiquitous in computer science, and the primitives we develop here have practical implications in computer graphics [LGQ09], mesh processing [GW01], robotics [Far08], combinatorial optimization (see references in [Eri12]), machine learning [ACC16], and many other fields. Believe it or not, they even revolutionized basketball [Bec12]! 2
Planar Graphs
Contents 2.1 Topology...... 9 2.1.1 The Jordan Curve Theorem...... 10 2.1.2 Euler’s Formula...... 12 2.2 Kuratowski’s Theorem...... 15 2.2.1 The Subdivision Version...... 15 2.2.2 The Minor Version...... 19 2.3 Other Planarity Characterizations...... 19 2.4 Planarity Test...... 22 2.5 Drawing with Straight Lines...... 27
A graph is planar if it can be drawn on a sheet of paper so that no two edges inter- sect, except at common endpoints. This simple property not only allows to visualize planar graphs easily, but implies many nice properties. Planar graphs are sparse: they have a linear number of edges with respect to their number of vertices (specifically a simple planar graph with n vertices has at most 3n 6 edges), they are 4-colorable, they can be encoded efficiently, etc. Classical examples− of planar graphs include the graphs formed by the vertices and edges of the five Platonic polyhedra, and in fact of any convex polyhedron. Although being planar is a topological property, planar graphs have purely combinatorial characterizations. Such characterizations may lead to effi- cient algorithms for planarity testing or, more surprisingly, for geometric embedding (=drawing). In the first part of this lecture we shall deduce the combinatorial characterizations of planar graphs from their topological definition. That we can get rid of topological considerations should not be surprising. It is actually possible to develop a combinato- rial theory of surfaces where a drawing of a graph is defined by a circular ordering of its edges around each vertex. The collection of these circular orderings is called a rotation
8 2.1. Topology 9 system. A rotation system is thus described combinatorially by a single permutation over the (half-)edges of a graph; the cycle decomposition of the permutation induces the circular orderings around each vertex. The topology of the surface corresponding to a rotation system can be deduced from the computation of its Euler characteristic. Being planar then reduces to the existence of a rotation system with the appropriate Euler characteristic. The following notes are largely inspired by the monographs of Mohar and Thomassen [MT01] and of Diestel [Die05].
2.1 Topology
A graph G = (V, E ) is defined by a set V = V (G ) of vertices and a set E = E (G ) of edges where each edge is associated one or two vertices, called its endpoints.A loop is an edge with a single endpoint. Edges sharing the same endpoints are said parallel and define a multiple edge. A graph without loops or multiple edges is said simple or simplicial. In a simple graph every edge is identified unambiguously with the pair of its endpoints. Edges should be formally considered as pairs of oppositely oriented arcs. A path is an alternating sequence of vertices and arcs such that every arc is preceded by its origin vertex and followed by the origin of its opposite arc. A path may have repeated vertices (beware that this is not standard, and usually called a walk in graph theory books). Two or more paths are independent if none contains an inner vertex of another. A circuit is a closed path, i.e. a path whose first and last vertex coincide. A cycle is a simple circuit (without repeated vertices). We will restrict to finite graphs for which V and E are finite sets. 2 The Euclidean distance in the plane R induces the usual topology where a subset 2 X R is open if every of its points is contained in a ball that is itself included in X . ⊂ The closure X¯ of X is the set of limit points of sequences of points of X . The interior X◦ of X is the union of the open balls contained in X . An embedding of a non-loop edge in the plane is just a topological embedding (a homeomorphism onto its image) of 2 the segment [0,1] into R . Likewise, an embedding of a loop-edge is an embedding of 1 the circle S = R/Z. An embedding of a finite graph G = (V, E ) in the plane is defined 2 by a 1-1 map V , R and, for each edge e E , by an embedding of e sending 0,1 to e ’s endpoints such→ that the relative interior∈ of e (the image of ]0,1[) is disjoint{ from} other edge embeddings and vertices1. A graph is planar if it has an embedding into the plane. Thanks to the stereographic projection, the plane can be equivalently replaced by the sphere. A plane graph is a specific embedding of a planar graph. A connected plane graph in the plane has a single unbounded face. In contrast, all the faces play the same role in an embedding into the sphere and any face can be sent to the unbounded face of a plane embedding by a stereographic projection. As far as planarity is concerned we can restrict to simple graphs. Indeed, it is easily seen that a graph has an embedding in the plane if and only if this is the case for the graph obtained by removing loop edges and replacing each multiple edge by a single
1 In other words, this is a topological embedding of the quotient space (V [0,1] E )/ , where identifies edge extremities (0,e ) and (1,e ) with the corresponding vertices. t × ∼ ∼ 2.1. Topology 10
2 edge. When each edge embedding [0,1] R is piecewise linear the embedding is said PL, or polygonal.A straight line embedding→ corresponds to the case where each edge is a line segment.
Lemma 2.1.1. A graph is planar if and only if it admits a PL embedding.
The proof is left as an exercise. One can first show that a connected subset of the plane is connected by simple PL arcs.
2.1.1 The Jordan Curve Theorem Most of the facts about planar graphs ultimately relies on the Jordan curve theorem, one of the most emblematic results in topology. Its statement is intuitively obvious: a simple closed curves cuts the plane into two connected parts. Its proof is nonethe- less far from obvious, unless one appeals to more advanced arguments of algebraic topology. Camille Jordan (1838 – 1922) himself proposed a proof whose validity is still subject of debates [Hal07b]. A rather accessible proof was proposed by Helge Tverberg [Tve80] (see the course notes [Laz12] for a gentle introduction). Eventually, a formal proof was given by Thomas Hales (and other mathematicians) [Hal07b, Hal07a] and was automatically checked by a computer. Concerning the Jordan-Schoenflies theorem, the situation is even worse. This stronger version of the Jordan curve the- orem asserts that a simple curve does not only cut a sphere into two pieces but that each piece is actually a topological disc. A nice proof by elementary means – but far from simple – and resorting to the fact that K3,3 is not planar is due to Carsten Thomassen [Tho92]. The main source of difficulties in the proof of the Jordan curve theorem is that a continuous curve can be quite wild, e.g. fractal. When dealing with PL curves only, the theorem becomes much easier to prove.
Theorem 2.1.2 (Polygonal Jordan curve — ). Let C be a simple closed PL curve. Its 2 complement R C has two connected components, one of which is bounded and each of which has C as\ boundary.
PROOF. Since C is contained in a compact ball, its complement has exactly one unbounded component. Define the horizontal rightward direction h~ as some fixed direction transverse to the all the line segments of C . For every segment s of C we let s be the lower half-open segment obtained from s by removing its upper endpoint. ~ 2 We also denote by hp the ray with direction h starting at a point p R . We consider 2 the parity function π : R C even, odd that counts the parity∈ of the number of lower half-open segments\ of →C intersected { by} a ray:
π(p) := parity of segment s of C hp s = { | ∩ 6 ;} 2 Every p R C is the center of small disk Dp over which π is constant. Indeed, let Sp ∈ \ be the set of segments (of C ) that avoid hp , let Sp0 be the set of segments whose interior crosses hp and let Sp00 be the set of segments whose lower endpoint lies on hp . If Dp 2.1. Topology 11
s s 2 3 s5 s s4 6 Dp
p hp
s1 C
Figure 2.1: The horizontal ray through p cuts the five lower half-open segments s 2, s 3, s 4, s 5, s 6. Here, we have s1 Sp , s4, s5 Sp0 and s2, s3, s6 Sp00. ∈ ∈ ∈ is sufficiently small, then for every q Dp we have Sq = Sp , Sq0 = Sp0 and the parity of ∈ Sq00 and Sp00 is the same. See Figure 2.1. It follows that π(q ) = π(p). Since π is locally | | | | 2 constant, it must be constant over each connected component of R C . Moreover, the parity function must take distinct values on points close to C that\ lie on a same 2 horizontal but on each side of C . It follows that R C has at least two components. 2 To see that R C has at most two components consider\ a small disk D centered at a point interior to\ a segment s of C . Then D C = D s has two components. Moreover, 2 any point in R C can be joined to one of these\ components\ by a polygonal path that avoids C : first come\ close to C with a straight line and then follow C in parallel until D is reached. Finally, it is easily seen by similar arguments as above that every point 2 of C is in the closure of both components of R C . \
Corollary 2.1.3 (θ ’s lemma). Let C1,C2,C3 be three simple PL paths with the same endpoints p,q and otherwise disjoint. The graph G = C1 C2 C3 has three faces bounded by C1 C2,C2 C3 and C3 C1, respectively. ∪ ∪ ∪ ∪ ∪
PROOF. From the Jordan curve theorem the three simple closed curves Gk = Ci C j , ∪ i , j,k = 1,2,3 , cut the plane into two components bounded by Gk . We let Xk and{ Yk}be respectively{ } the bounded and unbounded component. We also denote by ◦ Ci := Ci p,q the relative interior of Ci . We first remark that a simple PL path cuts an open connected\{ } subset of the plane into at most two components: as in the proof of the Jordan curve theorem we can first come close to the path and follow it until a small
◦ ◦ fixed disk is reached. Since C3 is included in a face of G3, we deduce that G = G3 C3 has at most three faces. ∪ ◦ We claim that Ci Xi for at least one index i 1,2,3 . Otherwise we would have ⊂ ∈ { } Ci ûXi , whence G ûXi , or equivalently Xi ûG . So, Xi would be a face of G . Since ⊂ ⊂ ⊂ ◦ the Xi ’s are pairwise distinct (note that Ci X¯ j while Ci X¯i ), we would infer that G ⊂ 6⊂ 2.1. Topology 12 has at least three bounded faces, hence at least four faces. This would contradict the ◦ first part of the proof. Without loss of generality we now assume C3 X3. ⊂ From G = G1 G2 we get that each face of G is a component of the intersection of ∪ a face of G1 with a face of G2. From G3 G ûY3 we get that Y3 is a face of G . Since Y3 is unbounded we must have Y3 Y1 Y⊂2. ⊂ ¯ ¯ ⊂ ∩ Now, C1 Y3 Y1 = ûX1 implies G = G1 C1 ûX1. It follows that X1 is a face of G . Likewise, X2⊂is a⊂ face of G . Moreover, these∪ two⊂ faces are distinct (C1 bounds X1 but not X2). We conclude that Y3, X1 and X2 are the three faces of G .
2.1.2 Euler’s Formula The famous formula relating the number of vertices, edges and faces of a plane graph is credited to Leonhard Euler (1707-1783) although René Descartes had already de- duced very close relations for the graph of a convex polyhedron. See the histori- cal account of R. J. Wilson in [Jam99, Sec. 17.3] and in J. Erickson’s course notes http://jeffe.cs.illinois.edu/teaching/topology17/chapters/02-planar-graphs.pdf Recall that a graph G is 2-connected if it contains at least three vertices and if removing any one of its vertices leaves a connected graph. If G is 2-connected, it can be constructed by iteratively adding paths to a cycle. In other words, there must be a sequence of graphs G0,G1,...,Gk = G such that G0 is a cycle and Gi is deduced from Gi 1 by attaching a simple path between two distinct vertices of Gi 1. − − Proposition 2.1.4. Each face of a 2-connected PL plane graph is bounded by a cycle of the graph. Moreover, each edge is incident to (= is in the closure of) exactly two faces.
PROOF. Let G be a 2-connected PL plane graph. Consider the sequence G0,G1,..., Gk = G as above. We prove the proposition by induction on k. If k = 0, then G is a cycle and the proposition reduces to the Jordan curve theorem 2.1.2. Otherwise, by the induction hypothesis Gk 1 satisfies the proposition. Let P be the attached path − such that G = Gk 1 P . The relative interior of P must be contained in a face f of − Gk 1. This face is bounded∪ by a cycle C of Gk 1. We can now apply θ ’s lemma 2.1.3 to − − C P and conclude that f is cut by G into two faces bounded by the cycles C1 P and C2∪ P , where C1,C2 are the subpaths of C cut by the endpoints of P . Moreover∪ all the other∪ faces of Gk 1 are faces of G bounded by the same cycles. It easily follows that the edges of G are− each incident to exactly two faces.
Lemma 2.1.5. Let G be a PL plane graph. If v is a vertex of degree one in G then G v and G have the same number of faces. −
PROOF. We denote by e the edge incident to v in G . Every face of G is contained in a face of G v . Moreover, the relative interior of (the embedding of) e is contained in a face f −of G v . Hence, every other face of G v is also a face of G . It remains − − to count the number of faces of G in f . Let p,p 0 be two points in f e . There is a \ PL path in f connecting p and p 0. This path may intersect e , but we may avoid this intersection by considering a detour in a small neighborhood Ne of e in f (indeed, 2.1. Topology 13
Ne e is connected). It follows that p and p 0 belong to a same component of f e . We conclude\ that G has only one face in f , so that G and G v have the same number\ of faces. −
Theorem 2.1.6 (Euler’s formula). Let V , E and F be the number of vertices, edges and faces of a connected plane graph G| .| Then,| | | |
V E + F = 2 | | − | | | |
PROOF. We argue by induction on E . If G has no edges then it has a single vertex and the above formula is trivial. Otherwise,| | suppose that G has a vertex v of degree one. Then by Lemma 2.1.5, G has the same number of faces as G v . Note that G has one vertex more and one edge more than G v . By the induction− hypothesis we can apply Euler’s formula to G v , from which− we immediately infer the validity of Euler’s formula for G . If every vertex− of G has degree at least two, then G contains a cycle C . Let e be an edge of C . We claim that G has one face more than G e . This will allow to conclude the theorem by applying Euler’s formula to G e , noting− that G has the same number of vertices but one edge less than G e . By− the Jordan curve theorem 2.1.2, C cuts the plane into two faces (components)− bounded by C . Since G = C (G e ), every face of G is included in the intersection of a face of C and a face of G e∪. Let−f be the face of G e containing the relative interior of e . Every other face of G − e does not meet C , hence− is also a face of G . Since f intersects the two faces of C −(both bounded by e ), G has at least one face more than G e . By considering a small tubular neighborhood of e in f , one shows by an already− seen argument that f e has at most two components. It follows that f contains exactly two faces of G , which\ concludes the claim.
Application. Two old puzzles that go back at least to the nineteenth century are related to planarity and can be solved using Euler’s formula. The first asks whether it is possible to divide a kingdom into five regions so that each region shares a frontier line with each of the four other regions. The second puzzle, sometimes called the gaz- water-electricity problem requires to join three houses to three gaz, water and electricity facilities using pipes so that no two pipes cross. By duality, the first puzzle translates to the question of the planarity of the complete graph K5 obtained by connecting five vertices in all possible ways. The second problem reduces to the planarity of the complete bipartite graph K3,3 obtained by connecting each of three independent vertices to each of three other independent vertices. It appears that these two puzzles are unfeasible.
Theorem 2.1.7. K5 and K3,3 are not planar.
PROOF. We give two proofs. The first one is based on Euler’s formula.
1. Suppose by way of contradiction that K3,3 has a plane embedding. Euler’sformula directly implies that the embedding has n = 2 6 + 9 = 5 faces. Since K3,3 is 2- connected, it follows from Proposition 2.1.4 that− every edge is incident to two 2.1. Topology 14
distinct faces. By the same proposition, each face is bounded by a cycle, hence by at least 4 edges (cycles in a bipartite graph have even lengths). It follows from the handshaking lemma that twice the number of edges is larger than four times the number of faces, i.e. 18 20. A contradiction. ≥ An analogous argument for K5 implies that an embedding must have 7 faces. Since every face is incident to at least 3 edges, we infer that 2 10 3 7. Another contradiction. × ≥ ×
2. Let 1,3,5 and 2,4,6 be the two vertex parts of K3,3. The cycle (1,2,3,4,5,6) separates{ the} plane{ into} two components in any plane embedding of K3,3. By θ ’s lemma the edges (1,4) and (2,5) must lie in the face that does not contain (3,6). Then (1,4) and (2,5) intersect, a contradiction. A similar argument applies for the non-planarity of K5.
Exercise 2.1.8. Every simple planar graph G with n 3 vertices has at most 3n 6 edges and at most 2n 4 faces. ≥ − − Exercise 2.1.9. Every simple planar graph with at least six vertices has a vertex with degree less than 6. To conclude, we prove a very strong generalization of Exercise 2.1.8, which allows to quantify how non-planar dense graphs are. Here, a drawing of a graph is just 2 a continuous map f : G R , that is, a drawing of the graph on the plane where crossings are allowed. The→crossing number c r (G ) of a graph is the minimal number of crossings over all possible drawings of G . For instance, c r (G ) = 0 if and only if G is planar. The crossing number inequality [ACNS82, Lei84] provides the following lower bound on the crossing number.
E 3 Theorem 2.1.10. c r (G ) 64| V| 2 if E 4 V . ≥ | | | | ≥ | | The proof is a surprising application of (basic) probabilistic tools.
PROOF. Starting with a drawing of G with the minimal number of crossings, define a new graph G 0 obtained by removing one edge for each crossing. This graph is planar since we removed all the crossings, and it has at least E c r (G ) edges (removing one edge may remove more than one crossing), so we obtain| | that− E c r (G ) 3 V . (Note that we removed the -6 to obtain an inequality valid for any number| |− of vertices.)≤ | | This gives in turn
c r (G ) E 3 V . ≥ | | − | | This can be amplified in the following way. Starting from G , define another graph by removing vertices (and the edges adjacent to them) at random with some probability
1 p < 1, and denote by G 00 the obtained graph. Taking the previous inequality with − expectations, we obtain E(c r (G 00)) E( E 00 ) 3E( V 00 ). Since vertices are removed ≥ | | − | | with probability 1 p, we have E( V 00 ) = p V . An edge survives if and only if both its endpoints survive,− and a crossing| survives| | if| and only if the four adjacent vertices survive (there may be less than four adjacent vertices in general, but not in the drawing 2.2. Kuratowski’s Theorem 15 minimizing the crossing number, we leave this as an exercise to check), so we get 2 4 E( E 00 ) = p E and E(c r (G 00)) = p c r (G ). So we obtain | | | | 2 3 c r (G ) p − E 3p − V , ≥ | | − | | and taking p = 4 V / E – which is less than 1 if E 4 V – gives the result. | | | | | | ≥ | | 2.2 Kuratowski’s Theorem
2.2.1 The Subdivision Version We say that H is subdivision of G if H is obtained by replacing the edges of G by independent simple paths of one or more edges. Obviously, a subdivision of a non- planar graph is also non-planar. It follows from Theorem 2.1.7 that a planar graph cannot have a subdivision of K5 or K3,3 as a subgraph. In 1929, Kazimierz Kuratowski (1896 – 1980) succeeded to prove that this condition is actually sufficient for a graph to be planar. For this reason K5 and K3,3 are called the Kuratowski graphs, or the forbidden graphs.
Theorem 2.2.1 (Kuratowski, 1929). A graph is planar if and only if it does not contain a subdivision of K5 or K3,3 as a subgraph.
As just noted, we only need to show that a graph without any subdivision of a forbidden graph is planar. We follow the proof of Thomassen [MT01]. Recall that a graph is 3-connected if it contains at least four vertices and if removing any two of its vertices leaves a connected graph. By Menger’s theorem [Wil96, cor. 28.4], a graph is 3-connected if and only if any two distinct vertices can be connected by at least three independent paths. If e is an edge of a graph G we denote by G //e the graph obtained by the contraction of e , i.e. by deleting e , identifying its endpoints, and merging each resulting multiple edge, if any, into a single edge. The proof of Kuratowski’s theorem first restricts to 3-connected graphs. By Lemma 2.2.2 below we can repeatedly contract edges while maintaining the 3-connectivity until the graph is small enough so that it can be trivially embedded into the plane. We then undo the edge contractions one by one and construct corresponding embeddings. In the end, the existence of an embedding attests the planarity of the graph. In a second phase we extend the theorem to any graph, not necessarily 3-connected, that does not contain any subdivision of K5 or K3,3. This is done by adding as many edges as possible to the graph without introducing a (subdivision of a) forbidden graph. By Lemma 2.2.5 below the resulting graph is 3-connected and we may conclude with the first part of the proof.
Lemma 2.2.2. Any 3-connected graph G with at least five vertices contains an edge e such that G //e is 3-connected.
PROOF. Suppose for the sake of contradiction that for any edge e = x y , the graph G //e is not 3-connected. Denote by ve the vertex of G //e resulting from the identifica- tion of x and y . Then we can find a vertex z V (G //e ) such that z , ve disconnects ∈ { } 2.2. Kuratowski’s Theorem 16
v x e
t y
u H
H 0 z
Figure 2.2: H 0 has more vertices than H even when v x , y . ∈ { }
G //e . In other words, for any edge e = x y of G we can find a vertex z V (G ) such that G x , y, z is not connected. We choose e and z such that the number∈ of vertices of the− largest { component,} say H , of G x , y, z is maximal. Let u be adjacent to z in a component of G x , y, z other than− {H . See} figure 2.2. By the above reformulation, we can find a vertex− { v V }(G ) such that G z , u, v is not connected. We claim that ∈ − { } the subgraph H 0 induced by (V (H ) x , y ) v is connected. Since H 0 is contained ∪ { } \{ } in G z , u, v and since H 0 has more vertices than H , this contradicts the choice of − { } H , hence concludes the proof. To see that H 0 is connected we just need to check that every t V (H ) can be connected to x or y (themselves connected by e ) by a path in ∈ H 0. Since G is 3-connected, there is a path p : t x in G avoiding z and v . Replacing x by y if necessary, we can assume that p x does not contain y . It follows that p x − − is contained in G x , y, z , v , hence in H v . So p is in H 0. − { } − Exercise 2.2.3. Let e be an edge of G such that G //e contains a subdivision of a forbid- den graph. Show that G already contains such a subdivision. (Hint: G //e and G need not contain subdivisions of the same forbidden graph.) A straight line embedding is said convex if all its faces are bounded by convex poly- gons.
Proposition 2.2.4 (Kuratowski’s theorem for 3-connected graphs). A 3-connected graph G without any subgraph isomorphic to a subdivision of a forbidden graph admits a convex embedding.
PROOF. We use induction on the number of vertices of G . The proposition is easily checked by hand if G has four vertices. Otherwise, G has at least five vertices, and by Lemma 2.2.2 we may choose an edge e = x y such that G 0 := G //e is 3-connected. Moreover, G 0 contains no subdivision of a forbidden graph. See Exercise 2.2.3. By induction, G 0 has a convex embedding. Let z be the vertex of G 0 resulting from the identification of x and y . Since G 0 z is 2-connected, we know by Proposition 2.1.4 − that the face of G 0 z that contains z is bounded by a cycle C of G . Let X = u V (G ) u x E (G ) and− let Y = u V (G ) u y E (G ) . We claim that X and Y are{ not∈ interleaved| ∈in C , i.e.} X Y 2{ and∈ we cannot| ∈ find two} vertices in X and two vertices | ∩ | ≤ 2.2. Kuratowski’s Theorem 17
x1 x1
y2 x e y y1 y1 2 z y z y x e C C C C x2 x2
Figure 2.3: Left, two vertices x1, x2 X and two vertices y1, y2 Y appear in an alternate way along C . We infer the existence∈ of a subdivision of K3,3 in∈G . Right, X and Y share three vertices. We infer the existence of a subdivision of K5 in G . in Y that alternate along C . Otherwise, G would contain a subdivision of a forbidden graph as illustrated in Figure 2.3. We can obtain a convex embedding of G from the convex embedding of G 0 as follows: place x at the position of z and insert y close to x in the face of G 0 Ey incident to z and Y , where Ey := z v v Y . We next connect x and y with line− segments to their respective neighbors{ in| X∈ and} Y , and finally x to y . The previous claim implies that the resulting straight line drawing of G is an embedding. It can easily be made convex using the fact that small perturbations of the vertices of a convex polygon leave the polygon convex.
The next lemma allows to extend the proposition to graphs that are not necessarily 3-connected and thus concludes the proof of Kuratowski’s theorem.
Lemma 2.2.5. Let G be a graph with at least four vertices, containing no subdivision of
K5 or K3,3 and such that the addition of any edge between non-adjacent vertices creates such a subdivision. Then G is 3-connected.
PROOF. We argue by induction on the number n of vertices of G . Note that for n = 4 the lemma just says that K4 is 3-connected. Since removing an edge in K5 leaves a 3-connected planar graph, the lemma is also true for n = 5. We now assume n 6. We ≥ claim that G is 2-connected. Otherwise, we could write G = G1 G2 where G1 and G2 ∪ have a single common vertex x . Let yi Gi ,i = 1,2, be adjacent to x . Adding the edge y1 y2 creates a subdivision K of a forbidden∈ graph. Since K5 and K3,3 are 3-connected and since x and y1 y2 are the only connections between G1 and G2, the vertices of K of degree 3 must lie all in G1 or all in G2. Moreover, K must contain a path using both x and the≥ edge y1 y2. The subpath between x and the edge y1 y2 can be replaced by one of the two edges x y1 or x y2 to produce another subdivision of the same forbidden graph that does not use y1 y2, hence contained in G . This last contradiction proves the claim. Suppose that G has two vertices x , y such that G x , y is not connected. We − { } claim that x y is an edge of G . Otherwise, we could write G = G1 G2 where G1 and G2 are connected and only have the vertices x , y in common. G x∪ y must contain a subdivision K of a forbidden graph. As above, the degree three vertices∪ of K must all lie in the same subgraph, say G1. We could then replace the edge x y in K with a path connecting x and y in G2 to produce a subdivision of a forbidden graph contained in G1. We again reach a contradiction. We now assume for a contradiction that G is not 3-connected and we let x , y be two vertices disconnecting G . By the previous claim, we may write G = G1 G2 where ∪ 2.2. Kuratowski’s Theorem 18
G1 G2 reduces to the edge x y . By the same type of arguments used in the above ∩ claims we see that adding an edge to Gi (i = 1,2) creates a subdivision of a forbidden graph in the same Gi . We can thus apply the induction hypothesis and assume that each Gi is 3-connected, or has at most three vertices. By Proposition 2.2.4, both graphs are planar and we can choose a convex embedding for each of them. Let zi = x , y be a vertex of a face Fi of Gi bounded by x y . Note that Fi must be equal to the6 triangle zi x y . (Otherwise, we could add an edge to Gi inside Fi to obtain a larger planar graph.) Adding the edge z1z2 to G creates a subdivision K of a forbidden graph. We shall show that some planar modification of G1 or G2 contains a subdivision of a forbidden graph, leading to a contradiction.
If all the vertices of K of degree 3 were in G1, we could replace the path of K in ≥ G2 + z1z2 that uses z1z2 by one of the two edges z1 x or z1 y . We would get another subdivision of the same forbidden graph in G1. Likewise, G2 cannot contain all the vertices of K of degree 3. Furthermore, V (G1) x , y and V (G2) x , y cannot both contain two vertices≥ of degree 3 in K since\{ there would} be four\{ independent} paths between them, although G1 and≥ G2 are only connected through x , y and z1z2 in G + z1z2. For the same reason, K cannot be a subdivision of K5. Hence, K is a subdivision of K3,3 and five of its degree three vertices are in the same Gi . Adding a point p inside Fi and drawing the three line segments p x ,p y,p zi we would obtain a planar embedding of Gi + p x ,p y,p zi that contains a subdivision of K3,3. This last contradiction concludes the{ proof. }
Corollary 2.2.6. Every triangulation of the sphere with at least four vertices is 3-connected.
PROOF. By Euler’sformula it is seen that such a triangulation has a maximal number of edges. By the previous lemma, it must be 3-connected.
We end this section with a simple characterization of the faces of a 3-connected planar graph. A cycle of a graph G is induced if it is induced by its vertices, or equiva- lently if it has no chord in G . It is separating if the removal of its vertices disconnects G . The set of boundary edges of a face of a plane embedding is called a facial cycle.
Proposition 2.2.7. The face boundaries of a 3-connected plane graph are its non- separating induced cycles.
PROOF. Suppose that C is a non-separating induced cycle of a 3-connected plane 2 graph G . By the Jordan curve theorem R C has two components. Since C is non- separating one of the two components contains\ no vertices of G . This component is not cut by an edge since C has no chord. It is thus a face of G . Conversely, consider a face f of G . By Proposition 2.1.4 this face is bounded by a cycle C . If C had a chord e = x y then by the 3-connectivity of G there would be a path p connecting the two components of C x , y . However, p and e being in the 2 same component of R C (other than f ), they− { would} cross by an application of θ ’s lemma 2.1.3. Finally, consider\ two vertices x , y of G C . They are connected by three independent paths. By θ ’s lemma f is included in one− of the three components cut by these paths and the boundary of this component is included in the corresponding two paths. Hence, C avoids the third path. It follows that G C is connected. − 2.3. Other Planarity Characterizations 19
This proposition says that a planar 3-connected graph has essentially a unique plane embedding: if we realize the graph as a net of strings there are only two ways of dressing the sphere with this net; they correspond to the two orientations of the sphere.
2.2.2 The Minor Version A minor of a graph G is any graph obtained from a subgraph of G by contracting a subset of its edges. In other words, a minor results from any sequence of contraction of edges, deletion of edges or deletion of vertices (in any order). Equivalently, H is a minor of G if the vertices of H can be put into correspondence with the trees of a forest in G and if every edge of H corresponds to a pair of trees connected by a (non-tree) edge (but all such pairs do not necessarily give rise to edges). Being a minor of another graph defines a partial order on the set of graphs. This partial order is the object of the famous graph minor theory developed by Robertson and Seymour and culminating in the proof of Wagner’s conjecture that the minor relation is a well-quasi-order, i.e. that every infinite sequence of graphs contains two graphs such that the first appearing in the sequence is a minor of the other. As an easy consequence, every minor closed family of graphs is characterized by a finite set of excluded minors. In other words, if a family of graphs contains all the minors of its graphs, then a graph is in the family if and only if none of its minors belongs to a certain finite set of graphs. The set of all planar graphs is the archetypal instance of a minor closed family. Its set of excluded minors happens to be precisely the two Kuratowski graphs.
Theorem 2.2.8 (Wagner, 1937). A graph G is planar if and only if none of K5 or K3,3 is a minor of G .
Remark that if G contains a subdivision of H , then H is a minor of G , but the con- verse is not true in general (think of a counter-example). We can nonetheless deduce Wagner’s version from Kuratowski’s theorem: the condition in Wagner’s theorem is obviously necessary by noting that a minor of a planar graph is planar and by Theo- rem 2.1.7. The condition is also sufficient by the above remark and by Kuratowski’s theorem. In fact, the equivalence between Wagner and Kuratowski’s theorems can be shown by proving that a graph contains a subdivision of K5 or K3,3 if and only if K5 or K3,3 is a minor of this graph [Die05, Sec. 4.4].
2.3 Other Planarity Characterizations
We give some other planarity criteria demonstrating the fascinating interplay between Topology, Combinatorics and Algebra. An algebraic cycle of a graph G is any subset of its edges that induces an Eulerian subgraph, i.e. a subgraph of G with vertices of even degrees2. It is a simple exercise to prove that any algebraic cycle can be decomposed into a set of (simple) cycles in the usual acception. The set of (algebraic) cycles is given a group structure by defining the sum of two cycles as the symmetric difference of their edge sets. It can be considered
2An Eulerian subgraph in this sense is not necessarily connected. 2.3. Other Planarity Characterizations 20 as a vector space over the field Z/2Z and is called the cycle space, denoted by Z (G ) (the letter Z is short for the German word for cycle, Zyklus). The cycle space of a tree is trivial. Also, the cycle space is the direct sum of the cycle spaces of the connected components of G . Given a spanning tree of G , each non-tree edge gives rise to a cycle by joining its endpoints by a path in the tree. It is not hard to prove that these cycles form a basis of the cycle space. Hence, when G = (V, E ) is connected,
dimZ (G ) = 1 V + E (2.1) − | | | | This number is sometimes called the cyclomatic number of G . A basis of the cycle space is a 2-basis if every edge belongs to at most two cycles of the basis.
Theorem 2.3.1 (MacLane, 1936). A graph G is planar if and only if Z (G ) admits a 2-basis.
PROOF. It is not hard to prove that a graph that admits a 2-basis has a 2-basis composed of simple cycles only. See Exercise 2.3.2. Such a 2-basis must be the union of the 2-bases of the blocks in the block decomposition3 of G . Moreover, G is planar if and only if its blocks are. We may thus assume that G has a single block, or equivalently that G is 2-connected. Suppose that G is planar and consider the set B of boundaries of its bounded faces in a plane embedding. Every edge belongs to at most two such boundaries by Proposition 2.1.4. Furthermore, by the same proposition and the Jordan curve theorem, a simple cycle C of G is the sum of the boundaries of the faces included in the bounded region of C . Thus B generates Z (G ). Using Euler’s formula, the number of bounded faces of G appears to be precisely dimZ (G ). Hence, B is 2-basis. For the reverse implication, suppose that G has a 2-basis. Note that it is equivalent that any subdivision of G admits a 2-basis. Moreover, G e has a 2-basis for any edge e : if e appears in two elements of the 2-basis replace− these two elements by their sum, otherwise simply remove the basis element that contains e , if any. It follows that any subdivision of a subgraph of G has a 2-basis. We claim that none of the forbidden graphs can have a 2-basis, so that G is planar by Kuratowski’s theorem.
Indeed, assume the converse and let C1,...,Cd be a 2-basis of a forbidden graph. The P Ci ’s being linearly independent, Ci is non-trivial hence contains at least 3 edges. It P i follows that i Ci 2 E 3. From formula (2.1) we compute dimZ (K3,3) = 4. Since | | ≤ | | − P every cycle in a bipartite graph has length at least four, we have 1 i 4 Ci 4 4 = 16, P ≤ ≤ | | ≥ · in contradiction with i Ci 2 9 3 = 15. Similarly, we compute dimZ (K5) = 6, P | | ≤ · − P whence 1 i 6 Ci 6 3 = 18, in contradiction with i Ci 2 10 3 = 17. ≤ ≤ | | ≥ · | | ≤ · − Exercise 2.3.2. Show that a graph with a 2-basis admits a 2-basis whose elements are simple cycles. (Hint: Any algebraic cycle is a sum of edge-disjoint simple cycles. Try to minimize the total number of such simple cycles in the 2-basis.) A cut in a graph G = (V, E ) is a partition of its vertices. A cut can be associated with the subset of edges with one endpoint in each part. Just as for the cycle space, the set of
3The blocks of G are its subgraphs induced by the classes of the following equivalence relation on its set of edges: e e 0 if there is a cycle in G that contains both e and e 0. ∼ 2.3. Other Planarity Characterizations 21 cuts can be given a vector space structure over Z/2Z by defining the sum of two cuts as the symmetric difference of the associated edge sets. Equivalently, we observe that the sum of two cuts V1,V2 and W1,W2 is the cut (V1 W1) (V2 W2),(V1 W2) (V2 W1) . Remark that the{ cut space} is{ generated} by the elementary{ ∩ ∪ cuts∩ of the∩ form∪ v,V∩ v }, for v V . A cut is minimal if its edge set is not contained in the edge set of{ another− } cut. In∈ a connected graph minimal cuts correspond to partitions both parts of which induce a connected subgraph. Such minimal cuts generate the cut space.
Given a plane graph G , we define its geometric dual G ∗ as the graph obtained by placing a vertex inside each face of G and connecting two such vertices if their faces share an edge in G . Note that distinct plane embeddings of a planar graph may give rise to non-isomorphic duals. When the plane graph G is connected, its vertex, edge and face sets are in 1-1 correspondence with the face, edge and vertex sets of
G ∗ respectively. Note that the geometric dual of a plane tree has a single vertex, so that G ∗ may not be simple even if G is. It is not hard to prove that the set of edges of a (simple) cycle of G corresponds to a minimal cut in G ∗. The converse is also true since the dual of the dual is the original graph. For non-planar graphs the above construction is meaningless and we define an abstract notion of duality that applies in all cases. A graph G ∗ is an abstract dual of a graph G if the respective edge sets can be put in 1-1 correspondence so that every
(simple) cycle in G corresponds to a minimal cut in G ∗.
Theorem 2.3.3 (Whitney, 1933). A graph is planar if and only if is has an abstract dual.
The theorem can be proved by mimicking the proof of MacLane’s theorem 2.3.1, first showing that if a graph has an abstract dual so does its subgraphs and subdivisions. We provide a shorter proof based on MacLane’s theorem.
PROOF. The theorem can be easily reduced to the case of connected graphs. By the above discussion a geometric dual is an abstract dual, so that the condition is necessary. For the reverse implication, suppose that a graph G has an abstract dual G ∗. The cycle space of G is generated by its simple cycles, hence by the dual edge sets of the minimal cuts of G ∗. Those cuts are themselves generated by the elementary cuts. Clearly an edge appears in at most two elementary cuts (loop-edges do not appear in any cuts). It follows that the cycle space of G has a 2-basis, and we may conclude with MacLane’s theorem.
We list below some other well-known characterizations of planarity without proof. A strict partial order on a set S is a transitive, antisymmetric and irreflexive binary relation, usually denoted by <. Two distinct elements x , y S such that either x < y or y < x are said comparable. A partial order is a linear, or∈total, order when all the elements are pairwise comparable. The dimension of a partial order is the minimum number of linear orders whose intersection (as binary relations) is the partial order. The order complex of a graph G = (V, E ) is the partial order on the set S = V E where the only relations are v < e for v an endpoint of e . ∪ 2.4. Planarity Test 22
Theorem 2.3.4 (Schnyder, 1989). A graph is planar if and only if its order complex has dimension at most 3.
See Mohar and Thomassen [MT01, p. 36] for more details. The contact graph of a family of interior disjoint disks in the plane is the graph whose vertices are the disks in the family and whose edges are the pairs of tangent disks.
Theorem 2.3.5 (Koebe-Andreev-Thurston). A graph is planar if and only if it is the contact graph of a family of disks.
Section 2.8 in [MT01] is devoted to this theorem and its extensions. A 3-polytope 3 is an intersection of half-spaces in R which is bounded and has non-empty interior. Its graph, or 1-skeleton, is the graph defined by its vertices and edges.
Theorem 2.3.6 (Steinitz, 1922). A 3-connected graph is planar if and only if it is the graph of a 3-polytope.
A proof can be found in the monograph by Ziegler [Zie95, Chap. 4]. We end this section with a nice and simple planarity criterion relying on a result by Hanani (1934) stating that any drawing of K5 and of K3,3 has a pair of independent edges with an odd number of crossings. (Recall that two edges are independent if they do not share any endpoint.) In fact, we have the stronger property that the number of pairs of independent edges crossing oddly is odd. This can be proved by first observing the property on a straight line drawing of K5 (resp. K3,3) and then deforming any other drawing to the given one using a sequence of elementary moves that preserve4 the parity of the number of oddly crossing pairs of independent edges. Together with Kuratowski’s theorem, this proves the following
Theorem 2.3.7 (Hanani-Tutte). A graph is planar if and only if it has a drawing in which every pair of independent edges crosses evenly.
A weaker version of the theorem asks that every pair of edges, not necessarily independent, should cross evenly. See Mustafa’s course notes for a geometric proof, not relying on Kuratowski’s theorem.
2.4 Planarity Test
There is a long and fascinating story for the design of planarity tests, culminating with the first optimal linear time algorithm by Hopcroft and Tarjan [HT74] in 1974. Patrig- nani [Pat13] offers a nice and comprehensive survey on planarity testing. Although 4Those moves are of five types: (i) two edges locally (un)crossing and creating or canceling a bigon, (ii) an edge locally (un)crossing and creating or canceling a monogon, (iii) an edge passing over a crossing, (iv) an edge passing over a vertex, and (v) two consecutive edges around a vertex swapping their circular order. The three first moves are analogous to the Reidemeister moves performed on knot diagrams. (i),(ii), (iii) and (v) clearly preserve the number of oddly crossing pairs of independent edges.
For (iv) we use the fact that for every vertex and every edge of K5 or K3,3 the edge is independent with an even number of the edges incident to the vertex. 2.4. Planarity Test 23 most of the linear time algorithms have actual implementations, they are rather com- plex and we only describe a simpler non optimal algorithm based on works of de Fraissex and Rosensthiel [dFR85, Bra09]. We first recall that the block decomposition decomposes a connected graph into 2-connected subgraphs connected by trees in a tree structure. Hence, a graph is planar if and only if its blocks are planar. We can thus restrict the planarity test to 2-connected graphs. Note that the block decomposition of a graph can be computed in linear time using depth-first search. (See West [Wes01, p. 157].)
e1 e v 2 b2 t b1 1 b3
t2 t3 root
a. b. Figure 2.4: a. A graph (in blue) and a DFS tree in black. b. v is the branching point of a fork, b1 and b2 are two return edges for e1, b3 is a return edge for e2 and the lowpoint of e1 is t2. The back edges b1 and b2 are left and the back edge b3 is right.
Also recall that a depth-first search in a graph discovers its vertices from a root vertex by following edges that form a spanning tree called a depth-first search tree.
We say that a vertex v1 of that tree is higher than another vertex v2 if v1 is a descendent of v2. The non-tree edges are called back edges. A back edge always connects a vertex to one that is lower in the depth-first search tree. The depth-first search induces an orientation of the tree edges directed from the root toward the leaves of the tree. The back edges are then directed from their highest toward their lowest vertex. Each back edge b defines an oriented fundamental cycle, C (b ), obtained by connecting its endpoints with the unique tree path between its target and source points. We write uv for an edge directed from u to v . Two fundamental cycles may only intersect along a tree path, in which case the last edge uv along this path together with the outgoing edges v w1 and v w2 along the two cycles is called a fork with branching point v .A back edge v w is a return edge for itself and for every tree edge x y such that w is lower than x , and v is either higher than y or equal to5 y . The return points of an edge are the targets of its return edges. The lowpoint of the edge is its lowest return point, if any, or its source if none exists. The lowpoint of a back edge is thus its target point. We refer to Figure 2.4 for an illustration of all these concepts. The idea of the planarity test is as follows. Suppose that a graph G has a plane embedding and consider a depth-first search tree of G . Without loss of generality,
5a vertex is neither higher nor lower than itself! 2.4. Planarity Test 24 we may assume that the root is adjacent to the outer face of the plane embedding. The induced orientation of each fundamental cycle may appear clockwise or counter- clockwise with respect to the embedding of G . A back edge is said right (with respect to the embedding) if its fundamental cycle is oriented clockwise, and left otherwise.
Consider a fork with outgoing edges e1,e2. They must have return edges since the graph is 2-connected. Then we have the following necessary conditions:
Fork condition:
1. All return edges of e1 whose lowpoints are higher than the lowpoint of e2 have fundamental cycles oriented the same way and
2. all return edges of e2 whose lowpoints are higher than the lowpoint of e1 have fundamental cycles oriented the other way.
e e2 e2 e1 1 e2 e2
e1 e1
b b2 b1 b2 b2 root root root root a. b. c. d. Figure 2.5: a. and c. The two cases occurring in the fork condition. b. a forbidden case. d. in this case, one chooses e2 e1. ≺
Lemma 2.4.1. In a plane embedding, the orientations of the return edges satisfy the fork condition.
PROOF. Let us denote by bi the return edge having the same lowpoint as ei . Then either the disks bounded by C (b1) and C (b2) have disjoint interior, or one is included in the other:
In the latter case, swapping the indices 1 and 2 if necessary, we may assume • that e1 is inside C (b2). This is pictured in Figure 2.5a. Then any return edge of e1 must also be inside the disk bounded by C (b2), and thus be oriented as b2. In particular, b1 is oriented as b2 and e2 is outside C (b1). It follows that any return edge of e2 must lie outside C (b1). Furthermore, a return edge b from e2 having lowpoint higher than the one of b1 must also lie outside C (b2), since otherwise C (b ) could not join its lowpoint without crossing C (b1). Now, the cycle C (b ) cannot contain the root in its interior as on Figure 2.5b, since the root is on the
outer face. We infer that b is oriented oppositely to b2. The fork condition is thus satisfied. 2.4. Planarity Test 25
In the former case, any return edge b of e1 must lie outside C (b2). See Figure 2.5c. • If the lowpoint of b is higher than that of b2, then b must be oriented oppositely to b2, since C (b ) cannot contain the root in its interior. The mirror argument shows that a return edge from e2 whose lowpoint is higher than the lowpoint of b1 must be oriented oppositely to b1. We again conclude that the fork condition is satisfied.
An LR partition is a left-right assignment of the back edges such that the induced orientations of the fundamental cycles satisfy the fork condition for all the possible forks. The above lemma shows that a planar graph has an LR partition deduced from any particular plane embedding. As the following theorem shows, the existence of an LR partition happens to be sufficient for attesting planarity!
Theorem 2.4.2 (de Fraysseix and Rosenstiehl, 1985). A connected graph G is planar if and only if it admits an LR partition with respect to some (and thus any) depth-first search tree.
PROOF (SKETCH). Essentially, the proof starts by constructing a combinatorial em- bedding of G from the LR partition, i.e. a circular ordering of the edges around each vertex, then checking that this combinatorial embedding can indeed be realized in the plane without introducing crossings. Note that the fork conditions cannot involve back edges in different blocks in the block decomposition of G , so that we can assume G to be 2-connected by the above discussion. For each vertex v we define a total ordering on its outgoing edges as follows. If v is the root, it can have only a single outgoing≺ edge by the 2-connectivity of G and there is nothing to do. Otherwise, v has a unique incoming tree edge e and the total ordering will correspond to the circular clockwise ordering around v broken at e into a linear ordering. Let e1,e2 be two edges going out of v , and for i = 1,2, let bi be equal to ei if ei is a return edge, or a return edge of ei with the lowest return point (there might be several ones) among its return edges. We need to decide if e1 e2 or the opposite. The idea is that in any plane drawing of the graph, the ordering≺ of e1 and e2 is enforced by the LR-assigment of b1 and b2.
If b1 is a left back edge while b2 is a right back edge, then we declare e1 e2 since • it must be the case in any plane drawing of G that respects the LR assignment≺ (as in Figure 2.5c).
If b1 and b2 are both right back edges we let e2 e1 if either the lowpoint of b2 is • lower than the lowpoint b1 (as in Figure 2.5a),≺ or if e1 has another right return edge towards another return point (as in Figure 2.5d). By the fork condition, it is
impossible for both e1 and e2 to have another right return edge towards another return point, so this is well-defined.
If b1 and b2 are both left back edges, the previous situation leads to the opposite • decision.
If none of this applies, we order them arbitrarily. • 2.4. Planarity Test 26
There remains to include the incoming return edges in this ordering. Let e1 e2 ≺ ≺ e` be the resulting ordering of the edges going out of v . We denote by L(ei ) and ··· ≺ R(ei ) the left and right incoming back edges whose source points are in the subtree rooted at the target of ei , or equivalently whose fundamental cycles contain ei . We order the elements of L(ei ) as follows: we let b1 b2 if and only if the fork of their ≺ cycles C (b1) and C (b2) has outgoing edges a2 a1. An analogous ordering is defined ≺ for R(ei ). We finally concatenate all those orderings as follows, the rationale is pictured in Figure 2.6:
L(e1) e1 R(e1) L(e2) e2 L(e`) e` R(e`) ≺ ≺ ≺ ≺ ≺ ··· ≺ ≺ ≺
R(e1)
L(e2) e1 e2 L(e1)
R(e2)
Figure 2.6: Ordering the incoming return edges.
For the root vertex we define the ordering L(e ) e R(e ) where e is the unique outgoing edge of the root and L(e ),R(e ) and their ordering≺ ≺ are defined similarly as above. It remains to prove that the computed orderings define a planar combinatorial embedding. To this end, we first embed the depth-first search tree into the plane by respecting the computed orderings. This is obviously always possible. We then insert a small initial and final piece for each back edge in its place while respecting the circular orderings and without introducing crossings. Consider a simple closed curve C that goes along the embedding of the depth-first search tree, staying close to it. Each inserted back edge piece intersects C in a single point. Those points are paired according to the back edge to which they belong. We claim that the constructed order- ings are such that the list of intersections along C is a well parenthesized expression. To see this we just need to prove that any two pairs of points appear in the good order (not interlaced) along C . There are two cases to consider: the pair corresponds to back edges, say b1, b2, that are either on the same side, or on opposite sides. Suppose for instance that b1 and b2 are both right edges. If they have the same lowpoint then the constructed orderings implies that their initial and final pieces indeed appear in the good order along C . Similar arguments hold for the other cases. It follows from the claim that we can connect all the paired pieces without introducing crossings, thus proving that G has a plane embedding.
In order to test if G has an LR partition we can first compute a constraint graph whose nodes are the back edges and whose links are 2-colored constraints: the blue 2.5. Drawing with Straight Lines 27
links connect nodes that must be on the same side and the red links connect nodes that must lie on opposite sides. All the links are obtained from the fork conditions. This graph can easily be constructed in quadratic time with respect to the number of edges of G . It remains to contract the blue links and check if the resulting constraint graph is bipartite to decide if G has an LR partition or not. This can clearly be done in quadratic time.
2.5 Drawing with Straight Lines
Proposition 2.2.4 together with Lemma 2.2.5 show that every planar graph has a straight line embedding. One of the oldest proof of existence of straight line embeddings is credited to Fáry [Fár48] (or Wagner, 1936) and does not rely on Kuratowski’s theorem. By adding edges if necessary we can assume given a maximally planar graph G , so that adding any other edge yields a non-planar graph. Every embedding of G is thus a triangulation, since otherwise we could add more edges without breaking the planarity. We show by induction on the number of vertices that any (topological) embedding of G can be realized with straight lines. Choose one embedding. By Euler’s formula, G has a vertex v of degree at most 5 that is not a vertex of the unbounded face (triangle) of the embedding. Consider the plane triangulation H obtained from that of G by first deleting v and then adding edges (at most two) to triangulate the face of G v that contains v in its interior. By the induction hypothesis, H can be realized with− straight lines. We now remove the at most two edges that were added and embed v in the resulting face. Since the face is composed of at most 5 edges, it must be star-shaped and we can put v in its center to join it with line segments to the vertices of the face. We obtain this way a straight line embedding of G . There is another proof of Proposition 2.2.4 due to Tutte [Tut63] that actually pro- vides an algorithm to explicitly compute a convex embedding of any 3-connected planar graph G = (V, E ). The algorithm can be interpreted by a physical spring-mass system. Consider a facial cycle C of G (recall that those are determined by Proposi- tion 2.2.7) and nail its vertices in some strictly convex positions onto a plane. Connect every other vertex of G , considered as a punctual mass, to its neighbors by means of springs. Now, relax the system until it reaches the equilibrium. The final position provides a convex embedding! The system equilibrium corresponds to a state with minimal kinetic energy. By differentiating this energy one easily gets a linear system of equations where each internal vertex in VI := V V (C ) is expressed as the barycenter of its neighbors. The barycentric coefficients are\ the stiffnesses of the springs. In practice, we associate with every edge e in E E (C ) a positive weight (stiffness) λe . In \ fact, if u and v are neighbor vertices it is not necessary that λuv = λv u . One may use “oriented” stiffness. Formally, we have
Theorem 2.5.1 (Tutte, 1963). Every strictly convex embedding of the vertices of C ex- 2 tends to a unique map τ : V R such that for every internal vertex v , its image τ(v ) → is the convex combination of the image of its neighbors N (v ) with weights λv w , for w N (v ): ∈ X v VI , λv w (τ(v ) τ(w )) = 0. (2.2) ∀ ∈ w N (v ) − ∈ 2.5. Drawing with Straight Lines 28
Moreover, τ induces a convex embedding of G by connecting the images of every pair of neighbor vertices with line segments.
For conciseness, we number the vertices in VI from 1 to k and the vertices of C from k +1 to n (hence, k = VI and n = V ). We also write λi j for the weight of edge i j | | | | and denote by N (i ) the set of neighbors of vertex i . We finally put λi j = 0 for j N (i ). We follow the proof from [RG96] and from the course notes of Éric Colin de Verdière6∈ http://www.di.ens.fr/~colin/cours/all-algo-embedded-graphs.pdf.
Lemma 2.5.2. If G is connected, the system (2.2) has a unique solution.
PROOF.(2.2) can be written P τ1 j >k λ1j τj . . Λ . = . P τk j >k λk j τj where τi stands for τ(i ) and Pn j 1 λ1j λ12 ... λ1k = P−n − λ21 j 1 λ2j ... λ2k Λ = = − . . .. − . . . Pn λk1 λk2 ... j 1 λk j − − = k We need to prove that Λ is invertible. Let x R such that Λx = 0 and let xi be one ∈ of its components with maximal absolute value. We set xk+1 = xk+2 = ... = xn = 0. Since Λx P λ x x 0 and λ > 0 for j N i we infer that x x for ( )i = j N (i ) i j ( i j ) = i j ( ) j = i ∈ − ∈ j N (i ). By the connectivity of G , all the x j , j = 1,...,n, are null. We conclude that Λ is∈ non-singular.
In the sequel, we refer to τ as Tutte’s embedding. We also assume once and for all that G is 3-connected. Remark 2.5.3. Since the weights are positive the Tutte embedding of every internal vertex is in the relative interior of the convex hull of its neighbors. In particular, this remains true for the projection of the vertex and its neighbors on any affine line. We shall derive a maximal principal from this simple remark. Let K be a cycle of G . By Proposition 2.2.7, G has a unique embedding on the sphere (up to change of orientation) and its faces can be partitioned into two families corresponding to the two connected components of the complement of K . The vertices of G K incident to a face in the part that does not contain C are said interior to K . −
2 Lemma 2.5.4 (Maximum principle). Let h be a non-constant affine form over R such that the Tutte embedding of K is included in the half-plane h 0 and such that at most two vertices of K are on the line h = 0 . Then each vertex{ v≤interior} to K satisfies h(τ(v )) < 0. { } 2.5. Drawing with Straight Lines 29
PROOF. Consider a vertex v interior to K that maximizes h and suppose for a contradiction that h(τ(v )) 0. Let H be the subgraph of G induced by the vertices interior to K and let Hv be≥ the component of v in H . By the above Remark 2.5.3, all the neighbors w N (v ), which are either interior to K or on K , must satisfy ∈ h(τ(w )) = h(τ(v )). Hence, the Tutte embedding of Hv is included in h 0 . Since G is 3-connected, Hv must be attached to K by at least three vertices. These{ ≥ attachment} vertices are embedded in h 0 and at least one of them, call it u, is embedded in { ≤ } h < 0 since at most two are on h = 0 . Remark 2.5.3 applied to any vertex of Hv adjacent{ } to u then leads to a contradiction.{ }
Corollary 2.5.5. The Tutte embedding of every internal vertex lies in the interior of the convex hull of the given strictly convex embedding of C .
PROOF. By the maximum principle, every half-plane that contains C contains the interior vertices in its interior.
2 Let h be a nonzero linear form over R . A vertex of G whose Tutte’s embedding is aligned with the Tutte embedding of its neighbors in the direction of the kernel of h is said h-passive, and h-active otherwise.
Lemma 2.5.6. Let h be a non-trivial linear form and let v be an h-active interior vertex. G contains two paths U (v,h) and D (v,h) such that
1.U (v,h) := v0, v1,... vb joins v = v0 to a vertex vb of C and h is strictly increasing along U (v,h), i.e. h(τ(vj +1)) > h(τ(vj )) for 1 j < b . ≤ 2.D (s,h) joins v to a vertex of C and h is strictly decreasing along D (s,h).
PROOF. Since v is h-active, Remark 2.5.3 implies the existence of some neighbor w with h(τ(w )) > h(τ(v )). If this neighbor is on C then we may set U (v,h) = v w . Otherwise, w is itself h-active and we can repeat the process until we reach a vertex of C , thus defining the path U (v,h). An analogous construction holds for the downward path D (s,h).
Lemma 2.5.7. For every non-trivial linear form h, all the interior vertices are h-active.
PROOF. By way of contradiction, suppose that some interior vertex v is h-passive. By Lemma 2.5.5, some vertex w of C satisfies h(τ(w )) > h(τ(v )). SinceG is 3-connected, we can choose three independent paths P1,P2,P3 from v to w . For i = 1,2,3, let Qi be the initial segment of Pi from v to the first h-active vertex wi along Pi . Remark that Qi has at least one edge and that it is contained in the line h = h(τ(v )) . By { } Lemma 2.5.6, we can choose two paths U (wi ,h) and D (wi ,h) from wi to vertices on C . By the preceding remark, the three paths Qi , U (wi ,h) and D (wi ,h) are pairwise dis- joint except at wi . Using that Q1,Q2,Q3 only share their initial vertex v , it is easily seen that C i =1,2,3 (Qi P (wi ,h) D (wi ,h)) contains a subdivision of K3,3, in contradiction with Kuratowski’s∪ ∪ theorem.∪ 2.5. Drawing with Straight Lines 30
Recall that G is supposed to have a plane embedding with facial cycle C . Using the stereographic projection if necessary, we may assume that C is the facial cycle of the unbounded face. We temporarily assume that all facial cycles of G , except possibly C , are triangles.
Lemma 2.5.8. Let uv x and uv y be the two facial triangles incident to an edge uv of G not in C , then τ(x ) and τ(y ) are on either sides of any line through τ(u) and τ(v ).
PROOF. Note that we do not assume τ(v ) = τ(u) in the lemma. Let h be a linear form whose kernel has the direction of a line ` through6 τ(u) and τ(v ). By Lemma 2.5.6, there are two paths U (u,h) and U (v,h) embedded strictly above ` connecting respectively u and v to C . We can extract from uv U (u,h) U (v,h) a cycle K above ` with only u and v on `. By the maximum principle,{ }∪ all the vertices∪ interior to K are embedded strictly above `. One of the faces uv x and uv y must be contained in the interior of K , so that either τ(x ) or τ(y ) is strictly above `. An analogous argument using D (u,h) and D (v,h) shows that one of τ(x ) or τ(y ) is strictly below `.
Corollary 2.5.9. All facial triangles uv w are non-degenerate, i.e. τ(u),τ(v ) and τ(w ) are pairwise distinct.
PROOF. By Corollary 2.5.5 all the triangles with an edge in C are non-degenerate. By Lemma 2.5.8 all their adjacent triangles are themselves non-degenerate and by connectivity of the dual graph, all the triangles are non-degenerate.
Corollary 2.5.10. If all the facial triangles other than C are triangles the Tutte embed- ding indeed induces a straight line embedding of G .
PROOF. Since all the facial triangles are non-degenerate, it is enough to prove that their embeddings have pairwise disjoint interiors. Let p be a point contained in the interior of the embedding of some triangle t . Consider a ray r issued from p that avoids all the embeddings τ(V ) of the vertices of G . This half-line crosses some edge e0 of t0 := t . By Lemma 2.5.9 the other triangle t1 incident to e0 crosses r on the other side of t0, away from p. In turn, r crosses another edge e1 of t1 and we define t2 as the other incident triangle. This way we define a sequence of interior disjoint triangles t0, t1,..., ti and edges e0,e1,...,ei all crossed by r , each time further away from p until we hit C , i.e. ei belongs to C . Remark that ti only depends on r as it is the unique triangle incident to the intersection of r and C . Let t 0 be another triangle that contains p in its interior. It gives rise to another sequence t00 = t 0, t10,..., t j0 of triangles crossed by r . By the preceding remark, ti = t j . Since the preceding triangles are defined unambiguously, we conclude that the two sequences are equal. In particular t = t 0.
PROOFOF TUTTE’STHEOREM. This last corollary concludes the proof of Tutte’s the- orem 2.5.1 when all facial cycles other than C are triangles. When this is not the case, we can triangulate the faces other than C , adding m 3 edges in each face of length − 2.5. Drawing with Straight Lines 31
m to obtain a planar graph G 0 with the above property. It is possible to put weights on the edges of G 0, including those of G , so that the solution for system (2.2) written for G 0 is the same as for the initial system for G . This is a consequence of Remark 2.5.3 and of the next exercise. By Corollary 2.5.10, Tutte’s embedding provides a straight line embedding of G 0. Removing the extra edges, we obtain a straight line embedding of G . It remains to observe that each face of this embedding is convex since by Lemma 2.5.7 and Remark 2.5.3, the angle at every vertex of a face is smaller than π.
Exercise 2.5.11. Let p be a point interior to the convex hull of a finite point set P . Show that p is a convex combination of the points of P with strictly positive coefficients only. (Hint: the convex hull of P p is star-shaped with respect to p.) ∪ { } One may wonder whether the barycentric method of Tutte could be extended in three dimensions in order to embed a triangulated 3-ball given a convex embedding of its boundary. However, É. Colin de Verdiére et al. gave counterexamples to such an extension showing that expressing each interior vertex as the barycenter of its neighbors does not always yield an embedding [CdVPV03]. 3
Surfaces and Embedded Graphs
Contents 3.1 Surfaces...... 32 3.1.1 Surfaces and cellularly embedded graphs...... 32 3.1.2 Polygonal schemata...... 35 3.1.3 Classification of surfaces...... 36 3.2 Maps...... 39 3.3 The Genus of a Map...... 43 3.4 Homotopy...... 45 3.4.1 Groups, generators and relations...... 46 3.4.2 Fundamental groups, the combinatorial way...... 46 3.4.3 Fundamental groups, the topological way...... 50 3.4.4 Covering spaces...... 52
3.1 Surfaces
3.1.1 Surfaces and cellularly embedded graphs A surface is a Hausdorff and second countable topological space that is locally homeo- morphic to the plane : that means that every point has a neighborhood homeomorphic 2 to R . Recall that a space is Hausdorff if every pair of distinct points have disjoint neighborhood and is second countable if it admits a countable base of open sets. In this course, we will only deal with compact surfaces, and will generally consider surfaces up to homeomorphism, which is why we say “the sphere” instead of “a sphere”.
32 3.1. Surfaces 33
Figure 3.1: The sphere, the torus and the Klein bottle.
2 2 2 Examples of surfaces include the sphere S , the torus T , or the Klein Bottle K , see Figure 3.1. Note that so far, we have not proved that they are different. We em- phasize that surfaces are defined intrinsically, i.e., they do not have to be embedded 3 3 in R . For example, the Klein bottle cannot be embedded in R : as in Figure 3.1, any representation of it in the usual space induces self-crossings. But this does not prevent it from being a surface : it is behaved locally like the plane which is all that matters here. Exercise 3.1.1. Consider two copies of the sphere and identify all the corresponding points in the two copies, except for the North pole N . Formally, the resulting space 2 2 is S 0,1 / , where (s,0) (s,1) for all s S N . Show that this space is locally homeomorphic× { } ∼ to the plane∼ but that it is not∈ Hausdorff.\{ } Exercise 3.1.2. Show that the plane is second countable. Deduce that a compact space locally homeomorphic to the plane is second countable. Following our approach outlined in the panorama, we will study surfaces by decom- posing them into fundamental pieces, which can be seen as the faces of an embedded graph. Analogously to the planar case, an embedding of a graph G into a topological surface Σ is an image of G in Σ where the vertices correspond to distinct points and the edges correspond to simple arcs connecting the image of their endpoints, such that the interior of each arc avoids other vertices and arcs. We first remark that G can always be embedded in some surface. To see this, we can make a drawing of G in the plane and introduce a small handle at every edge intersection as on Figure 3.2 to obtain an embedding.
Figure 3.2: A plane drawing of K3,3 with a crossing and an embedding in a genus 1 surface.
The faces of an embedding are the connected components of S G . A graph is cellularly embedded on S if it is embedded and all its faces are homeomorphic\ to a disk, see Figure 3.3. Thus, describing a cellularly embedded graph amounts to describing a combinatorial way to obtain a surface, by gluing disks together, and one 3.1. Surfaces 34
Figure 3.3: The complement of the graph in the surface is a disjoint union of open discs. can classify surfaces by studying the various possibilities. The following theorem shows that this approach loses no generality:
Theorem 3.1.3 (Kerékjártó-Radó). On any compact surface, there exists a cellularly embedded graph.
Since disks can be triangulated, this is equivalent to saying that any compact surface can be triangulated, which is the way this theorem is generally stated in the literature.
PROOF. (Sketch) The result is obvious when the surface, call it S, is a sphere, so we assume this is not the case. Since S is compact and locally planar, it can be covered by a finite number of closed disks Di , and up to the removal of the superfluous ones, we can assume that no disk lies in the union of any others. Then, if these disks intersect nicely enough (for example if two different boundaries ∂ D and ∂ D 0 intersect in a finite number of points), one obtains a finite number of components in S ∂ Di . One can easily show that each of these is a disk (because S is not a sphere!), and\ ∪ therefore one obtains a cellular graph by taking as vertices the intersection points, and as edges the arcs of circles. So it suffices to show that one can assume that the disks intersect nicely. This can be done by repeated applications of the Jordan-Schoenflies Theorem, but it requires significant work. We refer to Thomassen [Tho92] or Doyle and Moran [DM68] for more details.
Remark: The issue in this (non-)proof due to a possible infinite number of con- nected components might look like a mere technicality which one can obviously fix. However, we argue that there is a real difficulty lurking there, because the higher dimensional theorem is false: there exists a 4-manifold (A topological space locally 4 1 homeomorphic to R that can not be triangulated , see for example Freedman [Fre82].
As in the planar case, a triangulation is a cellular embedding of a graph where all the faces have degree 3.A subdivision of a (triangular) face F is obtained by adding a vertex v inside the face, and adding edges between the new vertex v and all the vertices on F , or by adding a vertex w in the middle of an edge and adding edges between w
1On a first approximation, it means that it can not be built from a finite number of balls. More formally, it can not be realized as a simplicial complex, which we will introduce later on in the course. 3.1. Surfaces 35 and the non-adjacent vertices in the at most two incident faces. A triangulation is a refinement of another triangulation if it is obtained by repeated subdivisions. The same techniques can also be used to prove the following theorem:
Theorem 3.1.4 (Hauptvermutung in 2 dimensions). Any two triangulations on a given surface have a common refinement.
We refer to Moise [Moi77] for a proof. As the name indicates (“main hypothesis” in German ), this was widely believed to be true in any dimension, but once again counterexamples were found in dimensions 4 or higher (see for example [RCS+97]).
3.1.2 Polygonal schemata
b d d a aa cc a cc a b c b d b d Figure 3.4: From the polygonal scheme a b c b¯ , c¯ d a¯d¯ to a cellular embedding. { } In order to classify surfaces, we introduce polygonal schemata, which are a way of encoding the combinatorial data of a cellularly embedded graph : it describes a finite number of polygons with oriented sides identified in pairs. We will see later on, in Section 3.2, other avatars of this combinatorial description of a cellularly embedded graph. Formally, let S be a finite set of symbols, and denote by S¯ = s¯ s S . Then a polygonal scheme is a finite set R of relations, each relation being{ a non-empty| ∈ } word in the alphabet S S¯, so that for every s S, the total number of occurences of s or s¯ in R is exactly two.∪ ∈ Starting from a cellularly embedded graph it induces a polygonal scheme in the following way: we first name the edges and orient them arbitrarily. Then for every face, we follow the cyclic list of edges around that face, with a bar if and only if an edge appears in the wrong direction. Every face gives us a relation of R and since every edge is adjacent to exactly two faces, possibly the same, we obtain a polygonal scheme. Conversely, starting from a polygonal scheme, for each relation of size n we build a polygon with n sides, and label its sides following the relation (with the bar indicating the orientation). Then, once all the polygons are built, we can identify the edges labelled with the same label taking the orientations into account. See Figure 3.4. Exercise 3.1.5. The topological space obtained this way is a compact surface. Thus, polygonal schemes and cellularly embedded graphs are two facets of the same object. Furthermore, by Theorem 3.1.3, every surface has a cellularly embedded graph, and thus can be obtained by some polygonal scheme. We leverage on this to classify surfaces. 3.1. Surfaces 36
3.1.3 Classification of surfaces
Theorem 3.1.6. Every compact connected surface is homeomorphic to a surface given by one of the following polygonal schemata, each made of a single relation:
1.a a¯ (the sphere), ¯ 2.a 1b1a¯1b1 ...ag bg a¯g bg for some g 1, ≥ 3.a 1a1 ...ag ag for some g 1. ≥
Figure 3.5: The orientable surface of genus 3 and the non-orientable surface of genus 3.
In the second case, the surface is said to be orientable, while in the third case it is non-orientable. The integer g is called the genus of the surface (by convention g = 0 for the sphere). In the orientable case, the genus quantifies the number of holes of a surface : an orientable surface of genus g can be built by adding g handles to a sphere. A non-orientable surface of genus g can be built by cutting out g disks of a sphere and gluing g Möbius bands along their boundaries. See Figure 3.5.
PROOF. We follow the exposition of Stillwell [Sti93]. Let S be a compact connected surface, and let G be a graph cellularly embedded on S, which exists by Theorem 3.1.3. Whenever an edge of G is adjacent to two different faces, we remove it. Whenever an edge of G is adjacent to two different vertices, we contract2 it. When this is done, we obtain a cellularly embedded graph G 0 with a single face and a single vertex. If there are no more edges, then by uncontracting the single vertex into two vertices linked by an edge, we are in case 1 of the theorem and the surface is a sphere. Therefore we can now assume that there is at least one edge.
The graph G 0 induces a polygonal scheme consisting of a single relation. We will show that this relation can be transformed into either case 2 or case 3 of the theorem without changing the homeomorphism class of S.
2The contraction is not meant in the graph-theoretical sense introduced in the earlier chapter : it might result in loops and multiples edges, which we keep. 3.1. Surfaces 37
P P P
b b Q a a a a a
Q Q b Figure 3.6: From aP aQ to b b PQ¯ . b b P Q P Q
c a a a a aa
S R S R b b c c c
a a a d d d S R S R PSRQ Q Q P P
c c c Figure 3.7: From aP bQaR¯ bS¯ to c d c¯d¯ P SRQ.
If the polygonal scheme has the form aP aQ where P and Q are possibly empty • words, then we can transform it into b b PQ¯ by adding a new edge and removing a, see Figure 3.6. Inductively, we conclude that each pair of symbols with the same orientation appears consecutively in the polygonal scheme.
If the polygonal scheme has the form aU aV¯ , then U and V must share an • edge b since otherwise G 0 would have more than one vertex. By the preceding step, b must appear in opposite orientations in U and V , so we have the form ¯ ¯ aU aV¯ = aP bQaR¯ bS. This can be transformed into d c d c¯ P SRQ, as pictured in Figure 3.7. Inductively, at the end of this step the relation is a concatenation of blocks of the form aa or a b a¯b¯ . If all the blocks are of one of these types, we are in case 2 or 3 and we are done.
Otherwise, the relation has a subword of the form aa b c b¯ c¯. This can be trans- • formed into d¯c¯b¯ d¯b¯ c¯, and then using the first step again this can be transformed into e e f f g g . Inductively, we obtain a relation of the form 3.
This concludes the proof. 3.1. Surfaces 38
a c d c a c a d a a b c b b b d
b c b c Figure 3.8: From aa b c b¯ c¯ to d¯c¯b¯ d¯b¯ c¯.
Let G be a graph cellularly embedded on a compact surface. The Euler character- istic of this embedding equals v e + f , where v is the number of vertices, e is the number of edges and f is the number− of faces of the embedded graph.
Lemma 3.1.7. The Euler characteristic of a graph G cellularly embedded on a surface S only depends on the surface S.
ROOF P . Let G and G 0 be two cellular embeddings on the same surface S. Since triangulating faces does not change the Euler characteristic, one can suppose that they are triangulated. By Theorem 3.1.4, they have a common refinement. Since subdividing faces does not change the Euler characteristic, this proves the Lemma.
The Euler characteristic of the surfaces in Theorem 3.1.6 are readily computed from their polygonal schemes: for the sphere we obtain two, for the orientable surfaces 2 2g and for the non-orientables ones 2 g . Therefore the orientable surfaces are all pairwise− non-homeomorphic, as are the non-orientable− ones. Can orientable surfaces be homeomorphic to non-orientable ones?
Lemma 3.1.8. A surface S is orientable if and only if it has a cellularly embedded graph G such that the boundary of its faces can be oriented so that each edge gets two opposite orientations by its incident faces.
PROOF. If the surface S is orientable, then it can be obtained by a polygonal scheme of type 2, for which the boundaries of the faces can be oriented as the lemma requires. If the surface is non-orientable, then any cellularly embedded graph G has a common refinement with one having a polygonal scheme of type 3. Observing that such a graph can not be oriented as the lemma requires, and that this property is maintained when refining, this proves the lemma.
Corollary 3.1.9. Orientable surfaces are not homeomorphic to non-orientable ones.
Therefore, we have established that all the surfaces in Theorem 3.1.6 are pairwise non-homeomorphic. Conversely, any pair of connected surfaces with the same ori- entability (as defined by Lemma 3.1.8) and Euler characteristic are homeomorphic. 3.2. Maps 39
Remark: This classification of surfaces can be extended to the setting of surfaces with boundary: a surface with boundary is a topological space where every point is locally homeomorphic to either the plane or the closed half-plane. The boundary of such a surface is the set of points that have no neighborhood homeomorphic to the plane. One can show that up to homoemorphism, in line with the above classification, surfaces with boundaries are classified by their genus, their orientability and the number of boundaries (i.e., connected components of the boundary). One way to obtain this is on the one hand to observe that the number of boundaries is a topological invariant, and on the other hand that by gluing disks on the boundaries of a surface with boundary, one obtains a surface without boundary, for which the usual classification applies. The Euler characteristic of the orientable, respectively non-orientable surface of genus g with b boundaries is 2 2g b , respectively 2 g b . − − − − 3.2 Maps
To make things simpler we shall restrict ourselves from now on to orientable surfaces. Up to homeomorphism, a cellular embedding of a graph can be described by the graph itself together with the circular ordering of the edges incident to each vertex. These are purely combinatorial data referred to as a rotation system, a cellular embedding (of a graph), a combinatorial surface, a combinatorial map, or just a map. The theory of combinatorial maps was developed from the early 1970’s, but can be traced back to works of Heffter [Hef91, Hef98] and Edmonds [Edm60] for the combinatorial de- scription of a graph embedded on a surface. The notion of combinatorial map relies on oriented edges rather than just edges. An oriented edge is also called an arc or a half-edge. Formally, a combinatorial map is a triple (A,ρ,ι) where A is a set of arcs, • ρ : A A is a permutation of A, • → ι : A A is a fixed point free involution. • → This data allows to recover the embedded graph easily: its vertices correspond to the orbits, or cycles (of the cyclic decomposition), of ρ and its edges correspond to the orbits of ι (so that a and ι(a) correspond to the two orientations of a same edge). The source vertex of an arc is its ρ-orbit. We shall often write a¯ for ι(a). There are two basic ways of visualizing the corresponding cellular embedding. One way consists in placing 3 disjoint disks in the x y -plane of R , one for each vertex, then attaching rectangular 3 strips to the disks, with one strip per edge. The strips should expand in R so that they do not intersect. The counterclockwise ordering of the strips attached to a disc should coincide with the cycle of ρ defining the corresponding vertex. See Figure 3.9 for an illustration. The resulting ribbon graph is topologically equivalent to a surface with boundary. Finally glue a disk along each boundary component to a obtain a closed surface where the graph is cellularly embedded. Note that the boundary of each face, traversed with the face to the right, visits the arcs according to the permutation ϕ := ρ ι. The ϕ-orbits are called facial walks. A facial walk need not be simple as can be seen◦ on Figure 3.3. Note that this construction is dual to the concept of polygonal 3.2. Maps 40
h f g a ρ d e c b ρ
Figure 3.9: A cellular embedding associated to the map (A,ρ,ι) with A = a, b, c ,d ,e , f ,g ,h , ρ = (a, b, c ,e )(g ,d ,h, f ) and ι = (a, b )(c ,d )(e , f )(g ,h). The cor- responding{ graph has} a loop edge and a multiple edge. scheme that we saw earlier : another way of visualizing the cellular embedding is to draw one polygon per facial walk, marking its sides with the arcs of the orbit. Then glue the sides of the polygons that correspond to oppositely oriented arcs (related by the involution ι). Figure 3.10 illustrates this second construction. The numbers
e d h g f g h a f ρ d e c a c b ρ
b
Figure 3.10: Left, the same map as above. Middle, the facial walks of ϕ = (a, c ,h,d ,e ,g , f )(b ). Right, the resulting graph embedding.
V , E , F of vertices, edges and faces of the resulting surface are thus given by the |number| | | | of| cycles of the permutations ρ,ι and ϕ respectively. Obviously, the number of cycles of the involution ι is just E = A /2. The Euler characteristic of this surface can then be computed by the formula| | | |
χ = V E + F . | | − | | | | Basic operations on maps. The contraction or deletion of an edge in a graph ex- tend naturally to embedded graphs. Given a map M = (A,ρ,ι) with graph G , the contraction of a non-loop edge e = a,a¯ in G leads to a new map M /e obtained by merging the circular orderings at the{ two} endpoints of e . See Figure 3.11. Formally,
M /e = (A e ,ρ0,ι0) where ι0 is the restriction of ι to A e and ρ0 is obtained by merging \ \ 3.2. Maps 41
ι a¯ a b b ρ c c ρ0
Figure 3.11: The contraction of a non-loop edge. ρ(b ) = a = ρ0(b ) = ρ ι(ρ(b )) = c . ⇒ ◦ the cycles of a and a¯, i.e., ρ(b ) if ρ(b ) e , 6∈ b A e , ρ0(b ) = ρ ι(ρ(b )) if ρ(b ) e and ρ ι(ρ(b )) e , 2 ∀ ∈ \ (ρ◦ ι) (ρ(b )) otherwise.∈ ◦ 6∈ ◦ Likewise, if e has no degree one vertex, the deletion of e in G leads to new map
M e = (A e ,ρ0,ι0) where ι0 is the restriction of ι to A e and ρ0 is obtained by deleting a and− a¯ in\ the cycles of ρ, i.e., \ ρ(b ) if ρ(b ) e , 2 6∈ 2 b A e , ρ0(b ) = ρ (b ) if ρ(b ) e and ρ (b ) e , (3.1) 3 ∀ ∈ \ ρ (b ) otherwise.∈ 6∈
Figure 3.12 illustrates the deletion of a loop edge. Let us look at the effect of an edge
a¯
c c b b ρ ρ0 a
c c a¯
ρ0 b ρ b a
2 Figure 3.12: The deletion of a loop edge. Above, We have ρ (b ) a,a¯ implying 2 2 3 6∈ { } ρ0(b ) = ρ (b ) = c . Below, ρ (b ) a,a¯ so that ρ0(b ) = ρ (b ) = c . ∈ { } contraction or deletion on the topology of a cellular embedding.
Lemma 3.2.1. If M is a connected map with at least two edges and e = a,a¯ is a non-loop edge of M then M /e is connected and has the same Euler characteristic{ as} M . 3.2. Maps 42
PROOF. The lemma is quite clear if one remarks that M /e has the same number of faces as M but has one edge less and one vertex less than M . Hence,
χ(M e ) = ( V (M ) 1) ( E (M ) 1) + F (M ) = χ(M ) \ | | − − | | − | |
An edge of an embedded graph is said regular if is it incident to two distinct faces and singular otherwise.
Lemma 3.2.2. Let e be an edge of a map M with at least two edges. If e has no vertex of degree one, then χ(M ) if e is regular χ(M e ) = − χ(M ) + 2 otherwise.
Note that the deletion of e may disconnect the map.
ROOF P . Clearly, M 0 has the same number of vertices has M and one edge less. Let ϕ = ρ ι and ϕ0 = ρ0 ι0 be the facial permutation of M and M 0 respectively. Writing e = a◦,a¯ , we have that◦ e is regular if and only if the ϕ-cycles of a and a¯ are distinct. { } Using formula (3.1), we see that the cycles of ϕ0 are the same as for ϕ except for those containing a and a¯, which are merged if they are distinct for ϕ and which is split otherwise. We infer that M 0 has one face less in the former case and one more in the latter. We conclude that
χ(M e ) = V (M ) ( E (M ) 1) + ( F (M ) 1) = χ(M ) − | | − | | − | | − if e is regular and
χ(M e ) = V (M ) ( E (M ) 1) + ( F (M ) + 1) = χ(M ) + 2 − | | − | | − | | otherwise. We also define an edge subdivision in a map by introducing a vertex in the middle of one of its edges. Likewise, a face subdivision consists in the splitting of a face by the insertion of an edge between two vertices of its facial walk. Remark that by contracting one of the two new edges in an edge subdivision one recovers the original map. Similarly, the new edge in a face subdivision is regular and its deletion leads to the original map. It follows from Lemmas 3.2.1 and 3.2.2 that any subdivision of a map preserves the characteristic. Define the genus of a graph as the minimum genus of any orientable surface where the graph embeds.
Corollary 3.2.3. The genus of (a subdivision of) a minor of a graph G is at most the genus of G .
PROOF. Let M be a cellular embedding of G with minimal genus g . Any subdivision H of a minor of G can be obtained by a succession of edge contractions, deletions and subdivisions. We can perform the same operations on M . By Lemmas 3.2.1 and 3.2.2 and the preceding discussion, the characteristic may only increase during these operations. It follows that the resulting embedding of H has genus at most g , implying that the genus of H is at most g . 3.3. The Genus of a Map 43
3.3 The Genus of a Map
Thanks to Euler’s formula it is quite easy to recover the genus of a map given by a triple (A,ρ,ι). We have:
g = 1 χ/2 = 1 ( V E + F )/2 (3.2) − − | | − | | | | where V, E , F are the set of vertices, edges and faces of the map. For a graph G , a certificate that it can be embedded in a surface of genus at most g may be given in the form of a rotation system for G , checking that the genus of the resulting map is at most g . In particular, a graph is planar if and only if it admits a rotation system of genus zero. It follows from the above certificate that computing the genus of a graph is an NP problem. A greedy approach to compute the genus of G is to compute the minimum genus of every possible rotation system for G . For a vertex v the number of possible circular orderings of the incident arcs is (dv 1)! where dv is the degree of v in G . It ensues that the greedy approach needs to consider− as much as Q d 1 ! v V (G )( v ) rotation systems. It appears that the problem is hard to solve. Indeed, ∈ −
Theorem 3.3.1 (Thomassen, 1993). The graph genus problem is NP-complete.
We first remark that we can restrict the problem to connected simple graphs with at least three vertices. Moreover, given such a graph G , the existence of a rotation system on G that triangulates a surface, i.e. such that every facial walk has length three, reduces to the genus problem. Indeed, the number of vertices and edges being fixed by G , only the number of faces may vary among rotation systems. Since the faces of a map correspond to its ϕ-cycles and since every face has length at least 3, we have 3 F A = E /2 with equality if and only if the map is a triangulation. Formula (3.2) shows| | ≤ | that| |g is| minimal in this case. In other words, we can directly deduce from its genus whether G triangulates a surface or not. It is thus enough to show the NP hardness of the triangulation problem. The proof relies on a reduction of the following problem to the triangulation problem.
Proposition 3.3.2 ([Tho93]). Deciding whether a cubic bipartite graph contains two Hamiltonian cycles intersecting in a perfect matching is an NP complete problem.
Recall that a graph is cubic if all its vertices have degree three and it is bipartite if its vertices can be split into two sets such that no edge joins two vertices in a same set. A cycle in the graph is Hamiltonian if it goes through all the vertices. Finally, a perfect matching is a subset of edges such that every vertex is incident to exactly one edge in the subset.
PROOFOF THEOREM 3.3.1. We shall reduce the problem of Proposition 3.3.2 to the triangulation problem. By Proposition 3.3.2 and the discussion after the theorem, the claim implies that the genus problem is NP hard, hence NP complete as we already know it is in NP.Let G be a cubic bipartite graph with a bipartition A B of its vertex set. ∪ We construct another graph by first taking a copy G 0 of G , adding one edge between each vertex v of G and its copy v 0 in G 0. We further add four vertices v1, v2, v10, v20 and 3.3. The Genus of a Map 44
join v1 and v2 to every vertex in G and similarly join v10 and v20 to every vertex in G 0. Let H be the resulting graph. We next construct a graph Q by contracting all the edges of
H of the form v v 0 with v A and v 0 its copy in G 0. We claim that Q triangulates a surface if∈ and only if G admits two Hamiltonian cycles intersecting in a perfect matching. We first prove the direct implication in the claim, assuming that Q triangulates a surface. In other words there is map with graph Q all of whose faces are triangles. The local rotation of this map around v1 directly provides a Hamiltonian cycle C1 in G , which is the boundary of the union of the triangles incident to v1. Note that every vertex of C1 is incident to three edges in this union: two edges along C1 and one edge toward v1. Similarly, the local rotation around v2 provides a Hamiltonian cycle C2. If C1 and C2 had two consecutive edges in common, then their shared endpoint would be incident to exactly two more edges: one toward v1 and one toward v2. However, by construction v is also incident to its copy in G 0 or to v10 and v20 if v A, leading to a contradiction. Moreover, since G is cubic C2 cannot miss two consecutive∈ edges of C1. It follows that C1 and C2 share one of every two edges, hence a perfect matching. To prove the reverse implication of the claim, suppose now that G has two Hamil- tonian cycles C1 and C2 intersecting in a perfect matching. We consider the following rotation system on H . If v A, we let ei , for i , j = 1,2 , be the arc of Ci C j with source vertex v and we let ∈e3 be the third incident{ } arc,{ hence} in C1 C2. The\ local rotation around v is then given by the cycle ∩
(e1, v v1,e3, v v2,e2, v v 0)
The local rotation around a vertex in V (G 0) A0 is defined analogously and so is the \ local rotation around a vertex in A0 or in V (G ) A, except that we exchange the indices 1 and 2 in the above cycle. See Figure 3.13. For \i , j = 1,2 , we define the local rotation { } { } v 2 v2 C2 C2 C1 C2 ∩ C1 C2 e e2 e2 3 ∩ e3 v v v v1 0 e1 e1 v v1 0
C1 C1
Figure 3.13: Left, the local rotation at a vertex v A V (G 0) A0. Right, the local rotation ∈ ∪ \ at a vertex v A0 V (G ) A. The vertices v, v 0 are copies of the same vertex in G and ∈ ∪ \ G 0. around vi as the cycle Ci oriented so that the edges in common with C j (previously denoted by e3) are directed from V (G ) A to A for i = 1 and from A to V (G ) A for i = 2. \ \ Similarly, we define the local rotation around vi0 as the cycle Ci0 oriented oppositely to Ci , i.e. so that the edges in common with C j0 are oriented from A to V (G ) A when \ i = 1 and from V (G 0) A0 to A0 when i = 2. It is an exercise to check that the facial walks of the resulting rotation\ system have the following form, where i , j = 1,2 : { } { } 3.4. Homotopy 45
A triangle defined by vi and some edge of Ci , or •
A triangle defined by vi0 and some edge of Ci0, or •
a quadrilateral defined by an edge of Ci C j , its copy in G 0 and the two edges • \ between their endpoints from G to G 0.
Figure 3.14 shows some of those facial walks. Hence, by contracting the edges v v 0 of v V A v V A ∈ \ v A v A ∈e3 \ 0 0 e2 ∈ ∈ v 2 e10 e2 v v 0 e e v A v2 1 20 ∈ e1 v1
Figure 3.14: Some faces of the rotation system for H .
H with v A (and its copy v 0 A0), the quadrilaterals are transformed into triangles and one obtain∈ a triangular embedding∈ for Q.
It can be shown that the graph genus problem is fixed parameter tractable (FPT) with respect to the genus. More precisely, the question whether a graph of size n has genus at most g can be answered in O(f (g )n) time where f (g ) is some singly exponential function of g [Moh99, KMR08]. Interestingly, the genus of the complete graphs are known. It was conjectured by Heawood in 1890 that the genus of the complete graph Kn over n 3 vertices is ≥ ¡ n 3 n 4 ¤ g K ( )( ) ( n ) = − 12 −
This conjecture was eventually established in 1968 by Ringel and Youngs. The long proof [Rin74] provides explicit minimal genus embeddings of Kn with a different construction for each residue of n modulo 12.
3.4 Homotopy
In a nutshell, two curves drawn on a surface are homotopic if there exists a continuous deformation between them. This intuitive notion, dating back to Poincaré, naturally leads to a very rich theory drawing a bridge between topology on one side and group theory on the other side. We start by introducing the relevant background in group theory. 3.4. Homotopy 46
3.4.1 Groups, generators and relations Although most groups we will be dealing with in this course are infinite, they can often be very succinctly encoded in terms of generators and relations. The attentive reader will probably notice some similarities between the formalism established here and the definitions on polygonal schemata : as we will see later on, this is no coincidence. 1 1 1 Let us consider a set G of generators, and denote by G − their inverses G − = g − 1 { | g G . A word is a string over the alphabet G G − , and we denote by " the empty word.∈ } We consider that two words are equivalent∪ if one can switch from one to the 1 1 other by adding or removing words of the form g g − or g − g . The set of finite words quotiented by this equivalence relation can naturally be endowed with the structure of a group: the law is the concatenation, and the neutral element is ". Indeed: The concatenation is well-defined with respect to the equivalence relation and • is associative.
For any word w , w " = "w = w . • Each element has an inverse obtained by reversing the order of the letters and • 1 1 1 inverting them, e.g., c − b − a − is the inverse of a b c . This group is called the free group on the set G , denoted by F (G ). Now, let us also fix a set R of words called the relations, and consider the free group F (G ), where one also identifies a word with the word obtained by inserting at any place a word taken from R or their inverses. This defines another group, which is 3 formally the quotient of F (G ) by the normal subgroup generated by R . This group is said to admit the presentation < G R >. So the free group admits the presentation < G >, generally abbreviated by <|G >. Here| ; are a few examples:
The group Z is the free group on one letter F ( a ). • { } The group < a aa > is the group Z2 (or Z/2Z). • | 1 1 2 The group < a, b a b a − b − > is the two-dimensional lattice Z : indeed, the • 1 |1 relation a b a − b − implies that a b = b a, thus the group is abelian, and the 2 isomorphism with Z is the map a (1,0), b (0,1). 7→ 7→ 1 1 m n 1 1 Exercise 3.4.1. Recognize the groups < a, b aa b,a b − b − > and < a, b a , b ,a b a − b − > . | | Exercise 3.4.2. Show that any group admits a presentation (with possibly an infinite number of generators and relations), and that any finite group admits a finite presen- tation.
3.4.2 Fundamental groups, the combinatorial way We start by introducing homotopy in a combinatorial setting, which makes computa- tions very convenient. The baby case is the case of graphs, which corresponds directly to free groups.
3 Recall that a subgroup H G is normal if g H = H g for any g G . ⊆ ∈ 3.4. Homotopy 47
Fundamental groups of graphs
Let G denote a graph (not necessarily embedded) where the edges are oriented. An 1 arc is an oriented edge or its inverse, it has an origin o(a) and a target t (a) = o(a − ). A path in G is a sequence of arcs (e1,...,en ) such that the target of ei coincides with the origin of ei +1.A loop is a path such that the target of en coincides with the origin of e1, this point is called the basepoint of the loop. The trivial loop is the empty loop. Two loops with a common basepoint x are homotopic if they can be related to each 1 other by adding or removing subpaths of the type (e ,e − ), and a path is reduced if it does not contain such a subpath. Let x be a vertex of G . The set of homotopy classes of loops in G forms a group, where the law is the concatenation and the neutral element the trivial loop. Indeed:
The concatenation is well-defined with respect ot the equivalence relation and • is associative.
Concatenating with the trivial loop does not change a loop. • 1 1 Every loop (e1,...,en ) has an inverse (en− ,...,e1− ). • This group is called the fundamental group of G , denoted by π1(G , x ).
Theorem 3.4.3. Let T be a spanning tree of G containing the vertex x . Then the funda- mental group π1(G , x ) is isomorphic to the free group generated by the edges of G that are not in T .
PROOF. Let C denote the set of edges not in T . For every arc a, one can associate a loop based at x denoted by γT γT a γT , where γT denotes the unique a = x o(a) t (a) x x y → · · → → reduced path in T between x and y . Then, every loop (e1,...,en ) based at x in G is homotopic to the loop γT ,...,γT , and for every arc a in T , γT is homotopic to the e1 en a T constant loop. Therefore, π1(G , x ) is generated by the loops γa for a and arc not in T , T T 1 and since γa 1 = (γa )− , it is enough to pick one arc for every edge of C . Finally, since T − the loop γa for a not in T is the only one containing a, there is no non-trivial relation T between the loops γa . This proves the theorem.
An alternative way of seeing this proof is to observe that the fundamental group of G is the same as the fundamental group of G obtained after contracting a spanning tree of G . The resulting graph is a bouquet of circles, and there is one generator for each circle.
Fundamental groups of surfaces
Now, let S denote a connected surface and let G be a graph cellularly embedded on S. Similarly as before, a loop and a path in (S,G ) is a path, respectively a loop in G . An elementary homotopy between two loops is either a reduction (deletion/addition of 1 e e − ) or the deletion/addition of a subpath bounding a face of G . This corresponds to the idea that in a continuous deformation between two curves, one can flip a face of a cellularly embedded graph, see Figure 3.15. Elementary homotopies induce 3.4. Homotopy 48
f f
Figure 3.15: The two red paths are homotopic since they are related by going over the face f . an equivalence relation, called homotopy between loops based at a common point, denoted by . As before,≡ the set of homotopy classes of loops based at a vertex x of G forms a group, where the law is the concatenation. Indeed,
If γ1 γ01 and γ2 γ02 are two pairs of homotopic loops, then their concatenations • ≡ ≡ are homotopic : γ1γ2 γ01γ02. ≡ The concatenation law is associative. • The trivial loop, denoted by 1x or simply 1 is a neutral element for the concate- • nation law.
1 1 Every loop (e1,...,en ) admits (en− ,...,e1− ) as an inverse. • 4 This group is called the fundamental group of S, denoted by π1(S, x ) .
Exercise 3.4.4. Let x and y be two vertices of G , then show that π1(S, x ) and π1(S, y ) are isomorphic. This justifies the common abuse of notation to just write π1(S) without specifying a base point. Let T be a spanning tree of G containing a vertex x , and let C denote the set of edges not in T . The fundamental group of G is the free group on C , and to obtain the fundamental group of S from it, one just needs to add the relations corresponding to the faces of G . Formally, for every face f = (e1,...,en ) of G , denote by rf the facial relation induced by f on C , that is, the word obtained by only keeping the ei that are in C . Then we have the following theorem:
Theorem 3.4.5. Let S be a connected surface, G be a cellularly embedded graph on S with a vertex x and a set of faces F , and T be a spanning tree of G containing x . Denote by C the set of edges not in T and by rf the facial relation induced by a face f of G on C . Then π1(S) is isomorphic to the group π presented by
< C rf f F > . | { } ∈ 4 To be accurate, we should write π1(S,G , x ) but as we will shortly see, this actually does not depend on G . 3.4. Homotopy 49
T PROOF. As before, every arc a in G corresponds to a loop γa obtained by adjoining the reduced paths in T between x and the endpoints of a. Let us consider the map T γ : C π1(S) mapping every arc a in C to γa . This map induces a morphism of groups → γ0 : F (C ) π1(S). As for homotopy in graphs, this map is surjective since any loop of S is the→ image by γ of its arcs in C . We will show that its kernel equals the normal subgroup N generated by the elements rf for f F , which proves the theorem. ∈ Let w = e1,...en be an element of F (C ) such that γ0(w ) 1. Then it means that ≡ γ0(w ) can be reduced to the trivial loop by a sequence of elementary homotopies. Then for every reduction over edges of C , the same reduction can be applied to w , and for every face flip over a face f , the corresponding facial relation rf can be used to modify the word w . Thus w can be reduced to the trivial word using the set of relations rf and the kernel of γ0 is included in N . Reciprocally, an element of N is mapped to the trivial loop by γ0 since the facial relations rf dictate the face flips to do to simplify the corresponding relations. This concludes the proof.
Now, let us observe that the group π(S) stays the same when one
1. contracts an edge of G between two different endpoints,
2. or one removes an edge of G between two different faces.
For1, let e be the edge we are contracting, and T be a spanning tree of G containing e . This contraction yields a new tree T 0 with one less edge, but the set C of non-tree edges stays the same, as well as the set of facial relations. So the group stays the same. For2, when one removes an edge e of G between two different faces, one merges the two adjacent faces f1 and f2 into a single face f . One can pick the spanning tree so that e is not in it, and thus π1(S) lost one generator g , and the two relations r1 and r2 containing g have been merged into one. Observing that this amounts to deleting every appearance of g in π1(S) using r1 (or r2), we see that this operation does not change the group. Therefore, by the classification of surfaces (or rather its proof), we see that the graph G can be transformed into one of the polygonal schemata of Theorem 3.1.6 without changing the fundamental group. In particular, π1(S) only depends on the surface S and not the graph G , and it is isomorphic to
the trivial group if S is a sphere, • ¯ the group < a1, b1,...ag , bg a1b1a¯1b1 ...ag bg a¯g bg > if S is the orientable surface • of genus g , |
or < a1,...,ag a1a1 ...ag ag > if S is the non-orientable surface of genus g . • |
Remark: The operations of contraction and deletion of edges used above can be interpreted in the light of dual graphs: a graph G embedded on a surface S has a dual graph G ∗, defined by placing one vertex in each face of G and edges between adjacent faces. Then, contracting an edge in the primal graph amounts to removing an edge in the dual graph, and vice versa. Contracting every edge between different 3.4. Homotopy 50
Figure 3.16: A planar graph, its dual graph and a pair of interdigitating spanning trees. endpoints and removing every edge between different faces amounts to contracting a spanning tree T of G and a spanning tree T ∗ of G ∗ which are interdigitating, that is, such that the edges of T are not duals of edges of T ∗, see Figure 3.16. The use of such interdigitating trees, also called a tree-cotree decomposition, is an important tool in the study of embedded graphs, especially from an algorithmic point of view, but we will not rely on it further in this course.
3.4.3 Fundamental groups, the topological way The homotopies we defined in the previous section are very combinatorial, and do not match our a priori intuition of a continuous deformation. In this section, we define homotopies in a topological way, and show that the corresponding notion of fundamental group matches the one obtained before. In a purely topological setting, we are now only considering a surface S, without any mention of a cellularly embedded graph. A path on S is a continuous map p : [0,1] S, and a loop based at x is a path p : [0,1] S where p(0) = p(1) = x .A homotopy with→ → basepoint x between two loops `1 and `2 is a continuous map h : [0,1] [0,1] S → → such that h(0, ) = `1, h(1, ) = `2 and h( ,0) = h( ,1) = x . The constant loop at x is · · · 1· 1 the loop p : [0,1] x . The inverse of a loop `− is defined by `− (t ) = `(1 t ). The homotopy class of7→ a loop is the set of loops homotopic to it. − The concatenation of two loops `1 and `2 is the loop defined by `1(2t ) for t [0,1/2] ∈ and `2(2t 1) for t [1/2,1]. The set of homotopy classes of loops based at x forms a group for− the concatenation∈ law, where the neutral element is the constant loop. Indeed:
If γ1 γ01 and γ2 γ02 are two pairs of homotopic loops, then their concatenations • ≡ ≡ are homotopic : γ1γ2 γ01γ02. ≡ The concatenation law is associative. • The constant loop, denoted by 1x or simply 1 is a neutral element for the con- • catenation law.
The inverse of a loop is its inverse for the concatenation law. • 3.4. Homotopy 51
This group is called the fundamental group π1(S, x ).
Remark: We are always working with loops with basepoints, and the homotopies preserve this basepoint. This is needed to obtain a nice algebraic structure: otherwise there is no natural way to concatenate loops. But the study of homotopies without basepoints, called free homotopies, is arguably more natural. We will see later on how to include it in this framework.
The following exercise mirrors Exercise 3.4.4:
Exercise 3.4.6. If S is a connected surface, then for every (x , y ) S, the groups π1(S, x ) ∈ and π1(S, y ) are isomorphic. This justifies the common abuse of notation to just write π1(S) without specifying a base point. As the notations suggest, the topological fundamental group and the combinatorial group turn out to be isomorphic, this is the point of the following theorem.
Theorem 3.4.7. The topological fundamental group is the same as the combinatorial fundamental group.
c omb PROOF (SKETCH). Just for the time of this proof, let us denote respectively by π1 (S) t op and π1 (S) the combinatorial and topological fundamental groups. We pick a cellu- c omb larly embedded graph G on S, which will be used to study π1 (S) (but as we saw, c omb t op the group itself does not depend on G ). We will study the map ϕ : π1 (s ) π1 (S) mapping a homotopy class of loops to the corresponding topological homotopy→ class of loops. Claim 1: The map ϕ is well-defined and is a morphism of groups.
Indeed, if two combinatorial loops γ1 and γ2 are homotopic, then they are related by a sequence of reductions and face flips. Such reductions and face flips can be realized using topological homotopies, so their images ϕ(γ1) and ϕ(γ2) are homotopic. This map behaves nicely under composition laws, so it is a morphism. Claim 2: The map ϕ is surjective. Let γ be a topological loop on S. It suffices to prove that it is homotopic to a combinatorial loop of G . By perturbing by a very local homotopy if needed, one can assume that γ crosses G a finite number of times. Then between each pair of crossings, on can push γ on one side (for example the left one), so that one obtains a homotopic loop lying entirely in G . Now, it may happen that γ backtracks in the middle of an edge of G , but using a homotopy, one can reduce it so that it does not happen, and thus we obtain a combinatorial loop of G . Claim 3: The map ϕ is injective. Let γ be a combinatorial loop such that ϕ(γ) = 1. This means that some topological homotopy contracts ϕ(γ) to the empty loop. We want to discretize this homotopy so that it becomes a concatenation of face flips and reductions. To do that, push every loop in the topological homotopy into a combinatorial loop of G using the previous technique. By construction, the difference between two consecutive such loops will be a series of reductions or face flips, and thus we obtain a combinatorial homotopy. 3.4. Homotopy 52
Remark: The “map” π1 associates a group for any surface, and it can furthermore be seen as a functor : continuous maps between surfaces also induce morphisms between their fundamental groups: indeed, such a continuous applications maps loops to loops, and by taking their homotopy classes, one obtains a morphism. Such functors are the playground of category theory, which has deep connections with algebraic topology, but we will not delve at all into these aspects in this course.
All in all, we have just seen that properties regarding continuous deformations of loops can be rephrased in a purely group-theoretical point of view. This is very fruitful from a conceptual perspective, as it provides a strong algebraic structure to work with. But from an algorithmic perspective, the benefits are not that immediate : the issue is that working with presentations of groups is very unwieldy, as struggling with the following exercise showcases: Exercise 3.4.8. Show that the fundamental groups of non-homeomorphic surfaces are not isomorphic. In fact, most computational problems for group presentations are actually unde- cidable. This is the case for example for the following problems:
Deciding whether two groups provided by a finite presentation are isomorphic. • Deciding whether a given group provided by a finite presentation is trivial. • Deciding whether an element in a group provided by a finite presentation is • trivial.
We will establish such undecidability results in a later chapter and see that they translate into undecidable topological problems in higher dimensions. Fortunately, fundamental groups of surfaces are simpler than general groups, and thus we will be able to devise algorithms for homotopy on surfaces, but these algorithms will have a very strong geometric or topological appeal, instead of a group theoretical one. More generally, studying groups by realizing them as fundamental groups of some topological space is one of the drives of combinatorial group theory.
3.4.4 Covering spaces
A covering space of S is a space Sb together with a continuous surjective map π : Sb S 1→ such that for every x S, there exists an open neighborhood U of x such that π− (U ) is a disjoint union of homeomorphic∈ copies of U . The reader scared by this definition should look at the example of the annulus on the left of Figure 3.17. We will only deal with covering spaces in an informal way, and refer to a standard textbook in algebraic topology like Hatcher [Hat02] for more precise statements. The reason we are interested in covering spaces is that they are deeply connected with homotopy and fundamental groups. Indeed, a covering space allows to lift a path: if p is a path on S such that p(0) = x = π(xb) for some xb Sb, there is a unique ∈ path pb on Sb starting at xb such that p = π pb. This is pictured in Figure 3.17. Note that loops do not lift necessarily to loops! This◦ “unique lifting property” derives from the 3.4. Homotopy 53
pb
x 1 b π− (U ) π
p
x U
Figure 3.17: A covering of the annulus, and one lift of a path p.
p x p p x b b x
Figure 3.18: Lifting a loop p on the torus to a path on its universal cover. definition of covering spaces: when one sits at a point xb of the covering space, the local homeomorphism π specifies how to move on Sb so that one follows the path p. Every surface has a unique covering space Se that is simply connected, that is, where every loop in Se is homotopic to a trivial loop, it is called the universal cover of S. If S is a sphere, its universal cover is itself, so let us assume that it is not the case. One way to build this cover is as follows: pick a graph G cellularly embedded on S with a single vertex and a single face (for example one of the graphs used in the classification theorem). Cutting S along G gives a polygon and one can tile the plane with this polygon by putting adjacent copies of this polygon next to each other, so that every vertex of the tiling is adjacent to the correct number of polygons. This construction is pictured in Figure 8.20 for the torus. For surfaces of higher genus, the same construction works, but the tiling will not look as symmetric : indeed it is for example impossible to tile the plane with regular octagons. This is not an issue for our construction, since any tiling with octagons will do, even if they do not have the same shape. However, an insightful way to deal with this issue is to use hyperbolic geometry: it is a non-Euclidean geometry on the open disk that allows for regular tilings of polygons with an arbitrary number of faces. 3.4. Homotopy 54
Figure 3.19: The universal covering space of the genus 2 surface.
Figure 3.19 pictures the universal cover of a genus 2 surface as a hyperbolic tiling. One can readily check that the spaces we obtain are universal covering spaces of their respective surfaces, since they are simply connected and the map π can naturally be inferred by the tiling. One key property of universal covers is that a loop on S is contractible if and only if all its lifts in the universal cover are also loops, as can be tested on the above examples. This will be leveraged in the next section to design an algorithm to test contractibility of loops on surfaces.
Remark: The irruption of hyperbolic geometry here is not random at all: one can show that surfaces of genus at least 2 do not admit Euclidean metrics, but do admit hyperbolic ones. It is the lift of such a metric that one uses to obtain a hyperbolic tiling. Hyperbolic geometry plays a primordial role in the study of the geometric properties of surfaces, and has been used increasingly as well in the design of algorithms for computational topology. 4
The Homotopy Test
Contents 4.1 Dehn’s Algorithm...... 56 4.2 van Kampen Diagrams...... 58 4.2.1 Disk Diagrams...... 58 4.2.2 Annular Diagrams...... 59 4.3 Gauss-Bonnet Formula...... 59 4.4 Quad Systems...... 61 4.5 Canonical Representatives...... 62 4.5.1 The Four Bracket Lemma...... 62 4.5.2 Bracket Flattening...... 64 4.5.3 Canonical Representatives...... 65 4.6 The Homotopy Test...... 67
A fundamental problem when dealing with curves on surfaces is to decide if a given closed curve can be contracted to a point, or more precisely to a constant curve. This is sometimes referred to as the contractibility problem. More generally, we can ask whether two closed curves on a surface are related by a continuous deformation. This question has two variants: we may or may not require the curves to share a given point that remains fixed during the deformation. Note that the problem with fixed point has an obvious reduction to the contractibility problem. Indeed, two curves c ,d 1 are homotopic with fixed point if and only if the concatenation c d − is contractible. Without the fixed point requirement, that is when the curves are· allowed to move freely on the surface, the problem is known as the transformation problem and can be expressed as a conjugacy problem. To see this, choose a point v on a surface S
55 4.1. Dehn’s Algorithm 56 and suppose that c and d are homotopic1. We can deform c and d so that each of them passes through p. The resulting curves are still homotopic. In other words, there 1 is a continuous mapping h : S [0,1] S such that h S1 0 = c and h S1 1 = d , and 1 ×{ } ×{ } viewing S [0,1] as an annulus,× each boundary→ has a point sent on v by h. We connect these two points× by a simple path a in the annulus. The map h sends this path to a closed path α. See Figure 4.1. Cutting the annulus through a we obtain a disk whose
α
d d c v c c d α α α α v Figure 4.1: c and d are homotopic if and only if their homotopy classes are conjugate.
1 1 boundary is sent to c α d − α− which is thus contractible. Hence, c is homotopic 1 · · · to α d α− or, equivalently, the homotopy classes of c and d are conjugate in the · · fundamental group π1(S, v ). For the reverse implication, if c and d have conjugate homotopy classes we can just read Figure 4.1 from right to left and conclude that c and d are indeed homotopic.
4.1 Dehn’s Algorithm
Suppose that S is a reduced combinatorial surface, that is a map with a single ver- tex and a single face. Its graph G is thus composed of loop edges, each of which corresponds to a generator of the fundamental group of S. We can directly read the homotopy class of a closed path in G : the sequence of arcs of the path translates to the product of the corresponding generators and their inverses. This product is often viewed as a word on the generators and their inverses, so that the contractibility problem is the same as the word problem where we ask if a product of generators and their inverses is the trivial element in the fundamental group of S. Max Dehn was among the first to establish and exploit the connection between Topology (the contractibility problem) and Algebra (the word problem). He proposed a solution to the word problem now known as Dehn’s algorithm [Sti87, paper 5]. Dehn observed that the lift of G in the universal covering space of S induces a tessellation of the plane composed of copies of the unique polygonal face of G in S. This tessellation is actually the Cayley complex of π1(S, v ) where v is the unique vertex of G . This ˜ complex S is relative to the set of generators βi i of π1(S, v ) – the homotopy classes of the loop edges in G – and to their relation F{obtained} from the unique facial walk of ˜ G in S. The vertex set of S are the elements of π1(S, v ) and there is an (oriented) edge labelled βi between every α π1(S, v ) and α βi . Finally, disks are glued along each ∈ · 1Homotopy without fixed point is often called free homotopy. For concision, we drop the term free. In general, it should be clear from the context whether we use free homotopy or homotopy with fixed point, and we will specify when necessary that the homotopy is with fixed point. 4.1. Dehn’s Algorithm 57 closed path labelled by F in the resulting graph. If a closed path c in G is contractible in S, then any of its lifts is a closed path in S˜. Dehn further claims that any closed path in S˜ contains either a spur, i.e. an arc followed by its opposite arc, or more than half of F , i.e. a subpath labelled by some word U such that for some other V shorter than U , the concatenation U V is a cyclic permutation of F or its inverse. In both cases c is homotopic to a shorter closed path obtained by removing the spur in the former case and by replacing the path labelled by U with the complementary 1 path labelled by V − in the latter case. This leads to an algorithm where we inductively search for spurs or large pieces of F until we obtain a word that we cannot reduce anymore. It then follows from Dehn’s claim that c is contractible if and only if this word is empty. In order to prove his claim, Dehn notes that the faces of the complex S˜ are arranged 2 in rings of faces R1,R2,..., where R1 is the set of faces incident with a given vertex v0 of ˜ S and Ri +1 is the set of faces not in Ri sharing a vertex with the external boundary of Ri . Remark that a face of Ri +1 has at most two vertices in Ri . Hence, if S is an orientable surface of genus g 2, each face has 4g sides and a face of a ring has at least 4g 2 > 2g vertices on its external≥ boundary. Consider now a closed path c˜ without spurs− and passing through v0. Let i be maximal such that c˜ contains a vertex of the external boundary of Ri . Figure 4.2 illustrates a factious case of a relation of length 6. Since c˜
c˜
R2
v0
Figure 4.2: The faces of the complex S˜ are arranged in rings of faces. has no spurs it is easily seen that it contains the whole intersection of a face with the external boundary of Ri . The previous remark allows to conclude the claim. Dehn’s algorithm has a simple implementation that runs in O(g c ) time where g is the genus of S. A more careful implementation with O(g + c logg )| time| complexity was described by Dey and Schipper [DS95]. Finally, optimal O| (g| + c ) algorithms were proposed [LR12, EW13]. We shall describe these last approaches to| the| contractibility and deformation problems, not so far from Dehn’s original approach but including more recent techniques borrowed from geometric group theory.
2 In his original work, Dehn defines R1 as a single face. 4.2. van Kampen Diagrams 58
4.2 van Kampen Diagrams
4.2.1 Disk Diagrams A useful tool concerning contractible curves is provided by the so called van Kampen diagrams. Such diagrams bear different names in the litterature, among which disk diagrams and Dehn diagrams are the most common. Intuitively, a disk diagram allows to express the combinatorial counterpart of the following characterization of 1 2 contractible loops in a topological space X : a loop S = ∂ D X is contractible if 2 2 and only if it extends to a continuous map D X , where D is→ the unit disk. Given a combinatorial map M with graph G , a disk diagram→ over M is a combinatorial sphere D with a marked outer face, and a labelling of the arcs of D by the arcs of M such that opposite arcs are labelled by opposite arcs and such that every facial walk of D that is not the outer face is labelled by some facial walk of M . In other words, D is a gluing of faces and edges of M that is homeomorphic to the complement of an open disk in a sphere. For instance, this complement could be a tree. In general, it is a tree-like arrangement of topological closed disks connected by trees. The facial walk of the outer face of D is denoted by ∂ D . The diagram is reduced if any two of its inner faces (i.e. not the outer one) sharing a vertex v are labelled by facial walks that are not inverse to each other when starting the facial walks at v .
Lemma 4.2.1 (van Kampen, 1933). A closed path c in M is contractible if and only if it is the label of the outer facial walk of a reduced disk diagram over M .
The proof uses the intuitive fact that homotopic closed paths are combinatorially homotopic, where a combinatorial homotopy is a sequence of elementary homo- topies that consist in either inserting or removing a spur, or replacing a subpath of a facial walk by the complementary subpath. See Theorem 4.7 in the previous lecture notes.
PROOFOF LEMMA 4.2.1. We first prove the existence of a not necessarily reduced disk diagram. Let c0 = 1 c1 ck = c be a sequence of k elementary homotopies attesting the contractibility→ → of ···c , where→ 1 denotes a constant path. By induction on k, we may assume the existence of a disk diagram D such that ∂ D is labelled by ck 1. There are three cases to consider. −
1 If ck 1 ck consists in inserting a spur aa − , then we can form a disk diagram − • for ck by→ attaching a pendant edge labelled with a to the boundary of D .
If ck 1 ck consists in removing a spur, then either this spur corresponds to two • consecutive− → arcs of ∂ D with distinct edge support or it corresponds to the two arcs of a single pendant edge. In the former case, we form a disk diagram for
ck by gluing the two arcs along ∂ D . In the latter case, we contract the pendant edge.
Otherwise, ck 1 ck consists in the replacement of a subpath p by a subpath • − →1 q such that pq − is a facial walk of M . We then perform a subdivision of the outer face of D , inserting a new edge between the extremities of p. The new 4.3. Gauss-Bonnet Formula 59
outer face is chosen among the two new faces as the one not bounded by p. We next subdivide the new edge k 1 times, where k is the number of arcs of q . We finally extend the labelling trivially− by sending the subdivided edge to the edges 1 of q . This amounts to glue a face with facial walk pq − along p on D . If the resulting diagram is not reduced, then there are two facial walks sharing a vertex v and labelled by opposite facial walks of M . We “open” D at v and identify the two facial walks according to the labels of their arcs. This produces a new diagram with two faces less and does not modify the outer face boundary. We repeat the procedure as long as the diagram is not reduced. By induction on the number of faces this procedure must end. Note that the final diagram may have no face, in which case its graph must be a tree corresponding to a closed path that can be reduced to a point by removing spurs only.
Exercise 4.2.2. Relates the degree of an inner vertex in a reduced disk diagram over M with the degree of the corresponding vertex in M .
4.2.2 Annular Diagrams There is an analogous notion of annular diagram defined by a combinatorial sphere with two marked outer faces instead of one.
Lemma 4.2.3 (Schupp, 1968). Two closed paths c and d in M are homotopic if and only if there exists a reduced annular diagram over M such that the facial walks of its outer faces (oriented consistently) are labelled with c and d respectively.
ROOF 1 1 P . By the introductory discussion there exists a path p such that c p d − p − is contractible. By Lemma 4.2.1, there exists a disk diagram over M whose· boundary· · 1 1 is labelled with c p d − p − . We may identify the subpaths corresponding to p and 1 · · · p − respectively and get an annular diagram whose perforated faces are labelled with c and d . If the diagram is not reduced, we proceed as in the proof of Lemma 4.2.1.
4.3 Gauss-Bonnet Formula
Another interesting tool is given by a combinatorial version of the famous Gauss- Bonnet theorem. This theorem relates the curvature of a Riemannian surface S (say 3 a smooth surface embedded into R ) with its Euler characteristic χ, hence a local geometric quantity with a global topological one. If K is the Gauss curvature of S and kg is the geodesic curvature along its (smooth) boundary ∂ S then: Z Z K ds + kg d` = 2πχ (4.1) S ∂ S We can obtain a combinatorial version of this formula using some kind of angle struc- ture over a combinatorial surface. Given an orientable combinatorial map M = (A,ρ,ι), we consider an angular assignment of its corners, that is a real function θ defined 4.3. Gauss-Bonnet Formula 60 over the set of corners. Here, a corner is any pair (a,ρ(a)), for a A, of successive arcs around a vertex. We require that the sum of the angular assignments∈ of the corners of any face f satisfies X θ (c ) = d f /2 1, (4.2) c f − ∈ where d f is the degree of the face, i.e. the length of its facial walk. Intuitively, this condition amounts to assume that the faces are Euclidean polygons if we view an angular assignment as a normalized angle, measuring angles in terms of parts of a circle instead of radians. Indeed, the total angle of a Euclidean polygon with d f sides is (d f 2)π, which is d f /2 1 when normalized. We then define the curvature of an interior− vertex v as − X κ(v ) = 1 θ (c ), (4.3) − c v ∈ where, c v indicates that the corner c = (a,ρ(a)) is incident to the source vertex v of a. We also∈ define the (geodesic) curvature of a boundary vertex3 v as X τ(v ) = 1/2 θ (c ) (4.4) − c v ∈ Those curvatures thus measure the angle default with respect to the flat situation (κ = 1 and τ = 1/2). They can be related to the Gauss curvature of the flat conic surface Sv with one singularity at v obtained by gluing small isocele triangles, one for each corner c v , with angle 2πθ (c ) at v . The boundary of Sv is a broken line so that ∈ P Formula (4.1) should be corrected with the term w (π αw ), where w runs over the boundary vertices of Sv and αw is the interior angle at w .− Since the geodesic curvature of a line segment is zero, Formula (4.1) becomes Z X K ds + (π αw ) = 2πχ = 2π Sv w − P Noting that with w (π αw ) is the sum of the angles at the corners of v we obtain R K 2πκv . − Sv = Theorem 4.3.1 (Combinatorial Gauss-Bonnet —). Let M be a combinatorial map whose boundary is composed of disjoint simple cycles in the graph of M . Denote by χ o ∂ the Euler characteristic of M and by V V = V its interior and boundary vertex sets. Then, for any angular assignment, we have∪ X X κ(v ) + τ(v ) = χ v V o v V ∂ ∈ ∈ It is possible to drop the condition on the boundary of M using a slightly different notion of curvature, see Erickson and Whittlesey [EW13]. The present presentation is inspired by Gersten and Short [GS90] and makes the parallel with the differentiable version rather transparent.
3Formally, a combinatorial surface with boundary is defined by marking some faces as perforated, and a boundary vertex is any vertex incident to a perforated face. 4.4. Quad Systems 61
PROOF. By definition, we compute
X o X X ∂ X κ(v ) = V θ (c ) and τ(v ) = V /2 θ (c ) v V o | | − c v V 0 v V ∂ | | − c v V ∂ ∈ ∈ ∈ ∈ ∈ ∈ P P ∂ P It follows that v V o κ(v ) + v V ∂ τ(v ) = V V /2 c v V θ (c ). By distributing the corners according∈ to faces∈ rather than| vertices| − | | and− by∈ the∈ angular assignment requirement (4.2), we see that
X X X d f 1 X θ c θ c 1 d F ( ) = ( ) = ( 2 ) = 2 f c v V c f F f F − f F − | | ∈ ∈ ∈ ∈ ∈ ∈ where F is the set of faces of M . Since every arc appears in exactly one facial walk, P ∂ ∂ except for those on the boundary of M , we have: f F d f = 2 E E where E and E ∈ | |−|∂ | ∂ are the set of edges and boundary edges respectively. Since E = V , we conclude that | | | |
X X ∂ ∂ κ(v ) + τ(v ) = V V /2 ( E E /2) F ) v V o v V ∂ | | − | | − | | − | | − | | ∈ ∈ = V E + F | | − | | | |
4.4 Quad Systems
From an algorithmic point of view it is more convenient to work with combinatorial surfaces all of whose faces are quadrilaterals. We call such a surface a quadrangulation or a quad system. Given a combinatorial surface without boundary, we easily get a quadrangulation of the same topological surface as follows. We insert a vertex inside each face and connect this vertex to all the corners of the face. Hence, if a facial walk has length k we introduce k new edges in the face. This subdivides each face into triangles. We then delete all the edges of the original graph, thus merging all the triangles by pairs to form quadrilaterals. In practice, we will also require that the vertices have a high degree, say at least 8. For a surface of genus g 2 this is easily obtained by first reducing the combinatorial surface to a single vertex≥ and a single face before applying the above quadrangulation process. The resulting quadrangulation has two vertices, 4g edges and 2g quadrilaterals. Figure 4.3 shows a reduced surface and its quadrangulation.
Lemma 4.4.1. Let Q be a quadrangulation derived by the previous process from a given map M without boundary. We can preprocess M in linear time (proportional to its number of arcs) so that any closed walk c can be transformed in O( c ) time into a homotopic closed walk of size at most 2 c in Q. | | | | To see this, consider a spanning tree T of the graph G of M . Contracting T gives a surface M 0 with graph G /T and with a single vertex. Next consider a spanning tree of the dual graph of M 0 and denote by L the corresponding set of primal edges. Deleting 4.5. Canonical Representatives 62
Figure 4.3: From left to right, a reduced surface is cut-opened and its unique face is triangulated by inserting a vertex in the center. Triangles of the same color are merged by deleting the original loop edges.
the edges in L leaves a reduced surface M 00 and we construct Q by first inserting a new vertex z in the unique face of M 00 together with all the edges from z to the corners of the face. We finally remove the remaining edges of G /T to get Q. Note that any edge e of G /T is homotopic to the path of length two in Q connecting z to the two endpoints of e . We can precompute and store these length two paths for each e in total linear time. Now, given any c , we contract all the occurrences of edges of T in c to obtain a homotopic closed walk c 0 in M 0. We further replace every remaining edge by the corresponding length two path to obtain a homotopic closed walk as desired in Q. This transformation takes O( c ) time. | | Exercise 4.4.2. Propose a construction of quadrangulation starting from a combinato- rial surface with nonempty boundary. Can you extend Lemma 4.4.1 accordingly?
4.5 Canonical Representatives
The last and most important ingredient of the homotopy test is the construction of a canonical representative in each free homotopy class. Given a closed walk in a quadrangulation, the idea is to shorten the walk as much as possible to obtain a combinatorial geodesic. As a homotopy class may contain several geodesics, we further consider the rightmost geodesic to define a canonical representative. Once a canonical representative has been computed for two given closed walks we can decide if the walks are homotopic by just checking if their representative are equal up to a circular permutation. The shortening process is based on successive simplifications of spurs and brackets as explained below.
4.5.1 The Four Bracket Lemma
Let (a1,a2) be a pair of arcs sharing their origin vertex v on a quadrangulation M . Following the terminology of Erickson and Whittlesey [EW13], we define the turn of (a1,a2) as the number of corners between a1 and a2 in counterclockwise order around 4.5. Canonical Representatives 63
v . Hence, if v is a vertex of degree d in M , the turn of (a1,a2) is an integer modulo d that is zero when a1 = a2. The turn sequence of a subpath (ai ,ai +1,...,ai +j 1) of a closed walk of length ` is the sequence of j 1 turns of a 1 ,a for 1 −k < j , + ( i−+k i +k+1) where indices are taken modulo `. The subpath may have length `, thus− leading≤ to a sequence of ` 1 turns. Note that the turn of a 1 ,a is zero precisely when + ( i−+k i +k+1) (ai +k ,ai +k+1) is a spur. A bracket is any subpath whose turn sequence has the form ¯ ¯ ¯ 12∗1 or 12∗1 where t ∗ stands for a possibly empty sequence of turns t and x¯ stands for x . Intuitively, if we imagine that every corner of M has a right angle, a bracket corresponds− to a straight path ending with right angles. A quadrangulated disk is non-singular if its boundary is a simple cycle of its graph.
Lemma 4.5.1 (Four bracket —, [GS90, EW13]). Let D be a non-singular quadrangulated disk all of whose interior vertices have degree at least four. Then, the boundary of D contains at least four brackets.
Figure 4.4 illustrates the Lemma.
Figure 4.4: The quadrangulated disk has four highlighted brackets. Can you find them all?
PROOF. Consider the constant angular assignment 1/4 over D . By the Gauss- P P Bonnet theorem 4.3.1, we have v i nt D κ(v ) + v ∂ D τ(v ) = χ(D ) = 1. By (4.3), every interior vertex has non-positive curvature.∈ It follows∈ that X τ(v ) 1 (4.5) v ∂ D ≥ ∈ Remark that τ(v ) = (2 cv )/4 where cv is the number of corners incident to the bound- − ary vertex v . Call v convex, flat or concave if cv = 1, cv = 2 or cv 3 respectively. In other words v is convex, flat or concave if its curvature is respectively≥ 1/4, zero or negative. Inequality (4.5) implies that the boundary of D contains at least four more convex vertices than concave vertices. The lemma easily follows.
Corollary 4.5.2. A nontrivial contractible closed walk in a quadrangulation all of whose interior vertices have degree at least four contains either a spur or a bracket. 4.5. Canonical Representatives 64
PROOF. Suppose that a nontrivial contractible closed walk c has no spurs. By the van Kampen Lemma 4.2.1, c is the label of the boundary of a reduced disk diagram D . Let H be the dual graph of D : it has one dual vertex per quadrilateral of D and one dual edge for each pair of quadrilaterals sharing an edge. If H is connected then D is non- singular. Indeed, if the boundary of its outer facial walk ∂ D was not a cycle it would contain a degree one vertex, which would contradicts that c has no spurs. We can thus apply the four brackets Lemma 4.5.1 to conclude that ∂ D has at least one bracket. However, the turn t at a vertex of ∂ D is the same as the turn of the corresponding vertex in c (up to a multiple of the degree of that vertex in the quadrangulation). It follows that c has also a bracket. If H is not connected, then D consists of a tree- like arrangement of non-singular disks connected by trees through cut vertices. This arrangement has a “degree one” non-singular disk connected to the rest through a single cut vertex. By the four vertex theorem this disk has four brackets, two of which do not contain the cut vertex. These two brackets thus correspond to brackets in c .
Exercise 4.5.3. Show that we can actually claim the existence of a spur or four brackets in Corollary 4.5.2.
4.5.2 Bracket Flattening A bracket flattening consists in replacing a bracket and the two incident edges with the “straight line” between their endpoints. Some care must be taken when the incident edges of the bracket share their endpoints or when these edges are part of the bracket. Figure 4.5 depicts the different cases. Corollary 4.5.2 provides a practical algorithm to
2 -1 -1 2 2 -2 -2 1 2 2 21 1 2 -2 2 -2 2
-2
-2 -2 -2 -2 2 2 -3 -2 2 2 -2
Figure 4.5: Left, a typical bracket flattening. Middle, the edges incident to the bracket share their endpoints. Right, the bracket covers the whole closed walk.
test if a given closed walk c is contractible: remove the spurs and flatten the brackets until there is no more. Then c is contractible if and only if the resulting walk is reduced 4.5. Canonical Representatives 65 to a vertex. Since each spur removal or bracket flattening decreases the number of edges by two the number of steps is linear in c . Note that the non-typical bracket flattening (Figure 4.5, Right) may only occur when| | c is non-contractible (why?).
4.5.3 Canonical Representatives A homotopy class may contain distinct closed walks without spurs and brackets. In order to get a canonical representative in each homotopy class we further push such reduced walks as much as possible “to their right”. Say that a vertex of a walk is convex if its turn is 1 in the turn sequence of the walk. If a closed walk c contains a convex vertex v we consider the maximal subpath including v whose turning sequence has the form x 2∗12∗ y , where x , y = 2. This subpath, say p, bounds an L-shaped sequence of quadrilaterals that lies to its6 right. Replacing p by the complementary path bounding the sequence of quadrilaterals gives a closed walk homotopic to c with one less convex vertex. Note that this replacement does neither introduce a bracket nor a spur. Some care must again be taken when p covers c . See Figure 4.6 for all the possible typical and non-typical configurations. A right push reduces the number of convex vertices
2 2 2 2 2 3 2 2 2 2
2 2 2 2 2 2 1 2 2 2 1 2 2 2 1
-1 -1 -2 -1 -2 -2 -2 -1 -2 -2 -2 -2 -2 -2 -2 -1 -2 -2 -3 -3 -2 -3 -2 -2 -2
Figure 4.6: The different configurations for a right push. by one, so that only a linear number of pushes can be applied. A last exceptional case occurs when the turn sequence of c is composed of 2’s only. We also apply a right push in this case, which transforms the turn sequence into a sequence of 2¯ as on Figure 4.7. When no right pushes apply, the closed walk is said reduced .
Proposition 4.5.4. Let M be a quadrangulation all of whose vertices have degree at least five. Then each homotopy class contains a unique reduced closed walk.
PROOF. Let c and d be homotopic reduced closed walks. We need to show that c = d . Following Lemma 4.2.3 we consider a reduced annular diagram A for c and d . We first claim that the two boundaries of A are simple. Otherwise, one boundary has a 4.5. Canonical Representatives 66
-2 2 2 -2 -2 2 -2 -2 2 2 -2 2 2 2 -2 -2 -2
Figure 4.7: In case all the turns are equal to 2, we push the walk to the right to obtain a ¯ sequence 2∗ of turns.
cut vertex that separates A into a smaller annular part A0 and a disk part D connected to A0 through a single cut vertex. By the four brackets theorem, the boundary of D has one (in fact at least two) bracket disjoint from this cut vertex. In turn, this bracket would appear in c or d , contradicting the hypothesis that c and d are reduced.
If the two boundaries of A have a common vertex then cutting through that • vertex gives a disk diagram D 0 bounded by (circular permutations of) c and d . This diagram is a tree-like arrangement of non-singular disks connected by trees through cut vertices. For convenience, we also call cut vertices the two common endpoints of c and d . If a non-singular disk is incident to a single cut vertex, then it is bounded by a subpath of one of c or d . By the four bracket theorem this subpath would contain a bracket, in contradiction with the reduction hy-
pothesis. It follows that D 0 is a linear sequence of non-singular disks connected by simple paths (otherwise c or d would have a spur). We claim that none of those non-singular disks can have an interior vertex. Otherwise, considering
the constant angular assignment 1/4 over D 0, this interior vertex would have negative curvature. An argument similar to the proof of the four bracket the-
orem 4.5.1 shows that the boundary of D 0 would contain five brackets, one of which not incident to any cut vertex. This would again lead to the contradiction that c or d has a bracket. The dual graph of each non-singular disk is thus a tree. However, no matter the shape of this tree and no matter how its boundary is split one of the resulting boundary paths would contain a bracket or a convex vertex. In both cases this would contradict the fact that c and d are reduced. It
follows that D 0 has no non-singular disk, hence is a simple path, implying that c = d . Suppose now by way of contradiction that the two boundaries of A are disjoint. • Then we can argue similarly as above that A has no interior vertex. The dual graph of A is thus a single cycle with some attached trees. It must actually be a cycle, since otherwise one of the boundaries of A would have a bracket. This cycle has to go straight without bending since otherwise c or d would have a convex vertex or a bracket. (This last case occurs even with a single bend as on Figure 4.5, Right.) It follows that one of the boundaries of A has 2-turns only as on right Figure 4.7, contradicting that c and d are reduced. In any case we have reached a contradiction, so that the boundaries of A cannot be disjoint. 4.6. The Homotopy Test 67
A reduced closed walk can thus play the role of canonical representative for its ho- motopy class.
4.6 The Homotopy Test
We now have all the necessary ingredients to perform a linear time homotopy test. Thanks to Lemma 4.4.1, we can assume given two closed walks in a quadrangulation. We compute the canonical form of each closed walk by first removing spurs and brackets as described in Sections 4.5.2. We can first remove all the spurs in linear time. The flattening of a bracket may introduce new spurs but their removal can be charged to the removed edges, so that the total time spent to remove spurs is still linear in the end. Note that a flattening transforms a bracket into a flat part (a run of 2-turns or of 2¯-turns) that may be part of a larger flat part. In order to avoid loosing time for traversing several times the same flat parts, we add jump pointers between the endpoints of each flat part before we perform any flattening. We also store the turns at these endpoints and the length of the flat part. Then, after each bracket flattening we update the turns at the endpoints and check if the resulting flat part should be merged with the at most two surrounding flat parts. This can be done in constant time thanks to the jump pointers. This way each bracket flattening costs a constant time. Since each flattening decreases the number of edges, there can only be a linear number of them and the total cost for removing spurs and brackets is thus linear. The sequence of edges of the resulting closed walk is easily recovered from the jump pointers and the lengths of the flat parts. We just need to know one edge along the walk, which we can update easily as spurs and brackets are simplified. Once spurs and brackets have been removed we obtain a geodesic that needs to be pushed to its right as described in Section 4.5.3. Each right push transforms a subpath of the geodesic into another subpath of the same length without 1-turns or 2-turns. It follows that none of the vertices of this subpath will be pushed again. The total time needed to obtain a rightmost geodesic is thus linear. This shows that
Theorem 4.6.1. The canonical representative of a closed walk c in a quadrangulation, all of whose vertices have degree at least five, can be computed in O( c ) time. | |
Corollary 4.6.2. Given two closed walk of length at most ` in a combinatorial map of size n we can decide if they are homotopic in O(n + `) time.
PROOF. According to Lemma 4.4.1, we can reduce the combinatorial map to a quandrangulation in O(n) time and get closed walks homotopic to the given one in O(`) time. By Theorem 4.6.1 we can compute the canonical form of the walks in O(`) time. Now these canonical forms, say c and d , are homotopic if and only if one is a circular permutation of the other. This can be tested in linear time by checking whether c is a substring of d d thanks to the Knuth-Morris-Pratt string searching algorithm [KMP77][CLRS02, Sec.· 32.4]. 5
Minimum Weight Bases
Contents 5.1 Minimum Basis of the Fundamental Group of a Graph...... 69 5.2 Minimum Basis of the Cycle Space of a Graph...... 70 5.2.1 The Greedy Algorithm...... 70 5.3 Uniqueness of Shortest Paths...... 73 5.4 First Homology Group of Surfaces...... 74 5.4.1 Back to Graphs...... 74 5.4.2 Homology of Surfaces...... 75 5.5 Minimum Basis of the Fundamental Group of a Surface...... 77 5.5.1 Dual Maps and Cutting...... 77 5.5.2 Homotopy Basis Associated with a Tree-Cotree Decomposition 77 5.5.3 The Greedy Homotopy Basis...... 78 5.6 Minimum Basis of the First Homology Group of a Surface...... 80 5.6.1 Homology Basis Associated with a Tree-Cotree Decomposition 80 5.6.2 The Greedy Homology Basis...... 80
In the second lecture we saw that a graph could be associated with a vector space, called the cycle space. We will see that this cycle space can be extended to surfaces giving birth to the first homology group. We also introduced the fundamental group of a graph or of a surface in another lecture. Hence, we now have two group structures that encode the topology of a space X , where X is either a graph or a surface. These structures are both generated by closed walks in the graph of X and we call a basis any generating set with the minimum number of closed walks. In order to derive a more informative notion of minimality we assume that the edges of the considered graph have a positive weight. This allows to define the weight of a closed walk as the sum of its edge weights (counted with multiplicity). A minimum weight basis is then a
68 5.1. Minimum Basis of the Fundamental Group of a Graph 69 basis such that the sum of the weights of its members is minimum. The computation of minimum weight bases has received much attention when X is a graph and was studied more recently for combinatorial surfaces. Good references on the subject include a comprehensive survey on cycle bases in graphs by Kavitha et al. [KLM+09] and another survey on optimization of cycles and bases on surfaces by Erickson [Eri12]. We shall use the qualifiers minimum and shortest interchangeably to designate a walk, tree or subgraph of minimum weight.
5.1 Minimum Basis of the Fundamental Group of a Graph
Let G be a connected graph with basepoint v and let . : E R+ be a weight function. | | → The fundamental group π1(G , v ) is a free group whose rank is the number of chords of any spanning tree of G , which is 1 n + m, where n and m are respectively the number of vertices and edges of G . Indeed,− as we saw, every chord e of a spanning T tree T gives rise to a loop γv,e obtained by connecting v to each endpoint of the chord using paths in the tree, and these loops form a basis of π1(G , v ). Not all bases arise this way but a minimum one may indeed be obtained by this construction. For this, we take for T a shortest path tree with root v : every vertex w of G is linked to v by a path in T whose weight is minimum among all the paths from v to w in G . When all the weights are equal a shortest path tree can be computed by a breadth-first search traversal in time O(m). In the general case, one may use Dijkstra’s algorithm [CLRS09] T to compute a shortest path tree in O(m + n logn) time. Remark that γv,e is a shortest loop through the chord e .
Theorem 5.1.1. The basis of π1(G , v ) associated with a shortest path tree with root v is a minimum weight basis.
The following proof is based on an purely algebraic preliminary lemma. First note that a free group F over a set (x1, x2,..., xr ) gives rise to a free Abelian group (this is the a b same a free Z-module) F by making all the generators commute. Hence, if we let R be a b the set of relations xi x j = x j xi 1 i
Lemma 5.1.2. Let (x1, x2,..., xr ) and (y1, y2,..., yr ) be two bases of a free group F . De- note by yj (x1, x2,..., xr ) the expression of yj in terms of the basis (x1, x2,..., xr ). Then, there exists a permutation σ of 1,..., r such that for each i the coefficient of [xi ] in { } [yσ(i )(x1, x2,..., xr )] is nonzero.
PROOF. The automorphism of F defined by xi yi , 1 i r , quotients to an a b 7→ ≤ ≤ automorphism of F . Let ci j be the coefficient of [x j ] in [yi (x1, x2,..., xr )]. Viewing a b F as a free Z-module over the [xi ]’s, the matrix (ci j )1 i ,j r of this automorphism ≤ ≤Q has nonzero determinant. It follows that at least one term 1 i r ci σ(i ) of the usual Leibnitz expansion of the determinant must be nonzero. This implies≤ ≤ the lemma. 5.2. Minimum Basis of the Cycle Space of a Graph 70
PROOFOF THEOREM 5.1.1. Let T be a shortest path tree from v . We denote by e1,e2,...,er the chords of T in G . Let (b1, b2,..., br ) be a basis for π1(G , v ). Accord- ing to the preliminary lemma, there is a permutation σ of 1,..., r such that the coefficient of γT in b is nonzero. It follows that b goes{ through} e , hence is [ v,ei ] [ σ(i )] σ(i ) i at least as long as γT by the remark before the theorem. As a direct consequence v,ei P P T i bi i γv,e . | | ≥ | i | 5.2 Minimum Basis of the Cycle Space of a Graph
As we saw, the set of Eulerian subgraphs Z (G ) of a connected graph G can be given a vector space structure over the coefficient field Z/2Z. We also observed that a basis could be obtained from any spanning tree T of G by considering for each chord e of T T the cycle γe composed of e and the path in T connecting e ’s endpoints. Such a basis is called a fundamental cycle basis. As opposed to the case of the fundamental group, a minimum weight basis of the cycle space is not always a fundamental cycle basis. The counterexample in Figure 5.1 was found by Hartvigsen and Mardon [HM93].
In general, looking for the minimum weight fundamental basis is NP-hard [DPeK82].
½ ½
½ ½
½ ½
Figure 5.1: Each spanning tree in this graph is a path of length 2. The corresponding fundamental basis is composed of two cycles of length 2 and two cycles of length 3 leading to a fundamental cycle basis of total weight 10. However, a minimum weight basis of total weight 9 is given by the three outer cycles of length 2 and the central triangle.
However, Horton [Hor87] proved that computing a minimum weight basis with Z/2Z coefficients can be done in polynomial time. His algorithm is based on the greedy algorithm over combinatorial structures called matroids.
5.2.1 The Greedy Algorithm
As a vector space, Z (G ) inherits a matroid structure. A matroid is indeed an abstraction of a vector space that only retains linear dependencies. It is defined by a ground set S (intuitively the set of vectors) and a nonempty family of independent sets 2S that satisfies I ⊂
the hereditary property: J and I J implies I , and • ∈ I ⊂ ∈ I the exchange property: I , J and I < J implies that I x for some • x J I . ∈ I | | | | ∪ { } ∈ I ∈ \ 5.2. Minimum Basis of the Cycle Space of a Graph 71
A basis is just a maximally independent set. By the exchange property, all the bases have the same cardinality. Matroid theory was introduced by Hassler Whitney (1935) and has many applications including combinatorial optimization, discrete geometry, etc. When the elements of the ground set are weighted, there is a famous greedy algorithm that determines a minimum weight basis. It works as follows: maintain an independent set starting from the empty set, and iteratively add an element x to the current set I if I x is independent and if x has minimum weight among such elements. The algorithm∪ { } stops when no x can be found, i.e. when I is a basis. In practice, the elements of S are scanned in increasing order of weights, so that each time an x is found such that I x is independent it can be added to the current I . The whole set S is thus scanned∪ only { } once during the algorithm.
Theorem 5.2.1. The greedy algorithm returns a minimum weight basis.
PROOF. Let (x1, x2,..., xr ) be the basis returned by the greedy algorithm, where xi is the i th inserted element. By the choice of each element we have x1 x2 xr , | | ≤ | | ≤ ··· ≤ | | where x is the weight of x . Consider any other basis (y1, y2,..., yr ) indexed in non- decreasing| | order: y1 y2 yr . Suppose by way of contradiction that there is some index i such| that| ≤ |yi |< ≤x ···i ≤and | | choose such i as small as possible. Then, by the exchange property we can| | find| y| y1,..., yi such that x1,..., xi 1, y is independent. − Since y yi < xi this would contradict∈ { the} choice of{xi . It follows that} yi xi for | | ≤ | | | | | | ≥ | | all i , implying that (x1, x2,..., xr ) has minimum weight.
Since the cycle space contains 2r cycles, the greedy algorithm per se does not seem very efficient. In order to restrict the search of a new basis element at each step of the algorithm, Horton [Hor87] gave a characterization of the cycles that may belong to a minimum weight basis.
Lemma 5.2.2. Suppose b = c +d is a cycle of a basis B of Z (G ). Then either B b c or B b d is a basis. \{ }∪{ } \{ } ∪ { }
PROOF. If c and d were both in the linear span of B b , then so would b . \{ } Corollary 5.2.3. Assuming positive weights, the cycles of a minimum weight basis are simple.
PROOF. Suppose that b is a non-simple cycle of a minimum weight basis B. Then b can be written as the sum b = c + d of two edge disjoint cycles. In particular, b is longer than c or d . By the preceding lemma, we can replace b by c or d in B to get a shorter basis, contradicting the minimality of B.
Note: if some of the weights cancel, then basically the same proof shows the existence of a minimum weight basis with simple cycles only. 5.2. Minimum Basis of the Cycle Space of a Graph 72
Lemma 5.2.4. Let b be a cycle of a minimum weight basis. Let p and q be two edge 1 disjoint paths such that b = p q − . Then p or q is a shortest path. ·
PROOF. Let t be a shortest path from the common initial vertex of p and q to their 1 1 common last vertex. With a little abuse of notation, we can write b = p t − +t q − . By 1 1 · · Lemma 5.2.2, b must be no longer than p t − or t q − , implying with Corollary 5.2.3 that either q or p is a shortest path. · ·
Corollary 5.2.5. Let v be a vertex of a cycle b of a minimum weight basis. Then b 1 decomposes into p a q − where a is an arc and p, q are two shortest paths with v as initial vertex. · ·
PROOF. Consider the arc sequence (a1,a2,...,ak ) of b with v the origin vertex of a1 and the target of ak . Let i be the maximal index such that (a1,a2,...,ai ) is a shortest path. Then b = (a1,a2,...,ai ) ai +1 (ai +2,...,ak ) and the previous lemma implies that · · (ai +2,...,ak ) is a (possibly empty) shortest path
When there is a unique shortest path between every pair of vertices, this corollary allows us to reduce the number of scanned cycles at each addition step of the greedy algorithm to nm cycles, one for each (vertex, edge) pair. For the rest of this section, we assume uniqueness of shortest paths and discuss the general case in the next section.
We denote by γv,e the cycle obtained by connecting the endpoints of e with shortest T paths to v . By the uniqueness of shortest paths, γv,e = γv,e where T is the shortest path tree rooted at v .
Proposition 5.2.6. Let G = (V, E ) be a connected graph with n vertices and m edges and let r = 1 n + m be the rank of its cycle space. A minimum weight basis of Z (G ) 2 2 3 can be computed− in O(n logn + r nm) = O(nm ) time.
PROOF. By Corollary 5.2.5, we can restrict the scan step of the greedy algorithm to the cycles γv,e with (v,e ) V E . For each vertex v , we compute a shortest path tree T in O(n logn +m) time using∈ × Dijkstra’s algorithm. There are r nontrivial cycles of the T form γv,e , each of size O(n). Their computation and storage for all the vertices v thus requires O n(n logn + m + r n) time. They can be sorted according to their length in O(r n log(r n)) time. In order to check if a cycle is independent of the current family of E basis elements, we view a cycle as a vector in (Z/2Z) . We use Gauss elimination to maintain the current family in row echelon form. This family has at most r vectors and testing a new vector against this family by Gauss elimination needs O(r m) time. 2 The cumulated time for testing independence is thus O(r nm). The whole greedy algorithm finally takes time