DISCRETE MATHEMATICS AND ITS APPLICATIONS Series Editor KENNETH H. ROSEN GRAPHS, ALGORITHMS, OPTIMIZATION AND ETERCSID SCITAMEHTAM STI SNOITACILPPA seireS rotidE htenneK .H ,nesoR .D.hP Charles J. Co/bourn and Jeffrey H. Dinitz, ehT CRC koobdnaH fo lairotanibmoC sngiseD Charalambos A. Charalambides, evitaremunE scirotanibmoC Steven Furino, Ying Miao, and Jianxing Yin, semarF dna elbavloseR :sngiseD ,sesU ,snoitcurtsnoC dna ecnetsixE Randy Goldberg and Lance Riek, A lacitcarP koobdnaH fo hceepS sredoC Jacob E. Goodman and Joseph O'Rourke, koobdnaH fo etercsiD dna lanoitatupmoC ,yrtemoeG dnoceS noitidE Jonathan Gross and Jay Yellen, hparG yroehT dna stI snoitacilppA Jonathan Gross and Jay Yellen, koobdnaH fo hparG yroehT Darrel R. Hankerson, Greg A. Harris, and Peter D. Johnson, n oitcudortnI ot noitamrofnI yroehT dna ataD ,noisserpmoC dnoceS noitidE Daryl D. Harms, Miros/av Kraetzl, Charles J. Co/bourn, and John S. Devitt, krowteN :ytilibaileR stnemirepxE htiw a cilobmyS arbeglA tnemnorivnE David M. Jackson and Terry I. Visentin, nA saltA fo rellamS spaM ni elbatneirO dna elbatneironoN secafruS Richard E. Klima, Ernest Stitzinger, and Neil P. Sigmon, tcartsbA arbeglA snoitacilppA htiw elpaM Patrick Knupp and Kambiz Safari, no itacifireV fo retupmoC sedoC ni lanoitatupmoC ecneicS dna gnireenignE Donald L. Kreher and Douglas R. Stinson, lair otanibmoC :smhtiroglA noitareneG noitaremunE dna hcraeS Charles C. Lindner and Christopher A. Rodgers, ngiseD yroehT Alfred J. Menezes, Paul C. van Oorschot, and Scott A. Vanstone, koobdnaH fo deilppA yhpargotpyrC Richard A. Mol/in, ciarbeglA rebmuN yroehT Richard A. Mol/in, latnemadnuF rebmuN yroehT htiw snoitacilppA Richard A. Mol/in, nA noitcudortnI ot yhpargotpyrC Richard A. Mol/in, scitardauQ Continued Titles drahciR .A ,ni/loM ASR dna yeK-cilbuP yhpargotpyrC htenneK .H ,nesoR koobdnaH fo etercsiD dna lairotanibmoC scitamehtaM salguoD .R reihS dna .K .T ,suinellaW deilppA lacitamehtaM :gniledoM A yranilpicsiditluM hcaorppA salguoD .R ,nosnitS :yhpargotpyrC yroehT dna ,ecitcarP dnoceS noitidE otreboR irengoT dna rehpotsirhC .J ,av/iSed slatnemadnuF fo noitamrofnI yroehT dna gnidoC ngiseD ecnerwaL .C ,notgnihsaW citpillE :sevruC rebmuN yroehT dna yhpargotpyrC oaM-nuK oahC dna gnaB eY ,uW gninnapS seerT dna noitazimitpO smelborP negreuJ ,reuarbreiB noitcudortnI ot gnidoC yroehT mailliW yacoK dna dlanoD .L ,reherK ,shparG ,smhtiroglA dna noitazimitpO ETERCSID SCITAMEHTAM DNA STI SNOITACILPPA Series Editor HTENNEK .H NESOR ,SHPARG ,SMHTIROGLA NOITAZIMITPO DNA WILLIAM YACOK DEPARTMENT OF COMPUTER SCIENCE UNIVERSI1Y OF MANITOBA .L DONALD KREHER DEPARTMENT OF MATHEMATICAL SCIENCES MICHIGAN TECHNOLOGICAL UNIVERSI1Y ~ NAMPAHC & CRCULAH A CRC Press Company acoB notaR nodnoL New kroY Washington, .C.D 'fransferred to Digital Printing 2005 Library of Congress Cataloging-in-Publication Data ,yacoK William. Graphs, algorithms, and optimization I William ,yacoK Donald L. .reherK .p .me - (Discrete mathematics and sti applications) Includes bibliographical references and .xedni ISBN 1-58488-396-0 .kla( paper) l. Graph algorithms. I. ,reherK Donald .L .II .eltiT ill. .seireS QA166.245.K63 2004 115 '.5---dc22 2004056153 This book contains information obtained from authentic and highly regarded .secruos Reprinted material si quoted with permission, and sources era indicated. A wide variety of references era .detsil Reasonable efforts evah been made ot publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of lla materials or rof eht consequences of their .esu Neither this book nor any part may be reproduced or transmitted in yna form or by yna means, electronic or mechanical, including photocopying, microfilming, and recording, or by yna information storage or retrieval system, without prior permission in writing from eht .rehsilbup The consent of CRC Press does not extend ot copying for general distribution, rof promotion, for creating wen works, or for resale. Specific permission must be obtained in writing from CRC Press rof such copying. Direct lla inquiries to CRC Press, 2000 .W.N Corporate Blvd., Boca Raton, Florida .13433 Trademark Notice: Product or corporate names may eb trademarks or registered trademarks, and era used only for identification and explanation, without intent ot infringe. Visit the CRC Press beW site at www.crcpress.com © 5002 by Chapman & CRCVlaH Press No claim to original .S.U Government works International Standard Book Number 1-58488-396-0 Library of Congress Card Number 2004056153 The authors would like ot take siht opportunity ot express their appreciation and gratitude ot the following people who evah had a very significant effect on their mathematical development: Adrian Bondy, Earl Kramer, Spyros Magliveras, Ron Read, and Ralph Stanton. This book si dedicated ot the memory of William .T Tutte, (1917-2002) " the greatest of the graphmen " Preface Our objective in writing siht book is ot present eht theory of graphs from na algo rithmic viewpoint. eW present the graph theory in a rigorous, but informal style and cover most of the main areas of graph .yroeht The ideas of surface topology are presented from na intuitive point of .weiv eW evah osla included a discussion on linear programming that emphasizes problems in graph .yroeht The text si suitable for students in computer science or mathematics programs. Graph theory si a rich source of problems and techniques for programming and data structure development, sa well sa 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 si any major programming language ,.g.e( ,C C++, .)avaJ The algorithms are presented in a generic style and are not dependent on yna particuplraorg ramming 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 .elbaliava A possible tsrif course would consist of Chapters ,1 ,2 ,3 ,4 ,6 ,8 ,9 ,01 ,11 and 21 , and a tsrif course stressing optimization would consist of Chapters ,1 ,2 ,3 4, ,8 ,9 ,01 ,41 ,51 and .61 Experience indicates that the students consider these substantial courses. One or two chapters could be omitted for a lighter course. eW would like ot thank the many people ohw provided encouragement while we wrote this book, pointed out typos and errors, and gave useful suggestions. nI particular, we would like ot convey our thanks ot Ben Li and John nav Rees of the University of Manitoba for proofreading some chapters. William Kocay Donald L. Kreher