GRAPH THEORY
with Applications to Engineering and Computer Science
NARSINGH
DEO
Computer Science Department Washington State University
PRENTICEHALL, INC.
ENGLEWOOD CLIFFS, N. J.
Library of Congress Cataloging in Publication Graph theory with applications computer science. Includes bibliographies. 1. Graph theory. I. Title. TA338.G7D46 511'.5 ISBN 0133634736
DEO, NARSINGH
Data and
to engineering
737566
©
1974 by PrenticeHall,
Inc., Englewood Cliffs, N. J.
All rights reserved. No part of this book may be reproduced in any form, by mimeograph or any other means, without permission in writing from the publisher.
10 9
8
7
Printed in the United States of America
PRENTICEHALL PRENTICEHALL PRENTICEHALL PRENTICEHALL PRENTICEHALL
INTERNATIONAL, OF AUSTRALIA, OF CANADA, OF INDIA OF JAPAN, LTD., INC.,
INC., PTY. LTD.,
11
LIMITED,
PRIVATE
Tokyo
To the memory of my father, who did not live to realize his greatest ambitionthat of witnessing his eldest son matriculate.
VERSION
CONTENTS
PREFACE
xv
1
INTRODUCTION
11 12 13 14 15 16 What is a Graph? Application of Graphs 3 Finite and Infinite Graphs 6 Incidence and Degree 7 Isolated Vertex, Pendant Vertex, and Null Graph Brief History of Graph Theory 10 Summary 11 References 11 Problems 12
1
8
2
PATHS AND CIRCUITS
21 22 23 Isomorphism 14 Subgraphs 16 A Puzzle With Multicolored Cubes 17 Walks, Paths, and Circuits 19 Connected Graphs, Disconnected Graphs Euler Graphs 23 Operations On Graphs 26 More on Euler Graphs 28 Hamiltonian Paths and Circuits The Traveling Salesman Problem Summary 35 References 35 Problems 36 ix
14
24
25 26
27
28
29
210
VERSION
X
CONTENTS
3
TREES
AND
FUNDAMENTAL
CIRCUITS
39
31 32 33 34 35 36 37 38 39
310
Trees 39 Some Properties of Trees 41 Pendant Vertices in a Tree 43 Distance and Centers in a Tree 45 Rooted and Binary Trees 48 On Counting Trees 52 Spanning Trees 55 Fundamental Circuits 57 Finding All Spanning Trees of a Graph Spanning Trees in a Weighted Graph Summary 64 References 64 Problems 65
58 61
4
CUTSETS
AND
CUT VERTICES
68
41 42 43 44 45 46 47 48
CutSets 68 69 Some Properties of a CutSet All CutSets in a Graph 71 Fundamental Circuits and CutSets 75 Connectivity and Separability 79 Network Flows lIsornorphism 80 2Isomorphism 82 Summary 85 References 86 Problems 86
73
5
PLANAR
AND
DUAL
GRAPHS
88 88
51 52 53 54 55 56 57 58 59
Combinatorial Vs. Geometric Graphs Planar Graphs 90 Kuratowski's Two Graphs 90 Different Representations of a Planar G Detection of Planarity 99 Geometric Dual 102 Combinatorial Dual J 04 More on Criteria of Planarity Thickness and Crossings 108 Summary 109 References 110 Problems 110
VERSION
AND PARTITIONING 81 82 83 84 85 86 Chromatic Number 165 Chromatic Partitioning 169 Chromatic Polynomial 174 Matchings 177 Coverings 182 The Four Color Problem 186 Summary 190 References 190 Problems 192 .CONTENTS xi 6 VECTOR SPACES OF A GRAPH 112 61 62 63 64 65 66 67 68 69 Sets with One Operation 112 Sets with Two Operations 116 Modular Arithmetic and Galois Fields 118 Vectors and Vector Spaces 120 Vector Space Associated with a Graph 121 Basis Vectors of a Graph 123 ] 25 Circuit and CutSet Subspaces Orthogonal Vectors and Spaces 129 13] Intersection and Join of Wand Ws Summary 134 References 135 Problems 135 7 MATRIX REPRESENTATION OF GRAPHS 137 71 72 73 74 75 76 77 78 79 Incidence Matrix 137 Submatrices of A(G) 141 Circuit Matrix 142 Fundamental Circuit Matrix and Rank of B 144 An Application to a Switching Network 146 CutSet Matrix ] 51 Relationships among Af. COVERING. Bf. and Cf 153 Path Matrix 156 Adjacency Matrix 157 Summary 162 References 162 Problems 162 8 COLORING.
xii CONTENTS 9 DIRECTED 91 92 93 94 95 96 97 98 99 9to 911 GRAPHS 194 What Is a Directed Graph? 194 Some Types of Digraphs 197 Digraphs and Binary Relations 198 Directed Paths and Connectedness 201 Euler Digraphs 203 Trees with Directed Edges 206 Fundamental Circuits in Digraphs 212 Matrices A. and C of Digraphs 213 Adjacency Matrix of a Digraph 220 Paired Comparisons and Tournaments 227 Acyclic Digraphs and Decyclization 230 Summary 233 References 234 Problems 234 10 ENUMERATION toI 102 103 104 105 OF GRAPHS 238 Types of Enumeration 238 Counting Labeled Trees 240 Counting Unlabeled Trees 241 Polya's Counting Theorem 250 Graph Enumeration With Polya's Theorem Summary 264 References 264 Problems 265 ALGORITHMS AND 260 11 GRAPH THEORETIC COMPUTER PROGRAMS 268 270 111 Algorithms 269 112 Input: Computer Representation of a Graph 113 The Output 273 ] 14 Some Basic Algorithms 274 Algorithm 1: Connectedness and Component Algorithm 2: A Spanning Tree 277 Algorithm 3: A Set of Fundamental Ci Algorithm 4: Algorithm 5: Directed Circuits 115 ShortestPath Algorithms 290 Algorithm 6: Shortest Path from a Another Specified Vertex 292 Algorithm 7: Shortest Path between 116 DepthFirst Search on a Graph 301 Algorithm 8: Planarity Testing 117 Algorithm 9: Isomorphism . B.
CONTENTS xiii 118 Other GraphTheoretic Algorithms 312 119 Performance of GraphTheoretic Algorithms 1110 GraphTheoretic Computer Languages 316 Summary 317 References 318 Problems 321 Appendix of Programs 323 314 12 GRAPHS IN SWITCHING AND CODING THEORY 328 121 122 123 124 125 126 Contact Networks 329 Analysis of Contact Networks 330 Synthesis of Contact Networks 334 Sequential Switching Networks 342 Unit Cube and Its Graph 348 Graphs in Coding Theory 351 Summary 354 References 354 NETWORK THEORY ANALYSIS 13 ELECTRICAL BY GRAPH 356 131 ] 32 133 134 135 136 What Is an Electrical Network? 357 Kirchhoff's Current and Voltage Laws 358 Loop Currents and Node Voltages 359 RLC Networks with Independent Sources: Nodal Analysis RLC Networks with Independent Sources: Loop Analysis General Lumped. Linear. Fixed Networks 373 Summary 379 References 381 Problems 381 362 371 14 GRAPH THEORY IN OPERATIONS RESEARCH 384 141 142 143 144 145 146 147 148 149 1410 Transport Networks 384 Extensions of MaxFlow MinCut Theorem Minimal Cost Flows 393 395 The Multicommodity Flow Further Applications 396 More on Flow Problems 397 Activity Networks in Project Planni Analysis of an Activity Network Further Comments on Activity "Ipl·"/11II Graphs in Game Theory 409 Summary 414 References 414 .
xiv CONTENTS 15 SURVEY OF OTHER APPLICATIONS 151 SignalFlow Graphs 416 152 Graphs in Markov Processes 424 153 Graphs in Computer Programming 154 Graphs in Chemistry 449 155 Miscellaneous Applications 454 416 439 Appendix A BINETCAUCHY THEOREM 458 Appendix B NULLITY OF A MATRIX AND SYLVESTER'S LAW 460 463 INDEX VERSION .
sixteen years later. in circuit layout. This emphasis arises from the experience and conviction that whenever graph theory is applied to solving any practical problem (be it in electrical network analysis. including graphtheoretic algor tested computer programs for solving problems xv . Konig's Theorie der Endlichen und Unendlichen Graphen). An engineer often finds that those reallife problems that can be modeled into graphs small enough to be worked on by hand are also small enough to be solved by means other On this respect graph theory is different from col calculus. and almost an equal number of proceedings of various seminars and conferences. In proving have been given preference over nonconstruc II. the largest in the book. Now. it almost always leads to large graphsgraphs that are virtually impossible to analyze without the aid of the computer. the hi one of the reasons for the recent growth of inte Convinced that a student of applied grap the help of a digital computer for handling la algorithms and their efficiencies. in data structures. Each book has its own strength and points of emphasis. depending on the axe (or the pen) the author has to grind. is devoted enti graph theory. there are over two dozen textbooks on graph theory. or in social sciences). In 1957 there was exactly one book on the subject (namely. I have emphasized the computational and algorithmic aspects of graphs. or complex variables. particularly among applied mathematicians and engineers.) In fact. in operations research.PREFACE The last two decades have witnessed an upsurge of interest and activity in graph theory. Clear evidence of this is to be found in an unprecedented growth in the number of papers and books being published in the field.
xvi PREFACE approach has not been used in any of the earlier books on graph theory. it is suggested that the contents be tailored to suit the requirements of the students in different disciplines. 12. Mateti Prabhaker. and I]. the examples selected are short and mostly of the nature of puzzles and games. provided the first nine chapters have been covered. 1]. 5. Yet the applied and algorithmic aspect of this book has not been allowed to spoil the rigor and mathematical elegance of graph theory. One could study a later chapter without going through the earlier ones. This is done so that a student in almost any field can read and grasp the first half. a dear friend and former colleague at t Mr. realworld. 14. Indeed. a certain amount of mathematical maturity. Chapters 10 through 15 have been made independent of each other. and parts of ]5. and different chapters require different backgrounds as they deal with applications to nontrivial. The second half of the book is more advanced. and I]. the book grew out of a number of such cou given by the author at the Jet Propulsion Labo University at Los Angeles. the Indian Institute and the University of Illinois at UrbanaCha ACKNOWLEDGMENTS REGISTERED VERSION ve recei~P~ M~rent ~ % the hel individuals and institutions. The book has been made as much selfcontained as was possible. Introductory "pure" graph theory: Chapters 110. of course. a former graduate stu It is a pleasure to acknowledge tW ~71!'R1VPARK ~ opulsion Laboratoryc. The level of presentation is appropriate for advanced undergraduate and firstyear graduate students in all disciplines requiring graph theory. except some elementary concepts from set theory and matrix algebra and. I am particula Rubin. This portion requires no special background. Computer Science: Chapters ]9.0 ine at the In tdr\~ . complex problems in different fields. 3. for example: 1. ]2. 2. the book contains enough material for a course in "pure" graph theory. and parts of 10 and 15. 4. and 13. In fact. Although the illustrations of applications are interwoven with the theory even in this portion. The material covered in Chapter II and in many sections from other chapters is appearing for the first time in any textbook. Electrical Engineering: Chapters 19. Operations Research: Chapters 19. The book is organized so that the first half (Chapters I through 9) serves as essential and introductory material on graph theory. Applied Mathematics: Chapters 111 and parts of 15. Since there is more material here than what can be covered in a onesemester course. Keeping this in mind.
colleagues. Just as one does not thank himself. Basu of the Indian Institute of Technology at Kanpur. Forsythe of Stanford University for his encouragement at the very outset of this project. expressing gratitude to one's wife in public is not a Hindu custom. DeBeule of Xerox Data Systems. Other friends. Mr. Jean A. and students who read parts of the manuscript and made helpful suggestions are: Professor Harry Lass and Mr. Professor C. NARSINGH DEO Kanpur . Liu of the University of Illinois at UrbanaChampaign. Marvin Perlman of the Jet Propulsion Laboratory. Ramakrishnan. Messrs. M uthukrishnan and S. Dr. Nicholas Karpov of Bell & Howell. S. the Indian Institute of Technology at Kanpur. and her coauthorship is tacitly assumed in any book her husband writes. Krishnamoorthy. George Shuraym of Texas Instruments. and the Computer Science Department of the University of Illinois at UrbanaChampaign. and Professors C. Mr. Support in writing this book was received from the Jet Propulsion Laboratory. M. K.PREFACE xvii Institute of Technology. K. [ am also grateful to the late Professor George E. R. Kanpur. For the wife is considered a part of the husband. G. L. There is little doubt that without Kiran's help this book would not have been possible. and Professor Jurg Nievergelt of the University of Illinois at UrbanaChampaign for having read the entire manuscript and made numerous suggestions for improvements throughout the book. Professor Nandlal Jhunjhunwala of California State University at Los Angeles.
.
such that each edge e k is identified with an unordered pair (Vi' V) of vertices. The vertices Vi' Vj associated with edge ek are called the end vertices of e k : The most common representation of a graph is by means of a diagram. and another set E = {el. Edge e1 in Fig. Often this diagram itself is referred to as the graph. tThe adjective "linear" is dropped as redundant in our we always mean a linear graph. Such an edge having the same vertex as both its end vertices is called a selfloop (or simply a loop. Observe that this definition permits an edge to be associated with a vertex pair (Vi' vJ. has a different meaning in electrical network theory. however. Also note that Fig.• }.. The object shown in Fig. 11 is a selfloop. INTRODUCTION WHAT IS A GRAPH? A lineart graph (or simply a graph) G = (V. we shall therefore use the term selfloop to avoid confusion). is a graph. E) consists of a set of objects V = {VI' V2' •. for instance. There is no such thing as 1 . whose elements are called edges. e2. The word loop. 11. in which the vertices are represented as points and each edge as a line segment joining its end vertices. } called vertices.1 11. •.
Some authors use the term general graph to emphasize that parallel edges and selfloops are allowed. I3. this is why our definition includes graphs with selfloops and/or parallel edges. edges e and f in Fig. edges e4 and es in Fig. A graph that has neither selfloops nor parallel edges is called a simple graph. . long or short: what is important is the incidence between the edges and vertices. in drawing a graph. the two graphs drawn in Figs. 1 the definition allows more than one edge associated with a given pair of vertices. It should also be noted that. rv0 v~~ ~ REGISTERED VERSION ADDS NO % c point. for example. For example. 12(a) and (b) are the same. Such edges are referred to as parallel edges. (Some authors break one a crossing to emphasize this fact. a graph is defined to be only a simple graph.2 INTRODUCTION CHAP. because incidence between edges and vertices is the same in both cases. for example. 4 3 (a) 3 (b) Fig.. In a diagram of a graph. it is immaterial whether the lines are drawn straight or curved.) a § b g. 12 Same graph drawn differently. In some graphtheory literature. but in most engineering applications it is necessary that parallel edges and selfloops be allowed. Such edges should be thought of as being in diffe having no common point. sometimes two edges may seem to intersect at a point that does not represent a vertex. II.
vertex. and in numerous other areas. A B Fig. social. 12. a Icell. The following are four examples from among hundreds of such applications. or a onedimensional complex. as shown in Fig. and return to the starting point (without swimming across the river. and a Isimplex. 12 APPLICATIONS OF GRAPHS 3 A graph is also called a linear complex. a Icomplex. walk over each of the seven bridges exactly once. Euler proved that a solution for this problem does not exist. The vertices represent the land areas and the edges represent the bridges. As we shall see in Chapter 2. and edge. C and D. Konigsberg Bridge Problem: The Konigsberg bridge problem is perhaps the bestknown example in graph theory. an element. or an Osimplex. graph theory has a very wide range of applications in engineering. 14. Ocell. or D. B. A. 15. The problem was to start at any of the four land areas of the city. A graph can be used to represent almost any physical situation involving discrete objects and a relationship among them.SEC. as shown in Fig. A vertex is also referred to as a node. a point. ajunction. C. Euler represented this situation by means of a graph. 14 Konigsberg bridge . APPLICATIONS OF GRAPHS Because of its inherent simplicity. in physical. and biological sciences. It was a longstanding problem until solved by Leonhard Euler (17071783) in 1736. The problem is depicted in Fig. a line. by means of a graph. formed by the Pregel River in Konigsberg (then the capital of East Prussia but now renamed Kaliningrad and in West Soviet Russia) were connected to each other and to the banks A and B with seven bridges. Euler wrote the first paper ever in graph theory and thus became the originator of the theory of graphs as well as of the rest of topology. In this book we shall generally use the terms graph. Other terms used for an edge are a branch. of course). Two islands. in linguistics. an arc. 14.
We all have been confronted with such problems at one time or another. transistors.4 INTRODUCTION CHAP. and elec Fig. The nature and value of the elements resistors. each to be connected to each of the three utilitieswater (W). As we shall see in Chapter 5. gas (G). 16) HI. t_dr\~e o . 15 problem. REGISTERED Electrical Network Problems: Properties trant~ j9~H'\IJ. Graph of Konigsberg bridge The Konigsberg bridge problem is the same as the problem of drawing figures without lifting the pen from the paper and without retracing a line (Problems 21 and 22). and so 2. H2.imd ions of otrry'1~&Ya~rors: input impedance) of an electrical network are 1. tricity (E)by means of conduits. the networKMSuch as ~ t is. Is it possible to make such connections without any crossovers of the conduits? Figure 17 shows how this problem can be represen conduits are shown as edges while the houses and nnot be vertices. the topolo~P ADDS NO WATER ARK. inductors. Thus no. 16 Threeutilities problem. Utilities Problem: There are three houses (Fig. the graph i r to the problem in the plane without edges crossing over.. and H3. 1 A B Fig. The way these elements are connected to of the network.
the variations in networks are chiefly due to the variations in topology. The topology of a network is studied by means of its graph.SEC. Since there are only a few different types of electrical elements. 18. 12 APPLICATIONS OF GRAPHS 5 Fig. In drawing a graph of an electrical network the junctions are represented by vertices. An electrical network and its graph are shown in Fig. 17 Graph of threeutilities problem. factor 2 is separated from 1 and is studied independently. b b e Fig. The advantage of this approach will be clearer in Chapter 13. and branches (which consist of electrical elements) are represented by edges. 18 Electrical network and its . regardless of the nature and size of the electrical elements. Thus electrical network analysis and synthesis are mainly the study of network topology. a chapter devoted solely to applying graph theory to electrical networks. In the topological study of electrical networks.
.. and 1 3 527 4 968 1 (dashed lines).. in most of the theory and o e . Figure I9 shows two possible 9 Seating Problem: Nine members r/ \\ I I \ \ 1\\ 7 <. II ... The reader has probably noticed that three of plications above are puzzles and not engineeri to avoid introducing at this stage background theory..... 1 of a new club meet each day for lunch at a round table.> »<: . 19 table.. How many days can this arrangement last? This situation can be represented by a graph with nine vertices such that each vertex represents a member...  Jr" I I I I I I " I _'\""" \\ _ ... / .. n2 2 if n is even. . . I I 1' <.... \ \ \ \ \ \/ )I \ / / / \ \ \ 3 <./\ \". More substantive applications will four chapters. They decide to sit such that every member has different neighbors at each lunch.. 13.... <..( / / / / \ / /... FINITE AND INFINITE GRAPHS ADDS NO WATERMARK Although in our definition of a graph neither t set E need be finite.. In general it can be shown that for n people the number of such possible arrangements is nl 2 and if n is odd.J\ / \/ / / /'1 \ \ 2 \ I I II.6 INTRODUCTION CHAP.. It can be shown by graphtheoretic considerations that there are only two more arrangements possible."" ~/ .. Arrangements at a dinner seating arrangementsthese are I 234567 89 I (solid lines).. They are 1 5 7 3 9 2 846 I and 1 79 5 8 3 624 1... \ 5 Fig.... . and an edge joining two vertices represents the relationship of sitting next to each other.... I I 7.. <.
15. For example. REGISTERED VERSION ADDS NO ~ % . e. edges ez. and 18 are all examples of finite graphs. 14 INCIDENCE AND DEGREE 7 sets are finite. 12. Similarly. in Fig. not. for example. In this book we shall confine ourselves to the study of finite graphs. II. In Fig. and e. II. V 4 and V 5 are adjacent. INCIDENCE AND DEGREE When a vertex Vi is an end vertex of some edge ej. In Fig. and unless otherwise stated the term "graph" will always mean a finite graph. are incident with vertex V4• Two nonparallel edges are said to be adjacent if they are incident on a common vertex. The number of edges incident on a vertex Vj' with is called the degree. of vertex Vi' In Fig. A graph with a finite number of vertices as well as a finite number of edges is called a finite graph. ez and e. otherwise.SEC.. 17. Portions of two infinite graphs are shown in Fig. 11 are adjacent. 14. The graphs in Figs. 110. d(v) . 110 Portions of two infinite graphs. Fig. 11. two vertices are said to be adjacent if they are the end vertices of the same edge. it is an infinite graph. Vi and ej are said to be incident with (on or to) each other.
The graph of three utilities s of degree three. A REGISTERED VERSION ADDS NO IWAvTIERNJAm< ertices v 4 and V7 ~ % i e 0 . isolated vertices are vertices with zero Fig. the second expression must also be even: odd ~ d(Vk) = an even number. (11) can be expressed as the sum of two sums. AND NULL GRAPH PENDANT VER A vertex having no incident edge is cal words. That is. result. A graph in which all vertices are of equal degree (or simply a regular). are isolated vertices. and the first expression on the righthand side is even (being a sum of even numbers).I I. (11) we shall derive the following THEOREM interesting II The number of vertices of odd degree in a graph is always even. respectively. The degree of a vertex is sometimes also referred to as its valency. d(v2) = 4. I . as follows: (12) Since the lefthand side in Eq. Let us now consider a graph G with e edges and n vertices VI' v2. once more. 1 d(V3) 3. for example. the quantity in the left side of Eq.) = 3 + 4 + 3 + 3 + 1 = 14 = twice the 2) number of edges. 11 as an example. Proof: If we consider the vertices with odd and even degrees separately. 15. ••• . (12) is even. (11) Taking Fig. From Eq. and d(vs) = 1.8 INTRODUCTION CHAP. 4) = d(v4) = d(vl) + d(v + d(V3) + d(v + d(v~. (13) Because in Eq. the sum of the degrees of all vertices in G is twice the number of edges in G. (13) each d(Vk) is odd. vn• Since each edge contributes two degrees. ISOLATED VERTEX. each taken over vertices of even and odd degrees. Hence the theorem. the total number of terms in the sum must be even to make the sum an even number.
a vertex graph. or [ which the vertex set V is also empty. p. the two edges incident on VI are in series. For a lively discussion on paradoxes arising null graph.t=. 111 Graph containing isolated vertices. series edges. 1971). In the definition of a graph G = (V. Although the edge set E may be empty. Such a graph. II]. Y. 112. 4041 in Theory of Graphs: a Basis Maxwell and M. E). otherwise. Two adjacent edges are said to be in series if their common vertex is of degree two.V:3 Fig. A null graph of six vertices is shown in Fig. In Fig. N. For our pu 0 sequence. 15 ISOLATED VERTEX. 1] I is a pendant vertex. the by definition. and a pendant vertex. a graph must have at least one +Some authors (see. without any edges. it is possible for the edge set E to be empty. 1. AND NULL GRAPH 9 Fig. Vertex v) in Fig. is called a null graph. the . . Reed (Pergamon Press. PENDANT VERTEX. see pp. [29]. This they call t with E = 0 and V::. B. for example. a pendant vertex or an end vertex. In other words. 112 vertex set V must not be empty. every vertex in a null graph is an isolated vertex.SEC.
This fertile period was followed by half a ce Then a resurgence of interest in graphs s pioneers in this period was D. The problem became well known after Cayley published it in 1879 in the first volume of the Proceedings of the Royal Geographic Society. graph theory was born in 1736 with Euler's paper in which he solved the Konigsberg bridge problem [14]. which states that four colors are sufficient for coloring any atlas (a map on a plane) such that the countries with common boundaries have different colors. F. Paris. De Morgan (1806. The puzzle consisted of a wooden. The corners were marked with the names of 20 important cities: London. To this day. The past 30 years has been a period of inte both pure and applied. De Morgan's letter is the first authenticated reference to the fourcolor problem. A BRIEF HISTORY OF GRAPH THEORY As mentioned before. One was the fourcolor conjecture. In the year 1859 he invented a puzzle and sold it for 25 guineas to a game manufacturer in Dublin. The other milestone is due to Sir W. R. About the time of Kirchhoff and Cayley. regular dodecahedron (a polyhedron with 12 faces and 20 corners. Mobius (17901868) first presented the fourcolor problem in one of his lectures in 1840. A great deal of resea tBracketed numbers refer to references at the end . two other milestones in graph theory were laid.1871) discussed this problem with his fellow mathematicians in London. the fourcolor conjecture is by far the most famous unsolved problem in graph theory. Konig. He maticians and his own and wrote the first published in 1936 [17]. it has stimulated an enormous amount of research in the field [111]. New York.10 INTRODUCTION CHAP. Although the solution of this specific problem is easy to . The object in the puzzle was to find a route along the edges of the dodecahedron. About 10 years later. Delhi. G. R. each face being a regular pentagon and three edges meeting at each corner. Hamilton (18051865). and so on. Kirchhoff (18241887) developed the theory of trees for their applications in electrical networks [I 6]. 1 16. to date no one has found a n condition for the existence of such a route (called H arbitrary graph. A. 221). see Fig. passing through each of the 20 cities exactly once [112]. In 1847.t For the next 100 years nothing more was done in the field. Cayley (18211895) discovered trees while he was trying to enumerate the isomers of saturated hydrocarbons CnH2n+2 [13]. A. It is believed that A. Ten years later. (as we shall see in Chapter 2).
Vol.Finite Graphs and Networks: An Introduction R with Applications. but are somewhat advanced. 72. 11... 15. and some elementary results have been obtained. An attempt has also been made to show that graphs can be used to represent almost any problem involving discrete arrangements of objects. HARARY. 1 REFERENCES 11 done in this area. Vol. LlETZMANN. 128140. English translation of the original book in French: Theorie des graphes et ses applications. Mag. The Four Color Problem.1857. 1950.. en:) IV 18. Visual Topology.CHAP. CT5. McGrawHili Book Company. March 1958. AddisonWesley Publishing C Mass. For relating graph theory to the rest of topology one should read [18]. Petersburg Academy). L. SUMMARY In this chapter some basic concepts of graph theory have been introduced.. Graph Theory. KIRCHHOFF. Inc.. but it contains no applications and is written for an advanced student of graph theory. 14. Ore's book [110] is recommended.G. 111. It is compact and clear. "Uber die Auflosung der Glei Untersuchungen der Linearen Verteilung Gal me gefuhrt WI Poggendorf Ann. BUSACKER. July 1953. D. G. ORE. 1958. New York.47. Paris. 0. Academic . English translation of the R. The entertaining book of Rouse Ball [112] contains a variety of puzzles and games to which graphs have been applied.172176. 1969. "On the Theory of Analytical Forms Called Trees. 1965.. 1847. Theorie der endlichen und unendli .~~'U610·Clt~lsea. Paul Erdos. CAYLEY. English translation in Sci. Physik.. Theory of Graphs.. Am. Munich. . 1962. ORE. 0. 13. IRE Trans~ Circuit Theory. Dunod Editeur. REGISTERED 0 17. Random House. and T. ORE. "Solutio Problematis ad Geometriam Situs Pertinantis. 1965.. Harary's book [15] contains an excellent treatment of the subject. Oystein Ore (recently deceased). Oldenbourg K.. 1955. Among the current leaders in the field are Claude Berge.. BERGE. and Frank Harary. American Mathemat 110. . Graphs and Their Uses. ~ New York. SAATY.. EULER. Seshu and Reed [113] is specially suited for electrical engineers. Vol. Thousands of papers have been published and more than a dozen books written during the past decade.. Busacker and Saaty [12] is a good intermediatelevel book.F.497translation. G. 1736.c. 16. John Wiley & Sons.." Phil.." Academimae Petropolitanae (St. American W New York. KONIG. The Theory 0/ Graphs and Its Applications. REFERENCES As an elementary text on graph theory. A 13. Berge [II] and Ore [19] are good general texts. New York. 8. 19. Vol. 6670. a wellwritten elementary book on important aspects of topology. L. Le\Zip. where concern is not with the internal properties of these objects but with the relationships among them. William Tutte. . 0.. 12.
. electricity. say. 1 ROUSEBALL. Vikings. (d) NZ03. How many vertices are of each type? Given a maze as shown in Fig. 1892. 17. 8 13 14 12 I I 2 21 22 Destination * 20 10 9 Fig. 14. gas.S. Explain what the vertices and the edges denote. 113 A maze. Draw graphs representing problems of (a) two houses and three utilities.) that can be represented by means of graphs. Romans. etc.. (b) four houses and four utilities. (This is one of numerous mazes that were drawn or built by the Hindus. . An edge represents a possible path between two vertices. AddisonWesley Publishing Company. activities. B. and four vertices. 12.12 112. London and New York. Mass. 15. INTRODUCTION CHAP. PROBLEMS 11. four. 1961.) 3 4 7 16. Inc. (b) C2H6. and M. Draw graphs of the following chemical compounds: (a) CH4. (c) C6H6. 1962. and telephone. Arabs. six. Draw the graph of the Wheatstone bridge circuit. represent this maze by means of a graph such that a vertex denotes either a corridor or a dead end (as numbered). Mathematical Recreations and Essays. W. 113. Draw all simple graphs of one. New York. REED. etc. Reading. three. two.) Draw a graph with 64 vertices representing the squares of a chessboard.. water. You will see that in this graph every vertex is of degree two. Join these vertices appropriately by edges. (Hint: Represent atoms by vertices and chemical bonds between them by edges. and The Macmillan Company.. Greeks. reallife problems. 113. or eight. three. Name 10 situations (games. each representing a move of the knight. 13. Linear Graphs and Electrical Networks. SESHU.
B. 19. Show that the maximum number of edges in a simple graph with n vertices is n(n . and 3 gallons. We have a + b + c = 8 at all times. a graph with a finite number of vertices and an infinite number of edges) will have at least one pair of vertices (or one vertex in case of parallel selfloops) joined by an infinite number of parallel edges.0) to state (4. b = 5. 5. Convince yourself that an infinite graph with a finite number of edges (i. .e. 1 PROBLEMS 13 18. B. respectively. Decanting problem. while Band C are empty. Convince yourself that the maximum degree of any vertex in a simple graph with n vertices is n . 112. a = 8.CHAP. Now when you look at this graph it will be clear to you how to go from state (8. and C.] This is the classical decanting problem. Show that an infinite graph with a finite number of vertices (i. 0). 4. b = 0.1)/2. Each vertex stands for a state and each edge for a permissible change of states between its two end vertices.e..1. c = 3. c = 0. You are given three vessels A. b. A is filled. and C of capacities 8.. 111. You will find that with these constraints there are 16 possible states (situations) in this process.0. [Hint: Let a. Represent this problem by means of a 16vertex graph. and c be the amounts of liquid in A. 110. a graph with a finite number of edges and an infinite number of vertices) must have an infinite number of isolated vertices. at least one of the following equations must always be satisfied: a = 0. Since at least one of the vessels is always empty or full. respectively. Divide the liquid in A into two equal quantities.
The solution of the seating arrangement problem. deal mainly with the nature of connectivity in graphs. will also be solved. which was introduced in Chapter I. and Euler graphs. The first is to introduce additional concepts and terms in graph theory. two graphs are thought of as equiva they have identical behavior in terms of precisely: Two graphs G and G' are said to there is a onetoone correspondence their edges such that the incidence relationship suppose that edge e is incident on vertices VI a ing edge e' in G' must be incident on the vertices 14 . 21. which is a local property of each vertex. which involves stacking four multicolored cubes. circuits. ISOMORPHISM In geometry two figures are thought of as gruent) if they have identical behavior in Likewise. The degree of vertices. will be solved. The celebrated Konigsberg bridge problem. will be obtained by means of Hamiltonian circuits. will be shown to be related to the more global properties of the graph. such as paths.2 PATHS AND CIRCUITS This chapter serves two purposes. These concepts. The second purpose is to illustrate with examples how to solve actual problems using graph theory. A third problem. These three unrelated problems will demonstrate the problemsolving power of graph theory. The reader may attempt to solve these problems without using graphs. also introduced in Chapter I. the difficulty of such an approach will quickly convince him of the value of graph theory.
names) of their vertices and edges. isomorphic graphs are the same graph. 3. b. respectively.TrliRlfD isom~~feJNtwo ing the vertices ADDS NO WATERMARK CJO ~.. e4. the three graphs s isomorphic. perhaps drawn differently. v3. es. 3. respectively. t_dr\~e e . An equal number of vertices with a given 9EGIS. As indicated in Chapter I. and V2. c. e2. one can verify that the two graphs in Fig. and e6. 21 VI Isomorphic graphs. and vS' respectively. 5. For instance. but just by looking at them you exercise for the reader to show. For example. that the three graphs in Fig. For example. The correspondence between the two graphs is as follows: The vertices a. The same number of vertices. 21 are isomorphic. d. and 6 correspond to el. and e correspond to v" v2. It is not always an easy task to determine whether or n are isomorphic. 2. The same number of edges. 4. 22 shows two different ways of drawing the same graph.SEC.e. 22 Isomorphic graphs. 23 are iso It is immediately apparent by the defini isomorphic graphs must have I. 21 ISOMORPHISM 15 Vs a v4 e e2 v3 e6 v2 b d (a) vI es (b) Fig. Except for the labels (i. 2. Fig. e3. V4. The edges I. Fig. a given graph can be drawn in many different ways. by redrawing edges.
25(b) is a 25(a). SUBGRAPHS REGISTERED VERSION % A graph g is said to be a subgraph of a the edges of g are in G. 24 Two graphs that are not isomorphic. w. adjacent to x. the graph in Fig. 24(a) and (b) are not isomorphic can be shown as follows: If the graph in Fig. we move to a different topic. Finding a simple and efficient criterion for detection of i mo still actively pursued and is an important unsolved probl In Chapter II we shall discuss various proposed al grams for automatic detection of isomorphism For now. 23 Isomorphic graphs. and each edge of g ha in G. yet they are not isomorphic. ~ 22. u and v. (Obviously. Now in (b) there is only one pendant vertex. while in (a) there are two pendant vertices.16 PATHS AND CIRCUITS CHAP. However. because there are no other vertices of degree three. 24(a) were to be isomorphic to the one in (b). For instance. 24 satisfy all three conditions. vertex x must correspond to y. 2 (a) (b) (c) Fig. when considering a subgra . adjacent to y. these conditions are by no means sufficient. the two graphs shown in Fig. u • (a) • r y (b) •• Fig. That the graphs in Figs. For instance.
SEC.
23
A PUZZLE WITH MULTICOLORED CUBES
17
4
3
(a) (b)
Fig. 25
Graph (a) and one of its subgraphs (b).
not be altered by identifying two distinct vertices, or by adding new edges or vertices.) The concept of subgraph is akin to the concept of subset in set theory. A subgraph can be thought of as being contained in (or a part of) another graph. The symbol from set theory, g c: G, is used in stating "g is a subgraph of G." The following observations can be made immediately: I. Every graph is its own subgraph. 2. A subgraph of a subgraph of G is a subgraph of G.
3. A single vertex in a graph G is a subgraph 4. A single edge in G, together
of G. of
with its end vertices, is also a subgraph
G.
EdgeDisjoint Subgraphs: Two (or more) subgraphs g, and g2 ofa graph G are said to be edge disjoint if gl and g2 do not have any edges in common. For example, the two graphs in Figs. 27(a) and (b) are ed int subgraphs of the graph in Fig. 26. Note that although not have any edge in common, they may have ve "'""~"o be ver graphs that do not even have vertices in co cannot possi joint. (Obviously, graphs that have no vertices i have edges in common.) REGISTERED
23. A PUZZLE WITH MULTICOLORED CU
%
Now we shall take a brief pause to ill problem can be solved by using graphs. Two ste the physical problem is converted into a pro
VERSION ADDS NO 'thWrAT~ARK
involved here: Firsf(,O
e
18
PATHS AND CIRCUITS
CHAP.
2
the graphtheory problem is then solved. Let us consider the following problem, a wellknown puzzle available in toy stores (under the name Instant Insanity). Problem: We are given four cubes. The six faces of every cube are variously colored blue, green, red, or white. Is it possible to stack the cubes one on top of another to form a column such that no color appears twice on any of the four sides of this column? (Clearly, a trialanderror method is unsatisfactory, because we may have to try all 41,472 (= 3 x 24 x 24 x 24) possibilities.) Solution: Step I: Draw a graph with four vertices B, G, R, and Wone for each color (Fig. 26). Pick a cube and call it cube 1; then represent its
,....
R R B R G W
.___ ,....
Cube I
B W G W
Cube 2 G R
2
...__
w
R
Cube 3
B
4 G B
G
Cube 4 R
W
Fig. 26 colors.
Four cubes unfolded and the
n betweerMliR6tJQHvith three pairs of opposite faces by three edges, appropriate colors. In other words, if a blue in cube ~~_~IX)oace opposite to it, draw an edge between vertices W in die graPh.' fjo the same for the remaining two pairs of faces in uWaterE6NVlIAJiK edges resulting from cube 1. A selfloop with t beled I at vertex RCJO for instance, would result if cube 1 had a pair of both "'U'..,~
e
td
SEC.
24
WALKS,
PATHS, AND CIRCUITS
19
red. Repeat the procedure for the other three cubes one by one on the same graph until we have a graph with four vertices and 12 edges. A particular set of four colored cubes and their graph are shown in Fig. 26. Step 2: Consider the graph resulting from this representation. The degree of each vertex is the total number of faces with the corresponding color. For the cubes of Fig. 26, we have five blue faces, six green, seven red, and six white. Consider two opposite vertical sides of the desired column of four cubes, say facing north and south. A subgraph (with four edges) will represent these eight facesfour facing south and four north. Each of the four edges in this subgraph will have a different labelI, 2, 3, and 4. Moreover, no color occurs twice on either the north side or south side of the column if and only if every vertex in this subgraph is of degree two. Exactly the same argument applies to the other two sides, east and west, of the column. Thus the four cubes can be arranged (to form a column such that no color appears more than once on any side) if and only if there exist two edgedisjoint subgraphs, each with four edges, each of the edges labeled differently, and such that each vertex is of degree two. For the set of cubes shown in Fig. 26, this condition is satisfied, and the two subgraphs are shown in Fig. 27.
3
B
2
w
(a) NorthSouth Subgraph Fig. 27 Two edgedisjoint subgraphs
wG 2
of th
v~
REGISTERED VERSION
i?0' ~
24.
WALKS,
PATHS,
AND
CIRCUITS
%
A walk is defined as a finite alternating s beginning and ending with vertices, such that vertices preceding and following it. No edge ap more than once in a walk. A vertex, however, In Fig. 28(a), for instance, VI a V2 b V3 C V3 d V4 e
20
PATHS AND CIRCUITS
CHAP.
2
c
(a) An Open Walk Fig.28
(b) A Path of Length Three A walk and a path.
heavy lines. A walk is also referred to as an edge train or a chain. The set of vertices and edges constituting a given walk in a graph G is clearly a subgraph ofG. Vertices with which a walk begins and ends are called its terminal vertices. Vertices VI and Vs are the terminal vertices of the walk shown in Fig. 28(a). It is possible for a walk to begin and end at the same vertex. Such a walk is called a closed walk. A walk that is not closed (i.e., the terminal vertices are distinct) is called an open walk [Fig. 28(a)]. An open walk in which no vertex appears more than once is called a path (or a simple path or an elementary path). In Fig. 28, VI a V2 b V3dV4 is a path, whereas VI a V2 b V3 C V3 d V4 e V2 f Vs is not a path. In other words, a path does not intersect itself. The number of edges in a path is called the length of a path. It immediately follows, then, that an edge which is not a selfloop is a path of length one. It should also be noted that a selfloop can be included in a walk but not in a path (Fig. 28). The terminal vertices of a path are of degree one, and the rest of the vertices (called intermediate vertices) are of degree two. This degree, of course, is counted only with respect to the edges included in the path and not the entire graph in which the path may be contained. A closed walk in which no vertex (except the initial appears more than once is called a circuit. That is, a
Fig. 29
Three different eire
SEC.
25
CONNECTED GRAPHS, DISCONNECTED GRAPHS, AND COMPONENTS
21
intersecting walk. In Fig. 28(a), V2 b V3 d V4 e V2 is, for example, a circuit. Three different circuits are shown in Fig. 29. Clearly, every vertex in a circuit is of degree two; again, if the circuit is a subgraph of another graph, one must count degrees contributed by the edges in the circuit only. A circuit is also called a cycle, elementary cycle, circular path, and polygon. In electrical engineering a circuit is sometimes referred to as a loopnot to be confused with selfloop. (Every selfloop is a circuit, but not every circuit is a selfloop.) The definitions in this section are summarized in Fig. 210. The arrows are in the direction of increasing restriction. You may have observed that although the concepts of a path and a circuit are very simple, the formal definition becomes involved.
Subgraph of G ~ Walk in G A nonedg eretracing of edges 0 fG sequence Any collec tion of edges in G
_!
A nonmtersecting open walk 111 G Fig. 210 Path in G
II
~ Circuit in G
A nonintersecting dosed walk in G
Walks, paths, and circuits
as subgraphs.
25.
CONNECTED GRAPHS, DISCONNECTED GRAPHS, AND COMPONENTS
Intuitively, the concept of connect. dness is obvious. A graph is connected if we can reach any vertex from any other vertex by traveling along the edges. More formally: A graph G is said to be connected if there is at least pair of vertices in G. Otherwise, G is disconnected ected. A n Fig. 28(a) is connected, but the one in Fig. 2graph of more than one vertex is disconnected It is easy to see that a disconnected graph is called VS~JQNrhe nected graphs. Each of these connected sub graph in Fig. 211 consists of two componen er w~tfCfsktD"t a connected graph {f. By component is as follows: Consider a vertex Vi definition, not all vertices of G are joined by 'MAJ~8MAmc e edges incident orrJO vertices of G that have paths to Vi' together wit them, form a component. Obviously, a compon aph. _.0<'·
lIfwCiI§ r,~!!~1l
e
tdr\~
22
PATHS AND CIRCUITS
CHAP.
2
Fig. 211 A disconnected graph with two components.
THEOREM
21
A graph G is disconnected if and only if its vertex set V can be partitioned into two nonempty, disjoint subsets V, and V2 such that there exists no edge in G whose one end vertex is in subset VI and the other in subset V2• Proof: Suppose that such a partitioning exists. Consider two arbitrary vertices a and b of G, such that a E VI and b E V2• No path can exist between vertices a and b; otherwise, there would be at least one edge whose one end vertex would be in V, and the other in V2• Hence, if a partition exists, G is not connected. Conversely, let G be a disconnected graph. Consider a vertex a in G. Let V, be the set of all vertices that are joined by paths to a. Since G is disconnected, V, does not include all vertices of G. The remaining vertices will form a (nonempty) set V2• No vertex in V, is joined to any in V2 by an edge. Hence the partition. • Two interesting
THEOREM
and useful results involving
connectedness
are:
22
If a graph (connected or disconnected) has exactry two vertices of odd degree, there must be a path joining these two vertices. Proof: Let G be a graph with all even vertices+ except vertices 1..', and V2, which are odd. From Theorem II, which holds for every graph and therefore for every component of a disconnected graph, no graph can have an odd number of odd vertices. Therefore, in graph G, v, and V2 must belong to the same component, and hence must have a path between them. •
THEOREM
23
can have at most (n  k)(n  k
A simple graph (i.e., a graph without parallel
and k components Proof: be n i,
Let the number of vertices in each of nz, ... , n i; Thus we have n, + n2 + '" n,
+ n
ADDS NO
> 1.
tFor brevity, a vertex with odd degree is called an degree an even vertex.
SEC.
26
EULER GRAPHS
23
The proof of the theorem depends on an algebraic inequalityt
~ n]
j~
k
1
< n2

(k 
1)(2n  k).
(21)
Now the maximum number of edges in the ith component of G (which is a simple connected graph) .is }nj(nj  1). (See Problem 112.) Therefore, the maximum number of edges in G is
1  ~ in, 2 ;_ 1
k
I)n; = 2
l(k
t: 1
~
n]

)

n 2 1)(2n  k)] 
(22)
1 < 2[n2
."0
(k 
2'
n
from (21)
(23)
2·(n
1
 k)(n  k
+
1).•
It may be noted that Theorem 23 is a generalization of the result in Problem 112. The solution to Problem 112 is given by (23), where k = 1.
Now we are equipped to handle the Konigsberg duced in Chapter 1.
bridge problem intro
26.
EULER
GRAPHS
As mentioned in Chapter 1, graph theory was born in 1736 with Euler's famous paper in which he solved the Konigsberg bridge problem. In the same paper, Euler posed (and then solved) a more general problem: In what type of graph G is it possible to find a closed walk running through every edge of G exactly once? Such a walk is now called an Euler line, and a graph that consists of an Euler line is called an Euler graph. More formally: If some closed walk in a graph contains all the edges of the graph, then the walk is called an Euler line and the graph an Euler graph. By its very definition a walk is always connected. Since the Euler line (which is a walk) contains all the edges of the graph, an Euler is always connected, except for any isolated vertices the graph may vertices do not contribute anything to the understa it is hereafter assumed that Euler graphs do n and are therefore connected. Now we shall state and prove an important to tell immediately whether or not a given t Proof'
~7=
1
(n;  1)
=
(±
1
n  k. Squaring both si (n; 
1
1»)
2
= n2
+k
ADDS NO
or ~7= 1 (n~  2n;) + k + nonnegative cross terms = n2 for all i. Therefore, ~7~1 n] < n2 + k2  2nk  k +
We continue tracing as far as possible. 15). it is not an Euler graph. Now we construct a walk starting at an arbitrary vertex v and going through the edges of G such that no edge is traced more than once. the star of David. 2 THEOREM 24 A given connected graph G is an Euler graph if and only if all vertices of G are of even degree. In tracing this walk we observe that every time the walk meets a vertex v it goes through two "new" edges incident on vwith one we "entered" v and with the other "exited. the tracing cannot stop at any vertex but u. Thus it is not possible to walk over each of the seven bridges exactly once and return to the starting point. which starts and ends at vertex v and has more edges than h. but this walk in h' can be combined with h to form a new walk. If this closed walk h we just traced includes all the edges of G. h' must touch h at least at one vertex a. Starting from a. For example. the degrees of the vertices of h' are also even. the degree of every vertex is even. we remove from G all the edges in h and obtain a subgraph h' of G formed by the remaining edges. Since all the vertices of h' are of even degree. And since v is also of even degree. we shall eventually reach v when the tracing comes to an end. The drawing in F med's scimitars and is believed to have come fr 212(b) is. 212. of course. Since every vertex is of even degree." This is true not only of all intermediate vertices of the walk but also of the terminal vertex. This process can be repeated until we obtain a closed walk that traverses all the edges of G. Thus if G is an Euler graph. we can exit from every vertex we enter. Since both G and h have all their vertices of even degree. To prove the sufficiency of the condition. we can again construct a new walk in graph h'. One often encounters Euler lines in various puzzles. Moreover. If not. The problem common to these puzzles is to find how a given picture can be dra line without retracing and without lifting the pencil f pictures are shown in Fig. the walk a I c 2 d 3 a includes all the edges of the graph and does n The initial vertex is a and the final vertex is walk that includes (or traces or covers) all ed any edge a unicursal line or an open Euler line. assume that all vertices of G are of even degree. . It therefore contains an Euler line (which is a closed walk). Hence. (Equal In defining an Euler line some authors drop be closed. Suppose that G is an Euler graph. because G is connected. we find that not all its vertices are of even degree. • Proof: Konigsberg Bridge Problem: Now looking at the graph of the Konigsberg bridges (Fig. because we "exited" and "entered" the same vertex at the beginning and end of the walk.24 PATHS AND CIRCUITS CHAP. this walk in h' must terminate at vertex a. Thus G is an Euler graph. a unicursal line will be called a unicursal graph. G is an Euler graph. respectively.
. and each successive line into two unicursal lines. (1'2.212 Two Euler graphs. until there are k of WI. 26 EULER GRAPHS 25 (a) (b) Fig. This observation can be generalized as follows: THEOREM 25 In a connected graph G with exactly 2k odd vertices. It is clear that by adding an edge between the initial and final vertices of a unicursalline we shall get an Euler line. Proof: Let the odd vertices of the given gra . The first removal will leave a single unicursal Ii that into two unicursal lines. ••• . WI). subgraphs such that they together contain all edges of G a graph. e Fig.SEC. W2.• . Thus a connected graph is unicursal if and only if it has exactly two vertices of odd degree.213 Unicursal graph. Add k (VI. G' if we remove from p the k edges we just added ( on the same vertex). Wk in any arbitrary order. p will be split into k walks. W2). (rko Wk) to form a new Since every vertex of G' is of even degree..
U £2' Likewise. Two graphs and their union. Because of G EB g = G . and G1 G1 U G2• If GI and G2 are vertex disjoint. One of these operations is required immediately in the next section. but not in both. then GI n G2 is a null graph. the intersection Gin G2 of graphs Gland G2 is a graph G 4 consisting only of those vertices and edges that are in both G I and G2• The ring sum of two graphs Gland G2 (written as G I EB G2) is a graph consisting ofthe vertex set VI U V2 and of edges that are either in G1 or G2. gl n g2 = a null +If an edge e. 214. In particular: The union of two graphs GI = (VI' £1) and G2 = (V2' £2) is another graph G3 (written as G3 = GI U G2) whose vertex set V3 = VI U V2 and the edge set E3 = E.g. by definition. t It is obvious from their definitions that the three operations just mentioned are commutative.26 PATHS AND CIRCUITS CHAP. that s remains after all the edges in g have been removed is written as G . = G EB G a null graph. If g is a subgraph of G. then G1 n G2 is empty.g is often called the complement Decomposition: A graph G is said to have gl U graphs gland and g2 if s. it is convenient to consider a large graph as a combination of small ones and to derive its properties from those of the small ones. OPERATIONS ON GRAPHS As is the case with most mathematical entities. For any graph G. and ring sum are shown in Fig. Since graphs are defined in terms of the sets of vertices and edges. intersection. 2 We shall interrupt our study of Euler graphs to define some commonly used graphtheoretic operations. others will be needed later. whenever g c G. then G EB g is. 27. That is. GI G1 U G2 2 = = G2 G2 U G" I• EB G EB G If G1 and G2 are edge disjoint. = G. G and U EB G 2 = G = G n G = G. is in two graphs G1 and G2• its end as in G2• . it is natural to employ the settheoretical terminology to define operations between graphs.
27 OPERAnONS ON GRAPHS 27 V2 (' V1 V2 d V4 e I G1 Vs d V4 j G2 G I U G2 v. and ring sum of two graphs.. isolated vertices are disregarded. . removing) Vi f implies the deletion of all edges incident on is an edge in G. a graph G ca than two subgraphssubgraphs that are (pai ge disjoint and co ~ lectively include every edge in G. REGISTERED Deletion: If Vj is a vertex in graph G... finite number of graphs. .... however..SEC.Lv] VI VI II V6 b V2 c d . may occur in both gl and g2' In decomposition.VS V4 f Fig. intersection.. Deletion of an edge does not imply deletion G ._.e j is a subgraph of G. every edge of G occurs either in gl or in g2' but not in both. these definitions can be extended in an obv into . intersection... In other words. Although union. Some of the vertices. em} can be decomposed in 2mI . . and ring sum have of graphs. A graph containing m edges {ep e2.214 Union. Similarly..I different ways into pairs of subgraphs s.e....ej = Gffiej• % .. then G obtained by deleting (i. g2 (why?). then G .
Fusion: A pair of vertices a. of edgedisjoint circuits. e f 2 Fig. 216 for an example.\ ~ eI G Fig. 2 . See Fig. THEOREM 26 A connected graph G is an Euler graph if into circuits. 216 Fusion of vertices a and b. Suppose graph G can be decomposed . but it reduces the number of vertices by one. More complex operations have been defined and are used in graphtheory literature. b in a graph are said to be fused (merged or identified) if the two vertices are replaced by a single new vertex such that every edge that was incident on either a or b or on both is incident on the new vertex. These are some of the elementary operations on graphs. MORE ON EULER GRAPHS The following are some more graphs.28 PATHS AND CIRCUITS CHAP. For a survey of such operations see the paper by Harary and Wil [228. Hence G is an Proof: . Since the degree of every degree of every vertex in G is even. Thus fusion of two vertices does not alter the number of edges. 215 Vertex deletion and edge deletion.
Hence the theorem. This raises the following interesting question: What property must a vertex v in an Euler graph have such that an Euler line is always obtained when one follows any walk from vertex v according to the single rule that whenever one arrives at a vertex one shall select any edge (which has not been previously traversed)? Such a graph is called an arbitrarily traceable graph from vertex v. 217 is an arbitrarily traceable graph from vertex c. Let us remove r from G. we would only trace the circuit abc a. Arbitrarily traceable graph Now at c we have the choice of going to a. let G be an Euler graph. Proceeding in this fashion. say between V2 and V3. e e Fig. which is an Euler graph. thus forming a circuit r. 217.. Continue this process until no edges are left. Thus. Suppose that we start from vertex a and trace the path abc. or e. 21 itrarily ~ ~~~ ADDS NO WATERMARK ~ CJO . There are at least two edges incident at '1. but not from any other vertex. Let one of these edges be between VI and V2. All vertices in the remaining graph (not necessarily connected) must also be of even degree. For instance.. we eventually arrive at a vertex that has previously been traversed.. From the remaining graph remove another circuit in exactly the same way as we removed r from G.. 28 MORE ON EULER GRAPHS 29 Conversely.. the graph in Fig. 218 is not arbitrarily traceable from any vertex. Consider a vertex VI. Since vertex V2 is also of even degree.'1. we cannot trace the entire Euler' line simply by moving along any edge that has not already been traversed. If we took the first choice. • the graph in Fig.SEC. it must have at least another edge. d. Arbitrarily Traceable Graphs: Consider d . The Euler graph in Fig. which is not an Euler line. starting from a. 217 from c. the Euler graph in Fig.
in the graph of Fig. starting at vertex v. This raises the question: What I condition for a connected graph G to have a H . 2 traceable from all its vertices. 29. A Hamiltonian circuit in a connected graph is defined as a closed walk that traverses every vertex of G exactly once. at which the walk also terminates. The following interesting theorem.30 PATHS AND CIRCUITS CHAP. answers the question just raised. neither of the graphs shown in Fig tonian circuit. Obviously. More formally: EGISTFR~n oman If lC'inciu'aes A circuit in a connected graph G is said to every vertex of G. HAMILTONIAN PATHS AND CIRCUITS An Euler line of a connected graph was characterized by the property of being a closed walk that traverses every edge of the graph (exactly once). 220(a) v (a) (b) Fig. 2lines. For example. THEOREM 27 An Euler graph G is arbitrarily traceable from vertex v in G if and only if every circuit in G contains v. except of course the starting vertex. due to Ore [25]. Hence a Hamiltonian circui graph ofVE:R&lGNsists of exactly n edges. not every connected graph example. if one traverses along the edges passing through each vertex exactly onceone o shown by hea A Hamiltonian circuit for the graph in Fig. 220 Hamiltonian circuits. For a proof of the theorem the reader is referred to [25].
The latter is infinitely more complex. The resemblance between the problem of an Euler line and that of a Hamiltonian circuit is deceptive. CJO It is left as an exercise for the reader to show t the two f~~~1fk~t1 e tdr . Although one can find Hamiltonian circuits in many specific graphs. each of whose 20 corners was marked with the name of a city. There are.as will be presently shown. however. 221 (a)]. a Hamiltonian path in a graph G traverses every vertex tonian path is a subgraph of a Hamiltonian circuit graph of another graph). This path is called a Hamiltonian path. As was mentioned in Chapter I. 220 and 221. first posed by the famous Irish mathematician Sir William Rowan Hamilton in 1859. 221 (b). Hamiltonian Path: If we remove anyone edge from a Hamiltonian circuit. certain types of graphs that always contain Hamiltonian circuits. There are.SEC. 221 circuit. every graph that has a a Hamiltonian path. we are left with a path. there is no known criterion we can apply to determine the existence of a Hamiltonian circuit in general. Thus a general graph rna iliB8~~ parallel edges and selfloops before looking for a an circuit in it. however. Dodecahedron and its graph shown with a Hamiltonian This problem. Hence i t inclUde a se'1floop or a set of parallel edges. 29 HAMILTONIAN PATHS AND CIRCUITS 31 Dodecahedron (a) (b) Fig. such as those shown in Figs. Hamilton made a regular dodecahedron of wood [see Fig.~(N €fth) traverses every vertex exactly once. is still unsolved. many with Harniltoni paths that have no Hamiltonian circuits ( Hamiltonian path (if it exists) in a connected In considering the existence of a Hamilt circuit (MSRrSJQMeed only consider simple graphs. and one of many such routes (a Hamiltonian circuit) is shown by heavy lines. This is because miltonia21'l1r. The graph of the dodecahedron is given in Fig. Clearly. The puzzle was to start from any city and find a route along the edge of the dodecahedron that passes through every city exactly once and returns to the city of origin.
three. the is n . See Problem 112.I)/2. 222 has a Hamiltonian circuit (or Hamiltonian path).1 in a complete graph G of n vertices. 223 Complete graphs of two. we can start from V I so on to vn' and finally from Vn to VI. 223. four. 2 (a) (b) Fig. Of i Hamiltonian circuits in a graph. three. shown in Fig. and five vertices are shown in Fig. the number of ed . Since every vertex is joined with every other vertex through one edge. between any two vertices. sometimes also referred to as a universal graph or a clique. The determi edgedisjoint Hamiltonian circuits (or paths) in a unsolved problem. It is easy to construct a Hamiltonian circui vertices. Complete Graph: A simple graph in which there exists an edge between every pair of vertices is called a complete graph. A complete graph is • • Fig. Complete graphs of two. See Problem 224. What general class of graphs is guaranteed to have a Hamiltonian circuit? Complete graphs of three or more vertices constitute one such class. and five vertices. However. four. This is Number of Hamiltonian Circuits in a G more than one Hamiltonian circuit. Let the vertices be numbered V" V2. Also in G is n(n . 222 Graphs without Hamiltonian circuits.32 PATHS AND CIRCUlTS CHAP.
3 Fig. Every seating arrangemen Hamiltonian circuit. The first day of their meeting they can si Hamiltonian circuit z/. if they ber must have different neighbors..1)/2 edges. The second day..". .1)/2.1)/2 edgedisjoint Hamiltonian circuits. (n ."vustructa graph to another member y by an edge between x and Since every member is allowed to sit next to a plete graph of nine verticesnine being the n nd the \l6iRtSlQItI. and a Hamiltonian circuit in G consists of n edges.y a around the table. Observe that each rotation produces a Hamiltonian circuit that has no edge in common with any of the previous ones. rotate the polygonal pattern clockwise Proof: 5 n 2 4 n .1). all edge disjoint from the one in Fig. can be shown as follows: The subgraph (of a complete graph of n vertices) in Fig.1)/2 edgedisjoint Hamiltonian circuits. the number of edgedisjoint Hamiltonian circuits in G cannot exceed (n . THEOREM graph with odd number of vertices is given by Theorem 28 In a complete graph with n vertices there are (n .. That there are (n . Keeping the vertices fixed on a circle. introduced in Chapter 1.SEC. n IS by 360/(n . Thus we have (n .3)/2· 360/(n . • This theorem enables us to solve the problem of the at a round table. as follow Representing a member x by a vertex and the . when n is odd. . if n is an odd number > 3. Hamiltonian circuit. 3· 360/(n . 224 odd.. 224 and also edge disjoint among themselves. with an entirely different set of ed on~~!~~ .. Hence the theorem.. we have to fi cuit H2 in G.1).. 29 HAMILTONIAN PATHS AND CIRCUITS 33 cuits in a complete 28.1). A complete graph G of n vertices has n(n .. 2· 360/(n . 224 is a Hamiltonian circuit. Therefore.3)/2 new Hamiltonian circuits.1) degrees.
and then picking the sho value of n. is: THEOREM HI and H2 are edgedisjoint 29 A sufficient (but by no means necessary) condition for a simple graph G to have a Hamiltonian circuit is that the degree of every vertex in G be at least n/2.3 from the third.2 from the second.. where n is the number of vertices in G. This graph has numerous Hamiltonian circuits. of course) Hamiltonian circuits in a complete graph of n vertices can be shown to be (n . say). Theoretically. These being independent choices. TRAVELINGSALESMAN PROBLEM A problem closely related to the question of Hamiltonian circuits is the travelingsalesman problem. The total number of different (not edge disjoint. although many attempts have been m applications in operations research. with every edge e. only four such arrangements exist among nine people. 210. if each of the cities has a road to every other city. From Theorem 28 the number of edgedisjoint Hamiltonian circuits in G is four. Proof: For proof the reader is referred to the original paper by Dirac [23]. and we are to pick the one that has the smallest sum of distances (or weights). n . the labor involved is too great solving it for the 50 state capitals in the U ni The problem is to prescribe a manageable est route. 2 Hamiltonian circuits. and so on. w(eJ being the weight of edge e. w(eJ_ Such a graph is called a weighted graph.1) !f2. obtained by G. Another interesting result on the question of existence of Hamiltonian circuits in a graph. there is associated a real number (the distance in miles. divided by tonian circuit has been counted twice. we get (n of choices. This follows from the fact that starting from any vertex we have n .I edges to choose from the first vertex. In this graph. in what order should he travel so as to visit every city precisely once and return home.1)!/2 Hamiltonian ci traveled in each.34 PATHS AND CIRCUITS CHAP. A. we have a complete weighted graph. Given the distances between the cities. stated as follows: A salesman is required to visit a number of cities during a trip. Dirac. There are also available . with the minimum mileage traveled? Representing the cities by vertices and the roads between them by edges. however. In our problem. therefore. the problem of the traveling sal by enumerating all (n . n . some speci been worked out (see [21]). This number is. No efficient algorithm for problems found. we get a graph.
7. Many physical problems can be represented by graphs and solved by observing the relevant properties of the corresponding graphs. Chapters 1 and 2. paths. 5. Hamiltonian path Fig. Chapters 2 and 3. 4. Ore [19].3. Chapter 7. Various types of walks discussed in this chapter are summarized in Fig. circuits. Hamiltonian paths. Ore [110]. 225. 3. 11. Walks. 2 REFERENCES 35 of solution that give a route very close to the shortest one. but do not guarantee the shortest (see [24] for such a method). and 6. and Hamiltonian circuits in a graph G are its subgraphs with special properties. Chapters 1. The arrows point in the direction of increasing restriction.CHAP. . Busacker and Saaty [12]. 225 Different types of Hamiltonian REFERENCES Textbooks listed in Chapter mended are 1. A given graph G can be characterized and studied in terms of the presence or absence of these subgraphs. and 17. 2. Chapters 1 are to be read f 1. SUMMARY In this chapter we discussed the subgrapha graph that is part of another graph. Harary [15]. Berge [11]. Euler lines.
26. Math. "The Shortest Generalized Hamiltonian Tree. 1965. "A Problem Regarding the Tracing of Graphs. London Math. T. Deo and Hakimi [22] generalized the Hamiltonianpath problem and applied it to a wiring problem in computers. Oxford. S. 27. W. 48. T. Toronto. A. 29. Ser. 1966..M. 23. 1946. University of Illinois. T. 226(a) and (b) are isomorphic. HAKIMI. 44. "Connectivity Theorems for Graphs. and G. 2 6." Am.36 PATHS AND CIRCUITS CHAP. Vol. DIRAC. and G. 1952. (a) Fig. Chapters 4 and 5 of Tutte's book [29] are also devoted to paths and Euler paths. Vol. N. 20. Vol. and Dirac [23]. PROBLEMS 21. 1968. "Note on Hamilton Circuits.." Proc. University of Toronto Press.22452269. 171174.. HARARY. B. 1941. and W. 67. Chapter 2. Soc. Smith and Tutte [27].. 226 . TUITE. G. (2)." BSTJ.. Seshu and Reed [113]. Vol. 210." Operations Res." J.. 1960. 25. 23 are isomorphic to (a). 21." Quart J. Elementary Math. The Traveling Salesman Problem: A " Survey. L. 22. 23. Vol. and S. 16. For arbitrarily traceable graphs.. Math. ORE. 0. LIN.. C. ORE. 6. WILCOX.233237. Additional information on properties of Hamiltonian graphs can be found in papers by Tutte [28]. 28. 55. step by step. In an excellent survey Bellmore and Nemhauser [21] summarize and list most of these papers. TUITE.1961. DEO. one should read Ore's paper [25]. 0. 24. 22 are isomorphic. Verify that the two graphs in Fig. Connectivity in Graphs.. Show by redrawing. 879888. Vol.. Monthly. L. that graphs (b) and (c) in Fig. Scand. Label the corresponding vertices and edges. Vol. Vol. 'Iv." Am. W. On the travelingsalesman problem there are many papers... 22. NEMHAUSER. Monthly. A.4953.F. 1965. Third Annual Allerton Coni. "On Unicursal Paths in a Network of Degree Four. 3. 98101.4151. 538558." Rev. SMITH. BELLMORE. Math. TUITE.. 1967. "Computer Solution of the Traveling Salesman Problem. Show that the two graphs in Figs. 21." Math. Ore [26].."Boolean Operations on Graphs. "On Hamiltonian Circuits.
214. there must be at least one vertex common between gl and s». '3 kllERSIQNf ~U .5) nM. Prove that a graph with n vertices satisfying the condition of Problem 211 is (a) simple. Prove that a connected graph G remains connected after removing an edge ei from G. (1. Prove If the intersection of two paths is a disconnec two paths has at least one circuit. 26. 1. In a graph G let P I and P2 be two different paths that PI EB P2 is a circuit or a set of circuits in G.z.CHAP.) Is it possible to move a knight on a chessboard such e 220.2)]/2 edges. 29. iR~~et~~~.3). and (b) has exactly n . Give the length of each of these paths. e . 216. . Prove that a simple graph with n vertices must be connected if it has more than [en . (Hint: Use Theorem 23. 219. (2. Given the set of cubes represented by the graph in Fig. (2. and c be three distinct vertices in a b and also there is a path between band c.1)(n .ll(t~riMJfR'p{ :1{ ~Ifat one 'nl{~~er on a 0 possibility of arranging the tiles in a connect title always touches the same number on its ne : Use a fivever~~ complete graph and see if it is an Euler graph. PROBLEMS 37 24. (1. 211. (1. 25. all of degree two. 218.4).5). the 0'1 have the f!AflQ~eNQots: You are given a topiece domino set whose (1.1 edges. Draw a connected graph that becomes disconnected when any edge is removed from it. 2 Construct three more examples to show that conditions are not sufficient for isomorphism between graphs. 25(a). and 3 in Section 21 Prove that any two simple connected graphs with n vertices. 213. 227 27. is it possible to stack all four cubes into a column such that each side shows only one color? Explain. 212. if and only if e. is in some circuit in G. 2.2). 26. Are the two graphs in Fig. are isomorphic. Group the paths listed in Problem 214 into sets of edgedisjoin strate that the union of two edgedisjoint paths between a circuit. 215.) Prove that if a connected graph G is decomposed into two subgraphs gl and s».3). b. show . Let a. What is the length of the path from the entrance Problem 17? to the center of the maze in List all the different paths between vertices 5 and 6 in Fig. 227 isomorphic? Why? Fig. (2. 210.4). 217. 28.
) Prove that a graph G with n vertices always has a Hamiltonian path if the sum of the degrees' of every pair of vertices Vi. For Fig. Vj in G satisfies the condition d(Vi) 228. of all the edges incident at a vertex only two can be included in a Hamiltonian circuit. (Hint: Look for a Hamiltonian circuit in the graph of Problem 16. [Hint: For Fig. Count the number of edges that have to be excluded.] Show that the graph of a rhombic dodecahedron (with eight vertices of degree three and six vertices of degree four) has no Hamiltonian path (and therefore no Hamiltonian circuit). Is it possible. Discuss how you would schedule the tournaments to finish in the shortest possible time. 222. You will find that 13 edges must be excluded from Fig. give one such tour.38 PATHS AND CIRCUITS CHAP. 223. to move a knight such that it occupies every square exactly once and returns to the initial position? If so. Draw a graph in which an Euler line is also a Hamiltonian say about such graphs in general? circuit. 224. 2 221. 222(b). The number of remaining edges is insufficient to form a Hamiltonian circuit. + d(vj) >n  1. Then use induction on path length in G. 227. 222 has a Hamiltonian path (and therefore no Hamiltonian circuit). show that in a dancing ring of n children it is always possible to arrange the children so that everyone has a friend at each side if every child enjoys friendship with at least half the children. Draw a graph that has a Hamiltonian path but does not have a Hamiltonian circuit.) 229. 222(a). Using the result of Problem 228. 222(a). starting from any of the 64 squares of the chessboard. missible move exactly once? A move between two squares is counted as one regardless of the direction in which it is made. 226. Observe that there can be no path longer than a Hamiltonian path (if it exists) in a graph. (Hint: Is the graph of Problem 16 un icursal ?) A roundrobin tournament (when every player plays against every other) among n players (n being an even number) can be represented by a complete graph of n vertices. Show that neither of the graphs in Fig. What can you 22S. first consider all vertices of degree two. (Hint: First show that G is connected. .
our t It follows immediately from the defini . that is. In studying any new branch of mathematics. 32. having neither a selfloop nor form circuits). deferring the applications to more complex scientific problems till Chapter 12. Unavoidably. The second part of the chapter introduces the spanning treeanother important notion in the theory of graphs. in a graph are explored. especially for those interested in applications of graphs. there is no way to avoid new terms and definitions. Other graphtheoretic terms related to trees will also be introduced and discussed. As pointed out in Chapter 1. TREES A tree is a connected graph without any circuits. three. for instance. As usual. a graph m and therefore so must a tree. In the first half of this chapter we shall define a tree and study its properties. The relationships among circuits. graph. The 39 . 31. Trees with one. We have excluded such an enti as we are considering only finite graphs. two.3 TREES AND FUNDAMENTAL CIRCUITS The concept of a tree is probably the most important in graph theory. and so on. Some authors a any vertices. this chapter also has a large number of definitions. trees. is a tree. we shall point out some of its applications to simple situations and puzzles and games. Trees appear in numerous instances. in Fig. as with Chapters 1 and 2.
·I Fig. and four vertices. Fig. two. 33 Decision tree.40 TREES AND FUNDAMENTAL CIRCUITS CHAP. 31 Tree. three. 32 Trees with one. . 3 u Fig.
32. 32 SOME PROPERTIES OF TREES 41 represented by means of a tree (in fact the term tree comes from/amity tree). Figure 33 might represent the flow of mail. depending on the most significant digit. representing a dichotomy. N9. Such a decision tree with two choices at each vertex occurs frequently in computer programming and switching theory. each representing a unique fivedigit zip code. The sorting of mail according to zip code and the sorting of punched cards are done according to a tree (called decision tree or sorting tree).SEC. and so on. and the mail is divided into 10 piles Nh N2. The union of these two paths will contain a circuit and T cannot be a tree. such as large or small. Let us first obtain a few simple but important theorems on the general properties of trees. Proof: Since T is a connected graph. T. • THEOREM 33 VERSION ADDS NO A tree with n vertices has n . Each pile is further divided into 10 piles according to the second most significant digit. b such that there and b. We shall deal with such trees and their applications in Section 35. All the mail arrives at some local office. Therefore. A circuit in a graph (with two or more at least one pair of vertices a. and No. 0 or I. G is a tree. Proof: The theorem will be proved by inducti . The most significant digit in the zip code is read at N. Proof: Existence of a path between every pair of connected. Since G has one and only one path bet wee have no circuit. SOME PROPERTIES OF TREES THEOREM 31 There is one and only one path between every pair of vertices in a tree. till the mail is subdivided into lOs possible piles. vertex N. A river with its tributaries and subtributaries can be represented by a tree. Now suppose that between two vertices a and b of T there are two distinct paths. Tn many sorting problems we have only two alternatives (instead of 10 as in the preceding example) at each intermediate vertex.1 edges. good or bad. • Conversely: THEOREM 32 If in a graph G there is one and only one path between every G is a tree. there must exist at least one path between every pair of vertices in T. ••• .
there is no other path between Vi and Vj except ek. Furthermore. the minimum needed is n . 3 T Fig. otherwise. 34 Tree T with n vertices.1. A connected graph is said to be minimally connected if removal of anyone edge from it disconnects the graph. Thus T . 2. • THEOREM 34 Any connected graph with n vertices and n . Therefore. Therefore.ei is connected. A minimally connected graph cannot have a circuit. implies that G is not a tree. Assume that the theorem holds for all trees with fewer than n vertices.2 edges (and n vertices). t i and t z. as shown in Fig. we could remove one of the edges in the circui graph connected. a connected graph G is not minimally connected ei in G such that G . Let us now consider a tree T with n vertices. each contains one less edge than the number of vertices in it.42 TREES AND FUNDAMENTAL CIRCUITS CHAP. 34. 32). In T let ek be an edge with end vertices Vi and V t. Hence the followi THEOREM 35 A graph is a tree if and only if it is minimal The significance of Theorem 35 is obvi to interconnect n distinct points. Thus a minimally connected graph . It requires no background in el EGISTERED VERSION . Both these trees. and therefore. Proof' 35).e k consists of exactly two components. and since there were no circuits in T to begin with. It is easy to see that the theorem is true for n = 1.1 edges is a tree. by the induction hypothesis. ADDS NO % . have fewer than n vertices each. each of these components is a tree. deletion of ek from T will disconnect the graph.ek consists of n . The proof of the theorem is left to the reader as an exercise (Problem You may have noticed another important feature of a tree: its vertices are connected together with the minimum number of edges.1 edges. and 3 (see Fig. Hence T has exactly n . T .According to Theorem 31.
1 edges which is disconnected.SEC. gl and g2. which is not possible. • The results of the preceding six theorems can be summarized by saying that the following are five different but equivalent definitions of a tree. G is connected and has n 3. In that case G will consist of two or more circuitless components. Since there was no path between VI and V2 in G. We showed that a connected graph with n vertices and without any circuits has n .1 edges. and no circuits is connected. 33 PENDANT VERTICES IN A TREE 43 e Fig. Without loss of generality. according to Theorem 35. or 4. adding e did not create a circuit. PENDANT VERTICES IN A TREE ADDS NO WATERMARK n in the figures haCl of You must have observed that each of the t several pendant vertices (a pendant vertex was O e dr . that to short (electrically) n pins together. or 1 edges. because of Theorem 33. let G consist of two components. a graph G with n vertices is called a tree if I. G is circuitless and has n  1 edges. Add an edge e between a vertex VI in gl and V2 in g2 (Fig. Thus G u e is a circuitless.e.1 pieces of wire. it is a tree). a tree) of n vertices and n edges. We can also show that a graph with n vertices which has no circuit and has n . is a tree. That is. n .. THEOREM 36 A graph G with n vertices.35 Edge e added to G = s.e.. 35). in the following theorem. There is exactly one path between every 5. U g2. 33. one needs at least n .1 edges is always connected (i. G is connected and is circuitless. or 2. G is a minimally connected graph. Proof' Suppose there exists a circuitless graph G with n vertices and n .1 edges. The resulting structure. connected graph (i.
increasing sequences in 4. Given a sequence of integers.1) degrees to be divided among n vertices. The reason is that in a tree of n vertices we have n . in which the vertices (except the start in the sequence. Each is of length four. 11. I.8. 3 Start II II II II Fig.11). there are at The following problem is programming. (4. Since no vertex can be of zero degree. 13. and the path from the start describes the monotonically increasing su shown in Fig. and hence 2(n .44 TREES AND FUNDAMENTAL CIRCUITS CHAP. 1. we must have at least two vertices of degree one in a tree. one).8.0. 36 Tree of the monotonically 13.2.7.7.1 11). This of course makes sense only if n > 2.1 edges. 11. this sequence contains four 1 ing subsequences. An Application: .7. find the largest monotonically increasing subs sequence given to us is 4.3. that is. (1. 2.8. 7. 8. More formally: THEOREM 37 In any tree (with two or more vertices). Such a tree used in to as a data tree by computer programmers. 36. 0.
c." so we must define distance before we can talk of a center. For instance. g. this function must satisfy certain requirements. 37. e) and (b. e)./). 37 has four vertices. and so on. (a.) For instance. b) = I. there are generally several paths between a pair of vertices. in the tree of Fig. and (b. (b.. e). the distance d(vj. 34 DISTANCE AND CENTERS IN A TREE 45 34. Before we can legitimately call a function lex. (a. In a connected graph G. dia. There are two shortest paths./). some of the paths between vertices VI and V2 in Fig. The definition of distance between any two vertices is valid for any connected graph (not necessarily a tree). These are A Metric: g Fig. the number of edges in the shortest path) between them. Inherent in the concept of a center is the idea of "distance. the determination of distance is much easier. k). (b. since there is exactly one path between any two vertices (Theorem 31). . plore this idea further and see If In a tree there exists a "center" (or centers).SEC. g. dia. h). Hence d(vH v2) = 2. 38 are (a.38 Distance between VI and V2 is two. In a tree. i. y) of two variables a "distance" between them. c. Intuitively. DISTANCE AND CENTERS IN A TREE The tree in Fig. (b./). (There may be several shortest paths. We shall exa d b c Fig. Vj) between two of its vertices Vi and Vj is the length of the shortest path (i. each of length two. c) = 2.37 Tree. d(c. We have to enumerate all these paths and find the length of the shortest one. In a graph that is not a tree. it seems that vertex b is located more "centrally" than any of the other three vertices.e. b) = I.
Symmetry: 3. and E(d) = 2. z) + fez. Konig [1theorem: THEOREM 39 § 3 #REGISTERED ~ 0 VERSION Every tree has either one or two centers. 3 3 3 Fig 39 a tree. On the other hand. y) = ° CHAP. Some authors refer to such centers as bicenters. Coming back to our original topic of relative location of different vertices in a tree. VjEG A vertex with minimum eccentricity in graph G is called a center of G. E(b) = 1. E(v) = max d(v.46 TREES AND FUNDAMENTAL CIRCUITS I. The eccentricities of the four vertices in Fig. in a graph that consists of just a circuit (a is a center. Hence this tree has two centers. Since d(vj. that is. [(x. Theeccentricity E(v) of a vertex v in a graph G is the distance from v to the vertex farthest from v in G. let us define another term called eccentricity (also referred to as associated number or separation) of a vertex in a graph. inequality: [(x. . y) <[(x. The eccentricity of each of its six vertices is shown next to the vertex. x). y) for any z. A function + THEOREM 38 The distance between vertices of a connected graph is a metric. Triangle [(x. in general. has For example. 39. 37 are E(a) = 2. E(c) = 2. that satisfies these three conditions is called a metric. we shall call them just centers. consider the tree in Fig. The reader can easily verify that a graph. Hence vertex b is the center of that tree. however. vJ. This tree has two vertices having the same minimum eccentricity. Vj) is the length of the shortest path between vertices Vj and "» this path cannot be longer than another path between v. Nonnegativity: 2. y) = fey. That the distance d(vj' Vj) between two vertices of a connected graph satisfies conditions I and 2 is immediately evident. I n the case of a tree. Therefore. and Vi' which goes through a specified vertex vk. 3 if and only if x = y. Hence d(vj' v) < d(vj' vk) d(Vk' v). and[(x. because there will be no occasion for confusion. y) > 0.
310) u (which is the center of T) or an edge (whose end vert Thus the theorem. Delete all t resulting graph T' is still a tree. Proof: The maximum distance. max d(v. 310 Finding a center of a tree. • 47 . from other vertex Vi occurs only when Vi is a pendant ver us start with a tree T having more than two verti more pendant vertices (Theorem 37).6 6 6 c 6 5 4 5 3 T (a) • 4 r 3 • 2 (b) c • 3 • 4 T' • 2 • (c) c • 2 T" c • o Center (d) Fig. What about the A little deliberation will reveal that removal of all reduced the eccentricities of the remaining vert Therefore. Vi). all vertices that T had as centers wi T' we can again remove all pendant vertices and this process (which is illustrated in Fig.
we know that all the members can be reached by any member. 311 Rooted trees with four vertices. For instance. we see that if a tree T has two centers. represents how close v is to the farthest member of the group. We will show the root enclosed in a small triangle. vertex c should be the leader of the group. All rooted t are shown in Fig. 35. 3 COROLLARY From the argument used in proving Theorem 39. Similarly. in Fig. Hence N can be considered the root of the tree. E(v). Generally. Radius and Diameter: If a tree has a center (or two centers). on the other hand. does it have a radius also? Yes. 310(a). For instance. The eccentricity of each vertex. A Sociological Application: Suppose that the communication among a group of ]4 persons in a society is represented by the graph in Fig. if closeness of communication were the criterion for leadership. 310(a). . from where all the mail goes out. either directly or through some other members. ROOTED AND BINARY TREES A tree in which one vertex (called the root) is distinguished from all the others is called a rooted tree. and so the tree is rooted.48 TREES AND FUNDAMENTAL CIRCUITS CHAP. 310(a) is three. the radius of the tree in Fig. is defined as the length of the longest path in T. in Fig. for emphasis they are sometimes call trees) to differentiate them from the rooted kind. The group cannot afford to lose any of the communication links. In a diagram of a rooted tree. the two centers must be adjacent. 31 I. It is left as an exercise for the reader (Problem 36) to show that a radius in a tree is not necessarily half its diameter. The diameter of a tree T. the term tree mea However. 33 vertex N. ~ REGISTERED % Fig. is distinguished from the rest of the vertices. In Fig. Since the graph is connected. The eccentricity of a center (which is the distance from the center of the tree to the farthest vertex) in a tree is defined as the radius of the tree. But it is also important to note that the graph is a treeminimally connected. the root is generally marked distinctly. where the vertices represent the persons and an edge represents the communication link between its two end vertices. 36 the start vertex may be considered as the root of the tree shown.
the number of edges in T equals 2[P 1 + 3(n . hence = n+l 2 . Hence n is odd. This is because there is exactly one vertex of even degree. 312 A 13vertex. One of the most straightforward applications of binary trees is in search procedures. since they are extensively used in the study of computer search methods.p 1) + 2] = p n 1. and variablelength binary codes. 312. Each vertex of a binary tree represents a test with two possible Level 0 Fig. this vertex serves as a root. we are talking about trees with three or more vertices. 35 ROOTED AND BINARY TREES 49 Binary Trees: A special class of rooted trees. and each of the remaining vertices is of degree one or three (Fig. Then n . respectively. Let p be the number of pendant vertices in a binary tree T. (31) that the number of internal vertices in a binary tree is one less than the number of pendant vertices.p . (Obviously. fourlevel binary tree is shown in Fig. if Vi is at a distance of I.1 is the number of vertices of degree three. It follows from Eq.I is even. 3. Therefore. is of particular interest. binary identification problems. called binary rooted trees. Thus the root is at level O. and 4 are 2. 312). 2. A binary tree is defined as a tree in which there is exactly one vertex of degree two. 2. 2. n . (31) A nonpendant vertex in a tree is called an internal vertex. Two properties of binary trees follow directly from the definition: 1. A I3vertex. Since from Theorem 11 the number of vertices of odd degrees is even.SEC. Thus every binary tree is a rooted tree. from the root. The number of vertices at levels 1.) Since the vertex of degree two is distinct from all other vertices. In a binary tree a vertex Vi is said to be at level I. and the remaining n . . and 4.1 vertices are of odd degrees. 4. 4level binary tree. The number of vertices n in a binary tree is always odd.
12) . to construct a binary tree for a given n such that the farthest vertex is as far as possible from the root. 3 outcomes.50 TREES AND FUNDAMENTAL CIRCUITS CHAP. Therefore. for a given number of vertices n. there can be only one vertex (the root) at level 0. On the other hand. we must have exactly two vertices at each level. [max. except at the 0 level. of any vertex in a binary tree is called the height of the tree. the vertex farthest from the root is as close to the root as possible. at most two vertices at levell. We start at the root. where further tests are made. binary trees realizing both these extremes are shown in Fig. and so on. 313. It is easy to see that the minimum possible height of an nvertex binary tree is min lmax = [log. Clearly. max lmax = nl 2 . (32) where fnl denotes the smallest integer greater than or equal to n. at most four vertices at level 2. and so on.11 (a) Fig.313 Two llvertex binary . Therefore. Level Level o o 2 3 minImax = [t log. Reaching a specified pendant vertex (the goal of the search) terminates the search. the maximum number of vertices possible in a kIevel binary tree is The maximum level. (n + 1)  11. For such a search procedure it is often important to construct a binary tree in which. (33) For n = 11. and the outcome of the test at the root sends us to one of the two vertices at the next level.
05.5.•.. Only pennies. where t is the time with Fig. by a sequence of tests. The importance of the path length of a tree lies in the fact that this quantity is often directly related to the execution time of an algorithm.15. The path length of the binary tree in Fig. and quarters can go through the slot.I) yields the minimum path length for a given max n. For example. Let us assume that the probabilities of a coin being a penny.15. It can be shown that the type of binary tree in Fig.. and a quarter are .1 such tests. not all possible tests may be a or they may not albO consume the same time. every pendant vertex vJ of a binary tree has associated with it a positive real number wj• Given WI' WZ. for example. A Coke machine is to identify. W3 = . The solution is the expected time is I.e. the coin that is put into the machine. 312. for which the expected ti structing a binary tree with minimum weighte [36]. respectively. and . In this problem of a Coke machine.3. 313(a) (i. . known as the path length (or external path length) of a tree. respectively. This quantity. Weighted Path Length: In some applications. Let us illustrate the significance of this problem with a simple example. 35 ROOTED AND BINARY TREES 51 In analysis of algorithms we are generally interested in computing the sum of the levels of all pendant vertices. .5. what sequence of tests will minimize the expected time taken by the Coke machine to identify the coin? The solution requires the construction of a binary vertices (and therefore three internal vertices) v .SEC. dimes. The path lengths of trees in Figs. 314(b). 313(a) and (b) are 16 and 20.05. Wz = . 'nWAlftaRNrARK sible. nickels.7t. Wm the problem is to construct a binary tree (with m pendant vertices) that minimizes where I. If the time taken for each test is the same. quantity L: liWi is minimized. Thus for four coins we have 23 . . Binary trees with minimum weighted path length e:~~?t. is the level of pendant vertex "» and the sum is taken over all pendant vertices.30. many . is 1+ 3 + 3+ 4+4+4+ 4 = 23. a dime. a tree with 2/ 1 vertices at levellmax . a nickel. . Each test has the effect of partitioning the four types of coins into two complementary sets and asserting the unknown coin to be in one of the two sets. such that sponding weights WI = . can be defined as the sum of the path lengths from the root to all pendant vertices.i~tfr{{~#S e .
••• . + § g. .7 2: w.. see [36]. (b) =2 (a) Fig.RED ~0 2k v~ ~ REGISTERED +VJtRSION ADDS NO ~ % 1 e = l(sum of degrees) = = 3k + 1. where the letters of the alphabet (A. . B. Arthur Cayley discovered trees while he was trying to count the number of structural isomers of the saturated hydrocarbons (or paraffin series) CkH2k+2• He used a connected graph to represent the CkH2k+2 molecule. Thus the prob . 3 Dime or Nickel penny 0. Z) are represented by binary digits.52 TREES AND FUNDAMENTAL CIRCUITS CHAP. The total number of vertices in su n and the total number of edges is = 3k + 2.15 0. it is a tree. Since different letters have different frequencies of occurrence (frequencies are interpreted as weights WI' W2. Corresponding to their chemical valencies. a carbon atom was represented by a vertex of degree four and a hydrogen atom by a degree one (pendant vertices).314 Two binary trees with weighted pendant vertices. • I. = 1. a binary tree with minimum weighted path length corresponds to a binary code of minimum cost.05 0.5 0. C. ON COUNTING TREES In 1857.. W26). ~S\E. For more on minimumpath binary trees and their applications the reader is referred to [35] and [37]. Since the graph is connected and the number number of vertices.. • I.3 2: w. constructing variablelength binary codes. 36.
The first question Cayley asked was: what is the number of different trees that one can construct with n distinct (or labeled) vertices? If n = 4.SEC. 36 ON COUNTING TREES 53 isomers of a given hydrocarbon becomes the problem of counting trees (with certain qualifying properties. If there A B A B A B A B c A D c A D c A D c A D B B B B c A D c A D c A D c A D B B B B c A D B c D . 315. as in Fig. the four graphs in the first row in Fig. 315. we have 16 trees. The reader can satisfy himself that there are no more trees of four vertices.) A graph in which each vertex is assigned a unique name or label (i.. (Of course. The distinction between a labeled and an unlabeled graph is very important when we are counting the number of different graphs. 315 are counted as four different trees (even though they are isomorphic) only because the vertices are labeled. no two vertices have the same label). For instance.e. some of these trees are isomorphicto be discussed later. as shown in Fig. to be sure). for instance. is called a labeled graph.
316(a). C. each representing a carbon atom. 315 will reveal that the number of unlabeled trees with four vertices (no distinction made between A. It may be noted in passing that the four trees in the first row of Fig. Proof. B. or D. 316 All trees of four . In this tree no distinction can be made between vertices. Since the vertices representing hydrogen are pendant. (a) Fig. THEOREM 310 The number of labeled trees with n vertices (n > 2) is nn2. C. A careful inspection of the graphs in Fig. In addition to the constraints on the degree of the vertices. 315 are isomorphic to the one in Fig. The following wellknown theorem for counting trees was first stated and proved by Cayley. 316). C4H10' there are only two distinct trees (Fig. there are indeed exactly two different types of butanes: nbutane and isobutane. and hence make no contribution to isomerism. were no distinction made between A. The result was first stated and proved by Cayley. we need not show any hydrogen vertices. 2.54 TREES AND FUNDAMENTAL CIRCUITS CHAP. 316(b). these four trees would be counted as one. two observations should be made: 1. We will give one proof in Chapter 10. and therefore it is unlabeled. and D) is only two. and the other 12 are isomorphic to Fig. Unlabeled Trees: In the actual counting of isomers of CkH2k+2. Theorem 310 is not enough. Thus for butane. Many different proofs with various approaches (all somewhat involved) have been published since. An excellent summary of 10 such proofs is given by Moon [39]. Thus the tree representing CkH2k+2 reduces to one with k vertices. But first we shall continue with counting labeled trees. Therefore. and is therefore called Cayley's theorem. B. they go with carbon atoms only one way. As every organic chemist knows.
Out of these trees we are particularly interested in certain types of trees. A given graph has numerous subgraphsfrom e edges. If G has a circuit. Thus a disconnected graph with k components has a spanning forest consisting of k spanning trees. Each component (which by definition is connected) of a disconnected graph. This will still leave the graph connected (Problem 210). Now we shall study the tree as a subgraph of another graph. because a tree is always connected. repeat the operation till an edge from the last circuit is deletedleaving a connected. It is to be noted that a spanning tree is defined only for a connected graph. If G has no circuit. For instance. circuitfree graph that contains G. This is why a spanning tree is sometimes referred to as a skeleton or scaffolding of G. 37 SPANNING TREES 55 The problem of counting trees of different types will be taken up again and discussed more thoroughly in Chapter 10. Since spanning trees are the largest (with maximum number of edges) trees among all trees in G. it is its own spanning tree. and in a disconnected graph of n vertices we cannot find a connected subgraph with n vertices. it is a sort of skeleton of the original graph G. delete an edge from the circuit. the subgraph in heavy lines in Fig. called spanning treesas defined next. 2e distinct combinations are possible. 317 is a spanning tree of the graph shown. SPANNING TREES So far we have discussed the tree and its properties when it occurs as a graph by itself. 37.SEC. does have a spanning tree.) Finding a spanning tree of a connected graph G is simple. it is also quite appropriate to call a spanning tree a maximal tree subgraph or maximal tree of G. Thus we have . however. Obviously. A tree T is said to be a spanning tree of a connected graph G if T is a subgraph of G and T contains all vertices of G. If there are more circuits. some of these subgraphs will be trees. Since the vertices of G are barely hanging together in a spanning tree. (A collection of trees is called a forest.
and from Theorem 33. what is the minimum number of elements we must remove to eliminate all circuits in the network? The answer is e . d these plots are full of water. An edge in a spanning tree Tis called a branch of T.56 TREES AND FUNDAMENTAL CIRCUITS CHAP. An edge of G that is not in a given spanning tree Tis called a chord. Similarly. while edges Cl. 8.. b3. An edge that is a branch of one spanning tree TI (in a graph G) may be a chord with respect to another spanning tree T2• It is sometimes convenient to consider a connected graph G as a union of two subgraphs. C3. edges b. It must be kept in mind that branches and chords are defined only with respect to a given spanning tree. C2. C4' CS' C6. For example. where T is a spanning tree. 317. t THEOREM 312 With respect to any of its spanning trees. b4. are branches of the spanning tree shown in Fig. From the definition. it is quite appropriately referred to as the chord set (or tie set or co tree) of T. T U T= G. Since the subgraph is the collection of chords. T and T.n + I chords. a connected graph of n vertices and e edges has n . If we have an electric network with e elements (edges) and n nodes (vertices). and T is the complement of Tin G. the following theorem is evident. Any other spanning tree will yield the same numbers. b3. + § #REGISTERED ~ 0 VERSION ADDS NO . how many walls will have to be b water can be drained out? Here n = 10 and e =:c:c 15. the graph in Fig. For instance.I tree branches and e . b2. and Cs are chords. has six tree branches and eight chords with respect to the spanning tree fbi' b2. C7. 3 THEOREM 311 Every connected graph has at least one spanning tree. In electrical engineering a chord is sometimes referred to as a tie or a link. bs. and b. that is. bs. if we have a farm consisting of six walled plots of land. b4. e = 14).n I. 317 (with n == 7. as shown in Fig. b6}.
e. (Needless to mention. and k are independent. The nullity of a graph is also referred to as its cyc/omatic number. Immediately following comes e. the first thing he is most likely to mention is n. it may be observed here that rank of G = number of branches in any spanning tree (or forest) of G. the number of components G has. n > k. and the nullity. creates an additional path. defined as ° rank nullity r=nk J. nullity of G = number of chords in G.) From these three numbers are derived two other important numbers called rank and nullity. 38 FUNDAMENTAL CIRCUITS 57 a set of six (15 . the number of edges in a component can be no less than the number of vertices in that component minus one. the number of vertices in G. Apart from the constraints n . e .n + k > 0.k.n + 1. and hence a circui it is not difficult to prove THEOREM ADDS NO 313 A connected graph G is a tree if and only if add) vertices in G creates exactly one circuit. e > n . G is connected. these numbers alone are not enough to specify a graph. If k = 1. 3. 38.k > and e . the number of edges in G.I) a circuit is created. Moreoever.I. This i one path between any two vertices of a tree. How are these three numbers of a graph related? Since every component of a graph must have at least one vertex. in Fig. The rank of a connected graph is n . Therefore.10 + 1 = 6) walls such that the remaining nine constitute a spanning tree. .SEC. Rank and Nullity: When someone specifies a graph G. and they are fundamental numbers in graphs. rank + nullity = number of edges in G. Although the real significance of these numbers will be clear in Chapter 7. Then k. except for trivial cases. these three numbers n. or first Betti number. Breaking these six walls will drain the water out. n = e + k.l . FUNDAMENTAL CIRCUITS You may have noticed that if we add an edge a tree (say.
Adding anyone chord to T will create exactly one circuit. c2l has not only the fundamental circuits we just mentioned. only eight are fundamental circuits. FINDING ALL SPANNING TREES OF A Usually. which fortuitously are a lot easier to track. bs. fb2. but it has also a third circuit. Now suppose that we add both chords C I and C2 to the tree. b. which has one circuit (fundamental circuit). 319). What Kirchhoff showed. from the fundamental circuit b c h d jus . formed by adding a chord to a spanning tree. 317 (enumerated by computer). which now every sophomore in electrical engineering knows. b3. How many circuits does a graph have in all? We know that one circuit is created by adding anyone chord to a tree. Although there are 75 circuits in Fig. Two comments may be appropriate here. each formed by one chord (together with the tree branches). b6. of some fundamental circuits. C Il. we would have obtained a different fundamental circuit. b4. we get a subgraph [bl' b2. + s. in a given connected graph there trees. 3 Let us now consider a spanning tree T in a connected graph G. cll. Such a circuit. First. Add a forms a fundamental circuit (b c h d in Fig. C1. Adding CI to it. b4. s. b6l in Fig. but only in a set of fundamental circuits. A given circuit may be fundamental with respect to one spanning tree. c2l.. b3. b6..n k). Jl (= e . The concept of a fundamental circuit. How many fundamental circuits does a graph have? Exactly as many as the number of chords. bs. In many applications we require all way to generate spanning trees of a graph is tree. Although the number of fundamental circuits (as well as the total number of circuits) in a graph is fixed. 31 say c. bs. 39. b3. but not with respect to a different spanning tree of the same graph. in most applications we are not interested in all the circuits of a graph. The rest of the circuits (as we shall prove rigorously in Chapter 7) . fbI' C I' c2l. introduced by Kirchhoff. Suppose that we add one more chord. is of enormous significance in electrical network analysis. a circuit is a fundamental circuit only with respect to a given spanning tree. b3. which is not a fundamental circuit. say tree TI (a b cd in Fig. 317. [bl' b2. Second. is called afundamental circuit. is that no matter how many circuits a network contains we need consider only fundamental circuits with respect to any spanning tree.58 TREES AND FUNDAMENTAL CIRCUITS CHAP. Will it create exactly one more circuit? What happens if we add all the chords simultaneously to the tree? Let us look at the tree [bl' b2. the circuits that become fundamental change with the spanning trees. The subgraph [bl' b2. b4. Had we added the chord C2 (instead of C I) to the tree.
Then. Thus we have a procedure for generating spanning trees for any given graph. Therefore. 319 Graph and three of its spanning trees. For ins Let T. EB TJ be the ring sum of two defined in Chapter 2. the topological analysis of a linear electrical network essentially reduces to the generation of trees in the corresponding graph. 10. but not in b of edges in a graph g. The procedure outlined above raises many questions. 39 FINDING ALL SPANNING TREES OF A GRAPH 59 c d c d h Fig. after generating these three trees. The distance between two spanning trees T. or in T. and II.SEC. instead of deleting branch c. spanning tree Tz• This generation of one spanning tree from another. as the number of edges of G present in one tree distance may be written as d(Ti' Tj). As we shall see in Chapter 13. is there a preferred arting? Let us try to answer some of these questions. through addition of a chord and deletion of an appropriate branch.f. Can we start from any spanning tree and get a desired spanning tree by a number of cyclic exchanges? Can we get all spanning trees of a given graph in this fashion? How long will we have to continue exchanging edges? Out of all possible spanning trees that we can start with.) In the above procedure. (Such a transformation is a standard operation in the iteration sequence for solving certain transportation problems. or g) and repeat the process of obtaining a different spanning tree each time a branch is deleted from the fundamental circuit formed. we could have deleted d or b and thus would have obtained two additional spanning trees abc h and a c h d. each with chord h in it. T. Moreover. finding an efficient procedure for generating all trees of a graph is a very important practical problem. is called a cyclic interchange or elementary tree transformation. . EB T. others wil il Chapters 7. and add a different chord (e. we can restart with T. from definition. is the subgr G that are either in T.
EB T) < r. T act. == Tj. j Tj) REGISTERED tree W#SION rating % The concept of a central tree is useful in graph. we know that no more than fl edges of a spanning tree T. Also. THEOREM 314 The distance between the spanning trees of a graph is a metric. we can obtain every spanning tree of G by successive cyclic exchanges. tral trees the reader should see [31] and [34]. Tj) is the minimum number of cyclic interchanges involved in going from T..e. Tree Graph: The tree graph of a given graph alAQQSrNQyen 4NJfTeRMARK CJO e .) < max d(T. air. if p. The reader is encouraged to prove the following two theorems. TJ > 0 and j} d(1t. 1'. in general. Since in a connected graph G of rank r (i.. where min(p" r) is the smaller of the two numbers p. 3 It is not difficult to see that the number d(T. can be replaced to get another tree T'. T). is the nullity of G. T j} k} t «r. T < act. the rank of G. = 0 if and only if T. we have the following results: The maximum distance between any two spanning trees in G is max d(T. of r + I vertices) a spanning tree has r edges. A central tree in a graph is. T THEOREM = air.. to T'. That is. Hence combining the two. T) i}.60 TREES AND FUNDAMENTAL CIRCUITS CHAP. 315 Starting from any spanning tree of a graph G. and Central Tree: For a spanning tree To of a gra ~ denote the maximal distance between To and Then To is called a central tree of G if max i «r.. it satisfies d(T. Tj) = 2" max I N(T.
Vn through a network of roads.) The problem is then to find the least expensive network that connects all n cities together. all spanning trees have a weight of n . The cost cij of building a direct road between Vi and Vj is given for all pairs of cities where roads can be built. be a spanning tree in G satisfying the hy there is no spanning tree at a distance of one from . Let T.. in a graph of n vertices in which every edge has unit weight. If graph G is a weighted graph (i.. Thus the problem of connecting n cities with a least expensive network is the problem of finding a shortest spanning tree in a connected weighted graph of n sary and sufficient condition for a spanning tree to be THEOREM 316 £"~ . connected) graph is connected.e. a spanning tree in a graph G is a minimal subgraph connecting all the vertices of G.) A spanning tree with the smallest weight in a weighted graph is called a shortest spanning tree or shortestdistance spanning tree or minimal spanning tree. From Theorem 315 we know that starting from any spanning tree we can obtain all other spanning trees through cyclic interchanges (or elementary tree transformations). 310. (There may be several spanning trees with the smallest weight. the reader should see [33]. Therefore.1 units. For additional properties of tree graphs. Among all the spanning trees of G. tree (of G) if and only if there exists no other one from T whose weight is smaller than that of Proof: The necessary or the "only if" conditi get another tree shorter than T by a cyclic inte is also sufficient is remarkable and is not obvious. for instance. n. one with the smallest weight is of practical significance. and each edge corresponds to a cyclic interchange between the spanning trees of G represented by the two end vertices of the edge. the tree graph of any given (finite. One possible application of the shortest spanning tree is as follows: Suppose that we are to connect n cities VI' V2. ••• .. SPANNING TREES IN A WEIGHTED GRAPH As discussed earlier in this chapter. we can always remove some edges and get a connected graph with smaller weight.. 310 SPANNING TREES IN A WEIGHTED GRAPH 61 which each vertex corresponds to a spanning tree of G.. In general. if there is a real number associated with each edge of G).SEC. (There may be pairs of cities between which no direct road can be built. different spanning trees of G will have different weights.. It is immediately evident that this connected network must be a tree: otherwise. then the weight of a spanning tree T of G is defined as the sum of the weights of all the branches in T. A spanning tree T(of a given weighted con .
and it satisfies the condition of Theorem 316. Let this be Vi' ~exrtegah1 the tree with vertices VI> Vk. This argument can be repeated. Continue until n . Then for each successive step select (from all remaining edges of G) another smallest edge that makes no circuit with the previously selected edges. and Vi' as one subg dW. • Algorithm for Shortest Spanning Tree: There are several methods available for actually finding a shortest spanning tree in a given graph. producing a series of trees of equal weight.e.iTERWhA~ Let us now illustratt. One algorithm due to Kruskal [38] is as follows: List all edges of the graph G in order of nondecreasing weight. is due to Prim [310]. no spanning tree shorter than T exists in the graph. Consider an edge e in T2 which is not in Ti. Hence the spanning tree T. but not all. violating the assumption that T2 is shortest).0 until all n vertices have been connected by n this method of finding a shortest spanning tree. t_dr\~e e . Ti. This proves that if none of the spanning trees at a unit distance from T is shorter than T. T 1. and these edges will constitute the desired shortest spanning tree.62 TREES AND FUNDAMENTAL CIRCUITS CHAP. the weight of TI will also be equal to that of T2• Let T2 be a shortest spanning tree in G. both by hand and by computer. Clearly.bj). has the same weight as T i. = (T1 Ue . For Prim's algorithm. (Note that the entries in the table are spect to the diagonal. iS~1S~R~tf1% 'z ~. 3 The proof will be completed by showing that if T2 is a shortest spanning tree (different from Tl) in G. Because of the minimality assumption on T 2 weight of bj cannot be less than that of e.Adding e to Ti forms a fundamental circuit with branches in Tl• Some. to a vertex other than VI that has jfn'tJ:~IWrf1try among all entries in rows I and k). T2 must also satisfy the hypothesis of the theorem (otherwise there will be a spanning tree shorter than T2 at a distance of one from T2. of the branches in Ts that form the fundamental circuit with e may also be in T2. ••• . The validity of the method follows from Theorem 316. obtained from T 1 through one cycle exchange. say vk. and subgtViDRSKlftl. T 1..'f:fow consider VI and vk as one subgraph. draw n isolated vertices and label them VI' V2 •••• . Another algorithm. select a smallest edge of G.vn' Tabulate the given weights of the edges of G in an n by n table. and the diagonal is empty. say bj. Start from vertex VI and connect it to it vertex which has the smallest entry in row I ble). Next.1 edges have been selected. which does not require listing all edges in order of nondecreasing weight or checking at each step if a newly selected edge forms a circuit. must form some fundamental circuit (with respect to T 2) containing e. until we get T 2 itself.But T 1 has one edge more in common with T 2. each a unit distance closer to T 2. because of the assumption on T1• Amongst all those edges in this circuit which are not in T 2 at least one.sest neighbor (i. Therefore bj must have the same weight as e.) existent edges (corresponding to those pairs of cit' road can be built) as very large. each of these branches in TI has a weight smaller than or equal to that of e.
a vertex u.I. The resulting treea shortest spanning treeis shown in Fig. For instance. Thus. I < d(vJ < n . one may be required to wire together n pins (using as little wire as possible) with no more than three wires wrapped around any individual pin. We start with VI and pick the smallest entry in row I. can end up with any degree.5 12 7 9 v2 v3 v2 v4 Vs v6 95 oo oo 7 7 oo 8 8 10 17 19. v2) in that sequence. In some practical cases an upper limit on the degree of every vertex (of the resulting spanning tree) has to be imposed.] The closest neighbor of subgraph (VIl vs) is V 4' as can be seen by examining all the entries in rows 1 and 5. in an electrical wiring problem.SEC. 320(a). The weight of its edges is tabulated in Fig. DegreeConstrained Shortest Spanning Tree: In a shortest spanning tree resulting from the preceding construction. 320(a) in heavy lines. 320(b). in this particu d(vJ <3 Such a spanning tree is called a degreeconstra In general. find a shortest spanning tree d(vJ < k for every If k = 2. Let us pick (vpvs)' [Had we picked (VI' v2) we would have obtained a different shortest tree with the same weight. this problem. 310 SPANNING TREES IN A WEIGHTED GRAPH 63 V6 VI V2 V3 V4 Vs Vs 10 VI 10 10 16 II 16 9.5 12 (b) 7 9 (a) Fig. 320 Shortest spanning tree in a weighted graph. that is.5 II oo 10 oo oo 17 19. and (v3. The three remaining edges selected following the above procedure turn out to be (V4' v6). the problem may be stated as neeted graph G. in fact. A connected weighted graph with 6 vertices and 12 edges is shown in Fig. reduces to the pro Hamiltonian path. (V4' v3). as well as the travelingsal .5 units. which is either (VI' v2) or (vI' vs). The weight of this tree is 41.
COTTAFAVA.64 TREES AND FUNDAMENTAL CIRCUITS CHAP. and fundamental circuits will continue to appear from time to time in most of the succeeding chapters. and in [32]. and tree graphs. studied by Cummins [33]. trees form the most important topic in graph theory. Finding all spanning trees of a given graph is of great practical importance. branches and chords.37. Berge [11]. For treatment of distance between refer to Deo [34] and Amoia and Cottafava [31]. Kruskal's [38] and Prim's study of shortest spanning trees.622. 2. Because of their wide applications. For counting trees of of Riordan's book [311]. Invariance Pro " Trans. Ore [110]. Chapters 4. July 197 . Chapter 4. REFERENCES Every textbook on graph theory has a chapter or two on trees. 13. Especially recommended are 1. Of special interest are those trees that are subgraphs of a given connected graph G containing all vertices of G. 31. Different types of trees. spanning trees. radius. such as centers. and so is the problem of finding a shortest spanning tree in a given weighted graph. So far. The importance of trees in information storage and processn book [37]. Such trees are called spanning trees of G. pages 305422. such as labeled and unlabeled. No. Trees. were discussed. Sections 2. SUMMARY This chapter dealt with a particular type of connected graph called a tree. were also introduced and studied. On algorithms for genera in this book and the references cited there. 4. Chapter 3. AMOIA. and diameter of a tree.36. Sections 18. 3 salesman returning to his home base). 3. fundamental circuits. Circuit Theory. and 631. and also see references given' elegant algorithm for finding a binary tree with minim given by Huffman in [36]. Other related concepts.5. together with their properties and applications. Ore [19]. and Appendix 3. and 16. Appendix 3 in Harary's with n < 10.619.4. 5. distance between spanning trees. no efficient method of finding an arbitrarily degreeconstrained shortest spanning tree has been found. cyclic interchange. Harary [15]. Vol. V. 15.4 and 6. discussed at the end of Chapter 2. CT18.. Busacker and Saaty [12]. and G. rooted and unrooted. Moon [39] g formula for counting trees. Chapters 12.26. rank and nullity of a graph.
. and 5.R. J. No... which you may use coins.E. New York. 37. 312. 3..] Sketch all spanning trees of the graph in Fig. Draw all unlabeled rooted trees of n vertices for n = 1. 1966. Explain. Vol." IEEE Trans. 1956. 1049. L. Draw all trees of n labeled vertices for n = 1. "Shortest Connection Networks and Some Generalizations. 310. Madison. Circuit Theory. Mass. March 1966. The Art of Computer Programming... C. Reading. 40. John Wiley & Sons. 36. 1.. Nov." ".. Inc.4.. March 1970. 7078. C6 Suppose you are given eight coins and are told that weight. 35. 1967. 10981101. (F. Math. 39. . R. "Hamiltonian Circuits in Tree Graphs. I. 38. W. Draw the other four. 1968.CHAP. 36. Inc. Vol. and 5. forming coin. Vol.. 1. . Math. 33. 35.4850. New York. 3. 7.. Vol. 3 PROBLEMS 65 32. Harary.. 1952. Vol. AddisonWesley Publishing Company. Soc.. "Various Proofs of Cayley's Formula for Counting Trees. "A Central Tree. 310.. 311.. B.1.. 4.4. or problems) that can be represented by trees.. 439440. No. 33. Circuit Theory.R. N. Cite three different situations (games." Proc. Under what condition does this inequality hold? Elaborate. CT13. also in SIAM J. L. and one coin is either heavier or lighter t with an equalarm balance. 37. 2. A. Rinehart and Winston. . "A Method for the Construction of MinimumRedundancy Codes. No. Sept.D.. 313. Vol. . and two of them are shown in Fig. T. New York. Hu. Draw all trees of n unlabeled vertices for n = 1.. CT13. D. 1971. and 5. Observe that level 0 has exactly one level 2 can have either two or four vertices. Sketch a strategy in the form of a .) Machine Intelligence. DEO. It can be shown that there are only six different (nonisomorphic) Two such trees are given in Fig. ed. and A. Jr. 34. 21. An Introduction to Combinatorial Analysis.. C." IEEE Trans.. KNUTH. COLLINS. University of Wisconsin.J. PROBLEMS 31. Show that a path is its own spanning tree... 311. "On the Shortest Spanning Subtree of Graph and the Traveling J Salesman Problem." Bell System Tech. CUMMINS. activities. 3. Appl. RIORDAN.4.514532." Proc." MRC Report No. E. Vol." Chapter II in A Seminar on Graph Theory.J. Vol."Optimal Binary Search Tree. Inc.. . 34. 39. KRUSKAL. MICHIE(eds. Am. MOON. Holt. American Elsevier N Publishing Company.. 38.2.4. and D.. Prove Theorem 34. Dec. 32.. 36. 24. Show a tree in which its diameter is not equal to twice the radius. Inc. trees of six vertices. HUFFMAN. C. 1967. [Hint: Distribute the 11 vertices levels. 1958. as well as for finding out whether Sketch all (unlabeled) binary trees with six of each. PRIM. 13891401.8290.. 21. TUCKER. How many isomers does pentane CSH12 have? Hexane.. 1957.). Dec.2.
Is it also true that any arbitrary edge of G is a chord for some spanning tree of G? Suggest a method for determining the total number of spanning trees ofa connected graph without actually listing them. Can you construct a graph if you are given all its spanning trees? How? Prove that the nullity of a graph does not change when you either insert a vertex in the middle of an edge. Prove thatany given edge of a connected graph G is a branch of some spanning tree of G. 330.B"J:. other ed~ilj){)50M(i)t no 333.) Suppose that you are given a set of n positive integers. Show that the distance between two spanning trees as defined in this chapter is a metric. Prove that there exists a spanning tree T in G such that the distance of every vertex from v is the same both in G and in T. 324. (This fact is expressed by the statement that the chromatic number of a tree is two. but not in T2. What is the nullity of a complete graph of n vertices? Show that a Hamiltonian path is a spanning tree. List all fundamental circuits with respect to this new spanning tree. State some necessary conditions of this set so that the set can be the degrees of all the n vertices of a tree. L. 315) 323. Prove that two colors are necessary and sufficient to paint all n vertices (n > 2) of a tree. 315. or remove a vertex of degree two by merging two edges incident on it. bs.e) U f and (T2 . ~A'I~RMt6B~O~ edges. t_dr\~e . Find a spanning tree at a distance of four from spanning tree {bI. Prove that any circuit in a graph G must have at least one edge in common with a chord set. prove that there exists another edge f in T2 but not in T. 314. 325. 3 Prove that a pendant edge (an edge whose one end vertex is of degree one) in a connected graph G is contained in every spanning tree of G. Show by constructing counterexamples that i cannot be said of the second smallest and the to a tree in Fig. such that no edge in the tree has both of its end vertices of the same color. Let T. 319. tree in G must contain e. 326. b6} in Fig. respectively. 321. _ q VERSION ian circu 332. 317. 317. such that subgraphs (T. b4. 322. observe t covered by R. 320. s weight is smaller than that of any other in G. TREES AND FUNDAMENTAL CIRCUITS CHAP. 316. A tree graph has at I and an arbitrary edge of a tree graph can be incl In a given connected weighted graph G. Are these conditions sufficient also? Let v be a vertex in a connected graph G. bs. 328. 329..Y:t u. b2. 327. In the tree graph obtained in Problem 329. . 318. t~'IS'ft. (J ~. Let G be a connected weighted graph in which If ei is the edge with weight greater than that shortest spanning tree in G will contain er. Prove that any subgraph g of a connected graph G is contained in some spanning tree of G if and only if g contains no circuit. edge belongs to some circuit. each corresponding of a labeled complete graph of four vertices. and T2 be two spanning trees of a connected graph G.f) U e are also spanning trees of G. Construct a tree graph (with 16 vertices. Prove Theorem 313. If edge e is in T. 331. Cummins)..66 313.
335. to find a shortest spanning tree in the graph of Fig.CHAP. Find the shortest spanning tree connecting these cities by using (a) Kruskal's method. Use the algorithm ofKruskal. . as outlined in this chapter. Compare their relative efficiencies. Pick 15 large cities in the United States and obtain the 105 intercity distances from an atlas. 3 PROBLEMS 67 334. and (b) Prim's method. 320(a).
. In this chapter we shall study the cutsetanother type of subgraph of a connected graph G whose removal from G separates some vertices from others in G. d}. in Fig. h}./}. because one of its proper subsets. For instance. CUTSETS In a connected graph G. 41. Edge f k} alone is also a cutset. A cutset always "cuts" a graph into two. h. The set of edges fa. t a cutset. h. c. To emphasize the fact that no proper subset some authors refer to a cutset as a minimal simple cutset. defined as a minimal set of edges in a conn the rank of the graph by one. 68 . 41 the set of edges fa. fa. d. c. separability. provided removal of no proper subset of these edges disconnects G. and fd./}. such as fa./} is a cutset. and vulnerability of graphs. c. Sometimes a cutset is also call the term cutset. Other related topics. e. a cutset is a set of edgest whose removal from G leaves G disconnected. b. on .4 CUTSETS AND CUTVERTICES In Chapter 3 we studied the spanning treea special type of subgraph of a connected graph Gwhich kept all the vertices of G together. The rank of t +Since a set of edges (together with their end verti set in G is a subgraph of G. fa. There are many other cutsets. Properties of cutsets and their applications will be covered. will also be discussed. g}. such as connectivity. b.
the properties of cutsets.1(a).f} connects vertex set {v" v2' v6} with {V3' V4. Cutsets are of great importance in studying properties of communication and transportation networks. is four. 41(a) cutset {a. REGISTERED VERSION J!DDS NO G and an arBitrary cut % cWAaiiSRMA/ti( would not disconClO ~. Is it possible for S not to have any answer is no. Suppose. SOME PROPERTIES OF A CUTSET Consider a spanning tree T in a co set S in G. c. vs}. 42 SOME PROPERTIES OF A CUTSET 69 g h V2 _t___4t f I / I I (a) (b) Fig. d. Therefore.41 Removal of a cutset fa. We look at all cutsets of the graph.) Since removal of any edge from a tree breaks the tree into two parts. removal of the cutset nect the graph. we shall return to their ~ 42. Another way of looking at a cutset is this: if we partition all the vertices of a connected graph G into two mutually exclusive subsets. Otherwise. For example. t_dr\~e e . d. in Fig. stance. (Note that one or both of these two subsets of vertices may consist of just one vertex. 4.SEC.I(a) represent six cities connected by telephone lines (edges). the city represented by vertex V3 can be network by the destruction of just one edge. 4. and the one with the smallest number of edges is the m 'g. f} from a graph "cuts" it into two. that the six vertices in Fig. 41(a). We wish to find out if there are any weak spots in the network that need strengthening by means of additional telephone lines. for example. every edge of a tree is a cutset. one less than that of the graph in Fig. c. a cutset is a minimal number of edges whose removal from G destroys all paths between these two sets of vertices.
. N(S Ii T) = 0. If all the vertices in r are entirely within vertex set VI (or V2). . Q is a minimal set of edges whose removal from G disconnects G..] If. some vertices in r are in VI and some in V2. Proof: Consider a cutset S in graph G (Fig.Q. let Q be a minimal set of edges containing at least one branch of every spanning tree of G. G . any edge e from Q returned to G . on the other hand.Q is disconnected (one component of which may just consist of an isolated vertex)./ / ".. Consider G .... we traverse ...70 CUTSETS AND CUTVERTICES CHAP. Hence + THEOREM 42 In a connected graph G. an even nurnber... Also. Thus the subgraph G .. N(g) stands for the number of edges in .Q contains no spanning tree of G. S .l ". the number of edges common to Sand r is zero. traversed along t Fig... Will the converse also be true? In other words.. 4 THEOREM 41 Every cutset in a connected graph G must contain at least one branch of every spanning tree of G. 42 Circuit and a cutset t As in Chapter 3. THEOREM 43 Every circuit has an even number of edges in common with any cutset. by definition.. any minimal set of edges containing at least one branch of every spanning tree of G is a cutset. Let the removal of S partition the vertices of G into two (mutually exclusive or disjoint) subsets VI and V2• Consider a circuit T in G. This. by the following reasoning: In a given connected graph G. Since the subgraph G ..Q will create at least one spanning tree. 42). since Q is a minimal set of edges with this property. V. the subgraph that remains after removing the edges in Q from G.. will any minimal set of edges containing at least one branch of every spanning tree be a cutset? The answer is yes. that is.__ .Q e will be a connected graph.. is a cutset. .. \ \ I I \ I I \ \ \ \. Therefore..
Cutset S will contain only one branch b of T. In the case of circuits. Sometimes a fundamental cutset is also called a basic cutset. Since fb} is a cutset in T. And since very edge in S has one end in VI and the other in V2. In Fig. For this purpose we list all cutsets of the corresponding graph. and we must have a systematic method of generating all relevant cutsets. • 43. 43 ALL CUTSETS IN A GRAPH 71 back and forth between the sets VI and V2 as we traverse the circuit (see Fig. and the cut set S in G that corresponds to this partition. Such a cutset S containing exactly one branch of a tree T is called a fundamental cutset with respect to T. and the rest (if any) of the edges in S are chords with respect to T. fb} partitions all vertices of T into two disjoint setsone at each end of b. 43 Fundamental cutsets of a . 41. the number of edges we traverse between VI and V2 must be even. Take any branch b in T. ALL CUTSETS IN A GRAPH In Section 41 it was shown how cutsets are used to identify weak spots in a communication net. so is a spanning tree essential for a set of fundamental cutsets. and find which ones have the smallest number of edges. Consider the same partition of vertices in G. It will be beneficial for the reader to look for the parallelism between circuits and cutsets. the number of edges common to Sand r is even.SEC. and no other edge in G has this property (of separating sets VI and V2). such as in Fig. a spanning tree \ \ I I \ \ d Fig. We shall follow a similar strategy here. we solved a similar problem by the simple technique of finding a set of fundamental circuits and then realizing that other circuits in a graph are just combinations of two or more fundamental circuits. Just as a spanning tree is essential for defining a set of fundamental circuits. Fundamental CutSets: Consider a spanning tree T of a connected graph G. It must also have become apparent to you that even in a simple example. Because of the closed nature of a circuit. 42). 43. there is a large number of cutsets.
4 T (in heavy lines) and all five of the fundamental cutsets with respect to T are shown (broken lines "cutting" through each cutset). e. Just as every chord of a spanning tree defines a unique fundamental circuit.72 CUTSETS AND CUTVERTICES CHAP. EB {f. every branch of a spanning tree defines a unique fundamental cutset. Othe disjoint union of cutsets. e. k} = {d. 44(a) and (b)]. g. h}. e. Example: In Fig. 44(c). there are no edges outside SI EB S2 that join vertices in Vs to those in V6• Thus the set of edges S. c. It must also be kept in mind that the term fundamental cutset (like the term fundamental circuit) has meaning only with respect to a given spanning tree.f} = = {d. Let VI and V2 be the (unique and disjoint) partitioning of the vertex set V of G corresponding to SI' Let V3 and V4 be the partitioning corresponding to S2' Clearly [see Figs. e. which is the same as V2 EB V3• See Fig.f. g. g. 43 let us consider ring su of cutsets. The ring sum of the two cutsets S I EB S2 can be seen to consist only of edges that join vertices in Vs to those in V6• Also. k} union of cutsets. Now we shall show how other cutsets of a: graph can be obtained from a given set of cutsets. h} g. VI U V2 = = V and V and VI V3 U V4 V3 n n V2 = 0. Outline of Proof: Let SI and S2 be two cutsets in a given connected graph G. {d. {a. V4 = 0.f} {a. h} EB {b. let the subset (VI n V3) u (V2 n V4) be called V6. e. Now let the subset (VI n V4) u (V2 n V3) be called Vs. b} EB {f. c.f}. EB S2 produces a partitioning of V into Vs and V6 such that Hence S I EB S2 is a cutset if the subgraphs containin connected after SI EB S2 is removed from G. {d. e. h. and this by definition is the same as the ring sum Vi EB V3• Similarly. THEOREM 44 The ring sum of any two cutsets in a graph is either a third cutset or an edgedisjoint union of cutsets. .
. we cannot start with any two cutsets in a given graph and hope to obtain all its cutsets by this method. hI' h2.. . W minimal set of cutsets from which we can obtain every c ring sums? The answer (to be proved in Chapter 6) is tal cutsets with respect to a given spanning tree. ••• . 44 fUNDAMENTAL CIRCUITS AND CUTSETS 73 (a) ~ ._. and let the fundamental circ sisting of k branches b. in addition graph G.Qon REGISTERED VERSION ~ % cWAcre'RMsARK respect to T... Obviously. hk} is a fundamental eire Every branch of any spanning tree has a fundamental e ~~ o e ./ . \ \ _ / /' I I I (b) (c) Fig.. I \ I / / / .. So we have a method of generating additional cutsets from a number of given cutsets... ••• . c.. 44. r = tc.. '" . 44 Two cutsets and their partitionings. // ~. h2.SEC.. FUNDAMENTAL CIRCUITS AND CUTS Consider a spanning tree T in a given con with respect to T.~~ a chord ade by ct4K1t{1't!lt/tI. L~k.. b.
is one of the chords C I' C2. h.cq} is a fundamental cutset with respect to T. k}. 43. and b. h. e. k}.f}. cq• Exactly the same argument holds for fundamental cutsets associated with b2. {f.. Otherwise (since none of the branches in T are in S'). Thus the chord c. e. b3. S. Is it possible for the chord c. ••• and b. that is. and k are determined by branch e: determined by branch h: determined by branch k: Chord f occurs in each of these three fundam other fundamental cutset that contains f Th also true. c. e. g { 46 ADDS NO With respect to a given spanning tree T. shown in heavy lines. the chord Ci is contained in every fundamental cutset associated with branches in r. a contradiction to Theorem 43. in Fig. h. that determines a fundamental circuit r occurs in every fundamental cutset associated with the branches in r and in no other. a chord c. As an example. Let S 1 be the fundamental cutset associated with b I' consisting of q chords in addition to the branch b 1 . common to S I and r. ••• . Because of Theorem 43. THEOREM rd. ••• . Thus we have an important result. Therefore. The fundamental circuit made by chord f is [f. we must have two edges b I and c. consider the spanning tree {b. and in no others. of course) besides those associated with bp b2. ? The answer is no. . THEOREM 45 With respect to a given spanning tree T. there would be only one edge c. there must be an even number of edges common to rand Sl' Edge bl is in both rand St. to be in any other fundamental cutset S' (with respect to T.74 CUTSETS AND CUTVERTICES CHAP. and there is only one other edge in r (which is cJ that can possibly also be in SI' Therefore. common to S' and T. a mental cutset S is contained in every fundamen chords in S. The three fundamental cutsets determined by the three branches e. = {bp Cp C2. 4 it. ••• .
c. k}. Vertex Connectivity: On examining the g although removal of no single edge (or even t Although we shall talk of edge connectivity and nected graph. 45 CONNECTIVITY AND SEPARABILITY 75 The proof consists of arguments similar to those that led to Theorem 45. and none of the remaining three fundamental circuits contains branch e. cpo Since none of the chords CI. h. e. ff. which is not possible. suppose that hi occurs in a fundamental circuit rp « 1 made by a chord other than c" C2. The two fundamental circuits determined by chords d and j are determined by chord d: determined by chord j: fd. 43. Hence the theorem.• . Branch e is contained in both these fundamental circuits. The fundamental cutset determined by e is [e. C2. h. • Turning again for illustration to the graph in Fig. and three. 45. cp is in rs+ I. k}. c. •.j}. e}. ••• . ••• . consider branch e of spanning tree fb. the edge connectivity of a connected the minimum number of edges whose removal rank of the graph by one. and let r 1 be the fundamental circuit determined by chord C1: Since the number of edges common to Sand r 1 must be even. . Let the fundamental cutset S determined by a branch hi be Proof. respectively. CpOn the other hand. The number of edges in the smallest c set with fewest number of edges) is defined as the Equivalently. hi must be in r I. some authors define both the edge a disconnected graph as zero. The same is true for the fundamental circuits made by chords C2. d. there is only one edge hi common to a circuit rp+ 1 and the cutset S. e.SEC. CONNECTIVITY AND SEPARABILITY Edge Connectivity: Each cutset of a connected graph G consists of a certain number of edges. C3. The edge connectivity The edge connectivities of the graphs in Figs.
and in Fig. or an articulation point. Note that from the way we have defined it vertex connectivity is meaningful only for graphs that have three or more vertices and are not complete. the vertex connectivity of a tree is one. The implication of the theorem is very crucial vertex in the sense that any communi presented a communication network) must" t Recall that removal of a vertex implies the vertex. two.76 CUTSETS AND CUTVERTICES CHAP. 4 Fig. the removal of the single vertex v does. That these two definitions are equivalent can be easily seen (Problem 47). 43.t Therefore. 45 the vertex v is a cutvertex. we define another analogous term called vertex connectivity. in Fig. respectively. the en in the graph. 75. It can be shown (Problem 418) that in a tree every vertex with degree greater than one is a cutvertex. 41(a) vertex V4 is a cutvertex. Separable Graph: A connected graph is said to be separable if its vertex connectivity is one. 45 Separable graph. The vertex connectivities of the graphs in Figs. All other connected graphs are called nonseparable. because without both the end vertices an edge when we delete or remove an edge from a graph. For example.t Again. a cutnode. . An equivalent definition is that a connected graph G is said to be separable if there exists a subgraph g in G such that g (the complement of g in G) and g have only one vertex in common. The vertex connectivity (or simply connectivity) of a connected graph G is defined as the minimum number of vertices whose removal from G leaves the remaining graph disconnected. tSee the footnote on p. and 45 are one. Moreover: THEOREM 47 A vertex v in a connected graph G is a cutvertex if vertices x and y in G such that every path between The proof of the theorem is quite easy and 417). graph. In a separable graph a vertex whose removal disconnects the graph is called a cutvertex. and one. 41(a).
45 CONNECTIVITY AND SEPARABILITY 77 Fig. 45 (although both consist of the same number of Jines16).SEC. and has vertex connectivity of one and edge connectivity of three. Proof: WATERMARK sV thf. In other words. construct a graph with n vertices and e edges that has the maximum possible edge connectivity and vertex connectivity. THEOREM 48 The edge connectivity of a graph G cannot exceed the the smallest degree in G. Let vertex Vi be the vertex with the smal the degree of 1'j. tunnels. • Proof: THEOREM 49 exceed The vertex connectivity of any graph G can ofG.I. The next question is what is the highest vertex and edge connectivity we can achieve for a given nand e? The following theorems constitute the answer. set Sin G with rx edges. Thus the network of Fig. e = 16. or any three lines destroyed. even after any three stations are bombed. It can easily be seen that the edge connectivity as well as the vertex connectivity of this graph is four. What is the best way of connecting? By "best" we mean that the network should be as invulnerable to destruction of individual stations and individual lines as possible. railroads. the remaining stations can still continue to "communicate" with each other. bridges. Graph with 8 vertices and 16 An Application: Suppose we are given n stations that are to be connected by means of e lines (telephone lines.ltlt§ntle[Jvity Let rx denote the edge connectivity of G. Let S partition the vertices By removing at most rx vertices from VI (or V2) on which t there exists a cutCJO e . respectively) can be drawn as shown in Fig. 45 has n = 8. For example. or highways) where e > n . Consequently. Another graph with the same number of vertices and edges (8 and 16. 46. 46 is better connected than that of Fig. 46 edges. Vertex Vi can be separated from incident on vertex 'I'i' Hence the theorem. the graph in Fig.
• COROLLARY Every cutset in a nonseparable least two edges.(n/2)· L2e/nJ edges arbitrarily.78 CUTSETS AND CUTVERTICES CHAP. for example.e.<2e vertex connectivity _ ed ge connectivity _ . The vertex connectivity of G cannot exceed this number. 49. but have is joineADQSINQge . and . Therefore. L2e/nJ. vertex connectivity POSSI ible = l2eJ ' Ii Thus.. a Iconnected graph is the same as a separable graph. THEOREM 41 1 A connected graph G is kconnected if and only if joined by k or more paths that do not intersect. except the two t secting paths or vertexdisjoint paths. +Paths with no common vertices. Proof: Every edge in G contributes two degrees. for a graph with 8 vertices and 16 edges (Figs. A graph G is said to be kconnected if the vertex connectivity of G is k. The completion of the proof is left as an exercise. ly if ever~ER>Stf!)Hs in that may intersect. 4 we can effect the removal of S (together with all other edges incident on these vertices) from G. one can first construct an nvertex regular graph of degree L2e/nJ and then add the remaining e . p no edges in common). and at least one pair of disjoint paths. THEOREM graph with more than two vertices contains at 410 The maximum vertex connectivity one can achieve with a graph G of n vertices and e edges (e > n . in light of Theorems 48 and 49. THEOREM 412 § REGISTERED ~ % The edge connectivity of a graph G is k if G is joined by k or more edgedisjoint paths (i. we can achieve a vertex connectivity (and therefore edge connectivity) as high as four (= 2· 16/8). that is. there must be at least one vertex in G whose degree is equal to or less than the number 2e/n.. To show that this value can actually be achieved. therefore. • The results of Theorems 48. t and at is joined by exactly k nonintersecting paths. Hence the theorem. The total (2e degrees) is divided among n vertices. 45 and 46). and 410 can be summarized n as follows: ivitv c. e . maximum .1) is the integral part of the number 2e/n.
that is. the lines are lossless. It is assumed that at each intermediate vertex the total rate of commodity entering is equal to the rate leaving.SEC. and so on. number of messages. number of cars. etc. the flow through a vertex is limited only by the capacities of the edges incident on it. Finally. The reader is encouraged to verify these theorems by enumerating all edgedisjoint and vertexdisjoint paths between each of the] 5 pairs of vertices in Fig. for example. the maximum amount of flow possible per unit of time. it is important to know the maximum rate of flow that is possible from one station to another in the network. 46 NETWORK FLOWS 79 The reader is referred to Chapter 5 of [15] for the proofs of Theorems 4] I and 4]2. The weight. B 3 2. The graph in Fig. 46. railroads. gas. Furthermore. This type of network is represented by a weighted connected graph in which the vertices are the stations and the edges are lines through which the given commodity (oil. In other words. 47 . 43.5 6 Fig. A special result of Theorem 4]] is that a graph G is nonseparable if and only if any pair of vertices in G can be placed in a circuit (Problem 4] 3). water. The capacity of each of these lines is also indicated in the figure. associated with each edge represents the capacity of the line. a real positive number.) flows. In other words. highways. NETWORK FLOWS In a network of telephone lines. 47. the vertex itself can handle as much flow as allowed through the edges. there is no accumulation or generation of the commodity at any vertex along the way. pipelines of oil (or gas or water). represents a flow network consisting of 12 stations and 31 lines. Note that our definition of kconnectedness is slightly different from the one given in [I5].
1ISOMORPHISM § #REGISTERED ~ % WAtlNERNlARtK b. For instance. (Sol1}f~WJ~the ents ~~~onn~ted ~. t_dr\~e e . In the subgraph G . the flow rate cannot exceed the minimum of their capacities. each bloc1t. answers the first question. 43 cutset [d.) The graph graph in Fig. To facilitate the statement and proof of the theorem. It requires some concepts that are to be introduced later. hJ is also a cutset with respect to V 1 and V6• But the cutset [J.e. from B to M in Fig. 47. 48 has five blocks (and three cutve eparabIMSSS/6/flach k. Since this holds for all cutsets with respect to a and b. h} is not a cutset with respect to V 1 and v6• The capacity of cutset S in a weighted connected graph G (in which the weight of each edge represents its flow capacity) is defined as the sum of the weights of all the edges in S.. perhaps the most important result in the theory of transport networks. The second question is answered implicitly by a constructive proof of the theorem. Hence the total flow rate between these two vertices cannot exceed the capacity of S. Therefore. every path in G between a and b must contain at least one edge of S. we shall use the term block. determine the actual flow through each edge when the maximum flow exists)? Theorem 413. Thus every flow from a to b (or from b to a) must pass through one or more edges of S. The proof will therefore be deferred till Chapter 14. g. let us define a few terms. 4 In such a flow problem the questions to be answered are I. A cutset with respect to a pair of vertices a and b in a connected graph G puts a and b into two different components (i. What is the maximum flow possible through the network between a specified pair of verticessay.e. in Fig. e.80 CUTSETS AND CUTVERTICES CHAP. 47? 2.f'] is a cutset with respect to VI and V6• The set [J. How do we achieve this flow (i. separates vertices a and b).. THEOREM 413 The maximum flow possible between two vertices a and b in a network is equal to the minimum of the capacities of all cutsets with respect to a and b. g. where flow pro d in much greater detail. S\E. but to avoid confusion with graph. and c).S (the subgraph left after removing S from G) there is no path between a and b.0 0" ~~ A separable graph consists of two or mo of the largest nonseparable subgraphs is called term component. Proof" Consider any cutset S with respect to vertices a and b in G. • To show that this flow can actually be achieved is somewhat involved.RED V.
\b / .... • • Fig. / . THEOREM 414 k of REGISTERED VERSION rable graphs are l~ % If Gland G2 are two Iisomorphic graphs. <. is shown enclosed by a broken line.. More formally: Two graphs Gland G2 are said to be Iisomorphic if they become isomorphic to each other under repeated application of the foil Operation I: "Split" a cutvertex into two vertices subgraphs.. Such graphs are said to be Iisomorphic. I "\ \ \ \ I I \ \ \ I <. I I I / / / "  " \ I' .. 48. Note that a nonseparable connected graph consists of just one block.SEC. " / Fig. These two graphs are certainly not isomorphic (they do not have the same number of vertices). From this definition it is apparent that tw isomorphic if and only if they are isomorphic. ~QQ~eJ)LQ of WATERMARK h G is "split" int<tl° ~. \ \ / /' _. whenever a cutvertex c.. / . t_dr\~e e . 48.. ' . " ".. 47 IISOMORPHISM 81 / / " . 49 Disconnected graph lisomorphic to Fig. 49 with the one in Fig. but they are related by the fact that the blocks of the graph in Fig. Visually compare the disconnected graph in Fig. 48 Separable graph with three cutvertices and five blocks .. 49. .. 48 are isomorphic to the components of the graph in Fig. t G2 and the nullity of G I equals the nullity of G2• Proof: Under operation 1..
graphs Iisomorphism is different from isomorphism are also Iisomorphic. since no edges are destroyed or new edges created by operation 1.82 CUTSETS AND CUTVERTICES CHAP. the graph in Fig. 48. 410. 2ISOMORPHISM In Section 47 we generalized the concept Iisomorphism. for separable graphs (i. 49 by "gluing" together two vertices (say vertex x to y)? We obtain the graph shown in Fig.e. • Fig. but Iisomorphic graphs generalized isomorphism is very useful in the stu . and 410 are Iisomorphic to one another . 410 are isomorphic to the blocks of the graph in Fig. 4 two vertices. the number of components in G increases by one. 48 and 49. Clearly. A graph G 1 was Iisomorphic t were isomorphic to the blocks of G2• Since a block. Since the blocks of the graph in Fig. Iisomorphism for nonseparable gra However. Therefore. the rank of G which is number of vertices in G . • What if we join two components of Fig. Thus the three graphs in Figs. 410 is Iisomorphic to the graph in Fig. Two graphs with equal rank and with equal numbers of edges must have the same nullity. 49.number of components in G remains invariant under operation 1. because nullity =:: number of edges . 48. two Iisomorphic graphs have the same number of edges. these two graphs are also Iisomorphic. 410 Graph 1isomorphic to Figs. 49.rank. Also.. 48.
From the definition it follows immediately that isomorphic graphs are always Iisomorphic. 48 2ISOMORPHISM 83 We can generalize this concept further to broaden its scope for 2connected graphs (i. G consists of a subgraph gland its complement g t such that gland g 1 have exactly two vertices. edges whose end vertices were x and y in G could have gone with g 1 or g l' without affecting the final graph. 41 I(a) and (d) are 2isomorphic. 411 2isomorphic graphs (a) . as follows: In a 2connected graph G let vertices x and y be a pair of vertices whose removal from G will leave the remaining graph disconnected. Note that in (a) the degree of vertex x is four. and Iisomorphic x y (a) (b) (c) Fig. x and y.Let vertices Xl and Y 1 go with gland X2 and Y2 with g l' Now rejoin the graphs gland g 1 by merging XI with Y2 and X2 with Y I' (Clearly. Operation 2: "Split" the vertex x into x 1 and X2 and the vertex y into y 1 and Y2 such that G is split into gland g i .e. Suppose that we perform the following operation 2 on G (after which..SEC. In other words. G no longer remains the original graph). 411 shows how the two graphs in Figs. graphs with vertex connectivity of two). For example. and Iisomorphic graphs are always 2isomorphic.) Two graphs are said to be 2isomorphic if they become isomorphic after undergoing operation I (in Section 47) or operation 2. Fig. or both operations any number of times. in common. But 2isomorphic graphs are not necessarily Iisomorphic. of course. but in (d) no vertex is of degree four.
obviously. the rank and nullity of a graph remain unchanged under operation 2. The fact that the rank r and nullity u are not enough to specify a graph within 2isomorphism can easily be shown by constructing a counterexample (Problem 423). except that the path between verti constituted a part of I"." Thus undergoing operation 2 retains its original graphs also have circuit correspondence. which is considered the most phic graphs. g I' and in that case r must include is unaffected by operation 2. Therefore. has a corresponding circuit in G2 formed by the corresponding edges of G2. 3. let us consider what happens to a circuit in a graph G when it undergoes operation 2. r 415 if and only if VERSION ADDS NO Two graphs are 2isomorphic Proof: The "only if" part has already been the theorem. lisomorphism. In case 3. r is made r is made r is made of edges all in gl' or of edges all in g l' or of edges from both gland both vertices x and y. and 2isomorphism are synonymous. Since in a separable graph G every circuit is confined to a particular block (Problem 415). And as shown in Section 47. is due to H. Similarly. every circuit in G retains its edges as G undergoes operation I (in Section 47). Hence Iisomorphic graphs have circuit correpondence. original edges. have circuit correspondence. A circuit r in G will fall in one of three categories: I. 4 graphs are not necessarily isomorphic. the rank or nullity of a graph does not change under operation I. Therefore. It is clear that no edges or vertices are created or destroyed under operation 2. The "if" part is more involved. and the original paper [47]. 2. isomorphism. as defined in this section. . Isomorphic graphs. Circuit Correspondence: Two graphs Gland G2 are said to have a circuit correspondence if they meet the following condition: There is a onetoone correspondence between the edges of Gland G2 and a onetoone correspondence between the circuits of Gland G 2' such that a circuit in G 1 formed by certain edges of G. is "flipped around. 2isomorphic graphs are equal in rank and equal in nullity. for graphs with connectivity three or more. However. THEOREM In cases I and 2. Theorem 415. and vice versa.84 CUTSETS AND CUTVERTICES CHAP. Whitney.
all graphs can be classified according to Fig. electrical networks. the ideas of 2isomo. 4 SUMMARY 85 As we shall observe in subsequent chapters. SUMMARY Our main concern in this chapter was with answering the following question about a connected graph: Which part of a connected graph. there was bound to be a close relationship between a spanning tree and a cutset. connectivity. In pursuit of the answer to the above question. cutvertices. when removed. a cutset separates the vertices. In contrast to a spanning tree (which keeps the vertices together). 412 Classification of graphs according to t . Some of the theorems (and the problems at the end of this chapter) describe this relationship between spanning trees and cutsets. In terms of the minimum number of vertices whose removal disconnects a graph. Many of the theorems showed relationships between these characteristics of a graph. All graphs Connected m~l Disconnected m=O m =:2 tm is the vertexconnectivit Fig.CHAP. and in duality of graphs. Some of these properties are of considerable significance both in theory and applications of graphs. 412.rphism and circuit correspondence play important roles in the theory of contact networks. we came across the concepts of cutsets. the answer to this question does specify a graph in many aspects and tells a great deal about it. Consequently. and so on. breaks the graph apart? Clearly.