ebook img

Graphs, Algorithms, and Optimization PDF

305 Pages·2016·7.43 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Graphs, Algorithms, and Optimization

cover Cover title: Graphs, Algorithms, and Optimization Discrete Mathematics and Its Applications author: Kocay, William.; Kreher, Donald L. publisher: CRC Press isbn10 | asin: 0203489055 print isbn13: 9780203620892 ebook isbn13: 9780203489055 language: English subject Graph algorithms. publication date: 2005 lcc: QA166.245.K63 2005eb ddc: 511/.5 subject: Graph algorithms. cover Page i DISCRETE MATHEMATICS AND ITS APPLICATIONS Series Editor KENNETH H.ROSEN GRAPHS, ALGORITHMS, AND OPTIMIZATION page_i Page ii DISCRETE MATHEMATICS AND ITS APPLICATIONS Series Editor Kenneth H.Rosen, Ph.D. Charles J.Colbourn and Jeffrey H.Dinitz, The CRC Handbook of Combinatorial Designs Charalambos A.Charalambides, Enumerative Combinatorics Steven Furino, Ying Miao, and Jianxing Yin, Frames and Resolvable Designs: Uses, Constructions, and Existence Randy Goldberg and Lance Riek, A Practical Handbook of Speech Coders Jacob E.Goodman and Joseph O’Rourke, Handbook of Discrete and Computational Geometry, Second Edition Jonathan Gross and Jay Yellen, Graph Theory and Its Applications Jonathan Gross and Jay Yellen, Handbook of Graph Theory Darrel R.Hankerson, Greg A.Harris, and Peter D.Johnson, Introduction to Information Theory and Data Compression, Second Edition Daryl D.Harms, Miroslav Kraetzl, Charles J.Colbourn, and John S.Devitt, Network Reliability: Experiments with a Symbolic Algebra Environment David M.Jackson and Terry I.Visentin, An Atlas of Smaller Maps in Orientable and Nonorientable Surfaces Richard E.Klima, Ernest Stitzinger, and Neil P.Sigmon, Abstract Algebra Applications with Maple Patrick Knupp and Kambiz Salari, Verification of Computer Codes in Computational Science and Engineering Donald L.Kreher and Douglas R.Stinson, Combinatorial Algorithms: Generation Enumeration and Search file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30] cover Charles C.Lindner and Christopher A.Rodgers, Design Theory Alfred J.Menezes, Paul C.van Oorschot, and Scott A.Vanstone, Handbook of Applied Cryptography Richard A.Mollin, Algebraic Number Theory Richard A.Mollin, Fundamental Number Theory with Applications Richard A.Mollin, An Introduction to Cryptography Richard A.Mollin, Quadratics page_ii Page iii Continued Titles Richard A.Mollin, RSA and Public-Key Cryptography Kenneth H.Rosen, Handbook of Discrete and Combinatorial Mathematics Douglas R.Shier and K.T.Wallenius, Applied Mathematical Modeling: A Multidisciplinary Approach Douglas R.Stinson, Cryptography: Theory and Practice, Second Edition Roberto Togneri and Christopher J.deSilva, Fundamentals of Information Theory and Coding Design Lawrence C.Washington, Elliptic Curves: Number Theory and Cryptography Kun-Mao Chao and Bang Ye Wu, Spanning Trees and Optimization Problems Juergen Bierbrauer, Introduction to Coding Theory William Kocay and Donald L.Kreher, Graphs, Algorithms, and Optimization page_iii Page iv This page intentionally left blank. page_iv Page v DISCRETE MATHEMATICS AND ITS APPLICATIONS Series Editor KENNETH H.ROSEN GRAPHS, ALGORITHMS, AND OPTIMIZATION WILLIAM KOCAY DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF MANITOBA DONALD L.KREHER DEPARTMENT OF MATHEMATICAL SCIENCES MICHIGAN TECHNOLOGICAL UNIVERSITY CHAPMAN & HALL/CRC A CRC Press Company Boca Raton London NewYork Washington, D.C. page_v Page vi This edition published in the Taylor & Francis e-Library, 2005. To purchase your own copy of this or any of Taylor & Francis or Routledge’s collection of thousands of eBooks please go to www.eBookstore.tandf.co.uk. Library of Congress Cataloging-in-Publication Data Kocay, William. Graphs, algorithms, and optimization/William Kocay, Donald L.Kreher. p. cm.—(Discrete mathematics and its applications) Includes bibliographical references and index. ISBN 1-58488-396-0 (alk. paper) 1. Graph algorithms. I. Kreher, Donald L. II. Title. III. Series. QA166.245.K63 2004 511′.5–dc22 2004056153 This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30] cover efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use. Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, microfilming, and recording, or by any information storage or retrieval system, without prior permission in writing from the publisher. The consent of CRC Press does not extend to copying for general distribution, for promotion, for creating new works, or for resale. Specific permission must be obtained in writing from CRC Press for such copying. Direct all inquiries to CRC Press, 2000 N.W.Corporate Blvd., Boca Raton, Florida 33431. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation, without intent to infringe. Visit the CRC Press Web site at www.crcpress.com © 2005 by Chapman & Hall/CRC Press No claim to original U.S. Government works ISBN 0-203-48905-5 Master e-book ISBN ISBN 0-203-62089-5 (OEB Format) International Standard Book Number 1-58488-396-0 (Print Edition) Library of Congress Card Number 2004056153 page_vi Page vii The authors would like to take this opportunity to express their appreciation and gratitude to the following people who have had a very significant effect on their mathematical development: Adrian Bondy, Earl Kramer, Spyros Magliveras, Ron Read, and Ralph Stanton. This book is dedicated to the memory of William T.Tutte, (1917–2002) “the greatest of the graphmen” page_vii Page viii This page intentionally left blank. page_viii Page ix Preface Our objective in writing this book is to present the theory of graphs from an algorithmic viewpoint. We present the graph theory in a rigorous, but informal style and cover most of the main areas of graph theory. The ideas of surface topology are presented from an intuitive point of view. We have also included a discussion on linear programming that emphasizes problems in graph theory. The text is suitable for students in computer science or mathematics programs. Graph theory is a rich source of problems and techniques for programming and data structure development, as well as for the theory of computing, including NP-completeness and polynomial reduction. This book could be used a textbook for a third or fourth year course on graph algorithms which contains a programming content, or for a more advanced course at the fourth year or graduate level. It could be used in a course in which the programming language is any major programming language (e.g., C, C++, Java). The algorithms are presented in a generic style and are not dependent on any particular programming language. The text could also be used for a sequence of courses like “Graph Algorithms I” and “Graph Algorithms II”. The courses offered would depend on the selection of chapters included. A typical course will begin with Chapters 1, 2, 3, and 4. At this point, a number of options are available. A possible first course would consist of Chapters 1, 2, 3, 4, 6, 8, 9, 10, 11, and 12, and a first course stressing optimization would consist of Chapters 1, 2, 3, 4, 8, 9, 10, 14, 15, and 16. Experience indicates that the students consider these substantial courses. One or two chapters could be omitted for a lighter course. We would like to thank the many people who provided encouragement while we wrote this book, pointed out typos and errors, and gave useful suggestions. In particular, we would like to convey our thanks to Ben Li and John van Rees of the University of Manitoba for proofreading some chapters. William Kocay Donald L.Kreher page_ix Page x file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30] cover This page intentionally left blank. page_x Page xi William Kocay obtained his Ph.D. in Combinatorics and Optimization from the University of Waterloo in 1979. He is currently a member of the Computer Science Department, and an adjunct member of the Mathematics Department, at the University of Manitoba, and a member of St. Paul’s College, a college affiliated with the University of Manitoba. He has published numerous research papers, mostly in graph theory and algorithms for graphs. He was managing editor of the mathematics journal Ars Combinatoria from 1988 to 1997. He is currently on the editorial board of that journal. He has had extensive experience developing software for graph theory and related mathematical structures. Donald L.Kreher obtained his Ph.D. from the University of Nebraska in 1984. He has held academic positions at Rochester Institute of Technology and the University of Wyoming. He is currently a University Professor of Mathematical Sciences at Michigan Technological University, where he teaches and conducts research in combinatorics and combinatorial algorithms. He has published numerous research papers and is a co-author of the internationally acclaimed text “Combinatorial Algorithms: Generation Enumeration and Search”, CRC Press, 1999. He serves on the editorial boards of two journals. Professor Kreher is the sole recipient of the 1995 Marshall Hall Medal, awarded by the Institute of Combinatorics and its Applications. page_xi Page xii This page intentionally left blank. page_xii Page xiii Contents 1 Graphs and Their Complements 1 1.1 Introduction 1 Exercises 6 1.2 Degree sequences 8 Exercises 17 1.3 Analysis 18 Exercises 21 1.4 Notes 22 2 Paths and Walks 23 2.1 Introduction 23 2.2 Complexity 27 Exercises 27 2.3 Walks 28 Exercises 29 2.4 The shortest-path problem 30 2.5 Weighted graphs and Dijkstra’s algorithm 33 Exercises 36 2.6 Data structures 37 2.7 Floyd’s algorithm 42 Exercises 44 2.8 Notes 45 3 Some Special Classes of Graphs 47 3.1 Bipartite graphs 47 Exercises 49 3.2 Line graphs 50 Exercises 51 3.3 Moore graphs 52 Exercises 57 page_xiii Page xiv 3.4 Euler tours 58 file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30] cover 3.4.1 An Euler tour algorithm 59 Exercises 62 3.5 Notes 62 4 Trees and Cycles 63 4.1 Introduction 63 Exercises 64 4.2 Fundamental cycles 65 Exercises 65 4.3 Co-trees and bonds 67 Exercises 69 4.4 Spanning tree algorithms 70 4.4.1 Prim’s algorithm 72 Data structures 74 Exercises 75 4.4.2 Kruskal’s algorithm 76 Data structures and complexity 77 4.4.3 The Cheriton-Tarjan algorithm 78 Exercises 79 4.4.4 Leftist binary trees 79 Exercises 86 4.5 Notes 87 5 The Structure of Trees 89 5.1 Introduction 89 5.2 Non-rooted trees 90 Exercises 92 5.3 Read’s tree encoding algorithm 92 5.3.1 The decoding algorithm 95 Exercises 96 5.4 Generating rooted trees 97 Exercises 105 5.5 Generating non-rooted trees 105 Exercises 106 5.6 Prüfer sequences 106 5.7 Spanning trees 109 5.8 The matrix-tree theorem 111 Exercises 116 5.9 Notes 117 page_xiv Page xv 6 Connectivity 119 6.1 Introduction 119 Exercises 121 6.2 Blocks 122 6.3 Finding the blocks of a graph 125 Exercises 128 6.4 The depth-first search 128 6.4.1 Complexity 135 Exercises 136 6.5 Notes 137 7 Alternating Paths and Matchings 139 7.1 Introduction 139 Exercises 143 7.2 The Hungarian algorithm 143 7.2.1 Complexity 147 Exercises 148 7.3 Perfect matchings and 1-factorizations 148 Exercises 151 7.4 The subgraph problem 152 7.5 Coverings in bipartite graphs 154 file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30] cover 7.6 Tutte’s theorem 155 Exercises 158 7.7 Notes 158 8 Network Flows 161 8.1 Introduction 161 8.2 The Ford-Fulkerson algorithm 165 Exercises 175 8.3 Matchings and flows 176 Exercises 177 8.4 Menger’s theorems 178 Exercises 180 8.5 Disjoint paths and separating sets 180 Exercises 183 8.6 Notes 185 9 Hamilton Cycles 187 9.1 Introduction 187 Exercises 190 9.2 The crossover algorithm 191 9.2.1 Complexity 193 Exercises 196 page_xv Page xvi 9.3 The Hamilton closure 197 Exercises 199 9.4 The extended multi-path algorithm 200 9.4.1 Data structures for the segments 204 Exercises 204 9.5 Decision problems, NP-completeness 205 Exercises 213 9.6 The traveling salesman problem 214 Exercises 216 9.7 The ΔTSP 216 9.8 Christofides’ algorithm 218 Exercises 220 9.9 Notes 221 10 Digraphs 223 10.1 Introduction 223 10.2 Activity graphs, critical paths 223 10.3 Topological order 225 Exercises 228 10.4 Strong components 229 Exercises 230 10.4.1 An application to fabrics 236 Exercises 236 10.5 Tournaments 238 Exercises 240 10.6 2-Satisfiability 240 Exercises 243 10.7 Notes 243 11 Graph Colorings 245 11.1 Introduction 245 11.1.1 Intersecting lines in the plane 247 Exercises 248 11.2 Cliques 249 11.3 Mycielski’s construction 253 11.4 Critical graphs 254 Exercises 255 11.5 Chromatic polynomials 256 Exercises 258 file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30] cover 11.6 Edge colorings 258 11.6.1 Complexity 268 Exercises 269 page_xvi Page xvii 11.7 NP-completeness 269 11.8 Notes 274 12 Planar Graphs 275 12.1 Introduction 275 12.2 Jordan curves 276 12.3 Graph minors, subdivisions 277 Exercises 282 12.4 Euler’s formula 282 12.5 Rotation systems 284 12.6 Dual graphs 286 12.7 Platonic solids, polyhedra 290 Exercises 291 12.8 Triangulations 292 12.9 The sphere 295 12.10 Whitney’s theorem 297 12.11 Medial digraphs 300 Exercises 301 12.12 The 4-color problem 301 Exercises 305 12.13 Straight-line drawings 305 12.14 Kuratowski’s theorem 309 Exercises 312 12.15 The Hopcroft-Tarjan algorithm 312 12.15.1 Bundles 316 12.15.2 Switching bundles 318 12.15.3 The general Hopcroft-Tarjan algorithm 321 12.16 Notes 325 13 Graphs and Surfaces 327 13.1 Introduction 327 13.2 Surfaces 329 13.2.1 Handles and crosscaps 336 13.2.2 The Euler characteristic and genus of a surface 337 Exercises 340 13.3 Graph embeddings, obstructions 341 13.4 Graphs on the torus 342 Exercises 349 13.4.1 Platonic maps on the torus 349 13.4.2 Drawing torus maps, triangulations 352 Exercises 357 13.5 Graphs on the projective plane 357 page_xvii Page xviii 13.5.1 The facewidth 364 13.5.2 Double covers 368 Exercises 370 13.6 Embedding algorithms 372 Exercises 381 13.7 Heawood’s map coloring theorem 382 Exercises 384 13.8 Notes 385 14 Linear Programming 387 14.1 Introduction 387 14.1.1 A simple example 387 file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30] cover 14.1.2 Simple graphical example 389 14.1.3 Slack and surplus variables 391 Exercises 394 14.2 The simplex algorithm 395 14.2.1 Overview 395 14.2.2 Some notation 395 14.2.3 Phase 0: finding a basis solution 396 14.2.4 Obtaining a basis feasible solution 397 14.2.5 The tableau 398 14.2.6 Phase 2: improving a basis feasible solution 399 14.2.7 Unbounded solutions 403 14.2.8 Conditions for optimality 405 14.2.9 Phase 1: initial basis feasible solution 407 14.2.10 An example 411 14.3 Cycling 413 Exercises 415 14.4 Notes 416 15 The Primal-Dual Algorithm 417 15.1 Introduction 417 15.2 Alternate form of the primal and its dual 423 15.3 Geometric interpretation 424 15.3.1 Example 424 15.4 Complementary slackness 429 15.5 The dual of the shortest-path problem 430 Exercises 433 15.6 The primal-dual algorithm 434 15.6.1 Initial feasible solution 437 15.6.2 The shortest-path problem 440 15.6.3 Maximum flow 444 page_xviii Page xix Exercises 446 15.7 Notes 446 16 Discrete Linear Programming 449 16.1 Introduction 449 16.2 Backtracking 450 16.3 Branch and bound 453 Exercises 463 16.4 Unimodular matrices 465 Exercises 467 16.5 Notes 468 Bibliography 469 Index 477 page_xix Page xx This page intentionally left blank. page_xx Page 1 1 Graphs and Their Complements 1.1 Introduction The diagram in Figure 1.1 illustrates a graph. It is called the graph of the cube. The edges of the geometric cube correspond to the line segments connecting the nodes in the graph, and the nodes correspond to the corners of the cube where the edges meet. They are the vertices of the cube. file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30] cover FIGURE 1.1 The graph of a cube This diagram is drawn so as to resemble a cube, but if we were to rearrange it, as in Figure 1.2, it would still be the graph of the cube, although it would no longer look like a cube. Thus, a graph is a graphical representation of a relation in which edges connect pairs of vertices. DEFINITION 1.1: A simple graph G consists of a vertex set V(G) and an edge set E(G), where each edge is a pair {u,υ} of vertices u, We denote the set of all pairs of a set V by Then In page_1 Page 2 FIGURE 1.2 The graph of the cube the example of the cube, V(G)={1, 2, 3, 4, 5, 6, 7, 8}, and E(G)={12, 23, 34, 14, 15, 26, 37, 48, 56, 67, 78, 58}, where we have used the shorthand notation uυ to stand for the pair {u,υ}. If u, then means that u is joined to υ by an edge. We say that u and υ are adjacent. We use this notation to remind us of the linked list data structure that we will use to store a graph in the computer. Similarly, means that u is not joined to υ. We can also express these relations by writing or respectively. Note that in a simple graph if then If u is adjacent to each of u1, u2,…, uk, then we write These graphs are called simple graphs because each pair u, υ of vertices is joined by at most one edge. Sometimes we need to allow several edges to join the same pair of vertices. Such a graph is also called a multigraph. An edge can then no longer be defined as a pair of vertices, (or the multiple edges would not be distinct), but to each edge there still corresponds a pair {u,υ}. We can express this formally by saying that a graph G consists of a vertex set V(G), an edge set E(G), and a correspondence Given an edge ψ(e) is a pair {u,υ} which are the endpoints of e. Different edges can then have the same endpoints. We shall use simple graphs most of the time, which is why we prefer the simpler definition, but many of the theorems and techniques will apply to multigraphs as well. This definition can be further extended to graphs with loops as well. A loop is an edge in which both endpoints are equal. We can include this in the general definition of a graph by making the mapping An edge for which defines a loop. Figure 1.2 shows a graph with multiple edges and loops. However, we shall use simple graphs most of the time, so that an file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30] cover edge will be considered to be a pair of vertices. The number of vertices of a graph G is denoted |G|. It is called the order of G. page_2 Page 3 FIGURE 1.3 A multigraph The number of edges is ε(G). If G is simple, then obviously since We shall often use node or point as synonyms for vertex. Many graphs have special names. The complete graph Kn is a simple graph with |Kn|=n and The empty graph is a graph with and ε=0. is the complement of Kn. FIGURE 1.4 The complete graph K5 DEFINITION 1.2: Let G be a simple graph. The complement of G is where and consists of all those pairs uυ which are not edges of G. Thus, page_3 Page 4 if and only if Figure 1.5 show a graph and its complement. file:///G|/SMILEY/0203489055__gigle.ws/0203489055/files/__joined.html[01/10/2009 15:18:30]

Description:
CRC Press, 2005. — 305 p.Our objective in writing this book is to present the theory of graphs from an algorithmic viewpoint. We present the graph theory in a rigorous, but informal style and cover most of the main areas of graph theory. The ideas of surface topology are presented from an intuitiv
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.