Combinatorial Optimization: Networks and Matroids
Total Page:16
File Type:pdf, Size:1020Kb
Combinatorial Optimization: Networks and Matroids EUGENE L. LAWLER University of California at Berkeley HOLT, RINEHART AND WINSTON New York Chicago San Francwo Atlanta Dallas Montreal Toronto London Sydney To my parents, and to my children, Stephen and Susan Copyright 0 1976 by Holt, Rinehart and Wins.on All rights reserved Library of Congress Cataloging in Publication Data Lawler, Eugene L Combinatorial optimization. Includes bibliographical references. 1. Mathematical optimization. 2. Matroids. 3. Network analysis (Planning). 4. Computalional complexity. 5. Algorithms. I. Title. QA402.5.L39 519.7 76-13516 ISBN 0 -03-084866-o Printed in the United States of America 8 9 038 98765432 Preface Combinatorial optimization problems arise everywhere, and certainly in all areas of technology and industrial management. A growing awareness of the importance of these problems has been accompanied by a combina- torial explosion In proposals for their solution. This, book is concerned with combinatorial optimization problems which can be formulated in terms of networks and algebraic structures known as matroids. My objective has been to present a unified and fairly comprehensive survey 01‘ solution techniques for these problems, with emphasis on “augmentation” algorithms. Chapters 3 through 5 comprise the material in one-term courses on network flow theory currently offered in many university departments of operations research and industrial engineering. In most cases, a course in linear programming is designated as a prerequisite. However, this is not essential. Chapter 2 contains necessary background material on linear programming, and graph theory as well. Chapters 6 through 9 are suitable for a second course, presumably at the graduate level. The instructor may wish to omit certain sections, depending upon the orientation of the students, as indicated below. The book is also suitable as a text, or as a reference, for (courses on combinatorial computing and concrete computational complexity in de- partments (of computer science and mathematics. Any computer scientist intending to do serious research on combinatorial algorithrns should have a working knowledge of the material in this book. The reader should be aware that certain algorithms are easy to explain, to understand, and to implement, even though a proof of their validity may be quite difficult. A good example is the “primal” matroid intersection algorithm presented in Section 10 of Chapter 8. I can well imagine situations in which an instructor might legitimately choose to present this algorithm and its applications, without discussiqg its theoretical justification in Section 9. 111 Conversely, there are algorithms whose theoretical justification is not too hard to understand, in principle, but whose detailed implementa- tion is quite complex. An instructor might well (choose to discuss the duality theory underlying the weighted non bipartite matching algorithm, going as far as Section 9 of Chapter 6 and skipping the material in Sections 10 and 11. I might mention, incidentally, that the algorithm in Section 11 is the one instance in which I have had cause to regret using a simple iterative description of the algorithms in this book. In this case, a few simple pro- cedure declarations would have simplified matters substantially. I began work on this book in the fall of 1968. In my innocence, I contemplated a two-year project. I did not know that, after many inter- ruptions, I would still be laboring on the book more than seven years later. Needless to say, there was much progress in the technical area during this seven-year period. I managed to make a few contributions myself, including the development of matroid intersection algorithms and an O(n3) implementation of Edmonds’ algorithm for weighted nonbipartite matching. Naturally, these are in the book. There are some results which I did not put into the book, and possibly should have. These include the O(n5’* ) algorithm for unweighted bipartite matching of Dinic and of Hopcroft and Karp, and its recent generalization to the nonbipartite case by Even and Kariv. These must await a second edition, if there is to be one. Because the writing of this book extended over such a considerable period, I have had the opportunity to recelive advice, assistance, and en- couragement from a large number of people. A special word is necessary for some of them. Ray Fulkerson was very kind in giving me advice in the early stages of writing. I am most fortunate to have received his counsel. His untimely death in January 1976 was a blow to all of us who k.new him, as a scholar and as a friend. The last half of this book exists only because of the pioneering insights of Jack Edmonds. He originated the key ideas for nonbipartite matching, matroid optimization, and much, much more. I am happy to acknowledge my personal debt to his creative and fertile mind. Victor Klee, as consulting editor, was extremely helpful. His crit- icisms, based on classroom use of the manuscript, were particularly useful in revising Chapter 4. Harold Gabow helped me avoid a number of blunders in Chapter 6. (I, of course, retain sole proprietorship over the errors which remain, as elsewhere in the book.) Stein Krogdahl, whose name is seen in many lemmas in Chapter 8, provided may definitions and proofs where mine were either incorrect or incomprehensible. Donald Knuth somehow found time to communicate many useful suggestions and provided much appreciated encouragement. The Air Force Office of Scientific Research provided support which contributed to the writing of this book. I am indebted to that office and to Captain Richard Rush. I am also indebted to Nicos Christofides, Stuart Dreyfus, Alan Frieze, Dan Gussfield, T.C. Hu, Richard Karp, Sukhamay Kundu. Ben Lageweg, Howard Landeman. Jan Karel Lenstra, Francesco Maffioli, Colin McDiarmid, George Minty, Katta Murty, Alexander Rinnooy Kan, Arnon Rosenthal, Phil Spria, John Suraballe, Robert Tarjan, Roger Tobin, Klaus Truemper, Robert Urquhart, Dominic Welsh, Lee White, and Norman Zadeh. The manuscript was typed and retyped by Sharon Bauerle, Doris Simpson, Ruth Suzuki, and many others. I thank them all. Rocquencourt, France E.L.L. July 1976 V Contents PYefim 111 Chapter 1 INTRODUCTION I 1. What is Combinatorial Optimization? 1 2. Some Representarive Optimization Problems 2 3. When is a Problem Solved? 4 4. The Criterion qf’Pol~womiu1 Boundedness 5 5. Some Appurentl?) Nonpolynomial-Bounded Problems 8 6. Methods qf’Solutr’on 10 Comments and Rt@rences 12 Chapter 2 MATHEMATICAL PREL.IMINARIES 1.5 1. Muthemuticul Prerequisites 1.5 2. Sets und Relations 16 3. Gruphs and Digraphs 20 4. Subgraphs, Cliques, Multigraphs 24 5. Connectivity in Gruphs 26 6. Connectkitg in Digraphs 28 7. Coc:ycles and Directed Cocycles 31 8. Planarity and Duality 32 9. Euleriun and Hamiltonian Graphs 36 10. Linear Programming Problems 39 Il. The Sim,plex Method 43 12. Geometric Interpretation 48 13. Duality Theory 53 Comments and References 58 vii Chapter 3 SHORTEST PATHS 59 I. Introduction 59 2. Some Problem Formulations 61 3. Bellman’s Equations 65 4. Acyclic Networks 68 5. Networks with Positive Arcs: Dijksfra’s Method 70 6. Solution by Successive Appro.ximations: Bellman-Ford Method Method 74 7. Improvements in EfJiciency : Yen ‘s Modifications 76 8. Linear Programming Interpretation and Relaxation Procedures 77 9. Shortest Paths between all Pairs oj Nodes: .iMatrix Multiplication 82 10. Floyd- Warshall Method 86 Il. Detection of’ Negative C.ycles 90 12. Networks with Transit Times 92 13. The Minimal Cost-to-time Ratio Cycle Problem 94 14. A4 Shortest Paths: Dreyfus Method 98 15. M Shortest Paths without Re>aeated Nodes 100 Comments and Rejerences 104 Chapter 4 NETWORK FLOWS 109 1. Introduction 109 2. Maximal Flows 110 3. Maximal Flow Algorithm 114 4. Ejficiency ojthe Maximal Fl(ow Algorithm 116 5. Combinatorial Implications of Max-Flow Akin-Cut Theorem 120 6. Linear Programming Interpretation oj Max-Flow Mm-Cut Theorem 123 7. Minimum Cost Flows 129 c3 Networks with Losses and Gains 134 9. Lower Bounds and Circulations 138 10. The Out-oj:Kilter Method 142 11. Theoretical Improvement in Eficiency ojOOut-qf:Kilter Method 157 12. Integrality qf’Flows and the iUnimodular Property 160 13. Application to Project Scheduling 16.5 14. Transhipment and Transpormtion Problems 169 Vlll 15. Multitejrminal and Multicommodity Flows 173 Comments and References 177 Chapter 5 BIPARTITE: MATCHING 182 1. Introduiuction 182 2. Problem Reduct&!ms and Equivalences 184 3. Counterparts of’lVetwork Flow Theorems 188 4. Mendelsohn-Dulmage Theorem 191 5. Cardinality Matching Algorithm 193 6. A Special Case: Convex Graphs 196 7. Max-Min Matching 197 8. The Hungarian Methodjor Weighted Matching 201 9. A Special Case: Gilmore-Gomory Matching 207 10. A Novel Optimiz.ation Criterion : Gale-Shapley Matching 211 Comments and References 214 Chapter 6 NONBIPARTITE. MATCHING 217 1. Introduction 217 2. Problem Formuk~tions 218 3. Bidirected Flows 223 4. Augmenting Puths 226 5. Trees and Blossoms 229 6. Cardinulity Matching Algorithm 233 7. Duality Theory 239 8. Linear Programming Formulation of’ Weighted Matching Problem 242 9. An O(n”) Weighted Matching Algorithm 247 10. An O(n3) Weighted Matching Algorithm 252 11. The Chinese Postman’s Problem 259 Comments and References 261 Chapter 7 MATROIDS AND THE GREEDY ALGORITHM 264 1. Introduction 264 2. Three Apparently Unrelated Optimization Problems 265 3. Matroid Definitions 268 4. Matching, Transversal, and Partition Mutroids 271 iX 5. Mutroid Axiomatics 273 6. The Matroid Greedy Algorithm 275 7. Applications of the Greedy Algorithm 278 8. Matroid Duality 280 9. Variations oj’ the Greedy Algorithm 283 10. Prim Spanning Tree Algorithm 285 11. An Application: Flow Network Synthesis 286 12. The Steiner Problem and Other Dilemmas 290 Comments and Rejerences 296 Chapter 8 MATROID INTERSECTIONS 300 1. Introduction 300 2. Problem Formulations 301 3. Augmenting Sequences and Border Graphs 306 4.