Texts in Theoretical Computer Science An EATCS Series Editors: W.Brauer G.Rozenberg A.Salomaa Onbehalfofthe EuropeanAssociation forTheoreticalComputerScience (EATCS) Advisory Board: G.Ausiello M.Broy S.Even J. Hartmanis N.Iones T.Leighton M.Nivat C.Papadimitriou D.Scott Springer-Verlag Berlin Heidelberg GmbH Stasys [ukna Extremal Combinatorics With Applications in Computer Science With 36 Figures and 315Exercises , Springer Author SeriesEditors Dr,Stasys[ukna Prof.Dr.WilfriedBrauer Informatik- FB20 InstitutfürInformatik TheoretischeInformatik TechnischeUniversitätMünchen IohannWolfgangGoethe-Universität Arcisstr.2,80333München Robert-Mayer-Str.11-15 Germany 60235Frankfurt,Germany [email protected] [email protected] Prof.Dr.GrzegorzRozenberg and LeidenInstitute InstituteofMathematicsand Informatics ofAdvancedComputerScience Akademijos4 UniversityofLeiden 2600Vilnius,Lethuania NielsBohrweg1,2333CALeiden TheNetherlands [email protected] Prof.Dr.ArtoSalomaa 'IurkuCentreforComputerScience Lemminkäisenkatu14A,20520Turku Finland [email protected] übraryofCongressCataloging-in-PublicationData )ukna,Stasys,1953- Extremalcombinatorics:withapplicationsincomputersciencelStasys)ukna. p.cm.-(Textsintheoreticalcomputerscience) Includesbibliographicalreferencesandindexes. I.Combinatorialanalysis. 2.Extremalproblems(Mathematics)1.TitIe.H.Series. QAl64.)842000 51I'.6-dc21 00-055604 ACMComputingClassification(I998):G.2-3, El-2,FA.1 AMSMathematicsSubjectClassification(2000): 05-01, 05Dxx,06A07,15A03,68Rxx,68Q17 ISBN978-3-642-08559-8 ISBN978-3-662-04650-0(eBook) DOI10.1007/978-3-662-04650-0 This work issubjecttocopyright.Allrights are reserved,whetherthe wholeorpartofthe materialisconcerned,specificallytherights oftranslation,reprinting,reuseofillustrations, recitation,broadcasting,reproductiononmicrofilmorinanyotherway,andstorage indata banks. Duplication of this publication or parts thereof is permitted only under the provisionsofthe GermanCopyrightLawofSeptember9,1965,in itscurrentversion, and permissionfor use mustalwaysbe obtainedfrom Springer-Verlag.Violations areliable for prosecutionundertheGermanCopyrightLaw. Springer-VerlagBerlinHeidelbergNewYork, amemberofBertelsmannSpringerScience+BusinessMediaGmbH http://www.springer.de ©Springer-VerlagBerlinHeidelberg2001 OriginallypublishedbySpringer-VerlagBerlinHeidelbergNewYorkin2001. Softcoverreprintofthehardcover Istedition200I The use ofgeneraldescriptivenames, tradernarks, etc.in this publicationdoes not imply, even in the absence ofasl?ecificstatement,that such names are exempt from the relevant protectivelawsand regulationsandthereforefreeforgeneraluse. CoverDesign:design&production,Heidelberg Typesetting:Camerareadybytheauthor Printedonacid-freepaper SPIN10739318 45/3142SR- 543210 Ta Indre Preface Combinatorial mathematics has been pursued sincetime immemorial,and at a reasonablescientific levelat least since Leonhard Euler (1707-1783).It ren dered manyservices to both pureandapplied mathematics.Thenalong came the prince of computer science with its many mathematical problems and needs - and it was combinatorics that best fitted the glass slipper held out. Moreover, it has been gradually more and more realized that combinatorics has all sorts of deep connections with "mainstream areas" of mathematics, such as algebra, geometry and probability.This is why combinatorics is now apart of the standard mathematics and computer science curriculum. This bookisas an introduction to extremal combinatorics- afieldofcom binatorial mathematics which has undergone aperiod ofspectacular growth in recent decades. The word "extremal" comes from the nature of problems this fielddeals with: ifacollectionoffinite objects (numbers, graphs,vectors, sets, etc.) satisfies certain restrictions, how large or how small can it be? For example, howmany people can weinvite to a partywhere among each three people there are two who know each other and two who don't know each other? An easy Ramsey-type argument shows that at most five persons can attend such a party. Or, suppose we are given a finite set of nonzero integers, and are asked to mark an as large as possible subset ofthem under the restriction that the sum of any two marked integers cannot be marked. It appears that (independent ofwhat the given integers actually are!) wecan always mark at least one-third of them. Besides classicaltools,likethepigeonhole principle,theinclusion-exclusion principle, the double counting argument, induction, Ramsey argument, etc., some recent weapons - the probabilistic method and the linear algebra method - have shown their surprising power in solving such problems. With a mere knowledge of the concepts of linear independence and discrete prob ability, completely unexpected connections can be made between algebra, probability, and combinatorics. These techniques have also found striking applications in other areas ofdiscrete mathematics and, in particular, in the theory of computing. Nowadays we have comprehensive monographs covering different parts of extremal combinatorics. These books provide an invaluable source for stu dents and researchers in combinatorics. Still,I feelthat, despite its great po- VIII Preface tential and surprising applications, this fascinating fieldisnot soweIl known for students and researchers in computer science. One reason could be that, being comprehensive and in-depth, these monographs are somewhat too dif ficult to start with for the beginner. I have therefore tried to write a "guide tour" to this field- an introductory text which should • be self-contained, • be more or lessup-to-date, • present a wide spectrum of basic ideas ofextremal combinatorics, • show howthese ideas work in the theory ofcomputing, and • be accessible for graduate and motivated undergraduate students in mathematics and computer science. Even if not all of these goals were achieved, I hope that the book will at least give a first impression about the powerofextremal combinatorics, the type of problems this fielddeals with, and what its methods could be good for. This should help students in computer scienceto become more familiar with combinatorial reasoning and so be encouraged to open one of these monographs for more advanced study. Intended for useas an introductory course,the text is,therefore, far from being aIl-inclusive. Emphasis has been given to theorems with elegant and beautiful proofs: those which may be called the gemsofthe theory and may be relativelyeasy to grasp bynon-specialists. Someofthe selected arguments are possible candidatesfor The Book,inwhich,accordingto Paul Erdös,God collects the perfect mathematical proofs.· I hope that the reader willenjoy them despite the imperfections ofthe presentation. Extremal combinatorics itself is much broader. To keepthe introductory character ofthe text and to minimize the overlap with existing books, some important and subtle ideas (likethe shifting method in extremal set theory, applicationsofJanson'sand Talagrand'sinequalitiesinprobabilisticexistence proofs, use oftensor product methods, etc.) are not even mentioned here. In particular, only a fewresults from extremal graph theory are discussed and the presentation of the whole Ramsey theory is reduced to the proof ofone ofits coreresults- the Hales-Jewett theorem and someofits consequences. Fortunately, most ofthese advanced techniques have an excellent treatment in existing monographs by Bollobes (1978) on extremal graph theory, by Babai and Frankl (1992)on the linear algebra method, by Alonand Spencer (1992)on the probabilistic method, and byGraham,Rothschild,and Spencer (1990)on Ramsey theory. Wecan therefore pay more attention to the recent applicationsofcombinatorial techniques in the theory ofcomputing. A possible feature and main departure from traditional books in combi natorics isthe choiceoftopics and results, influencedbythe author's twenty • "Youdon't have to believe in God but,as a mathematician,you should believe in The Book." (Paul Erdös) For thefirst approximationseeM.Aigner and G.M.Ziegler,Proofsfrom THE BOOK. Second Edition, Springer, 2000. Preface IX years of research experience in the theory of computing. Another departure isthe inclusion ofcombinatorialresults that originally appeared in computer science literature. To some extent, this feature mayaiso be interesting for students and researchers in combinatorics. The corresponding chapters and sections are:2.3, 4.8, 6.2.2, 7.2.2, 7.3, 10.4-10.6, 12.3, 14.2.3,14.5, 15.2.2, 16, 18.6, 19.2, 20.5-20.9, 22.2, 24, 25, 26.1.3, and 29.3. In particular, some re cent applicationsofcombinatorial methodsinthetheoryofcomputing (anew proofofHaken'sexponentiallowerbound fortheresolution refutation proofs, a non-probabilistic proofof the switching lemma, a new lower bounds argu ment for monotonecircuits, a rank argument forboolean formulae, lowerand upper bounds for span programs, highest lower bounds on the multi-party communication complexity, a probabilistic construction ofsurprisingly small boolean formulas, etc.) are discussed in detail. Teaching. Thetext isselJ-contained.It assumes acertain mathematical ma turity but nospecial knowledge in combinatorics, linear algebra, probability theory, or inthetheoryofcomputing- astandardmathematicalbackground at undergraduate level should be enough to enjoy the proofs. All necessary concepts are introduced and, with very fewexceptions, all results are proved before they are used, even ifthey are indeed "well-known." Fortunately, the problems and results of combinatorics are usually quite easy to state and explain, even for the layman. Its accessibility is one of its many appealing aspects. The book contains much more material than is necessary for getting ac quainted with the field.I have split it into 29 relatively short chapters, each devoted to a particular proof technique. I have tried to make the chapters almost independent,so that the reader can choose his/her own order to fol low the book. The (linear) order, in which the chapters appear, is just an extension of a (partial) order, "core facts first, applications and recent de velopments later." Combinatorics is broad rather than deep, it appears in different (often unrelated) corners ofmathematics and computer science,and it is about techniques rather than results- this iswhere the independence of chapters comes from. Each chapterstartswith resultsdemonstratingtheparticulartechniquein the simplest (or most illustrative) way.The relative importance ofthe topics discussed in separatechapters isnot reftected intheir length- only the topics which appear for the first time in the book are dealt with in greater detail. To facilitate the understandingofthe material, over300exercises ofvarying difficulty, together with hints to their solution, are included. This is a vital part of the book - many of the examples were chosen to complement the main narrative ofthe text. I have made an attempt to grade them:problems "+" marked by "- " are particularlyeasy,whiletheones marked by are more difficult than unmarked problems. The mark "(!)" indicates that theexercise may be particularly valuable, instructive, or entertaining. Needless to say, this grading is subjective. Some of the hints are quite detailed so that they X Preface actually sketch the entire solution;inthese casesthe reader should try to fill out all missingdetails. Feedback to the author. I havetried to eliminate errors, but surelysome remain. I hope to receivemail offering suggestions, praise, and criticism, comments on attributions of results, suggestions for exercises,or notes on typographical errors. I am going to maintain a website that will contain a (short, Ihope) listoferrata,solutionsto exercises,feedbackfromthe readers, and any other material to assist instructors and students. The link to this site as weIl as my email address can be obtained fromthe Springer website http://www.springer.de/comp/ Please send your comments either to myemail address or to my permanent address: Institute ofMathematics, Akademijos4, 2600Vilnius, Lithuania. Acknowledgments. I would liketo thank everybody who was directly or indirectly involved in the process of writing this book. First of all, I am grateful to Alessandra Capretti, Anna Gäl, Thomas Hofmeister,DanielKral, G. Murali Krishnan, Martin Mundhenk, Gurumurthi V. Ramanan, Martin Sauerhoffand P.R. Subramania forcommentsand corrections. Although not alwaysdirectlyreflectedinthe text, numerousearlierdiscus sionswith Anna Gal, PavelPudläk, and Sasha Razborovonvariouscombina torial problemsincomputationalcomplexity,aswellasshort communications with NogaAlon,Aart Blokhuis,Armin Haken,Johan Hästad,Zoltan Füredi, Hanno Lefmann, Ran Raz, Mike Sipser, Mario Szegedy, and Avi Wigder son, have broadened my understanding ofthings. I especiallybenefited from the comments ofAleksandar Pekecand Jaikumar Radhakrishnan after they tested parts ofthe draft versionin their coursesin the BRlCS International Ph.D. school (University ofAarhus, Denmark) and Tata Institute (Bombay, India), and from valuable comments ofLäszlö Babai on the part devoted to the linear algebra method. I would liketo thank the Alexander von Humboldt Foundation and the German Research Foundation (Deutsche Forschungsgemeinschaft) for sup porting my research in Germany since 1992. Last but not least, I wouldlike to acknowledgethe hospitality ofthe UniversityofDortmund, the University ofTrier and the UniversityofFrankfurt; manythanks, in particular, to Ingo Wegener,Christoph Meineland GeorgSchnitger, respectively, fortheir help during my stay in Germany. This was the time when the idea of this book was born and realized. I am indebted to Hans Wössnerand Ingeborg Mayer of Springer-Verlagfor their editorial help, comments and suggestionswhich essentially contributed to the quality ofthe presentation in the book. Mydeepest thanks to mywife,Daiva,and mydaughter, Indre, for being there. FrankfurtfVilnius, March 2001 Stasys Jukna Contents Preface ....................................................... VII Prolog: What This Book Is About ............................ 1 Notation................. .. ... ... .. .. ... 5 Part I. The Classics 1. Counting ... ... ..... ... .... ...... .. ... .... ...... ..... ..... 11 1.1 The binomial theorem. .................................. 11 1.2 Selection with repetitions................................ 13 1.3 Partitions..... .... .... .... .. .. ..... .. ...... ........ .. . 14 1.4 Double counting........................................ 14 1.5 The averaging principle 16 Exercises 19 2. Advanced Counting. ....... ............. .. ....... ... ...... 23 2.1 Bounds on intersection size .............................. 23 2.2 Zarankiewicz's problem 25 2.3 Density of0-1 matrices.................................. 27 Exercises 29 3. The Principle of Inclusion and Exclusion 32 3.1 The principle 32 3.2 The number ofderangements. ........................... 34 Exercises 35 4. The Pigeonhole Principle " 37 4.1 Some quickies.......................................... 37 4.2 The Erdös-Szekeres theorem " 38 4.3 Mantel's theorem ....................................... 40 4.4 Turän's theorem........................................ 41 4.5 Dirichlet's theorem 42 4.6 Swell-coloredgraphs .................................... 43