This action might not be possible to undo. Are you sure you want to continue?
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 Cf 153 Path Matrix 156 Adjacency Matrix 157 Summary 162 References 162 Problems 162 8 COLORING. 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.
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 .
Now. 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.) In fact. the largest in the book. particularly among applied mathematicians and engineers. In 1957 there was exactly one book on the subject (namely. it almost always leads to large graphsgraphs that are virtually impossible to analyze without the aid of the computer. In proving have been given preference over nonconstruc II. there are over two dozen textbooks on graph theory. 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. 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 . and almost an equal number of proceedings of various seminars and conferences. I have emphasized the computational and algorithmic aspects of graphs. or complex variables. depending on the axe (or the pen) the author has to grind. in data structures. is devoted enti graph theory.PREFACE The last two decades have witnessed an upsurge of interest and activity in graph theory. in circuit layout. Clear evidence of this is to be found in an unprecedented growth in the number of papers and books being published in the field. or in social sciences). Konig's Theorie der Endlichen und Unendlichen Graphen). Each book has its own strength and points of emphasis. in operations research. sixteen years later.
and parts of ]5. This is done so that a student in almost any field can read and grasp the first half. and 13. Since there is more material here than what can be covered in a onesemester course. the book contains enough material for a course in "pure" graph theory. The level of presentation is appropriate for advanced undergraduate and firstyear graduate students in all disciplines requiring graph theory. Keeping this in mind. Operations Research: Chapters 19. 5. 1].xvi PREFACE approach has not been used in any of the earlier books on graph theory. Indeed. and different chapters require different backgrounds as they deal with applications to nontrivial. In fact. The second half of the book is more advanced. The material covered in Chapter II and in many sections from other chapters is appearing for the first time in any textbook. Chapters 10 through 15 have been made independent of each other.0 ine at the In tdr\~ . the book grew out of a number of such cou given by the author at the Jet Propulsion Labo University at Los Angeles. and parts of 10 and 15. it is suggested that the contents be tailored to suit the requirements of the students in different disciplines. a dear friend and former colleague at t Mr. 3. This portion requires no special background. I am particula Rubin. Mateti Prabhaker. the examples selected are short and mostly of the nature of puzzles and games. Although the illustrations of applications are interwoven with the theory even in this portion. The book is organized so that the first half (Chapters I through 9) serves as essential and introductory material on graph theory. Yet the applied and algorithmic aspect of this book has not been allowed to spoil the rigor and mathematical elegance of graph theory. ]2. provided the first nine chapters have been covered. and I]. 4. except some elementary concepts from set theory and matrix algebra and. Computer Science: Chapters ]9. 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. and I]. for example: 1. complex problems in different fields. One could study a later chapter without going through the earlier ones. Applied Mathematics: Chapters 111 and parts of 15. of course. a former graduate stu It is a pleasure to acknowledge tW ~71!'R1VPARK ~ opulsion Laboratoryc. 12. a certain amount of mathematical maturity. realworld. Electrical Engineering: Chapters 19. 2. 14. Introductory "pure" graph theory: Chapters 110.
Professor Nandlal Jhunjhunwala of California State University at Los Angeles. There is little doubt that without Kiran's help this book would not have been possible. L. Basu of the Indian Institute of Technology at Kanpur. Liu of the University of Illinois at UrbanaChampaign. Messrs. R. For the wife is considered a part of the husband. Mr. M. 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. Kanpur. G. [ am also grateful to the late Professor George E. George Shuraym of Texas Instruments. and the Computer Science Department of the University of Illinois at UrbanaChampaign. K. and Professors C. Forsythe of Stanford University for his encouragement at the very outset of this project. K. Marvin Perlman of the Jet Propulsion Laboratory. and students who read parts of the manuscript and made helpful suggestions are: Professor Harry Lass and Mr. Krishnamoorthy. Dr. S. Just as one does not thank himself.PREFACE xvii Institute of Technology. Support in writing this book was received from the Jet Propulsion Laboratory. Professor C. Jean A. Ramakrishnan. Mr. Other friends. M uthukrishnan and S. DeBeule of Xerox Data Systems. Nicholas Karpov of Bell & Howell. and her coauthorship is tacitly assumed in any book her husband writes. colleagues. the Indian Institute of Technology at Kanpur. NARSINGH DEO Kanpur . expressing gratitude to one's wife in public is not a Hindu custom.
.
we shall therefore use the term selfloop to avoid confusion).1 11. Edge e1 in Fig. in which the vertices are represented as points and each edge as a line segment joining its end vertices.• }. Such an edge having the same vertex as both its end vertices is called a selfloop (or simply a loop. 11 is a selfloop. The word loop. 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. e2. however. 11. E) consists of a set of objects V = {VI' V2' •. for instance. INTRODUCTION WHAT IS A GRAPH? A lineart graph (or simply a graph) G = (V. is a graph. has a different meaning in electrical network theory. •. Often this diagram itself is referred to as the graph. whose elements are called edges. such that each edge e k is identified with an unordered pair (Vi' V) of vertices. and another set E = {el. There is no such thing as 1 . Also note that Fig.. The object shown in Fig. Observe that this definition permits an edge to be associated with a vertex pair (Vi' vJ. } called vertices. tThe adjective "linear" is dropped as redundant in our we always mean a linear graph.
2 INTRODUCTION CHAP. .) a § b g. because incidence between edges and vertices is the same in both cases. A graph that has neither selfloops nor parallel edges is called a simple graph. it is immaterial whether the lines are drawn straight or curved. In some graphtheory literature. sometimes two edges may seem to intersect at a point that does not represent a vertex. It should also be noted that. Such edges are referred to as parallel edges. Such edges should be thought of as being in diffe having no common point. (Some authors break one a crossing to emphasize this fact. rv0 v~~ ~ REGISTERED VERSION ADDS NO % c point. for example. II. I3. edges e and f in Fig. Some authors use the term general graph to emphasize that parallel edges and selfloops are allowed. 1 the definition allows more than one edge associated with a given pair of vertices. 4 3 (a) 3 (b) Fig.. this is why our definition includes graphs with selfloops and/or parallel edges. a graph is defined to be only a simple graph. For example. 12 Same graph drawn differently. edges e4 and es in Fig. long or short: what is important is the incidence between the edges and vertices. in drawing a graph. In a diagram of a graph. for example. the two graphs drawn in Figs. but in most engineering applications it is necessary that parallel edges and selfloops be allowed. 12(a) and (b) are the same.
In this book we shall generally use the terms graph. as shown in Fig. 12 APPLICATIONS OF GRAPHS 3 A graph is also called a linear complex. The vertices represent the land areas and the edges represent the bridges. Two islands. Ocell. 14. It was a longstanding problem until solved by Leonhard Euler (17071783) in 1736. an arc. A graph can be used to represent almost any physical situation involving discrete objects and a relationship among them. or a onedimensional complex. in physical. a line. a point. walk over each of the seven bridges exactly once.SEC. B. and return to the starting point (without swimming across the river. 14. A vertex is also referred to as a node. A B Fig. Euler proved that a solution for this problem does not exist. The problem is depicted in Fig. or an Osimplex. graph theory has a very wide range of applications in engineering. 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. 15. A. as shown in Fig. 14 Konigsberg bridge . and a Isimplex. in linguistics. ajunction. 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. and in numerous other areas. vertex. APPLICATIONS OF GRAPHS Because of its inherent simplicity. Other terms used for an edge are a branch. or D. social. of course). Konigsberg Bridge Problem: The Konigsberg bridge problem is perhaps the bestknown example in graph theory. Euler represented this situation by means of a graph. a Icell. 12. and edge. an element. As we shall see in Chapter 2. C. C and D. by means of a graph. The following are four examples from among hundreds of such applications. a Icomplex. The problem was to start at any of the four land areas of the city. and biological sciences.
the topolo~P ADDS NO WATER ARK. 16 Threeutilities problem. Thus no. We all have been confronted with such problems at one time or another. transistors. 1 A B Fig. each to be connected to each of the three utilitieswater (W). H2.4 INTRODUCTION CHAP. 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). REGISTERED Electrical Network Problems: Properties trant~ j9~H'\IJ. and so 2.. t_dr\~e o . and H3. inductors. tricity (E)by means of conduits. The way these elements are connected to of the network. gas (G). As we shall see in Chapter 5. 16) HI. 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 graph i r to the problem in the plane without edges crossing over. the networKMSuch as ~ t is. The nature and value of the elements resistors. 15 problem. and elec Fig.imd ions of otrry'1~&Ya~rors: input impedance) of an electrical network are 1. Utilities Problem: There are three houses (Fig.
regardless of the nature and size of the electrical elements. 12 APPLICATIONS OF GRAPHS 5 Fig. 18. An electrical network and its graph are shown in Fig. 18 Electrical network and its . factor 2 is separated from 1 and is studied independently. and branches (which consist of electrical elements) are represented by edges. The advantage of this approach will be clearer in Chapter 13. the variations in networks are chiefly due to the variations in topology.SEC. 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 drawing a graph of an electrical network the junctions are represented by vertices. b b e Fig. 17 Graph of threeutilities problem. Since there are only a few different types of electrical elements. In the topological study of electrical networks. The topology of a network is studied by means of its graph.
. The reader has probably noticed that three of plications above are puzzles and not engineeri to avoid introducing at this stage background theory... Figure I9 shows two possible 9 Seating Problem: Nine members r/ \\ I I \ \ 1\\ 7 <.. I I 7....... and an edge joining two vertices represents the relationship of sitting next to each other.6 INTRODUCTION CHAP.. I I 1' <.. 13..../\ \".( / / / / \ / /. II . \ \ \ \ \ \/ )I \ / / / \ \ \ 3 <. They decide to sit such that every member has different neighbors at each lunch."" ~/ ... More substantive applications will four chapters. 19 table... and 1 3 527 4 968 1 (dashed lines). <.... In general it can be shown that for n people the number of such possible arrangements is nl 2 and if n is odd.. \ 5 Fig... in most of the theory and o e . 1 of a new club meet each day for lunch at a round table...J\ / \/ / / /'1 \ \ 2 \ I I II.  Jr" I I I I I I " I _'\""" \\ _ . n2 2 if n is even.. 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.. .. <.. / .> »<: .. They are 1 5 7 3 9 2 846 I and 1 79 5 8 3 624 1...... . . Arrangements at a dinner seating arrangementsthese are I 234567 89 I (solid lines).. It can be shown by graphtheoretic considerations that there are only two more arrangements possible. FINITE AND INFINITE GRAPHS ADDS NO WATERMARK Although in our definition of a graph neither t set E need be finite.
SEC. not. 14 INCIDENCE AND DEGREE 7 sets are finite. two vertices are said to be adjacent if they are the end vertices of the same edge. For example. 17. it is an infinite graph. d(v) . and e. INCIDENCE AND DEGREE When a vertex Vi is an end vertex of some edge ej. e. In this book we shall confine ourselves to the study of finite graphs. The graphs in Figs. REGISTERED VERSION ADDS NO ~ % . in Fig. 14. otherwise. 15. 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. II. 11 are adjacent. 110. II. In Fig. Vi and ej are said to be incident with (on or to) each other. and unless otherwise stated the term "graph" will always mean a finite graph. 110 Portions of two infinite graphs. A graph with a finite number of vertices as well as a finite number of edges is called a finite graph. V 4 and V 5 are adjacent. 11. and 18 are all examples of finite graphs. of vertex Vi' In Fig. 12. for example. ez and e. Fig. Similarly. Portions of two infinite graphs are shown in Fig.. edges ez. In Fig.
1 d(V3) 3. Hence the theorem. for example.8 INTRODUCTION CHAP. The graph of three utilities s of degree three. (11) we shall derive the following THEOREM interesting II The number of vertices of odd degree in a graph is always even. the total number of terms in the sum must be even to make the sum an even number. (11) can be expressed as the sum of two sums. That is. the second expression must also be even: odd ~ d(Vk) = an even number. (13) Because in Eq. 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. and the first expression on the righthand side is even (being a sum of even numbers). vn• Since each edge contributes two degrees. isolated vertices are vertices with zero Fig. (11) Taking Fig. A REGISTERED VERSION ADDS NO IWAvTIERNJAm< ertices v 4 and V7 ~ % i e 0 . each taken over vertices of even and odd degrees. The degree of a vertex is sometimes also referred to as its valency. d(v2) = 4. AND NULL GRAPH PENDANT VER A vertex having no incident edge is cal words. ••• . ISOLATED VERTEX.I I. the sum of the degrees of all vertices in G is twice the number of edges in G. Proof: If we consider the vertices with odd and even degrees separately. (13) each d(Vk) is odd. From Eq. and d(vs) = 1. once more. are isolated vertices.) = 3 + 4 + 3 + 3 + 1 = 14 = twice the 2) number of edges. 11 as an example. A graph in which all vertices are of equal degree (or simply a regular). the quantity in the left side of Eq. 15. 4) = d(v4) = d(vl) + d(v + d(V3) + d(v + d(v~. (12) is even. result. respectively.
1. For a lively discussion on paradoxes arising null graph. the by definition. For our pu 0 sequence. Vertex v) in Fig. the . Such a graph. In other words. Although the edge set E may be empty. 15 ISOLATED VERTEX. 112. the two edges incident on VI are in series. B. N. This they call t with E = 0 and V::. see pp. A null graph of six vertices is shown in Fig.t=. In Fig. otherwise. a pendant vertex or an end vertex. PENDANT VERTEX. E).V:3 Fig. Reed (Pergamon Press. it is possible for the edge set E to be empty. 4041 in Theory of Graphs: a Basis Maxwell and M. series edges. Two adjacent edges are said to be in series if their common vertex is of degree two. or [ which the vertex set V is also empty. 111 Graph containing isolated vertices. In the definition of a graph G = (V. 1] I is a pendant vertex.SEC. II]. for example. . Y. [29]. a vertex graph. 1971). every vertex in a null graph is an isolated vertex. p. without any edges. is called a null graph. 112 vertex set V must not be empty. a graph must have at least one +Some authors (see. and a pendant vertex. AND NULL GRAPH 9 Fig.
and so on. The puzzle consisted of a wooden. Hamilton (18051865). Konig. De Morgan's letter is the first authenticated reference to the fourcolor problem. (as we shall see in Chapter 2). The past 30 years has been a period of inte both pure and applied. A. This fertile period was followed by half a ce Then a resurgence of interest in graphs s pioneers in this period was D. In the year 1859 he invented a puzzle and sold it for 25 guineas to a game manufacturer in Dublin. In 1847. The other milestone is due to Sir W. About 10 years later. 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. The problem became well known after Cayley published it in 1879 in the first volume of the Proceedings of the Royal Geographic Society. The object in the puzzle was to find a route along the edges of the dodecahedron. to date no one has found a n condition for the existence of such a route (called H arbitrary graph. About the time of Kirchhoff and Cayley. Delhi.10 INTRODUCTION CHAP. each face being a regular pentagon and three edges meeting at each corner. R. The corners were marked with the names of 20 important cities: London. two other milestones in graph theory were laid.1871) discussed this problem with his fellow mathematicians in London. New York. He maticians and his own and wrote the first published in 1936 [17]. 221). passing through each of the 20 cities exactly once [112]. One was the fourcolor conjecture. see Fig. To this day. De Morgan (1806. Kirchhoff (18241887) developed the theory of trees for their applications in electrical networks [I 6]. regular dodecahedron (a polyhedron with 12 faces and 20 corners. F. Cayley (18211895) discovered trees while he was trying to enumerate the isomers of saturated hydrocarbons CnH2n+2 [13]. Although the solution of this specific problem is easy to . Ten years later. Mobius (17901868) first presented the fourcolor problem in one of his lectures in 1840. 1 16. R. it has stimulated an enormous amount of research in the field [111]. Paris.t For the next 100 years nothing more was done in the field. A BRIEF HISTORY OF GRAPH THEORY As mentioned before. graph theory was born in 1736 with Euler's paper in which he solved the Konigsberg bridge problem [14]. the fourcolor conjecture is by far the most famous unsolved problem in graph theory. It is believed that A. A. A great deal of resea tBracketed numbers refer to references at the end . G.
but are somewhat advanced.. Oldenbourg K. but it contains no applications and is written for an advanced student of graph theory. 0.CHAP... New York.. "On the Theory of Analytical Forms Called Trees. American Mathemat 110. Busacker and Saaty [12] is a good intermediatelevel book. ORE. Paris. The Theory 0/ Graphs and Its Applications. Paul Erdos.c. 1847. Thousands of papers have been published and more than a dozen books written during the past decade. Dunod Editeur. Berge [II] and Ore [19] are good general texts. 0.. where concern is not with the internal properties of these objects but with the relationships among them. CAYLEY.~~'U610·Clt~lsea. 1950. HARARY. English translation of the R. Seshu and Reed [113] is specially suited for electrical engineers. Visual Topology. Vol." Academimae Petropolitanae (St. REFERENCES As an elementary text on graph theory. a wellwritten elementary book on important aspects of topology. English translation in Sci. 72. 15. ORE. 1 REFERENCES 11 done in this area. Theorie der endlichen und unendli .. Theory of Graphs. The Four Color Problem. G. . Oystein Ore (recently deceased). It is compact and clear. Vol.497translation. AddisonWesley Publishing C Mass. and T. . Mag. 8. . 13. CT5. Academic . Among the current leaders in the field are Claude Berge. 111. Random House.172176. Graph Theory. Petersburg Academy). John Wiley & Sons. 11.F.. 6670." Phil. IRE Trans~ Circuit Theory.. 1958. BUSACKER. For relating graph theory to the rest of topology one should read [18]. Vol.. 1969. ORE. 14. and some elementary results have been obtained. New York. American W New York. BERGE... en:) IV 18. Ore's book [110] is recommended. EULER. A 13. D. SAATY. L. 19. Munich. Vol. 0. 1736. 16. 128140.. KIRCHHOFF.. KONIG. G. Le\Zip.. Am. English translation of the original book in French: Theorie des graphes et ses applications. An attempt has also been made to show that graphs can be used to represent almost any problem involving discrete arrangements of objects. 1965. SUMMARY In this chapter some basic concepts of graph theory have been introduced.. LlETZMANN.47.. March 1958. 1955. ~ New York. and Frank Harary.1857. REGISTERED 0 17. 1962. Physik. 1965. L. McGrawHili Book Company.G. Harary's book [15] contains an excellent treatment of the subject. Inc.Finite Graphs and Networks: An Introduction R with Applications. July 1953. Graphs and Their Uses. 12. "Solutio Problematis ad Geometriam Situs Pertinantis. The entertaining book of Rouse Ball [112] contains a variety of puzzles and games to which graphs have been applied. William Tutte. "Uber die Auflosung der Glei Untersuchungen der Linearen Verteilung Gal me gefuhrt WI Poggendorf Ann.
and telephone. (b) C2H6. 12. Name 10 situations (games. Draw the graph of the Wheatstone bridge circuit. An edge represents a possible path between two vertices. SESHU. 113. 1961. Explain what the vertices and the edges denote. 113. six. AddisonWesley Publishing Company. Mathematical Recreations and Essays. Mass.. activities.. (d) NZ03. 13. gas. water. (c) C6H6. B. London and New York. each representing a move of the knight. two.12 112. etc. REED. three. four. Reading. Draw all simple graphs of one. 113 A maze. 1962. represent this maze by means of a graph such that a vertex denotes either a corridor or a dead end (as numbered). (Hint: Represent atoms by vertices and chemical bonds between them by edges. Greeks. (b) four houses and four utilities.) 3 4 7 16. 14. PROBLEMS 11. etc. INTRODUCTION CHAP. . 1 ROUSEBALL. 1892. 8 13 14 12 I I 2 21 22 Destination * 20 10 9 Fig. Linear Graphs and Electrical Networks. (This is one of numerous mazes that were drawn or built by the Hindus..S. say. You will see that in this graph every vertex is of degree two. New York. Arabs. and M. Draw graphs representing problems of (a) two houses and three utilities. or eight. and The Macmillan Company.) that can be represented by means of graphs. Join these vertices appropriately by edges. Inc. W. 17. three. How many vertices are of each type? Given a maze as shown in Fig. 15.. electricity. Vikings. Draw graphs of the following chemical compounds: (a) CH4. Romans. and four vertices. reallife problems.) Draw a graph with 64 vertices representing the squares of a chessboard.
Show that an infinite graph with a finite number of vertices (i.CHAP. You are given three vessels A. Show that the maximum number of edges in a simple graph with n vertices is n(n . [Hint: Let a. and c be the amounts of liquid in A. a = 8. c = 3. Now when you look at this graph it will be clear to you how to go from state (8. 111. 4. 110. b = 0. a graph with a finite number of edges and an infinite number of vertices) must have an infinite number of isolated vertices. B.. respectively. 1 PROBLEMS 13 18. 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. Since at least one of the vessels is always empty or full. Convince yourself that an infinite graph with a finite number of edges (i. Divide the liquid in A into two equal quantities. respectively. c = 0. 0). Each vertex stands for a state and each edge for a permissible change of states between its two end vertices. We have a + b + c = 8 at all times. b. You will find that with these constraints there are 16 possible states (situations) in this process.0) to state (4. 5. A is filled. 19. and C. Convince yourself that the maximum degree of any vertex in a simple graph with n vertices is n . Decanting problem. while Band C are empty.] This is the classical decanting problem.1)/2. and 3 gallons. B.1. . at least one of the following equations must always be satisfied: a = 0.e. 112. b = 5.0.. and C of capacities 8.e. Represent this problem by means of a 16vertex graph.
the difficulty of such an approach will quickly convince him of the value of graph theory. The degree of vertices. which involves stacking four multicolored cubes.2 PATHS AND CIRCUITS This chapter serves two purposes. These three unrelated problems will demonstrate the problemsolving power of graph theory. will also be solved. deal mainly with the nature of connectivity in graphs. The second purpose is to illustrate with examples how to solve actual problems using graph theory. also introduced in Chapter I. ISOMORPHISM In geometry two figures are thought of as gruent) if they have identical behavior in Likewise. 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 . The celebrated Konigsberg bridge problem. will be shown to be related to the more global properties of the graph. The reader may attempt to solve these problems without using graphs. The first is to introduce additional concepts and terms in graph theory. which was introduced in Chapter I. The solution of the seating arrangement problem. circuits. and Euler graphs. will be solved. will be obtained by means of Hamiltonian circuits. such as paths. These concepts. which is a local property of each vertex. A third problem. 21.
and vS' respectively. one can verify that the two graphs in Fig. names) of their vertices and edges. a given graph can be drawn in many different ways. es. The same number of edges. v3. V4. isomorphic graphs are the same graph. 2. 4. e2. and 6 correspond to el. As indicated in Chapter I. The edges I.e. that the three graphs in Fig.TrliRlfD isom~~feJNtwo ing the vertices ADDS NO WATERMARK CJO ~. Except for the labels (i. 21 VI Isomorphic graphs. For instance. perhaps drawn differently. d. 22 Isomorphic graphs. 22 shows two different ways of drawing the same graph. 21 are isomorphic. and e correspond to v" v2. c. 23 are iso It is immediately apparent by the defini isomorphic graphs must have I. respectively. Fig. t_dr\~e e . 2. e3. An equal number of vertices with a given 9EGIS. It is not always an easy task to determine whether or n are isomorphic. 3. The correspondence between the two graphs is as follows: The vertices a. Fig. respectively. the three graphs s isomorphic. but just by looking at them you exercise for the reader to show. For example. The same number of vertices.. 21 ISOMORPHISM 15 Vs a v4 e e2 v3 e6 v2 b d (a) vI es (b) Fig. b.SEC. and V2. 5. and e6. For example. 3. by redrawing edges. e4.
the two graphs shown in Fig. 2 (a) (b) (c) Fig. 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. 24(a) and (b) are not isomorphic can be shown as follows: If the graph in Fig. these conditions are by no means sufficient. yet they are not isomorphic. u and v. vertex x must correspond to y. 24 Two graphs that are not isomorphic. Now in (b) there is only one pendant vertex. adjacent to y. and each edge of g ha in G. ~ 22. (Obviously. u • (a) • r y (b) •• Fig. SUBGRAPHS REGISTERED VERSION % A graph g is said to be a subgraph of a the edges of g are in G. while in (a) there are two pendant vertices.16 PATHS AND CIRCUITS CHAP. 23 Isomorphic graphs. the graph in Fig. w. adjacent to x. For instance. 24 satisfy all three conditions. we move to a different topic. 24(a) were to be isomorphic to the one in (b). 25(b) is a 25(a). because there are no other vertices of degree three. For instance. However. That the graphs in Figs. when considering a subgra .
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 +
One often encounters Euler lines in various puzzles. Since every vertex is of even degree. • Proof: Konigsberg Bridge Problem: Now looking at the graph of the Konigsberg bridges (Fig. we shall eventually reach v when the tracing comes to an end. 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. 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." This is true not only of all intermediate vertices of the walk but also of the terminal vertex. we can exit from every vertex we enter. it is not an Euler graph. of course. which starts and ends at vertex v and has more edges than h. We continue tracing as far as possible. because G is connected. but this walk in h' can be combined with h to form a new walk. G is an Euler graph. 2 THEOREM 24 A given connected graph G is an Euler graph if and only if all vertices of G are of even degree. Thus G is an Euler graph. 15). Thus it is not possible to walk over each of the seven bridges exactly once and return to the starting point. Since both G and h have all their vertices of even degree. (Equal In defining an Euler line some authors drop be closed. we can again construct a new walk in graph h'. h' must touch h at least at one vertex a. For example. This process can be repeated until we obtain a closed walk that traverses all the edges of G. respectively.24 PATHS AND CIRCUITS CHAP. 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. Hence. Thus if G is an Euler graph. Moreover. a unicursal line will be called a unicursal graph. this walk in h' must terminate at vertex a. To prove the sufficiency of the condition. It therefore contains an Euler line (which is a closed walk). we find that not all its vertices are of even degree. 212. If not. the degrees of the vertices of h' are also even. Starting from a. assume that all vertices of G are of even degree. The drawing in F med's scimitars and is believed to have come fr 212(b) is. Suppose that G is an Euler graph. because we "exited" and "entered" the same vertex at the beginning and end of the walk. 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. If this closed walk h we just traced includes all the edges of G. And since v is also of even degree. the tracing cannot stop at any vertex but u. we remove from G all the edges in h and obtain a subgraph h' of G formed by the remaining edges. the degree of every vertex is even. . Since all the vertices of h' are of even degree.
••• .213 Unicursal graph. 26 EULER GRAPHS 25 (a) (b) Fig.212 Two Euler graphs. . The first removal will leave a single unicursal Ii that into two unicursal lines. (1'2. p will be split into k walks. G' if we remove from p the k edges we just added ( on the same vertex).• . 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 .. WI). until there are k of WI. This observation can be generalized as follows: THEOREM 25 In a connected graph G with exactly 2k odd vertices. and each successive line into two unicursal lines. subgraphs such that they together contain all edges of G a graph. Wk in any arbitrary order. Add k (VI. Thus a connected graph is unicursal if and only if it has exactly two vertices of odd degree.SEC. W2. (rko Wk) to form a new Since every vertex of G' is of even degree. e Fig. W2).
U £2' Likewise. 2 We shall interrupt our study of Euler graphs to define some commonly used graphtheoretic operations. by definition. 214. intersection.26 PATHS AND CIRCUITS CHAP. Two graphs and their union. Since graphs are defined in terms of the sets of vertices and edges. t It is obvious from their definitions that the three operations just mentioned are commutative. If g is a subgraph of G. it is natural to employ the settheoretical terminology to define operations between graphs. then G1 n G2 is empty. = G EB G a null graph. and G1 G1 U G2• If GI and G2 are vertex disjoint. = G. One of these operations is required immediately in the next section.g is often called the complement Decomposition: A graph G is said to have gl U graphs gland and g2 if s. 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. then G EB g is. That is. 27. is in two graphs G1 and G2• its end as in G2• . Because of G EB g = G . gl n g2 = a null +If an edge e. For any graph G. but not in both. whenever g c G. 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. 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. and ring sum are shown in Fig. then GI n G2 is a null graph. G and U EB G 2 = G = G n G = G. GI G1 U G2 2 = = G2 G2 U G" I• EB G EB G If G1 and G2 are edge disjoint. that s remains after all the edges in g have been removed is written as G . others will be needed later.g. OPERATIONS ON GRAPHS As is the case with most mathematical entities.
In other words. finite number of graphs. ._. intersection. 27 OPERAnONS ON GRAPHS 27 V2 (' V1 V2 d V4 e I G1 Vs d V4 j G2 G I U G2 v.ej = Gffiej• % ... REGISTERED Deletion: If Vj is a vertex in graph G....Lv] VI VI II V6 b V2 c d . removing) Vi f implies the deletion of all edges incident on is an edge in G.. these definitions can be extended in an obv into . Deletion of an edge does not imply deletion G .. em} can be decomposed in 2mI . and ring sum of two graphs.. may occur in both gl and g2' In decomposition. every edge of G occurs either in gl or in g2' but not in both. Similarly.. Although union. Some of the vertices. . isolated vertices are disregarded. and ring sum have of graphs.VS V4 f Fig. A graph containing m edges {ep e2. then G obtained by deleting (i.I different ways into pairs of subgraphs s. intersection.. a graph G ca than two subgraphssubgraphs that are (pai ge disjoint and co ~ lectively include every edge in G.e. then G .SEC... g2 (why?). however..214 Union... .e j is a subgraph of G.
2 . More complex operations have been defined and are used in graphtheory literature. Since the degree of every degree of every vertex in G is even. Fusion: A pair of vertices a. 215 Vertex deletion and edge deletion. 216 Fusion of vertices a and b. 216 for an example. Suppose graph G can be decomposed . Hence G is an Proof: . MORE ON EULER GRAPHS The following are some more graphs.28 PATHS AND CIRCUITS CHAP. These are some of the elementary operations on graphs. e f 2 Fig. For a survey of such operations see the paper by Harary and Wil [228. Thus fusion of two vertices does not alter the number of edges. of edgedisjoint circuits. THEOREM 26 A connected graph G is an Euler graph if into circuits. See Fig.\ ~ eI G Fig. 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. but it reduces the number of vertices by one.
From the remaining graph remove another circuit in exactly the same way as we removed r from G. which is an Euler graph.'1. let G be an Euler graph. There are at least two edges incident at '1.. e e Fig. or e. Suppose that we start from vertex a and trace the path abc. thus forming a circuit r. 21 itrarily ~ ~~~ ADDS NO WATERMARK ~ CJO . we would only trace the circuit abc a. 218 is not arbitrarily traceable from any vertex. • the graph in Fig. say between V2 and V3. 217. it must have at least another edge. Let us remove r from G. 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. Thus. 28 MORE ON EULER GRAPHS 29 Conversely. Consider a vertex VI... we eventually arrive at a vertex that has previously been traversed. the graph in Fig. Proceeding in this fashion. Let one of these edges be between VI and V2. Arbitrarily Traceable Graphs: Consider d . All vertices in the remaining graph (not necessarily connected) must also be of even degree. Continue this process until no edges are left. For instance. Arbitrarily traceable graph Now at c we have the choice of going to a. 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. d. 217 from c.. starting from a.. 217 is an arbitrarily traceable graph from vertex c. the Euler graph in Fig. which is not an Euler line. Since vertex V2 is also of even degree. Hence the theorem. but not from any other vertex.SEC. The Euler graph in Fig.
29. 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). For a proof of the theorem the reader is referred to [25]. THEOREM 27 An Euler graph G is arbitrarily traceable from vertex v in G if and only if every circuit in G contains v. 2lines. starting at vertex v. in the graph of Fig. The following interesting theorem. 220 Hamiltonian circuits. For example. not every connected graph example.30 PATHS AND CIRCUITS CHAP. 2 traceable from all its vertices. Hence a Hamiltonian circui graph ofVE:R&lGNsists of exactly n edges. Obviously. This raises the question: What I condition for a connected graph G to have a H . at which the walk also terminates. answers the question just raised. A Hamiltonian circuit in a connected graph is defined as a closed walk that traverses every vertex of G exactly once. 220(a) v (a) (b) Fig. neither of the graphs shown in Fig tonian circuit. More formally: EGISTFR~n oman If lC'inciu'aes A circuit in a connected graph G is said to every vertex of G. if one traverses along the edges passing through each vertex exactly onceone o shown by hea A Hamiltonian circuit for the graph in Fig. due to Ore [25]. except of course the starting vertex.
Hamiltonian Path: If we remove anyone edge from a Hamiltonian circuit. first posed by the famous Irish mathematician Sir William Rowan Hamilton in 1859. Hamilton made a regular dodecahedron of wood [see Fig.as will be presently shown. Hence i t inclUde a se'1floop or a set of parallel edges. we are left with a path. 221 circuit. and one of many such routes (a Hamiltonian circuit) is shown by heavy lines. certain types of graphs that always contain Hamiltonian circuits. however. 221 (b). There are. 29 HAMILTONIAN PATHS AND CIRCUITS 31 Dodecahedron (a) (b) Fig. CJO It is left as an exercise for the reader to show t the two f~~~1fk~t1 e tdr . Dodecahedron and its graph shown with a Hamiltonian This problem. The resemblance between the problem of an Euler line and that of a Hamiltonian circuit is deceptive. Clearly. is still unsolved. 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. 220 and 221. each of whose 20 corners was marked with the name of a city. This is because miltonia21'l1r. The latter is infinitely more complex. This path is called a Hamiltonian path. As was mentioned in Chapter I. There are. Thus a general graph rna iliB8~~ parallel edges and selfloops before looking for a an circuit in it. 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. there is no known criterion we can apply to determine the existence of a Hamiltonian circuit in general.~(N €fth) traverses every vertex exactly once.SEC. The graph of the dodecahedron is given in Fig. 221 (a)]. however. Although one can find Hamiltonian circuits in many specific graphs. a Hamiltonian path in a graph G traverses every vertex tonian path is a subgraph of a Hamiltonian circuit graph of another graph). every graph that has a a Hamiltonian path. such as those shown in Figs.
222 has a Hamiltonian circuit (or Hamiltonian path). between any two vertices. 2 (a) (b) Fig. sometimes also referred to as a universal graph or a clique. Of i Hamiltonian circuits in a graph.I)/2. the number of ed . three. four. This is Number of Hamiltonian Circuits in a G more than one Hamiltonian circuit. See Problem 224. Complete graphs of two. we can start from V I so on to vn' and finally from Vn to VI. shown in Fig. 222 Graphs without Hamiltonian circuits.1 in a complete graph G of n vertices. The determi edgedisjoint Hamiltonian circuits (or paths) in a unsolved problem. four. What general class of graphs is guaranteed to have a Hamiltonian circuit? Complete graphs of three or more vertices constitute one such class. the is n . three. 223. Also in G is n(n .32 PATHS AND CIRCUlTS CHAP. and five vertices. 223 Complete graphs of two. A complete graph is • • Fig. Let the vertices be numbered V" V2. It is easy to construct a Hamiltonian circui vertices. However. Since every vertex is joined with every other vertex through one edge. See Problem 112. and five vertices are shown in Fig. Complete Graph: A simple graph in which there exists an edge between every pair of vertices is called a complete graph.
Hence the theorem. Thus we have (n .. Keeping the vertices fixed on a circle.3)/2 new Hamiltonian circuits. . as follow Representing a member x by a vertex and the .1). A complete graph G of n vertices has n(n . .. when n is odd. Therefore. THEOREM graph with odd number of vertices is given by Theorem 28 In a complete graph with n vertices there are (n . if they ber must have different neighbors... 3· 360/(n ..1)/2. introduced in Chapter 1.y a around the table. can be shown as follows: The subgraph (of a complete graph of n vertices) in Fig.1). 29 HAMILTONIAN PATHS AND CIRCUITS 33 cuits in a complete 28.1) degrees. rotate the polygonal pattern clockwise Proof: 5 n 2 4 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. n IS by 360/(n . Hamiltonian circuit. if n is an odd number > 3.3)/2· 360/(n . and a Hamiltonian circuit in G consists of n edges. 224 odd. all edge disjoint from the one in Fig. That there are (n .SEC. Every seating arrangemen Hamiltonian circuit. (n .1). The first day of their meeting they can si Hamiltonian circuit z/. the number of edgedisjoint Hamiltonian circuits in G cannot exceed (n .1)/2 edges.. 224 is a Hamiltonian circuit.3 Fig.1)/2 edgedisjoint Hamiltonian circuits.". Observe that each rotation produces a Hamiltonian circuit that has no edge in common with any of the previous ones. 224 and also edge disjoint among themselves. The second day. • This theorem enables us to solve the problem of the at a round table..1)/2 edgedisjoint Hamiltonian circuits.. with an entirely different set of ed on~~!~~ . we have to fi cuit H2 in G. 2· 360/(n .
and then picking the sho value of n. Dirac. the problem of the traveling sal by enumerating all (n . TRAVELINGSALESMAN PROBLEM A problem closely related to the question of Hamiltonian circuits is the travelingsalesman problem. therefore.1) !f2. in what order should he travel so as to visit every city precisely once and return home. The total number of different (not edge disjoint. A. In this graph. 2 Hamiltonian circuits. stated as follows: A salesman is required to visit a number of cities during a trip. n .34 PATHS AND CIRCUITS CHAP. Proof: For proof the reader is referred to the original paper by Dirac [23]. obtained by G. only four such arrangements exist among nine people. w(eJ_ Such a graph is called a weighted graph. however. This graph has numerous Hamiltonian circuits. we get a graph. 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. n .. No efficient algorithm for problems found.1)!/2 Hamiltonian ci traveled in each.I edges to choose from the first vertex. with the minimum mileage traveled? Representing the cities by vertices and the roads between them by edges. This follows from the fact that starting from any vertex we have n . we get (n of choices. From Theorem 28 the number of edgedisjoint Hamiltonian circuits in G is four. and so on. In our problem. Given the distances between the cities. where n is the number of vertices in G. some speci been worked out (see [21]). Theoretically.3 from the third. say). we have a complete weighted graph. Another interesting result on the question of existence of Hamiltonian circuits in a graph. 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. There are also available . with every edge e. if each of the cities has a road to every other city. and we are to pick the one that has the smallest sum of distances (or weights). w(eJ being the weight of edge e. although many attempts have been m applications in operations research. of course) Hamiltonian circuits in a complete graph of n vertices can be shown to be (n . there is associated a real number (the distance in miles.2 from the second. This number is. 210. divided by tonian circuit has been counted twice. These being independent choices.
2. Chapters 2 and 3. Euler lines. 2 REFERENCES 35 of solution that give a route very close to the shortest one. Harary [15]. circuits. The arrows point in the direction of increasing restriction. Hamiltonian path Fig. Various types of walks discussed in this chapter are summarized in Fig. but do not guarantee the shortest (see [24] for such a method). 225 Different types of Hamiltonian REFERENCES Textbooks listed in Chapter mended are 1. 225. Chapters 1 and 2. A given graph G can be characterized and studied in terms of the presence or absence of these subgraphs. Chapters 1. SUMMARY In this chapter we discussed the subgrapha graph that is part of another graph. 5. and Hamiltonian circuits in a graph G are its subgraphs with special properties. 11. Busacker and Saaty [12]. . 3. 4. Ore [110]. Walks. Chapters 1 are to be read f 1.CHAP. and 17. and 6. Berge [11].3. Hamiltonian paths. Ore [19]. Chapter 7. paths. Many physical problems can be represented by graphs and solved by observing the relevant properties of the corresponding graphs. 7.
S. that graphs (b) and (c) in Fig. DIRAC. 28. 26. 1952. 23. Vol.. TUITE. 22. HAKIMI. WILCOX." Quart J." BSTJ." Am. The Traveling Salesman Problem: A " Survey.. 22. 171174. 6. one should read Ore's paper [25]. W. "A Problem Regarding the Tracing of Graphs. and S. Chapters 4 and 5 of Tutte's book [29] are also devoted to paths and Euler paths. Show by redrawing. and G. 3. On the travelingsalesman problem there are many papers." Math. PROBLEMS 21. "Computer Solution of the Traveling Salesman Problem. For arbitrarily traceable graphs. Seshu and Reed [113]. 1941. 24. Elementary Math. SMITH..36 PATHS AND CIRCUITS CHAP. Vol. 44.. Vol. BELLMORE. "Note on Hamilton Circuits.1961.. 21. London Math. T. Vol. "On Hamiltonian Circuits. ORE. W. 16. Verify that the two graphs in Fig. Oxford. Connectivity in Graphs. 98101.F. G. Smith and Tutte [27]." Proc. 23. 23 are isomorphic to (a). 27. 1965. Show that the two graphs in Figs. Deo and Hakimi [22] generalized the Hamiltonianpath problem and applied it to a wiring problem in computers. and G. Math. "The Shortest Generalized Hamiltonian Tree. 1960. In an excellent survey Bellmore and Nemhauser [21] summarize and list most of these papers. 1966. 29. 538558. Scand. A.." Operations Res. (a) Fig. 226 . TUITE.." Am. Math. Vol.22452269."Boolean Operations on Graphs. TUITE. Chapter 2. 879888. 1965. Soc. N. University of Illinois. L. 1967.4953. DEO.. 'Iv.. Third Annual Allerton Coni. Ser. 226(a) and (b) are isomorphic." Rev. 25. "Connectivity Theorems for Graphs.M. LIN. Label the corresponding vertices and edges. 20. step by step. Monthly. Vol.4151. 210. (2). 55.. T. A. 1968. B. 2 6. 48." J.. and W. Toronto.. 21. 0..233237. and Dirac [23]. L. 67. T. NEMHAUSER. "On Unicursal Paths in a Network of Degree Four. Monthly. University of Toronto Press. Vol. 0. 1946. HARARY. ORE. C. Additional information on properties of Hamiltonian graphs can be found in papers by Tutte [28].. 22 are isomorphic. Math. Ore [26]. Vol.
25(a).4).2). is it possible to stack all four cubes into a column such that each side shows only one color? Explain. 212. Give the length of each of these paths. is in some circuit in G.CHAP. (Hint: Use Theorem 23. (1. and (b) has exactly n . Prove that a graph with n vertices satisfying the condition of Problem 211 is (a) simple. Let a. '3 kllERSIQNf ~U . 2. 210. e . Given the set of cubes represented by the graph in Fig.3). 218.3). 215. are isomorphic. if and only if e. Draw a connected graph that becomes disconnected when any edge is removed from it. PROBLEMS 37 24. 217. 26. 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. 2 Construct three more examples to show that conditions are not sufficient for isomorphism between graphs. the 0'1 have the f!AflQ~eNQots: You are given a topiece domino set whose (1. all of degree two. 26.5) nM. 211. and 3 in Section 21 Prove that any two simple connected graphs with n vertices. (2.) Prove that if a connected graph G is decomposed into two subgraphs gl and s». Prove that a connected graph G remains connected after removing an edge ei from G.1 edges. b. (1. 29.4). 214. and c be three distinct vertices in a b and also there is a path between band c. (2. 213. iR~~et~~~. 216. show . 227 27. Prove If the intersection of two paths is a disconnec two paths has at least one circuit.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. Are the two graphs in Fig. there must be at least one vertex common between gl and s».5). 25. 219. Prove that a simple graph with n vertices must be connected if it has more than [en . . 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. 28. 227 isomorphic? Why? Fig. (1. Group the paths listed in Problem 214 into sets of edgedisjoin strate that the union of two edgedisjoint paths between a circuit.) Is it possible to move a knight on a chessboard such e 220.z.2)]/2 edges. 1. (2.1)(n .
) 229. of all the edges incident at a vertex only two can be included in a Hamiltonian circuit.38 PATHS AND CIRCUITS CHAP. first consider all vertices of degree two. . You will find that 13 edges must be excluded from Fig. 223. What can you 22S. 222. [Hint: For Fig. 227. (Hint: First show that G is connected. 222 has a Hamiltonian path (and therefore no Hamiltonian circuit). Show that neither of the graphs in Fig. 222(a). (Hint: Look for a Hamiltonian circuit in the graph of Problem 16.] 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). Discuss how you would schedule the tournaments to finish in the shortest possible time. Draw a graph in which an Euler line is also a Hamiltonian say about such graphs in general? circuit. Then use induction on path length in G. (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. Observe that there can be no path longer than a Hamiltonian path (if it exists) in a graph.) 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. starting from any of the 64 squares of the chessboard. Is it possible. 2 221. 222(a). missible move exactly once? A move between two squares is counted as one regardless of the direction in which it is made. Vj in G satisfies the condition d(Vi) 228. For Fig. 224. 226. 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. + d(vj) >n  1. 222(b). to move a knight such that it occupies every square exactly once and returns to the initial position? If so. Draw a graph that has a Hamiltonian path but does not have a Hamiltonian circuit. Count the number of edges that have to be excluded. give one such tour. The number of remaining edges is insufficient to form a Hamiltonian circuit. Using the result of Problem 228.
deferring the applications to more complex scientific problems till Chapter 12. As usual. Unavoidably. In the first half of this chapter we shall define a tree and study its properties. there is no way to avoid new terms and definitions. in Fig. our t It follows immediately from the defini . 31. three. we shall point out some of its applications to simple situations and puzzles and games. Trees appear in numerous instances. graph. As pointed out in Chapter 1. two. and so on. The 39 . a graph m and therefore so must a tree. is a tree. In studying any new branch of mathematics. trees. having neither a selfloop nor form circuits). The relationships among circuits. in a graph are explored. as with Chapters 1 and 2. that is. Trees with one. this chapter also has a large number of definitions. Some authors a any vertices. Other graphtheoretic terms related to trees will also be introduced and discussed. especially for those interested in applications of graphs. 32. TREES A tree is a connected graph without any circuits.3 TREES AND FUNDAMENTAL CIRCUITS The concept of a tree is probably the most important in graph theory. We have excluded such an enti as we are considering only finite graphs. The second part of the chapter introduces the spanning treeanother important notion in the theory of graphs. for instance.
33 Decision tree. 3 u Fig. three. . 31 Tree. and four vertices. ·I Fig. Fig. two. 32 Trees with one.40 TREES AND FUNDAMENTAL CIRCUITS CHAP.
SEC. ••• . Tn many sorting problems we have only two alternatives (instead of 10 as in the preceding example) at each intermediate vertex. 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). N9. All the mail arrives at some local office. • Conversely: THEOREM 32 If in a graph G there is one and only one path between every G is a tree. G is a tree. each representing a unique fivedigit zip code. The union of these two paths will contain a circuit and T cannot be a tree. Such a decision tree with two choices at each vertex occurs frequently in computer programming and switching theory. Proof: The theorem will be proved by inducti . Now suppose that between two vertices a and b of T there are two distinct paths. Figure 33 might represent the flow of mail. 0 or I. Each pile is further divided into 10 piles according to the second most significant digit. such as large or small. We shall deal with such trees and their applications in Section 35. Since G has one and only one path bet wee have no circuit. T. b such that there and b. Therefore. A circuit in a graph (with two or more at least one pair of vertices a. The most significant digit in the zip code is read at N. 32. 32 SOME PROPERTIES OF TREES 41 represented by means of a tree (in fact the term tree comes from/amity tree). till the mail is subdivided into lOs possible piles. A river with its tributaries and subtributaries can be represented by a tree. and so on. SOME PROPERTIES OF TREES THEOREM 31 There is one and only one path between every pair of vertices in a tree. there must exist at least one path between every pair of vertices in T. and No. • THEOREM 33 VERSION ADDS NO A tree with n vertices has n .1 edges. vertex N. Proof: Existence of a path between every pair of connected. depending on the most significant digit. Let us first obtain a few simple but important theorems on the general properties of trees. Proof: Since T is a connected graph. and the mail is divided into 10 piles Nh N2. representing a dichotomy. good or bad.
1 edges is a tree. as shown in Fig. T .1. Furthermore. Let us now consider a tree T with n vertices. A minimally connected graph cannot have a circuit. Hence T has exactly n . A connected graph is said to be minimally connected if removal of anyone edge from it disconnects the graph. implies that G is not a tree. Therefore. Proof' 35). otherwise.42 TREES AND FUNDAMENTAL CIRCUITS CHAP.1 edges. and 3 (see Fig. the minimum needed is n . 32). Therefore. 3 T Fig. and since there were no circuits in T to begin with. 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. we could remove one of the edges in the circui graph connected. there is no other path between Vi and Vj except ek. 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. In T let ek be an edge with end vertices Vi and V t.ei is connected.ek consists of n .According to Theorem 31. each contains one less edge than the number of vertices in it. each of these components is a tree. It requires no background in el EGISTERED VERSION . • THEOREM 34 Any connected graph with n vertices and n . Assume that the theorem holds for all trees with fewer than n vertices. 34 Tree T with n vertices. and therefore. a connected graph G is not minimally connected ei in G such that G . t i and t z.2 edges (and n vertices). 2. Thus a minimally connected graph . ADDS NO % . deletion of ek from T will disconnect the graph. Thus T . 34.e k consists of exactly two components. have fewer than n vertices each. by the induction hypothesis. It is easy to see that the theorem is true for n = 1. Both these trees.
35).SEC. Without loss of generality. G is circuitless and has n  1 edges.e. U g2. The resulting structure.1 edges. is a tree. That is. 33 PENDANT VERTICES IN A TREE 43 e Fig. Since there was no path between VI and V2 in G.35 Edge e added to G = s. or 1 edges. n . Proof' Suppose there exists a circuitless graph G with n vertices and n .1 edges is always connected (i. gl and g2.. which is not possible.1 edges. a graph G with n vertices is called a tree if I. G is connected and has n 3. because of Theorem 33. it is a tree). connected graph (i. or 4. THEOREM 36 A graph G with n vertices. and no circuits is connected. adding e did not create a circuit.e. let G consist of two components. or 2. We can also show that a graph with n vertices which has no circuit and has n . We showed that a connected graph with n vertices and without any circuits has n . 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 . in the following theorem. 33. There is exactly one path between every 5. one needs at least n .1 edges which is disconnected. • The results of the preceding six theorems can be summarized by saying that the following are five different but equivalent definitions of a tree. according to Theorem 35.1 pieces of wire. that to short (electrically) n pins together.. Add an edge e between a vertex VI in gl and V2 in g2 (Fig. In that case G will consist of two or more circuitless components. G is connected and is circuitless. a tree) of n vertices and n edges. G is a minimally connected graph. Thus G u e is a circuitless.
increasing sequences in 4.1 edges. 11. 36 Tree of the monotonically 13.7. one). there are at The following problem is programming.0. Each is of length four. and the path from the start describes the monotonically increasing su shown in Fig.8. Such a tree used in to as a data tree by computer programmers. More formally: THEOREM 37 In any tree (with two or more vertices).2. I. (1.8. 36. 2. we must have at least two vertices of degree one in a tree. (4. 3 Start II II II II Fig. The reason is that in a tree of n vertices we have n . find the largest monotonically increasing subs sequence given to us is 4.1 11). 8. this sequence contains four 1 ing subsequences.3.44 TREES AND FUNDAMENTAL CIRCUITS CHAP. 7. that is.11).1) degrees to be divided among n vertices. This of course makes sense only if n > 2. 0. in which the vertices (except the start in the sequence. 13. An Application: . Given a sequence of integers.7. and hence 2(n . 1.7. 11. Since no vertex can be of zero degree.8.
each of length two./). (b. e). c. In a graph that is not a tree. plore this idea further and see If In a tree there exists a "center" (or centers). h). In a tree.38 Distance between VI and V2 is two.SEC. We shall exa d b c Fig. y) of two variables a "distance" between them. The definition of distance between any two vertices is valid for any connected graph (not necessarily a tree). dia. k). e). e) and (b. c. For instance. b) = I. There are two shortest paths./). there are generally several paths between a pair of vertices. g. and so on. dia. Hence d(vH v2) = 2. (There may be several shortest paths. some of the paths between vertices VI and V2 in Fig. We have to enumerate all these paths and find the length of the shortest one.) For instance. 37 has four vertices. In a connected graph G. the number of edges in the shortest path) between them.e. in the tree of Fig.37 Tree. (b. g. 38 are (a. These are A Metric: g Fig. b) = I. Inherent in the concept of a center is the idea of "distance. (a. (a./). i. d(c. the determination of distance is much easier." so we must define distance before we can talk of a center. since there is exactly one path between any two vertices (Theorem 31). Vj) between two of its vertices Vi and Vj is the length of the shortest path (i. 37. and (b. Intuitively. 34 DISTANCE AND CENTERS IN A TREE 45 34. this function must satisfy certain requirements. Before we can legitimately call a function lex. (b. the distance d(vj. c) = 2. it seems that vertex b is located more "centrally" than any of the other three vertices. DISTANCE AND CENTERS IN A TREE The tree in Fig.. .
Theeccentricity E(v) of a vertex v in a graph G is the distance from v to the vertex farthest from v in G. Triangle [(x. y) = ° CHAP. A function + THEOREM 38 The distance between vertices of a connected graph is a metric. VjEG A vertex with minimum eccentricity in graph G is called a center of G. The eccentricity of each of its six vertices is shown next to the vertex. E(c) = 2. z) + fez. Hence vertex b is the center of that tree. Hence this tree has two centers. Since d(vj. The reader can easily verify that a graph. that is. Konig [1theorem: THEOREM 39 § 3 #REGISTERED ~ 0 VERSION Every tree has either one or two centers. in a graph that consists of just a circuit (a is a center. Therefore. and[(x. and E(d) = 2. 3 if and only if x = y. 37 are E(a) = 2. y) > 0. Hence d(vj' v) < d(vj' vk) d(Vk' v). has For example. y) <[(x. This tree has two vertices having the same minimum eccentricity. E(v) = max d(v. Symmetry: 3. [(x. The eccentricities of the four vertices in Fig. vJ. y) for any z. Vj) is the length of the shortest path between vertices Vj and "» this path cannot be longer than another path between v. consider the tree in Fig. 39. Nonnegativity: 2.46 TREES AND FUNDAMENTAL CIRCUITS I. I n the case of a tree. because there will be no occasion for confusion. let us define another term called eccentricity (also referred to as associated number or separation) of a vertex in a graph. in general. we shall call them just centers. On the other hand. That the distance d(vj' Vj) between two vertices of a connected graph satisfies conditions I and 2 is immediately evident. Some authors refer to such centers as bicenters. however. 3 3 3 Fig 39 a tree. . y) = fey. and Vi' which goes through a specified vertex vk. inequality: [(x. Coming back to our original topic of relative location of different vertices in a tree. that satisfies these three conditions is called a metric. E(b) = 1. x).
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). 310 Finding a center of a tree. 310) u (which is the center of T) or an edge (whose end vert Thus the theorem.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. Delete all t resulting graph T' is still a tree. Vi). Proof: The maximum distance. • 47 . max d(v. all vertices that T had as centers wi T' we can again remove all pendant vertices and this process (which is illustrated in Fig. What about the A little deliberation will reveal that removal of all reduced the eccentricities of the remaining vert Therefore.
36 the start vertex may be considered as the root of the tree shown. 3 COROLLARY From the argument used in proving Theorem 39. we see that if a tree T has two centers. in Fig. is distinguished from the rest of the vertices. A Sociological Application: Suppose that the communication among a group of ]4 persons in a society is represented by the graph in Fig. in Fig.48 TREES AND FUNDAMENTAL CIRCUITS CHAP. where the vertices represent the persons and an edge represents the communication link between its two end vertices. we know that all the members can be reached by any member. the two centers must be adjacent. The eccentricity of each vertex. The diameter of a tree T. does it have a radius also? Yes. We will show the root enclosed in a small triangle. Radius and Diameter: If a tree has a center (or two centers). Hence N can be considered the root of the tree. Generally. is defined as the length of the longest path in T. the term tree mea However. 310(a). In Fig. either directly or through some other members. on the other hand. But it is also important to note that the graph is a treeminimally connected. 310(a). 33 vertex N. from where all the mail goes out. 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. 311 Rooted trees with four vertices. For instance. In a diagram of a rooted tree. ROOTED AND BINARY TREES A tree in which one vertex (called the root) is distinguished from all the others is called a rooted tree. Similarly. Since the graph is connected. 310(a) is three. represents how close v is to the farthest member of the group. the radius of the tree in Fig. the root is generally marked distinctly. ~ REGISTERED % Fig. The group cannot afford to lose any of the communication links. 35. for emphasis they are sometimes call trees) to differentiate them from the rooted kind. . 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. and so the tree is rooted. For instance. if closeness of communication were the criterion for leadership. E(v). 31 I. vertex c should be the leader of the group. All rooted t are shown in Fig.
p . Thus the root is at level O. called binary rooted trees. This is because there is exactly one vertex of even degree. A I3vertex.SEC. this vertex serves as a root. 35 ROOTED AND BINARY TREES 49 Binary Trees: A special class of rooted trees. Two properties of binary trees follow directly from the definition: 1. we are talking about trees with three or more vertices.1 is the number of vertices of degree three.1 vertices are of odd degrees. (31) A nonpendant vertex in a tree is called an internal vertex. from the root. and 4. (Obviously. fourlevel binary tree is shown in Fig. 2.p 1) + 2] = p n 1. In a binary tree a vertex Vi is said to be at level I. Then n . 2. One of the most straightforward applications of binary trees is in search procedures.) Since the vertex of degree two is distinct from all other vertices. . and each of the remaining vertices is of degree one or three (Fig. respectively. 312). Thus every binary tree is a rooted tree. (31) that the number of internal vertices in a binary tree is one less than the number of pendant vertices. the number of edges in T equals 2[P 1 + 3(n . 4level binary tree.I is even. 312 A 13vertex. binary identification problems. Since from Theorem 11 the number of vertices of odd degrees is even. Therefore. if Vi is at a distance of I. A binary tree is defined as a tree in which there is exactly one vertex of degree two. and 4 are 2. 312. since they are extensively used in the study of computer search methods. It follows from Eq. 2. and the remaining n . and variablelength binary codes. n . hence = n+l 2 . The number of vertices n in a binary tree is always odd. Hence n is odd. Each vertex of a binary tree represents a test with two possible Level 0 Fig. 4. Let p be the number of pendant vertices in a binary tree T. The number of vertices at levels 1. 3. is of particular interest.
We start at the root. to construct a binary tree for a given n such that the farthest vertex is as far as possible from the root. (33) For n = 11. and so on. of any vertex in a binary tree is called the height of the tree. for a given number of vertices n. and so on. (32) where fnl denotes the smallest integer greater than or equal to n. the vertex farthest from the root is as close to the root as possible. 12) . at most four vertices at level 2. [max. 313. Level Level o o 2 3 minImax = [t log. Clearly. For such a search procedure it is often important to construct a binary tree in which.313 Two llvertex binary . at most two vertices at levell. 3 outcomes. the maximum number of vertices possible in a kIevel binary tree is The maximum level.11 (a) Fig. Reaching a specified pendant vertex (the goal of the search) terminates the search. Therefore. It is easy to see that the minimum possible height of an nvertex binary tree is min lmax = [log. (n + 1)  11. except at the 0 level. and the outcome of the test at the root sends us to one of the two vertices at the next level. max lmax = nl 2 . binary trees realizing both these extremes are shown in Fig.50 TREES AND FUNDAMENTAL CIRCUITS CHAP. where further tests are made. we must have exactly two vertices at each level. Therefore. there can be only one vertex (the root) at level 0. On the other hand.
15. by a sequence of tests. The path lengths of trees in Figs.i~tfr{{~#S e . such that sponding weights WI = .1 such tests. quantity L: liWi is minimized. . W3 = . Let us illustrate the significance of this problem with a simple example. 313(a) and (b) are 16 and 20. a tree with 2/ 1 vertices at levellmax . A Coke machine is to identify. Binary trees with minimum weighted path length e:~~?t. Only pennies.. every pendant vertex vJ of a binary tree has associated with it a positive real number wj• Given WI' WZ. For example. dimes. This quantity. where t is the time with Fig. Let us assume that the probabilities of a coin being a penny. is the level of pendant vertex "» and the sum is taken over all pendant vertices. The path length of the binary tree in Fig. .15. and quarters can go through the slot. The solution is the expected time is I. a nickel. It can be shown that the type of binary tree in Fig. and a quarter are . and . Wz = . 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. nickels. for example.. . 'nWAlftaRNrARK sible. 314(b). for which the expected ti structing a binary tree with minimum weighte [36]. If the time taken for each test is the same.05. Weighted Path Length: In some applications. 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 .5. 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. .5. a dime. respectively. known as the path length (or external path length) of a tree.7t. 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. 313(a) (i.30.SEC.3. the coin that is put into the machine. In this problem of a Coke machine. is 1+ 3 + 3+ 4+4+4+ 4 = 23.I) yields the minimum path length for a given max n. respectively.e. 312.•. not all possible tests may be a or they may not albO consume the same time. Thus for four coins we have 23 . can be defined as the sum of the path lengths from the root to all pendant vertices.05. Wm the problem is to construct a binary tree (with m pendant vertices) that minimizes where I. many .
ON COUNTING TREES In 1857.RED ~0 2k v~ ~ REGISTERED +VJtRSION ADDS NO ~ % 1 e = l(sum of degrees) = = 3k + 1. (b) =2 (a) Fig. 36. • I.3 2: w. + § g. Corresponding to their chemical valencies.314 Two binary trees with weighted pendant vertices. B. .. . W26). constructing variablelength binary codes. The total number of vertices in su n and the total number of edges is = 3k + 2.5 0. Z) are represented by binary digits. see [36]. = 1. it is a tree.. a binary tree with minimum weighted path length corresponds to a binary code of minimum cost. C.15 0. ~S\E. Since different letters have different frequencies of occurrence (frequencies are interpreted as weights WI' W2.05 0. Since the graph is connected and the number number of vertices. • I.. Thus the prob . a carbon atom was represented by a vertex of degree four and a hydrogen atom by a degree one (pendant vertices).52 TREES AND FUNDAMENTAL CIRCUITS CHAP.7 2: w. ••• . 3 Dime or Nickel penny 0. For more on minimumpath binary trees and their applications the reader is referred to [35] and [37]. 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. where the letters of the alphabet (A.
is called a labeled graph. 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 are counted as four different trees (even though they are isomorphic) only because the vertices are labeled. 315. 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. The distinction between a labeled and an unlabeled graph is very important when we are counting the number of different graphs. no two vertices have the same label). 36 ON COUNTING TREES 53 isomers of a given hydrocarbon becomes the problem of counting trees (with certain qualifying properties.SEC. as in Fig. 315.) A graph in which each vertex is assigned a unique name or label (i.. for instance. we have 16 trees. The reader can satisfy himself that there are no more trees of four vertices. to be sure). the four graphs in the first row in Fig. as shown in Fig. (Of course.e. some of these trees are isomorphicto be discussed later. For instance.
each representing a carbon atom. they go with carbon atoms only one way. these four trees would be counted as one. there are indeed exactly two different types of butanes: nbutane and isobutane. Thus the tree representing CkH2k+2 reduces to one with k vertices. The result was first stated and proved by Cayley. and the other 12 are isomorphic to Fig. But first we shall continue with counting labeled trees.54 TREES AND FUNDAMENTAL CIRCUITS CHAP. B. were no distinction made between A. Theorem 310 is not enough. and hence make no contribution to isomerism. Since the vertices representing hydrogen are pendant. Therefore. and D) is only two. B. It may be noted in passing that the four trees in the first row of Fig. 316). The following wellknown theorem for counting trees was first stated and proved by Cayley. (a) Fig. 316(b). THEOREM 310 The number of labeled trees with n vertices (n > 2) is nn2. or D. As every organic chemist knows. A careful inspection of the graphs in Fig. 2. An excellent summary of 10 such proofs is given by Moon [39]. In this tree no distinction can be made between vertices. Many different proofs with various approaches (all somewhat involved) have been published since. C. Proof. and is therefore called Cayley's theorem. 315 will reveal that the number of unlabeled trees with four vertices (no distinction made between A. 315 are isomorphic to the one in Fig. Thus for butane. two observations should be made: 1. and therefore it is unlabeled. C4H10' there are only two distinct trees (Fig. 316 All trees of four . Unlabeled Trees: In the actual counting of isomers of CkH2k+2. In addition to the constraints on the degree of the vertices. We will give one proof in Chapter 10. 316(a). we need not show any hydrogen vertices. C.
If there are more circuits. some of these subgraphs will be trees.) Finding a spanning tree of a connected graph G is simple. 37. and in a disconnected graph of n vertices we cannot find a connected subgraph with n vertices. Thus a disconnected graph with k components has a spanning forest consisting of k spanning trees. 37 SPANNING TREES 55 The problem of counting trees of different types will be taken up again and discussed more thoroughly in Chapter 10. repeat the operation till an edge from the last circuit is deletedleaving a connected. 2e distinct combinations are possible.SEC. does have a spanning tree. For instance. it is a sort of skeleton of the original graph G. (A collection of trees is called a forest. Out of these trees we are particularly interested in certain types of trees. If G has a circuit. If G has no circuit. Now we shall study the tree as a subgraph of another graph. It is to be noted that a spanning tree is defined only for a connected graph. the subgraph in heavy lines in Fig. delete an edge from the circuit. it is also quite appropriate to call a spanning tree a maximal tree subgraph or maximal tree of G. Since spanning trees are the largest (with maximum number of edges) trees among all trees in G. called spanning treesas defined next. it is its own spanning tree. circuitfree graph that contains G. SPANNING TREES So far we have discussed the tree and its properties when it occurs as a graph by itself. This is why a spanning tree is sometimes referred to as a skeleton or scaffolding of G. 317 is a spanning tree of the graph shown. Each component (which by definition is connected) of a disconnected graph. Since the vertices of G are barely hanging together in a spanning tree. 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. Obviously. This will still leave the graph connected (Problem 210). A given graph has numerous subgraphsfrom e edges. Thus we have . because a tree is always connected. however.
+ § #REGISTERED ~ 0 VERSION ADDS NO . and from Theorem 33. and b. are branches of the spanning tree shown in Fig. For example. 3 THEOREM 311 Every connected graph has at least one spanning tree. 8. a connected graph of n vertices and e edges has n . T and T. b3. bs.. It must be kept in mind that branches and chords are defined only with respect to a given spanning tree.n I. From the definition. d these plots are full of water.56 TREES AND FUNDAMENTAL CIRCUITS CHAP. b6}. if we have a farm consisting of six walled plots of land. C4' CS' C6. what is the minimum number of elements we must remove to eliminate all circuits in the network? The answer is e . that is. Since the subgraph is the collection of chords. In electrical engineering a chord is sometimes referred to as a tie or a link. C2. edges b. while edges Cl. If we have an electric network with e elements (edges) and n nodes (vertices). C3. b2. where T is a spanning tree. 317 (with n == 7.n + I chords. C7. For instance. b4. e = 14). b4. it is quite appropriately referred to as the chord set (or tie set or co tree) of T. 317. and Cs are chords. b3. how many walls will have to be b water can be drained out? Here n = 10 and e =:c:c 15. An edge in a spanning tree Tis called a branch of T. t THEOREM 312 With respect to any of its spanning trees. the graph in Fig. has six tree branches and eight chords with respect to the spanning tree fbi' b2.I tree branches and e . bs. 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. T U T= G. as shown in Fig. Any other spanning tree will yield the same numbers. An edge of G that is not in a given spanning tree Tis called a chord. and T is the complement of Tin G. Similarly. the following theorem is evident.
Then k.k > and e . the first thing he is most likely to mention is n. This i one path between any two vertices of a tree. e > n .I) a circuit is created.10 + 1 = 6) walls such that the remaining nine constitute a spanning tree.) From these three numbers are derived two other important numbers called rank and nullity. 38 FUNDAMENTAL CIRCUITS 57 a set of six (15 . n = e + k. these three numbers n. Therefore. the number of edges in G. G is connected. e .SEC. If k = 1.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. the number of vertices in G. 3. (Needless to mention. 38. except for trivial cases. the number of components G has. Breaking these six walls will drain the water out. these numbers alone are not enough to specify a graph. The rank of a connected graph is n . nullity of G = number of chords in G.I. . n > k. Immediately following comes e. Moreoever. and k are independent. the number of edges in a component can be no less than the number of vertices in that component minus one. it may be observed here that rank of G = number of branches in any spanning tree (or forest) of G. The nullity of a graph is also referred to as its cyc/omatic number. Rank and Nullity: When someone specifies a graph G. and the nullity. How are these three numbers of a graph related? Since every component of a graph must have at least one vertex. Apart from the constraints n . and they are fundamental numbers in graphs. Although the real significance of these numbers will be clear in Chapter 7. creates an additional path. FUNDAMENTAL CIRCUITS You may have noticed that if we add an edge a tree (say.n + k > 0.l .k. rank + nullity = number of edges in G. defined as ° rank nullity r=nk J. in Fig. e. or first Betti number.
only eight are fundamental circuits. [bl' b2. 31 say c. the circuits that become fundamental change with the spanning trees. In many applications we require all way to generate spanning trees of a graph is tree. in most applications we are not interested in all the circuits of a graph. b6. is of enormous significance in electrical network analysis. we get a subgraph [bl' b2. we would have obtained a different fundamental circuit. A given circuit may be fundamental with respect to one spanning tree. What Kirchhoff showed. Adding anyone chord to T will create exactly one circuit. Although there are 75 circuits in Fig. b3.58 TREES AND FUNDAMENTAL CIRCUITS CHAP. b.n k).. Two comments may be appropriate here. c2l has not only the fundamental circuits we just mentioned. Such a circuit. The concept of a fundamental circuit. Although the number of fundamental circuits (as well as the total number of circuits) in a graph is fixed. which is not a fundamental circuit. C Il. cll. 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. b4. but it has also a third circuit. fb2. FINDING ALL SPANNING TREES OF A Usually. in a given connected graph there trees. say tree TI (a b cd in Fig. b3. + s. b3. is that no matter how many circuits a network contains we need consider only fundamental circuits with respect to any spanning tree. How many fundamental circuits does a graph have? Exactly as many as the number of chords. Adding CI to it. 317. is called afundamental circuit. Suppose that we add one more chord. of some fundamental circuits. but only in a set of fundamental circuits. c2l. b6l in Fig. 3 Let us now consider a spanning tree T in a connected graph G. Add a forms a fundamental circuit (b c h d in Fig. Had we added the chord C2 (instead of C I) to the tree. b6. How many circuits does a graph have in all? We know that one circuit is created by adding anyone chord to a tree. First.. C1. which fortuitously are a lot easier to track. from the fundamental circuit b c h d jus . The rest of the circuits (as we shall prove rigorously in Chapter 7) . b3. fbI' C I' c2l. 317 (enumerated by computer). bs. but not with respect to a different spanning tree of the same graph. introduced by Kirchhoff. Second. which now every sophomore in electrical engineering knows. each formed by one chord (together with the tree branches). formed by adding a chord to a spanning tree. b4. bs. 39. Jl (= e . 319). The subgraph [bl' b2. Now suppose that we add both chords C I and C2 to the tree. b4. a circuit is a fundamental circuit only with respect to a given spanning tree. s. bs. which has one circuit (fundamental circuit).
is the subgr G that are either in T. each with chord h in it. 10. (Such a transformation is a standard operation in the iteration sequence for solving certain transportation problems. and add a different chord (e. as the number of edges of G present in one tree distance may be written as d(Ti' Tj).) In the above procedure. is there a preferred arting? Let us try to answer some of these questions. but not in b of edges in a graph g. For ins Let T. EB T. EB TJ be the ring sum of two defined in Chapter 2.f. finding an efficient procedure for generating all trees of a graph is a very important practical problem. Thus we have a procedure for generating spanning trees for any given graph. T. Moreover. is called a cyclic interchange or elementary tree transformation. we could have deleted d or b and thus would have obtained two additional spanning trees abc h and a c h d. after generating these three trees. 39 FINDING ALL SPANNING TREES OF A GRAPH 59 c d c d h Fig. 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. or in T. and II. Therefore. The distance between two spanning trees T. 319 Graph and three of its spanning trees. spanning tree Tz• This generation of one spanning tree from another. others wil il Chapters 7. . instead of deleting branch c. through addition of a chord and deletion of an appropriate branch. Then. from definition. the topological analysis of a linear electrical network essentially reduces to the generation of trees in the corresponding graph. The procedure outlined above raises many questions. we can restart with T.SEC. As we shall see in Chapter 13. or g) and repeat the process of obtaining a different spanning tree each time a branch is deleted from the fundamental circuit formed.
. of r + I vertices) a spanning tree has r edges. T THEOREM = air. THEOREM 314 The distance between the spanning trees of a graph is a metric. T j} k} t «r. air. The reader is encouraged to prove the following two theorems. if p. it satisfies d(T. in general. Since in a connected graph G of rank r (i.. we can obtain every spanning tree of G by successive cyclic exchanges. T). Also. TJ > 0 and j} d(1t.. A central tree in a graph is. 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. Tj) = 2" max I N(T. where min(p" r) is the smaller of the two numbers p. Tj) is the minimum number of cyclic interchanges involved in going from T. j Tj) REGISTERED tree W#SION rating % The concept of a central tree is useful in graph. That is. T act. 1'.60 TREES AND FUNDAMENTAL CIRCUITS CHAP. == Tj. Hence combining the two.. we have the following results: The maximum distance between any two spanning trees in G is max d(T.) < max d(T. 3 It is not difficult to see that the number d(T. we know that no more than fl edges of a spanning tree T. = 0 if and only if T. Tree Graph: The tree graph of a given graph alAQQSrNQyen 4NJfTeRMARK CJO e . can be replaced to get another tree T'. to T'. T < act. EB T) < r. 315 Starting from any spanning tree of a graph G. tral trees the reader should see [31] and [34]. is the nullity of G.e. T) i}. the rank of G.
the reader should see [33]. be a spanning tree in G satisfying the hy there is no spanning tree at a distance of one from . the tree graph of any given (finite.e.. 310 SPANNING TREES IN A WEIGHTED GRAPH 61 which each vertex corresponds to a spanning tree 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. one with the smallest weight is of practical significance.. different spanning trees of G will have different weights. all spanning trees have a weight of n . in a graph of n vertices in which every edge has unit weight. If graph G is a weighted graph (i. In general. 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). For additional properties of tree graphs.. connected) graph is connected.. One possible application of the shortest spanning tree is as follows: Suppose that we are to connect n cities VI' V2.SEC. It is immediately evident that this connected network must be a tree: otherwise. Among all the spanning trees of G. then the weight of a spanning tree T of G is defined as the sum of the weights of all the branches in T. Let T. The cost cij of building a direct road between Vi and Vj is given for all pairs of cities where roads can be built. 310. for instance. SPANNING TREES IN A WEIGHTED GRAPH As discussed earlier in this chapter.1 units. n. 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. A spanning tree T(of a given weighted con .. (There may be pairs of cities between which no direct road can be built. (There may be several spanning trees with the smallest weight.) The problem is then to find the least expensive network that connects all n cities together. ••• . we can always remove some edges and get a connected graph with smaller weight. if there is a real number associated with each edge of G). and each edge corresponds to a cyclic interchange between the spanning trees of G represented by the two end vertices of the edge. Vn through a network of roads. Therefore. a spanning tree in a graph G is a minimal subgraph connecting all the vertices of G. 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 £"~ ..
62 TREES AND FUNDAMENTAL CIRCUITS CHAP. both by hand and by computer. t_dr\~e e . ••• . Because of the minimality assumption on T 2 weight of bj cannot be less than that of e. but not all. and these edges will constitute the desired shortest spanning tree. must form some fundamental circuit (with respect to T 2) containing e.. of the branches in Ts that form the fundamental circuit with e may also be in T2. Another algorithm. (Note that the entries in the table are spect to the diagonal.sest neighbor (i. no spanning tree shorter than T exists in the graph. draw n isolated vertices and label them VI' V2 •••• . each a unit distance closer to T 2. and it satisfies the condition of Theorem 316. has the same weight as T i. and subgtViDRSKlftl. iS~1S~R~tf1% 'z ~. = (T1 Ue . T 1. Ti. and Vi' as one subg dW. producing a series of trees of equal weight. Start from vertex VI and connect it to it vertex which has the smallest entry in row I ble). 3 The proof will be completed by showing that if T2 is a shortest spanning tree (different from Tl) in G. the weight of TI will also be equal to that of T2• Let T2 be a shortest spanning tree in G. The validity of the method follows from Theorem 316. • Algorithm for Shortest Spanning Tree: There are several methods available for actually finding a shortest spanning tree in a given graph. Consider an edge e in T2 which is not in Ti. Hence the spanning tree T. 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. This proves that if none of the spanning trees at a unit distance from T is shorter than T.0 until all n vertices have been connected by n this method of finding a shortest spanning tree. Next. violating the assumption that T2 is shortest). Let this be Vi' ~exrtegah1 the tree with vertices VI> Vk. For Prim's algorithm. say bj. Then for each successive step select (from all remaining edges of G) another smallest edge that makes no circuit with the previously selected edges. One algorithm due to Kruskal [38] is as follows: List all edges of the graph G in order of nondecreasing weight. say vk.) existent edges (corresponding to those pairs of cit' road can be built) as very large.e. Clearly.1 edges have been selected.vn' Tabulate the given weights of the edges of G in an n by n table. select a smallest edge of G. obtained from T 1 through one cycle exchange. until we get T 2 itself. Therefore bj must have the same weight as e. is due to Prim [310]. to a vertex other than VI that has jfn'tJ:~IWrf1try among all entries in rows I and k).Adding e to Ti forms a fundamental circuit with branches in Tl• Some. Continue until n .But T 1 has one edge more in common with T 2. because of the assumption on T1• Amongst all those edges in this circuit which are not in T 2 at least one. This argument can be repeated.bj). 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.'f:fow consider VI and vk as one subgraph. and the diagonal is empty. each of these branches in TI has a weight smaller than or equal to that of e. T 1.iTERWhA~ Let us now illustratt.
320(a) in heavy lines. 310 SPANNING TREES IN A WEIGHTED GRAPH 63 V6 VI V2 V3 V4 Vs Vs 10 VI 10 10 16 II 16 9. (V4' v3). 320(b). The weight of its edges is tabulated in Fig. and (v3. in an electrical wiring problem. the problem may be stated as neeted graph G. can end up with any degree. that is. A connected weighted graph with 6 vertices and 12 edges is shown in Fig. find a shortest spanning tree d(vJ < k for every If k = 2. In some practical cases an upper limit on the degree of every vertex (of the resulting spanning tree) has to be imposed.5 12 (b) 7 9 (a) Fig. 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.5 II oo 10 oo oo 17 19. The three remaining edges selected following the above procedure turn out to be (V4' v6). this problem. reduces to the pro Hamiltonian path. as well as the travelingsal . in fact. in this particu d(vJ <3 Such a spanning tree is called a degreeconstra In general. a vertex u. The resulting treea shortest spanning treeis shown in Fig. 320(a).SEC.I.5 units. which is either (VI' v2) or (vI' vs). The weight of this tree is 41. v2) in that sequence. Thus. DegreeConstrained Shortest Spanning Tree: In a shortest spanning tree resulting from the preceding construction. I < d(vJ < n . 320 Shortest spanning tree in a weighted graph. We start with VI and pick the smallest entry in row I.5 12 7 9 v2 v3 v2 v4 Vs v6 95 oo oo 7 7 oo 8 8 10 17 19. Let us pick (vpvs)' [Had we picked (VI' v2) we would have obtained a different shortest tree with the same weight. For instance.] The closest neighbor of subgraph (VIl vs) is V 4' as can be seen by examining all the entries in rows 1 and 5.
For treatment of distance between refer to Deo [34] and Amoia and Cottafava [31]. CT18. Chapters 4. such as labeled and unlabeled. and tree graphs. were also introduced and studied. and so is the problem of finding a shortest spanning tree in a given weighted graph. 4. July 197 . trees form the most important topic in graph theory. and also see references given' elegant algorithm for finding a binary tree with minim given by Huffman in [36]. 3 salesman returning to his home base). 3. SUMMARY This chapter dealt with a particular type of connected graph called a tree. AMOIA. and fundamental circuits will continue to appear from time to time in most of the succeeding chapters. and 631. Because of their wide applications. such as centers. distance between spanning trees.4 and 6. Harary [15]. Circuit Theory. Chapters 12. REFERENCES Every textbook on graph theory has a chapter or two on trees. discussed at the end of Chapter 2. and diameter of a tree. Finding all spanning trees of a given graph is of great practical importance. On algorithms for genera in this book and the references cited there. Of special interest are those trees that are subgraphs of a given connected graph G containing all vertices of G. 31. 5. COTTAFAVA. Such trees are called spanning trees of G. were discussed. For counting trees of of Riordan's book [311]. Sections 18.619. studied by Cummins [33].. Ore [19]. and Appendix 3. So far.622. The importance of trees in information storage and processn book [37]. pages 305422. Especially recommended are 1. V. radius. branches and chords. spanning trees. 15. 13. Trees.5.26. and in [32]. rank and nullity of a graph. Chapter 4. Moon [39] g formula for counting trees.64 TREES AND FUNDAMENTAL CIRCUITS CHAP. Kruskal's [38] and Prim's study of shortest spanning trees. Appendix 3 in Harary's with n < 10. fundamental circuits. Chapter 3. Invariance Pro " Trans.37.4. together with their properties and applications. Busacker and Saaty [12]. Vol. and G. Ore [110]. Berge [11]. Other related concepts. cyclic interchange. Different types of trees.36. no efficient method of finding an arbitrarily degreeconstrained shortest spanning tree has been found. and 16. rooted and unrooted. 2. No. Sections 2.
D. T. and 5. TUCKER.). L. [Hint: Distribute the 11 vertices levels. and 5. (F.4. and D. J. Explain."Optimal Binary Search Tree. 38. It can be shown that there are only six different (nonisomorphic) Two such trees are given in Fig. Draw all trees of n unlabeled vertices for n = 1. 312. No. Vol... trees of six vertices. 1958. How many isomers does pentane CSH12 have? Hexane. "A Central Tree. Madison. 311.4850." Proc.CHAP. C6 Suppose you are given eight coins and are told that weight. "On the Shortest Spanning Subtree of Graph and the Traveling J Salesman Problem.J.. Draw the other four.E. ed. 32. Show a tree in which its diameter is not equal to twice the radius. Holt. 21.4... PROBLEMS 31. "A Method for the Construction of MinimumRedundancy Codes. 39. Reading. 1967. 1957. A.. 37. March 1966.. The Art of Computer Programming. Vol. Vol.2. Mass. 7078. Vol. and A.. "Shortest Connection Networks and Some Generalizations. C. 310. and two of them are shown in Fig. Inc. "Hamiltonian Circuits in Tree Graphs. PRIM. 24." Chapter II in A Seminar on Graph Theory. University of Wisconsin. Inc. KRUSKAL. 39. 2. 40. Rinehart and Winston.. Circuit Theory. .] Sketch all spanning trees of the graph in Fig. Hu. 1967. 1049. New York. 34.. C. Dec. and one coin is either heavier or lighter t with an equalarm balance.4. 1. . N.... Sketch a strategy in the form of a .. 1968. 36. I.. Nov. 35.R. E. 311. 21. Cite three different situations (games.. D. John Wiley & Sons. 3. RIORDAN. 36." Bell System Tech.. KNUTH... 13891401.. 1956.1. 3 PROBLEMS 65 32. 3. Math." MRC Report No. 439440. CT13. New York. 34." IEEE Trans.R. Sept. 1. "Various Proofs of Cayley's Formula for Counting Trees. Observe that level 0 has exactly one level 2 can have either two or four vertices. 4. 33. 10981101. R. New York. 7. activities. 37. . Circuit Theory. An Introduction to Combinatorial Analysis.J. or problems) that can be represented by trees. 38. Am." IEEE Trans. Under what condition does this inequality hold? Elaborate. 310. Show that a path is its own spanning tree. Draw all unlabeled rooted trees of n vertices for n = 1. Vol. 36. 313. Draw all trees of n labeled vertices for n = 1. COLLINS.) Machine Intelligence. March 1970... CT13. Dec. forming coin. 3. Inc." Proc. American Elsevier N Publishing Company. L. Appl. B. Vol.. MOON. Jr. 1952." ". also in SIAM J. AddisonWesley Publishing Company.. Math.. 35. as well as for finding out whether Sketch all (unlabeled) binary trees with six of each. . No. Inc. . DEO. which you may use coins. C.4. CUMMINS.. 33. Harary.2. No. Soc. HUFFMAN. 1971.514532... Vol. MICHIE(eds.8290.. and 5. Vol. Prove Theorem 34. W. 1966.
_ q VERSION ian circu 332. edge belongs to some circuit. observe t covered by R. Cummins). 329. 328. 318. 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 circuit in a graph G must have at least one edge in common with a chord set. but not in T2. other ed~ilj){)50M(i)t no 333. t_dr\~e . 316. 321. TREES AND FUNDAMENTAL CIRCUITS CHAP. 322. Are these conditions sufficient also? Let v be a vertex in a connected graph G. 314. 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. In the tree graph obtained in Problem 329. b6} in Fig. 324.. respectively. List all fundamental circuits with respect to this new spanning tree. 331. Construct a tree graph (with 16 vertices. A tree graph has at I and an arbitrary edge of a tree graph can be incl In a given connected weighted graph G. 319. such that no edge in the tree has both of its end vertices of the same color. and T2 be two spanning trees of a connected graph G.e) U f and (T2 . prove that there exists another edge f in T2 but not in T. Find a spanning tree at a distance of four from spanning tree {bI. . 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. bs.) Suppose that you are given a set of n positive integers. (This fact is expressed by the statement that the chromatic number of a tree is two. 325. 317. 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. 330. Show that the distance between two spanning trees as defined in this chapter is a metric. each corresponding of a labeled complete graph of four vertices. 315) 323. State some necessary conditions of this set so that the set can be the degrees of all the n vertices of a tree. such that subgraphs (T.Y:t u. Prove Theorem 313. Let T. tree in G must contain e. 317. 315. Show by constructing counterexamples that i cannot be said of the second smallest and the to a tree in Fig. If edge e is in T. L. bs.f) U e are also spanning trees of G. 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. s weight is smaller than that of any other in G. 320. 326. What is the nullity of a complete graph of n vertices? Show that a Hamiltonian path is a spanning tree. 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. Prove that two colors are necessary and sufficient to paint all n vertices (n > 2) of a tree. or remove a vertex of degree two by merging two edges incident on it.. (J ~. b2. Prove thatany given edge of a connected graph G is a branch of some spanning tree of G.66 313. b4. 327. t~'IS'ft. ~A'I~RMt6B~O~ edges.B"J:.
as outlined in this chapter. and (b) Prim's method. Use the algorithm ofKruskal. Pick 15 large cities in the United States and obtain the 105 intercity distances from an atlas. 320(a). to find a shortest spanning tree in the graph of Fig. 3 PROBLEMS 67 334. Find the shortest spanning tree connecting these cities by using (a) Kruskal's method.CHAP. 335. . Compare their relative efficiencies.
and vulnerability of graphs. on . a cutset is a set of edgest whose removal from G leaves G disconnected. such as fa. 41 the set of edges fa. Edge f k} alone is also a cutset. fa. c. because one of its proper subsets./}. b. Sometimes a cutset is also call the term cutset./} is a cutset. 41. b. h}. To emphasize the fact that no proper subset some authors refer to a cutset as a minimal simple cutset./}. in Fig. Properties of cutsets and their applications will be covered. c. will also be discussed. There are many other cutsets. A cutset always "cuts" a graph into two. Other related topics. The rank of t +Since a set of edges (together with their end verti set in G is a subgraph of G. e. For instance. such as connectivity. 68 . 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. CUTSETS In a connected graph G. . fa. defined as a minimal set of edges in a conn the rank of the graph by one. h. h. provided removal of no proper subset of these edges disconnects G. and fd. The set of edges fa.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. t a cutset. g}. separability. c. d}.
every edge of a tree is a cutset. We look at all cutsets of the graph. vs}.41 Removal of a cutset fa. (Note that one or both of these two subsets of vertices may consist of just one vertex. in Fig. 4. d. 41(a).) Since removal of any edge from a tree breaks the tree into two parts. stance. that the six vertices in Fig. is four.I(a) represent six cities connected by telephone lines (edges). 42 SOME PROPERTIES OF A CUTSET 69 g h V2 _t___4t f I / I I (a) (b) Fig. 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. removal of the cutset nect the graph. the properties of cutsets. f} from a graph "cuts" it into two. one less than that of the graph in Fig. t_dr\~e e . for example. the city represented by vertex V3 can be network by the destruction of just one edge. a cutset is a minimal number of edges whose removal from G destroys all paths between these two sets of vertices. SOME PROPERTIES OF A CUTSET Consider a spanning tree T in a co set S in G. d. and the one with the smallest number of edges is the m 'g. For example. 41(a) cutset {a.f} connects vertex set {v" v2' v6} with {V3' V4. c.1(a).SEC. Therefore. c. Cutsets are of great importance in studying properties of communication and transportation networks. Is it possible for S not to have any answer is no. 4. REGISTERED VERSION J!DDS NO G and an arBitrary cut % cWAaiiSRMA/ti( would not disconClO ~. We wish to find out if there are any weak spots in the network that need strengthening by means of additional telephone lines. Suppose. Otherwise.
 traversed along t Fig.. If all the vertices in r are entirely within vertex set VI (or V2). 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.... will any minimal set of edges containing at least one branch of every spanning tree be a cutset? The answer is yes..70 CUTSETS AND CUTVERTICES CHAP. \ \ I I \ I I \ \ \ \. V. any edge e from Q returned to G . let Q be a minimal set of edges containing at least one branch of every spanning tree of G. the subgraph that remains after removing the edges in Q from G. . on the other hand. 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../ / ".Q e will be a connected graph. G .. since Q is a minimal set of edges with this property. N(g) stands for the number of edges in . any minimal set of edges containing at least one branch of every spanning tree of G is a cutset. an even nurnber..] If. that is. Also.. Hence + THEOREM 42 In a connected graph G. is a cutset. S .... Therefore. Proof: Consider a cutset S in graph G (Fig. by the following reasoning: In a given connected graph G.Q contains no spanning tree of G.Q is disconnected (one component of which may just consist of an isolated vertex)..__ . by definition. Q is a minimal set of edges whose removal from G disconnects G. 42)... we traverse . Since the subgraph G . This..l ". Will the converse also be true? In other words. some vertices in r are in VI and some in V2..Q will create at least one spanning tree. N(S Ii T) = 0. the number of edges common to Sand r is zero... Thus the subgraph G . Consider G .Q.. . 4 THEOREM 41 Every cutset in a connected graph G must contain at least one branch of every spanning tree of G.
and the rest (if any) of the edges in S are chords with respect to T. Cutset S will contain only one branch b of T. Consider the same partition of vertices in G. 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. a spanning tree \ \ I I \ \ d Fig. • 43. Just as a spanning tree is essential for defining a set of fundamental circuits. 43 ALL CUTSETS IN A GRAPH 71 back and forth between the sets VI and V2 as we traverse the circuit (see Fig. Take any branch b in T. For this purpose we list all cutsets of the corresponding graph. Because of the closed nature of a circuit. ALL CUTSETS IN A GRAPH In Section 41 it was shown how cutsets are used to identify weak spots in a communication net. Sometimes a fundamental cutset is also called a basic cutset. Fundamental CutSets: Consider a spanning tree T of a connected graph G. 41. 43 Fundamental cutsets of a . Such a cutset S containing exactly one branch of a tree T is called a fundamental cutset with respect to T. 42). And since very edge in S has one end in VI and the other in V2. and the cut set S in G that corresponds to this partition. In Fig. and we must have a systematic method of generating all relevant cutsets. 43. and find which ones have the smallest number of edges.SEC. It will be beneficial for the reader to look for the parallelism between circuits and cutsets. such as in Fig. We shall follow a similar strategy here. fb} partitions all vertices of T into two disjoint setsone at each end of b. Since fb} is a cutset in T. so is a spanning tree essential for a set of fundamental cutsets. there is a large number of cutsets. the number of edges we traverse between VI and V2 must be even. In the case of circuits. and no other edge in G has this property (of separating sets VI and V2). the number of edges common to Sand r is even. It must also have become apparent to you that even in a simple example.
b} EB {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. e.f} {a. 44(c). h} g. g. g. {a. and this by definition is the same as the ring sum Vi EB V3• Similarly. there are no edges outside SI EB S2 that join vertices in Vs to those in V6• Thus the set of edges S. THEOREM 44 The ring sum of any two cutsets in a graph is either a third cutset or an edgedisjoint union of cutsets. k} = {d. c. . Example: In Fig. EB {f.f}. every branch of a spanning tree defines a unique fundamental cutset. e. g.f} = = {d. Just as every chord of a spanning tree defines a unique fundamental circuit. VI U V2 = = V and V and VI V3 U V4 V3 n n V2 = 0. h. e. {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. 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.72 CUTSETS AND CUTVERTICES CHAP. h}. e. h} EB {b. 4 T (in heavy lines) and all five of the fundamental cutsets with respect to T are shown (broken lines "cutting" through each cutset). 43 let us consider ring su of cutsets. {d. Outline of Proof: Let SI and S2 be two cutsets in a given connected graph G. e. k} union of cutsets. Now we shall show how other cutsets of a: graph can be obtained from a given set of cutsets. e. which is the same as V2 EB V3• See Fig. let the subset (VI n V3) u (V2 n V4) be called V6. V4 = 0.f. Othe disjoint union 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. c. 44(a) and (b)]. Now let the subset (VI n V4) u (V2 n V3) be called Vs.
So we have a method of generating additional cutsets from a number of given cutsets. r = tc.~~ a chord ade by ct4K1t{1't!lt/tI. Obviously. \ \ _ / /' I I I (b) (c) Fig.. we cannot start with any two cutsets in a given graph and hope to obtain all its cutsets by this method. h2.. 44..../ .Qon REGISTERED VERSION ~ % cWAcre'RMsARK respect to T. hI' h2. ••• ._. in addition graph G. ••• . 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.SEC. 44 Two cutsets and their partitionings. '" . hk} is a fundamental eire Every branch of any spanning tree has a fundamental e ~~ o e .... L~k. and let the fundamental circ sisting of k branches b.. FUNDAMENTAL CIRCUITS AND CUTS Consider a spanning tree T in a given con with respect to T. c. 44 fUNDAMENTAL CIRCUITS AND CUTSETS 73 (a) ~ .. // ~.. b.. . I \ I / / / .
. to be in any other fundamental cutset S' (with respect to T. k}. THEOREM 45 With respect to a given spanning tree T. Is it possible for the chord c. that determines a fundamental circuit r occurs in every fundamental cutset associated with the branches in r and in no other. and in no others. S. ? The answer is no. and b. of course) besides those associated with bp b2. consider the spanning tree {b. common to S I and r. h. Otherwise (since none of the branches in T are in S'). ••• .74 CUTSETS AND CUTVERTICES CHAP. {f. that is. common to S' and T. The three fundamental cutsets determined by the three branches e. Because of Theorem 43. a contradiction to Theorem 43. 43. = {bp Cp C2. The fundamental circuit made by chord f is [f. e. 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. ••• .f}. h. THEOREM rd. k}. .cq} is a fundamental cutset with respect to T. As an example. ••• and b. Therefore. in Fig. Let S 1 be the fundamental cutset associated with b I' consisting of q chords in addition to the branch b 1 . we must have two edges b I and c. there must be an even number of edges common to rand Sl' Edge bl is in both rand St. h. there would be only one edge c. cq• Exactly the same argument holds for fundamental cutsets associated with b2. e. Thus we have an important result. a chord c. b3. g { 46 ADDS NO With respect to a given spanning tree T. c. and there is only one other edge in r (which is cJ that can possibly also be in SI' Therefore. Thus the chord c. is one of the chords C I' C2. 4 it. ••• . shown in heavy lines. a mental cutset S is contained in every fundamen chords in S. e. the chord Ci is contained in every fundamental cutset associated with branches in r.
C3. consider branch e of spanning tree fb. 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. The same is true for the fundamental circuits made by chords C2. e. k}.• . ••• . and three. e}. the edge connectivity of a connected the minimum number of edges whose removal rank of the graph by one. 43. The fundamental cutset determined by e is [e. e. d. Branch e is contained in both these fundamental circuits. Hence the theorem. 45 CONNECTIVITY AND SEPARABILITY 75 The proof consists of arguments similar to those that led to Theorem 45. •. C2. CONNECTIVITY AND SEPARABILITY Edge Connectivity: Each cutset of a connected graph G consists of a certain number of edges. Let the fundamental cutset S determined by a branch hi be Proof. ••• . 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. . c. suppose that hi occurs in a fundamental circuit rp « 1 made by a chord other than c" C2.SEC. The edge connectivity The edge connectivities of the graphs in Figs. h. ff. 45. cp is in rs+ I. CpOn the other hand. h. which is not possible. hi must be in r I. there is only one edge hi common to a circuit rp+ 1 and the cutset S. The number of edges in the smallest c set with fewest number of edges) is defined as the Equivalently. c. and none of the remaining three fundamental circuits contains branch e. some authors define both the edge a disconnected graph as zero. The two fundamental circuits determined by chords d and j are determined by chord d: determined by chord j: fd.j}. k}. cpo Since none of the chords CI. • Turning again for illustration to the graph in Fig. respectively.
4 Fig. All other connected graphs are called nonseparable. It can be shown (Problem 418) that in a tree every vertex with degree greater than one is a cutvertex. That these two definitions are equivalent can be easily seen (Problem 47). Separable Graph: A connected graph is said to be separable if its vertex connectivity is one. the en in the graph. In a separable graph a vertex whose removal disconnects the graph is called a cutvertex.t Again. and one. 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. 75. and 45 are 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. 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). respectively. 41(a) vertex V4 is a cutvertex. and in Fig. For example. graph. the removal of the single vertex v does. tSee the footnote on p. 41(a). 45 the vertex v is a cutvertex. because without both the end vertices an edge when we delete or remove an edge from a graph. 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. we define another analogous term called vertex connectivity.t Therefore. .76 CUTSETS AND CUTVERTICES CHAP. 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. a cutnode. in Fig. The vertex connectivities of the graphs in Figs. 43. the vertex connectivity of a tree is one. or an articulation point. 45 Separable graph. two.
45 has n = 8. the remaining stations can still continue to "communicate" with each other. 46. tunnels. 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. For example.I. 46 edges.ltlt§ntle[Jvity Let rx denote the edge connectivity of G. e = 16. 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. railroads. 45 CONNECTIVITY AND SEPARABILITY 77 Fig. Proof: WATERMARK sV thf. In other words. Let S partition the vertices By removing at most rx vertices from VI (or V2) on which t there exists a cutCJO e .SEC. Let vertex Vi be the vertex with the smal the degree of 1'j. the graph in Fig. Thus the network of Fig. 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. respectively) can be drawn as shown in Fig. or highways) where e > n . bridges. or any three lines destroyed. Vertex Vi can be separated from incident on vertex 'I'i' Hence the theorem. It can easily be seen that the edge connectivity as well as the vertex connectivity of this graph is four. set Sin G with rx edges. Another graph with the same number of vertices and edges (8 and 16. 45 (although both consist of the same number of Jines16). Consequently. 46 is better connected than that of Fig. and has vertex connectivity of one and edge connectivity of three. construct a graph with n vertices and e edges that has the maximum possible edge connectivity and vertex connectivity. • Proof: THEOREM 49 exceed The vertex connectivity of any graph G can ofG. THEOREM 48 The edge connectivity of a graph G cannot exceed the the smallest degree in G. even after any three stations are bombed.
+Paths with no common vertices. except the two t secting paths or vertexdisjoint paths. maximum . ly if ever~ER>Stf!)Hs in that may intersect. that is.78 CUTSETS AND CUTVERTICES CHAP.1) is the integral part of the number 2e/n. and 410 can be summarized n as follows: ivitv c. but have is joineADQSINQge . 49. p no edges in common). for example. therefore. t and at is joined by exactly k nonintersecting 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 . The vertex connectivity of G cannot exceed this number. The completion of the proof is left as an exercise. Therefore. • COROLLARY Every cutset in a nonseparable least two edges.<2e vertex connectivity _ ed ge connectivity _ .e. e . To show that this value can actually be achieved. and . THEOREM 41 1 A connected graph G is kconnected if and only if joined by k or more paths that do not intersect. 45 and 46). vertex connectivity POSSI ible = l2eJ ' Ii Thus. L2e/nJ..(n/2)· L2e/nJ edges arbitrarily. one can first construct an nvertex regular graph of degree L2e/nJ and then add the remaining e . a Iconnected graph is the same as a separable graph. Proof: Every edge in G contributes two degrees. Hence the theorem. and at least one pair of disjoint paths. 4 we can effect the removal of S (together with all other edges incident on these vertices) from G.. for a graph with 8 vertices and 16 edges (Figs. in light of Theorems 48 and 49. there must be at least one vertex in G whose degree is equal to or less than the number 2e/n. we can achieve a vertex connectivity (and therefore edge connectivity) as high as four (= 2· 16/8). A graph G is said to be kconnected if the vertex connectivity of G is k. THEOREM 412 § REGISTERED ~ % The edge connectivity of a graph G is k if G is joined by k or more edgedisjoint paths (i. • The results of Theorems 48. The total (2e degrees) is divided among n vertices.
railroads. number of messages. water.5 6 Fig.SEC. The graph in 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). 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. the lines are lossless. there is no accumulation or generation of the commodity at any vertex along the way. highways. 47 . it is important to know the maximum rate of flow that is possible from one station to another in the network. In other words. pipelines of oil (or gas or water). for example. associated with each edge represents the capacity of the line. It is assumed that at each intermediate vertex the total rate of commodity entering is equal to the rate leaving. NETWORK FLOWS In a network of telephone lines. and so on. In other words. gas. Finally. a real positive number. the flow through a vertex is limited only by the capacities of the edges incident on it. B 3 2. Note that our definition of kconnectedness is slightly different from the one given in [I5]. the maximum amount of flow possible per unit of time.) flows. The capacity of each of these lines is also indicated in the figure. 46 NETWORK FLOWS 79 The reader is referred to Chapter 5 of [15] for the proofs of Theorems 4] I and 4]2. represents a flow network consisting of 12 stations and 31 lines. 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. that is. 46. the vertex itself can handle as much flow as allowed through the edges. number of cars. 43. etc. The weight. Furthermore. 47.
where flow pro d in much greater detail. (Sol1}f~WJ~the ents ~~~onn~ted ~.0 0" ~~ A separable graph consists of two or mo of the largest nonseparable subgraphs is called term component. 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.) The graph graph in Fig. What is the maximum flow possible through the network between a specified pair of verticessay. S\E. determine the actual flow through each edge when the maximum flow exists)? Theorem 413. 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. and c).e. we shall use the term block. t_dr\~e e . In the subgraph G . but to avoid confusion with graph.e.f'] is a cutset with respect to VI and V6• The set [J. let us define a few terms. To facilitate the statement and proof of the theorem. each bloc1t. hJ is also a cutset with respect to V 1 and V6• But the cutset [J. e.RED V.80 CUTSETS AND CUTVERTICES CHAP. 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. 48 has five blocks (and three cutve eparabIMSSS/6/flach k.. Hence the total flow rate between these two vertices cannot exceed the capacity of S. Therefore. Proof" Consider any cutset S with respect to vertices a and b in G. The second question is answered implicitly by a constructive proof of the theorem. 47. 47? 2. answers the first question. Since this holds for all cutsets with respect to a and b. 1ISOMORPHISM § #REGISTERED ~ % WAtlNERNlARtK b. For instance. It requires some concepts that are to be introduced later. 43 cutset [d. The proof will therefore be deferred till Chapter 14. from B to M in Fig. the flow rate cannot exceed the minimum of their capacities. g. perhaps the most important result in the theory of transport networks. 4 In such a flow problem the questions to be answered are I. How do we achieve this flow (i. • To show that this flow can actually be achieved is somewhat involved. in Fig. separates vertices a and b). Thus every flow from a to b (or from b to a) must pass through one or more edges of S.. every path in G between a and b must contain at least one edge of S.S (the subgraph left after removing S from G) there is no path between a and b. g.
. 49.. " / Fig. 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. t_dr\~e e . Note that a nonseparable connected graph consists of just one block. 47 IISOMORPHISM 81 / / " . is shown enclosed by a broken line. 49 Disconnected graph lisomorphic to Fig. but they are related by the fact that the blocks of the graph in Fig... THEOREM 414 k of REGISTERED VERSION rable graphs are l~ % If Gland G2 are two Iisomorphic graphs. whenever a cutvertex c. ~QQ~eJ)LQ of WATERMARK h G is "split" int<tl° ~. I "\ \ \ \ I I \ \ \ I <. t G2 and the nullity of G I equals the nullity of G2• Proof: Under operation 1.. From this definition it is apparent that tw isomorphic if and only if they are isomorphic. <. • • Fig. 48.. " ". 48. 49 with the one in Fig. \ \ / /' _. ' . 48 are isomorphic to the components of the graph in Fig... These two graphs are certainly not isomorphic (they do not have the same number of vertices).. .. / . / .SEC. 48 Separable graph with three cutvertices and five blocks . \b / .. Visually compare the disconnected graph in Fig. I I I / / / "  " \ I' ..
48 and 49. graphs Iisomorphism is different from isomorphism are also Iisomorphic. Iisomorphism for nonseparable gra However. 48. the graph in Fig. Two graphs with equal rank and with equal numbers of edges must have the same nullity.. 49. 410. since no edges are destroyed or new edges created by operation 1. but Iisomorphic graphs generalized isomorphism is very useful in the stu . 48. • Fig. these two graphs are also Iisomorphic. because nullity =:: number of edges . the rank of G which is number of vertices in G . 410 are isomorphic to the blocks of the graph in Fig. 410 Graph 1isomorphic to Figs. 410 is Iisomorphic to the graph in Fig.number of components in G remains invariant under operation 1.82 CUTSETS AND CUTVERTICES CHAP. Thus the three graphs in Figs. 48.rank. for separable graphs (i. 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. Therefore. Clearly. Also.e. two Iisomorphic graphs have the same number of edges. 2ISOMORPHISM In Section 47 we generalized the concept Iisomorphism. the number of components in G increases by one. • What if we join two components of Fig. and 410 are Iisomorphic to one another . 4 two vertices. 49. 49 by "gluing" together two vertices (say vertex x to y)? We obtain the graph shown in Fig.
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 .) Two graphs are said to be 2isomorphic if they become isomorphic after undergoing operation I (in Section 47) or operation 2..SEC. Suppose that we perform the following operation 2 on G (after which. but in (d) no vertex is of degree four. 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. or both operations any number of times. in common. But 2isomorphic graphs are not necessarily Iisomorphic. 48 2ISOMORPHISM 83 We can generalize this concept further to broaden its scope for 2connected graphs (i. and Iisomorphic x y (a) (b) (c) Fig.e. Fig. of course. From the definition it follows immediately that isomorphic graphs are always Iisomorphic. x and y. Note that in (a) the degree of vertex x is four. For example. G consists of a subgraph gland its complement g t such that gland g 1 have exactly two vertices. In other words. G no longer remains the original graph). edges whose end vertices were x and y in G could have gone with g 1 or g l' without affecting the final graph. 411 shows how the two graphs in Figs. and Iisomorphic graphs are always 2isomorphic. 411 2isomorphic graphs (a) . graphs with vertex connectivity of two). 41 I(a) and (d) are 2isomorphic.
. g I' and in that case r must include is unaffected by operation 2. The "if" part is more involved. Similarly. 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. 4 graphs are not necessarily isomorphic. as defined in this section. and the original paper [47]. Whitney. A circuit r in G will fall in one of three categories: I. let us consider what happens to a circuit in a graph G when it undergoes operation 2. isomorphism. Since in a separable graph G every circuit is confined to a particular block (Problem 415). 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 as shown in Section 47. 2. have circuit correspondence. and vice versa. for graphs with connectivity three or more. lisomorphism. and 2isomorphism are synonymous. except that the path between verti constituted a part of I". THEOREM In cases I and 2. However." Thus undergoing operation 2 retains its original graphs also have circuit correspondence. Theorem 415. has a corresponding circuit in G2 formed by the corresponding edges of G2. r 415 if and only if VERSION ADDS NO Two graphs are 2isomorphic Proof: The "only if" part has already been the theorem. In case 3. the rank or nullity of a graph does not change under operation I. 3. Therefore.84 CUTSETS AND CUTVERTICES CHAP. is due to H. is "flipped around. obviously. the rank and nullity of a graph remain unchanged under operation 2. It is clear that no edges or vertices are created or destroyed under operation 2. every circuit in G retains its edges as G undergoes operation I (in Section 47). 2isomorphic graphs are equal in rank and equal in nullity. Isomorphic graphs. Hence Iisomorphic graphs have circuit correpondence. 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). Therefore. original edges. which is considered the most phic graphs.
a cutset separates the vertices. all graphs can be classified according to Fig. Some of the theorems (and the problems at the end of this chapter) describe this relationship between spanning trees and cutsets. electrical networks. and in duality of graphs. cutvertices. Consequently. 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. 412.rphism and circuit correspondence play important roles in the theory of contact networks.CHAP. All graphs Connected m~l Disconnected m=O m =:2 tm is the vertexconnectivit Fig. when removed. we came across the concepts of cutsets. In contrast to a spanning tree (which keeps the vertices together). and so on. there was bound to be a close relationship between a spanning tree and a cutset. the answer to this question does specify a graph in many aspects and tells a great deal about it. In pursuit of the answer to the above question. breaks the graph apart? Clearly. Some of these properties are of considerable significance both in theory and applications of graphs. In terms of the minimum number of vertices whose removal disconnects a graph. 412 Classification of graphs according to t . the ideas of 2isomo. connectivity. Many of the theorems showed relationships between these characteristics of a graph.