Table Of ContentGraph Theory with Algorithms and its Applications
Santanu Saha Ray
Graph Theory
with Algorithms
and its Applications
In Applied Science and Technology
123
SantanuSaha Ray
Department of Mathematics
National InstituteofTechnology
Rourkela, Orissa
India
ISBN 978-81-322-0749-8 ISBN 978-81-322-0750-4 (eBook)
DOI 10.1007/978-81-322-0750-4
SpringerNewDelhiHeidelbergNewYorkDordrechtLondon
LibraryofCongressControlNumber:2012943969
(cid:2)SpringerIndia2013
Thisworkissubjecttocopyright.AllrightsarereservedbythePublisher,whetherthewholeorpartof
the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations,
recitation,broadcasting,reproductiononmicrofilmsorinanyotherphysicalway,andtransmissionor
informationstorageandretrieval,electronicadaptation,computersoftware,orbysimilarordissimilar
methodology now known or hereafter developed. Exempted from this legal reservation are brief
excerpts in connection with reviews or scholarly analysis or material supplied specifically for the
purposeofbeingenteredandexecutedonacomputersystem,forexclusiveusebythepurchaserofthe
work. Duplication of this publication or parts thereof is permitted only under the provisions of
theCopyrightLawofthePublisher’slocation,initscurrentversion,andpermissionforusemustalways
beobtainedfromSpringer.PermissionsforusemaybeobtainedthroughRightsLinkattheCopyright
ClearanceCenter.ViolationsareliabletoprosecutionundertherespectiveCopyrightLaw.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publicationdoesnotimply,evenintheabsenceofaspecificstatement,thatsuchnamesareexempt
fromtherelevantprotectivelawsandregulationsandthereforefreeforgeneraluse.
While the advice and information in this book are believed to be true and accurate at the date of
publication,neithertheauthorsnortheeditorsnorthepublishercanacceptanylegalresponsibilityfor
anyerrorsoromissionsthatmaybemade.Thepublishermakesnowarranty,expressorimplied,with
respecttothematerialcontainedherein.
Printedonacid-freepaper
SpringerispartofSpringerScience+BusinessMedia(www.springer.com)
Thisworkisdedicatedtomygrandfatherlate
Sri Chandra Kumar Saha Ray, my father late
Sri Santosh Kumar Saha Ray, my beloved
wife Lopamudra and my son Sayantan
Preface
Graph Theory has become an important discipline in its own right because of its
applications to Computer Science, Communication Networks, and Combinatorial
optimization through the design of efficient algorithms. It has seen increasing
interactionswithotherareasofMathematics.Althoughthisbookcanablyserveas
a reference for many of the most important topics in Graph Theory, it even
preciselyfulfillsthepromiseofbeinganeffectivetextbook.Themainattentionlies
to serve the students of Computer Science, Applied Mathematics, and Operations
Research ensuring fulfillment of their necessity for Algorithms. In the selection
and presentation of material, it has been attempted to accommodate elementary
concepts on essential basis so as to offer guidance to those new to the field.
Moreover, due to its emphasis on both proofs of theorems and applications, the
subject should be absorbed followed by gaining an impression of the depth and
methods of the subject. This book is a comprehensive text on Graph Theory and
the subject matter is presented in an organized and systematic manner. This book
has been balanced between theories and applications. This book has been orga-
nizedinsuchawaythattopicsappearinperfectorder,sothatitiscomfortablefor
studentstounderstandthesubjectthoroughly.Thetheorieshavebeendescribedin
simple and clear Mathematical language. This book is complete in all respects. It
willgiveaperfectbeginningtothetopic,perfectunderstandingofthesubject,and
properpresentationofthesolutions.Theunderlyingcharacteristicsofthisbookare
thattheconceptshavebeenpresentedinsimpletermsandthesolutionprocedures
have been explained in details.
This book has 10 chapters. Each chapter consists of compact but thorough
fundamental discussion of the theories, principles, and methods followed by
applications through illustrative examples.
All the theories and algorithms presented in this book are illustrated by
numerous worked out examples. This book draws a balance between theory and
application.
Chapter1presentsanIntroductiontoGraphs.Chapter1describesessentialand
elementary definitions on isomorphism, complete graphs, bipartite graphs, and
regular graphs.
vii
viii Preface
Chapter2introducesdifferenttypesofsubgraphsandsupergraphs.Thischapter
includes operations on graphs. Chapter 2 also presents fundamental definitions of
walks, trails, paths, cycles, and connected or disconnected graphs. Some essential
theorems are discussed in this chapter.
Chapter3containsdetaileddiscussiononEulerandHamiltoniangraphs.Many
important theorems concerning these two graphs have been presented in this
chapter. It also includes elementary ideas about complement and self-comple-
mentary graphs.
Chapter 4 deals with trees, binary trees, and spanning trees. This chapter
explores thorough discussion of the Fundamental Circuits and Fundamental Cut
Sets.
Chapter5involvesinpresentingvariousimportantalgorithmswhichareuseful
in mathematics and computer science. Many are particularly interested on good
algorithms for shortest path problems and minimal spanning trees. To get rid of
lackofgoodalgorithms,theemphasisislaidondetaileddescriptionofalgorithms
with its applications through examples which yield the biggest chapter in this
book.
ThemathematicalprerequisiteforChapter6involvesafirstgroundinginlinear
algebra is assumed. The matrices incidence, adjacency, and circuit have many
applications in applied science and engineering.
Chapter7isparticularlyimportantforthediscussionofcutset,cutvertices,and
connectivity of graphs.
Chapter 8 describes the coloring of graphs and the related theorems.
Chapter 9 focuses specially to emphasize the ideas of planar graphs and the
concernedtheorems.Themostimportantfeatureofthischapterincludestheproof
ofKuratowski’stheorembyThomassen’sapproach.Thischapteralsoincludesthe
detailed discussion of coloring of planar graphs. The Heawood’s Five color the-
orem as well as in particular Four color theorem are very much essential for the
concept of map coloring which are included in this chapter elegantly.
Finally,Chapter10containsfundamentaldefinitionsandtheoremsonnetworks
flows. This chapter explores in depth the Ford–Fulkerson algorithms with neces-
sarymodificationbyEdmonds–Karpandalsopresentstheapplicationofmaximal
flows which includes Maximum Bipartite Matching.
Bibliography provided at the end of this book serves as helpful sources for
further study and research by interested readers.
Acknowledgments
I take this opportunity to express my sincere gratitude to Dr. R. K. Bera, former
Professor and Head, Department of Science, National Institute of Technical
Teacher’s Training and Research, Kolkata and Dr. K. S. Chaudhuri, Professor,
Department of Mathematics, Jadavpur University, for their encouragement in the
preparation of this book. I acknowledge with thanks the valuable suggestion
rendered by Scientist Shantanu Das, Senior Scientist B. B. Biswas, Head Reactor
Control Division, Bhaba Atomic Research Centre, Mumbai and my former
colleague Dr. Subir Das, Department of Mathematics, Institute of Technology,
BanarasHinduUniversity.Thisisnotoutofplacetoacknowledgetheeffortofmy
Ph.D. Scholar student and M.Sc. students for their help to write this book.
I, also, express my sincere gratitude to the Director of National Institute of
Technology, Rourkela for his kind cooperation in this regard. I received consid-
erableassistancefrommycolleaguesintheDepartmentofMathematics,National
Institute of Technology, Rourkela.
I wish to express my sincere thanks to several people involved in the prepa-
ration of this book.
Moreover, I am especially grateful to the Springer Publishing Company for
their cooperation in all aspects of the production of this book.
Last, but not the least, special mention should be made of my parents and my
beloved wife, Lopamudra for their patience, unequivocal support, and encour-
agement throughout the period of my work.
Ilookforwardtoreceivecommentsandsuggestionsontheworkfromstudents,
teachers, and researchers.
Santanu Saha Ray
ix
Contents
1 Introduction to Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Definitions of Graphs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Some Applications of Graphs . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Incidence and Degree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Isomorphism. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Complete Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.6 Bipartite Graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.6.1 Complete Bipartite Graph . . . . . . . . . . . . . . . . . . . . . . 7
1.7 Directed Graph or Digraph. . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 Subgraphs, Paths and Connected Graphs . . . . . . . . . . . . . . . . . . . 11
2.1 Subgraphs and Spanning Subgraphs (Supergraphs) . . . . . . . . . . 11
2.2 Operations on Graphs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 Walks, Trails and Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Connected Graphs, Disconnected Graphs, and Components . . . . 15
2.5 Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3 Euler Graphs and Hamiltonian Graphs . . . . . . . . . . . . . . . . . . . . 25
3.1 Euler Tour and Euler Graph. . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2 Hamiltonian Path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2.1 Maximal Non-Hamiltonian Graph. . . . . . . . . . . . . . . . . 27
3.3 Complement and Self-Complementary Graph . . . . . . . . . . . . . . 31
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4 Trees and Fundamental Circuits. . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1 Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2 Some Properties of Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
xi
xii Contents
4.3 Spanning Tree and Co-Tree . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.3.1 Some Theorems on Spanning Tree . . . . . . . . . . . . . . . . 40
4.4 Fundamental Circuits and Fundamental Cut Sets. . . . . . . . . . . . 41
4.4.1 Fundamental Circuits. . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.4.2 Fundamental Cut Set. . . . . . . . . . . . . . . . . . . . . . . . . . 42
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5 Algorithms on Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.1 Shortest Path Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.1.1 Dijkstra’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.1.2 Floyd–Warshall’s Algorithm. . . . . . . . . . . . . . . . . . . . . 57
5.2 Minimum Spanning Tree Problem. . . . . . . . . . . . . . . . . . . . . . 66
5.2.1 Objective of Minimum Spanning Tree Problem . . . . . . . 67
5.2.2 Minimum Spanning Tree. . . . . . . . . . . . . . . . . . . . . . . 68
5.3 Breadth First Search Algorithm to Find the Shortest Path. . . . . . 78
5.3.1 BFS Algorithm for Construction of a Spanning Tree. . . . 79
5.4 Depth First Search Algorithm for Construction
of a Spanning Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6 Matrix Representation on Graphs . . . . . . . . . . . . . . . . . . . . . . . . 95
6.1 Vector Space Associated with a Graph. . . . . . . . . . . . . . . . . . . 95
6.2 Matrix Representation of Graphs. . . . . . . . . . . . . . . . . . . . . . . 96
6.2.1 Incidence Matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
6.2.2 Adjacency Matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.2.3 Circuit Matrix/Cycle Matrix. . . . . . . . . . . . . . . . . . . . . 105
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
7 Cut Sets and Cut Vertices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
7.1 Cut Sets and Fundamental Cut Sets. . . . . . . . . . . . . . . . . . . . . 115
7.1.1 Cut Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
7.1.2 Fundamental Cut Set (or Basic Cut Set) . . . . . . . . . . . . 116
7.2 Cut Vertices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
7.2.1 Cut Set with respect to a Pair of Vertices . . . . . . . . . . . 117
7.3 Separable Graph and its Block . . . . . . . . . . . . . . . . . . . . . . . . 118
7.3.1 Separable Graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
7.3.2 Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
7.4 Edge Connectivity and Vertex Connectivity . . . . . . . . . . . . . . . 119
7.4.1 Edge Connectivity of a Graph . . . . . . . . . . . . . . . . . . . 119
7.4.2 Vertex Connectivity of a Graph . . . . . . . . . . . . . . . . . . 119
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Contents xiii
8 Coloring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
8.1 Properly Colored Graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
8.2 Chromatic Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
8.3 Chromatic Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
8.3.1 Chromatic Number Obtained by
Chromatic Polynomial. . . . . . . . . . . . . . . . . . . . . . . . . 127
8.3.2 Chromatic Polynomial of a Graph G. . . . . . . . . . . . . . . 128
8.4 Edge Contraction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
9 Planar and Dual Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
9.1 Plane and Planar Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
9.1.1 Plane Graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
9.1.2 Planar Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
9.2 Nonplanar Graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
9.3 Embedding and Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
9.3.1 Embedding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
9.3.2 Plane Representation. . . . . . . . . . . . . . . . . . . . . . . . . . 137
9.4 Regions or Faces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
9.5 Kuratowski’s Two Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
9.5.1 Kuratowski’s First Graph. . . . . . . . . . . . . . . . . . . . . . . 138
9.5.2 Kuratowski’s Second Graph. . . . . . . . . . . . . . . . . . . . . 138
9.6 Euler’s Formula. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
9.7 Edge Contractions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
9.8 Subdivision, Branch Vertex, and Topological Minors. . . . . . . . . 143
9.9 Kuratowi’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
9.10 Dual of a Planar Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
9.10.1 To Find the Dual of the Given Graph . . . . . . . . . . . . . . 149
9.10.2 Relationship Between a Graph and its Dual Graph . . . . . 151
9.11 Edge Coloring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
9.11.1 k-Edge Colorable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
9.11.2 Edge-Chromatic Number . . . . . . . . . . . . . . . . . . . . . . . 153
9.12 Coloring Planar Graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
9.12.1 The Four Color Theorem. . . . . . . . . . . . . . . . . . . . . . . 154
9.12.2 The Five Color Theorem . . . . . . . . . . . . . . . . . . . . . . . 155
9.13 Map Coloring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10 Network Flows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
10.1 Transport Networks and Cuts . . . . . . . . . . . . . . . . . . . . . . . . . 159
10.1.1 Transport Network . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
10.1.2 Cut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161