You are on page 1of 8
Arooyy, Yderg pue SOLIOJEUIQUIOD, poyddy SOMVULYe IA aJo.10SIC, Discrete Mathematics: Applied Combinatorics and Graph Theory ‘Michael Townsend Columbia University ishing Company, Ine. ‘Sponsoring editor: Craig Bartholomew Production coordinator: Kristina Montague Cover designer: Vietoria Ann Philp Copyright © 1987 Michael Townsend All ight reserved. No par of this publication maybe reproduced, stored ina retrieval system, or eanamitted,inany {orm or by any means electronic, mechanics, photacopying. cording, or otherwise, without the prioe written permission of the publisher Printedin the United States of America, Published simultaneously in Canada Library of Congress Cataloging-in-Publication Data ‘Townsend, Michael, 1952— iscrete mathematics. Includes bibliographies and index. L.Mathematics—1961- 2. Electronic data rocessing—Mathematies. 3. Combinatorial analysis. LTitle QA39.2.767 1987 510 86-2976 ISBN 0-8053-9955.2 ‘The Benjamin/Cummings Publishing Company 2727Sand Hill Road elie Menlo Park, California 94025 Preface Why This Book? ‘The proper role of discrete mathematics in the undergraduate curriculum hhas not been determined. There is no general agreement on when, where, and how the material should be taught, let alone what topics should be covered. It is no wonder that recent years have seen an explosive growth in the number of textbooks, and it is with some hesitation that we offer yet another textbook and another educational philosophy. ‘This book is based on the first semester of a two semester dis- crete mathematics sequence taken by sophomore computer sclence majors at Columbia University. This sequence is the mathematical pre- requisite for the data structures, algorithms, and computability and formal languages courses which are usually taken in the sophomore and junior years. Although the choice of material is influenced by the computer science cur- riculum, both courses are taught as mathematics courses, and students are expected to sharpen their mathematical skills, especially their abilities to understand and write proofs and divide large problems into manageable parts, This reflects the belief that students study mathematics not s0 much to see their own problems solved, but rather to see how mathematicians think, or at least how they think they think. Put another way, we study mathematics to learn the paradigms that mathemat- ics offers to the basic goal of the liberal arts education - that goal being to learn how to approach the fundamental questions about the nature of the world and our place within it. Prerequisites Suggested prerequisites for the beck consist of one year of calculus and a programming course. Calculus per se is not essential, although the mate- rial on generating functions is easier for students who have some familiarity with power series and infinite sums. Other places where calculus is used include Example 1.3.1 (Newton’s method), Proposition 2-18 (Binomial The- orem for real exponents), Proposition 3-2(d) (term by term differentiation of power series), Example 3.4.5 (differentiation of polynomials), Section 3.5 (power series expansion for e*), Example 4.4.4 (Binomial Theorem for real jure mop *S89f> powers 4,ust woygord our ingly WrE[duoa wourEIOD 313 sosvappe 11°27 81dwexg “em ovo wey axoU ut Wo|qord v 3) eo poueyiodult oy sozsetduro 91 astesoq WOO a4 YOM j[>m st wayqord ionenbo 208o3u1 249 Jo suojsion aoayy aya Jo pue s[apou Suyjdures pue oninqtaystp 249 Jo s92uo[eaynba ayy BulzeA0D ‘sonbmUyoe9 Fuypune> 215eq Du) a0ioyuros 0} quo 40g “porpnas sf Ayrqeqoad MU “SsePP UE passno whip 94 pinoys ¢°TZ-e'T'2 pue T'z selduexg pue Suntoseas jeroyeuyg Thos uo st siscydurs ay,g, “(,suoryeutquios pus suoryeynutzed, ) 994309 Teutqios Arequaurayo 04 Kopanponut YBnosoyy v sa1d g TOWMEHD © “Aqsodod Bupropao-Tjan op pure uoryonpul Jo suNI0} Buozys puT xem ayy Jo aouoyeamnbs yy sureyuoa gT-1 woLo9Ky, ‘eymoned uy !uonanP jowoysido oy sassnostp FT WoL2eg “eouapps zoyndiuro> uy uonanpur jo suoryeot|dde poyrerop swos soAid ET YoHDeg: “OWN St ‘lay ssojun poz0A0d 9q YOU p9ou suOT}D—E omy yse] AUD ‘E°E"T afdUTOX Joy Mdooxgy “sqyBnosoyy posenosip 9q pInoys pus PEA Fugue we we aiou st /-¢-1 ajdurexg -ojdurexs [wotioumnuuoM w st 9} asn¥D9q LoIssnOsIP bwos sonsesop 9°2°T 9[dwWexg “Buyuoseas yeroyeusquio Jo eopt TeUsUT “epuny aif) soonposqur ¢'2°T opdurexa swyyo8Te pue sjoosd uoom4oq diysuoryejoa oyy sosenosip pur soBers ui qoafqo ue Bupanzysu09 Jo wap! yp sozytan 2°2°T ayduiexg “Te}oqeUL z9yeT sopeYsIO} Pe SepE He} Trodum ayoaqenity 69[dwWexo [e19Aag “posh pue pagysosop 978 voHINpUL jo wo} Suons pue yeom 949 YIM “parytys oq 401 PInoys pu HOLY Tonpuy [esqeUoAyEUT yo Wowyeasy poyrerep ¥ seplacud T z0xdeqD « umo xp) Uo xipuedde ayo “UorWOUL aya (quips) pees og poesnosue aq pinoys syuopns paiasop Gey pus Pre" safdurexg “gy Uoma9g ul “pareades sf worntUYoP fi sase> «110g wt pue ‘oouspearnbs own feurousjod pus suusyydoutoss der? ptm uorsouto> ut f[uo pauomuau st 24 e2ule poyyWO oq We? sidoy ase] 94 YENoYs[e ‘Suorye[=1 aouapeamnbo pus ‘Suortisodwosop pus suorirsed ‘worejou oyeUIINE ayy axe srea UI SuLZoAOD YRIOM ZY PU Try suorysag ty satdoy Atuo axp sdeysog “aqpuodde we wt sotreunuyasd Jeoyyeuayqens auos Jo sayaos Joqzq ¥ paoryd oavy om YOT|SOAINS sy) Szseydre 07 pue ‘2[qissod se woos se porseye 9q PINOYE T s0xdeyD © xojonsuy amp 203 suonseazng -hyjnyazeo peas 9q pInoys Pur ‘xqnoyyp pu ypSuoy uy Area Koy, “9X09 oyp Jo TE yesBoqMy we uxIOy Sop aurexe parsoa “soyst|gnd oy Wory oyqu[tear st swre|gord pozsquina woAo pajoopos sop enue worynfos v puE ‘YO0q 94) Jo APE aY3 FE payed] oe SUI] Ha oot -goad pesequnt ppo pesejee oy susury “sequin umd ‘trou > [ol ayn pe oyna pea yo Pes hh ae tae ee uojqosd 292100) ydes8 snotes oy store Bp Simo om ous Suypan sy s2esm» pon see nyse poritp ‘an of wenonpory Joma w seared bende ~qoiy uosiedsojeg Suyonnay, oyy pur sydead woruoyjureyy pte using, yurexo 2 19Ee4D “Heed pre suslydIoutot Jo uotsHoeIp topes ey pu eworayop aeeq ois sinos ondeua “aon eaey « “Supe ynoqne Bexyan09 Jo 438 954 #80 autor 09 prnoyeroporomquis rey enmeydae on ew cin ee “oad pase nos oy gad tod» Sonpar summ puindoasien suo-su0 Suysn — Futuosvas peroyeutquiod jo afdisutzd ayy st surat a Sepun ayn muted ornpxe-vtepoy Pe nooks sone ‘urnouny Atyeousd roneo'¢ ple 'y vg eeteeys “efor mone ene aopngttip ol Suyaata yo fea payee peoveorey Sao|qot utente sasyr a9 sooner so poe uae “20 pw tno end pu (uns od,)so4oqeuquOD Aimounp women g wadegD wDReur ey © ‘soleys Jo oouonbes w uy ssaooad w 2 10 wapt ay 5) ausays Su oon ae yo vopt oh Na Suréqzepun yy, “O09 ays sROYINOsYS gjooId 9419 ;PUL 9gn am puR ‘parpnys a1u oyyonpu! Jo suNIO} TuoIs PUY Lom OM ‘Fea “suontayep sxnnpur Spray "uoHnputjorewoyyeAt Jo POPP & soptacid | rdeyD "MORINPET [eoyeUMEYT + ‘sotdoy 2ofeu Jutwoljo3 ayy #19409 4009 oN, quoqu0g, ‘suoryenbo jerwoukjod 2029p pany pur puoses yo eno ed ‘vaqoSye [ooyps YSty Jo eSpeymouy oumnsse om ‘Cj[earg ‘somp -so0%d aagsanzoz puv oatqeso3t aanposqut 0} posh 9q E> F'E'T-Z'e'T pu * sordwrexg pu sug, ty oyun ate gs “oes fu Up ‘seompososd aaysunoay pee aarpezoyt uooajaq sousseytP 2t3 JO Pop! alos puE Suny |Zo8fe sm ey toe sn fy yo ion Bunensedead oo pon {OFF PInogs saps uoHIppE UL “ysIbosazd po}odaHe we enynay> Jo 3808 © oreor ayy 1) pue poanbsse{unyee[eHOUNYRE oo8 em ypaUON, °(,2 Jo} Uorsudxs so}s96 somod) g°2'g olduiexg pur ‘(squouodxs wud 1A. vili Preface 1 supposed to solve it?” A. good deal of class time should be spent on the types of problems covered in Section 2.4, and students should be encouraged to present their own solutions and critique others. Section 2.8 can be used to motivate the material in Chapter 3. The amount of time to be spent on Section 2.6 is a matter of taste. ‘+ Chapter 3 introduces generating functions. Students have little trouble with the frst four sections once they have mastered Examples 3.11 and 3.1.2. Example 3.3.3 and Exercise 3.3.8 point out again that the same problem may be viewed in more than one way, and they may also make some of the summation formulas discussed in the frst chapter seem less magical. The first four sections illustrate the basic ideas and uses of generating functions, and Sections 3.5 and 3.6 need not be covered unless there is sufficient time. * Chapter 4 gives a detailed treatment of elementary recurrence rela- tions. Some time should be spent on the types of problems discussed in Section 4.1. Example 4.1.11 looks back to the summation problems of the first chapter. Students have little trouble learning (memorizing?) the techniques for solving linear recurrences, but they often wonder why these methods work. In this connection, Examples 4.3.1, 4.3. and 4.3.10 can be helpful. Sections 4.4 and 4.5 need not be covered detail, but Example 4.4.1 should not be skipped and Examples 4.4.3 and 4.5.3 are worth the effort. + Chapter 5 introduces the inclusion-exclusion principle. A reex- amination of Example 2.2.1 is a good beginning. Sections 5.1 and 8.2 should be covered completely (do.not leave out Example §.2.8). Section 5.8 should be discussed only if there is time; otherwise, students can be ‘encouraged to read it on their own. * Chapter 6 covers the basic definitions of graph theory. The three problems presented at the beginning of Section 6.1 can be used to mo- tivate most, if not all, of the definitions in the chapter. ‘The selection and treatment of topics is standard, but note that graphs may have loops and multiple edges. Therefore the definition of isomorphism fo- uses on the number of edges between vertices. We also consider loops and multiple edge pairs to be cycles. Don’t skim over the proof of the ion that the number of vertices of odd degree is even. Before presenting Example 6,3.6, students should be ‘coaxed’ into making the false conjecture that graphs with the same degree sequence are isomor- phic. Propositions 6-6 and 6-7 provide good opportunities for examin ing the hypotheses of a theorem. Section 6.5 can be skipped, but Preface ix the basic ideas should be sketched when discussing the traversability problems in Chapter 7. ‘The exercises in Chapters 6, 7, and 8 cover many topics not discussed in the text. You should recommend the excellent book by Courant and Robbins. ‘+ Chapter 7 discusses the basic issues of traversability. Students have ltl trouble withthe den prevented or example, the citron for Bax rian graphs given in Proposition 7-1 is intuitive and appealing. Sec- tion 12 om Hamiltonian ey araightorwar and tke dicsson of line graphs can be used to foreshadow the idea of (polynomial) re- ducibility. The discussion of the Traveling Salesperson Problem in Sec- tion 7.3 provides good opportunity for discussing greedy algorithms, approximation algorithms, (polynomial) reducibility, and (polynomial) equivalence. It can also be used to point out that there are many easily stated and important unsolved problems ‘+ Chapter 8 introduces trees, directed graphs, matchings, and col- ‘and Example 8.1.11 is especially worthwhile. Students have little trou- ble with the discussion of spanning trees, and Example 8.1.9 is worth the effort. Section 8.2 on directed graphs is brief but straightforward. The material on matchings and colorings in Section 8.3 provides an ‘excellent opportunity to review the main ideas of the book. Be fore- warned that many students have difficulty with the proof of the five color theorem. The four color problem can be used to stimulate a dis- cussion of the interactions between mathematics and other fields, and this makes a good ending point for a course, + A basic one semester course of 40 classroom hours would cover 11-12, 2.1-26, 9.1-34, 4.1-45, 5.1-6.2, 6.1-64, 7.1-7.3, and 8.1-8.2 ‘Other sections, in rough order of importance, are 8.3, 1.3, 3.6, 3 5.3, ond 6.5. oml Jal pro- It is a good idea to solve at least one combinatorial fem by a variety of advanced techniques Candidates include the derangement problem (solved by generating functions in Example 3.4.6, by recurrence relations in Examples 4.1.7 and 4.4.3, and by the inclusion-exclusion principle in Example 5.2.8), and Galileo's dice prob- tem (clved by enumeration in Example 25.5, by generating functions in Example 3.4.1, by recurrence relations in Example 4.1.10, and by the inclusion-exclusion principle in Example 5.2.6) ‘« The text and exercises emphasize proofs. Why not? In some sense, x Preface the notion of proof is the glue that holds mathematics togeth s is vemat ether and keeps it from splintering into a collection of problem solving “tricks” Acknowledgments I would like to thank the following reviewers who, by thoroughly and structively criticizing the first and rafts, significantly affected the fl fmf the manuaenphe ns Tater MbMBoant iced the David Buchthal, University of Akron Margaret B. Cozzens, Northeastern University Joel Fowler, Georgia Institute of Technology Akihiro Kanamori, Boston University Edmund Lamagna, Brown University George Mackiw, Loyola College Jerud Mead, Bucknell University Richard Molnar, Macalester College Ba Packel, Lake Forest College ward Scheinerman, Johns Hopkins Univ. a Schmeichel, San dose State University Douglas West, University of Illinois Neil White, University of Florida Particular thanks go to Danny Elbaum who hel ofread the det ad who revit wits othe exerts il Bato ee rd University was kind enough to step in at the last mi ron prea camh sae ie i: ite od pent ity. Craig Bartholomew of Benjamin/Cummings has been very helpful and encouraging throughout the preparation of this book. I would alse like to thank Jenny, to whom this book must have been reminiscent of Jamndyce and Jarndyce, Finally, I would like to dedicate this book to my students at Columbia University, without wh in havi Cereals Univeity, without whom there would be no purpose in having a Mike Townsend January 1987 Introductory Note to the Reader In this book, we focus on mathematics. Although the title of the book con- tains the word “applied”, our goal is NOT to solve the types of problems encountered in other disciplines, but rather to see how mathematicians think about problems, or at least how mathematicians think they think about problems. The word ‘applied’ refers to the fact that we have chosen sev- ‘eral topics, whose substance and techniques are useful in many other arcas, especially computer science. Mathematicians do not have a monopoly on thinking, and many important problems can be attacked by methods from a variety of fields. Moreover, we don’t assert that mathematicians make the best thinkers, but claim only that familiarity with mathematical thinking can help you think about your own problems. For example, the common technique of verifying large software systems through testing is closer to the empirical verification used in experimental sciences than it is to the deduc- tive verification used in mathematics, but recent theoretical work in proving programs correct comes directly from the nction of mathematical proof. ‘Mathematics is a science (from the Latin scientia meaning knowledge) in the sense that it classifies certain objects according to various properties What distinguishes it from other sciences are the nature of the objects and properties studied, and the system of reasoning used to perform the clas- sification. For the most part, mathematics deals with those objects whose essential properties involve shape and/or number, and it relies on a system of deductive reasoning to classify these objects according to their fundamental characteristics. ‘Mathematics is an art in that it uses a symbolic medium to commu- nicate perceptions about the world. It has its own words and symbols for expressing what might otherwise be exprested in ordinary English, and in this sense, mathematics is like other artistic fields. The major difference is that the language of mathematics is precise and unambiguous. ‘The power of deductive reasoning: and the clarity of its language has made mathematics the vehicle of choice in modeling problems in other disci- plines. Recall that there are three steps in the modeling process: the prob- lem is translated into the language of mathematics, the translated problem is analyzed; and the results of the analysis are translated back to the original problem. ‘This is a book about discrete mathematics, which may be loosely de- xl Introductory Note to the Reader scribed as dealing with objects most easily defined in ter lefined in terms of the set of natural numbers. From the many areas of discrete mathematics we have chosen three topics: mathematical induction, the main technique of prost in discrete mathematics; combinatorics, which should be thought of ae the a of counting without counting; end graph theory, the study of elemen ry network diagrams. These topics are intuitively ing, intellect challenging, and have wide ranging applications, © TPs melectually Contents ‘Mathematical Induction ‘Some Examples ‘A Second Look at Induct ‘Comments and References, Elementary Combinatorics ‘The Rules of Sum and Product ‘Two Models of Counting 2.8.1 ‘The Sample Model of Countin, 2.8.2 The Distribution Model of Counting Examples and Applications =. The Integer-Solution-of-an-Equ: A Brief Look at Combinatorial Identities ‘Comments and References Generating Functions Modeling Problems with Generating Functions Extracting the Coefficients of Simple Ordinary Gefierating Functions Examples with Ordinary Generating Generating Functions for Arrangements ‘Comments and Reference Recurrence Relations Linear Recurrence Relations with Constant Coefficients: Definitions Poo Linear Recurrence Relations with Constant Céefficients: 4.3.1 Introduction 18 32. 38 40 40 46 52 52 59 11 82 92 94 99 104 110 7 125 130 132 132 145. M7 M7 xiv Contents 43.2 Homogeneous Linear Recurrence Relations with Constant Coefficients: The Method of Characteristic Roots 433° Inhomogeneous Linear Recurrence Relations with Constant Coefficients 44 Other Techniques for Solving Recurrence Relations 45 Divide and Conquer Relations =... 4.6 Comments and References : 8 The Inclusion-Exclusion Principle 9... , 5.1 Introduction : a 5.2 Examples Ca ae 5.3. A Generalization of the Inclision-Exclusion Principle 54 Comments and References . . . |, 6 Introduction to Graph Theory . . . . , 6.1 Some Definitions and Examples... |, 6.2 The Handshaking Lemma =. | [. 68 bomorphism Poo oe 64 Planarity =. Go. 6.5 WhatisEficient? =. | |)! 6.6 Comments and References 9. || 1 Teaversablliiy /T1 Eulerian Gircuits 5, 3 7.2 Hamiltonian Cycles. fo 7.3. The Traveling Salesperson Problem TA Comments and References =. , | |) 8 ‘Trees, Directed Graphs, Matchings, and Colorings 81 Trees B11 Characterizations of Trees |) 8.12 Spanning Tres 9. | | 813 Rooted Tres 2 | | | |)! 814 Applications 2. | : 82 Directed Graphs. ae 82.1 Definitions and Exemples ||) 822 Trav biti 82.3 Applications : 48 156 162 169 176 178 178 184 191 194 195 195 208 2 216 232 235 237 237 243 254 283 265 265 265 269 273 276 285 285 288 294 Contents 8.3 A Brief Look at Matchings and Colorings 8.3.1 Pairings and Matchings . 8.3.2 Colorings 8.23 ‘The Four Color Problem 8.4 Comments and References i ‘Appendix Some Mathematical Preliminaries ‘Ad Introduction : a ‘AD. Sete, Relations, and Functions A2l Sts. - : ‘82.2. Relations and Functions A.3 Elementary Proof Techniques A3.1 Introduction A3.2. Techniques for Implications AS8 Proofs by Contradiction «ss ‘A34_ Constructive and Nonconstructive Pr AA. Comments and References ‘Answers to Odd-Numbered Problems Index 300 301 3 315 324 327 327 328 328 334 339 339 340 343 343 347 349 379

You might also like