Graph Theory by Tero Harju

Reviews
Shared by: Andrew Belous
Stats
views:
560
rating:
4(1)
reviews:
0
posted:
10/3/2007
language:
English
pages:
0
Lecture Notes on GRAPH THEORY Tero Harju Department of Mathematics University of Turku FIN-20014 Turku, Finland e-mail: harju@utu.fi 2007 Contents 1 Introduction 2 1.1 Graphs and their plane figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Subgraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 Paths and cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 16 Connectivity of Graphs 2.1 Bipartite graphs and trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2 Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Tours and Matchings 3.1 Eulerian graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Hamiltonian graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Matchings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Colourings 4.1 Edge colourings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Ramsey Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Vertex colourings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Graphs on Surfaces 5.1 Planar graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Colouring planar graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Genus of a graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 30 32 36 43 43 47 52 60 60 67 74 2 3 4 5 6 83 Directed Graphs 6.1 Digraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.2 Network Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 96 Index 1 Introduction Graph theory can be said to have its beginning in 1736 when E ULER considered the (general case of the) Königsberg bridge problem: Is there a walking route that crosses each of the seven bridges of Königsberg exactly once? (Solutio Problematis ad geometriam situs pertinentis, Commentarii Academiae Scientiarum Imperialis Petropolitanae 8 (1736), pp. 128-140.) It took 200 years before the first book on graph theory was written. This was done by KÖNIG in 1936. (“Theorie der endlichen und unendlichen Graphen”, Teubner, Leipzig, 1936. Translation in English, 1990.) Since then graph theory has developed into an extensive and popular branch of mathematics, which has been applied to many problems in mathematics, computer science, and other scientific and not-so-scientific areas. For the history of early graph theory, see N.L. B IGGS , R.J. L LOYD Press, 1986. AND R.J. W ILSON, “Graph Theory 1736 – 1936”, Clarendon There seem to be no standard notations or even definitions for graph theoretical objects. This is natural, because the names one uses for these objects reflect the applications. So, for instance, if we consider a communications network (say, for email) as a graph, then the computers, which take part in this network, are called nodes rather than vertices or points. On the other hand, other names are used for molecular structures in chemistry, flow charts in programming, human relations in social sciences, and so on. These lectures study finite graphs and majority of the topics is included in J.A. B ONDY AND U.S.R. M URTY, “Graph Theory with Applications”, Macmillan, 1978. R. D IESTEL, “Graph Theory”, Springer-Verlag, 1997. F. H ARARY, “Graph Theory”, Addison-Wesley, 1969. D.B. W EST, “Introduction to Graph Theory”, Prentice Hall, 1996. R.J. W ILSON, “Introduction to Graph Theory”, Longman, (3rd ed.) 1985. In these lectures we study combinatorial aspects of graphs. For more algebraic topics and methods, see N. B IGGS, “Algebraic Graph Theory”, Cambridge University Press, (2nd ed.) 1993. and for computational aspects, see S. E VEN, “Graph Algorithms”, Computer Science Press, 1979. 3 In these lecture notes we mention several open problems that have gained respect among the researchers. Indeed, graph theory has the advantage that it contains easily formulated open problems that can be stated early in the theory. Finding a solution to any one of these problems is on another layer of difficulty. Sections with a star (£) in their heading are optional. Notations and notions ¯ For a finite set ¯ Let and in general, , denotes its size (cardinality, the number of its elements). ½ Ò℄ Ò Ò℄ Ü Ü ½¾ ·½ and Ò Ò Ü are the integers Ü ÑÒ ¾ Ü of a set is a partition of , if for all different and for integers . ¯ For a real number , the floor and the ceiling of ¯ A family ¯ For two sets Ü Ñ Ü ¾ ¾ ½ of subsets ¾½ and , and ℄ ¢ ´Ü ݵ Ü ¾ ݾ is their Cartesian product. ¯ For two sets and , is their symmetric difference. Here ¯ Two numbers ¾ Æ (often and parity, if both are even, or both are odd, that is, if opposite parity. Ò Ò ´ Ò µ ´ Ò µ Ò Ü Ü¾ ܾ Ò for sets . and ) have the same . Otherwise, they have ´ÑÓ ¾µ Graph theory has abundant examples of NP-complete problems. Intuitively, a problem is in P 1 if there is an efficient (practical) algorithm to find a solution to it. On the other hand, a problem is in NP 2 , if it is first efficient to guess a solution and then efficient to check that NP. This is one of the this solution is correct. It is conjectured (and not known) that P great problems in modern mathematics and theoretical computer science. If the guessing in NP-problems can be replaced by an efficient systematic search for a solution, then P NP. For any one NP-complete problem, if it is in P, then necessarily P NP. ½ Solvable – by an algorithm – in polynomially many steps on the size of the problem instances. ¾ Solvable nondeterministically in polynomially many steps on the size of the problem instances. 1.1 Graphs and their plane figures 4 1.1 Graphs and their plane figures Î be a finite set, and denote by ´Î µ Ù Ú Ù Ú ¾ Î Ù Ú the subsets of Î of two distinct elements. Let D EFINITION . A pair with is called a graph (on ). The elements of are the vertices, and those of the edges of the graph. The vertex set of a graph is denoted by and its edge set by . Therefore . Î ´Î µ ´Î µ Î Î ´Î µ In literature, graphs are also called simple graphs; vertices are called nodes or points; edges are called lines or links. The list of alternatives is long (but still finite). is usually written simply as . Notice that then A pair . simplify notations, we also write ¾ instead of ¾ ÙÚ Ú ÙÚ Ú Î ÙÚ ÚÙ. In order to D EFINITION . For a graph , we denote Î The number if ¾ each other. and ÙÚ ¾ ÙÚ of the vertices is called the order of , and is the size of . For an edge , the vertices and are its ends. Vertices and are adjacent or neighbours, . Two edges ½ and ¾ having a common end, are adjacent with Ù Ú ÙÚ ÙÛ Ù Ú A graph can be represented as a plane figure by drawing a line (or a curve) between the points and (representing vertices) if is an edge of . The figure on the right is a drawing of the graph with ½ ¾ ¿ and . ½ ¾ ½ ¿ ¾ ¿ ¾ the vertices are drawn as anonymous circles. Graphs can be generalized by allowing loops and parallel (or multiple) edges between , where vertices to obtain a multigraph ½ ¾ Ñ is a set (of symbols), and ¾ is a function that attaches an unordered pair of . vertices to each ¾ : Note that we can have ½ ¾ . This is drawn in the figure of by placing two (parallel) edges that connect the common ends. On the right there is (a drawing of) a multiand edges , graph with vertices ½ , , and . ¾ ¿ Ú½ Ú¿ Ú Ù Ú ÙÚ Î Ú Ú Ú Ú Ú Ú Ú¾ Ú Ú ÚÚ ÚÚ ÚÚ ÚÚ ÚÚ Often we shall omit the identities (names Ú ) of the vertices in our figures, in which case ´Î µ ÚÚ Ú Î ´ µ ÙÚ ´ µ ´ µ ´ µ ´Î ÚÚ µ ´ µ ´ µ Î ´ µ 1.1 Graphs and their plane figures Later we concentrate on (simple) graphs. D EFINITION . We also study directed graphs or digraphs , where the edges have a direction, that is, the edges are ordered: ¢ . In this case, . 5 ´Î µ Î Î ÚÙ ÙÚ ÚÙ The directed graphs have representations, where the edges are drawn as arrows. A digraph and of opposite directions. can contain edges ÙÚ Graphs and digraphs can also be coloured, labelled, and weighted: D EFINITION . A function is a vertex colouring of by a set of colours. A function is an edge colouring of . Usually, for some . Ê (often Æ ), then is a weight function or a distance function. If à « à à « Î Ã « à ½ ℄ à ½ Isomorphism of graphs D EFINITION . Two graphs and bijection À such that « Î Î À are isomorphic, denoted by ´µ «´Ùµ«´Úµ ¾ À À , if there exists a ÙÚ ¾ for all Ù Ú¾ . are isomorphic if the vertices of are renamings of those of . Two Hence and isomorphic graphs enjoy the same graph theoretical properties, and they are often identified. In particular, all isomorphic graphs have the same plane figures (excepting the identities of the vertices). This shows in the figures, where we tend to replace the vertices by small circles, and talk of ‘the graph’ although there are, in fact, infinitely many of such graphs. Example 1.1. The following graphs are isomorphic. Indeed, the required isomorphism , ¾ , ¿ , is given by ½ , . Ú¾ Ú Ú½ Ú Ú¿ ½ ¿ ¾ À À Ú ¾Ú Ú ½ Ú ¿ Ú Isomorphism Problem. Does there exist an efficient algorithm to check whether any two given graphs are isomorphic or not? The following table lists the number ¾ of graphs on a given set of vertices, and the number of nonisomorphic graphs on vertices. It tells that at least for computational purposes an efficient algorithm for checking whether two graphs are isomorphic or not would be greatly appreciated. Ò ¾´ µ Ò Ò 1.1 Graphs and their plane figures 6 6 Ò graphs nonisomorphic 1 2 3 ½ ¾ ½ ¾ ½¼¾ ¿¾ ½½ ¿ ½ 4 5 ¾¼ ½ ¾ ¾ ¿ ½¼ ½¾¿ 7 8 ¾ 9 ¿ ¾ ¡ ½¼ ½¼ Other representations Plane figures catch graphs for our eyes, but if a problem on graphs is to be programmed, then these figures are (to say the least) unsuitable. Matrices of integers are ideal for computers, since every respectable programming language has array structures for these, and computers are good in crunching numbers. Let ½ Ò be ordered. The adjacency matrix of is the ¢ -matrix with entries or according to whether ¾ or not. For instance, the graphs of Example 1.1 has an adjacency matrix on the right. Notice that the adjacency matrix is always symmetric (with respect to its diagonal consisting of zeros). Î ¼ Ú Ú Ò Ò Å ÚÚ Å ½ Å ¼ ¼ ½ ½ ¼ ½ ½ ¼ ¼ ½ ½ ½ ¼ ¼ ½ ¼ ¼ ½ ½ ¼ ¼ ½½ ½ ¼ ¼ ¼ Î A graph has usually many different adjacency matrices, one for each ordering of its set of vertices. The following result is obvious from the definitions. are isomorphic if and only if they have a common adTheorem 1.1. Two graphs and jacency matrix. Moreover, two isomorphic graphs have exactly the same set of adjacency matrices. Graphs can also be represented by sets. For this, let ily of subsets of a set , and define the intersection graph for all and ( ) with ½ Ò , and edges Ò be a famas the graph with vertices . ½ ¾ À Theorem 1.2. Every graph is an intersection graph of some family of subsets. Proof. Let be a graph, and define, for all Ú Ú ¾ , a set Ú Ù ÚÙ ¾ . Then Ù Ú if and only if Let be the smallest size of a base set such that section graph of a family of subsets of , that is, ×´ µ ÙÚ ¾ Ø Ù can be represented as an inter- ×´ µ Ñ Ò ×´ µ ×´ µ for some ¾ How small can be compared to the order (or the size ) of the graph? It was shown by KOU , S TOCKMEYER AND W ONG (1976) that it is algorithmically difficult to determine the number – the problem is NP-complete. 1.2 Subgraphs 7 Example 1.2. As yet another example, let Æ be a finite set of natural numbers, and let be the graph defined on such that ¾ if and only if and (for ) have a common divisor . As an exercise, we state: All graphs can be represented in the form for some set of natural numbers. Ö ´ × µ Ö × Î ½ Ö× ´ µ 1.2 Subgraphs Ideally, in a problem the local properties of a graph determine a solution. In such a situation we deal with (small) parts of the graph (subgraphs), and a solution can be found to the problem by combining the information determined by the parts. For instance, as we shall see later on, the existence of an Euler tour is very local, it depends only on the number of the neighbours of the vertices. Degrees of vertices D EFINITION . Let Ú¾ be a vertex a graph . The neighbourhood of The degree of If The minimum degree and the maximum degree of Ú is the number of its neighbours: ´Úµ Æ ´Úµ ´Úµ ¼, then Ú is said to be isolated in , and if ´Úµ ½, then Ú is a leaf of the graph. are defined as Æ ´Úµ Ù¾ ÚÙ ¾ Ú is the set Æ´ µ Ñ Ò ´Úµ Ú ¾ and ¡´ µ Ñ Ü ´Úµ Ú ¾ The following lemma, due to E ULER (1736), tells that if several people shake hands, then the number of hands shaken is even. Lemma 1.1 (Handshaking lemma). For each graph Ú¾ , ´Úµ ¾ ¡ Moreover, the number of vertices of odd degree is even. Proof. Every edge first one. ¾ has two ends. The second claim follows immediately from the Ø Ù Lemma 1.1 holds equally well for multigraphs, when is defined as the number of edges that have as an end, and when a loop is counted twice. Ú ÚÚ ´Úµ ´Î ´Úµ do not determine . Indeed, there are graphs Note that the degrees of a graph and À on the same set of vertices that are not isomorphic, but for which for all ¾ . À µ À ´Î µ ´Úµ Ú Î 1.2 Subgraphs 8 ´Ù Ú Ü Ýµ D EFINITION . Let be a graph. A -switch of , for ¾ and ¾ , replaces the edges and by and . ¾ ÙÚ ÜÝ ÙÜ ÚÝ ÙÚ ÜÝ ÙÜ ÚÝ Ò Ú Ù Ý Ü Ú Ù Ý Ü Before proving Berge’s switching theorem we need the following tool. Lemma 1.2. Let be a graph of order with a degree sequence ½ ¡ ¡ ¡ Ò, where ¾ . There is a graph ¼ which is obtained from by a sequence of -switches such ¼ ½ that ¾ ½ ·½ . Ú ¡´ µ ´ µ. Suppose that there exists a vertex Ú Proof. Denote such that Ú Ú ¾ . Since ´Ú µ , there exists a Ú with · ¾ such that Ú Ú ¾ . Here , since . Since Ú Ú ¾ , there exists a ÚØ (¾ Ø Ò) Ú½ such that Ú ÚØ ¾ , but Ú ÚØ ¾ . We can now perform a ¾-switch with respect to the vertices Ú Ú Ú ÚØ . This gives a new graph À , where Ú Ú ¾ À and Ú Ú ¾ À , and the other neighbours of Ú remain to be its neighbours. When we repeat this process for all indices with Ú Ú ¾ for ¾ ½ ½ ½ ½ ½ ½ ½ ½ ½ ´Ú µ Æ ´Ú µ Ú ¾ with Ú ¾ ·½ Ú ÚØ a graph ¼ as in the claim. ½ ·½, we obtain Ø Ù Theorem 1.3 (B ERGE (1973)). Two graphs for all ¾ if and only if À -switches. ¾ ´Úµ ´Úµ Ú Î and À on a common vertex set Î satisfy À can be obtained from by a sequence of is obtained from by a -switch, then clearly has the same degrees Proof. If a graph as . In the other direction, we use induction on the order . Let and have the same . By Lemma 1.2, there are sequences of -switches that transform degrees, and let ¼ ½ to ¼ and to ¼ such that ¾ ·½ À ¼ ½ . Now the graphs ¼   ½ and ¼   ½ have the same degrees. By induction hypothesis, ¼ , and thus also , can be transformed to ¼ by a sequence of -switches. Finally, we observe that ¼ can be transformed to by the ‘inverse sequence’ of -switches, and this proves the claim. Ø Ù À ¾ À Ú ¡´ µ À À À Ú À À ¡¡¡ ½ Æ ´Ú µ Ú Ú ¾ Æ ´Ú µ À ¾ ¾ À D EFINITION . Let ´Î µ with Î ½ ¾ Ú Ú ¾ Ò be a descending sequence of nonnegative integers, that is, . Such a sequence is said to be graphical, if there exists a graph Ò for all . ½ ¾ Ò such that Ú ´Ú µ Using the next result recursively one can decide whether a sequence of integers is graphical or not. 1.2 Subgraphs Theorem 1.4 (H AVEL (1955), H AKIMI (1962)). A sequence ) is graphical if and only if 9 ½ ¾ Ò ¾ Ò (with Ò ½ ½ and (1.1) ¾  ½ ¿  ½ ½ ·½   ½ ½ ·¾ ½ ·¿ is graphical (when put into nonincreasing order). Ò   ½ with vertices (and degrees) ´Ú µ  ½ ´Ú ½ µ ½   ½ ´Ú ½ µ ½ ´ÚÒ µ Ò as in (1.1). Add a new vertex Ú and the edges Ú Ú for all ¾ ¾ ½ ℄. Then in this new graph À , À ´Ú µ , and À ´Ú µ for all . ´Ú µ . By Lemma 1.2 and Theorem 1.3, we can suppose that (µ) Assume Æ ´Ú µ Ú Ú ½ . But now the degree sequence of  Ú is in (1.1). Ø Ù Example 1.3. Consider the sequence × ¿ ¾ ½. By Theorem 1.4, Proof. (´) Consider of order ¾ ¾ ·½ ·½ ·¾ ·¾ ½ ½ ·½ ½ ½ ½ ¾ ·½ ½ × is graphical ´µ ¿ ¿ ¾ ½ ½ is graphical ¾ ½ ½ ¼ is graphical ¼ ¼ ¼ is graphical The last sequence corresponds to a discrete graph à , and hence also our original sequence × is graphical. Indeed, the ¿ Ú¾ Ú Ú½ Ú¿ Ú Ú graph on the right has this degree sequence. Special graphs D EFINITION . A graph is nontrivial. ´Î µ is trivial, if it has only one vertex, i.e., ´Î µ Î ½; otherwise The graph Î is the complete graph on , if every two vertices are adjacent: . All complete graphs of order are isomorphic with each other, and they will be denoted by Ò . Ã Ò Ã ¾ . The The complement of is the graph on , where complements Î of the complete graphs are called discrete graphs. In a discrete graph . Clearly, all discrete graphs of order are isomorphic with each other. A graph is said to be regular, if every vertex of has the same degree. If this degree is equal to , then is -regular or regular of degree . Ã Î Ò Ã ¾ ´Î µ Ö Ö Ö 1.2 Subgraphs Note that a discrete graph is 0-regular, and a complete graph Ò is   for all graphs   , and therefore particular, ÃÒ . 10 Ò ¿ Ò´Ò ½µ ¾ Ò´Ò ½µ ¾ à ´Ò   ½µ-regular. In that have order Example 1.4. The graph on the right is the Petersen graph that we will meet several times (drawn differently). It is a -regular graph of order . ½¼ Example 1.5. Let For instance, ¿ -cube, with É one place. Î ½ be an integer, and consider the set of all binary strings of length . ¼¼¼ ¼¼½ ¼½¼ ½¼¼ ¼½½ ½¼½ ½½¼ ½½½ . Let É be the graph, called the , where ÙÚ ¾ É if and only if the strings Ù and Ú differ in exactly ¾ 110 100 101 010 000 001 011 111 is É , the number of binary strings of The order of is -regular, and so, by the handshaking length . Also, lemma, É ¡  ½. On the right we have the -cube, or simply the cube. É É ¾ ¿ Example 1.6. Let regular graph with shaking lemma. , then If graph of order Let À Ò be any even number. We show by induction that there exists a . Notice that all -regular graphs have even order by the hand- Ò ¿ ¿ Ò Ã is ¿-regular. Let be a ¿-regular ¾Ñ   ¾, and suppose that ÙÚ ÙÛ ¾ . Î Î Ü Ý , and À ´ Ò ÙÚ ÙÛ µ ÙÜ ÜÚ ÙÝ ÝÛ ÜÝ Then À is ¿-regular of order ¾Ñ. Ü Û Ù Ý Ú Subgraphs D EFINITION . A graph is a subgraph of a graph , denoted by , if À and . A subgraph spans (and is a spanning subgraph of ), if every À vertex of is in , i.e., À . is an induced subgraph, if À Also, a subgraph À . In this case, is induced by its set À of vertices. À À Î À À Î Î À À À Î Î ´Î µ À ¾ ´ÎÀ µ. To each nonempty subset In an induced subgraph , the set Î such that À of edges consists of all ¾ , there corresponds a unique induced subgraph ℄ ´ ´ µµ 1.3 Paths and cycles To each subset of edges there corresponds a unique spanning subgraph of , 11 ℄ ´Î µ subgraph spanning induced For a set of edges, let   Ò ℄ be the subgraph of obtained by removing (only) the edges ¾ from . In particular,   is obtained from by removing ¾ . , if each ¾ (for is added to . Similarly, we write For a subset that is, Î · of vertices, we let   ´Î µµ Ú be the subgraph induced by Î Ò , and, e.g.,   is obtained from by removing the vertex together with the edges that have as their end. Many problems concerning (induced) subgraphs are algorithmically difficult. For instance, to find a maximal complete subgraph (a subgraph Ñ of maximum order) of a graph is unlikely to be even in NP. Ú Ú   Î Ò ℄ à Reconstruction Problem. The famous open problem, Kelly-Ulam problem or the Reconstruction Conjecture, states that a graph of order at least is determined up to isomorphism by its vertex deleted subgraphs   ( ¾ ): if there exists a bijection À such .   for all , then that   Ú À «´Úµ Ú ÚÚ ¿ À « Î Î 1.3 Paths and cycles The most fundamental notions in graph theory are practically oriented. Indeed, many graph theoretical questions ask for optimal solutions to problems such as: find a shortest path (in a complex network) from a given point to another. This kind of problems can be difficult, or at least nontrivial, because there are usually choices what branch to choose when leaving an intermediate point. 1.3 Paths and cycles 12 Walks D EFINITION . Let compatible in the sense that ÙÙ Ù ¾ ·½ ¾ be edges of for is adjacent to ·½ for all ¾ is a walk of length from ½ to Ù Ï ·½ ¾ ½ ℄. Here and ½   ½℄. The sequence ·½ are ½ ¾ . We write, more informally, Ï Ù   Ù Write Ù   Ú to say that there is a walk of some length from Ù to Ú . Here we understand that Ï Ù   Ú is always a specific walk, Ï , although we sometimes do not care to mention the edges it uses. The length of a walk Ï is denoted by Ï . ½ ·½ Ï Ù  Ù    Ù  Ù or ½ ·½ ½ ¾ D EFINITION . Let ( ½ ¾ ·½ ) be a walk. is closed, if ½ ·½ . is a path, if for all . is a cycle, if it is closed, and for except that ½ is a trivial path, if its length is 0. A trivial path has no edges.   ·½ , also For a walk ½   Ï Ï Ï Ï Ï Ù Ù Ù Ù ÙÙ Ù Ù Ù Ù Ù ·½ . Ï Ù Ù Ï  Ú Ù ½ Ú ·½   is a walk in , called the inverse walk of . A vertex is an end of a path , if starts or ends in .   and ¾   is the walk ½ ¾   . (Here The join of two walks ½ the end must be common to the walks.) Paths and are disjoint, if they have no vertices in common, and they are independent, if they can share only their ends. Ù Ú È È Ï Ù Ú Ï Ú Ï  Ù ½ Ù ÏÏ Ù Û Û Ù È É Clearly, the inverse walk two paths need not be a path. È  ½ of a path È is a path (the inverse path of È ). The join of A (sub)graph, which is a path (cycle) of length   ( , resp.) having vertices is denoted by ( , resp.). If is even (odd), we say that the path or cycle is even (odd). Clearly, all paths of length are isomorphic. The same holds for cycles of fixed length. ½ È È È Ù Ú Lemma 1.3. Each walk   with contains a path   , that is, there is a path   that is obtained from by removing edges and vertices. È Ù Ú Ï Ù Ú Ù Ú Ï 1.3 Paths and cycles 13 Proof. Let   ·½ . Let be indices such that . If ½       no such and exist, then , itself, is a path. Otherwise, in ½ ¾ ¿     is a shorter walk. By repeating this   the portion ½ ½ ¿ argument, we obtain a sequence ½ ¾ with ¡¡¡ Ñ of walks   ½ . When the procedure stops, we have a path as required. (Notice that in the above it may Ñ very well be that ½ or ¿ is a trivial walk.) Ø Ù Ù Í Ï Ù Ù Ù Ú Ï Í ÏÏ Ù Ù Ù Ú Í Í Í Ï Ï ´Ù Úµ Ñ Ò Ù Ù Ï ÏÏÏ Ù Ù Ú Ù Ú Ï Í Ù to Ú in , let D EFINITION . If there exists a walk (and hence a path) from Ù  Ú be the distance between Ù and Ú . If there are no walks Ù   Ú , let ´Ù Úµ ½ by convention. A graph is connected, if ´Ù Úµ ½ for all Ù Ú ¾ ; otherwise, it is disconnected. The maximal connected subgraphs of If ´ µ ½, then À Î ´ µ are its connected components. Denote the number of connected components of is, of course, connected. The maximality condition means that a subgraph is a connected component if and is connected and there are no edges leaving , i.e., for every vertex ¾ , the only if subgraph is disconnected. Apparently, every connected component is an induced À subgraph, and À Ú℄ À Ú À Æ £ ´Úµ Ù is the connected component of form a partition of . that contains Ú¾ ´Ú Ùµ ½ . In particular, the connected components Shortest paths D EFINITION . Let weight function « « be an edge weighted graph, that is, Ê on its edges. For , let «´Àµ À ¾ « is a graph together with a «´ µ be the (total) weight of . In particular, if is a path, then its weight is ½ ¾ È . The minimum weighted distance between two vertices is ½ «   «´Èµ «´ µ À È À ´Ù Úµ Ñ Ò «´Èµ È Ù Ú In extremal problems we seek for optimal subgraphs In practice we encounter situations where might represent À satisfying specific conditions. ¯ ¯ ¯ a distribution or transportation network (say, for mail), where the weights on edges are distances, travel expenses, or rates of flow in the network; a system of channels in (tele)communication or computer architecture, where the weights present the rate of unreliability or frequency of action of the connections; a model of chemical bonds, where the weights measure molecular attraction. 1.3 Paths and cycles 14 In these examples we look for a subgraph with the smallest weight, and which connects two given vertices, or all vertices (if we want to travel around). On the other hand, if the graph represents a network of pipelines, the weights are volumes or capacities, and then one wants to find a subgraph with the maximum weight. be a graph with an integer weight We consider the minimum problem. For this, let Æ . In this case, call the length of . function « «´ÙÚµ ÙÚ The shortest path problem: Given a connected graph for given ¾ . find « ´Ù Úµ ÙÚ with a weight function « «´ÙÚµ Æ, Ù Ú, where Ù is a fixed starting point and Ú ¾ if ÙÚ ¾ . Dijkstra’s algorithm: (i) Set Assume that is a connected graph. Dijkstra’s algorithm solves the problem for every pair . Let us make the convention that ½, Ù, Ø´Ù µ ¼ and Ø´Úµ ½ for all Ú Ù .   ½℄: for each Ú ¾ Ù Ù , (ii) For ¾ ¼ replace Ø´Úµ by Ñ Ò Ø´Úµ Ø´Ù µ · «´Ù Úµ Let Ù ¾ Ù Ù be any vertex with the least value Ø´Ù µ. « ´Ù Úµ Ø´Úµ. (iii) Conclusion: ¼ ¼ ¼ ½ ·½ ½ ·½ Ù Example 1.7. Consider the following weighted graph vertex ¼ . ¼ ¼ ¼ Ú ¯ Ù Ú , Ø´Ù µ ¼, others are ½. ¯ Ø´Ú µ Ñ Ò ½ ¾ ¾, Ø´Ú µ Ñ Ò ½ ¿ ¿, Ú½ Ú. others are ½. Thus Ù ¯ Ø´Ú µ Ñ Ò ¿ Ø´Ù µ · «´Ù Ú µ Ñ Ò ¿ ¿, Ø´Ú µ ¾·½ ¿, Ø´Ú µ ¾·¿ , Ø´Ú µ ¾·¾ Ú¼ . Thus choose Ù Ú. Ú¾ ¯ Ø´Ú µ Ñ Ò ¿ ½ ¿, Ø´Ú µ Ñ Ò ¿·¾ , Ø´Ú µ Ñ Ò ¿ · ½ . Thus set Ù Ú . ¯ Ø´Ú µ Ñ Ò ¿ · ½ , Ø´Ú µ Ñ Ò ½ . Thus choose Ù ¯ Ø´Ú µ Ñ Ò · ½ . The algorithm stops. ½ ¾ ½ ½ ¾ ¾ ½ ½ ¾ ¿ ¾ ¿ ¾ ¿ ¾ ¿ ¾ . Apply Dijkstra’s algorithm to the ¾ ½ Ú¿ ¾ ¾ ½ ¿ Ú ½ Ú Ú. We have obtained: Ø´Ú µ ¾ Ø´Ú µ ¿ Ø´Ú µ ¿ Ø´Ú µ These are the minimal weights from Ú to each Ú . ½ ¾ ¿ ¼ Ø´Ú µ 1.3 Paths and cycles The steps of the algorithm can also be rewritten as a table: 15 Ú 2 Ú 3 Ú ½ Ú ½ Ú ½ ½ ¾ ¿ 3 3 5 4 3 5 4 4 4 4 The correctness of Dijkstra’s algorithm can verified be as follows. Let ¾ be any vertex, and let   be a shortest path from ¼ to , where ¼   is any vertex on such a path, possibly ¼ . Then, clearly, the first part of the path, , is a shortest path from ¼ to , and the latter part   is a shortest path from to ¼   . Therefore, the length of the path equals the sum of the weights of ¼   and   . Dijkstra’s algorithm makes use of this observation iteratively. Ù Ù Ú Ú Î Ù Ú Ù È Ù Ù Ù È Ù Ú Ù Ù Ù Ú Ù Ú Ù Ù Ù Ù Ú 2 Connectivity of Graphs 2.1 Bipartite graphs and trees In problems such as the shortest path problem we look for minimum solutions that satisfy the given requirements. The solutions in these cases are usually subgraphs without cycles. Such connected graphs will be called trees, and they are used, e.g., in search algorithms for databases. For concrete applications in this respect, see T.H. C ORMEN , C.E. L EISERSON Press, 1993. AND R.L. R IVEST, “Introduction to Algorithms”, MIT Certain structures with operations are representable as trees. These trees are sometimes called construction trees, decomposition trees, factorization trees or grammatical trees. Grammatical trees occur especially in linguistics, where syntactic structures of sentences are analyzed. On the right there . is a tree of operations for the arithmetic formula ¡ · ¡ Ý · Þ Ü Ý Ü ´Ý·Þµ·Ý Î Bipartite graphs D EFINITION . A graph is called bipartite, if has a partition to two subsets and such that each edge ¾ connects a vertex of and a vertex of . In this case, is a bipartition of , and is -bipartite. A bipartite graph (as in the above) is a complete , , and ¾ for all bipartite graph, if ¾ and ¾ . All complete -bipartite graphs are isomorphic. Let Ñ denote such a graph. ÙÚ ´ µ ´ µ Ù Ã Ú Ñ ÙÚ ´Ñ µ ´Ñ µ Î A subset is stable, if ℄ is a discrete graph. Î Ã ¾¿ The following result is clear from the definitions. Theorem 2.1. A graph is bipartite if and only if has a partition to two stable subsets. Example 2.1. The -cube of Example 1.5 is bipartite for all . Indeed, consider has an even number of ¼ s and has an odd number of ¼ s Clearly, these sets . partition , and they are stable in Ù ½ É É Ù Ù ½ Ù 2.1 Bipartite graphs and trees Theorem 2.2. A graph is bipartite if and only if it has no odd cycles. 17 -bipartite. For a cycle   ·½ ½ of length , Proof. (µ) Let be ½   implies ¾ ¾ , ¿ ¾ , . . . , ¾ ¾ , ¾ ·½ ¾ . Consequently, is ½ ¾ odd, and is even. (´) Suppose that all cycles in are even. First, we observe that it suffices to show the claim for connected graphs. Indeed, if is disconnected, then each cycle of is contained in is -bipartite, then one of the connected components, ½ Ô , of . If ½ ¡ ¡ ¡ Ô ½ ¾ ¡ ¡ ¡ Ô is a bipartition of . ¾ Assume thus that is connected. Let ¾ be a chosen vertex, and define Ú Ú ´ Ú µ Ú Ú Ú Ú Ú · ½ ¾Ñ · ½ ´ µ ´ µ Ú bipartite as claimed. Ü ´Ú ܵ is even Ý ´Ú ݵ is odd Since is connected, Î . Also, by the definition of distance, . Let Ù Û ¾ be both in or both in , and let È Ú   Ù and É Ú   Û be (among the) shortest paths from Ú to Ù and Û. È È , É É É , where Assume that Ü is the last common vertex of È and É: È È Ü   Ù and É Ü   Û are independent. Since È and É are shortest paths, È and É are shortest paths Ú   Ü. Consequently, È É . So È and É have the same parity. Therefore É  È Û   Ù is an even path. It follows that È Ù È Ù  and Û are not adjacent in , since otherwise Ú Ü ÙÛ É È ´ÙÛµ would be an odd cycle. Therefore ℄ É and ℄ are discrete induced subgraphs, and is É Û ½ ¾ ½ ¾ ¾ ¾ ½ ½ ½ ½ ¾ ½ ¾ ¾ ¾ ½ ¾ ¾ ½ ¾ Ø Ù ½ ¾ Checking whether a graph is bipartite is easy. Indeed, this can be done by using two ‘opposite’ colours, say and . Start from any vertex ½ , and colour it by . Then colour the neighbours of ½ by , and proceed by colouring all neighbours of an already coloured vertex by an opposite colour. If the whole graph can be coloured, then is -bipartite, where consists of those vertices with colour , and of those vertices with colour ; otherwise, at some point one of the vertices gets both colours, and in this case, is not bipartite. ¾ ´ ¾ ½ ½ ½ ¾ Ú Ú µ ¾ ½ ½ ½ ½ ¾ ¾ ¾ ¾ ½ Theorem 2.3 (E RDÖS (1965)). Each graph ½ . À ¾ has a bipartite subgraph À such that be a partition such that the number of edges between Proof. Let large as possible. Denote Î and is as ÙÚ Ù ¾ Ú ¾ 2.1 Bipartite graphs and trees and let condition, 18 ℄. Obviously À is a spanning subgraph, and it is bipartite. By the maximum ½ À ´Úµ ¾ ´Úµ since, otherwise, Ú is on the wrong side. (That is, if Ú ¾ , then the pair ¼ Ò Ú, ¼ Ú does better that the pair .) Now ½ ½ ´Úµ ½ ½ À ´Úµ À ¾ Ú¾À ¾ Ú¾ ¾ ¾ Ø Ù Bridges is a bridge of the graph , D EFINITION . An edge ¾ if   has more connected components than , that is, if   . À ´ µ ´ µ In particular, and most importantly, an edge in a connected is a bridge if and only if   is disconnected. On the right the two horizontal lines are bridges. The rest are not. Theorem 2.4. An edge ¾ is a bridge if and only if is not in any cycle of . is a bridge if and only if and belong to different Proof. First of all, note that connected components of   .     , (µ) If there is a cycle in containing , then there is a cycle   is a path in   , and so is not a bridge. where (´) Assume that is not a bridge. Hence and are in the same connected com  is a path in   , then     is a cycle in that ponent of   . If Ø Ù contains . ÙÚ Ù Ú È Ú Ù È Ù Ú Ù È Ú ÙÚ Ù Ù Ú È Ù Ú Ù Lemma 2.1. Let be a bridge in a connected graph (i) Then   . (ii) Let be a connected component of of . . À is a bridge of ´ À µ ¾   . If ¾ À , then is a bridge Proof. For (i), let . Since is a bridge, the ends and are not connected in   .   in . This is a path of   , Let ¾ . Since is connected, there exists a path unless   contains , in which case the part   is a path in   . For (ii), if ¾ À belongs to a cycle of , then does not contain (since is in no Ø Ù cycle), and therefore is inside , and is not a bridge of . Û ÙÚ È Û Ù Ú ÙÚ Ù È Û Ú Ú Û Ù À À 2.1 Bipartite graphs and trees 19 Trees D EFINITION . A graph is called acyclic, if it has no cycles. An acyclic graph is also called a forest. A tree is a connected acyclic graph. By Theorem 2.4 and the definition of a tree, we have Corollary 2.1. A connected graph is a tree if and only if all its edges are bridges. Example 2.2. The following enumeration result for trees has many different proofs, the first of which was given by C AYLEY in 1889: There are Ò ¾ trees on a vertex set of elements. We omit the proof. On the other hand, there are only a few trees up to isomorphism: Ò Î Ò Ò trees ½ ¾ ¿ ½ ½ ½ ¾ ¿ ½½ ¾¿ ½ ½ ½ ½ ¿¾¼ Ò trees ½¼ ½½ ½¾ ½¿ ½ ½¼ ¾¿ ½ ½¿¼½ ¿½ are: The nonisomorphic trees of order Theorem 2.5. The following are equivalent for a graph . (i) is a tree. (ii) Any two vertices are connected in (iii) is acyclic and Ì Ì  . Ì Ì Ì ½ Ì by a unique path. Ò ¾ ÈÉ Ù Ú É È É . If , then the claim is trivial. Suppose thus that . Proof. Let Ì (i)µ(ii) Let be a tree. Assume the claim does not hold, and let   be two . Since , there different paths between the same vertices and . Suppose that exists an edge which belongs to but not to . Each edge of is a bridge, and therefore and belong to different connected components of   . Hence must also belong to ; a contradiction. Ò Ò ½ Ì Ù Ú È Ù Ú É È Ì Ì É (ii)µ(iii) We prove the claim by induction on . Clearly, the claim holds for , and suppose it holds for graphs of order less than . Let be any graph of order satisfying (ii). In particular, is connected, and it is clearly acyclic.   be a maximal path in , that is, there are no edges , for which or is Let a path. Such paths exist, because Ì is finite. It follows that Ì , since, by maximality, È Ù Ì Ò Ò Ì Ò Ò ¾ Ú Ì ´Úµ ½ È È 2.1 Bipartite graphs and trees if 20 ÚÛ ¾ Ì , then Û belongs to È ; otherwise È´ÚÛµ would be a longer path. In this case, È Ù   Û   Ú, where ÚÛ is the unique edge having an end Ú. The subgraph Ì  Ú is connected, and therefore it satisfies the condition (ii). By induction hypothesis, Ì  Ú Ò   ¾, and so Ì Ì  Ú · ½ Ò   ½, and the claim follows. (iii)µ(i) Assume (iii) holds for Ì . We need to show that Ì is connected. Indeed, let the connected components of Ì be Ì ´Î µ, for ¾ ½ ℄. Since Ì is acyclic, so are the Î   ½. connected graphs Ì , and hence they are trees, for which we have proved that È È Î , and Ì . Therefore, Now, Ì ½ ½ Ò ½ which gives that Ì ½ ´ Î   ½µ ½ Î   Ò  Ø Ù teams left in the tournament, then these are divided into pairs, and from each pair only the winner continues. If is odd, then one of the teams goes to the next round without having to play. How many plays are needed to determine the winner? So if there are teams, after the first round teams continue, and after the second round teams continue, then . So plays are needed in this example. The answer to our problem is   , since the cup tournament is a tree, where a play corresponds to an edge of the tree. ½, that is, Ì is connected. Example 2.3. Consider a cup tournament of Ò teams. If during a round there are ½ ¾ ½¿ Ò ½ Spanning trees Theorem 2.6. Each connected graph has a spanning tree, that is, a spanning graph that is a tree. Proof. Let be a minimal connected spanning subgraph, that is, a connected spanning subgraph of such that   is disconnected for all ¾ À . Such a subgraph is obtained from by removing nonbridges: À ¼ À ¯ ¯ À ¯ À À To start with, let ¼ . For , let ·½   , where is a not a bridge of is a connected spanning subgraph of and thus of . ·½ , when only bridges are left. À À À À À . Since is not a bridge, By Corollary 2.1, À is a tree. ½ , Ì Ø Ù   ½. Moreover, a connected graph Ì Corollary 2.2. For each connected graph is a tree if and only if   . Proof. Let be a spanning tree of is also clear. Ì . Then  ½   ½. The second claim Ø Ù 2.1 Bipartite graphs and trees Corollary 2.3. Each tree Proof. Let 21 Ì ¾ has at least two leaves. be the number of leaves of Ì . By Corollary 2.2 and the handshaking lemma, ¾¡ Ì  ¾ ¾¡ Ì Ì ´Úµ Ì ´Úµ · ¾¡´ Ì   µ· Ú¾Ì Ì with ¾¡ Ì   × Ì ´ µ Ú ½ from which it follows that ¾, as required. È · × Æ ÖÈ Æ Ö Ø Ù Example 2.4. In Shannon’s switching game a positive player and a negative player play on a graph with two special vertices: a source and a sink . and alternate turns so that designates an edge by , and by  . Each edge can be designated at most once. It is ’s purpose to designate a path   (that is, to designate all edges in one such path), (that is, to designate at least one edge in each such path). and tries to block all paths   is We say that a game Æ È Æ È ¯ ¯ ¯ positive, if has a winning strategy no matter who begins the game, negative, if has a winning strategy no matter who begins the game, neutral, if the winner depends on who begins the game. È Æ ´ × Öµ × Ö Ö The game on the right is neutral. × L EHMAN proved in 1964 that Shannon’s switching game is positive if and only if such that contains and and has two spanning trees with no edges there exists in common. In the other direction the claim can be proved along the following lines. Assume that there containing and and that has two spanning trees with no edges in exists a subgraph common. Then plays as follows. If marks by   an edge from one of the two trees, then marks by an edge in the other tree such that this edge reconnects the broken tree. In this with only edges marked by in way, always has two spanning trees for the subgraph common. In converse the claim is considerably more difficult to prove. that There remains the problem to characterize those Shannon’s switching games are neutral (negative, respectively). À À × Ö À ´ × Öµ È È · È À × Ö Æ À · ´ × Öµ The connector problem To build a network connecting nodes (towns, computers, chips in a computer) it is desirable to decrease the cost of construction of the links to the minimum. This is the connector problem. In graph theoretical terms we wish to find an optimal spanning subgraph of a weighted Ò 2.1 Bipartite graphs and trees 22 graph. Such an optimal subgraph is clearly a spanning tree, for, otherwise a deletion of any nonbridge will reduce the total weight of the subgraph. Ê· (positive reals) Let then « be a graph together with a weight function on the edges. Kruskal’s algorithm (also known as the greedy algorithm) provides a solution to the connector problem. Kruskal’s algorithm: For a connected and weighted graph « of order : « Ò (i) Let ½ be an edge of smallest weight, and set (ii) For each weight such that . ¾¿ does not produce a cycle when added to Ò   ½ in this order, choose an edge ¾ Ò ½ . ½ ½ .  ½ of smallest possible  ½ ℄, and let  ½ The final outcome is Ì ´Î Ì µ By the construction, Ò ½ is a spanning tree of , because it contains no cycles, it is connected and has   edges. We now show that has the minimum total weight among the spanning trees of . ´Î µ Ò ½ Ì Ì Ì Suppose ½ is any spanning tree of . Let be the first edge produced by the algorithm that is not in ½ . If we add to ½ , then a cycle containing is created. Also, must in ½ , we still have a spanning contain an edge that is not in . When we replace by , and therefore tree, say ¾ . However, by the construction, ¾ ½ . Note that ¾ has more edges in common with than ½ . Repeating the above procedure, we can transform ½ to by replacing edges, one by one, such that the total weight does not increase. We deduce that ½ . Ì Ì Ì Ì Ì «´ µ «´ µ «´Ì µ «´Ì µ Ì Ì Ì Ì «´Ìµ «´Ì µ The outcome of Kruskal’s algorithm need not be unique. Indeed, there may exist several optimal spanning trees (with the same weight, of course) for a graph. Example 2.5. When applied to the weighted graph on the right, the algorithm produces the Ú½ , ¾ , ¿ , sequence: ½ ¾ ¿ ¾ ¿ and ½ ¾ . The total weight of the spanning tree is thus 9. , ¾ , ¿ Also, the selection ½ ¾ , , gives another optimal ¿ ½ ¾ solution (of weight 9). ÚÚ ÚÚ ÚÚ ÚÚ ÚÚ ¿ Ú¾ ½ ½ ¾ ¾ Ú¿ ¾ ¾ ÚÚ ÚÚ ÚÚ ÚÚ Ì ÚÚ Ú ½ Ú ¿ ¾ Ú Problem. ¡ Æ . Each tree of order has Ì   Consider trees with weight functions exactly Ò paths. (Why is this so?) Does there exist a weighted tree « of order such that ¾  Ò¡ the (total) weights of its paths are ? ¾ « ½¾ Ì Ì Ò Ò 2.1 Bipartite graphs and trees In such a weighted tree « different paths have differ  Ò¡ ent weights, and each ¾ is a weight of one ¾ path. Also, must be injective. 23 Ì « ½ ℄ ½ ¾ No solutions are known for any TAYLOR (1977) proved: if some . Ò . ¾ ½ Ì of order Ò exists, then necessarily Ò or Ò ¾ · ¾ for Example 2.6. A computer network can be presented as a graph , where the vertices are the node computers, and the edges indicate the direct links. Each computer has an address , a bit string (of zeros and ones). The length of an address is the number of its bits. A message that is sent to is preceded by the address . The Hamming distance of and differ. For two addresses of the same length is the number of places, where and . example, It would be a good way to address the vertices so that the Hamming distance of two vertices is the same as their distance in . In particular, if two vertices were adjacent, their addresses should differ by one symbol. This would make it easier for a node computer to forward a message. Ú Ú ´¼¼¼½¼ ¼½½¼¼µ ¿ ´Úµ ´½¼¼¼¼ ¼¼¼¼¼µ ½ ´Úµ ´Úµ ´ ´Úµ ´Ùµµ ´Ùµ A graph is said to be addressable, if it such that has an addressing . ´ ´Ùµ ´Úµµ ´Ù Úµ ¼½¼ ¼¼¼ ½¼¼ ½½¼ ½½½ We prove that every tree is addressable. Moreover, the addresses of the vertices of be chosen to be of length Ì   . Ì ½ Ì can ¾ , then the claim is obvious. In the case Ì , the The proof goes by induction. If Ì addresses of the vertices are simply 0 and 1. Let then Ì (a leaf) and ½ ¾ ¾ Ì . ½ ½ ·½ , and assume that Ì By the induction hypothesis, we can address the tree   ½ by addresses of length   . We change this addressing: let be the address of in   ½ , and change it to . Set the address of ½ to ¾ . It is now easy to see that we have obtained an addressing for as required. ¾ Î Ú Ú Ú ½ ´Ú µ ½ Ì Ú Ú Ì Ú ÚÚ ¼ ½ Ì The triangle ¿ is not addressable. In order to gain more generality, we modify the addressing for general graphs by introducing a special symbol £ in addition to 0 and 1. A star address will be a sequence of these three symbols. The Hamming distance remains as it was, that is, is the number of places, where and have a different symbol 0 or 1. The special symbol £ does not affect . So, ££ ££ and £££££ £ £££ . . We still want to have à ´Ù Úµ Ù Ú ´Ù Úµ ´½¼ ¼½ ¼ ½¼½µ ½ ´Ù Úµ ´Ù Úµ ´½ ¼¼ µ ¼ 2.2 Connectivity We star address this graph as follows: , £ , ½ ¾ £ , ££ . ¿ These addresses have length 4. Can you design a star addressing with addresses of length 3? 24 Ú¿ Ú½ Ú¾ Ú ´Ú µ ¼¼¼¼ ´Ú µ ½¼ ¼ ´Ú µ ½ ¼½ ´Ú µ ½½ ½ W INKLER proved in 1983 a rather unexpected result: The minimum star address length of   . a graph is at most For the proof of this, see VAN L INT AND W ILSON, “A Course in Combinatorics”. 2.2 Connectivity Spanning trees are often optimal solutions to problems, where cost is the criterion. We may also wish to construct graphs that are as simple as possible, but where two vertices are always connected by at least two independent paths. These problems occur especially in different aspects of fault tolerance and reliability of networks, where one has to make sure that a breakdown of one connection does not affect the functionality of the network. Similarly, in a reliable network we require that a break-down of a node (computer) should not result in the inactivity of the whole network. Separating sets is a cut vertex, if D EFINITION . A vertex ¾   . A subset is a separating set, if   is disconnected. We also say that separates vertices and , if and belong to different connected components of   . ´ Úµ ´ µ Ù Ú Ú Ù Î Ú If is connected, then is a cut vertex if and only if a separating set. We remark also that if separates visits a vertex of . Ú Î  Ú is disconnected, that is, Ú is Ù and Ú, then every path È Ù   Ú Lemma 2.2. If a connected graph has no separating sets, then it is a complete graph. ÙÚ , then the claim is clear. For , assume that is not complete, and let Proof. If ¾ . Now Ò is a separating set. The claim follows from this. Ø Ù ¾ Î ÙÚ ¿ D EFINITION . The (vertex) connectivity number ´ µ of is defined as ´ µ ÑÒ A graph is -connected, if   disconnected or trivial Î ´ µ . 2.2 Connectivity In other words, 25 ¯ ´ µ ¼, if is disconnected, ¯ ´ µ   ½, if is a complete graph, and ¯ otherwise ´ µ equals the minimum size of a separating set of Clearly, if is connected, then it is 1-connected. of consists of edges so that D EFINITION . An edge cut .   is disconnected. Let edge cut µ ÑÒ   For trivial graphs, let ¼ ´ µ ¼. A graph is is a bond ( ¼´ disconnected Ò -edge connected, if ¼ is not an edge cut for any ¾ ). ´ µ . A minimal ¾ Example 2.7. Again, if is disconnected, then ¼ . On the right, and ¼ . Notice that the minimum degree is . ´ µ ¼ ´ µ ¾ ´ µ Æ´ µ ¿ Lemma 2.3. Let is a cut vertex. be connected. If ÙÚ is a bridge, then either ¾ ¿ Ú Ã Ù ¾ or one of Ù or Ú £ , since is connected. Let Ù Proof. Assume that ¾ and thus that   £ and Ú be the connected components of   containing and . Now, either   (and is a cut vertex) or Ú (and is a cut vertex). Ø Ù Ù Æ ´Úµ ¾ Ù Ã Ú Æ ´Ùµ Lemma 2.4. If be a bond of a connected graph Proof. Since   is disconnected, and for each ¾ . Hence is a bridge in connected components. ´   µ ¾. is minimal, the subgraph  ´ Ò µ is connected  ´ Ò µ. By Lemma 2.1,   has exactly two , then Ø Ù Theorem 2.7 (W HITNEY (1932)). For any graph , µ Æ´ µ Proof. Assume is nontrivial. Clearly, ¼ ´ µ Æ´ µ, since if we remove all edges with an end Ú , we disconnect . If ¼ ´ µ ¼, then is disconnected, and in this case also ´ µ ¼. à or If ¼ ´ µ ½, then is connected and contains a bridge. By Lemma 2.3, either has a cut vertex. In both of these cases, also ´ µ ½. ¼ ´ µ, and let ¾. Let be an edge cut of with Assume then that ¼ ´ µ ÙÚ ¾ . Then is a bond, and   has two connected components. ¾ ´ µ ¼´ 2.2 Connectivity 26 Consider the connected subgraph À  ´ Ò µ ´   µ· . . . . . . À Ù ½ . . . . . . where is a bridge. Now for each ¾ Ò choose an end different from and . (The choices for different edges need not be different.) Note that since , either end of is different from or . ¼   , and   does not   Let be the collection of these choices. Thus contain edges from Ò . ¼   and If   is disconnected, then is a separating set and so ( ), or either we are done. On the other hand, if   is connected, then either   ¾ or (or both) is a cut vertex of   (since     , and therefore   is an induced subgraph of ). In both of these cases, there is a vertex of   , whose removal ¼ , and the results in a trivial or a disconnected graph. In conclusion, Ø Ù claim follows. Ë Ë Ú ´ µ ½ Ë Ù Ú Ë Ë Ù Ú À Ë Ë ´ µ À Ë Ë ´ µ Ë ´ µ ½ Ë Ã Ë À Ë Ë ·½ ´ µ Menger’s theorem ¾ be nonadjacent vertices of a connected graph Theorem 2.8 (M ENGER (1927)). Let . Then the minimum number of vertices separating and is equal to the maximum number of independent paths from to . ÙÚ Ù Ù Ú Ù Ú (1) Assume first that and have a common neighbour ¾ . Then necessarily ¾ . In the smaller graph   the set Ò is a minimum set that separates and , and so the induction hypothesis yields that there are   independent paths   in   . Together with the path     , there are independent paths   in as required. Proof. If a subset separates and , then every path   of visits . Hence is at least the number of independent paths from to . to show that if is a Conversely, we use induction on ½ ¾ minimum set (that is, a subset of the smallest size) that separates and , then has at least (and thus exactly) independent paths   . is clear, and this takes care of the small values of , required for the The case for induction. Ë Ë Î Ú Ñ ½ Ù · Ú Ù Ú Ù Ú Ë Ë Û Û Ù Ú Ñ Û Ù Ú Û Û Ë Ù Ú Ù Û Û Ú  Ë Ë Û Û Æ ´Ùµ Æ ´Úµ ½ Ù Ù Ú Ú Æ (2) Assume then that £  Ë the connected components of Ù Ú (2.1) Suppose next that Ë ¶ Æ ´Ùµ and Ë ¶ Æ ´Úµ. ´Úµ Æ ´Ùµ Æ ´Úµ , and denote by for and . ÀÙ Æ £  Ë ´Ùµ and ÀÚ 2.2 Connectivity 27 Let be a new vertex, and define Ù to be the graph on having the edges of together with Ù Ù for all ¾ . The graph Ù is connected and it is smaller Û than . Indeed, in order for to be a minimum separating Ú Û¾ ¾ have to be adjacent to some vertex in Ú . Ù set, all This shows that Ù , and, moreover, the assumption Û½ , and therefore Ú (2.1) rules out the case Ú and so Ù in the present case. ¼ is any subset that separates and in Ù, then ¼ will separate from all ¾ Ò ¼ If in . This means that ¼ separates and in . Since is the size of a minimum separating set, ¼ . We noted that Ù is smaller than , and thus by the induction hypothesis, there in Ù . This is possible only if there exist paths   , are independent paths   one for each ¾ , that have only the end in common. Ú À Ë Ú ½ ℄ Û Ë À Ë℄ ÚÛ À Ë À Ú À ¾ Ë Ë Ë Ù Ù Ú Ú Ë Ù Û Ë Ë Ù Û ½ ℄ Ù Ú By the present assumption, also is nonadjacent to some vertex of . A symmetric argument applies to the graph Ú (with a new vertex ) , which is defined similarly to Ù . This yields that there are paths   that have only the end in common. When we combine , we obtain independent paths     in . these with the above paths   . But these are paths of , and the claim is clear in this case. , then and are still connected in If, on the other hand, ¼ ¼ necessarily travels along the edge path   in   , and so Let ¼ ¼ and Ü Ý (2.2) There remains the case, where for all separating sets Ë of elements, either Ë Æ ´Ùµ or Ë Æ ´Úµ. (Note that then, by (2), Ë Æ ´Úµ or Ë Æ ´Ùµ .) É be a shortest path Ù   Ú in , where ÙÜ, ÜÝ, and É Ý   Ú. Let È Notice that, by the assumption (2), È ¿, and so Ý Ú. In the smaller graph   , let Ë ¼ be a minimum set that separates Ù and Ú . , then, by the induction hypothesis, there are independent paths Ù   Ú in If Ë ¼ Û Ù Û Ù Ú Ù Ù Ë Ú Ù Û Ú   Ù Ú Ë Ë Ù Ú ÜÝ  Ë ¼ . Indeed, every Ü Ý ¾ ˼. These sets separate and in (by the above fact), and they have size . By our current assumption, the vertices of Ý are adjacent to , since the path is shortest and so ¾ (meaning that is not adjacent to all of Ý ). The assumption (2) yields that is adjacent to all of Ü , since ¾ . But now both and are adjacent to the vertices of ¼, which Ø Ù contradicts the assumption (2). Ù Ë Ë Ù Ú Ë Ë Ü Ë Ë Ý ÙÜ Ë Ú È Ù Ú Ù ÙÝ Ë Theorem 2.9 (M ENGER (1927)). A graph is -connected if and only if every two vertices are connected by at least independent paths. Proof. If any two vertices are connected by independent paths, then it is clear that . In converse, suppose that , but that has vertices and connected by at ¾ . Consider the most   independent paths. By Theorem 2.8, it must be that graph   . Now and are connected by at most   independent paths in   , and by ´ µ ½ ´ µ Ù Ù Ú ¾ ÙÚ Ú 2.2 Connectivity 28 Theorem 2.8, and can be separated in   by a set with   . Since (because ), there exists a ¾ that is not in . The vertex is separated in     . Say, in   by from or from ; otherwise there would be a path   this vertex is . The set has   elements, and it separates from in , which . This proves the claim. Ø Ù contradicts the assumption that Ù Ú ´ µ Û Ë Ù Ú Ù Ë Ú ´ µ Ú ½ Ë Ë Ë ÙÚ Ù ¾ Û Ú ´ µ Ë Ù Û We state without a proof the corresponding separation property for edge connectivity. D EFINITION . Let be a graph. A -disconnecting set is a set contains an edge from . path   Ù ÙÚ such that every Theorem 2.10. Let disjoint paths   Ù Ù Ú ¾ with Ù Ú in a graph . Then the maximum number of edgeÚ equals the minimum number of edges in a ÙÚ-disconnecting set. É ´É µ Corollary 2.4. A graph is -edge connected if and only if every two vertices are connected by at least edge disjoint paths. from Example 1.5. We show that Example 2.8. Recall the definition of the cube . . In converse, we show the claim by induction. Extract First of all, the disjoint subgraphs: ¼ induced by ¾  ½ and ½ induced by from  ½ . These are (isomorphic to)  ½ , and ¾ is obtained from the union of ¼ and  ½ edges  ½ . for all ¾ ½ by adding the Let be a vertex cut of . Then . If both ¼   and ½   were connected,   would be connected, since one pair necessarily remains in   . So we also can assume that ¼   is disconnected. (The case for ½   is symmetric.) By the induction   , and hence contains at least   vertices of ¼ (and so hypothesis, ¼   ). If there were no vertices from ½ in , then, of course, ½  is connected, and the edges of would guarantee that   is connected; a contradiction. Hence . Ù É ´É µ Æ´É µ ¾ É Ë Ë ´¼Ù ½Ùµ Ù É Ë Ë É ¼Ù Ù É ½Ù Ë Ë ´ µ ½ ½ ´¼Ù ½Ùµ É ´É µ ¼ ´É Ë ´¼Ù ½Ùµ Ë É Ë Ë Ë Ë É Ë ½ Ë Example 2.9. We have ¼ . Since ´ µ Æ´ µ µ Æ´É µ, also ¼ ´É µ ´Ù Ú µ È Ù Ú for the -cube. Indeed, by Whitney’s theorem, . ´ µ Algorithmic Problem. The connectivity problems tend to be algorithmically difficult. In the disjoint paths problem we are given a set of pairs of vertices for ,   that have no vertices in common. This and it is asked whether there exist paths problem was shown to be NP-complete by K NUTH in 1975. (However, for fixed , the problem has a fast algorithm due to ROBERTSON and S EYMOUR (1986).) ½¾ 2.2 Connectivity 29 Dirac’s fans and such that ¾ in D EFINITION . Let ¾ a graph . A set of paths from to a vertex in is called a -fan, if they have only in common. Ú ´Ú ˵ Ë Ú Ë Î Ú Ë Ú Ë Ú Theorem 2.11 (D IRAC (1960)). A graph is -connected if and for every ¾ and with and only if and ¾ , there exists a -fan of paths. Ú Ë Ú ´Ú ˵ Ë Î £ £ £ Ë Ø Ù Proof. Exercise. Theorem 2.12 (D IRAC (1960)). Let be a -connected graph for vertices, there exists a cycle of containing them. ¾. Then for any Proof. First of all, since , has no cut vertices, and thus no bridges. It follows that every edge, and thus every vertex of belongs to a cycle. Let be such that , and let be a cycle of that contains the maximum be ½ number of vertices of . Let the vertices of Ö listed in order around so (except in the special that each pair ·½ (with indices modulo ) defines a path along case where ). Such a path is referred to as a segment of . If contains all vertices of , then we are done; otherwise, suppose ¾ is not on . It follows from Theorem 2.11 that there is a -fan of at least paths.   and   in such a fan that end in the same Therefore there are two paths . Then the path   (or   ) along contains all vertices segment ·½ of  ½ is a cycle of that contains and all for ¾ of . But now . This Ø Ù contradicts the choice of , and proves the claim. ´ µ ¾ Ë Ë Î Ú Ú Ö Ë Ú Ë ´Ú Î µ È Ú Ù É Ú Û ´Ú Ú µ Ï Ù Û Û Ù Ë Î ÈÏÉ Ú Ë Î Ë ´Ú Ú µ Ö ½ ÑÒ Î Ú ½ Ö℄ 3 Tours and Matchings 3.1 Eulerian graphs The first proper problem in graph theory was the Königsberg bridge problem. In general, this problem concerns about travels around a graph such that one tries to avoid using the same edge twice. In practice these eulerian problems occur, for instance, in optimizing distribution networks – such as delivering mail, where in order to save time each street should be travelled only once. The same problem occurs in mechanical graph plotting, where one avoids lifting the pen off the paper while drawing the lines. Euler tours D EFINITION . A walk for all . An Euler trail of ½ ¾ Ò is a trail, if a graph is a trail that visits every edge once. A connected graph is eulerian, if it has a closed trail containing every edge of . Such a trail is called an Euler tour. Notice that if ½ ¾ Ò is an Euler tour (and so ½ ¾ Ò ), also . A complete proof of the following ·½ Ò ½  ½ is an Euler tour for all ¾ Euler’s Theorem was first given by H IERHOLZER in 1873. Ï Ï ½ Ò℄ Theorem 3.1 (E ULER (1736), H IERHOLZER (1873)). A connected graph only if every vertex has an even degree. is eulerian if and times . . Let Proof. (µ) Suppose   is an Euler tour. Let be a vertex that occurs in . Every time an edge arrives at , another edge departs from , and therefore is even, since starts and ends at . Also, is even for all ¾ (´) Assume is a nontrivial connected graph such that Ï ´Ùµ Ï Ù Ù Ú Ï ½ ¾ Ú ´ Ùµ Ù Ú ´Úµ ¾ Ú   ÚÒ with be a longest trail in . It follows that all ÚÒÛ ¾ are among the edges of Ï , for, otherwise, Ï could be prolonged to Ï . In particular, Ú ÚÒ, that is, Ï is a closed trail. (Indeed, if it were ÚÒ Ú and ÚÒ occurs times in Ï , then ´ÚÒ µ ¾´   ½µ · ½ and that Ò ¼ ½ ¼ ¼ Ï ´Úµ Ú  Ú Ú would be odd.) If is not an Euler tour, then, since is connected, there exists an edge for some , which is not in . However, now Ï Ï ÚÙ¾ is a trail in , and it is longer than Ï . This contradiction to the choice of Ï proves the claim. ·½ Ò ½ Ø Ù 3.1 Eulerian graphs Example 3.1. The -cube 31 É is eulerian for even integers , because É is -regular. Theorem 3.2. A connected graph has an Euler trail if and only if it has at most two vertices of odd degree. has an Euler trail   , then, as in the proof of Theorem 3.1, each vertex has an even degree. Assume then that is connected and has at most two vertices of odd degree. If has no vertices of odd degree then, by Theorem 3.1, has an Euler trail. Otherwise, by the handshaking lemma, every graph has an even number of vertices with odd degree, and therefore has exactly two such vertices, say and . Let be a graph obtained from by adding a and . In every vertex has an even degree, and hence it has an vertex , and the edges     . Here the beginning part   is an Euler trail of . Ù Ø Euler tour, say   Û¾ Ù Ú Û Proof. If Ù Ú Ù Ù Ú ÙÛ ÚÛ À Ú Û Ù À Ù Ú The Chinese postman The following problem is due to G UAN M EIGU (1962). Consider a village, where a postman wishes to plan his route to save the legs, but still every street has to be walked through. This problem is akin to Euler’s problem and to the shortest path problem. Ê· . The Chinese postman problem Let be a graph with a weight function is to find a minimum weighted tour in (starting from a given vertex, the post office). If is eulerian, then any Euler tour will do as a solution, because such a tour traverses each edge exactly once and this is the best one can do. In this case the weight of the optimal tour is the total weight of the graph , and there is a good algorithm for finding such a tour: « Fleury’s algorithm: ¯ ¯ Let ¼ ¾ be a chosen vertex, and let ¼ be the trivial path on ¼ . Repeat the following procedure for as long as possible: suppose a trail has been constructed, where ½ ¾  ½ . for ¾ ) so that Choose an edge ·½ ( (i) ·½ has an end , and   ½ , unless there is no alternative. (ii) ·½ is not a bridge of Ú Ï ½¾ Ú Ú ½ ℄ Ú Ú Ï Notice that, as is natural, the weights Theorem 3.3. If Euler tour of . Proof. Exercise. «´ µ play no role in the eulerian case. constructed by Fleury’s algorithm is an is eulerian, then any trail of Ø Ù 3.2 Hamiltonian graphs 32 If is not eulerian, the poor postman has to walk at least one street twice. This happens, e.g., if one of the streets is a dead end, and in general if there is a street corner of an odd number of streets. We can attack this case by reducing it to the eulerian case as follows. An will be duplicated, if it is added to parallel to an existing edge ¼ with edge ¼ . the same weight, ÙÚ «´ µ «´ µ ¿ ¿ ¾ ½ ÙÚ ¿ ¿ ¿ ¿ ¿ ¾ ¾ ¾ ½ ¾ ¾ ¾ ½ ¾ Above we have duplicated two edges. The rightmost multigraph is eulerian. There is a good algorithm by E DMONDS AND J OHNSON (1973) for the construction of an optimal eulerian supergraph by duplications. Unfortunately, this algorithm is somewhat complicated, and we shall skip it. 3.2 Hamiltonian graphs In the connector problem we reduced the cost of a spanning graph to its minimum. There are different problems, where the cost is measured by an active user of the graph. For instance, in the travelling salesman problem a person is supposed to visit each town in his district, and this he should do in such a way that saves time and money. Obviously, he should plan the travel so as to visit each town once, and so that the overall flight time is as short as possible. In terms of graphs, he is looking for a minimum weighted Hamilton cycle of a graph, the vertices of which are the towns and the weights on the edges are the flight times. Unlike for the shortest path and the connector problems no efficient reliable algorithm is known for the travelling salesman problem. Indeed, it is widely believed that no practical algorithm exists for this problem. Hamilton cycles D EFINITION . A path of a graph is a Hamilton path, once. Similarly, a cycle is if visits every vertex of a Hamilton cycle, if it visits each vertex once. A graph is hamiltonian, if it has a Hamilton cycle. È È Ù ½ Note that if ½ for each  ½ Ù Ù Ù ¡ ¡ ¡ ÙÒ is a Hamilton cycle, then so is Ù ¾ ½ Ò℄, and thus we can choose where to start the cycle. ¾ ÙÒ Example 3.2. It is obvious that each Ò is hamiltonian whenever seen, Ò Ñ is hamiltonian if and only if . Indeed, let Ã Ã Ò Ñ ¾ Ò ¿. Also, as is easily ÃÒ Ñ have a bipartition 3.2 Hamiltonian graphs 33 ´ , where and . Now, each cycle in Ò Ñ has even length as the graph equally many times, since and are is bipartite, and thus the cycle visits the sets . stable subsets. But then necessarily Unlike for eulerian graphs (Theorem 3.1) no good characterization is known for hamiltonian graphs. Indeed, the problem to determine if is hamiltonian is NP-complete. There are, however, some interesting general conditions. Lemma 3.1. If is hamiltonian, then for every nonempty subset µ Ò Ñ Ã ´  Ëµ Ë Proof. Let Ë Î , Ù ¾ Ë , and let Ù   Ù be a Hamilton cycle of . Assume  Ë has k connected components, , ¾ ½ ℄. The case ½ is trivial, and hence suppose that ½. Let Ù be the last vertex of that belongs to , and let Ú be the vertex that follows Ù in . Now Ú ¾ Ë for each by the choice of Ù , and Ú ÚØ for all Ø, because is a for all . Thus Ë as required. Ø Ù cycle and Ù Ú ¾ Example 3.3. Consider the graph on the right. In ,   for the set of black vertices. Therefore does not satisfy the condition of Lemma 3.1, and hence it is not hamiltonian. Interest-bipartite of even order with ingly this graph is . It is also -regular. Ë Î , ´ ˵ ¿ ¾ Ë Ë ´ ¿ µ Example 3.4. Consider the Petersen graph on the right, which appears in many places in graph theory as a counter example for various conditions. This graph is not hamiltonian, but it does satisfy the condition   for all . Therefore the conclusion of Lemma 3.1 is not sufficient to ensure that a graph is hamiltonian. ´ ˵ Ë Ë The following theorem, due to O RE, generalizes an earlier result by D IRAC (1952). Theorem 3.4 (O RE (1962)). Let be a graph of order ´Ùµ · ´Úµ Then is hamiltonian if and only if · ÙÚ is hamiltonian. Proof. Denote Ò . Let Ù Ú ¾ be such that ´Ùµ · ´Úµ Ò. If ÙÚ ¾ . there is nothing to prove. Assume thus that ÙÚ ¾ · ÙÚ. (µ) This is trivial since if has a Hamilton cycle , then ¿, and let Ù Ú ¾ be such that , then is also a Hamilton cycle of and suppose that has a Hamilton cycle . If does not use the (´) Denote edge , then it is a Hamilton cycle of . Suppose thus that is on . We may then assume ÙÚ · 3.2 Hamiltonian graphs that   There exists an ½ ¾ 34 Ù Ú   Ù. Now Ù Ú   Ú     ÚÒ Ú is a Hamilton path of . with ½ Ò such that ÙÚ ¾ and Ú   Ú ¾ For, otherwise, ´Úµ Ò   ´Ùµ would contradict the assumption. ½ Ú½ Ú¾ But now . ½ ½ Æ Æ Ú  ½ Ú ½ ·½ Æ Æ Ú Ò Ù Ú   Ú     ÚÒ   ÚÒ     Ú   Ú   Ú ½ Ù is a Hamilton cycle in Ø Ù Closure D EFINITION . For a graph that , define inductively a sequence ¼ ¼ ½ of graphs such where and are any vertices such that ¾ and . This procedure for some , that is, in , for all ¾ either stops when no new edges can be added to ¾ or . The result of this procedure is the closure of , and it ( ). is denoted by Ù Ú and ÙÚ ·½ · ÙÚ ´Ùµ· ´Úµ ÙÚ ´Ùµ · д µ ´Úµ ÙÚ there are usually alternatives which edge is to In each step of the construction of be added to the graph, and therefore the above procedure is not deterministic. However, the final result is independent of the choices. д µ ÙÚ Ð´ µ Ò Lemma 3.2. The closure Proof. Denote д µ is uniquely defined for all graphs , say ½ of order ¿. À · . Suppose there are two ways to close where the edges are added in the given orders. Let and ¼ ½ ¼ . Let . For the initial values, we have be the first edge ¼ ½ ¼ such that for all . Then À  ½ , since ¾ À , but ¾ À  ½ . À  ½ ¼ , and thus also À ¼ , which means By the choice of , we have À¼  ½ ¼ . Symmetrically, we deduce must be in ¼ ; a contradiction. Therefore that that ¼ , and hence ¼ . Ø Ù À · ½ Ö and À¼ ¿. (i) is hamiltonian if and only if its closure д µ is hamiltonian. (ii) If д µ is a complete graph, then is hamiltonian. д µ and spans д µ, and thus if is hamiltonian, so is д µ. Proof. First, In the other direction, let д µ be a construction sequence of the and by Theorem 3.4. closure of . If д µ is hamiltonian, then so are   Theorem 3.5. Let be a graph of order ¼ ½ ½ ½ ¼ ÙÚ À À À À À À ´Ùµ· À À · À À ´Úµ Ò ´Ùµ · À À · × ÙÚ ´Úµ Ò The Claim (ii) follows from (i), since each complete graph is hamiltonian. Ø Ù 3.2 Hamiltonian graphs Theorem 3.6. Let and , hamiltonian. 35 Ú ´Ùµ · ´Úµ be a graph of order . Suppose that for all nonadjacent vertices ½ . Then is hamiltonian. In particular, if , then is ¾ ¿ Æ´ µ Ù Proof. Since for all nonadjacent vertices, we have , and thus is hamiltonian. The second claim is immediate, since now for all ¾ whether adjacent or not. ´Ùµ· ´Úµ ÙÚ Ð´ µ ÃÒ for Ò ´Ùµ· ´Úµ Ø Ù Chvátal’s condition The hamiltonian problem of graphs has attracted much attention, at least partly because the problem has practical significance. (Indeed, the first example where DNA computing was applied, was the hamiltonian problem.) There are some general improvements of the previous results of this chapter, and quite many improvements in various special cases, where the graphs are somehow restricted. We become satisfied by two general results. Theorem 3.7 (C HVÁTAL (1972)). Let be a graph with ordered so that ½ ¡ ¡ ¡ Ò, for . If for every ¾ ´Ú µ Î Ú Ú ÚÒ Ò ¾, ½ ¾ , for Ò ¿, (3.1) µ then is hamiltonian. Ò  Ò  д µ Proof. First of all, we may suppose that is closed, , because is hamiltonian if is hamiltonian, and adding edges to does not decrease any of its degrees, and only if that is, if satisfies (3.1), so does for every . We show that, in this case, Ò , and thus is hamiltonian. Assume on the contrary that ¾ with be such that Ò , and let is as large as possible. Because is closed, we must have , . Let ¾ . By our choice, and therefore for all ¾ , and, moreover, д µ · à ´Ùµ· ´Úµ ´Ùµ Û Ã Ò¾ ÙÚ Û ÚÛ ´Ùµ Û Ú ´Úµ ´Ùµ· ´Úµ Ò ´Ûµ ´Ò   ½µ   ´Úµ ´Ùµ Consequently, there are at least vertices Û with ´Ûµ , and so ´Ùµ . Û ÙÛ ¾ Û Ù , ´Ûµ ´Úµ Similarly, for each vertex from Ò   ´Ùµ Ò   , and ´Ò   ½µ   ´Ùµ ´Ò   ½µ   Also ´Ùµ Ò   , and thus there are at least Ò   vertices Û with ´Ûµ Ò   . Consequently, Ò  Ò   . This contradicts the obtained bound and the condition (3.1). Note that the condition (3.1) is easily checkable for any given graph. Ø Ù 3.3 Matchings 36 3.3 Matchings In matching problems we are given an availability relation between the elements of a set. The problem is then to find a pairing of the elements so that each element is paired (matched) uniquely with an available companion. A special case of the matching problem is the marriage problem, which is stated as follows. Given a set of boys and a set of girls, under what condition can each boy marry a girl who cares to marry him? This problem has many variations. One of them is the job assignment problem, where we are given applicants and jobs, and we should assign each applicant to a job he is qualified. The problem is that an applicant may be qualified for several jobs, and a job may be suited for several applicants. Ò Ñ Maximum matchings D EFINITION . For a graph , a subset is a matching of , if contains no adjacent edges. The two ends of an edge ¾ are matched under . A matching is a maximum ¼, ¼. matching, if for no matching Å Å Å Å Å Å Å Å The two vertical edges on the right constitute a matching that is not a maximum matching, although you cannot add to form a larger matching. This matching any edges to is not maximum because the graph has a matching of three edges. Å Å D EFINITION . A matching saturates ¾ end of an edge in . Also, saturates saturates , then urates every ¾ . If matching. Ú Å Å Å Å Ú Î Å Î , if is an , if it satis a perfect Ú It is clear that every perfect matching is maximum. On the right the horizontal edges form a perfect matching. D EFINITION . Let be a matching of is -augmented, if ½ ¾ ¾ ·½ ¾ ·½ ¾ ¯ È alternates between Ò Å and Å (that is, ¾  Å and ¾ Å ), and ¯ the ends of È are not saturated. Lemma 3.3. If Proof. Exercise. is connected with Å Å . An odd path È ¡´ µ ¾, then is a path or a cycle. Ø Ù 3.3 Matchings 37 Å Å Theorem 3.8 (B ERGE (1957)). A matching Å of is a maximum matching if and only if there are no Å -augmented paths in . in . Here Proof. (µ) Let a matching Å have an Å -augmented path È ¾ Å, ¾ Å . Define Æ by Æ ´Å Ò ¾½ ℄µ ¾¼ ℄ Now, Æ is a matching of , and Æ Å · ½. Therefore Å is not a maximum matching. Å . Consider the (´) Assume Æ is a maximum matching, but Å is not. Hence Æ Å Æ℄ for the symmetric difference Å Æ . We have À ´Úµ ¾ for each subgraph À Ú ¾ À , because Ú is an end of at most one edge in Å and Æ . By Lemma 3.3, each connected component of À is either a path or a cycle. Since no Ú ¾ can be an end of two edges from Æ or from Å , each connected component Å , there is a connected (path or a cycle) alternates between Æ and Å . Now, since Æ component of À , which has more edges from Æ than from Å . This cannot be a cycle, because an alternating cycle is even, and it thus contains equally many edges from Æ and Å . Hence Ù   Ú is a path, which starts and ends with an edge from Æ . Because is a connected component of À , the ends Ù and Ú are not saturated by Å , and, consequently, is Ø Ù an Å -augmented path. This proves the theorem. Example 3.5. Consider the -cube É for ½. Each maximum matching of É has ¾   edges. Indeed, the matching Å ´¼Ù ½Ùµ Ù ¾   , has ¾   edges, and it is clearly ½ ¾ ¾ ·½ ¾ ¾ ½ ¿ ¾ ·½ ¾ ¾ ·½ ½ ½ ½ We start with a result that states a necessary and sufficient condition for a matching to be maximal. One can use the first part of the proof to construct a maximum matching in an and from any -augmented path. iterative manner starting from any matching perfect. Hall’s theorem For a subset If Ë Î of a graph Æ ´Ëµ Ú ÙÚ ¾ is ´ µ-bipartite, and Ë , denote for some Ù¾Ë , then Æ ´Ëµ be a . The following result, known as the Å Theorem 3.9 (H ALL (1935)). Let saturating if and only if ´ µ-bipartite graph. Then for all contains a matching Ë Æ ´Ëµ Ë (3.2) 3.3 Matchings Proof. (µ) Let be a matching that saturates not all ¾ can be matched with different ¾ 38 À ÙÚ Ë ÆÀ ´Ëµ Æ ´Ëµ   ½ Ë and hence, by the induction hypothesis, À contains a matching Å saturating Ò Ù . Now Å ÙÚ is a matching saturating in , as was required. with Ê such that Suppose then that there exists a nonempty subset Ê Æ ´Êµ Ê . The induced subgraph À Ê Æ ´Êµ℄ satisfies (3.2) (since does), and hence, by the induction hypothesis, À contains a matching Å that saturates Ê (with the other ends in Æ ´Êµ). Also, the induced subgraph À Î Ò ℄, for Ê Æ ´Êµ, satisfies (3.2). Indeed, Ò Ê such that ÆÀ¾ ´Ëµ Ë , then we would have if there were a subset Ë Æ ´Ë ʵ ÆÀ¾ ´Ëµ · ÆÀ½ ´Êµ Ë · Æ ´Êµ Ë · Ê Ë Ê (since Ë Ê ), which contradicts (3.2) for . By the induction hypothesis, À has a matching Å that saturates Ò Ê (with the other ends in Ò Æ ´Êµ). Combining the matchÅ saturating in . Ø Ù ings for À and À , we get a matching Å Second proof. This proof of the direction ´´µ uses Menger’s theorem. Let À be the graph obtained from by adding two new vertices Ü Ý such that Ü is adjacent to each Ú ¾ and Ý is adjacent to each Ú ¾ . There exists a matching saturating if (and only if) the number of . For this, by Menger’s theorem, it suffices to show independent paths Ü   Ý is equal to that every set Ë that separates Ü and Ý in À has at least vertices. Ý , where and . Now, vertices in Ü Let Ë Ò Ò Ò are not adjacent to vertices of Ò , and hence we have Æ ´ Ò µ , and thus that Ò Æ´ Ò µ ½ ½ ½ ¾ ¾ ¾ ½ ¾ ½ ¾ (´) Let satisfy Hall’s condition (3.2). We prove the claim by induction on . , then the claim is clear. Let then , and assume (3.2) implies the existence If of a matching that saturates every proper subset of . for every nonempty with , then choose an edge ¾ If with ¾ , and consider the induced subgraph   . For all Ò , Ü Ë Å . If Ë Ý Æ ´Ëµ. Æ ´Ëµ for some Ë , then ½ ¾ Æ ´Ëµ Ù Ë ·½ Ë Ë ÙÚ Ù using the condition (3.2). We conclude that Ë ´ · µ . is a -regular bipartite graph with Corollary 3.1 (F ROBENIUS (1917)). If has a perfect matching. ¼, then Ë Æ ´Ëµ Ø Ù Proof. Let be -regular -bipartite graph. By regularity, ¡ ¡ , and hence . Let . Denote by ½ the set of the edges with an end in , and by . Clearly, ½ ¡ ¾ the set of the edges with an end in ¾ . Therefore, ¡ , and so . By Theorem 3.9, has a matching that saturates ¾ ½ . Since , this matching is necessarily perfect. Ø Ù Ë Ë Æ ´Ëµ Æ ´Ëµ Ë 3.3 Matchings 39 Applications of Hall’s theorem D EFINITION . Let Ë ½ ¾ Ñ be a family of finite nonempty subsets of a set . ( need not be distinct.) A transversal (or a system of distinct representatives) of Ë is a of distinct elements one from each . subset Ë Ë Ë Ë Ë Ì Ë Ñ Ë ¾¿ Ë As an example, let , and let ½ , ¿ and ¾ . For Ë , the set is a transversal. If we add ½ ¾ ¿ the set to Ë, then it is impossible to find a transversal for this new family. and The connection of transversals to the Marriage Theorem is as follows. Let . Form an -bipartite graph such that there is an edge if and only if ¾ . The possible transversals of Ë are then obtained from the matchings saturating in by taking the ends in of the edges of . ½ Ë ½ ℄ Ë Ë Ë Ë µ Ì Ë Ì Ë ½¾ Ë ½¾¿ ¾¿ Ë × Ë ½ Ñ℄ ´ ´ ×µ Å Ë Å Corollary 3.2. Let Ë be a family of finite nonempty sets. Then Ë has a transversal if and only if the union of any of the subsets of Ë contains at least elements. ¾ Example 3.6. An ¢ latin rectangle is an ¢ integer matrix with entries such that the entries in the same row and in the same column are different. Moreover, if is a latin square. Note that in a ¢ latin rectangle , we always have that then Ñ Ò Å Å ½ Ò℄ Ñ Ò, Å Ñ Ò Å Ñ Ò. We show the following: Let Å be an Ñ ¢ Ò latin rectangle (with Ñ Ò). Then M can be extended to a latin square by the addition of Ò   Ñ new rows. The claim follows when we show that Å can be extended to an ´Ñ·½µ ¢ Ò latin rectangle. ½ Ò℄ be the set of those elements that do not occur in the -th column of Å . Clearly, Let Ò   Ñ for each , and hence È ¾Á Á ´Ò   ѵ for all subsets Á ½ Ò℄. Now Á , since otherwise at least one element from the union would be in more than ¾Á Ò   Ñ of the sets with ¾ Á . However, each row has all the Ò elements, and therefore each is missing from exactly Ò   Ñ columns. By Marriage Theorem, the family Ò has a transversal, and this transversal can be added as a new row to Å . This proves the claim. ½ ¾ Ñ Ò Ë Tutte’s theorem The next theorem is a classic characterization of perfect matchings. D EFINITION . A connected component of a graph is said to be odd (even), if it has an odd the number of odd connected components in (even) number of vertices. Denote by Ó . ´ µ Denote by Ñ´ µ be the number of edges in a maximum matching of a graph Ñ´ µ ËÑ ÎÒ · Ë   ´  Ëµ ¾ Ó . has (3.3) Theorem 3.10 (Tutte-Berge Formula). Each maximum matching of a graph elements. 3.3 Matchings Note that the condition in (ii) includes the case, where 40 Ë . Ë Î · Ë   ´  Ëµ Ñ´ µ Ë · Ñ´  Ëµ Ë · Î Ò Ë  ¾ ´  Ëµ ¾ Indeed, each odd component of  Ë must have at least one unsaturated vertex. ½, then the claim is trivial. Suppose that The proof proceeds by induction on . If ¾. such that Ú is saturated by all maximum Assume first that there exists a vertex Ú ¾  Ú, denote Ë Ë ¼ Ú . By matchings. Then Ñ´  Úµ Ñ´ µ   ½. For a subset Ë ¼ ¼ the induction hypothesis, for all Ë  Ú, Ñ´ µ ½ ½  ´   ½µ · Ë ¼   ´  ´Ë ¼ Ú µµ¡ ½ ´´ · Ë   ´  Ëµµµ ½ ¾ ¾ Ó Ó Ó Ó Proof. We prove the result for connected graphs. The result then follows for disconnected graphs by adding the formulas for the connected components. , We observe first that holds in (3.3), since, for all The claim follows from this. Suppose then that for each vertex , there is a maximum matching that does not saturate . We show that each maximum matching leaves exactly one vertex unsaturated. Suppose to be a maximum matching having two different unsaturated vertices the contrary, and let and , and choose so that the distance is as small as possible. Now , ¾ could be added to , contradicting the maximality of . Let since otherwise be an intermediate vertex on a shortest path   . By assumption, there exists a maximum is matching that does not saturate . We can choose such that the intersection and , saturates both and . maximal. Since The (maximum) matchings and leave equally many vertices unsaturated, and hence there saturated by but which is unsaturated by . Let ¾ exists another vertex be the edge in incident with . If is also unsaturated by , then is a matching, . Therefore there exists an edge contradicting maximality of . It also follows that ¼ in , where . But now ¼ Ò ¼ is a maximum matching that does ¼ not saturate . However, contradicts the choice of . Therefore, every   . maximum matching leaves exactly one vertex unsaturated, i.e., In this case, for , the right hand side of (3.3) gets value   , and hence, by Ø Ù the beginning of the proof, this must be the minimum of the right hand side. Ú Ú Ú Å Å ÙÚ Û ´Ù Ûµ ´Ù Úµ Æ Å Ü Û Å Å Ü Ý Æ ÝÞ Æ Þ Ü Æ Æ Û Æ Å Æ Å Ë Æ ´Ù Úµ Å Ù Ú Æ ´Û Úµ ´Ù Úµ Æ Ý Û Æ Æ Æ Ù ´Ù Úµ ¾ Å Û Å Æ Ù Ú ÜÝ Æ Ñ´ µ ´ ½µ ¾ ´ ½µ ¾ For perfect matchings we have the following corollary, since for a perfect matching we have . Ñ´ µ ´½ ¾µ Theorem 3.11 (T UTTE (1947)). Let (i) has a perfect matching. (ii) For every proper subset be a nontrivial graph. The following are equivalent. Ë Î , ´  Ëµ Ë . Ó 3.3 Matchings 41 Tutte’s theorem does not provide a good algorithm for constructing a perfect matching, because the theorem requires ‘too many cases’. Its applications are mainly in the proofs of other results that are related to matchings. There is a good algorithm due to E DMONDS (1965), which uses ‘blossom shrinkings’, but this algorithm is somewhat involved. Example 3.7. The simplest connected graph that has no perfect matching is the path removing the middle vertex creates two odd components. The next 3-regular graph (known as the Sylvester graph) does not have a perfect matching, because removing the black vertex results in a graph with three odd connected components. This graph is the smallest regular graph with an odd degree that has no perfect matching. È . Here Using Theorem 3.11 we can give a short proof of P ETERSEN’s result for 3-regular graphs (1891). Theorem 3.12 (P ETERSEN (1891)). If matching. is a bridgeless -regular graph, then it has a perfect ¿ , be the odd connected components Proof. Let be a proper subset of , and let , ¾ of   . Denote by the number of edges with one end in and the other in . Since is 3-regular, and ¡ ¡ Ú¾ Ú¾Ë The first of these implies that Ë Ë Ñ Î ½ Ø℄ Ë ´Úµ ¿ Ñ ´Úµ ¿ Ë is odd. Furthermore, , because has no bridges, and therefore number of odd connected components of   satisfies Ñ ½ Ú¾ ´Úµ   ¾ ¡ Ë ½ ¿ Ú¾Ë ´Úµ Ë Ñ ¿. Hence the ½ Ø ¿ and so, by Theorem 3.11, Ø ½ Ñ has a perfect matching. Ø Ù Stable Marriages D EFINITION . Consider a bipartite graph with a bipartition of the vertex set. In supplies an order of preferences of the vertices of . We addition, each vertex ¾ ¾ , if ¾ , and ¾ , if ¾ .) A write Ü , if prefers to . (Here matching of is said to be stable, if for each unmatched pair ¾ (with ¾ and ¾ ), it is not the case that and prefer each other better than their matched companions: Ù Ý Å Ú Ü Ü ´ Ú Ù Ü Ý ÜÚ ¾ Å and Ý ÙÚ Ú Ü µ ÙÚ ÜÝ Å Ù Æ ´Üµ Ü Ü Ü or ÙÝ ¾ Å and Ü Ý 3.3 Matchings We omit the proof of the next theorem. Theorem 3.13. For bipartite graphs 42 , a stable matching exists for all lists of preferences. Example 3.8. That was the good news. There is a catch, of and . For course. A stable matching need not saturate instance, the graph on the right does have a perfect matching (of edges). Suppose the preferences are the following: ¿ ¾ ½ ½ Å ¾ ¿ ½ ¿ ½ ¾ ½ ¾ ¾ ¿ ¾ ¿ ¾ Then there is no stable matchings of four edges. A stable matching of is the following: which leaves and unmatched. (You should check that there is no stable matching containing the edges and .) Theorem 3.14. Let Ò Ò be a complete bipartite graph. Then matching for all lists of preferences. Proof. Let the bipartition be as follows. à has a perfect and stable ´ µ. The algorithm by GALE AND SHAPLEY (1962) works ȴܵ Ü Ü Å Ý Ü Ý È´Üµ (1) Add Ý to ȴܵ. Å   ÜÝ . (2) If Ý is not saturated, then set Å (3) If ÞÝ ¾ Å   and Þ Ý Ü, then set Å ´Å   Ò ÞÝ µ ÜÝ . takes part in the iteration at First of all, the procedure terminates, since a vertex Ü ¾ most Ò times (once for each Ý ¾ ). The final outcome, say Å ÅØ , is a perfect matching, since the iteration continues until there are no unsaturated vertices Ü ¾ . ÅØ is stable. Note first that, by (3), if ÜÝ ¾ Å and ÞÝ ¾ Å Also, the matching Å for some Ü Þ and , then Ü Ý Þ . Assume the that ÜÝ ¾ Å , but Ý Ü Þ for some Þ ¾ . Then ÜÝ is added to the matching at some step, ÜÝ ¾ Å , which means that Þ ¾ ȴܵ at this step (otherwise Ü would have ‘proposed’ Þ ). Hence Ü took part in the iteration at an earlier step Å , (where Þ was put to the list ȴܵ, but ÜÞ was not added). Thus, for some Ù ¾ , ÙÞ ¾ Å   and Ü Þ Ù, and so in Å the vertex Þ is matched to some Û with Ü Þ Û. Similarly, if Ü Ý Ú for some Ú ¾ , then Ý Ú Þ for the vertex Þ ¾ such that ÚÞ ¾ Å . ½ ½ ½ ½ Procedure. Set ¼ , and for all ¾ . Then iterate the following process until all vertices are saturated: Choose a vertex ¾ that is unsaturated in  ½ . Let ¾ be the most . preferred vertex for such that ¾ Å Ø Ù 4 Colourings 4.1 Edge colourings Colourings of edges and vertices of a graph are useful, when one is interested in classifying relations between objects. There are two sides of colourings. In the general case, a graph with a colouring is given, and we study the properties of this pair « . This is the situation, e.g., in transportation networks with bus and train links, where the colour (buss, train) of an edge tells the nature of a link. In the chromatic theory, is first given and then we search for a colouring that the satisfies required properties. One of the important properties of colourings is ‘properness’. In a proper colouring adjacent edges or vertices are coloured differently. ´ «µ « Edge chromatic number D EFINITION . A -edge colouring of a graph is an assignment of colours to its edges. We write « to indicate that has the edge colouring . A vertex ¾ and a colour ¾ are incident with each other, if for some ¾ . If ¾ is not incident with a colour , then is available for . The colouring is proper, if no two adjacent edges obtain the same colour: ½ ¾ for adjacent ½ and ¾ . of is defined as The edge chromatic number ¼ « ½ ℄ ÚÙ Ú Ú ½ ℄ « « «´ÚÙµ Ú «´ µ «´ µ ´ µ ¼´ µ ÑÒ « there exists a proper -edge colouring of A -edge colouring can be thought of as a partition of , where ½ ¾ . Note that it is possible that for some . We adopt a simplified notation « ½ ¾ Ø Ø ½ ¾ ¡¡¡ «´ µ ℄ ℄ for the subgraph of consisting of those edges that have a colour edges having other colours are removed. Lemma 4.1. Each colour set ¼ each graph , ½ , ¾ , . . . , or Ø . That is, the ¡´ µ ´ µ in a proper -edge colouring is a matching. Moreover, for . Proof. This is clear. Ø Ù 4.1 Edge colourings 44 Example 4.1. The three numbers in Lemma 4.1 can be equal. This happens, for instance, when ½ Ò is a star. But often the inequalities are strict. à A star, and a graph with ¼´ µ . Optimal colourings We show that for bipartite graphs the lower bound is always optimal: ¼´ µ ¡´ µ. Ú Lemma 4.2. Let be a connected graph that is not an odd cycle. Then there exists a 2-edge colouring (that need not be proper), in which both colours are incident with each vertex with . ´Úµ ¾ Proof. Assume that is nontrivial; otherwise, the claim is trivial. (1) Suppose first that is eulerian. If is an even cycle, then a 2-edge colouring exists is even for all , has a vertex ½ with . as required. Otherwise, since now ½ Let ½ ¾ Ø be an Euler tour of , where ·½ (and Ø·½ ½ ). Define ´Úµ «´ µ Hence the ends of the edges for among these ends. The condition the eulerian case. to ½ if is odd ¾ if is even ¾ ¾ Ø   ½℄ are incident with both colours. All vertices are ´Ú µ guarantees this for Ú . Hence the claim holds in ½ ½ ¼ ´ ÚÚ Ú Ú Ú Ú ´Ú µ (2) Suppose then that is not eulerian. We define a new graph and connecting ¼ to each ¾ of odd degree. Ú Ú by adding a vertex Ú ¼ In ¼ every vertex has even degree including ¼ (by the handshaking lemma), and hence ¼ is eulerian. Let ¼ ½ Ø be an eulerian tour of ¼ , where ·½ . By the previous case, there is a required colouring of ¼ as above. Now, restricted to is a colouring of as required by the claim, since each vertex with odd degree is entered and departed at least once in the tour by an edge of the original graph :  ½ . « Ú ÚÚ « ¾ ½ ¾ ´Ú µ ¿ Ú Ú¼ ½ ½ Ø Ù ¾ D EFINITION . For a -edge colouring A « of , let « ´Úµ Ú is incident with ¾ ½ ℄ -edge colouring ¬ is an improvement of «, if 4.1 Edge colourings Ú¾ 45 ¬ ´Úµ ´Úµ Also, « is optimal, if it cannot be improved. « ´Úµ Ú¾ «´Úµ « ´Úµ ´Úµ Notice that we always have « , and if is proper, then « , and in this case is optimal. Thus an improvement of a colouring is a change towards a proper colouring. Note also that a graph always has an optimal -edge colouring, but it need not have any proper -edge colourings. The next lemma is obvious. Ú¾ Lemma 4.3. An edge colouring . « of is proper if and only if « ´Úµ Ú ´Úµ for all vertices Lemma 4.4. Let be an optimal -edge colouring of , and let ¾ . Suppose that the colour is available for , and the colour is incident with at least twice. Then the connected that contains , is an odd cycle. component of « « À Ú ℄ Ú Ú Proof. Suppose the connected component is not an odd cycle. By Lemma 4.2, has a 2-edge colouring , in which both and are incident with each vertex with À . (We have renamed the colours and to and .) We obtain a recolouring of À as follows: ´ if ¾ À if ¾ À ´Üµ ¾ ­ ¬´ µ ´Úµ ¾ Ú ´Úµ ´Úµ · ½ ´Ùµ ´Ùµ Ù Ú « À Theorem 4.1 (KÖNIG (1916)). If À ½ ¾ ­´ µ «´ µ À Ü ¬ Since À (by the assumption on the colour ) and in both colours and are . Furthermore, È the construction of , we have by now incident with , ¬ « È for all . Therefore Ù¾ ¬ « ¬ Ù¾ « , which contradicts the Ø Ù optimality of . Hence is an odd cycle. ´Ùµ ¬ ´Ùµ ¬ is bipartite, then Proof. Let be an optimal -edge colouring of a bipartite , where . If there were a ¾ with « , then by Lemma 4.4, would contain an odd cycle. But a . By bipartite graph does not contain such cycles. Therefore, for all vertices , « ¼ Lemma 4.3, is a proper colouring, and as required. Ø Ù Ú « ´Úµ ¡ ¼´ µ ¡´ µ. ´Úµ « ¡ ´ µ ¡ ¡´ µ Ú ´Úµ ´Úµ Vizing’s theorem In general we can have ¼ as one of our examples did show. The following important theorem, due to V IZING, shows that the edge chromatic number of a graph misses by at most one colour. ´ µ ¡´ µ ¡´ µ Theorem 4.2 (V IZING (1964)). For any graph ¡´ µ ¼ ´ µ ¡´ µ · ½. Proof. Let ¡ ¡´ µ. We need only to show that ¼ ´ µ ¡ · ½. Suppose on the contrary that ¼ ´ µ ¡ · ½, and let « be an optimal ´¡ · ½µ-edge colouring of . , 4.1 Edge colourings We have (trivially) Claim 1. For each 46 Ù¾ ´Ùµ ¡ · ½ ´Úµ « ¼´ µ for all Ù ¾ , and so , there exists an available colour ´Ùµ for Ù. Ú (4.1) Ú Moreover, by the counter hypothesis, is not a proper colouring, and hence there exists a ¾ with « , and hence a colour ½ that is incident with at least twice, say ´Úµ «´ÚÙ µ ½ ½ «´Úܵ such that ·½ Claim 2. There is a sequence of vertices Ù Ù ½ ¾ «´ÚÙ µ ½ Ù ´Ù µ and ´Ù µ Ù Ù Ú Indeed, let ½ be as in (4.1). Assume we have already found the vertices ½ , with , such that the claim holds for these. Suppose, contrary to the claim, that is not incident with ·½ . ÙÖ We can recolour the edges by ·½ for ¾ , and ÙÖ ½ obtain in this way an improvement of . Here gains a new .. . colour ·½ . Also, each gains a new colour ·½ (and may Ö Ø·½ . . . Ö  ½ either its numloose the colour ). Therefore, for each Ø ber of colours remains the same or it increases by one. This ÙØ Ú Ù¾ ¾ contradicts the optimality of , and proves Claim 2. ½ ½ Ù½ , Now, let be the smallest index such that for some Ü . Such an index exists, because is finite. Ø·½ Ö ÚÙ « Ù « Ú ½ ℄ Ù Ø Ø ´Úµ Ö Ø ¬ be a recolouring of such that for ½ Ö   ½, ¬´ÚÙ µ , and for all other edges , ¬´ µ «´ µ. Claim 3. ¬ is an optimal ´¡ · ½µ-edge colouring of . Indeed, ¬ ´Úµ « ´Úµ and ¬ ´Ùµ « ´Ùµ for all Ù, since Ö   ½) gains a new colour although it each Ù (½ Let ·½ ·½ ÙÖ ½ . . . Ö ÙÖ Ö Ø ·½ .. . Ù¾ Ù½ ÙÖ ½ . . . ¿ Ú Ø ÙØ ¾ ½ Ü ÙÖ Ö may loose one of its old colours. Let then the colouring be obtained from by ·½ for . Now, the edges by Ö Ø·½ . ÚÙ ­ Ö Ø ¬ by recolouring ÚÙØ is recoloured . ·½ Ö .. . Claim 4. ­ is an optimal ´¡ · ½µ-edge colouring of ´Ù µ ´Ù µ ¬ Ö Indeed, the fact Ö Ø·½ ensures that Ö is a new colour incident with Ø , and thus that ­ Ø ¬ Ø . For all other follows as for . vertices, ­ ¬ Ù ´Ùµ ´Ùµ Ù¾ Ù½ ¿ Ú ÙØ ¾ ½ Ü 4.2 Ramsey Theory 47 By Claim 1, there is a colour ¼ that is available for . By Lemma 4.4, the connected components ½ of ¬ ¼ Ö and ¾ of ­ ¼ Ö containing the vertex are cycles, that is, ½ is a cycle Ö ½ ½ Ö and ¾ is a cycle Ö ½ ¾ Ø , where both ½ Ö ½   Ö and ¾ Ö ½   Ø are paths. However, the edges of ½ and ¾ have the same colours with respect to and (either ¼ or Ö ). This is not possible, since ½ ends in Ö while ¾ ends in a different vertex Ø . This contradiction proves the theorem. Ø Ù À ℄ À ´ÚÙ µÈ ´Ù Úµ È Ù Ù ¬ ­ Ù ´ µ ¿ Ù Ù ¿ À À ´Úµ Ú ℄ ´ÚÙ µÈ ´Ù Úµ È È È Ú Ú È Ù Ù Ù È Example 4.2. We show that ¼ for the Petersen graph. Indeed, by Vizing’ theorem, ¼ or . Suppose colours suffice. Let     ½ be the outer cycle ½   ¼ ½  and     ½ the inner cycle of such that ¾ for all . . Now uses one colour (say ) Observe that every vertex is adjacent to all colours once and the other two twice. This can be done uniquely (up to permutations): ´ µ Ù ½¾¿ ¿ Ú ÚÙ Ú ½ Ú  Ú  Ú  Ú  Ú  Ú Hence Ú   Ù , Ú   Ù , Ú   Ù , Ú   Ù , Ú   Ù . However, this means that ½ cannot ½ ½ ¾ ¾ ¿ ¿ ¾ ½ ½ ¾ ½ ¾ ¿ ¾ be a colour of any edge in ¼ . Since ¼ needs three colours, the claim follows. ¿ ½ ¿ ½ ½ Edge Colouring Problem. Vizing’s theorem (nor its present proof) does not offer any char. In fact, it is one of the famous acterization for the graphs, for which ¼ open problems of graph theory to find such a characterization. The answer is known (only) for some special classes of graphs. By H OLYER (1981), the problem whether ¼ is or is NP-complete. ´ µ ¡´ µ · ½ ¡´ µ · ½ ´ µ ¡´ µ ¡´ µ · ½ The proof of Vizing’s theorem can be used to obtain a proper colouring of with at most colours, when the word ‘optimal’ is forgotten: colour first the edges as well as you can (if nothing better, then arbitrarily in two colours), and use the proof iteratively to improve the colouring until no improvement is possible – then the proof says that the result is a proper colouring. 4.2 Ramsey Theory In general, Ramsey theory studies unavoidable patterns in combinatorics. We consider an instance of this theory mainly for edge colourings (that need not be proper). A typical example of a Ramsey property is the following: given 6 persons each pair of whom are either friends or enemies, there are then 3 persons who are mutual friends or mutual enemies. In graph theoretic terms this means that each colouring of the edges of with 2 colours results in a monochromatic triangle. à Turan’s theorem for complete graphs We shall first consider the problem of finding a general condition for Ô to appear in a graph. It is clear that every graph contains ½ , and that every nondiscrete graph contains ¾ . à à à 4.2 Ramsey Theory 48 D EFINITION . A complete -partite graph consists of discrete and disjoint induced sub, where ¾ graphs ½ ¾ Ô if and only if and belong to different parts, and with . Ô Ô Ù Ú ÙÚ Note that a complete -partite graph is completely determined by its discrete parts , ¾ . Ô ½ Ô℄ Ô ¿, and let À ÀÒ Ô be the complete ´Ô ½µ-partite graph of order Ò Ø´Ô ½µ·Ö, Ö ¾ ½ Ô   ½℄ and Ø ¼, such that there are Ö parts À ÀÖ of order Ø · ½ and Ô   ½   Ö parts ÀÖ ÀÔ  of order Ø (when Ø ¼). (Here Ö is the positive residue of Ò modulo ´Ô   ½µ, and is thus determined by Ò and Ô.) By its definition, ÃÔ ¶ À . One can compute that the number À of edges of À is equal to Ô Ö Ö Ì´Ò Ôµ ¾´Ô  ¾½µ Ò   ¾ ½   Ô   ½ (4.2)   The next result shows that the above bound Ì´Ò Ôµ is optimal. Theorem 4.3 (T URÁN (1941)). If a graph of order Ò has Ì´Ò Ôµ edges, then contains a complete subgraph ÃÔ . Proof. Let Ò ´Ô   ½µØ · Ö for ½ Ö Ô   ½ and Ø ¼. We prove the claim by induction on Ø. If Ø ¼, then Ì´Ò Ôµ Ò´Ò   ½µ ¾, and there is nothing to prove. Suppose then that Ø ½, and let be a graph of order Ò such that is maximum subject to the condition ÃÔ ¶ . Now contains a complete subgraph ℄ ÃÔ  , since adding any one edge to results in a ÃÔ , and Ô   ½ vertices of this ÃÔ induce a subgraph ÃÔ  . is adjacent to at most Ô   ¾ vertices of ; otherwise Ú ℄ ÃÔ. Each Ú ¾ Furthermore, ÃÔ ¶   , and   Ò   Ô · ½. Because Ò   Ô · ½ ´Ø   ½µ´Ô   ½µ · Ö, Ì´Ò   Ô · ½ Ôµ. Now we can apply the induction hypothesis to obtain   Ì´Ò   Ô · ½ Ôµ · ´Ò   Ô · ½µ´Ô   ¾µ · ´Ô   ½µ´Ô   ¾µ Ì´Ò Ôµ ¾ Let where ½ ·½ ½ ¾ ½ ½ which proves the claim. When Theorem 4.3 is applied to triangles Ø Ù Ã , we have the following interesting case. ¿ Corollary 4.1 ( M ANTEL (1907)). If a graph triangle ¿ . à has ½ ¾ edges, then contains a 4.2 Ramsey Theory 49 Ramsey’s theorem be an edge colouring of . A subgraph D EFINITION . Let monochromatic, if all edges of have the same colour . « À À is said to be ( -) The following theorem is one of the jewels of combinatorics. Theorem 4.4 (R AMSEY (1930)). Let be any integers. Then there exists a (smallest) such that for all , any 2-edge colouring of Ò contains a integer -monochromatic Ô or a -monochromatic Õ . ½ Ê´Ô Õµ ℄ à ÔÕ ¾ Ò Ê´Ô Õµ ¾ à à ½ ¾℄ Before proving this, we give an equivalent statement. Recall that a subset stable, if is a discrete graph. Î Ê´Ô Õµ Ô is Theorem 4.5. Let be any integers. Then there exists a (smallest) integer such , any graph of order contains a complete subgraph of order or that for all a stable set of order . ÔÕ ¾ Ò Ê´Ô Õµ Õ Ò Be patient, this will follow from Theorem 4.6. The number is known as the Ramsey number for and . and . It is clear that Theorems 4.4 and 4.5 follow from the next result which shows (inductively) that an upper bound exists for the Ramsey numbers . Ô Õ Ê´Ô ¾µ Ô Ê´Ô Õµ Ê´¾ Õµ Õ Ê´Ô Õµ Ê´Ô Õµ Ê´Ô Õ   ½µ · Ê´Ô   ½ Õµ Proof. We use induction on Ô · Õ . It is clear that Ê´Ô Õµ exists for Ô ¾ or Õ ¾, and it is . thus exists for Ô · Õ It is now sufficient to show that if is a graph of order Ê´Ô Õ   ½µ · Ê´Ô   ½ Õµ, then it has a complete subgraph of order Ô or a stable subset of order Õ . Î Ò ´Æ ´Úµ Ú µ the set of vertices that are not Let Ú ¾ , and denote by adjacent to Ú . Since has Ê´Ô Õ   ½µ · Ê´Ô   ½ Õµ   ½ vertices different from Ú , either Æ ´Úµ Ê´Ô   ½ Õµ or Ê´Ô Õ   ½µ (or both). Ê´Ô   ½ Õµ. By the definition of Ramsey numbers, Æ ´Úµ℄ Assume first that Æ ´Úµ contains a complete subgraph of order Ô   ½ or a stable subset Ë of order Õ . In the first case, Ú induces a complete subgraph ÃÔ in , and in the second case the same stable set of order Õ is good for . Ê´Ô Õ   ½µ, then ℄ contains a complete subgraph of order Ô or a stable subset If Ë of order Õ   ½. In the first case, the same complete subgraph of order Ô is good for , and in the second case, Ë Ú is a stable subset of of Õ vertices. This proves the claim. Ù Ø A concrete upper bound is given in the following result. Theorem 4.6 (E RDÖS and S ZEKERES (1935)). The Ramsey number , and ÔÕ ¾ Ê´Ô Õµ exists for all 4.2 Ramsey Theory Theorem 4.7 ( E RDÖS and S ZEKERES (1935)). For all 50 Ê´Ô Õµ Proof. For or statement. Assume that Ô ¾ Õ ¾, the claim is clear. We use induction on Ô · Õ for the general Ô Õ ¿. By Theorem 4.6 and the induction hypothesis, Ê´Ô Õµ Ê´Ô Õ   ½µ · Ê´Ô   ½ Õµ Ô·Õ ¿ · Ô·Õ ¿ Ô·Õ ¾ Ô ½ Ô ¾ Ô ½ Ô·Õ ¾ Ô ½ Ô Õ ¾, which is what we wanted. Ø Ù Ê´Ô Õµ In the table below we give some known values and estimates for the Ramsey numbers . As can be read from the table1 , not so much is known about these numbers. ÔÒÕ 3 4 5 3 4 5 6 7 8 9 10 6 9 14 18 23 28 36 40-43 9 18 25 35-41 49-61 55-84 69-115 80-149 14 25 43-49 58-87 80-143 95-216 121-316 141-442 Ê´ µ The first unknown (where ) is for . It has been verified that , but to determine the exact value is an open problem. Ê´Ô Ôµ Ô Õ Ô ¿ Generalizations Theorem 4.4 can be generalized as follows. Theorem 4.8. Let be integers for ¾ such that for all ger ½ ¾ -monochromatic Õ for some . Ê Õ Ê´Õ Õ Ã ¾ Õµ ½ ℄ with Ò Ê, any Ôµ ¾ ¾. Then there exists an inte-edge colouring of ÃÒ has an Õµ ¾ Proof. The proof is by induction on . The case is treated in Theorem 4.4. For , , where . we show that ½ ½  ¾  ½ be an edge colouring. Let Let ½ ÃÒ  ¾ , and let   be obtained from by identifying the colours   and : ÃÒ « « ½ ´ ¬´ µ «´ µ½ if «´ µ   ½ or if «´ µ  ½ ¬ By the induction hypothesis, ÃÒ has an -monochromatic ÃÕ for some ½   ¾ (and we ¬ « ) or ÃÒ has a ´   ½µ-monochromatic are done, since this subgraph is monochromatic in ÃÒ « ÃÔ. In the latter case, by Theorem 4.4, À « and thus ÃÒ has a ´   ½µsubgraph À ¬ ¬ monochromatic or a -monochromatic subgraph, and this proves the claim. Ê´Õ Õ µ Ê´Õ Ò Ê´Õ Õ Ôµ ½ ½℄ Õ Ô Ê´Õ ½ ℄ Ø Ù ½ S.P. R ADZISZOWSKI, Small Ramsey numbers, Electronic J. of Combin., 2000 on the Web 4.2 Ramsey Theory Since for each graph 51 À , À ÃÑ for Ñ À , we have ¾ and À À À be arbitrary graphs. Then there exists an inteCorollary 4.2. Let À µ such that for all complete graphs ÃÒ with Ò Ê´À À Àµ ger Ê´À À « and for all -edge colourings « of ÃÒ , ÃÒ contains an -monochromatic subgraph À for ½ ¾ ½ ¾ ½ ¾ some . This generalization is trivial from Theorem 4.8. However, the generalized Ramsey numbers can be much smaller than their counter parts (for complete graphs) ½ ¾ in Theorem 4.8. Ê´À À Àµ Example 4.3. We leave the following statement as an exercise: If Ê´Ì ÃÒµ ´Ñ   ½µ´Ò   ½µ · ½ that is, any graph of order at least Ê´Ì ÃÒ µ contains a subgraph isomorphic to Ì , or the complement of contains a complete subgraph ÃÒ . Examples of Ramsey numbers£ Some exact values are known in Corollary 4.2, even in more general cases, for some dear graphs (see R ADZISZOWSKI’s survey). Below we list some of these results for cases, where the graphs are equal. To this end, let Ì is a tree of order Ñ, then Ê ´ µ Ê´ µ ´ times µ The best known lower bound of Ê ´ µ for connected graphs was obtained by B URR AND E RDÖS (1976),  ½ Ê´ µ ´ connectedµ ¿ ¾ ¾ Here is a list of some special cases: ¾ Ò ¿ or Ò Ê ´ Ò µ ¾Ò   ½ Ò and Ò odd ¿Ò ¾   ½ Ò and Ò even ´ ¾Ò Ê ´Ã Ò µ ¾Ò   ½ if Ò is even if Ò is odd Ê ´Ã µ ½¼ Ê ´Ã µ ½ The values Ê ´Ã Ò µ are known for Ò ½ , and in general, Ê ´Ã Ò µ Ò   ¾. The value Ê ´Ã µ is either or . Let ÏÒ denote the wheel on Ò vertices. It is a cycle Ò  , where a vertex Ú with degree Ò   ½ is attached. Note that Ï Ã . Then Ê ´Ï µ ½ and Ê ´Ï µ ½ ¾ Ê ´ÈÒ µ Ò · Ò   ½ ¾ if if if ¾ ½ ¾ ¾¿ ¾ ¿¿ ¾ ¾ ¾ ¾ ¾ ¾½ ½ ¾ ¾ 4.3 Vertex colourings 52 For three colours, much less is known. In fact, the only nontrivial result for complete . Also, , and , but no nontrivial graphs is: ¿ ¿ ¿ ¿ . For the square , we know that ¿ . upper bound is known for ¿ Needless to say that no exact values are known for for and . Ò Ê ´Ã µ ½ is not required to be induced. The following impressive theorem improves the results we have mentioned in this chapter and it has a difficult proof. Ê ´Ã µ It follows from Theorem 4.4 that for any complete ÃÒ , there exists a graph (well, any sufficiently large complete graph) such that any ¾-edge colouring of has a monochromatic (induced) subgraph ÃÒ . Note, however, that in Corollary 4.2 the monochromatic subgraph À À ½¾ Ê ´Ã µ Ê ´Ã µ ¾¿ ¿ Ê ´Ã µ Ê ´ µ ½½ Ò ¿ Theorem 4.9 (D EUBER, E RDÖS, H AJNAL, P ÓSA, and RÖDL (around 1973)). Let be any graph. Then there exists a graph such that any -edge colouring of has an monochromatic induced subgraph . À ¾ Example 4.4. As an application of Ramsey’s theorem, we shortly describe Schur’s theorem. For this, consider the partition of the set Æ ½¿ . We observe that in no partition class there are three integers such that . However, if you try to partition Æ ½ into three classes, then you are bound to find a class, has a solution. where S CHUR (1916) solved this problem in a general setting. The following gives a short proof using Ramsey’s theorem. ½ ½¿℄ ½ ½¼ ½¿ ¾ ¿ ½½ ½¾ Ü·Ý Þ Ü·Ý Þ Ë Ò ½ , there exists an integer such that any partition For each a class containing two integers such that ¾ . ´ µ ½ ´ µ ÜÝ Ü·Ý Ë Ê´¿ ¿ ¿µ, where ¿ occurs Ò times, and let à be a complete on Indeed, let Ë´Òµ Æ Ë Ò . For a partition Ë ËÒ of Æ Ë Ò , define an edge colouring « of à by «´ µ if   ¾ Ë By Theorem 4.8, à « has a monochromatic triangle, that is, there are three vertices ½ Ø Ë´Òµ such that Ø     Ø   ¾ Ë for some . But ´Ø   µ · ´   µ Ø   proves the claim. There are quite many interesting corollaries to Ramsey’s theorem in various parts of mathematics including not only graph theory, but also, e.g., geometry and algebra, see Ë´Òµ Ë ½ ËÒ of Æ Ë Ò ´ µ has R.L. G RAHAM , B.L. ROTHSCHILD 1990. AND J.L. S PENCER, “Ramsey Theory”, Wiley, (2nd ed.) 4.3 Vertex colourings The vertices of a graph can also be classified using colourings. These colourings tell that certain vertices have a common property (or that they are similar in some respect), if they share the same colour. In this chapter, we shall concentrate on proper vertex colourings, where adjacent vertices get different colours. 4.3 Vertex colourings 53 The chromatic number D EFINITION . A -colouring (or a -vertex colouring) of a graph is a mapping . The colouring is proper, if adjacent vertices obtain a different colour: for all ¾ , we have . A colour ¾ is said to be available for a vertex , if no neighbour of is coloured by . A graph is -colourable, if there is a proper -colouring for . The (vertex) chromatic of is defines as number ½ ℄ « «´Ùµ «´Úµ Ú ½ ℄ « Î ÙÚ Ú ´ µ ´ µ ÑÒ If there exists a proper -colouring of ´ µ Î , then is -chromatic. Each proper vertex colouring vertex set , where Î « Î Ú «´Úµ . ½ ℄ provides a partition Î Î ½ ¾ Î of the Example 4.5. The graph on the right, which is often called a wheel (of order ), is -chromatic. ¿ By the definitions, a graph is -colourable if and only if it is bipartite. Again, the ‘names’ of the colours are immaterial: ¾ ¬ « ½ ℄ is proper, and if ½ ℄ Proof. Indeed, if « Î ÙÚ ¾ implies that «´Ùµ «´Úµ, and hence also that «´Ùµ is a proper colouring. Lemma 4.5. Let be a proper -colouring of , and let be any permutation of the colours. is a proper -colouring of . Then the colouring « ½ ℄ is a bijection, then «´Úµ. It follows that « à . We show ¿ Ø Ù Example 4.6. A graph is triangle-free, if it has no subgraphs isomorphic to that there are triangle-free graphs with arbitrarily large chromatic numbers. The following construction is due to G RÖTZEL: Let ½ ¾ ¾ Î Ú Ú ÚÒ . Let Ø be a new graph obtained by adding Ò · ½ new vertices Ú and Ù Ù ÙÒ such that Ø has all the edges of plus the edges Ù Ú and Ù Ü for all Ü ¾ Æ´Ú µ and for all ¾ ½ Ò℄. Claim. Ø is triangle-free and it is · ½-chromatic Indeed, let Í Ù ÙÒ . We show first that Ø is triangle-free. Now, Í is stable, and so a triangle contains at most (and thus exactly) one vertex Ù ¾ Í . If Ù Ú Ú induces a triangle, so does Ú Ú Ú by the definition of Ø , but the latter triangle is already in ; a ½ ½ be any triangle-free graph with contradiction. For the chromatic number we notice first that of , extend it by setting and «´Ù µ «´Ú µ ´ Ø µ ´ ·½µ. If « is a proper «´Úµ · ½. -colouring 4.3 Vertex colourings Ø Secondly, . Assume that is a proper -colouring of . Recolour each by . This gives a proper Then Ø . contradiction. Therefore 54 «´Ù µ ´ µ « Ú «´Ù µ ´ µ ·½ ´ Ø , say with   -colouring to ½µ «´Úµ . ;a ¾ Now using inductively the above construction starting from the triangle-free graph obtain larger triangle -free graphs with high chromatic numbers. à , we Critical graphs D EFINITION . A -chromatic graph with . À is said to be -critical, if ´Àµ Ú for all À Ò In a critical graph an elimination of any edge and of any vertex will reduce the chromatic number:   and   for ¾ and ¾ . Each Ò is the vertices and can gain the same colour. critical, since in Ò   actly the odd cycles ¾Ò·½ have a cycle of odd length. Theorem 4.10. If µ ´ µ à ´ÙÚµ Example 4.7. The graph à ´ ´ Úµ ´ µ Ù Ú Ã ¾ È is the only 2-critical graph. The 3-critical graphs are exfor Ò ½, since a 3-chromatic is not bipartite, and thus must ¾ is -critical for ¾, then it is connected, and Æ´ µ ´Úµ Ú ¾ Ú Æ´ µ   ½. ÑÜ ´ µ ´ Proof. Note that for any graph with the connected components ½ ¾ Ñ, Connectivity claim follows from this observation. ¾ Let then be -critical, but   for ¾ . Since is critical, there   vertices. But is a proper   -colouring of   . Now is adjacent to only there are colours, and hence there is an available colour for . If we recolour by , then a proper   -colouring is obtained for ; a contradiction. Ø Ù ½ Ñ℄ ´ µ ´ ½µ Æ´ µ Ú ½µ Ú ½ Ú The case (iii) of the next theorem is due to S ZEKERES Theorem 4.11. Let (i) (ii) (iii) be any graph with AND W ILF (1968). has a -critical subgraph . has at least vertices of degree . À À ´ µ.   ½. ½·Ñ Ü Æ´Àµ is obtained by removing vertices Proof. For (i), we observe that a -critical subgraph and edges from as long as the chromatic number remains . be -critical. By Theorem 4.10, À   for every ¾ . For (ii), let Of course, also   for every ¾ . The claim follows, because, clearly, every -critical graph must have at least vertices. be -critical. By Theorem 4.10,   , which proves this For (iii), let claim. Ø Ù À À ´Úµ À À ½ Ú À ´Úµ ½ Ú À ´ µ ½ Æ´Àµ 4.3 Vertex colourings Lemma 4.6. Let be a cut vertex of a connected graph , and let . Then connected components of   . Denote . In particular, a critical graph does not have cut vertices. 55 Ú ½ Ñ℄ Ú Ú℄ , for ¾ ½ Ñ℄, be the ´ µ ÑÜ ´ µ ¾ Proof. Suppose each has a proper -colouring for all . These -colourings give a -colouring of « . By Lemma 4.5, we may take « ´Úµ ½ . Ø Ù Brooks’ theorem For edge colourings we have Vizing’s theorem, but no such strong results are known for vertex colouring. ´ µ ¡´ µ · ½. In fact, there exists a proper colouring «´Úµ ´Úµ · ½ for all vertices Ú ¾ . Ú ÚÒ be ordered in Proof. We use greedy colouring to prove the claim. Let Î some way, and define « Î Æ inductively as follows: «´Ú µ ½, and «´Ú µ Ñ Ò «´ÚØ µ for all Ø with Ú ÚØ ¾ Then « is proper, and «´Ú µ ´Ú µ · ½ for all . The claim follows from this. Ø Ù Although, we always have ´ µ ¡´ µ · ½, the chromatic number ´ µ usually takes much lower values – as seen in the bipartite case. Moreover, the maximum value ¡´ µ · ½ is « Î Lemma 4.7. For all graphs , such that ½ ¡´ µ · ½℄ ½ ½ obtained only in two special cases as was shown by B ROOKS in 1941. The next proof of Brook’s theorem is by L OVÁSZ (1975) as modified by B RYANT (1996). Lemma 4.8. Let be a -connected graph. Then the following are equivalent: ¾ (i) is a complete graph or a cycle. ¾ , if ¾ , then (ii) For all (iii) For all ¾ , if , then ÙÚ ÙÚ ÙÚ ´Ù Úµ ¾ ÙÚ ÙÚ is a separating set. is a separating set. Proof. It is clear that (i) implies (ii), and that (ii) implies (iii). We need only to show that (iii) implies (i). Assume then that (iii) holds. for all ¾ , from which We shall show that either is a complete graph or the theorem follows. for all , since is -connected. Let be a vertex of maximum First of all, degree, . induces a complete subgraph, then is complete. Indeed, If the neighbourhood otherwise, since is connected, there exists a vertex ¾ such that is adjacent . But then , and this contradicts the choice of . to a vertex ¾ ¾ such that ¾ . This Assume then that there are different vertices means that (the shortest path is     ), and by (iii), is a separating ´Úµ ¾ Ú ´Úµ ¾ Ú ´Ûµ ¡´ µ Æ ´Ûµ Ú Æ ´Ûµ ´Úµ ´Ù Úµ ¾ ¾ Û Ù Ú Æ ´Ûµ Ù Û Ú ´Ûµ Ù Æ ´Ûµ Û Ù ÙÚ ÙÚ Û 4.3 Vertex colourings set of . Consequently, there is a partition to a vertex of go through either paths from a vertex of 56 , and thus that as required. Suppose on the contrary We claim that that . Since is not a cut vertex (since has no cut vertices), there exists an ¾ with such that ¾ or ¾ , say ¾ . Ï ¾ Ü Û Ï Û Û ÜÙ Ï Í Î Ï ÜÚ ¡´ µ ¾ ÜÙ Ù Ú Í , where Û ¾ Ï , and all Ù or Ú. Ü Ï Since is not a cut vertex, there exists a ¾ such that ¾ . Hence , and by (iii), is a separating set. Accordingly, ½ ½, where all paths from ½ to ½ pass through or . Assume that ¾ ½ , and hence that also ¾ ½. ¾ Î   Ü Ý ). (Since Ú ÙÝ Ý Í ´Ü ݵ ¾ ÜÝ Î Ï ÜÝ Í Ï Í Ü Ý Û Ï ÙÚ Ï ÙÛ ÚÛ Þ Í Þ Ù Í Ü Ù Û Ü Ú Ý There exists a vertex ¾ ½ . Note that ½ . If ¾ (or then all paths from to must pass through (or , respectively), and would be a cut vertex of . This contradiction, proves the claim. Theorem 4.12 ( B ROOKS (1941)). Let be connected. Then if either is an odd cycle or a complete graph. Proof. (´ ) Indeed, Ï Í Þ Ï Ý Þ ¾ Í , respectively), Ü (or Ý, respectively) Ø Ù ´ µ ¡´ µ · ½ if and only µ ¿, ¡´ µ ¾, and ´ÃÒ µ Ò, ¡´ÃÒµ Ò   ½. ´ µ. We may suppose that is -critical. Indeed, assume the ( µ) Assume that ¡´ µ · ½, and let À be a -critical proper claim holds for -critical graphs. Let subgraph. Since ´Àµ ¡´ µ · ½ ¡´Àµ, we must have ´Àµ ¡´Àµ · ½, and thus À is a complete graph or an odd cycle. Now is connected, and therefore there exists an edge ÙÚ ¾ with Ù ¾ À and Ú ¾ À . But then ´Ùµ ¡´Àµ, À ´Ùµ, and ¡´ µ since À ÃÒ or À Ò. ¾. By Lemma 4.6, it is ¾-connected. If is an Let then be any -critical graph for even cycle, then ¾ ¡´ µ. Suppose now that is neither complete nor a cycle (odd or even). We show that ´ µ ¡´ µ. By Lemma 4.8, there exist Ú Ú ¾ with ´Ú Ú µ ¾, say Ú Û ÛÚ ¾ with Ú Ú ¾ , such that À   Ú Ú is connected. Order ÎÀ Ú Ú ÚÒ such that ÚÒ Û, and for all ¿, Ûµ À ´Ú Ûµ À ´Ú Therefore for each ¾ ½ Ò   ½℄, we find at least one such that Ú Ú ¾ (possibly Ú Û). In particular, for all ½ Ò, Æ ´Ú µ Ú Ú  ´Ú µ ¡´ µ (4.3) Then colour Ú Ú ÚÒ in this order as follows: «´Ú µ ½ «´Ú µ and «´Ú µ Ñ Ò Ö Ö «´Ú µ for all Ú ¾ Æ ´Ú µ with ¾ ·½ ¾ ·½ ½ ¾ ½ ¾ ½ ¾ ½ ¾ ½ ¾ ¿ ·½ ½ ½ ½ ¾ ½ ¾ ´ 4.3 Vertex colourings 57 « «´Ú µ ¡´ µ ½ Ò ½℄ Û Ú Ú Ú ½ Ú ¡´ µ Ú «´Ú µ ¡´ µ ¡´ µ ´ µ ¡´ µ Example 4.8. Suppose we have Ò objects Î Ú ÚÒ , some of which are not compatible (like chemicals that react with each other, or worse, graph theorists who will fight during a conference). In the storage problem we would like to find a partition of the set Î with as few classes as possible such that no class contains two incompatible elements. In graph theoretical terminology we consider the graph ´Î µ, where Ú Ú ¾ just in case Ú and Ú are incompatible, and we would like to colour the vertices of properly using as few colours as possible. This problem requires that we find ´ µ. Unfortunately, no good algorithms are known for determining ´ µ, and, indeed, the chromatic number problem is NP-complete. Already the problem if ´ µ ¿ is NP-complete. (However, as we have seen, the problem whether ´ µ ¾ has a fast algorithm.) The colouring is proper. for all ¾   . Also, By (4.3), Ò has two neighbours, ½ and neighbours, there is an available ¾ , of the same colour , and since Ò has at most colour for Ò , and so . This shows that has a proper -colouring, and, Ò . Ø Ù consequently, ½ The chromatic polynomial A given graph has many different proper vertex colourings large natural numbers . Indeed, see Lemma 4.5 to be certain on this point. D EFINITION . The chromatic polynomial of is the function « Î ½ ℄ for sufficiently Æ , where ´µ ´ µ « « Î ´µ ¼ ´ µ ÑÒ ½ ℄ a proper colouring Æ This notion was introduced by B IRKHOFF (1912), B IRKHOFF AND L EWIS (1946), to attack the famous -Colour Theorem, but its applications have turned out to be elsewhere. , then clearly , and, indeed, If ´µ ¼ ½¾ , then we easily compute the chrountil we hit a nonzero value. Therefore, if we can find the chromatic polynomial of just by evaluating for matic number . Theorem 4.13 will give the tools for constructing ´ µ ´µ Example 4.9. Consider the complete graph on ½ ¾ ¿ . Let . The vertex ½ can be first given any of the colours, after which   colours are available has   available colours. Therefore there are for ¾ . Then ¿ has   and finally       different ways to properly colour with colours, and so Ú Ú Ú Ú ´Ã µ ½ ¾ Ú ¿ ¿µ à ´   ½µ´   ¾µ´   ¿µ à ´ µ On the other hand, in the discrete graph à has no edges, and thus any -colouring is a proper colouring. Therefore à ´ µ Ú Ú Ú ´ ½µ´ ¾µ´ à 4.3 Vertex colourings 58 Remark. The considered method for checking the number of possibilities to colour a ‘next vertex’ is exceptional, and for more nonregular graphs it should be avoided. D EFINITION . Let vertex. The graph £ be a graph, on ÙÚ ¾ £ , and let Ü Ü´ÙÚµ be a new contracted Î ¾ ´Î Ò Ù Ú µ Ü Ù or Ú ÛÚ ¾ is obtained from by contracting the edge , when has no end £ ÛÜ ÛÙ ¾ Ù Ú or Ü ÛÚ ¾ Hence £ is obtained by introducing a new vertex , and by replacing all edges and by , and the vertices and are deleted. (Of course, no loops or parallel edges are allowed in the new graph £ .) ÛÜ Ü Ù Ú ÛÙ Theorem 4.13. Let be a graph, and let . Then ´ µ  £ ´ µ Proof. Let ÙÚ. The proper -colourings « Î ½ ℄ of   can be divided into two ´ µ · £ ´ µ: disjoint cases, which together show that  ´ µ (1) If «´Ùµ «´Úµ, then « corresponds to a unique proper -colouring of , namely «. ´ µ. Hence the number of such colourings is (2) If «´Ùµ «´Úµ, then « corresponds to a unique proper -colouring of £ , namely «, when we set «´Üµ «´Ùµ for the contracted vertex Ü Ü´ÙÚµ. Hence the number of such Ø Ù colourings is £ ´ µ.   Theorem 4.14. The chromatic polynomial is a polynomial. Ò for the discrete graph, and Proof. The proof is by induction on . Indeed, Ã Ò for two polynomials ½ and ¾ , also ½   ¾ is a polynomial. The claim follows from Theorem 4.13, since there   and £ have less edges than . Ø Ù ´µ È È È È ´µ The connected components of a graph can be coloured independently, and so Lemma 4.9. Let the graph have the connected components ´ µ ¾´ µ ´µ Theorem 4.15. Let Ì be a tree of order Ò. Then Ì ´ µ ´   ½µÒ  . ¾, the claim is obvious. Suppose that Ò ¿, and Proof. We use induction on Ò. For Ò ÚÙ ¾ Ì , where Ú is a leaf. By Theorem 4.13, Ì ´ µ Ì   ´ µ   Ì £ ´ µ. Here let Ì £ is a tree of order Ò   ½, and thus, by the induction hypothesis, Ì £ ´ µ ´   ½µÒ  . The graph Ì   consists of the isolated Ú and a tree of order Ò   ½. By Lemma 4.9, and the induction hypothesis, Ì   ´ µ ¡ ´   ½µÒ  . Therefore Ì ´ µ ´   ½µÒ  . Ø Ù ½ Ñ ´µ ½ ¾ Ñ . Then ½ ¾ ¾ ½ 4.3 Vertex colourings Example 4.10. Consider the graph reductions. of order 59 from the above. Then we have the following           £ ´   µ£ Theorem 4.13 reduces the computation of to the discrete graphs. However, we know the chromatic polynomials for trees (and complete graphs, as an exercise), and so there is no need to prolong the reductions beyond these. In our example, we have obtained   and so ´µ ´µ ´ µ    £ ´ µ ´   ½µ   ´   ½µ ´   ½µ ´   ¾µ   ´ µ ¿ ¾ ¾ For instance, for ¿ colours, there are ´ µ   £ ´ µ ´   ½µ ´   ¾µ   ´   ½µ´   ¾µ ´   ½µ´   ¾µ   ·     ¾ ¾ ¿ ¾ proper colourings of the given graph. Chromatic Polynomial Problems. It is difficult to determine of a given graph, since the reduction method provided by Theorem 4.13 is time consuming. Also, there is known no characterization, which would tell from any polynomial whether it is a chromatic polynomial ¿ ¾   is not a chromatic polynomial of some graph. For instance, the polynomial of any graph, but it seems to satisfy the general properties (that are known or conjectured) of these polynomials. R EED (1968) conjectured that the coefficients of a chromatic polynomial should first increase and then decrease in absolute value. R EED (1968) and T UTTE (1974) proved that for each of order : È´ µ ¿ ·¿ ¯ ¯ ¯ ¯ ¯ ¯ ¯ The degree of equals . Ò equals . The coefficient of The coefficient of Ò ½ equals   . The constant term is . The coefficients alternate in sign.   Ò   for all positive integers for all real numbers . ´µ Ò ½ Ò ¼ ´Ñµ Ñ´Ñ ½µ ´Üµ ¼ ½ ¼ Ü ½ Ñ, when is connected. 5 Graphs on Surfaces 5.1 Planar graphs The plane representations of graphs are by no means unique. Indeed, a graph can be drawn in arbitrarily many different ways. Also, the properties of a graph are not necessarily immediate from one representation, but may be apparent from another. There are, however, important families of graphs, the surface graphs, that rely on the (topological or geometrical) properties of the drawings of graphs. We restrict ourselves in this chapter to the most natural of these, the planar graphs. The geometry of the plane will be treated intuitively. A planar graph will be a graph that can be drawn in the plane so that no two edges intersect with each other. Such graphs are used, e.g., in the design of electrical (or similar) circuits, where one tries to (or has to) avoid crossing the wires or laser beams. Planar graphs come into use also in some parts of mathematics, especially in group theory and topology. There are fast algorithms (linear time algorithms) for testing whether a graph is planar or not. However, the algorithms are all rather difficult to implement. Most of them are based on an algorithm designed by AUSLANDER AND PARTER (1961) see Section 6.5 of S. S KIENA, “Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica”, Addison-Wesley, 1990. Definition D EFINITION . A graph is a planar graph, if it has , called the plane embedding a plane figure of , where the lines (or continuous curves) corresponding to the edges do not intersect each other except at their ends. È´ µ The complete bipartite graph à ¾ is a planar graph. Ú D EFINITION . An edge ¾ is subdivided, when it is replaced by a path     of length two by introducing a new vertex . A subdivision of a graph is obtained from by a sequence of subdivisions. ÙÚ Ü À Ù Ü 5.1 Planar graphs 61 The following result is clear. Lemma 5.1. A graph is planar if and only if its subdivisions are planar. Geometric properties It is clear that the graph theoretical properties of are inherited by all of its plane embeddings. For instance, the way we draw a graph in the plane does not change its maximum degree or its chromatic number. More importantly, there are – as we shall see – some nontrivial topological (or geometric) properties that are shared by the plane embeddings. We recall first some elements of the plane geometry. Let be an open set of the plane Ê ¢ Ê, that is, every point ¾ has a disk centred at and contained in . Then is a ¾ can be joined by a continuous curve the points of which region, if any two points of a region consists of those points for which every are all in . The boundary neighbourhood contains points from and its complement. one of its plane embeddings. Regard now each edge Let be a planar graph, and ¾ as a line from to . The set Ê ¢ Ê Ò is open, and it is divided into a . finite number of disjoint regions, called the faces of Ü ÜÝ Ü ´ µ ÙÚ È´ µ Ù Ú ´ µ È´ µ D EFINITION . A face of is an interior face, if it is bounded. The (unique) face that is unbounded is called the exterior face of . The edges that surround a face constitute the boundary of . The exterior boundary is the boundary of the exterior face. The vertices (edges, resp.) on the exterior boundary are called exterior vertices exterior edges, resp.). Vertices (edges, resp.) that are not on the exterior boundary are interior vertices interior edges, resp.). È´ µ È´ µ ´ µ ¾ ½ ¼ ¿ È´ µ satisfy some properties that we accepts at face value. Lemma 5.2. Let È´ µ be a plane embedding of a planar graph . Embeddings (i) Two different faces ½ and ¾ are disjoint, and their boundaries can intersect only on edges. has a unique exterior face. (ii) (iii) Each edge belongs to the boundary of at most two faces. . (iv) Each cycle of surrounds (that is, its interior contains) at least one internal face of (v) A bridge of belongs to the boundary of only one face. (vi) An edge that is not a bridge belongs to the boundary of exactly two faces. È´ µ È´ µ 5.1 Planar graphs 62 If is a plane embedding of a graph , then so is any drawing ¼ which is obtained by an injective mapping of the plane that preserves continuous curves. This means, from in particular, that every planar graph has a plane embedding inside any geometric circle of arbitrarily small radius, or inside any geometric triangle. È´ µ È´ µ È´ µ Euler’s formula of a planar graph has no interior faces if and only Lemma 5.3. A plane embedding if is acyclic, that is, if and only if the connected components of are trees. Proof. This is clear from Lemma 5.2. The next general form of Euler’s formula was proved by L EGENDRE (1794). Theorem 5.1 (Euler’s formula). Let its plane embeddings. Then where be a connected planar graph, and let È´ µ Ø Ù È´ µ be any of ³ is the number of faces of È´ µ. ³ ½   ·³ ¾ Proof. We shall prove the claim by induction on the number of faces of a plane embedding . First, notice that , since each has an exterior face. If , then, by Lemma 5.3, there are no cycles in , and since is connected, it is a   , and the claim holds. tree. In this case, by Theorem 2.5, we have Suppose then that the claim is true for all plane embeddings with less than faces for . Let be a plane embedding of a connected planar graph such that has faces. Let ¾ be an edge that is not a bridge. The subgraph   is planar with a plane     obtained by simply erasing the edge . Now   has embedding   faces, since the two faces of that are separated by are merged into one face of   . By the induction hypothesis,         , and hence     , and the claim follows. Ø Ù   È´ µ ³ ½ ³ ¾ È´ µ ³ ½ È´ µ ³ È´ µ ³ ³ ½ È´ µ ½µ · ´³ ½µ ¾ È´ µ È´ µ È´ µ È´ µ · ´³ ½µ ¾ ´ In particular, we have the following invariant property of planar graphs. Corollary 5.1. Let number of faces: be a planar graph. Then every plane embedding of has the same ³   ·¾ ¿, then ¿   Maximal planar graphs Lemma 5.4. If is a planar graph of order   . no triangles ¿ , then ¾ . Moreover, if has 5.1 Planar graphs Proof. If is disconnected with connected components , for ¾ holds for these smaller (necessarily planar) graphs , then it holds for 63 ½ ℄, and if the claim , since ¿ ½ ½   ¿   ¿   ¿ ´ µ It is thus sufficient to prove the claim for connected planar graphs. Also, the case where is clear. Suppose thus that . contains at least three edges on its boundary . Each face of an embedding Hence , since each edge lies on at most two faces. The first claim follows from Euler’s formula. contains The second claim is proved similarly except that, in this case, each face of at least four edges on its boundary (when is connected and ). Ø Ù ¾ ¿³ ¾ È´ µ È´ µ Æ´ µ for planar graphs was achieved by HEAWOOD. Theorem 5.2 (H EAWOOD (1890)). If is a planar graph, then Æ´ µ . ¾, then there is nothing to prove. Suppose ¿. By the handshaking lemma Proof. If An upper bound for and the previous lemma, Æ´ µ ¡ It follows that Æ´ µ Ú¾ ´Úµ ¾ · à   ½¾ Ø Ù ¾ . is maximal, if is nonplanar for every . D EFINITION . A planar graph Example 5.1. Clearly, if we remove one edge from , the result is a maximal planar graph. However, if an edge is removed from ¿ ¿ , the result is not maximal! à Lemma 5.5. Let be a face of a plane embedding that has at least four edges on its boundary. Then there are two nonadjacent vertices on the boundary of . Proof. Assume that the set of the boundary vertices of induces a complete subgraph . The edges of are either on the boundary of or they are not inside (since is a face.) Add a new vertex inside , and connect the vertices of to . The result is a plane embedding (that has as its induced subgraph). The induced subgraph of a graph with À is complete, and since is planar, we have as required. Ø Ù È´ µ Àà À Ü℄ Ã Ü Ã Î Î Ü À Ã Ü Ã By the previous lemma, if a face has a boundary of at least four edges, then an edge can be added to the graph (inside the face), and the graph remains to be planar. Hence we have proved Corollary 5.2. If is a maximal planar graph with , then is triangulated, that is, has a boundary of exactly three edges. every face of a plane embedding È´ µ ¿ 5.1 Planar graphs Theorem 5.3. For a maximal planar graph of order 64 ¿, ¿   Ø Ù Proof. Each face of an embedding is a triangle having three edges on its boundary. , since there are now no bridges. The claim follows from Euler’s formula. Hence ¿³ ¾ È´ µ Kuratowski’s theorem Theorem 5.5 will give a simple criterion for planarity of graphs. This theorem (due to K URA TOWSKI in 1930) is one of the jewels of graph theory. In fact, the theorem was proven earlier by P ONTRYAGIN (1927-1928), and also independently by F RINK AND S MITH (1930). For history of the result, see J.W. K ENNEDY, L.V. Q UINTAS , AND M.M. S YSLO, The theorem on planar graphs. Historia Math. 12 (1985), 356 – 368. Theorem 5.4. à and à ¿¿ are not planar graphs. has 5 vertices Proof. By Lemma 5.4, a planar graph of order 5 has at most 9 edges, but and 10 edges. By the second claim of Lemma 5.4, a triangle-free planar graph of order 6 has at most 8 edges, but ¿ ¿ has 6 vertices and 9 edges. Ø Ù Ã Ã The graphs and ¿ ¿ are the smallest nonplanar graphs, and, by Lemma 5.1, if contains a subdivision of or ¿ ¿ as a subgraph, then is not planar. We prove the converse of this result in what follows. Therefore Theorem 5.5 (K URATOWSKI (1930)). A graph is planar if and only if it contains no subdivior ¿ ¿ as a subgraph. sion of à à à à à à We prove this result along the lines of T HOMASSEN (1981) using -connectivity. Example 5.2. The cube is planar only for . Indeed, the graph contains a with subdivision of ¿ ¿ , and thus by Theorem 5.5 it is not planar. On the other hand, each has as a subgraph, and therefore they are nonplanar. The subgraph of that is a subdivision of ¿ ¿ is given below. ¿ É Ã Ã É ½¾¿ É É É 0000 1010 1001 0100 1110 1101 0001 0011 1000 1100 0010 5.1 Planar graphs D EFINITION . A graph is called a Kuratowski graph, if it is a subdivision of 65 à or à ¿¿ . be the set of the boundary edges of a face Lemma 5.6. Let , where the edges of of . Then there exists a plane embedding È´ µ in a plane embedding are exterior edges. Proof. This is a geometric proof. Choose a circle that contains every point of the plane embedding (including all points of the edges) such that the centre of the circle is inside the given face. Then use geometric inversion with respect to this circle. This will map the given face as Ø Ù the exterior face of the image plane embedding. Lemma 5.7. Let be a nonplanar graph without Kuratowski graphs such that in this respect. Then is -connected. ¿ is minimal Proof. We show first that is -connected. On the contrary, assume that , and let ½ be the connected components of   . ¾ Ú Ú is a cut vertex of ¾ Since is minimal nonplanar with respect to , the subhave plane embeddings , graphs where is an exterior vertex. We can glue these plane embeddings together at to obtain a plane embedding of , and this will contradict the choice of . Ú Ú℄ È´ µ Ú ½ Ë Ù Ú Ù Ú Ë À · ÙÚ ÙÚ If both À and À are planar, then, by Lemma 5.6, they have plane embeddings, where ÙÚ is an exterior edge. It is now À À easy to glue À and À together on the edge ÙÚ to obtain a plane embedding of · ÙÚ , and thus of . We conclude that À or À is nonplanar, say À . Now À½ , and so, by the minimality of , À contains a Kuratowski graph À . However, there is a path Ù   Ú in À , since À . This path can be regarded as a subdivision of ÙÚ, and thus contains a Kuratowski graph. This contradiction shows that is ¿-connected. Ø Ù Lemma 5.8. Let be a ¿-connected graph of order . Then there exists an edge ¾ such that the contraction £ is ¿-connected. , the graph £ has a separating set Ë Proof. On the contrary suppose that for any ¾ with Ë ¾. Let ÙÚ, and let Ü Ü´ÙÚµ be the contracted vertex. Necessarily Ü ¾ Ë , say Ë Ü Þ (for, otherwise, Ë would separate already). Therefore Ì Ù Ú Þ separates . Assume that and Ë are chosen such that  Ì has a connected component with the ½ ¾ ½ ¾ ½ ¾ ½ ¾ ½ ½ ¾ ¾ ¾ Assume then that has a separating set . Let ½ and ¾ be any subgraphs of such that , , and both ½ and ¾ contain a connected ½ ¾ ½ ¾ component of   . Since is -connected (by the above), there are paths   in ½ and and are adjacent to a vertex of each connected component of   . Let ¾ . Indeed, both . (Maybe ¾ .) Ë Î ¾ Ë ÙÚ Î least possible number of vertices. 5.1 Planar graphs There exists a vertex ¾ with ¾ . (Otherwise would separate .) The graph £ is not connected by assumption, and hence, as in the above, there exists a vertex such that separates . It can ¾ , but by symmetry we can suppose that be that . 66 ÙÚ Ý ÞÝ ´Þݵ ¿ Û Ù Û Û ÙÚ Ê ÞÝÛ Ù ÌÚ Þ ÙÚ Ý Ý Ý È Since ¾ ,   has a connected component such that ¾ . For each ¼ ¾ ,   ¼ in   , since is -connected, and hence this goes there exists a path ¼ is connected to also in   , that is, ¼ ¾ , and so through . Therefore . The , and this contradicts the choice of . Ø Ù inclusion is proper, since ¾ . Hence ÙÚ Ý Ê È Ù Ý Ý Ý ÞÛ Ý Ì ¿ By the next lemma, a Kuratowski graph cannot be created by contractions. Lemma 5.9. Let be a graph. If for some subgraph, then so does . ¾ the contraction £ has a Kuratowski Proof. The proof consists of several cases depending on the Kuratowski graph, and how the subdivision is made. We do not consider the details of these cases. be a Kuratowski graph of £ , where is the contracted vertex for Let . If À , then the claim is obviously true. Suppose then that À or . If ¾ À such that ¾ (or ¾ ), then one easily sees there exists at most one edge that contains a Kuratowski graph. is a subdivision of , and both and have There remains only one case, where neighbours in the subgraph of corresponding to . In this case, contains a subdivision of ¿ ¿ . Ø Ù ÙÚ À ´Üµ ¾ Ü ÜÝ ÙÝ Ü´ÙÚµ ÚÝ ´Üµ ¿ Ù À à À Ã Ú ¿ Ú¾ Ü Ú½ Ú Ú¾ Ù Ú Ú Ú¿ Ú½ Ú¿ Lemma 5.10. Every -connected graph ¿ without Kuratowski subgraphs is planar. Proof. The proof is by induction on . The only -connected graph of order is the planar graph . Therefore we can assume that . ¾ such that £ (with a contracted vertex By Lemma 5.8, there exists an edge ) is -connected. By Lemma 5.9, £ has no Kuratowski subgraphs, and hence £ has a £ by the induction hypothesis. Consider the part £   , and plane embedding £   containing (in £ ). Here is a cycle let be the boundary of the face of of (since is -connected). £  , £   is a plane embedding of   , and Now since   and . Assume, by symmetry, that . Let à ¿ Ü ¿ ÙÚ Æ ´Ùµ Î È´ µ È´ µ Ü ¿ Ù Ú ´ µ Ü È´ µ Ü Ú Æ ´Úµ Î Ù Ü È´ µ È´ µ Ü ´Úµ ÙÚ ´Ùµ 5.2 Colouring planar graphs ½ ¾ 67 Æ ´Úµ Ò Ù Ú Ú Ú in order along the cycle . Let È Ú   Ú be the path along from Ú to Ú . We obtain a plane embedding of  Ù by drawing (straight) edges ÚÚ for ½ . (1) If Æ ´Ùµ Ò Ú ¾ È ( · ½ is taken modulo ) for some , then, clearly, has a plane embedding (obtained from È´ µ Ù by putting Ù inside the triangle ´Ú Ú Ú µ and by drawing the edges with an end Ù inside this triangle). ·½ ·½ È ¾ Ò such that (2) Assume there are and ¾ for some and , where ¾ form a subdivision of Now, ·½ Þ È ÙÚ Ú Ý Þ Æ ´Ùµ Ú ÝÞ ÚÞÝ Ý¾ Ú Ú . à . ¿¿ Ý Þ Ù Ú By (1) and (2), we can assume that Ò . Ò Ò by the assumption Therefore, . Also, by (1), . But now . Ø Ù ½ ¾ ¿ give a subdivision of Æ ´Ùµ Ú ´Úµ ´Ùµ ÙÚÚ Ú Ú Æ ´Ùµ Ú Æ ´Úµ Æ ´Úµ Ù ´Úµ ´Ùµ ¿ Ã Ù Ú Proof of Theorem 5.5. By Theorem 5.4 and Lemma 5.1, we need to show that each nonplanar graph contains a Kuratowski subgraph. On the contrary, suppose that is a nonplanar such that does not contain a Kuratowski subgraph. Then, graph that has a minimal size by Lemma 5.7, is -connected, and by Lemma 5.10, it is planar. This contradiction proves the claim. Ø Ù ¿ Example 5.3. Any graph can be drawn in the plane so that three of its edges never intersect is the minimum number of intersections of its at the same point. The crossing number ¢ , and, for edges in such plane drawings of . Therefore is planar if and only if ¢ instance, ¢ . . For this we need to show that ¢ . For the equality, one We show that ¢ is invited to design a drawing with exactly crossings. be a drawing of using crossings so that two edges cross at most once. Let vertices and Add a new vertex at each crossing. This results in a planar graph on edges. Now , since     . ´ µ ´Ã µ ½ ´Ã µ ¿ ¿ ´ µ ¼ ´Ã µ à ¾ · ½ ¿ ¾ · ½ ´Ã µ ¿ ¿ ¿´ · µ · 5.2 Colouring planar graphs The most famous problem in the history of graph theory is that of the chromatic number of planar graphs. The problem was known as the -Colour Conjecture for more than 120 years, until it was solved by A PPEL AND H AKEN in 1976: if is a planar graph, then . The -Colour Conjecture has had a deep influence on the theory of graphs during the last 150 years. The solution of the -Colour Theorem is difficult, and it requires the assistance of a computer. ´ µ 5.2 Colouring planar graphs 68 The -colour theorem We prove H EAWOOD’s result (1890) that each planar graph is properly -colourable. Lemma 5.11. If is a planar graph, then ´ µ Ú . Proof. The proof is by induction on . Clearly, the claim holds for . By Theorem 5.2, . By the induction hypothesis,   . a planar graph has a vertex with , there is a colour available for in the -colouring of   , and so Since . Ø Ù ´Úµ Ú ´Úµ ´ Úµ Ú ´ µ The proof of the following theorem is partly geometric in nature. Theorem 5.6 (H EAWOOD (1890)). If is a planar graph, then ´ µ Ú . Proof. Suppose the claim does not hold, and let be a -critical planar graph. Recall that for -critical graphs ,   , and thus there exists a vertex with . . By Theorem 5.2, Let be a proper -colouring of   . Such a colouring is -critical. By assumption, , exists, because , there exists a neighbour and therefore for each ¾ ¾ such that . Suppose these neighbours of occur in the plane in the geometric order of the figure. « À Æ´Àµ ´Úµ ½ ´Úµ Æ´ µ Ú½ Ú¾ Ƚ¿ Ú¿ Ú Ú Æ ´Úµ Ú Ú «´Ú µ ½ ℄ ℄ ´ µ Ú Ú Ú Consider the subgraph made of colours and . The vertices and are in (for, otherwise we interchange the colours and the same connected component of in the connected component containing to obtain a recolouring of , where and have the same colour , and then recolour with the remaining colour ).   be a path in , and let . By the geometric Let ½ ½¿ ¿ assumption, exactly one of ¾ , lies inside the region enclosed by the cycle . Now, the path at some vertex of , since is planar. This is a contradiction, since the ¾ must meet vertices of ¾ are coloured by and , but contains no such colours. Ø Ù È Ú È Ú Ú ℄ Ú Ú Ú Ú Ú È Ú Ú ¾ ℄ ´ÚÚ µÈ ´Ú Úµ The final word on the chromatic number of planar graphs was proved by A PPEL H AKEN in 1976. Theorem 5.7 (4-Colour Theorem). If is a planar graph, then AND ´ µ . By the following theorem, each planar graph can be decomposed into two bipartite graphs. be a -chromatic graph, Theorem 5.8. Let be partitioned into two subsets ½ and ¾ such that ½ ´ µ . Then the edges of can ´Î µ and ´Î µ are both bipartite. Proof. Let Î «  ´ µ be the set of vertices coloured by in a proper -colouring « of . as the subset of the edges of that are between the sets Î and Î ; Î and Î ; The define Î and Î . Let be the rest of the edges, that is, they are between the sets Î and Î ; Î and Î ; Î and Î . It is clear that ´Î µ and ´Î µ are bipartite, since the sets Î are stable. Ù Ø ½ ¾ ½ ½ ¾ ½ ¿ ¿ ¾ ½ ¿ ¾ ¾ ½ ¾ ´Î µ 5.2 Colouring planar graphs 69 Map colouring£ The -Colour Conjecture was originally stated for maps. In the map-colouring problem we are given several countries with common borders, and we wish to colour each country so that no neighbouring countries obtain the same colour. How many colours are needed? A border between two countries is assumed to have a positive length – in particular, countries that have only one point in common are not allowed in the map colouring. Formally, we define a map as a connected planar (embedding of a) graph with no bridges. The edges of this graph represent the boundaries between countries. Hence a country is a face of the map, and two neighbouring countries share a common edge (not just a single vertex). We deny bridges, because a bridge in such a map would be a boundary inside a country. The map-colouring problem is restated as follows: How many colours are needed for the faces of a plane embedding so that no adjacent faces obtain the same colour. The illustrated map can be -coloured, and it cannot be coloured using only colours, because every two faces have a common border. ¿ , and define a graph with Ò be the countries of a map such that ¾ if and only if the countries and are neighbours. It is easy to see that is a planar graph. Using this notion of a dual graph, we can state the map-colouring problem in new form: What is the chromatic number of a planar graph? By the -Colour Theorem it is at most four. Map-colouring can be used in rather generic topological setting, where the maps are defined by curves in the plane. As an example, consider finitely many simple closed curves in the plane. These curves divide the plane into regions. The regions are -colourable. Ú Ú ½ Let ½ ¾ ÚÒ ¾ ÚÚ Å Î ¾ That is, the graph where the vertices correspond to the regions, and the edges correspond to the neighbourhood relation, is bipartite. To see this, colour a region by , if the region is inside an odd number of curves, and, otherwise, colour it by . ¾ ½ ¾ ¾ ¾ ½ ½ ¾ ½ ¾ ½ ½ ½ ¾ History of the 4-Colour Theorem That four colours suffice planar maps was conjectured around 1850 by F RANCIS G UTHRIE, a student of D E M ORGAN at University College of London. During the following 120 years many outstanding mathematicians tried to solve the problem, and some of them even thought that they had been successful. 5.2 Colouring planar graphs 70 In 1879 C AYLEY pointed out some difficulties that lie in the conjecture. The same year A LFRED K EMPE published a paper, where he claimed a proof of the 4CC. The basic idea in K EMPE’s argument (known later as Kempe chains) was the same as later used by H EAWOOD to prove the -Colour Theorem, (Theorem 5.6). For more than 10 years K EMPE’s proof was considered to be valid. For instance, TAIT published two papers on the 4CC in the 1880’s that contained clever ideas, but also some further errors. In 1890 H EAWOOD showed that K EMPE’s proof had serious gaps. As we shall see in the next chapter, H EAWOOD discovered the number of colours needed for all maps on other surfaces than the plane. Also, he proved that if the number of edges around each region is divisible by , then the map is -colourable. One can triangulate any planar graph (drawn in the plane), by adding edges to divide the faces into triangles. B IRKHOFF introduced one of the basic notions (reducibility) needed in the proof of the 4CC. In a triangulation, a configuration is a part that is contained inside a cycle. An unavoidable set is a set of configurations such that any triangulation must contain one of the configurations in the set. A configuration is said to be reducible, if it is not contained in a triangulation of a minimal counter example to the 4CC. The search for avoidable sets began in 1904 with work of W EINICKE, and in 1922 regions. This number was F RANKLIN showed that the 4CC holds for maps with at most increased to by R EYNOLDS (1926), to by W INN (1940), to by O RE AND S TEMPLE by M AYER (1976). (1970), to The final notion for the solution was due to H EESCH, who in 1969 introduced discharging. This consists of assigning to a vertex the charge   . From Euler’s formula we see that for the sum of the charges, we have ¿ ¾ ¿ ¾ ¿ Ú ´Úµ Now, a given set of configurations can be proved to be unavoidable, if for a triangulation, that does not contain a configuration from , one can ‘redistribute’ the charges so that no comes up with a positive charge. According to H EESCH one might be satisfied with a set of configurations to prove the 4CC. There were difficulties with his approach that were solved in 1976 by A PPEL AND H AKEN. They based the proof on reducibility using Kempe chains, and ended up with an configurations and some discharging rules. The proof used unavoidable set with over hours of computer time. (KOCH assisted with the computer calculations.) A simplified proof by ROBERTSON , S ANDERS , S EYMOUR AND T HOMAS (1997) uses configurations and discharging rules. Because of these simplifications also the computer time is much less than in the original proof. The following book contains the ideas of the proof of the -Colour Theorem. T.L. S AATY AND P.C. K AINEN, “The Four-Color Problem”, Dover, 1986. Ë Ú ´   ´Úµµ ½¾ Ë Ú ¼¼ ½¾¼¼ ¿¾ ½ ¼¼ ¿¼¼ ¿¿ 5.2 Colouring planar graphs 71 List colouring be a graph so that each of its vertices is given a list (set) of D EFINITION . Let colours. A proper colouring of is a ( -)list colouring, if each vertex gets ¾ . a colour from its list, is the smallest integer such that has a -list colourThe list chromatic number ing for all lists of size , . Also, is -choosable, if . « Î ½ Ñ℄ «´Úµ £´Úµ ´ µ £´Úµ à £ Ú £´Úµ Ú ´ µ ½ ¿ £ Example 5.4. The bipartite graph ¿ ¿ is not choosable. Indeed, let the bipartition of ¿ ¿ be , where and ½ ¾ ¿ ½ ¾ ¿ . The lists for the vertices shown in the . figure show that ¿¿ ´ Ý Ý Ý µ Obviously but equality does not hold in general. However, it was proved by V IZING (1976) and E RDÖS , RUBIN AND TAYLOR (1979) that Ü Ü Ü Ü½ ܾ Ü¿ ´Ã µ ¾ ´ µ ´ µ, since proper colourings are special cases of list colourings, ½ ¾ ½ ¿ ¾ ¿ à ¾ ½ ¾ ¾ ¿ ݽ ݾ Ý¿ ´ µ ¡´ µ · ½ For planar graphs we do not have a ‘ -list colour theorem’. Indeed, it was shown by VOIGT (1993) that there exists a planar graph with . At the moment, the smallest such a graph was produced by M IRZAKHANI (1996), and it is of order . ´ µ ¿ Theorem 5.9 (T HOMASSEN (1994)). Let be a planar graph. Then ´ µ . In fact, T HOMASSEN proved a stronger statement: Theorem 5.10. Let be a planar graph and let exterior face. Let consist of lists such that ¾ . Then has a -list colouring . Ú £ £ « £´Úµ ¿ for all Ú ¾ be the cycle that is the boundary of the , and for all £´Úµ Proof. We can assume that the planar graph is connected, and that it is given by a neartriangulation; an embedding, where the interior faces are triangles. (If the boundary of a face has more than edges, then we can add an edge inside the face.) This is because adding edges to a graph can only make the list colouring more difficult. Note that the exterior boundary is unchanged by a triangulation of the interior faces. under the additional constraint that one of the vertices of The proof is by induction on has a fixed colour. (Thus we prove a stronger statement than claimed.) For , the claim is obvious. Suppose then that . ¾ . Let ¾ be a vertex Let ¾ be a vertex, for which we fix a colour   . adjacent to , that is, ¿ ¿ Ü Ü Ú Ü Ú «´Üµ £´Üµ Ú 5.2 Colouring planar graphs Let , where ¾ , and ½ are ordered such that the faces are triangles as in the , in which case figure. It can be that ¾ . 72 Æ ´Úµ ÜÚ ÜÝ Ú½ Ú Ú¾ Consider the subgraph   . The exterior bound¡¡¡   ary of is the cycle ½ Since , there are two colours ¾ that differ from . We define new lists for as follows: ¼ Ò such that ¼ for ¼ , and otherwise . each ¾ Now À   , and by the induction hypothesis (with still fixed), has a ¼ -list or such that . This gives a colouring . For the vertex , we choose ¼ -list colouring for . Since ¼ for all , we have that is a -list colouring of . Ø Ù Ú Ý Ý Æ ´Úµ Ü Ý À Ú Ú Ú Ý Ú Ü À £´Úµ « ¿ «´Üµ ½ Ü Ú ½ ℄ £ Ý Ü Ö × £´Úµ À £ ´Ú µ £´Ú µ Ö × £ ´Ú µ ¿ £ ´Þµ £´Þµ «´Üµ À £ Ú «´Úµ Ö × «´Úµ «´Ýµ £ ´Þµ £´Þµ Þ « £ Straight lines and kissing circles£ We state an interesting result of WAGNER, the proof of which can be deduced from the above proof of Kuratowski’s theorem. The result is known as Fáry’s Theorem. Theorem 5.11 (WAGNER (1936)). A planar graph are straight lines. This raises a difficult problem: Integer Length Problem. Can all planar graphs be drawn in the plane such that the edges are straight lines of integer lengths? We say that two circles kiss in the plane, if they intersect in one point and their interiors do not intersect. For a set of circles, we draw a graph by putting an edge between two midpoints of kissing circles. The following improvement of the above theorem is due to KOEBE (1936), and it was rediscovered independently by A NDREEV (1970) and T HURSTON (1985). has a plane embedding, where the edges ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ Theorem 5.12 (KOEBE (1936)). A graph is planar if and only if it is a kissing graph of circles. Graphs can be represented as plane figures in many different ways. For this, consider a set of curves of the plane (that are continuous between their end points). The string graph of is the graph , where ¾ if and only if the curves and intersect. At first it might seem that every graph is a string graph, but this is not the case. It is known that all planar graphs are string graphs (this is a trivial result). Ë Ë ´Ë µ ÙÚ Ù Ú 5.2 Colouring planar graphs 73 Line Segment Problem. A graph is a line segment graph if it is a string graph for a set of straight line segments in the plane. Is every planar graph a line segment graph for some set of lines? Note that there are also nonplanar graphs that are line segment graphs. Indeed, all complete graphs are such graphs. The above question remains open even in the case when the slopes of the lines are ,   , and ½. A positive answer to this -slope problem for planar graphs would prove the -Colour Theorem. Ä Ä ·½ ½ ¼ ·½  ½ ¼ ½ The Minor Theorem£ D EFINITION . A graph is a minor of , denoted by , if obtained from a subgraph of by successively contracting edges. À À À is isomorphic to a graph A recent result of ROBERTSON AND S EYMOUR (1983-2000) on graph minors is (one of) the deepest results of graph theory. The proof goes beyond these lectures. Indeed, the proof of Theorem 5.13 is around 500 pages long. a subgraph a contraction Note that every subgraph is a minor, . The following properties of the minor relation are easily established: (i) (ii) (iii) À À À and À imply À , À Ä and Ä imply À . , The conditions (i) and (iii) ensure that the relation is a quasi-order, that is, it is reflexive and transitive. It turns out to be a well-quasi-order, that is, every infinite sequence ½ ¾ of and with such that . graphs has two graphs Theorem 5.13 (Minor Theorem). The minor order is a well-quasi-order on graphs. In particular, in any infinite family of graphs, one of the graphs is a (proper) minor of another. Each property È of graphs defines a family of graphs, namely, the family of those graphs that satisfy this property. 5.3 Genus of a graph 74 D EFINITION . A family of graphs is said to be minor closed, if every minor of a graph ¾ is also in . A property È of graphs is said to be inherited by minors, if all minors of a graph satisfy È whenever does. The following families of graphs are minor closed: the family of (1) all graphs, (2) planar graphs (and their generalizations to other surfaces), (3) acyclic graphs. The acyclic graphs include all trees. However, the family of trees is not closed under taking subgraphs, and thus it is not minor closed. More importantly, the subgraph order of trees ( ½ ¾ ) is not a well-quasi-order. WAGNER proved a minor version of Kuratowski’s theorem: À Ì Ì Theorem 5.14 (WAGNER (1937)). A graph . Proof. Exercise. ROBERTSON AND is nonplanar if and only if à or à ¿¿ Ø Ù S EYMOUR (1998) proved the Wagner’s conjecture: Theorem 5.15 (Minor Theorem 2). Let È be a property of graphs inherited by minors. Then there exists a finite set of graphs such that satisfies È if and only if does not have a minor from . One of the impressive application of Theorem 5.15 concerns embeddings of graphs on surfaces, see the next chapters. By Theorem 5.15, one can test (with a fast algorithm) whether a graph can be embedded onto a surface. Every graph can be drawn in the -dimensional space without crossing edges. An old problem asks if there exists an algorithm that would determine whether a graph can be drawn so that its cycles do not form (nontrivial) knots. This problem is solved by the above results, since the property ‘knotless’ is inherited by minors: there exists a fast algorithm to do the job. However, this algorithm is not known! ¿ Hadwiger’s Problem. H ADWIGER conjectured in 1943 that for every graph , Ã Ö ¾ ´ µ Ö ´ µ that is, if , then has a complete graph Ö as its minor. The conjecture is trivial , and it is known to hold for all . The cases for and follow from the for -Colour Theorem. Ö Ã Ö 5.3 Genus of a graph A graph is planar, if it can be drawn in the plane without crossing edges. A plane is an important special case of a surface. In this section we study shortly drawing graphs in other surfaces. 5.3 Genus of a graph 75 There are quite many interesting surfaces many of which are rather difficult to draw. We shall study the ‘easy surfaces’ – those that are compact and orientable. These are surfaces that have both an inside and an outside, and can be entirely characterized by the number of holes in them. This number is the genus of the surface. There are also non-orientable compact surfaces such as the Klein bottle and the projective plane. Background on surfaces We shall first have a quick look at the general surfaces and their classification without going ¾ Ê of into the details. Consider the space Ê ¿ , which has its (usual) distance function its points. Two figures (i.e., sets of points) and are topologically equivalent (or homeomorphic) if there exists a bijection such that and its inverse  ½ are continuous. In particular, two figures are topologically equivalent if one can be deformed to the other by bending, squeezing, stretching, and shrinking without tearing it apart or gluing any of its parts together. All these deformations should be such that they can be undone. A set of points is a surface, if is connected (there is a continuous line inside between any two given points) and every point ¾ has a neighbourhood that is topologically . equivalent to an open planar disk We deal with surfaces of the real space, and in this case a surface is compact, if is closed and bounded. Note that the plane is not compact, since it it not bounded. A subset of a compact surface is a triangle if it is topologically equivalent to a triangle in the plane. Ñ , is a triangulation of if and any A finite set of triangles , ½ with is either a vertex or an edge. nonempty intersection The following is due to R ADÓ (1925). ´Ü ݵ ´µ Ü Ü ×Ø´ ܵ ½ Ì ½¾ Ì Ì Ñ Ì Theorem 5.16. Every compact surface has a triangulation. Each triangle of a surface can be oriented by choosing an order for its vertices up to cyclic permutations. Such a permutation induces a direction for the edges of the triangle. A triangulation is said to be oriented if the triangles are assigned orientations such that common edges of two triangles are always oriented in reverse directions. A surface is orientable if it admits an oriented triangulation. Equivalently, orientability can be described as follows. is orientable if and only if it has no subsets that are Theorem 5.17. A compact surface topologically equivalent to the Möbius band. In the Möbius band (which itself is not a surface according the above definition) one can travel around and return to the starting point with left and right reversed. A connected sum of two compact surfaces is obtained by cutting an open disk off from both surfaces and then gluing the surfaces together along the boundary of the disks. (Such a deformation is not allowed by topological equivalence.) The next result is known as the classification theorem of compact surfaces. 5.3 Genus of a graph Theorem 5.18 (D EHN AND 76 H EEGAARD (1907)). Let be a compact surface. Then (i) if is orientable, then it is topologically equivalent to a sphere ¼ or a connected for some , where ½ is a torus. sum of tori: Ò ½ ½ ½ (ii) if is nonorientable, then is topologically equivalent to a connected sum of projective for some , where is a projective plane. planes: Ò Ë Ë Ë Ë Ò ½ Ë Ë Ë È È È È Ò ½ È It is often difficult to imagine how a figure (say, a graph) can be drawn in a surface. There is a helpful, and difficult to prove, result due to R ADÓ (1920), stating that every compact surface (orientable or not) has a description by a plane model, which consists of a polygon in the plane such that ¯ ¯ ¯ each edge of the polygon is labelled by a letter, each letter is a label of exactly two edges of the polygon, and each edge is given an orientation (clockwise or counter clockwise). Given a plane model , a compact surface is obtained by gluing together the edges having the same label in the direction that they have. Å Sphere Torus Klein bottle Projective plane From a plane model one can easily determine if the surface is oriented or not. It is nonoriented if and only if, for some label , the edges labelled by have the same direction when read clockwise. (This corresponds to the Möbius band.) A plane model, and thus a compact surface, can also be represented by a (circular) word by reading the model clockwise, and concatenating the labels with the convention that  ½ is chosen if the direction of the edge is counter clockwise. Hence, the sphere is represented  ½  ½ , the torus by  ½  ½ , the Klein bottle by  ½ and the projective by the word  ½ . plane by These surfaces, as do the other surfaces, have many other plane models and representing words as well. A word representing a connected sum of two surfaces, represented by words ½ and ¾ , is obtained by concatenating these words to ½ ¾ . By studying the relations of the representing words, Theorem 5.18 can be proved. Klein bottle Ï Ï ÏÏ 5.3 Genus of a graph 77 Drawing a graph (or any figure) in a surface can be elaborated compared to drawing in a plane model, where a line that enters an edge of the polygon must continue by the corresponding point of the other edge with the same label (since these points are identified when we glue the edges together). Example 5.5. On the right we have drawn in the Klein bottle. The black dots indicate, where the lines enter and leave the edges of the plane model. Recall that in the plane model for the Klein bottle the vertical edges of the square have the same direction. à ¿ ¾ ½ ½ ¾ ¿ Sphere D EFINITION . In general, if is a surface, then a graph drawn in without crossing edges. Ë Ë has an -embedding, if Ë can be Let ¼ be (the surface of) a sphere. According to the next theorem a sphere has exactly the same embeddings as do the plane. In the one direction the claim is obvious: if is a planar graph, then it can be drawn in a bounded area of the plane (without crossing edges), and this bounded area can be ironed on the surface of a large enough sphere. Ë Clearly, if a graph can be embedded in one sphere, then it can be embedded in any sphere – the size of the sphere is of no importance. On the other hand, if is embeddable in a sphere ¼ , then there is a small area of the sphere, where there are no points of the edges. We then puncture the sphere at this area, and stretch it open until it looks like a region of the plane. In this process no crossings of edges can be created, and hence is planar.  ¡ ¢£ Ë Another way to see this is to use projection of the sphere to a plane: Theorem 5.19. A graph has an Ë -embedding if and only if it is planar. ¼ Therefore instead of planar embeddings we can equally well study embeddings of graphs in a sphere. This is sometimes convenient, since the sphere is closed and it has no boundaries. 5.3 Genus of a graph 78 Most importantly, a planar graph drawn in a sphere has no exterior face – all faces are bounded (by edges). If a sphere is deformed by pressing or stretching, its embeddability properties will remain the same. In topological terms the surface has been distorted by a continuous transformation. Torus Consider next a surface which is obtained from the sphere ¼ by pressing a hole in it. This is a torus ½ (or an orientable surface of genus 1). The ½ -embeddable graphs are said to have genus equal to 1. Ë Sometimes it is easier to consider handles than holes: a torus tinuous transformation) into a sphere with a handle. If a graph is crossing edges. Ë -embeddable, then it can be drawn in any one of the above surfaces without ½  ¡ ¢£  ¡  ¡  ¡ ¢£ ¢£ ¢£  ¡  ¡ ¢£ ¢£ Ë Ë Ë ½ ½ ½ can be deformed (by a con- Example 5.6. The smallest nonplanar graphs and ¿ ¿ have genus . Also, has genus as can be seen from the plane model (of the torus) on the right. à ½ à ½ à ¾ ¿ ½ ½ Genus ) be a sphere with holes in it. The drawing of an can already be quite Let Ò ( complicated, because we do not put any restrictions on the places of the holes (except that we must not tear the surface into disjoint parts). However, once again an Ò can be transformed (topologically) into a sphere with handles. Ë Ò ¼ Ò Ò Ë Ë 5.3 Genus of a graph  ¡¢  ¡¢ £¤¥ £¤¥ ´ µ of a graph Ò ´ µ ¼ 79 D EFINITION . We define the genus is Ò -embeddable. Ë as the smallest integer , for which ´Ã µ ½ For planar graphs, we have , and, in particular, . For , we have , since is nonplanar, but is embeddable in a torus. Also, . ¿¿ . The next theorem states that any graph can be embedded in some surface Ò with à Theorem 5.20. Every graph has a genus. This result has an easy intuitive verification. Indeed, consider a graph and any of its plane (or sphere) drawing (possibly with many crossing edges) such that no three edges cross each other in the same point (such a drawing can be obtained). At each of these crossing points create a handle so that one of the edges goes below the handle and the other uses the handle to cross over the first one. We should note that the above argument does not determine , only that can be embedded in some Ò . , and thus the genus However, clearly of exists.  ¡¢ £¤¥ ´Ã µ ¼ à ´Ã µ ½ Ë Ò ¼ ´ µ ´ µ Ò Ë ´ µ The same handle can be utilized by several edges. Euler’s formula with genus£  ¡¢ £¤¥ Ë Ë The drawing of a planar graph in a sphere has the advantage that the faces of the embedding are not divided into internal and external. The external face of becomes an ‘ordinary face’ after has been drawn in ¼ . ) is a region of Ò surrounded In general, a face of an embedding of in Ò (with by edges of . Let again denote the number of faces of an embedding of in Ò . We omit the proof of the next generalization of Euler’s formula. Ë ³ Ë ´ µ Ò Theorem 5.21. If is a connected graph, then   ·³ ¾ ¾ ´ µ 5.3 Genus of a graph If is a planar graph, then planar graphs. 80 ´ µ ¼, and the above formula is the Euler’s formula for È´ µ ¾ in a surface is a -cell, if every simple closed D EFINITION . A face of an embedding curve (that does not intersect with itself) can be continuously deformed to a single point. The complete graph can be embedded in a torus such that it has a face that is not a 2-cell. But this is because , and the genus of the torus is . We omit the proof of the general condition discovered by YOUNGS: à ´Ã µ ¼ ½ Theorem 5.22 (YOUNGS (1963)). The faces of an embedding of a connected graph are 2-cells. surface of genus ´ µ in a Lemma 5.12. For a connected with ¿ we have ¿³ ¾ . Proof. If , then the claim is trivial. Assume thus that . In this case we need the is counted in a surface that determines the genus of (and in no surface knowledge that with a larger genus). Now every face has a border of at least three edges, and, as before, every nonbridge is on the boundary of exactly two faces. Ø Ù Theorem 5.23. For a connected with ¿ ³ ´ µ ½   ½ ´   ¾µ ¾ Proof. By the previous lemma, ¿³ ¾ , and by the generalized Euler’s formula, ³   · ¾   ¾ ´ µ. Combining these we obtain that ¿   ¿ ·   ´ µ ¾ , and the claim follows. ¿, Ø Ù By this theorem, we can compute lower bounds for the genus without drawing any embeddings. As an example, let . In this case , , and so . ¿ . We deduce that cannot be embedded in Since the genus is always an integer, the surface ½ of the torus. , then clearly , since is obtained from by omitting vertices If and edges. In particular, À Ë Ã ´ µ ¾ ´ µ ¾ à ´ µ ´Àµ ´ µ À Lemma 5.13. For a graph For the complete graphs of order , Ò ´ µ ´ÃÒ µ. ÃÒ a good lower bound was found early. Theorem 5.24 (H EAWOOD (1890)). If Ò ¿, then ´ÃÒ µ ´Ò   ¿µ´Ò   µ ½¾ Proof. The number of edges in ÃÒ is equal to Ò´Ò   ½µ. By Theorem 5.23, we obtain ´ÃÒ µ ´½ µ   ´½ ¾µ´Ò   ¾µ ´½ ½¾µ´Ò   ¿µ´Ò   µ Ø Ù ½ ¾ 5.3 Genus of a graph This result was dramatically improved to obtain Theorem 5.25 (R INGEL 81 Therefore By Theorem 5.25, ´Ã µ Ò ¿, then ´ÃÒ µ ´Ò   ¿µ´Ò   µ ½¾ ¿ ¡ ¾ ½¾ ½ ¾ ½. Also, ´Ã µ ½, but ´Ã µ ¾. AND YOUNGS (1968)). If Theorem 5.26. For all graphs of order ´ µ Ò ¿, ´Ò   ¿µ´Ò   µ ½¾ Also, we know the exact genus for the complete bipartite graphs: Theorem 5.27 ( R INGEL (1965)). For the complete bipartite graphs, ´ÃÑ Ò µ Chromatic numbers£ ´Ñ   ¾µ´Ò   ¾µ For the planar graphs , the proof of the -Colour Theorem, , is extremely long and difficult. This in mind, it is surprising that the generalization of the -Colour Theorem for is much easier. H EAWOOD proved a hundred years ago: genus ´ µ ½ Theorem 5.28 (H EAWOOD ). If ´ µ ´ µ Notice that for this theorem would be the -colour theorem. H EAWOOD proved it . ‘only’ for Using the result of R INGEL AND YOUNGS and some elementary computations we can prove that the above theorem is the best possible. ½ ¼ ½, then · Ô½ · ¾ Theorem 5.29. For each ½, there exists a graph · Ô½ · ´ µ ¾ with genus ´ µ so that be a torus, ´ ½ Ô½If a nonplanar graph can for embedded inhave that then µ µ and, and µ´ µ½. ´ · · µ ¾ . Moreover, à we ´Ã ´Ã 5.3 Genus of a graph 82 Three dimensions£ Every graph can be drawn without crossing edges in the -dimensional space. Such a drawing is called spatial embedding of the graph. Indeed, such an embedding can be achieved by putting all vertices of on a line, and then drawing the edges in different planes that contain the line. Alternatively, the vertices of can be put in a sphere, and drawing the edges as straight lines crossing the sphere inside. A spatial embedding of a graph is said to have linked cycles, if two cycles of form a link (they cannot be separated in the space). By C ONWAY and G ORDON in 1983 every spatial contains linked cycles. embedding of It was shown by ROBERTSON , S EYMOUR AND T HOMAS (1993) that there is a set of graphs such that a graph has a spatial embedding without linked cycles if and only if does not have a minor belonging to this set. This family of forbidden graphs was originally found by S ACHS (without proof), and it and the Petersen graph. Every graph in the set has edges, which is curious. contains ¿ à à ½ For further results and proofs concerning graphs in surfaces, see B. M OHAR AND C. T HOMASSEN, “Graphs on Surfaces”, Johns Hopkins, 2001. 6 Directed Graphs 6.1 Digraphs In some problems the relation between the objects is not symmetric. For these cases we need directed graphs, where the edges are oriented from one vertex to another. As an example consider a map of a small town. Can you make the streets one-way, and still be able to drive from one house to another (or exit the town)? Definitions consists of the vertices D EFINITION . A digraph (or a directed graph) and (directed) edges ¢ (without loops ). We still write for , but note . For each pair define the inverse of as  ½ . that now ÙÚ ÚÙ ¾ Î Î ÙÚ ÚÚ ´Î µ ÙÚ ´Ù Úµ ÚÙ ´ ´Ú Ùµµ Î Note that does not imply  ½ ¾ . D EFINITION . Let be a digraph. Then is its , and ¯ ¯ subdigraph, if induced subdigraph, Î Î and ℄, if Î ´ ¢ µ. The underlying graph of a digraph is the graph on such that if ¾ , then the undirected edge with the same ends is in . Î Í´ µ Í´ µ A digraph is an orientation of a graph , if In this case, is said to be an oriented graph. Í´ µ and ¾ Ù implies  ½ ¾ . D EFINITION . Let be a digraph. A walk   of is a directed ½ ¾ for all ¾ . Similarly, we define directed paths and directed cycles as walk, if ¾ directed walks and closed directed walks without repetitions of vertices. , there exist directed paths   and The digraph is di-connected, if, for all   . The maximal induced di-connected subdigraphs are the di-components of . ½ ℄ Ï Ú Í´ µ Ú Ù Ù Ú Ù Ú 6.1 Digraphs Note that a graph connected. 84 Í´ µ might be connected, although the digraph ¾ is not di- D EFINITION . The indegree and the outdegree of a vertex are defined as follows Á ´Úµ ÜÚ Ç ´Úµ ¾ ÚÜ We have the following handshaking lemma. (You offer and accept a handshake.) Lemma 6.1. Let be a digraph. Then Á Ú¾ ´Úµ Ç Ú¾ ´Úµ Directed paths The relationship between paths and directed paths is in general rather complicated. This digraph has a path of length five, but its directed paths are of length one. ´ µ There is a nice connection between the lengths of directed paths and the chromatic number . ´Í´ µµ Theorem 6.1 (ROY (1967),G ALLAI (1968)). A digraph   . ´ µ ½ has a directed path of length be a minimal set of edges such that the subdigraph   contains no Proof. Let directed cycles. Let be the length of the longest directed path in   . , if a longest directed path from has For each vertex ¾ , assign a colour . length   in   . Here First we observe that if ) is any directed path   in   , then ½ ¾ Ö( . Indeed, if , then there exists a directed path   of length   , is a directed path, since   does not contain directed cycles. Since   , and . In particular, if ¾   , then . ¾ . By the minimality of ,   contains a Consider then an edge directed cycle     , where the part   is a directed path in   , and hence . This shows that is a proper colouring of , and therefore ,   . Ø Ù that is, ½ Ú «´Ùµ «´Úµ ÈÉ «´Ùµ «´Úµ «´Ùµ «´Úµ ½ È «´Úµ Ú ·½ ÙÚ «´Úµ Ú Ö ½ Ù Ù ´ µ ½ The bound ´ µ   ½ is the best possible in the following sense: ´ µ ½ has an orientation Ù « ÚÙ Ù Ú É Ú Û ½ ÈÉ Ù Û «´Ùµ «´Úµ ´ µ· Ú Í´ µ ´ µ ·½ Theorem 6.2. Every graph   . lengths , where the longest directed paths have 6.1 Digraphs 85 Proof. Let and let be a proper -colouring of . As usual the set of colours is . We orient each edge ¾ by setting ¾ , if . Clearly, the so   . Ø Ù obtained orientation has no directed paths of length ½ ℄ ´ µ « ÙÚ ÙÚ ½ «´Ùµ «´Úµ D EFINITION . An orientation of an undirected graph cycles. Let be the number of acyclic orientations of ´ µ is acyclic, if it has no directed . The next result is charming, since using   colours! ½ ´ ½µ measures the number of proper colourings of be a graph of order . Then the number of the acyclic Theorem 6.3 (S TANLEY (1973)). Let orientations of is where Ò ´ µ ´ ½µÒ ´ ½µ . is discrete, then is the chromatic polynomial of ½ ´ ½µ ´ ½µ ´ ½µ ´ ½µ ´ µ is a polynomial that satisfies the recurrence ´ µ Now prove the claim, we show that ´ µ satisfies the same recurrence. Indeed, if Proof. The proof is by induction on . First, if   Ò   Ò   Ò   as required. ´µ   Ò , and ´ µ ´ µ. To (6.1) ´ µ  £ ´ µ ´ µ ´ ½µÒ   ´   µ· ´ £ µ ½ then, by the induction hypothesis, ´ ½µ · ´ ½µÒ  Ù £ ´ ½µ ´ ½µÒ ´ ½µ ÙÚ For (6.1), we observe that every acyclic orientation of gives an acyclic orientation of   . , it extends to an acyclic On the other hand, if is an acyclic orientation of   for by putting ½ or ¾ . Indeed, if has no directed path orientation of   , we choose ¾, and if has no directed path   , we choose ½ . Note that since is acyclic, it cannot have both ways   and   . Ù Ú We conclude that that extend in both ways are exactly those that contain   ´ µ Ú Ú Ù Ú Ù Ù Ú Ú Ù ´   µ· , where is the number of acyclic orientations ½ and ¾ . The acyclic orientations of that extend in both ways (6.2) neither Ù   Ú nor Ú   Ù as a directed path. ´ µ of Each acyclic orientation of £ corresponds in a natural way to an acyclic orientation   that satisfies (6.2). Therefore £ , and the proof is completed. Ø Ù One-way traffic Every graph can be oriented, but the result may not be di-connected. In the one-way traffic problem the resulting orientation should be di-connected, for otherwise someone is not able to drive home. ROBBINS’ theorem solves this problem. 6.1 Digraphs D EFINITION . A graph . that 86 is di-orientable, if there is a di-connected oriented graph such Í´ µ Theorem 6.4 (ROBBINS (1939)). A connected graph no bridges. Proof. If has a bridge , then any orientation of sides of the bridge). is di-orientable if and only if has has at least two di-components (both Suppose then that has no bridges. Hence has a cycle , and a cycle is always diorientable. Let then be maximal such that it has a di-orientation À . If , then we are done. Otherwise, there exists an edge ¾ such that Ù Ú ¾ but ¾ (because is connected). The edge is not a bridge and thus there exists a cycle È É È¼ À À Ù À Ú À ¼ ÚÙ ÈÉ Ú   Ù   Û   Ú Û in , where Û is the last vertex inside À . In the di-orientation À of À there is a directed path È ¼ Ù   Û. Now, we orient Ú   Ù and the edges of É in the direction É Û   Ú to obtain a directed cycle È ¼ É Ú   Ù   Û   Ú. In conclusion, ÎÀ Î ℄ has a di-orientation, which contradicts the maximality Ø Ù assumption on À . This proves the claim. Example 6.1. Let be a digraph. A directed Euler tour of is a directed closed walk that uses each edge exactly once. A directed Euler trail of is a directed walk that uses each edge exactly once. The following two results are left as exercises. is connected. Then (1) Let be a digraph such that Á Ç only if for all vertices . Í´ µ has a directed Euler tour if and ´Úµ ´Úµ Ú (2) Let be a digraph such that Í´ µ is connected. Then has a directed Euler trail if and Ç ´Úµ for all vertices Ú with possibly excepting two vertices Ü Ý for which only if Á ´Úµ Á ´Úµ   Ç ´Úµ ½. The above results hold equally well for multidigraphs, that is, for directed graphs, where we allow parallel directed edges between the vertices. Example 6.2. The following problem was first studied by H UTCHINSON AND W ILF (1975) with a motivation from DNA sequencing. Consider words over an alphabet ½ ¾ Ò of letters, that is, each word is a sequence of letters. In the case of DNA, the letters are . In a problem instance, we are given nonnegative integers and for , and the question is: does there exist a word in which each letter occurs exactly times, and is followed by exactly times. , ½ , and ½½ , ½¾ , ¾½ , ¾¾ , then the word For instance, if ½ ¾ ½ ½ ¾ is a solution to the problem. Ò ½ × Ì Ò Û Ò ¾× ¿ Ö Ö ½Ö Û × Ö ¾Ö ½Ö ¼ 6.1 Digraphs Consider a multidigraph with obvious that a directed Euler trail of 87 Î for which there are edges . It is rather gives a solution to the sequencing problem. Ö Tournaments D EFINITION . A tournament Ì is an orientation of a complete graph. Example 6.3. There are four tournaments of four vertices that are not isomorphic with each other. (Isomorphism of directed graphs is defined in the obvious way.) Theorem 6.5 (R ÉDEI (1934)). Every tournament has a directed Hamilton path. Proof. The chromatic number of Ò is of order has a directed path of length each vertex once. Ì Ò Ã ´ÃÒ µ Ò, and hence by Theorem 6.1, a tournament Ò   ½. This is then a directed Hamilton path visiting Ø Ù The vertices of a tournament can be easily reached from one vertex (sometimes called the king). Ú Ì Ù Ú Ù Proof. Let Ì be an orientation of ÃÒ , and let Ç ´Úµ be the maximum outdegree in Ì . Ì Suppose that there exists an Ü, for which the directed distance from Ú to Ü is at least three. It follows that ÜÚ ¾ Ì and ÜÙ ¾ Ì for all Ù with ÚÙ ¾ Ì . But there are vertices in Ý ÚÝ ¾ Ì , and thus · ½ vertices in Ý ÜÝ ¾ Ì Ú . It follows that the Ø Ù outdegree of Ü is · ½, which contradicts the maximality assumption made for Ú . Theorem 6.6 (L AUDAU (1953)). Let be a vertex of a tournament of maximum outdegree. of length at most two. Then for all , there is a directed path   Problem. Ádám’s conjecture states that in every digraph with a directed cycle there exists the reversal of which decreases the number of directed cycles. Here the new an edge instead of . digraph has the edge ÙÚ ÚÙ ÙÚ Example 6.4. Consider a tournament of teams that play once against each other, and suppose that each game has a winner. The situation can be presented as a tournament, where the vertices correspond to the teams , and there is an edge , if won in their mutual game. Ò Ú ÚÚ Ú Ú D EFINITION . A team is a winner (there may be more than one winner), if comes out with the most victories in the tournament. Ú Ú 6.1 Digraphs 88 Theorem 6.6 states that a winner either defeated a team or defeated a team that defeated . ¡¡¡ A ranking of a tournament is a linear ordering of the teams ½ Ò ¾ that should reflect the scoring of the teams. One way of ranking a tournament could be by a Hamilton path: the ordering can be obtained from a directed Hamilton path ½  ¾    Ò . However, a tournament may have several directed Hamilton paths, and some of these may do unjust for the ‘real’ winner. Ù Ú Ù Ú Ú Ú Ú È Ú Ú Ú Example 6.5. Consider a tournament of six teams , and let be the scoring digraph as in the figure. Here           is a directed Hamilton path, but this extends to a directed Hamilton cycle (by adding   )! So for every team there is a Hamilton path, where it is a winner, and in another, it is a looser. ½¾ ½ ¾ Ì ¿ ½ ¾ ¿ ½ ¿ Ç Let ½ be the winning number of the team (the number of teams beaten by Ì ). In the above tournament, ×´µ ´µ × ´½µ ½ × ´¾µ ¿ × ´¿µ ¿ × ´ µ ¾ × ´ µ ¾ × ´ µ ½ ½ ½ ½ ½ ½ So, is team 1 the winner? If so, is 2 or 3 next? Define the second-level scoring for each team by ×´µ ¾ ¾ ¾ ¾ ×´µ ½ Ì This tells us how good teams beat. In our example, we have × ´½µ ¾ × ´¾µ ¾ × ´¿µ ×Ñ´ µ ×´µ ¿ ×´µ ¾ ×´µ ¿ ¾ Now, it seems that 3 is the winner,but 4 and 6 have the same score. We continue by defining inductively the th-level scoring by Ñ ¾ ×Ñ  ´ µ ½ Ì It can be proved (using matrix methods) that for a di-connected tournament with at least four teams, the level scorings will eventually stabilize in a ranking of the tournament: there exits an for which the th-level scoring gives the same ordering as do the th-level scorings . If is not di-connected, then the level scoring should be carried out with respect for all to the di-components. In our example the level scoring gives           as the ranking of the tournament. Ñ Ñ ½ Ì ´Ñ· µ ½ ¿ ¾ 6.2 Network Flows 89 6.2 Network Flows Various transportation networks or water pipelines are conveniently represented by weighted directed graphs. These networks usually possess also some additional requirements. Goods are transported from specific places (warehouses) to final locations (marketing places) through a network of roads. In modeling a transportation network by a digraph, we must make sure that the number of goods remains the same at each crossing of the roads. The problem setting for such networks was proposed by T.E. Harris in the 1950s. The connection to Kirchhoff’s Current Law (1847) is immediate. According to this law, in every electrical network the amount of current flowing in a vertex equals the amount flowing out that vertex. Flows Æ consists of ¯ an underlying digraph ´Î µ, ¯ two distinct vertices × and Ö, called the source and the sink of Æ , and ¯ a capacity function « Î ¢ Î Ê (nonnegative real numbers), for which «´ µ ¼, if ¾ . Denote ÎÆ Î and Æ . D EFINITION . A network · ¾ × ¾ Ö Let if ¾ Æ . We adopt the following notations: ÎÆ be a set of vertices, and ÎÆ ¢ ÎÆ · Ê any function such that ´ µ ¼, ℄ ´ µ · ¾ ¾ ℄ ´µ ´ÙÚµ ÙÚ Ù ¾ and  ´ Ú¾ µ ¾ ´µ ℄ In particular, ´Ùµ Ú¾Æ and   ´Ùµ Ú¾Æ ´ÚÙµ · D EFINITION . A flow in a network ¼ ´ µ «´ µ for all Æ is a function ÎÆ ¢ ÎÆ Ê such that  ´Úµ and ´Úµ for all Ú ¾ × Ö · Example 6.6. The value can be taught of as the rate at which transportation actually happens along the channel which has the maximum capacity . The second condition states that there should be no loss. ´µ «´ µ 6.2 Network Flows If is a network of water gives the capacity pipes, then the value ¿ ( ) of the pipe . The previous network has a flow that is indicated on the right. 90 Æ ´ × Ö «µ «´ µ ÜÑ ÑÒ Æ ½ × ¿ ¿ ¼ Ö A flow in is something that the network can handle. E.g., in the above figure the ¿ source should not try to feed the network the full capacity ( ) of its pipes, because the junctions cannot handle this much water. ½½ Ñ Ñ Ò ´µ ¼ has a zero flow defined by for all . For a flow D EFINITION . Every network and each subset , define the resultant flow from and the value of as the numbers Æ ´ µ    ´ µ and Ú Ð´ µ Ú Ð´ ×µ ´ ´×µ    ´×µµ A flow of a network Æ is a maximum flow, if there does not exist any flow ¼ such that Ú Ð´ µ Ú Ð´ ¼µ. · · Ú Ð´ µ Î Æ of a flow is the overall number of goods that are (to be) transported The value . through the network from the source to the sink. In the above example, Lemma 6.2. Let Ú Ð´ µ Æ ´ × Ö «µ be a network with a flow (i) If Æ Ò × Ö , then Ú Ð´ µ ¼. (ii) Ú Ð´ µ  Ú д Ö µ. Æ Ò × Ö . Then Proof. Let ¼ ´ ´Úµ    ´Úµµ ´Úµ    ´Úµ · · Ú Ð´ µ . · Ú¾ Ú¾ Ú¾ where the third equality holds since the values of the edges The second claim is also clear. ´ µ    ´ µ Ú Ð´ µ cancel each out. ÙÚ with Ù Ú ¾ Ø Ù Improvable flows Let be a flow in a network , and let ½ ¾ Ò be an undirected path in edge is along , if ¾ Æ. ·½ ¾ Æ , and against , if ·½ for as follows: We define a nonnegative number È Æ ÚÚ È ´Èµ È È Ú Ú Æ where an ´Èµ Ñ Ò ´ µ È × Ö where ´µ ´ «´ µ   ´ µ ´µ if is along if is against È È. ½ D EFINITION . Let be a flow in a network   is ( -)improvable, if path On the right, the bold path has value and therefore this path is improvable. Æ. A ´Èµ ¼. ´Èµ ½, × ¿ ¿ ¼ Ö 6.2 Network Flows Lemma 6.3. Let paths. Proof. Define 91 is a maximum flow of Æ be a network. If ¼´ Æ , then it has no improvable µ Then ¼ is a flow, since at each intermediate ver¼· , tex ¾ , we have ¼   and the capacities of the edges are not exceeded. ¼ , since has exactly Now one edge ¾ Æ for the source . Hence, if , then we can improve the flow. ´ µ · ´Èµ ´ µ   ´Èµ ´µ if is along P if is against P if is not in P ×Ö ´ µ ´Úµ ´ µ ´Úµ Ú Ð´ µ Ú Ð´ µ· ´Èµ È ×Ú × ´Èµ ¼ Ë Ú ¾ × ¿ ¾ ¼ Ö Ø Ù Max-Flow Min-Cut Theorem D EFINITION . Let let the cut by be Æ ´ × Ö «µ be a network. For a subset Ë ÎÆ with × ¾ Ë and Ö ¾ Ë , Æ Ë℄ Ë Ë℄ ´ ÙÚ ¾ The capacity of the cut Ë℄ is the sum « Ë℄ « ´Ëµ · Ù¾Ë Ú¾Ë µ «´ µ ¾ Ë℄ A cut with Ë℄ is a minimum cut, if there is no cut Ê℄ « Ê℄ « Ë℄. ¾ Example 6.7. In our original network the capacity of the cut for the indicated vertices is equal to . ½¼ × ¾ Ö Lemma 6.4. For a flow Proof. Let Á Hence Ë Ë℄ of Æ , Ú Ð´ µ Ú Ð´ Ë µ ´Ëµ    ´Ëµ Ë Ò × . Now Ú Ð´ËÁ µ ¼ (since ËÁ Æ Ò × Ö and a cut · ), and Ú Ð´ µ Ú Ð´ ×µ. Ú Ð´ Ë µ Ú Ð´ ×µ   Á · Ú Ð´ Ë µ · Ú¾ËÁ ´×Úµ · Ú¾ËÁ ´×Úµ   Ú¾ËÁ ´Ú×µ Ú¾ËÁ ´Ú×µ Ø Ù Ú Ð´ ×µ Ú Ð´ µ 6.2 Network Flows Theorem 6.7. For a flow and any cut if and only if for each ¾ and ¾ , (i) if (ii) if 92 Ù Ë Ú Ë ÙÚ ¾ Æ , then ´ µ «´ µ, ÚÙ ¾ Æ , then ´ µ ¼. · Ë℄ of Æ , Ú Ð´ µ « Ë℄. Furthermore, equality holds Proof. By the definition of a flow, ´Ëµ ¾ Ë℄ ´µ ¾ Ë℄ «´ µ « Ë℄ · ¼. By Lemma 6.4, Ú Ð´ µ Ú Ð´ Ë µ ´Ëµ    ´Ëµ, and hence Ú Ð´ µ « Ë℄, as required. Also, the equality Ú Ð´ µ « Ë℄ holds if and only if (1) ´Ëµ « Ë℄ and (2)   ´Ëµ ¼. This holds if and only if ´ µ «´ µ for all ¾ Ë℄ (since ´ µ «´ µ), and ÚÙ with Ù ¾ Ë , Ú ¾ Ë . (2) ´ µ ¼ for all and ·   ´Ëµ This proves the claim. In particular, if is a maximum flow and Ø Ù Corollary 6.1. If is a flow and a minimum cut. and Ë℄ Ë℄ a minimum cut, then Ú Ð´ µ « Ë℄ Ë℄ a cut such that Ú Ð´ µ « Ë℄, then is a maximum flow The following main result of network flows was proved independently by E LIAS , F EIN S HANNON, by F ORD AND F ULKERSON, and by ROBACKER in 1955 – 56. The present approach is due to Ford and Fulkerson. STEIN , Theorem 6.8. A flow paths in . Æ of a network Æ is maximum if and only if there are no -improvable Proof. By Lemma 6.3, a maximum flow cannot have improvable paths. Conversely, assume that contains no -improvable paths, and let Æ ËÁ Set Ù¾Æ for some path È ×   Ù ´Èµ ¼ Ù Ë È × Ú . Á ¾ Æ , where ¾ and ¾ . Since ¾ , there exists a Consider an edge path   with . Moreover, since ¾ , for the path   . , and so . Therefore ¾ Æ with ¾ and ¾ , . By the same argument, for an edge By Theorem 6.7, we have . Corollary 6.1 implies now that is a maximum is a minimum cut). Ø Ù flow (and Ë Ë ÙÚ È × Ù ´Èµ ¼ ´µ ¼ ´ µ «´ µ Ë℄ × Ù Ë Ú Ë Ú Ë ´È µ ¼ Ú Ë ÚÙ Ú Ð´ µ « Ë℄ Ù Ë ´µ ¼ 6.2 Network Flows Theorem 6.9. Let be a network, where the capacity function values. Then has a maximum flow with integer values. 93 Æ Æ « Î ¢Î Æ has integer Proof. Let ¼ be the zero flow, ¼ for all ¾ ¢ . A maximum flow is constructed Ø Ù using Lemma 6.3 by increasing and decreasing the values of the edges by integers only. The proof of Theorem 6.8 showed also Theorem 6.10 (Max-Flow Min-Cut). In a network equals the capacity of a minimum cut. ´µ ¼ Î Î « Ë℄ Æ , the value Ú Ð´ µ of a maximum flow Applications to graphs The Max-Flow Min-Cut Theorem is a strong result, and many of our previous results follow from it. We mention a connection to the Marriage Theorem, Theorem 3.9. For this, let be a , and consider a network with vertices bipartite graph with a bipartition . Let the edges (with their capacities) be ¾ Æ( ), ¾ Æ( ) ¾ Æ( ), if ¾ for for all ¾ , ¾ together with the edges ¾ , ¾ . Then has a matching that saturates if and only if has a maximum flow of value . Now Theorem 6.10 gives Theorem 3.9. Next we apply the theorem to unit networks, where the capacities of the edges are equal to one ( for all ¾ Æ ). We obtain results for (directed) graphs. ´ µ Ü Ü Ý Ý ×Ü ÜÝ Æ «´×ܵ ½ ÝÖ «´Üݵ ·½ Æ ×Ö «´ÝÖµ ½ ÜÝ Lemma 6.5. Let Æ be a unit network with source × and sink Ö. (i) The value Ú Ð´ µ of a maximum flow equals the maximum number of edge-disjoint directed paths ×   Ö . (ii) The capacity of a minimum cut Ë℄ equals the minimum number of edges whose removal destroys the directed connections ×   Ö from × to Ö . Ù Ù Ú «´ µ ½ Proof. Exercise. Ø Ù Corollary 6.2. Let and be two vertices of a digraph . The maximum number of edgeequals the minimum number of edges, whose removal destroys disjoint directed paths   from . all the directed connections   The claim follows from Lemma 6.5 and Corollary 6.10. Ú Ù Ú Proof. A network Æ with source × and sink Ö is obtained by setting the capacities equal to ½. Corollary 6.3. Let and be two vertices of a graph . The maximum number of edgeequals the minimum number of edges, whose removal destroys all the disjoint paths   connections   from . Ù Ù Ù Ú Ú Ú Ø Ù Proof. Consider the digraph that is obtained from ¾ by two directed edges ¾ and ¾ Corollary 6.2. ÙÚ ÙÚ ÚÙ by replacing each (undirected) edge . The claim follows then easily from Ø Ù 6.2 Network Flows The next corollary is Menger’s Theorem for edge connectivity. Corollary 6.4. A graph is -edge connected if and only if any two distinct vertices of connected by at least independent paths. Proof. The claim follows immediately from Corollary 6.3. 94 are Ø Ù together (6.3) Seymour’s 6-flows£ D EFINITION . A -flow with an edge colouring ´À «µ of an undirected graph is an orientation À of « À ¼   ½℄ such that for all vertices Ú ¾ Î , «´ µ «´ µ ÚÙ¾ À ÙÚ¾ À that is, the sum of the incoming values equals the sum of the outgoing values. A -flow is for all ¾ À . nowhere zero, if «´ µ ¼ In the -flows we do not have any source or sink. For convenience, let for all ¾ À in the orientation of so that the condition (6.3) becomes À «´   µ  «´ µ ½ ÚÙ¾ «´ µ ¼ (6.4) À ½ ¾ ½ Example 6.8. A graph with a nowhere zero -flow. ½ ¿ ¾ ¾ The condition (6.4) generalizes to the subsets ¾ since the values of the edges inside Lemma 6.6. If «´ µ ¼ ℄ Î in a natural way, (6.5) cancel out each other. In particular, has no bridges. has a nowhere zero -flow for some , then Tutte’s Problem. It was conjectured by T UTTE (1954) that every bridgeless graph has a nowhere zero -flow. The Petersen graph has a nowhere zero -flow but does not have any nowhere -flows, and so is the best one can think of. Tutte’s conjecture resembles the Colour Theorem, and indeed, the conjecture is known to hold for the planar graphs. The proof of this uses the -Colour Theorem. In order to fully appreciate Seymour’s result, Theorem 6.11, we mention that it was proved as late as 1976 (by JAEGER) that every bridgeless has a nowhere zero -flow for some integer . S EYMOUR’s remarkable result reads as follows: 6.2 Network Flows Theorem 6.11 (S EYMOUR’s (1981)). Every bridgeless graph has a nowhere zero -flow. Proof. Omitted. D EFINITION . The flow number has a nowhere zero -flow. Theorem 6.12. A connected graph 95 Ø Ù ´ µ of a bridgeless graph has a flow number is the least integer for which ´ µ ¾ if and only if it is eulerian. Proof. Suppose is eulerian, and consider an Euler tour Ï of . Let be the orientation , let «´ µ ½. Since Ï arrives of corresponding to the direction of Ï . If an edge ÙÚ ¾ and leaves each vertex equally many times, the function « is a nowhere zero ¾-flow. Conversely, let « be a nowhere zero ¾-flow of an orientation of . Then necessarily the degrees of the vertices are even, and so is eulerian. Ø Ù ´ µ ¿ ¿ Å «´ µ ¾ Å Ü Ý ÜÝ Å ÜÝ ÜÝ Å ´ µ ¿ , and if Ò , then Theorem 6.13. We have ´Ã µ ´ ¾ ´ÃÒµ ¿ if Ò is odd if Ò is even ´ µ Å «´ µ ½ Ý Ý Proof. Exercise. Example 6.9. For each -regular bipartite graph , we have . Indeed, let be -biparte. By Corollary 3.1, a -regular graph has a perfect matching . Orient the edges ¾ from to , and set . Orient the edges ¾ from to , and set . Since each ¾ has exactly one neighbour ½ ¾ such that ½ ¾ , and two neighbours ¾ ¿ ¾ such that ¾ , we have that . ¿ ¾ ¿ Ø Ù Index acyclic, 17 digraph, 81 addressable, 21 adjacency matrix, 6 adjacent, 4 augmented path, 34 available colour, 41, 50 bipartite, 15 bond, 23 boundary, 58 bridge, 17 capacity, 87 capacity function, 85 choosable, 67 chromatic number ´ µ, 50 chromatic polynomial , 54 closed walk, 11 colouring, 50 complement , 9 complete bipartite Ñ , 15 complete graph Ò , 9 connected, 23 connected (component), 12 connected sum, 72 connectivity number ´ µ, 23 contracted vertex, 55 critical, 51 crossing number, 64 cube, 9 cut (in a network), 87 cut vertex, 22 cycle, 11 directed Euler tour, trail, 82 walk, path, cycle, 80 directed graphs (digraph), 4 disconnected, 12 disconnecting set, 25 discrete graph, 9 disjoint walks, 11 distance, 12 distance function, 5 edge, 4 edge chromatic number ¼ ´ µ, 41 edge colouring, 5, 41 edge cut, 23 embedding, 73 end (of a path), 11 end (of an edge), 4 Euler trail, tour, 28 Euler’s formula, 59 eulerian, 28 even component, 37 even cycle, 11 exterior: face, boundary,vertex,edge, 58 face, 58 fan, 26 flow, 85 flow number, 90 forest, 17 genus, 75 graph, 4 graphical sequence, 8 Hamilton path, cycle, 30 hamiltonian, 30 Hamming distance, 21 homeomorphic, 71 improvable (path), 86 à à degree ´ µ, 7 di-connected di-component, 80 di-orientable, 82 digraph, 79 Ú Index improvement (colouring), 42 incident colours, 41 indegree, 80 independent paths, 11 induced subdigraph, 79 induced subgraph, 10 interior: face, vertex, edge, 58 intersection graph, 6 inverse pair, 79 inverse walk (path), 11 isolated vertex, 7 isomorphic, 5 join of walks, 11 king, 83 kiss (circles), 68 Kuratowski graph, 61 latin rectangle, 37 latin square, 37 leaf, 7 line segment graph, 69 linked cycles, 77 list chromatic number, 67 list colouring, 67 loop, 4 Möbius band, 71 map, 65 matching, 34 maximal planar graph, 60 maximum degree ´ µ, 7 flow, 85 matching, 34 minimum cut, 87 degree ´ µ, 7 weighted distance, 12 minor, 69 monochromatic, 46 multigraph, 4 orientable surface, 71 orientation, 79 oriented, 71 oriented graph, 79 outdegree, 80 parallel edges, 4 partition, 3 path, 11 perfect matching, 34 Petersen graph, 9, 31 planar graph, 57 plane embedding, 57 plane model, 72 proper colouring, 41, 50 Ramsey number, 47 ranking, 83 regular graph, 9 resultant flow, 85 same parity, 3 saturate (matching), 34 separates, 22 separating set, 22 Shannon’s switching game, 19 sink and source, 85 size , 4 spanning subgraph, 10 spanning tree, 19 spatial embedding, 77 sphere, 73 sphere with a handle, 74 stable matching, 39 stable set, 15 subdigraph, 79 subdivision, 57 subgraph, 10 surface, 71 symmetric difference, 3 topologically equivalent, 71 torus, 74 tournament, 83 trail, 28 transversal, 36 tree, 17 triangle, 71 triangle-free, 51 triangulation, 71 trivial graph, 9 trivial path, 11 2-cell, 76 2-switch, 7 97 ¡ Æ near-triangulation, 67 neighbour, 4 neighbourhood ´ µ, 7 network, 85 nontrivial graph, 9 NP-complete problems, 3 Æ Ú odd component, 37 odd cycle, 11 optimal colouring, 42 order , 4 Index underlying digraph, 85 underlying graph, 79 unit networks, 88 vertex, 4 vertex colouring, 5 walk, 11 weight, 12 weight function, 5 wheel, 49 winning number, 84 zero flow, 85 98

Shared by: Andrew Belous
Other docs by Andrew Belous
My powerpoint template
Views: 125  |  Downloads: 1
2009-10 Los Angeles Lakers Schedule
Views: 443  |  Downloads: 11
Game Theory
Views: 390  |  Downloads: 25
warriorcredo
Views: 190  |  Downloads: 5
Statistical Pattern Recognition
Views: 207  |  Downloads: 17
Pattern Recognition in Biomedical Engineering
Views: 287  |  Downloads: 17
How Organic Light Emitting Diodes Work
Views: 145  |  Downloads: 12
How and Why Hypnosis Works
Views: 142  |  Downloads: 10
How Two-stroke Engines Work
Views: 1554  |  Downloads: 22
How Cell Phones Work
Views: 462  |  Downloads: 9
The history of tobacco
Views: 275  |  Downloads: 6
pdfbook
Views: 339  |  Downloads: 7
Peace_in_Islam
Views: 396  |  Downloads: 11
String Theory - A Quest for a Unified Theory
Views: 412  |  Downloads: 21
Related docs
graph theory
Views: 209  |  Downloads: 23
theory of graph transformations
Views: 68  |  Downloads: 9
Graph Theoru
Views: 30  |  Downloads: 3
Introduction to graph theory and applications
Views: 47  |  Downloads: 11
An Introduction to Algebraic Graph Theory
Views: 28  |  Downloads: 2
Graph Theory for Bioinformatics
Views: 1  |  Downloads: 0
Advice for solving graph theory problems
Views: 0  |  Downloads: 0