combinatorics: the art of countingrpp ( ) numberofshape reverseplanepartitionsof 233 rpar( ;๐ฑ)...

325
Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020. Not for print or electronic distribution. This file may not be posted electronically. Combinatorics: The Art of Counting

Upload: others

Post on 27-Jan-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    Combinatorics: The Art of Counting

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    Combinatorics: The Art of Counting

    Bruce E. Sagan

    GRADUATE STUDIESIN MATHEMATICS 210

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    Marco GualtieriBjorn Poonen

    Gigliola Staffilani (Chair)Jeff A. Viaclovsky

    2020 Mathematics Subject Classification. Primary 05-01; Secondary 06-01.

    For additional information and updates on this book, visitwww.ams.org/bookpages/gsm-210

    Library of Congress Cataloging-in-Publication Data

    Names: Sagan, Bruce Eli, 1954- author.Title: Combinatorics : the art of counting / Bruce E. Sagan.Description: Providence, Rhode Island : American Mathematical Society, [2020] | Series: Gradu-

    ate studies in mathematics, 1065-7339 ; 210 | Includes bibliographical references and index. |Identifiers: LCCN 2020025345 | ISBN 9781470460327 (paperback) | ISBN 9781470462802 (ebook)Subjects: LCSH: Combinatorial analysisโ€“Textbooks. | AMS: Combinatorics โ€“ Instructional ex-

    position (textbooks, tutorial papers, etc.). | Order, lattices, ordered algebraic structures โ€“Instructional exposition (textbooks, tutorial papers, etc.).

    Classification: LCC QA164 .S24 2020 | DDC 511/.6โ€“dc23LC record available at https://lccn.loc.gov/2020025345

    Copying and reprinting. Individual readers of this publication, and nonprofit libraries actingfor them, are permitted to make fair use of the material, such as to copy select pages for usein teaching or research. Permission is granted to quote brief passages from this publication inreviews, provided the customary acknowledgment of the source is given.

    Republication, systematic copying, or multiple reproduction of any material in this publicationis permitted only under license from the American Mathematical Society. Requests for permissionto reuse portions of AMS publication content are handled by the Copyright Clearance Center. Formore information, please visit www.ams.org/publications/pubpermissions.

    Send requests for translation rights and licensed reprints to [email protected].

    cยฉ 2020 by the American Mathematical Society. All rights reserved.The American Mathematical Society retains all rightsexcept those granted to the United States Government.

    Printed in the United States of America.

    ยฉโˆž The paper used in this book is acid-free and falls within the guidelinesestablished to ensure permanence and durability.

    Visit the AMS home page at https://www.ams.org/

    10 9 8 7 6 5 4 3 2 1 25 24 23 22 21 20

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    To Sally, for her love and support

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    Contents

    Preface xi

    List of Notation xiii

    Chapter 1. Basic Counting 1ยง1.1. The Sum and Product Rules for sets 1ยง1.2. Permutations and words 4ยง1.3. Combinations and subsets 5ยง1.4. Set partitions 10ยง1.5. Permutations by cycle structure 11ยง1.6. Integer partitions 13ยง1.7. Compositions 16ยง1.8. The twelvefold way 17ยง1.9. Graphs and digraphs 18ยง1.10. Trees 22ยง1.11. Lattice paths 25ยง1.12. Pattern avoidance 28Exercises 33

    Chapter 2. Counting with Signs 41ยง2.1. The Principle of Inclusion and Exclusion 41ยง2.2. Sign-reversing involutions 44ยง2.3. The Garsiaโ€“Milne Involution Principle 49ยง2.4. The Reflection Principle 52

    vii

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    viii Contents

    ยง2.5. The Lindstrรถmโ€“Gesselโ€“Viennot Lemma 55ยง2.6. The Matrix-Tree Theorem 59Exercises 64

    Chapter 3. Counting with Ordinary Generating Functions 71ยง3.1. Generating polynomials 71ยง3.2. Statistics and ๐‘ž-analogues 74ยง3.3. The algebra of formal power series 81ยง3.4. The Sum and Product Rules for ogfs 86ยง3.5. Revisiting integer partitions 89ยง3.6. Recurrence relations and generating functions 92ยง3.7. Rational generating functions and linear recursions 96ยง3.8. Chromatic polynomials 99ยง3.9. Combinatorial reciprocity 106Exercises 109

    Chapter 4. Counting with Exponential Generating Functions 117ยง4.1. First examples 117ยง4.2. Generating functions for Eulerian polynomials 121ยง4.3. Labeled structures 124ยง4.4. The Sum and Product Rules for egfs 128ยง4.5. The Exponential Formula 131Exercises 134

    Chapter 5. Counting with Partially Ordered Sets 139ยง5.1. Basic properties of partially ordered sets 139ยง5.2. Chains, antichains, and operations on posets 145ยง5.3. Lattices 148ยง5.4. The Mรถbius function of a poset 154ยง5.5. The Mรถbius Inversion Theorem 157ยง5.6. Characteristic polynomials 164ยง5.7. Quotients of posets 168ยง5.8. Computing the Mรถbius function 174ยง5.9. Binomial posets 178Exercises 183

    Chapter 6. Counting with Group Actions 189ยง6.1. Groups acting on sets 189ยง6.2. Burnsideโ€™s Lemma 192ยง6.3. The cycle index 197

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    Contents ix

    ยง6.4. Redfieldโ€“Pรณlya theory 200ยง6.5. An application to proving congruences 205ยง6.6. The cyclic sieving phenomenon 209Exercises 213

    Chapter 7. Counting with Symmetric Functions 219ยง7.1. The algebra of symmetric functions, Sym 219ยง7.2. The Schur basis of Sym 224ยง7.3. Hooklengths 230ยง7.4. ๐‘ƒ-partitions 235ยง7.5. The Robinsonโ€“Schenstedโ€“Knuth correspondence 240ยง7.6. Longest increasing and decreasing subsequences 244ยง7.7. Differential posets 248ยง7.8. The chromatic symmetric function 253ยง7.9. Cyclic sieving redux 256Exercises 259

    Chapter 8. Counting with Quasisymmetric Functions 267ยง8.1. The algebra of quasisymmetric functions, QSym 267ยง8.2. Reverse ๐‘ƒ-partitions 270ยง8.3. Chain enumeration in posets 274ยง8.4. Pattern avoidance and quasisymmetric functions 276ยง8.5. The chromatic quasisymmetric function 279Exercises 283

    Appendix. Introduction to Representation Theory 287ยงA.1. Basic notions 287Exercises 292

    Bibliography 293

    Index 297

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    Preface

    Enumerative combinatorics has seen an explosive growth over the last 50 years. Thepurpose of this text is to give a gentle introduction to this exciting area of research. So,rather than trying to cover many different topics, I have chosen to give a more leisurelytreatment of some of the highlights of the field. My goal has been towrite the expositionso it could be read by a student at the advanced undergraduate or beginning graduatelevel, either as part of a course or for independent study. The reader will find it similarin tone to my book on the symmetric group. I have tried to keep the prerequisites to aminimum, assuming only basic courses in linear and abstract algebra as background.Certain recurring themes are emphasized, for example, the existence of sum and prod-uct rules first for sets, then for ordinary generating functions, and finally in the case ofexponential generating functions. I have also included some recent material from theresearch literature which, to my knowledge, has not appeared in book form previously,such as the theory of quotient posets and the connection between pattern avoidanceand quasisymmetric functions.

    Most of the exercises should be doable with a reasonable amount of effort. A fewunsolved conjectures have been included among the problems in the hope that an in-terested studentmight wish to tackle one of them. They are, of course, marked as such.

    A few words about the title are in order. It is in part meant to be a tip of the hat toDonald Knuthโ€™s influential series of books The art of computer programing, Volumes1โ€“3 [51โ€“53], which, amongmany other things, helped give birth to the study of patternavoidance through its connection with stack sorting; see Exercise 36 in Chapter 1. Ihope that the title also conveys some of the beauty found in this area of mathemat-ics, for example, the elegance of the Hook Formula (equation (7.10)) for the numberof standard Young tableaux. In addition I should mention that, due to my own pref-erences, this book concentrates on the enumerative side of combinatorics and mostlyignores the important extremal and existential parts of the field. The reader interestedin these areas can consult the books of Flajolet and Sedgewick [25] and of van Lint [95].

    xi

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    xii Preface

    This book grew out of the lecture notes which I have compiled over years of teach-ing the graduate combinatorics course at Michigan State University. I would like tothank the students in these classes for all the feedback they have given me about thevarious topics and their presentation. I am also indebted to the following colleagues,some of whom taught from a preliminary version of this book, who provided me withsuggestions aswell as catching numerous typographical errors: Matthias Beck,MoussaBenoumhani, Andreas Blass, Seth Chaiken, Sylvie Corteel, Georges Grekos, RichardHensh, Nadia Lafreniรจre, Duncan Levear, and Tom Zaslavsky. Darij Grinberg deservesspecial mention for providing copious comments and corrections as well as providinga number of interesting exercises. I also received valuable feedback from four anony-mous referees. Finally, I wish to express my appreciation of Ina Mette, my editor atthe American Mathematical Society. Without her gentle support and persistence, thistext would never have seen the light of day. Because I typeset this document myself,all errors can be blamed on my computer.

    East Lansing, Michigan, 2020

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    List of Notation

    Symbol Definition Page

    ๐ด(๐ท) arc set of digraph ๐ท 21๐ด(๐บ) adjacency matrix of graph ๐บ 60๐’œ(๐บ) set of acyclic orientations of ๐บ 103๐‘Ž(๐บ) number of acyclic orientations of ๐บ 103๐ด([๐‘›], ๐‘˜) set of permutations ๐œ‹ in ๐”–๐‘› having ๐‘˜ descents 121๐ด(๐‘›, ๐‘˜) Eulerian number, cardinality of ๐ด([๐‘›], ๐‘˜) 121๐ด๐‘›(๐‘ž) Eulerian polynomial 122๐’œ(๐‘ƒ) atom set of poset ๐‘ƒ 169Asc ๐‘ ascent set of a proper coloring ๐‘ 279asc ๐‘ ascent number of a proper coloring ๐‘ 279Asc๐œ‹ ascent set of permutation ๐œ‹ 76asc ๐œ‹ ascent number of permutation ๐œ‹ 76Av๐‘›(๐œ‹) the set of permutations in ๐”–๐‘› avoiding ๐œ‹ 29๐›ผ๐‘Ÿ reversal of composition ๐›ผ 32๏ฟฝฬ„๏ฟฝ expansion of composition ๐›ผ 274๐›ผ(๐ถ) rank composition of chain ๐ถ 275๐ต(๐บ) incidence matrix of graph ๐บ 61๐ต(๐‘‡) set of partitions of the set ๐‘‡ 10๐ต๐‘› Boolean algebra on [๐‘›] 140๐ตโˆž poset of subsets of โ„™ 178๐ต(๐‘›) ๐‘›th Bell number 10

    xiii

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    xiv List of Notation

    Symbol Definition Page

    โ„‚ complex numbers 1๐‘๐‘–(๐‘”) number of cycles of length ๐‘– in group element ๐‘” 197๐ถ๐ฟ๐‘› claw poset with ๐‘› atoms 169co ๐‘‡ content of tableau ๐‘‡ 225๐ถ๐‘› cycle with ๐‘› vertices 19๐ถ๐‘› chain poset of length ๐‘› 139๐‘๐‘ฅ(๐‘ƒ) column insertion of element ๐‘ฅ into tableau ๐‘ƒ 245๐ถโˆž chain poset on โ„• 178๐ถ(๐‘›) Catalan number 26๐‘([๐‘›], ๐‘˜) set of permutations in ๐”–๐‘› with ๐‘˜ cycles 12๐‘(๐‘›, ๐‘˜) signless Stirling number of the first kind 12๐‘๐‘œ(๐ฟ, ๐‘˜) ordered ๐‘˜ cycle decompositions of permutations of ๐ฟ 127โ„‚๐‘‹ vector space generated by set ๐‘‹ over โ„‚ 248โ„‚[๐‘ฅ] polynomial algebra in ๐‘ฅ over โ„‚ 71โ„‚[[๐‘ฅ]] formal power series algebra in ๐‘ฅ over โ„‚ 81๐’ž(๐œ‹) set of functions compatible with ๐œ‹ 236๐’ž๐‘š(๐œ‹) set of functions compatible with ๐œ‹ bounded by๐‘š 236Des ๐‘ƒ descent set of tableau ๐‘ƒ 271Des๐œ‹ descent set of permutation ๐œ‹ 75des ๐œ‹ descent number of permutation ๐œ‹ 76๐ท๐‘› lattice of divisors of ๐‘› 140๐ทโˆž divisibility poset on โ„™ 181๐ท(๐‘›) derangement number 43๐’Ÿ(๐‘›) set of Dyck paths of semilength ๐‘› 26๐’Ÿ(๐‘‰) set of all digraphs on vertex set ๐‘‰ 21๐’Ÿ(๐‘‰, ๐‘˜) set of all digraphs on vertex set ๐‘‰ with ๐‘˜ edges 21deg๐‘š degree of a monomial 219deg ๐‘ฃ degree of vertex ๐‘ฃ in a graph 20ฮ”๐‘“(๐‘›) forward difference operator of ๐‘“(๐‘›) 162๐›ฟ๐‘ฅ,๐‘ฆ Kronecker delta 7๐›ฟ(๐‘ฅ, ๐‘ง) delta function of poset incidence algebra 159๐ธ(๐บ) edge set of graph ๐บ 18๐ธ(๐ฟ) set structure on label set ๐ฟ 125๐ธ(๐ฟ) nonempty set structure on label set ๐ฟ 125๐ธ๐‘› Euler number 120๐‘’๐‘› ๐‘›th elementary symmetric function 221๐ธ(๐‘ก) generating function for elementary symmetric functions 221Exc๐œ‹ set of excedances of permutation ๐œ‹ 122exc ๐œ‹ number of excedances of permutation ๐œ‹ 122

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    List of Notation xv

    Symbol Definition Page

    Fix ๐‘“ fix point set of a function ๐‘“ 44๐‘“๐‘› Fibonacci number 3๐น๐‘› Fibonacci number 2๐”ฝ๐‘ž Galois field with ๐‘ž elements 79๐‘“(๐‘ฅ) ordinary generating function 81๐‘“๐‘†(๐‘ฅ) weight-generating function for weighted set ๐‘† 86๐น(๐‘›) binomial poset ๐‘›-interval factorial function 178๐น(๐‘ฅ) exponential generating function 117๐น๐’ฎ(๐‘ฅ) exponential generating function for structure ๐’ฎ 125๐น๐‘† fundamental quasisymmetric for set ๐‘† 269๐น๐›ผ fundamental quasisymmetric for composition ๐›ผ 269๐‘“๐œ† number of standard Young tableaux of shape ๐œ† 225ฮฆ fundamental map on permutations 122๐œ™ bijection between subsets and compositions 16๐บ โงต ๐‘’ graph ๐บ with edge ๐‘’ deleted 100๐บ/๐‘’ graph ๐บ with edge ๐‘’ contracted 101GL(๐‘‰) general linear group over vector space ๐‘‰ 287๐’ข(๐‘‰) set of all graphs on vertex set ๐‘‰ 20๐’ข(๐‘‰, ๐‘˜) set of all graphs on vertex set ๐‘‰ with ๐‘˜ edges 20๐บ๐‘ฅ stabilizer of element ๐‘ฅ under the action of group ๐บ 191๐ป๐‘ = ๐ป๐‘–,๐‘— hook of cell ๐‘ = (๐‘–, ๐‘—) 230โ„Ž๐‘ = โ„Ž๐‘–,๐‘— hooklength of cell ๐‘ = (๐‘–, ๐‘—) 230โ„‹๐‘› set of hook diagrams with ๐‘› cells 278โ„Ž๐‘› ๐‘›th complete homogeneous symmetric function 221๐ป(๐‘ก) complete homogeneous generating function 221ideg ๐‘ฃ in-degree of vertex ๐‘ฃ in a digraph 21Inv๐œ‹ inversion set of permutation ๐œ‹ 74inv ๐œ‹ inversion number of permutation ๐œ‹ 74โ„(๐‘ƒ) incidence algebra of poset ๐‘ƒ 158๐ผ(๐‘†) lower-order ideal generated by ๐‘† in a poset 143ISF(๐บ; ๐‘ก) increasing spanning forest generating function of ๐บ 105ISF๐‘š(๐บ) set of๐‘š-edge increasing spanning forests of ๐บ 105isf๐‘š(๐บ) number of๐‘š-edge increasing spanning forests of ๐บ 105๐‘–๐œ†(๐บ) number of independent type ๐œ† partitions in graph ๐บ 254๐’ฅ(๐‘ƒ) distributive lattice of lower-order ideals of poset ๐‘ƒ 151๐พ๐‘› complete graph with ๐‘› vertices 19๐พ๐‘› lattice of compositions of ๐‘› 140๐พ๐œ†,๐œ‡ number of tableaux of shape ๐œ† and content ๐œ‡ 225

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    xvi List of Notation

    Symbol Definition Page

    ๐ฟ(๐บ) Laplacian of graph ๐บ 62โ„’(๐บ) bond lattice of graph ๐บ 167โ„’(๐‘ƒ) set of linear extensions of ๐‘ƒ 238โ„“(๐ถ) length of chain ๐ถ in a poset 147โ„“(๐œ†) length of an integer partition ๐œ† 15โ„“(๐œ‹) length of a permutation ๐œ‹ 4lim๐‘˜โ†’โˆž

    ๐‘“๐‘˜(๐‘ฅ) limit of a sequence of formal power series 84lds ๐œ‹ length of a longest decreasing subsequence of ๐œ‹ 245lis ๐œ‹ length of a longest increasing subsequence of ๐œ‹ 244๐ฟ๐‘›(๐‘ž) lattice of subspaces of ๐”ฝ๐‘›๐‘ž 140๐ฟโˆž(๐‘ž) poset of subspaces of vector space ๐‘‰โˆž over ๐”ฝ๐‘ž 178๐ฟ(๐‘‰) lattice of subspaces of ๐‘‰ 140๐œ†(๐น) type of partition induced by edge set ๐น 255๐œ†! multiplicity factorial of partition ๐œ† 254maj ๐œ‹ major index of permutation ๐œ‹ 76๐‘€(๐‘›) Mertens function 183๐‘€(๐‘ƒ) monomial quasisymmeric function for poset ๐‘ƒ 275๐‘€๐›ผ monomial quasisymmetric function 268๐‘š๐œ† monomial symmetric function 220๐œ‡(๐‘ƒ) Mรถbius function value on a poset ๐‘ƒ 154๐œ‡(๐‘ฅ) one-variable Mรถbius function evaluated at ๐‘ฅ 154๐œ‡(๐‘ฅ, ๐‘ง) two-variable Mรถbius function on the interval [๐‘ฅ, ๐‘ง] 157โ„• nonnegative integers 1NBC๐‘˜(๐บ) set of no broken circuit sets of ๐‘˜ edges of ๐บ 102nbc๐‘˜(๐บ) number of no broken circuit sets of ๐‘˜ edges of ๐บ 102๐’ฉโ„ฐ(๐‘š, ๐‘›) set of ๐‘-๐ธ lattice paths from (0, 0) to (๐‘š, ๐‘›) 26odeg ๐‘ฃ out-degree of vertex ๐‘ฃ in a digraph 21๐’ช๐‘ฅ orbit of an element ๐‘ฅ under action of a group 190๐‘‚(๐‘”) big oh notation applied to function ๐‘” 182๐‘œ(๐‘”) order of a group element ๐‘” 210โ„™ positive integers 1๐‘ƒโˆ— dual of poset ๐‘ƒ 142๐’ซ๐ถ(๐บ) set of proper colorings of ๐บ with the positive integers 279๐‘ƒ(๐บ; ๐‘ก) chromatic polynomial of graph ๐บ 100Par ๐‘ƒ set of ๐‘ƒ-partitions 238Par๐‘š ๐‘ƒ set of ๐‘ƒ-partitions bounded by๐‘š 238๐‘ƒ๐‘› path with ๐‘› vertices 19๐‘ƒ(๐‘›) set of partitions of the integer ๐‘› 13๐‘(๐‘›) number of partitions of the integer ๐‘› 13๐‘๐‘› ๐‘›th power sum symmetric function 221๐‘ƒ(๐‘ก) power sum symmetric generating function 221

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    List of Notation xvii

    Symbol Definition Page

    ๐‘ƒ(๐‘›, ๐‘˜) set of partitions of ๐‘› into at most ๐‘˜ parts 15๐‘(๐‘›, ๐‘˜) number of partitions of ๐‘› into at most ๐‘˜ parts 15๐‘ƒ(๐‘†) permutations of a set ๐‘† 4๐‘ƒ(๐‘†, ๐‘˜) permutations of length ๐‘˜ of a set ๐‘† 4๐‘ƒ((๐‘†, ๐‘˜)) words of length ๐‘˜ over a set ๐‘† 5๐‘ƒ(๐œ‹) insertion tableau of ๐œ‹ 242๐’ซ(๐‘ข; ๐‘ฃ) set of directed paths from ๐‘ข to ๐‘ฃ in a digraph 56ฮ ๐‘› partition lattice on [๐‘›] 140ฮ (๐’ฎ) partition structure on structure ๐’ฎ 131ฮ ๐‘’(๐’ฎ) even partition structure on structure ๐’ฎ 133ฮ ๐‘œ(๐’ฎ) odd partition structure on structure ๐’ฎ 133โ„š rational numbers 1๐‘„(๐‘›) set of compositions of the integer ๐‘› 16๐‘ž(๐‘›) number of compositions of the integer ๐‘› 16๐‘„(๐‘›, ๐‘˜) set of compositions of ๐‘› into ๐‘˜ parts 16๐‘ž(๐‘›, ๐‘˜) number of partitions of ๐‘› into ๐‘˜ parts 16QSym algebra of quasisymmetric functions 268QSym๐‘› quasisymmetric functions of degree ๐‘› 268๐‘„(๐œ‹) recording tableau of ๐œ‹ 242๐‘„๐‘›(ฮ ) quasisymmetric function for patterns ฮ  277โ„ real numbers 1โ„›๐ถ(๐œ‹) set of functions reverse compatible with ๐œ‹ 270rk ๐‘ƒ rank of a ranked poset ๐‘ƒ 147Rk๐‘˜ ๐‘ƒ ๐‘˜th rank set of a ranked poset ๐‘ƒ 147rk ๐‘ฅ rank of an element ๐‘ฅ in a ranked poset 147โ„›(๐‘˜, ๐‘™) set of partitions contained in a ๐‘˜ ร— ๐‘™ rectangle 79RPar ๐‘ƒ set of reverse ๐‘ƒ-partitions 271โ„›(๐‘ƒ) reduced incidence algebra of a binomial poset 179rpp๐‘›(๐œ†) number of shape ๐œ† reverse plane partitions of ๐‘› 233rpar(๐‘ƒ; ๐ฑ) generating function for reverse ๐‘ƒ-partitions 271๐‘Ÿ๐‘ฅ(๐‘ƒ) row insertion of element ๐‘ฅ into tableau ๐‘ƒ 241๐œŒ(๐น) vertex partition induced by edge set ๐น 255๐œŒโˆถ ๐บ โ†’ GL(๐‘‰) representation of group ๐บ 287๐’ฎ(๐ฟ) labeled structure on label set ๐ฟ 124๐”– pattern poset 140๐”–๐‘› symmetric group on [๐‘›] 11๐‘†๐‘“(๐‘›) summation operator applied to function ๐‘“(๐‘›) 162sgn sign function on a signed set 44sh ๐‘‡ shape of tableau ๐‘‡ 225๐‘ (๐‘›, ๐‘˜) signed Stirling number of the first kind 13

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    xviii List of Notation

    Symbol Definition Page

    ๐‘†(๐‘‡, ๐‘˜) set of partitions of the set ๐‘‡ into ๐‘˜ blocks 10๐‘†(๐‘›, ๐‘˜) Stirling number of the second kind 10๐‘†๐‘œ(๐ฟ, ๐‘˜) set of ordered partitions of the set ๐ฟ into ๐‘˜ blocks 127๐’ฎ๐‘‡(๐บ) set of spanning trees of graph ๐บ 59st statistic on a set 74std ๐œŽ standardization of the permutation ๐œŽ 28Supp ๐‘ฅ support set of ๐‘ฅ in a product of claws 173supp ๐‘ฅ size of support set of ๐‘ฅ in a product of claws 173Sym algebra of symmetric functions 220Sym๐‘› symmetric functions of degree ๐‘› 220SYT(๐œ†) set of standard Young tableaux of shape ๐œ† 224SSYT(๐œ†) set of semistandard Young tableaux of shape ๐œ† 225๐‘ ๐œ† Schur function 225๐‘‡๐‘–,๐‘— element in cell (๐‘–, ๐‘—) of tableau ๐‘‡ 225๐’ฏ๐‘› set of monomino-domino tilings of a row of ๐‘› squares 3๐‘ˆ(๐‘†) upper-order ideal generated by ๐‘† in a poset 143๐‘‰(๐ท) vertex set of digraph ๐ท 21๐‘‰(๐บ) vertex set of graph ๐บ 18๐‘‰โˆž vector space with a countably infinite basis over ๐”ฝ๐‘ž 178๐‘ค๐‘˜(๐‘ƒ) Whitney number of the first kind for a poset ๐‘ƒ 156๐‘Š ๐‘˜(๐‘ƒ) Whitney number of the second kind for a poset ๐‘ƒ 156๐‘Š๐‘› walk with ๐‘› vertices 19wt weight function on a set 86๐ฑ a countably infinite set of variables 219๐ฑ๐‘ monomial for a coloring ๐‘ of a graph 253๐ฑ๐‘“ monomial for a function ๐‘“ 270๐ฑ๐‘‡ monomial for a tableau ๐‘‡ 225๐‘‹๐‘” fixed points of group element ๐‘” acting on set ๐‘‹ 192๐‘‹(๐บ; ๐ฑ) chromatic symmetric function of graph ๐บ 253๐‘‹(๐บ; ๐ฑ, ๐‘ž) chromatic quasisymmetric function of graph ๐บ 280๐‘Œ Youngโ€™s lattice 140โ„ค set of integers 1๐œ(๐‘ฅ, ๐‘ง) zeta function in the incidence algebra of a poset 159๐œ(๐‘ ) Riemann zeta function 182๐‘ง(๐‘”) cycle index of group element ๐‘” 197๐‘(๐บ) cycle index of group ๐บ 197#๐‘† cardinality of the set ๐‘† 1|๐‘“| size (sum of values) of a function 236|๐‘†| cardinality of the set ๐‘† 1|๐‘‡| sum of entries of tableau ๐‘‡ 233๐‘† โŠŽ ๐‘‡ disjoint union of sets ๐‘† and ๐‘‡ 1

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    List of Notation xix

    Symbol Definition Page

    |๐œ†| sum of the parts of partition ๐œ† 13๐œ† โŠข ๐‘› ๐œ† is a partition of ๐‘› 13๐‘† ร— ๐‘‡ (Cartesian) product of sets ๐‘† and ๐‘‡ 1๐‘ƒ โŠŽ ๐‘„ disjoint union of posets ๐‘ƒ and ๐‘„ 145๐‘ƒ โŠ• ๐‘„ ordinal sum of posets ๐‘ƒ and ๐‘„ 146๐‘ƒ ร— ๐‘„ (Cartesian) product of posets ๐‘ƒ and ๐‘„ 146[๐‘”] linear transformation for group element ๐‘” 287[๐‘”]๐ต matrix in basis ๐ต for group element ๐‘” 287[๐‘›] set of integers {1, 2, . . . , ๐‘›} 4[๐‘›]๐‘ž ๐‘ž-analogue of nonnegative integer ๐‘› 75[๐‘›]๐‘ž! ๐‘ž-analogue of ๐‘›! 75[๐‘ฅ๐‘›]๐‘“(๐‘ฅ) coefficient of ๐‘ฅ๐‘› in ๐‘“(๐‘ฅ) 83๐‘›โ†“๐‘˜ ๐‘› falling factorial with ๐‘˜ factors 42๐‘† set of subsets of ๐‘† 5(๐‘†๐‘˜) set of ๐‘˜-element subsets of ๐‘† 6(๐‘›๐‘˜) binomial coefficient 7[๐‘›๐‘˜]๐‘ž ๐‘ž-binomial coefficient 77

    [๐‘‰๐‘˜] ๐‘˜-dimensional subspaces of vector space ๐‘‰ 79{{๐‘Ž, ๐‘Ž, . . . }} multiset individual element notation 8{{๐‘Ž2, . . . }} multiset multiplicity notation 8((๐‘†๐‘˜)) set of ๐‘˜-element multisubsets of ๐‘† 9๐œ’(๐บ) chromatic number of ๐บ 99๐œ’(๐‘”) character of group element ๐‘” 291๐‘ฅ โ‹– ๐‘ฆ ๐‘ฅ is covered by ๐‘ฆ in a poset 140๐‘ฆ โ‹— ๐‘ฅ ๐‘ฆ covers ๐‘ฅ in a poset 1400ฬ‚ the minimum element of a poset 1421ฬ‚ the maximum element of a poset 142[๐‘ฅ, ๐‘ฆ] closed interval from ๐‘ฅ to ๐‘ฆ in a poset 143๐‘ฅ โˆง ๐‘ฆ meet of ๐‘ฅ and ๐‘ฆ in a poset 148โ‹€๐‘‹ meet of the subset ๐‘‹ in a poset 149๐‘ฅ โˆจ ๐‘ฆ join of ๐‘ฅ and ๐‘ฆ in a poset 149๐‘ˆ + ๐‘‰ sum of subspaces ๐‘ˆ and ๐‘‰ 149๐‘“ โˆ— ๐‘” convolution of ๐‘“ and ๐‘” in the incidence algebra 158๐œ’(๐‘ƒ; ๐‘ก) characteristic polynomial of a ranked poset ๐‘ƒ 164๐‘ƒ/ โˆผ quotient of poset ๐‘ƒ by equivalence relation โˆผ 169๐œ”๐‘› primitive ๐‘›th root of unity 210๐œ‹ RSโ†ฆ (๐‘ƒ,๐‘„) Robinsonโ€“Schensted map 242๐‘€ RSKโ†ฆ (๐‘‡,๐‘ˆ) Robinsonโ€“Schenstedโ€“Knuth map 244

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    Chapter 1

    Basic Counting

    In this chapter we will develop the most elementary techniques for enumerating sets.Even though these methods are relatively basic, they will presage more complicatedthings to come. We denote the integers by โ„ค and parameters such as ๐‘› and ๐‘˜ are alwaysassumed to be integral unless otherwise indicated. We also use the notation โ„• and โ„™for the nonnegative and positive integers, respectively. As usual, โ„š, โ„, and โ„‚ standfor the rational numbers, real numbers, and complex numbers, respectively. Finally,whenever taking the cardinality of a set we will assume it is finite.

    1.1. The Sum and Product Rules for sets

    The SumandProduct Rules for sets are the basis formuch of enumeration. Andwewillsee various extensions of them later to ordinary and exponential generating functions.Although the rules are very easy to prove, we will include the demonstrations becausethe results are so useful. Given a finite set ๐‘†, we will use either of the notations #๐‘† or|๐‘†| for its cardinality. We will also write ๐‘† โŠŽ ๐‘‡ for the disjoint union of ๐‘† and ๐‘‡, andusage of this symbol implies disjointness even if it has not been previously explicitlystated. Finally, our notation for the (Cartesian) product of sets is

    ๐‘† ร— ๐‘‡ = {(๐‘ , ๐‘ก) โˆฃ ๐‘  โˆˆ ๐‘†, ๐‘ก โˆˆ ๐‘‡}.

    Lemma 1.1.1. Let ๐‘†, ๐‘‡ be finite sets.(a) (Sum Rule) If ๐‘† โˆฉ ๐‘‡ = โˆ…, then

    |๐‘† โŠŽ ๐‘‡| = |๐‘†| + |๐‘‡|.(b) (Product Rule) For any finite sets

    |๐‘† ร— ๐‘‡| = |๐‘†| โ‹… |๐‘‡|.

    Proof. Let ๐‘† = {๐‘ 1, . . . , ๐‘ ๐‘š} and ๐‘‡ = {๐‘ก1, . . . , ๐‘ก๐‘›}. For part (a), if ๐‘† and ๐‘‡ are disjoint,then we have ๐‘† โŠŽ ๐‘‡ = {๐‘ 1, . . . , ๐‘ ๐‘š, ๐‘ก1, . . . , ๐‘ก๐‘›} so that |๐‘† โŠŽ ๐‘‡| = ๐‘š + ๐‘› = |๐‘†| + |๐‘‡|.

    1

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    2 1. Basic Counting

    For part (b), we induct on ๐‘› = |๐‘‡|. If ๐‘‡ = โˆ…, then ๐‘† ร— ๐‘‡ = โˆ… so that |๐‘† ร— ๐‘‡| = 0 asdesired. If |๐‘‡| โ‰ฅ 1, then let ๐‘‡ โ€ฒ = ๐‘‡ โˆ’ {๐‘ก๐‘›}. We can write ๐‘† ร— ๐‘‡ = (๐‘† ร— ๐‘‡ โ€ฒ) โŠŽ (๐‘† ร— {๐‘ก๐‘›}).Also ๐‘† ร— {๐‘ก๐‘›} = {(๐‘ 1, ๐‘ก๐‘›), . . . , (๐‘ ๐‘š, ๐‘ก๐‘›)}, which has |๐‘†| = ๐‘š elements since the secondcomponent is constant. Now by part (a) and induction

    |๐‘† ร— ๐‘‡| = |๐‘† ร— ๐‘‡ โ€ฒ| + |๐‘† ร— {๐‘ก๐‘›}| = ๐‘š(๐‘› โˆ’ 1) + ๐‘š = ๐‘š๐‘›,

    which finishes the proof. โ–ก

    In combinatorial choice problems, one is often given either the option to do oneoperation or another, or to do both. Suppose there are ๐‘š ways of doing the first oper-ation and ๐‘› ways of doing the second. If there is no common operation, then the SumRule tells us that the number of ways to do one or the other is๐‘š+ ๐‘›. And if doing thefirst operation has no effect on doing the second, then the Product Rule gives a countof ๐‘š๐‘› for doing the first and then the second. More generally if there are ๐‘š ways ofdoing the first operation and, no matter which of the๐‘š is chosen, the number of waysto continue with the second operation is ๐‘›, then again there are ๐‘š๐‘› ways to do both.(The actual ๐‘› second operations availablemay depend on the choice of the first, but nottheir number.) So in practice one translates from English to mathematics by replacingโ€œorโ€ with addition and โ€œandโ€ with multiplication.

    Another important concept related to cardinalities is that of a bijection. A bijectionbetween sets ๐‘†, ๐‘‡ is a function ๐‘“โˆถ ๐‘† โ†’ ๐‘‡ which is both injective (one-to-one) and sur-jective (onto). If ๐‘†, ๐‘‡ are finite, then the existence of a bijection between them impliesthat |๐‘†| = |๐‘‡|. (One can extend this notion to infinite sets, but we will have no causeto do so here.) In combinatorics, one often uses bijections to prove that two sets havethe same cardinality. See, for just one of many examples, the proof of Theorem 1.1.2below.

    We will illustrate these ideas with one of the most famous sequences in all of com-binatorics: the Fibonacci numbers. As is sometimes the case, there is an amusing (ifsomewhat improbable) story attached to the sequence. One starts at the beginning oftime with a pair of immature rabbits, one male and one female. It takes one monthfor rabbits to mature. In every subsequent month a pair gives birth to another pair ofimmature rabbits, one male and one female. If rabbits only breed with their birth part-ner and live forever (as I said, the story is somewhat improbable), how many pairs ofrabbits are there at the beginning ofmonth ๐‘›? Let us call this number ๐น๐‘›. It will be con-venient to let ๐น0 = 0. Since we begin with only one pair, ๐น1 = 1. And at the beginningof the second month, the pair has matured but produced no offspring, so ๐น2 = 1. Insubsequent months, one has all the rabbits from the previous month, counted by ๐น๐‘›โˆ’1,together with the newborn pairs. The number of newborn pairs equals the number ofmature pairs from the previous month, which equals the total number of pairs fromthe month before which is ๐น๐‘›โˆ’2. Thus, applying the Sum Rule,

    (1.1) ๐น๐‘› = ๐น๐‘›โˆ’1 + ๐น๐‘›โˆ’2 for ๐‘› โ‰ฅ 2 with ๐น0 = 0 and ๐น1 = 1

    where we can start the recursion at ๐‘› = 2 rather than ๐‘› = 3 due to letting ๐น0 = 0.The ๐น๐‘› are called the Fibonacci numbers. It is also important to note that some authors

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.1. The Sum and Product Rules for sets 3

    Figure 1.1. ๐’ฏ3

    define this sequence by letting

    (1.2) ๐‘“0 = ๐‘“1 = 1 and ๐‘“๐‘› = ๐‘“๐‘›โˆ’1 + ๐‘“๐‘›โˆ’2 for ๐‘› โ‰ฅ 2.So it is important to make sure which flavor of Fibonacci is being discussed in a givencontext.

    One might wonder if there is an explicit formula for ๐น๐‘› in addition to the recursiveone above. We will see that such an expression exists, although it is far from obvioushow to derive it from what we have done so far. Indeed, we will need the theory ofordinary generating functions discussed in Chapter 3 to derive it.

    Another thing which might be desired is a combinatorial interpretation for ๐น๐‘›. Acombinatorial interpretation for a sequence of nonnegative integers ๐‘Ž0, ๐‘Ž1, ๐‘Ž2, . . . is asequence of sets ๐‘†0, ๐‘†1, ๐‘†2, . . . such that #๐‘†๐‘› = ๐‘Ž๐‘› for all ๐‘›. Such interpretations of-ten give rise to very pretty and intuitive proofs about the original sequence and so arehighly desirable. One could argue that the story of the rabbits already gives such aninterpretation. But we would like something more amenable to mathematical manip-ulation.

    Suppose we are given a row of squares. We are also given two types of tiles: domi-nos which can cover two squares and monominos which can cover one. A tiling of therow is a set of tiles which covers each square exactly once. Let ๐’ฏ๐‘› be the set of tilingsof a row of ๐‘› squares. See Figure 1.1 for a list of the elements of ๐’ฏ3. There is a simplerelationship between tilings and Fibonacci numbers.

    Theorem 1.1.2. For ๐‘› โ‰ฅ 1 we have๐น๐‘› = #๐’ฏ๐‘›โˆ’1.

    Proof. It suffices to prove that both sides of this equation satisfy the same initial con-ditions and recurrence relation. When the row contains no squares, it only has theempty tiling so ๐’ฏ0 = 1 = ๐น1. And when there is one square, it can only be tiled bya monomino so ๐’ฏ1 = 1 = ๐น2. For the recursion, the tilings in ๐’ฏ๐‘› can be divided intotwo types: those which end with a monomino and those which end with a domino.Removing the last tile shows that these tilings are in bijection with those in ๐’ฏ๐‘›โˆ’1 andthose in ๐’ฏ๐‘›โˆ’2, respectively. Thus #๐’ฏ๐‘› = #๐’ฏ๐‘›โˆ’1 + #๐’ฏ๐‘›โˆ’2 as desired. โ–ก

    To see the power of a good combinatorial interpretation, we will now give a simpleproof of an identity for the ๐น๐‘›. Such identities are legion. See, for example, the book ofBenjamin and Quinn [10].

    Corollary 1.1.3. For๐‘š โ‰ฅ 1 and ๐‘› โ‰ฅ 0 we have๐น๐‘š+๐‘› = ๐น๐‘šโˆ’1๐น๐‘› + ๐น๐‘š๐น๐‘›+1.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    4 1. Basic Counting

    Proof. By the previous theorem, the left-hand side counts the number of tilings of arow of๐‘š+๐‘›โˆ’1 squares. So it suffices to show that the same is true of the right. Labelthe squares 1, . . . , ๐‘š + ๐‘› โˆ’ 1 from left to right. We can write ๐’ฏ๐‘š+๐‘›โˆ’1 = ๐’ฎ โŠŽ ๐’ฏ where๐’ฎ contains those tilings with a domino covering squares ๐‘š โˆ’ 1 and ๐‘š, and ๐’ฏ has thetilings with๐‘šโˆ’1 and๐‘š in different tiles. The tilings in๐’ฏ are essentially pairs of tilings,the first covering the first๐‘šโˆ’ 1 square and second covering the last ๐‘› squares. So theProduct Rule gives |๐’ฏ| = |๐’ฏ๐‘šโˆ’1| โ‹… |๐’ฏ๐‘›| = ๐น๐‘š๐น๐‘›+1. Removing the given domino from thetilings in ๐’ฎ again splits each tiling into a pair with the first covering๐‘šโˆ’2 squares andthe second ๐‘› โˆ’ 1. Taking cardinalities results in |๐’ฎ| = ๐น๐‘šโˆ’1๐น๐‘›. Finally, applying theSum Rule finishes the proof. โ–ก

    The demonstration just given is called a combinatorial proof since it involves count-ing discrete objects. We will meet other useful proof techniques as we go along. Butcombinatorial proofs are often considered to be themost pleasant, in part because theycan be more illuminating than demonstrations just involving formal manipulations.

    1.2. Permutations and words

    It is always importantwhen considering an enumeration problem todeterminewhetherthe objects being considered are ordered or not. In this section we will consider themost basic ordered structures, namely permutations and words.

    If ๐‘† is a set with #๐‘† = ๐‘›, then a permutation of ๐‘† is a sequence ๐œ‹ = ๐œ‹1 . . . ๐œ‹๐‘›obtained by listing the elements of ๐‘† in some order. If ๐œ‹ is a permutation, we willalways use ๐œ‹๐‘– to denote the ๐‘–th element of ๐œ‹ and similarly for other ordered structures.We let ๐‘ƒ(๐‘†) denote the set of all permutations of ๐‘†. For example,

    ๐‘ƒ({๐‘Ž, ๐‘, ๐‘}) = {๐‘Ž๐‘๐‘, ๐‘Ž๐‘๐‘, ๐‘๐‘Ž๐‘, ๐‘๐‘๐‘Ž, ๐‘๐‘Ž๐‘, ๐‘๐‘๐‘Ž}.Clearly #๐‘ƒ(๐‘†) only depends on #๐‘†. So often we choose the canonical ๐‘›-element set

    [๐‘›] = {1, 2, . . . , ๐‘›}.We can also consider ๐‘˜-permutations of ๐‘† which are sequences ๐œ‹ = ๐œ‹1 . . . ๐œ‹๐‘˜ obtainedby linearly ordering ๐‘˜ distinct elements of ๐‘†. Here, ๐‘˜ is called the length of the permu-tation and we write โ„“(๐œ‹) = ๐‘˜. Again, we use the same terminology and notation forother ordered structures. The set of all ๐‘˜-permutations of ๐‘† is denoted ๐‘ƒ(๐‘†, ๐‘˜). By wayof illustration,

    ๐‘ƒ({๐‘Ž, ๐‘, ๐‘, ๐‘‘}, 2) = {๐‘Ž๐‘, ๐‘๐‘Ž, ๐‘Ž๐‘, ๐‘๐‘Ž, ๐‘Ž๐‘‘, ๐‘‘๐‘Ž, ๐‘๐‘, ๐‘๐‘, ๐‘๐‘‘, ๐‘‘๐‘, ๐‘๐‘‘, ๐‘‘๐‘}.In particular, if #๐‘† = ๐‘›, then ๐‘ƒ(๐‘†, ๐‘›) = ๐‘ƒ(๐‘†). Also ๐‘ƒ(๐‘†, ๐‘˜) = โˆ… for ๐‘˜ > ๐‘› since in thiscase it is impossible to pick ๐‘˜ distinct elements from a set with only ๐‘›. And ๐‘ƒ(๐‘†, 0) = {๐œ–}where ๐œ– is the empty sequence.

    To count permutations it will be convenient to introduce the following notation.Given nonnegative integers ๐‘›, ๐‘˜, we can form the falling factorial

    ๐‘›โ†“๐‘˜= ๐‘›(๐‘› โˆ’ 1) . . . (๐‘› โˆ’ ๐‘˜ + 1).Note that ๐‘˜ equals the number of factors in the product.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.3. Combinations and subsets 5

    Theorem 1.2.1. For ๐‘›, ๐‘˜ โ‰ฅ 0 we have#๐‘ƒ([๐‘›], ๐‘˜) = ๐‘›โ†“๐‘˜ .

    In particular#๐‘ƒ([๐‘›]) = ๐‘›! .

    Proof. Since ๐‘ƒ([๐‘›]) = ๐‘ƒ([๐‘›], ๐‘›), it suffices to prove the first formula. Given ๐œ‹ =๐œ‹1 . . . ๐œ‹๐‘˜ โˆˆ ๐‘ƒ([๐‘›], ๐‘˜), there are ๐‘› ways to pick ๐œ‹1. Since ๐œ‹2 โ‰  ๐œ‹1, there remains ๐‘› โˆ’ 1choices for ๐œ‹2. Since the number of choices for ๐œ‹2 does not depend on the actual ele-ment chosen for ๐œ‹, one can continue in this way and apply a modified version of theProduct Rule to obtain the result. โ–ก

    Note that when 0 โ‰ค ๐‘˜ โ‰ค ๐‘› we can write

    (1.3) ๐‘›โ†“๐‘˜=๐‘›!

    (๐‘› โˆ’ ๐‘˜)! .

    But for ๐‘˜ > ๐‘› the product ๐‘› โ†“๐‘˜ still makes sense, even though the product cannot beexpressed as a quotient of factorials. Indeed, if ๐‘˜ > ๐‘›, then zero is a factor and so๐‘› โ†“๐‘˜= 0, which agrees with the fact that ๐‘ƒ([๐‘›], ๐‘˜) = โˆ…. In the special case ๐‘˜ = 0 wehave ๐‘›โ†“๐‘˜= 1 because it is an empty product. Again, this reflects the combinatorics inthat #๐‘ƒ([๐‘›], 0) = {๐œ–}.

    One of the other things to keep track of in a combinatorial problem is whetherelements are allowed to be repeated or not. In permutations we have no repetitions.But the case when they are allowed is interesting as well. A ๐‘˜-word over a set ๐‘† is asequence ๐‘ค = ๐‘ค1 . . . ๐‘ค๐‘˜ where ๐‘ค๐‘– โˆˆ ๐‘† for all ๐‘–. Note that there is no assumption thatthe ๐‘ค๐‘– are distinct. We denote the set of ๐‘˜-words over ๐‘† by ๐‘ƒ((๐‘†, ๐‘˜)). Note the use ofthe double parentheses to denote the fact that repetitions are allowed. Note also that๐‘ƒ(๐‘†, ๐‘˜) โŠ† ๐‘ƒ((๐‘†, ๐‘˜)), but usually the inclusion is strict. To illustrate

    ๐‘ƒ(({๐‘Ž, ๐‘, ๐‘, ๐‘‘}, 2)) = ๐‘ƒ({๐‘Ž, ๐‘, ๐‘, ๐‘‘}, 2) โŠŽ {๐‘Ž๐‘Ž, ๐‘๐‘, ๐‘๐‘, ๐‘‘๐‘‘}.The proof of the next result is almost identical to that of Theorem 1.2.1 and so is left tothe reader. When a result is given without proof, this is indicated by a box at the endof its statement.

    Theorem 1.2.2. For ๐‘›, ๐‘˜ โ‰ฅ 0 we have#๐‘ƒ(([๐‘›], ๐‘˜)) = ๐‘›๐‘˜. โ–ก

    1.3. Combinations and subsets

    We will now consider unordered versions of the combinatorial objects studied in thelast section. These are sometimes called combinations, although the reader may knowthem by their more familiar name: subsets.

    Given a set ๐‘†, we let 2๐‘† denote the set of all subsets of ๐‘†. Notice that 2๐‘† is a set, nota number. For example,

    2{๐‘Ž,๐‘,๐‘} = {โˆ…, {๐‘Ž}, {๐‘}, {๐‘}, {๐‘Ž, ๐‘}, {๐‘Ž, ๐‘}, {๐‘, ๐‘}, {๐‘Ž, ๐‘, ๐‘}}.The reason for this notation should be made clear by the following result.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    6 1. Basic Counting

    Theorem 1.3.1. For ๐‘› โ‰ฅ 0 we have#2[๐‘›] = 2๐‘›.

    Proof. By Theorem 1.2.2 we have 2๐‘› = #๐‘ƒ(({0, 1}, ๐‘›)). So it suffices to find a bijection๐‘“โˆถ 2[๐‘›] โ†’ ๐‘ƒ(({0, 1}, ๐‘›)),

    and there is a canonical one. In particular, if ๐‘† โŠ† [๐‘›], then we let ๐‘“(๐‘†) = ๐‘ค1 . . . ๐‘ค๐‘›where, for all ๐‘–,

    ๐‘ค๐‘– = {1 if ๐‘– โˆˆ ๐‘†,0 if ๐‘– โˆ‰ ๐‘†.

    To show that ๐‘“ is bijective, it suffices to find its inverse. If๐‘ค = ๐‘ค1 . . . ๐‘ค๐‘› โˆˆ ๐‘ƒ(({0, 1}, ๐‘›)),then we let ๐‘“โˆ’1(๐‘ค) = ๐‘† where ๐‘– โˆˆ ๐‘† if ๐‘ค๐‘– = 1 and ๐‘– โˆ‰ ๐‘† if ๐‘ค๐‘– = 0 where 1 โ‰ค ๐‘– โ‰ค ๐‘›. It iseasy to check that the compositions ๐‘“ โˆ˜ ๐‘“โˆ’1 and ๐‘“โˆ’1 โˆ˜ ๐‘“ are the identity maps on theirrespective domains. This completes the proof. โ–ก

    The proof just given is called a bijective proof and it is a particularly nice kind ofcombinatorial proof. This is because bijective proofs can relate different types of com-binatorial objects, sometimes revealing unexpected connections. Also note that weproved ๐‘“ bijective by finding its inverse rather than showing directly that it was one-to-one and onto. This is the preferred method as having a concrete description of ๐‘“โˆ’1can be useful later. Finally, when dealing with functions we will always compose themright-to-left so that

    (๐‘“ โˆ˜ ๐‘”)(๐‘ฅ) = ๐‘“(๐‘”(๐‘ฅ)).We now want to count subsets by their cardinality. For a set ๐‘† we will use the

    notation

    (๐‘†๐‘˜) = {๐‘‡ โŠ† ๐‘† โˆฃ #๐‘‡ = ๐‘˜}.

    As an example,

    ({๐‘Ž, ๐‘, ๐‘}2 ) = {{๐‘Ž, ๐‘}, {๐‘Ž, ๐‘}, {๐‘, ๐‘}}.

    As expected, we now find the cardinality of this set.

    Theorem 1.3.2. For ๐‘›, ๐‘˜ โ‰ฅ 0 we have

    #([๐‘›]๐‘˜ ) =๐‘›โ†“๐‘˜๐‘˜! .

    Proof. Cross-multiplying and using Theorem 1.2.1 we see that it suffices to prove

    #๐‘ƒ([๐‘›], ๐‘˜) = ๐‘˜! โ‹…#([๐‘›]๐‘˜ ).

    To see this, note that we can get each ๐œ‹1 . . . ๐œ‹๐‘˜ โˆˆ ๐‘ƒ([๐‘›], ๐‘˜) exactly once by runningthrough the subsets ๐‘† = {๐‘ 1, . . . , ๐‘ ๐‘˜} โŠ† [๐‘›] and then ordering each ๐‘† in all possibleways. The number of choices for ๐‘† is #([๐‘›]๐‘˜ ) and, by Theorem 1.2.1 again, the numberof ways of permuting the elements of ๐‘† is ๐‘˜!. So we are done by the Product Rule. โ–ก

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.3. Combinations and subsets 7

    11 1

    1 2 11 3 3 1

    1 4 6 4 1

    Figure 1.2. Rows 0 through 4 of Pascalโ€™s triangle

    Given ๐‘›, ๐‘˜ โ‰ฅ 0, we define the binomial coefficient

    (1.4) (๐‘›๐‘˜) = #([๐‘›]๐‘˜ ) =

    ๐‘›โ†“๐‘˜๐‘˜! .

    The reason for this name is that these numbers appear in the binomial expansionwhichwill be studied in Chapter 3. Often you will see the binomial coefficients displayed ina triangular array called Pascalโ€™s trianglewhich has (๐‘›๐‘˜) as the entry in the ๐‘›th row and๐‘˜th diagonal. When ๐‘˜ > ๐‘› it is traditional to omit the zeros. See Figure 1.2 for rows 0through 4. (We apologize to the reader for not writing out the whole triangle, but thispage is not big enough.) For 0 โ‰ค ๐‘˜ โ‰ค ๐‘› we can use (1.3) to write

    (1.5) (๐‘›๐‘˜) =๐‘›!

    ๐‘˜! (๐‘› โˆ’ ๐‘˜)! ,

    which is pleasing because of its symmetry. We can also extend the binomial coefficientsto ๐‘˜ < 0 by letting (๐‘›๐‘˜) = 0. This is in keeping with the fact that (

    [๐‘›]๐‘˜ ) = โˆ… in this case.

    In the next theorem, we collect various basic results about binomial coefficientswhichwill be useful in the sequel. In it, wewill use theKronecker delta function definedby

    ๐›ฟ๐‘ฅ,๐‘ฆ = {1 if ๐‘ฅ = ๐‘ฆ,0 if ๐‘ฅ โ‰  ๐‘ฆ.

    Also note that we do not specify the range of the summation variable ๐‘˜ in (c) and (d)because it can be taken as either 0 โ‰ค ๐‘˜ โ‰ค ๐‘› or ๐‘˜ โˆˆ โ„ค since the extra terms in the largersum are all zero. Both viewpoints will be useful on occasion.

    Theorem 1.3.3. Suppose ๐‘› โ‰ฅ 0.(a) The binomial coefficients satisfy the initial condition

    (0๐‘˜) = ๐›ฟ๐‘˜,0

    and recurrence relation

    (๐‘›๐‘˜) = (๐‘› โˆ’ 1๐‘˜ โˆ’ 1) + (

    ๐‘› โˆ’ 1๐‘˜ )

    for ๐‘› โ‰ฅ 1.(b) The binomial coefficients are symmetric, meaning that

    (๐‘›๐‘˜) = (๐‘›

    ๐‘› โˆ’ ๐‘˜).

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    8 1. Basic Counting

    (c) We have

    โˆ‘๐‘˜(๐‘›๐‘˜) = 2

    ๐‘›.

    (d) We have

    โˆ‘๐‘˜(โˆ’1)๐‘˜(๐‘›๐‘˜) = ๐›ฟ๐‘›,0.

    Proof. (a) The initial condition is clear. For the recursion let ๐’ฎ1 be the set of ๐‘† โˆˆ ([๐‘›]๐‘˜ )with ๐‘› โˆˆ ๐‘†, and let ๐’ฎ2 be the set of ๐‘† โˆˆ ([๐‘›]๐‘˜ ) with ๐‘› โˆ‰ ๐‘†. Then (

    [๐‘›]๐‘˜ ) = ๐’ฎ1 โŠŽ ๐’ฎ2. But

    if ๐‘› โˆˆ ๐‘†, then ๐‘† โˆ’ {๐‘›} โˆˆ ([๐‘›โˆ’1]๐‘˜โˆ’1 ). This gives a bijection between ๐’ฎ1 and ([๐‘›โˆ’1]๐‘˜โˆ’1 ) so that

    #๐’ฎ1 = (๐‘›โˆ’1๐‘˜โˆ’1). On the other hand, if๐‘› โˆ‰ ๐‘†, then ๐‘† โˆˆ ([๐‘›โˆ’1]๐‘˜ ) and this implies#๐’ฎ2 = (

    ๐‘›โˆ’1๐‘˜ ).

    Applying the Sum Rule completes the proof.

    (b) It suffices to find a bijection ๐‘“โˆถ ([๐‘›]๐‘˜ ) โ†’ ([๐‘›]๐‘›โˆ’๐‘˜). Consider themap ๐‘“โˆถ 2

    [๐‘›] โ†’ 2[๐‘›]by ๐‘“(๐‘†) = [๐‘›] โˆ’ ๐‘† where the minus sign indicates difference of sets. Note that thecomposition ๐‘“2 is the identity map so that ๐‘“ is a bijection. Furthermore ๐‘† โˆˆ ([๐‘›]๐‘˜ ) if andonly if ๐‘“(๐‘†) โˆˆ ( [๐‘›]๐‘›โˆ’๐‘˜). So ๐‘“ restricts to a bijection between these two sets.

    (c) This follows by applying the Sum Rule to the equation 2[๐‘›] = โจ„๐‘˜ ([๐‘›]๐‘˜ ).

    (d) The case ๐‘› = 0 is easy, so we assume ๐‘› > 0. We will learn general techniquesfor dealing with equations involving signs in the next chapter. But for now, we try toprove the equivalent equality

    โˆ‘๐‘˜ odd

    (๐‘›๐‘˜) = โˆ‘๐‘˜ even(๐‘›๐‘˜).

    Let๐’ฏ1 be the set of ๐‘‡ โˆˆ 2[๐‘›] with#๐‘‡ odd and let๐’ฏ2 be the set of ๐‘‡ โˆˆ 2[๐‘›] with#๐‘‡ even.We wish to find a bijection ๐‘”โˆถ ๐’ฏ1 โ†’ ๐’ฏ2. Consider the operation of symmetric difference

    ๐‘† ฮ” ๐‘‡ = (๐‘† โˆ’ ๐‘‡) โŠŽ (๐‘‡ โˆ’ ๐‘†).It is not hard to see that (๐‘† ฮ” ๐‘‡) ฮ” ๐‘‡ = ๐‘†. Now define ๐‘”โˆถ 2[๐‘›] โ†’ 2[๐‘›] by ๐‘”(๐‘‡) = ๐‘‡ ฮ” {๐‘›}so that, by the previous sentence, ๐‘”2 is the identity. Furthermore, ๐‘” reverses parity andso restricts to the desired bijection. โ–ก

    As with the case of permutations and words, we want to enumerate โ€œsetsโ€ whererepetitions are allowed. A multiset ๐‘€ is an unordered collection of elements whichmay be repeated. For example

    ๐‘€ = {{๐‘Ž, ๐‘Ž, ๐‘Ž, ๐‘, ๐‘, ๐‘}} = {{๐‘, ๐‘Ž, ๐‘, ๐‘Ž, ๐‘, ๐‘Ž}}.Note the use of double curly brackets to denote amultiset. Wewill also usemultiplicitynotation where ๐‘Ž๐‘š denotes๐‘š copies of the element ๐‘Ž. Continuing our example

    ๐‘€ = {{๐‘Ž3, ๐‘, ๐‘2}}.As with powers, an exponent of one is optional and an exponent of zero indicates thatthere are no copies of that element in the multiset. The cardinality of a multiset is itsnumber of elements counted with multiplicity. So in our example #๐‘€ = 2+1+3 = 6.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.3. Combinations and subsets 9

    If ๐‘† is a set, then๐‘€ is a multiset on ๐‘† if every element of๐‘€ is an element of ๐‘†. We let((๐‘†๐‘˜)) be the set of all multisets on ๐‘† of cardinality ๐‘˜ and

    ((๐‘›๐‘˜)) = #(([๐‘›]๐‘˜ )).

    To illustrate

    (({๐‘Ž, ๐‘, ๐‘}2 )) = { {{๐‘Ž, ๐‘Ž}}, {{๐‘Ž, ๐‘}}, {{๐‘Ž, ๐‘}}, {{๐‘, ๐‘}}, {{๐‘, ๐‘}}, {{๐‘, ๐‘}} }

    and so ((32)) = 6.

    Theorem 1.3.4. For ๐‘›, ๐‘˜ โ‰ฅ 0 we have

    ((๐‘›๐‘˜)) = (๐‘› + ๐‘˜ โˆ’ 1

    ๐‘˜ ).

    Proof. We wish to find a bijection

    ๐‘“โˆถ (([๐‘›]๐‘˜ )) โ†’ ([๐‘› + ๐‘˜ โˆ’ 1]

    ๐‘˜ ).

    Given a multiset๐‘€ = {{๐‘š1 โ‰ค ๐‘š2 โ‰ค ๐‘š3 โ‰ค โ‹ฏ โ‰ค ๐‘š๐‘˜}} on [๐‘›], let๐‘“(๐‘€) = {๐‘š1 < ๐‘š2 + 1 < ๐‘š3 + 2 < โ‹ฏ < ๐‘š๐‘˜ + ๐‘˜ โˆ’ 1}.

    Now the๐‘š๐‘–+๐‘– โˆ’ 1 are distinct, and the fact that๐‘š๐‘˜ โ‰ค ๐‘› implies๐‘š๐‘˜+๐‘˜โˆ’1 โ‰ค ๐‘›+๐‘˜โˆ’1.It follows that ๐‘“(๐‘€) โˆˆ ([๐‘›+๐‘˜โˆ’1]๐‘˜ ) and so the map is well-defined. It should now be easyfor the reader to construct an inverse, proving that ๐‘“ is bijective. โ–ก

    As with the binomial coefficients, we extend ((๐‘›๐‘˜)) to negative ๐‘˜ by letting it equalzero. In the future we will do the same for other constants whose natural domain ofdefinition is ๐‘›, ๐‘˜ โ‰ฅ 0 without comment.

    We do wish to comment on an interesting relationship between counting sets andmultisets. Note that definition (1.4) is well-defined for any complex number ๐‘› since thefalling factorial is just a product, and in particular it makes sense for negative integers.In fact, if ๐‘› โˆˆ โ„•, then

    (โˆ’๐‘›๐‘˜ ) =(โˆ’๐‘›)(โˆ’๐‘› โˆ’ 1)โ‹ฏ (โˆ’๐‘› โˆ’ ๐‘˜ + 1)

    ๐‘˜!(1.6)

    = (โˆ’1)๐‘˜ ๐‘›(๐‘› + 1)โ‹ฏ (๐‘› + ๐‘˜ โˆ’ 1)๐‘˜!

    = (โˆ’1)๐‘˜((๐‘›๐‘˜))

    by Theorem 1.3.4. This kind of situation where evaluation of an enumerative formulaat negative arguments yields, up to sign, another enumerative function is called com-binatorial reciprocity and will be studied in Section 3.9.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    10 1. Basic Counting

    1.4. Set partitions

    We have already seen that disjoint unions are nice combinatorially. So it should comeas no surprise that set partitions also play an important role.

    A partition of a set ๐‘‡ is a set ๐œŒ of nonempty subsets ๐ต1, . . . , ๐ต๐‘˜ such that ๐‘‡ = โจ„๐‘– ๐ต๐‘–,written ๐œŒ โŠข ๐‘‡. The ๐ต๐‘– are called blocks and we use the notation ๐œŒ = ๐ต1/ . . . /๐ต๐‘˜leaving out all curly brackets and commas, even though the elements of the blocks,as well as the blocks themselves, are unordered. For example, one set partition of๐‘‡ = {๐‘Ž, ๐‘, ๐‘, ๐‘‘, ๐‘’, ๐‘“, ๐‘”} is

    ๐œŒ = ๐‘Ž๐‘๐‘“/๐‘๐‘’/๐‘‘/๐‘” = ๐‘‘/๐‘’๐‘/๐‘”/๐‘๐‘“๐‘Ž.We let ๐ต(๐‘‡) be the set of all ๐œŒ โŠข ๐‘‡. To illustrate,

    ๐ต({๐‘Ž, ๐‘, ๐‘}) = {๐‘Ž/๐‘/๐‘, ๐‘Ž๐‘/๐‘, ๐‘Ž๐‘/๐‘, ๐‘Ž/๐‘๐‘, ๐‘Ž๐‘๐‘}.The ๐‘›th Bell number is ๐ต(๐‘›) = #๐ต([๐‘›]). Although there is no known expression for๐ต(๐‘›) as a simple product, there is a recursion.

    Theorem 1.4.1. The Bell numbers satisfy the initial condition ๐ต(0) = 1 and the recur-rence relation

    ๐ต(๐‘›) = โˆ‘๐‘˜(๐‘› โˆ’ 1๐‘˜ โˆ’ 1)๐ต(๐‘› โˆ’ ๐‘˜)

    for ๐‘› โ‰ฅ 1.

    Proof. The initial condition counts the empty partition of โˆ…. For the recursion, given๐œŒ โˆˆ ๐ต([๐‘›]), let ๐‘˜ be the number of elements in the block ๐ต containing ๐‘›. Then thereare (๐‘›โˆ’1๐‘˜โˆ’1) ways to pick the remaining ๐‘˜ โˆ’ 1 elements of [๐‘› โˆ’ 1] to be in ๐ต. And thenumber of ways to partition [๐‘›] โˆ’ ๐ต is ๐ต(๐‘› โˆ’ ๐‘˜). Summing over all possible ๐‘˜ finishesthe proof. โ–ก

    We may sometimes want to keep track of the number of blocks in our partitions.So define ๐‘†(๐‘‡, ๐‘˜) to be the set of all ๐œŒ โŠข ๐‘‡ with ๐‘˜ blocks. The Stirling numbers of thesecond kind are ๐‘†(๐‘›, ๐‘˜) = #๐‘†([๐‘›], ๐‘˜). We will introduce Stirling numbers of the firstkind in the next section. For example

    ๐‘†({๐‘Ž, ๐‘, ๐‘}, 2) = {๐‘Ž๐‘/๐‘, ๐‘Ž๐‘/๐‘, ๐‘Ž/๐‘๐‘}so ๐‘†(3, 2) = 3. Just as with the binomial coefficients, the ๐‘†(๐‘›, ๐‘˜) for 1 โ‰ค ๐‘˜ โ‰ค ๐‘› canbe displayed in a triangle as in Figure 1.3. And like the binomial coefficients, theseStirling numbers satisfy a simple recurrence relation.

    11 1

    1 3 11 7 6 1

    1 15 25 10 1

    Figure 1.3. Rows 1 through 5 of Stirlingโ€™s second triangle

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.5. Permutations by cycle structure 11

    Theorem 1.4.2. The Stirling numbers of the second kind satisfy the initial condition๐‘†(0, ๐‘˜) = ๐›ฟ๐‘˜,0

    and recurrence relation

    ๐‘†(๐‘›, ๐‘˜) = ๐‘†(๐‘› โˆ’ 1, ๐‘˜ โˆ’ 1) + ๐‘˜๐‘†(๐‘› โˆ’ 1, ๐‘˜)for ๐‘› โ‰ฅ 1.

    Proof. By now, the reader should be able to explain the initial condition without diffi-culty. For the recursion, the elements ๐œŒ โˆˆ ๐‘†([๐‘›], ๐‘˜) are of two flavors: those where ๐‘› isin a block by itself and those where ๐‘› is in a block with other elements. Removing ๐‘› inthe first case leaves a partition in ๐‘†([๐‘›โˆ’ 1], ๐‘˜ โˆ’ 1) and this is a bijection. This accountsfor the summand ๐‘†(๐‘›โˆ’1, ๐‘˜โˆ’1). Removing ๐‘› in the second case leaves ๐œŽ โˆˆ ๐‘†([๐‘›โˆ’1], ๐‘˜),but this map is not a bijection. In particular, given ๐œŽ, one can insert ๐‘› into any one ofits ๐‘˜ blocks to recover an element of ๐‘†([๐‘›], ๐‘˜). So the total count is ๐‘˜๐‘†(๐‘› โˆ’ 1, ๐‘˜) for thiscase. โ–ก

    1.5. Permutations by cycle structure

    The ordered analogue of a decomposition of a set into a partition is the decompositionof a permutation of [๐‘›] into cycles. These are counted by the Stirling numbers of thefirst kind.

    The symmetric group is๐”–๐‘› = ๐‘ƒ([๐‘›]). As the name implies,๐”–๐‘› has a group structuredefined as follows. If ๐œ‹ = ๐œ‹1 . . . ๐œ‹๐‘› โˆˆ ๐”–๐‘›, then we can view this permutation as abijection ๐œ‹โˆถ [๐‘›] โ†’ [๐‘›] where ๐œ‹(๐‘–) = ๐œ‹๐‘–. From this it follows that ๐”–๐‘› is a group wherethe operation is composition of functions.

    Given ๐œ‹ โˆˆ ๐”–๐‘› and ๐‘– โˆˆ [๐‘›], there is a smallest exponent โ„“ โ‰ฅ 1 such that ๐œ‹โ„“(๐‘–) = ๐‘–.This and various other claims below will be proved using digraphs in Section 1.9. Inthis case, the elements ๐‘–, ๐œ‹(๐‘–), ๐œ‹2(๐‘–), . . . , ๐œ‹โ„“โˆ’1(๐‘–) are all distinct and we write

    ๐‘ = (๐‘–, ๐œ‹(๐‘–), ๐œ‹2(๐‘–), . . . , ๐œ‹โ„“โˆ’1(๐‘–))and call this a cycle of length โ„“ or simply an โ„“-cycle of ๐œ‹. Cycles of length one are calledfixed points. As an example, if ๐œ‹ = 6514237 and ๐‘– = 1, then we have ๐œ‹(1) = 6, ๐œ‹2(1) =3, ๐œ‹3(1) = 1 so that ๐‘ = (1, 6, 3) is a cycle of ๐œ‹. We now iterate this process: if thereis some ๐‘— โˆˆ [๐‘›] which is not in any of the cycles computed so far, we find the cyclecontaining ๐‘— and continue until every element is in a cycle. The cycle decompositionof ๐œ‹ is ๐œ‹ = ๐‘1 . . . ๐‘๐‘˜ where the ๐‘๐‘— are the cycles found in this process. Continuing ourexample, we could get

    ๐œ‹ = (1, 6, 3)(2, 5)(4)(7).To distinguish the cycle decomposition of๐œ‹ from its description as๐œ‹ = ๐œ‹1 . . . ๐œ‹๐‘›wewillcall the latter the one-line notation for ๐œ‹. This is also distinct from two-line notation,which is where one writes

    (1.7) ๐œ‹ = 1 2 . . . ๐‘›๐œ‹1 ๐œ‹2 . . . ๐œ‹๐‘›.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    12 1. Basic Counting

    11 1

    2 3 16 11 6 1

    24 50 35 10 1

    Figure 1.4. Rows 1 through 5 of Stirlingโ€™s first triangle

    Note that an โ„“-cycle can be written in โ„“ different ways depending on which of itselements one starts with; for example

    (1, 6, 3) = (6, 3, 1) = (3, 1, 6).Furthermore, the distinct cycles of ๐œ‹ are disjoint. So if we think of the cycle ๐‘ as thepermutation of [๐‘›]which agrees with ๐œ‹ on the elements of ๐‘ and has all other elementsas fixed points, then the cycles of๐œ‹ = ๐‘1 . . . ๐‘๐‘˜ commute where we consider the productas a composition of permutations. Returning to our running example, we could write

    ๐œ‹ = (1, 6, 3)(2, 5)(4)(7) = (4)(1, 6, 3)(7)(2, 5) = (5, 2)(3, 1, 6)(7)(4).As mentioned above, we defer the proof of the following result until Section 1.9.

    Theorem 1.5.1. Every ๐œ‹ โˆˆ ๐”–๐‘› has a cycle decomposition ๐œ‹ = ๐‘1 . . . ๐‘๐‘˜ which is uniqueup to the order of the factors and cyclic reordering of the elements within each ๐‘๐‘–.

    We are now in a position to proceed parallel to the development of set partitionswith a given number of blocks in the previous section. For ๐‘› โ‰ฅ 0we denote by ๐‘([๐‘›], ๐‘˜)the set of all permutations in๐”–๐‘› which have ๐‘˜ cycles in their decomposition. Note thedifference between โ€œ๐‘˜ cyclesโ€ referring to the number of cycles and โ€œ๐‘˜-cyclesโ€ referringto the length of the cycles. The signless Stirling numbers of the first kind are ๐‘(๐‘›, ๐‘˜) =#๐‘([๐‘›], ๐‘˜). So, analogous to what we have seen before, ๐‘(๐‘›, ๐‘˜) = 0 for ๐‘˜ < 0 or ๐‘˜ > ๐‘›.To illustrate the notation,

    ๐‘([4], 1) = {(1, 2, 3, 4), (1, 2, 4, 3), (1, 3, 2, 4), (1, 3, 4, 2), (1, 4, 2, 3), (1, 4, 3, 2)}so ๐‘(4, 1) = 6. In general, as youwill be asked to prove in an exercise, ๐‘([๐‘›], 1) = (๐‘›โˆ’1)!.Part of Stirlingโ€™s first triangle is displayed in Figure 1.4. We also have a recursion.

    Theorem1.5.2. The signless Stirling numbers of the first kind satisfy the initial condition๐‘(0, ๐‘˜) = ๐›ฟ๐‘˜,0

    and recurrence relation๐‘(๐‘›, ๐‘˜) = ๐‘(๐‘› โˆ’ 1, ๐‘˜ โˆ’ 1) + (๐‘› โˆ’ 1)๐‘(๐‘› โˆ’ 1, ๐‘˜)

    for ๐‘› โ‰ฅ 1.

    Proof. As usual, we concentrate on the recurrence. Given ๐œ‹ โˆˆ ๐‘([๐‘›], ๐‘˜), we can re-move ๐‘› from its cycle. If ๐‘› was a fixed point, then the resulting permutations arecounted by ๐‘(๐‘› โˆ’ 1, ๐‘˜ โˆ’ 1). If ๐‘› was in a cycle of length at least two, then the per-mutations obtained upon removal are in ๐‘([๐‘› โˆ’ 1], ๐‘˜). So one must find the number of

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.6. Integer partitions 13

    ways to insert ๐‘› into a cycle of some ๐œŽ โˆˆ ๐‘([๐‘›โˆ’1], ๐‘˜). There are โ„“ places to insert ๐‘› in acycle of length โ„“. So the total number of insertion spots is the sum of the cycle lengthsof ๐œŽ, which is ๐‘› โˆ’ 1. โ–ก

    The reader may have guessed that there are also (signed) Stirling numbers of thefirst kind defined by

    ๐‘ (๐‘›, ๐‘˜) = (โˆ’1)๐‘›โˆ’๐‘˜๐‘(๐‘›, ๐‘˜).It is not immediately apparent why one would want to attach signs to these constants.We will see one reason in Chapter 5 where it will be shown that the ๐‘ (๐‘›, ๐‘˜) are theWhitney numbers of the first kind for the lattice of set partitions ordered by refinement.Here we will content ourselves with proving an analogue of part (d) of Theorem 1.3.3.

    Corollary 1.5.3. For ๐‘› โ‰ฅ 0 we have

    โˆ‘๐‘˜๐‘ (๐‘›, ๐‘˜) = { 1 if ๐‘› = 0 or 1,0 if ๐‘› โ‰ฅ 2.

    Proof. The cases when ๐‘› = 0 or 1 are easy to verify, so assume ๐‘› โ‰ฅ 2. Since ๐‘ (๐‘›, ๐‘˜) =(โˆ’1)๐‘›โˆ’๐‘˜๐‘(๐‘›, ๐‘˜) and (โˆ’1)๐‘› is constant throughout the summation, it suffices to showthatโˆ‘๐‘˜(โˆ’1)๐‘˜๐‘(๐‘›, ๐‘˜) = 0. Using Theorem 1.5.2 and induction on ๐‘› we obtain

    โˆ‘๐‘˜(โˆ’1)๐‘˜๐‘(๐‘›, ๐‘˜) = โˆ‘

    ๐‘˜(โˆ’1)๐‘˜๐‘(๐‘› โˆ’ 1, ๐‘˜ โˆ’ 1) +โˆ‘

    ๐‘˜(โˆ’1)๐‘˜(๐‘› โˆ’ 1)๐‘(๐‘› โˆ’ 1, ๐‘˜)

    = โˆ’โˆ‘๐‘˜(โˆ’1)๐‘˜โˆ’1๐‘(๐‘› โˆ’ 1, ๐‘˜ โˆ’ 1) + (๐‘› โˆ’ 1)โˆ‘

    ๐‘˜(โˆ’1)๐‘˜๐‘(๐‘› โˆ’ 1, ๐‘˜)

    = โˆ’0 + (๐‘› โˆ’ 1)0

    = 0

    as desired. โ–ก

    Note the usefulness of considering the sums in the preceding proof as over ๐‘˜ โˆˆ โ„คrather than 0 โ‰ค ๐‘˜ โ‰ค ๐‘›. This does away with having to consider any special cases at thevalues ๐‘˜ = 0 or ๐‘˜ = ๐‘›.

    1.6. Integer partitions

    Just as one can partition a set into blocks, one can partition a nonnegative integer asa sum. Integer partitions play an important role not just in combinatorics but also innumber theory and the representation theory of the symmetric group. See the appendixat the end of the book for more information on the latter.

    An integer partition of ๐‘› โ‰ฅ 0 is a multiset ๐œ† of positive integers such that the sumof the elements of ๐œ†, denoted |๐œ†|, is ๐‘›. We also write ๐œ† โŠข ๐‘›. These elements are calledthe parts. Since the parts of ๐œ† are unordered, we will always list them in a canonicalorder ๐œ† = (๐œ†1, . . . , ๐œ†๐‘˜) which is weakly decreasing. We let ๐‘ƒ(๐‘›) denote the set of all

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    14 1. Basic Counting

    partitions of ๐‘› and ๐‘(๐‘›) = #๐‘ƒ(๐‘›). For example,๐‘ƒ(4) = {(1, 1, 1, 1), (2, 1, 1), (2, 2), (3, 1), (4)}

    so that ๐‘(4) = 5. Note the distinction between ๐‘ƒ([๐‘›]), which is a set of set partitions,and ๐‘ƒ(๐‘›), which is a set of integer partitions. Sometimes we will just say โ€œpartitionโ€if the context makes it clear whether we are partitioning sets or integers. We will usemultiplicity notation for integer partitions just as we would for any multiset, writing

    ๐œ† = (1๐‘š1 , 2๐‘š2 , . . . , ๐‘›๐‘š๐‘›)where๐‘š๐‘– is the multiplicity of ๐‘– in ๐œ†.

    There is no known product formula for ๐‘(๐‘›). In fact, there is not even a simplerecurrence relation. One can use generating functions to derive results about thesenumbers, but that must wait until Chapter 3. Here we will just introduce a usefulgeometric device for studying ๐‘(๐‘›). The Ferrers or Young diagram of ๐œ† = (๐œ†1, . . . , ๐œ†๐‘˜) โŠข๐‘› is an array of ๐‘› boxes into left-justified rows such that row ๐‘– contains ๐œ†๐‘– boxes. Dotsare also sometimes used in place of boxes and in this case some authors use โ€œFerrersdiagramโ€ for the dot variant and โ€œYoung diagramโ€ for the corresponding array of boxes.We often make no distinction between a partition and its Young diagram. The Youngdiagram of ๐œ† = (5, 5, 2, 1) is shown in Figure 1.5. We should warn the reader thatwe are writing our Young diagrams in English notation where the rows are numberedfrom 1 to ๐‘˜ from the top down as in a matrix. Some authors prefer French notationwhere the rows are numbered from bottom to top as in a Cartesian coordinate system.The conjugate or transpose of ๐œ† is the partition ๐œ†๐‘ก whose Young diagram is obtained byreflecting the diagram of ๐œ† about its main diagonal. This is done in Figure 1.5, showingthat (5, 5, 2, 1)๐‘ก = (4, 3, 2, 2, 2). There is also another way to express the parts of theconjugate.

    ๐œ† = (5, 5, 2, 1) = = โ€ข โ€ข โ€ข โ€ข โ€ขโ€ข โ€ข โ€ข โ€ข โ€ขโ€ข โ€ขโ€ข

    ๐œ†๐‘ก =

    Figure 1.5. A partition, its Young diagram, and its conjugate

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.6. Integer partitions 15

    Proposition 1.6.1. If ๐œ† = (๐œ†1, . . . , ๐œ†๐‘˜) is a partition and ๐œ†๐‘ก = (๐œ†๐‘ก1, . . . , ๐œ†๐‘ก๐‘™ ), then, for1 โ‰ค ๐‘— โ‰ค ๐‘™,

    ๐œ†๐‘ก๐‘— = #{๐‘– โˆฃ ๐œ†๐‘– โ‰ฅ ๐‘—}.

    Proof. By definition, ๐œ†๐‘ก๐‘— is the length of the ๐‘—th column of ๐œ†. But that column containsa box in row ๐‘– if and only if ๐œ†๐‘– โ‰ฅ ๐‘—. โ–ก

    The number of parts of a partition ๐œ† is called its length and is denoted โ„“(๐œ†). Atthis point the reader is probably expecting a discussion of those partitions of ๐‘› withโ„“(๐œ†) = ๐‘˜. As it turns out, it is a bit simpler to consider ๐‘ƒ(๐‘›, ๐‘˜), the set of all partitions ๐œ†of๐‘›with โ„“(๐œ†) โ‰ค ๐‘˜, and๐‘(๐‘›, ๐‘˜) = #๐‘ƒ(๐‘›, ๐‘˜). Note that the number of ๐œ† โŠข ๐‘›with โ„“(๐œ†) = ๐‘˜is just ๐‘(๐‘›, ๐‘˜) โˆ’ ๐‘(๐‘›, ๐‘˜ โˆ’ 1). So in some sense the two viewpoints are equivalent. But itwill be easier to state our results in terms of ๐‘(๐‘›, ๐‘˜). Note also that

    ๐‘(๐‘›, 0) โ‰ค ๐‘(๐‘›, 1) โ‰ค โ‹ฏ โ‰ค ๐‘(๐‘›, ๐‘›) = ๐‘(๐‘›, ๐‘› + 1) = โ‹ฏ = ๐‘(๐‘›).Because of this behavior, it is best to display the ๐‘(๐‘›, ๐‘˜) in a matrix, rather than a trian-gle, keeping in mind that the entries in the ๐‘›th row eventually stabilize to an infiniterepetition of the constant ๐‘(๐‘›). Part of this array will be found in Figure 1.6. We alsoassume that ๐‘(๐‘›, ๐‘˜) = 0 if ๐‘› < 0 or ๐‘˜ < 0. Unlike ๐‘(๐‘›), one can write down a simplerecurrence relation for ๐‘(๐‘›, ๐‘˜).

    Theorem 1.6.2. The ๐‘(๐‘›, ๐‘˜) satisfy

    ๐‘(0, ๐‘˜) = { 0 if ๐‘˜ < 0,1 if ๐‘˜ โ‰ฅ 0and

    ๐‘(๐‘›, ๐‘˜) = ๐‘(๐‘› โˆ’ ๐‘˜, ๐‘˜) + ๐‘(๐‘›, ๐‘˜ โˆ’ 1)for ๐‘› โ‰ฅ 1

    Proof. We skip directly to the recursion. Note that since conjugation is a bijection,๐‘(๐‘›, ๐‘˜) also counts the partitions ๐œ† = (๐œ†1, . . . , ๐œ†๐‘™) โŠข ๐‘› such that ๐œ†1 โ‰ค ๐‘˜. It will beconvenient to use this interpretation of ๐‘(๐‘›, ๐‘˜) for the proof. We have two possiblecases. If ๐œ†1 = ๐‘˜, then ๐œ‡ = (๐œ†2, . . . , ๐œ†๐‘™) โŠข ๐‘› โˆ’ ๐‘˜ and ๐œ†2 โ‰ค ๐œ†1 = ๐‘˜. So these partitions arecounted by ๐‘(๐‘› โˆ’ ๐‘˜, ๐‘˜). The other possibility is that ๐œ†1 โ‰ค ๐‘˜ โˆ’ 1. And these ๐œ† are takencare of by the ๐‘(๐‘›, ๐‘˜ โˆ’ 1) term. โ–ก

    0 1 2 3 4 50 1 1 1 1 1 11 0 1 1 1 1 12 0 1 2 2 2 23 0 1 2 3 3 34 0 1 3 4 5 5

    Figure 1.6. The values ๐‘(๐‘›, ๐‘˜) for 0 โ‰ค ๐‘› โ‰ค 4 and 0 โ‰ค ๐‘˜ โ‰ค 5

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    16 1. Basic Counting

    1.7. Compositions

    Recall that integer partitions are really unordered even though we usually list them inweakly decreasing fashion. This raises the question about what happens if we consid-ered ways to write ๐‘› as a sum when the summands are ordered. This is the notion of acomposition.

    A composition of ๐‘› is a sequence ๐›ผ = [๐›ผ1, . . . , ๐›ผ๐‘˜] of positive integers called partssuch thatโˆ‘๐‘– ๐›ผ๐‘– = ๐‘›. We write ๐›ผ โŠง ๐‘› and use square brackets to distinguish composi-tions from integer partitions. This causes a notational conflict between [๐‘›] as a compo-sition of ๐‘› and as the integers from 1 to ๐‘›, but the context should make it clear whichinterpretation is meant. Let ๐‘„(๐‘›) be the set of compositions of ๐‘› and ๐‘ž(๐‘›) = #๐‘„(๐‘›).So the compositions of 4 are

    ๐‘„(4) = {[1, 1, 1, 1], [2, 1, 1], [1, 2, 1], [1, 1, 2], [2, 2], [3, 1], [1, 3], [4]}.

    So ๐‘ž(4) = 8, which is a power of 2. This, as your author is fond of saying, is not acoincidence.

    Theorem 1.7.1. For ๐‘› โ‰ฅ 1 we have

    ๐‘ž(๐‘›) = 2๐‘›โˆ’1.

    Proof. There is a famous bijection ๐œ™ โˆถ 2[๐‘›โˆ’1] โ†’ ๐‘„(๐‘›), which we will use to provethis result. This map will be useful when working with quasisymmetric functions inChapter 8. Given ๐‘† = {๐‘ 1, . . . , ๐‘ ๐‘˜} โŠ† [๐‘› โˆ’ 1] written in increasing order, we define

    (1.8) ๐œ™(๐‘†) = [๐‘ 1 โˆ’ ๐‘ 0, ๐‘ 2 โˆ’ ๐‘ 1, . . . , ๐‘ ๐‘˜ โˆ’ ๐‘ ๐‘˜โˆ’1, ๐‘ ๐‘˜+1 โˆ’ ๐‘ ๐‘˜]

    where, by definition, ๐‘ 0 = 0 and ๐‘ ๐‘˜+1 = ๐‘›. To show that ๐œ™ is well-defined, suppose๐œ™(๐‘†) = [๐›ผ1, . . . , ๐›ผ๐‘˜+1]. Since ๐‘† is increasing, ๐›ผ๐‘– = ๐‘ ๐‘– โˆ’ ๐‘ ๐‘–โˆ’1 is a positive integer. Fur-thermore

    ๐‘˜+1โˆ‘๐‘–=1

    ๐›ผ๐‘– =๐‘˜+1โˆ‘๐‘–=1

    (๐‘ ๐‘– โˆ’ ๐‘ ๐‘–โˆ’1) = ๐‘ ๐‘˜+1 โˆ’ ๐‘ 0 = ๐‘›.

    Thus ๐œ™(๐‘†) โˆˆ ๐‘„(๐‘›) as desired.To show that ๐œ™ is bijective, we construct its inverse ๐œ™โˆ’1 โˆถ ๐‘„(๐‘›) โ†’ 2[๐‘›โˆ’1]. Given

    ๐›ผ = [๐›ผ1, . . . , ๐›ผ๐‘˜+1] โˆˆ ๐‘„(๐‘›), we let

    ๐œ™โˆ’1(๐›ผ) = {๐›ผ1, ๐›ผ1 + ๐›ผ2, ๐›ผ1 + ๐›ผ2 + ๐›ผ3, . . . , ๐›ผ1 + ๐›ผ2 +โ‹ฏ+ ๐›ผ๐‘˜}.

    It should not be hard for the reader to prove that ๐œ™โˆ’1 is well-defined and the inverse of๐œ™. โ–ก

    As usual, we wish to make a more refined count by restricting the number of con-stituents of the object under consideration. Let ๐‘„(๐‘›, ๐‘˜) be the set of all compositionsof ๐‘› with exactly ๐‘˜ parts and let ๐‘ž(๐‘›, ๐‘˜) = #๐‘„(๐‘›, ๐‘˜). Since the ๐‘ž(๐‘›, ๐‘˜) will turn out tobe previously studied constants, we will forgo the usual triangle. The result below fol-lows easily by restricting the function ๐œ™ from the previous proof, so the demonstrationis omitted.

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.8. The twelvefold way 17

    Theorem 1.7.2. The composition numbers satisfy๐‘ž(0, ๐‘˜) = ๐›ฟ๐‘˜,0

    and

    ๐‘ž(๐‘›, ๐‘˜) = (๐‘› โˆ’ 1๐‘˜ โˆ’ 1)

    for ๐‘› โ‰ฅ 1. โ–ก

    1.8. The twelvefold way

    Wenowhave all the tools in place to count certain functions. There are 12 types of suchfunctions and so this scheme is called the twelvefoldway, an ideawhichwas introducedin a series of lectures by Gian-Carlo Rota. The namewas suggested by Joel Spencer andshould not be confused with the twelvefold path of Buddhism!

    We will consider three types of functions ๐‘“โˆถ ๐ท โ†’ ๐‘…, namely, arbitrary functions,injections, and surjections. We will also permit the domain ๐ท and range ๐‘… to be oftwo types each: either distinguishable, which means it is a set, or indistinguishable,which means it is a multiset consisting of a single element repeated some number oftimes. Thus the total number of types of functions under consideration is the productof the number of choices for ๐‘“, ๐ท, and ๐‘… or 3 โ‹… 2 โ‹… 2 = 12. Of course, a function wherethe domain or range is a multiset is not really well-defined, even though the intuitivenotion should be clear. To be precise, when ๐ท is a multiset and ๐‘… is a set, suppose ๐ทโ€ฒis a set with |๐ทโ€ฒ| = |๐ท|. Then a function ๐‘“โˆถ ๐ท โ†’ ๐‘… is an equivalence class of functions๐‘“โˆถ ๐ทโ€ฒ โ†’ ๐‘… where ๐‘“ and ๐‘” are equivalent if #๐‘“โˆ’1(๐‘Ÿ) = #๐‘”โˆ’1(๐‘Ÿ) for all ๐‘Ÿ โˆˆ ๐‘…. Thereader can come up with the corresponding notions for the other cases if desired. Wewill assume throughout that |๐ท| = ๐‘› and |๐‘…| = ๐‘˜ are both nonnegative integers. Wewill collect the results in the chart in Table 1.1.

    We first deal with the case where both ๐ท and ๐‘… are distinguishable. Without lossof generality, we can assume that ๐ท = [๐‘›]. So a function ๐‘“โˆถ ๐ท โ†’ ๐‘… can be consideredas a word ๐‘ค = ๐‘“(1)๐‘“(2) . . . ๐‘“(๐‘›). Since there are ๐‘˜ choices for each ๐‘“(๐‘–), we have, byTheorem 1.2.2, that the number of such ๐‘“ is #๐‘ƒ(([๐‘˜], ๐‘›)) = ๐‘˜๐‘›. If ๐‘“ is injective, then๐‘ค becomes a permutation, giving the count #๐‘ƒ([๐‘˜], ๐‘›) = ๐‘˜โ†“๐‘› from Theorem 1.2.1. Forsurjective functions, we need a new concept. If ๐ท is a set, then the kernel of a function๐‘“โˆถ ๐ท โ†’ ๐‘… is the partition ker ๐‘“ of๐ทwhose blocks are the nonempty subsets of the form๐‘“โˆ’1(๐‘Ÿ) for ๐‘Ÿ โˆˆ ๐‘…. For example, if ๐‘“โˆถ {๐‘Ž, ๐‘, ๐‘, ๐‘‘} โ†’ {1, 2, 3} is given by ๐‘“(๐‘Ž) = ๐‘“(๐‘) = 2,

    Table 1.1. The twelvefold way

    ๐ท ๐‘… arbitrary ๐‘“ injective ๐‘“ surjective ๐‘“

    dist. dist. ๐‘˜๐‘› ๐‘˜โ†“๐‘› ๐‘˜! ๐‘†(๐‘›, ๐‘˜)indist. dist. (๐‘›+๐‘˜โˆ’1๐‘› ) (

    ๐‘˜๐‘›) (

    ๐‘›โˆ’1๐‘˜โˆ’1)

    dist. indist. โˆ‘๐‘˜๐‘—=0 ๐‘†(๐‘›, ๐‘—) ๐›ฟ(๐‘› โ‰ค ๐‘˜) ๐‘†(๐‘›, ๐‘˜)indist. indist. ๐‘(๐‘›, ๐‘˜) ๐›ฟ(๐‘› โ‰ค ๐‘˜) ๐‘(๐‘›, ๐‘˜) โˆ’ ๐‘(๐‘›, ๐‘˜ โˆ’ 1)

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    18 1. Basic Counting

    ๐‘“(๐‘) = 3, and ๐‘“(๐‘‘) = 1, then ker ๐‘“ = ๐‘Ž๐‘/๐‘/๐‘‘. If ๐‘“ is to be surjective, then the functioncan be specified by picking a partition of๐ท for ker ๐‘“ and then picking a bijection ๐‘” fromthe blocks of ker ๐‘“ into ๐‘…. Continuing our example, ๐‘“ is completely determined by itskernel and the bijection ๐‘”(๐‘Ž๐‘) = 2, ๐‘”(๐‘) = 3, and ๐‘”(๐‘‘) = 1. The number of ways tochoose ker ๐‘“ = ๐ต1/ . . . /๐ต๐‘˜ is ๐‘†(๐‘›, ๐‘˜) by definition. And, using the injective case with๐‘› = ๐‘˜, the number of bijections ๐‘”โˆถ {๐ต1, . . . , ๐ต๐‘˜} โ†’ ๐‘… is ๐‘˜โ†“๐‘˜= ๐‘˜!. So the total count is๐‘˜! ๐‘†(๐‘›, ๐‘˜).

    Now suppose ๐ท is indistinguishable and ๐‘… is distinguishable where we assume๐‘… = [๐‘˜]. Then one can think of ๐‘“โˆถ ๐ท โ†’ ๐‘… as a multiset ๐‘€ = {{1๐‘š1 , . . . , ๐‘˜๐‘š๐‘˜ }} on ๐‘…where ๐‘š๐‘– = #๐‘“โˆ’1(๐‘–). It follows that โˆ‘๐‘–๐‘š๐‘– = #๐ท = ๐‘›. So, by Theorem 1.3.4, thenumber of all such ๐‘“ is

    ((๐‘˜๐‘›)) = (๐‘› + ๐‘˜ โˆ’ 1

    ๐‘› ).

    If ๐‘“ is to be injective, then we are picking an ๐‘›-element subset of ๐‘… = [๐‘˜] giving a countof (๐‘˜๐‘›). If ๐‘“ is to be surjective, then๐‘š๐‘– โ‰ฅ 1 for all ๐‘– so that [๐‘š1, . . . , ๐‘š๐‘˜] is a compositionof ๐‘›. It follows from Theorem 1.7.2 that the number of functions is ๐‘ž(๐‘›, ๐‘˜) = (๐‘›โˆ’1๐‘˜โˆ’1).

    To deal with the case when ๐ท = [๐‘›] is distinguishable and ๐‘… is indistinguishable,we introduce a useful extension of the Kronecker delta. If ๐‘† is any statement, we let

    (1.9) ๐›ฟ(๐‘†) = { 1 if ๐‘† is true,0 if ๐‘† is false.Returning to our counting, ๐‘“ is completely determined by its kernel, which is a parti-tion of [๐‘›]. If we are considering all ๐‘“, then the kernel can have any number of blocksup to and including ๐‘˜. Summing the corresponding Stirling numbers gives the corre-sponding entry in Table 1.1. If ๐‘“ is injective, then for such a function to exist we musthave ๐‘› โ‰ค ๐‘˜. And in that case there is only one possible kernel, namely the partitioninto singleton blocks. This count can be summarized as ๐›ฟ(๐‘› โ‰ค ๐‘˜). For surjective ๐‘“ weare partitioning [๐‘›] into exactly ๐‘˜ blocks, giving ๐‘†(๐‘›, ๐‘˜) possibilities.

    If๐ท and ๐‘… are both indistinguishable, then the nonzero numbers of the form๐‘š๐‘– =#๐‘“โˆ’1(๐‘Ÿ) for ๐‘Ÿ โˆˆ ๐‘… completely determine ๐‘“. And these numbers form a partition of๐‘› = #๐ท into at most ๐‘˜ = #๐‘… parts. Recalling the notation of Section 1.6, the totalnumber of such ๐‘“ is ๐‘(๐‘›, ๐‘˜). The line of reasoning for injective functions follows thatof the previous paragraph with the same resulting answer. Finally, for surjectivity weneed exactly ๐‘˜ parts, which is counted by ๐‘(๐‘›, ๐‘˜) โˆ’ ๐‘(๐‘›, ๐‘˜ โˆ’ 1).

    1.9. Graphs and digraphs

    Graph theory is a substantial part of combinatorics. We will use directed graphs togive the postponed proof of the existence and uniqueness of the cycle decompositionof permutations in ๐”–๐‘›.

    A labeled graph ๐บ = (๐‘‰, ๐ธ) consists of a set ๐‘‰ of elements called vertices and a set๐ธ of elements called edges where an edge consists of an unordered pair of vertices. Wewill write ๐‘‰(๐บ) and ๐ธ(๐บ) for the vertex and edge set of ๐บ, respectively, if we wish toemphasize the graph involved. Geometrically, we think of the vertices as nodes andthe edges as line segments or curves joining them. Conventionally, in graph theory an

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.9. Graphs and digraphs 19

    ๐‘ฃ ๐‘ค

    ๐‘ฅ๐‘ฆ

    Figure 1.7. A graph ๐บ

    edge connecting vertices ๐‘ฃ and ๐‘ค is written ๐‘’ = ๐‘ฃ๐‘ค rather than ๐‘’ = {๐‘ฃ, ๐‘ค}. In this casewe say that ๐‘’ contains ๐‘ฃ and ๐‘ค, or that ๐‘’ has endpoints ๐‘ฃ and ๐‘ค. We also say that ๐‘ฃ and๐‘ค are neighbors. For example, a drawing of the graph ๐บ with vertices ๐‘‰ = {๐‘ฃ, ๐‘ค, ๐‘ฅ, ๐‘ฆ}and edges ๐ธ = {๐‘ฃ๐‘ค, ๐‘ฃ๐‘ฅ, ๐‘ฃ๐‘ฆ, ๐‘ค๐‘ฅ, ๐‘ฅ๐‘ฆ} is displayed in Figure 1.7. If #๐‘‰ = 1, then there isonly one graph with vertex set ๐‘‰ and such a graph is called trivial.

    Call graph ๐ป a subgraph of ๐บ, written ๐ป โŠ† ๐บ, if ๐‘‰(๐ป) โŠ† ๐‘‰(๐บ) and ๐ธ(๐ป) โŠ† ๐ธ(๐บ).In this case we also say that ๐บ contains ๐ป. There are several types of subgraphs whichwill play an important role in what follows. A walk of length โ„“ in ๐บ is a sequence ofvertices๐‘Š โˆถ ๐‘ฃ0, ๐‘ฃ1, . . . , ๐‘ฃโ„“ such that ๐‘ฃ๐‘–โˆ’1๐‘ฃ๐‘– โˆˆ ๐ธ for 1 โ‰ค ๐‘– โ‰ค โ„“. We say that the walk isfrom ๐‘ฃ0 to ๐‘ฃโ„“, or is a ๐‘ฃ0โ€“๐‘ฃโ„“ walk, or that ๐‘ฃ0, ๐‘ฃโ„“ are the endpoints of๐‘Š . We call๐‘Š a pathif all the vertices are distinct and we usually use letters like ๐‘ƒ for paths. In particular,we will use๐‘Š๐‘› or ๐‘ƒ๐‘› to denote a walk or a path having ๐‘› vertices, respectively. In ourexample graph, ๐‘ƒ โˆถ ๐‘ฆ, ๐‘ฃ, ๐‘ฅ, ๐‘ค is a path of length 3 from ๐‘ฆ to๐‘ค. Notice that length refersto the number of edges in the path, which is one less than the number of vertices. Acycle of length โ„“ in ๐บ is a sequence of distinct vertices ๐ถ โˆถ ๐‘ฃ1, ๐‘ฃ2, . . . , ๐‘ฃโ„“ such that wehave distinct edges ๐‘ฃ๐‘–โˆ’1๐‘ฃ๐‘– for 1 โ‰ค ๐‘– โ‰ค โ„“, and subscripts are taken modulo โ„“ so that๐‘ฃ0 = ๐‘ฃโ„“. Returning to our running example, ๐ถ โˆถ ๐‘ฃ, ๐‘ฅ, ๐‘ฆ is a cycle in ๐บ of length 3. In acycle the length is both the number of vertices and the number of edges. The notation๐ถ๐‘› will be used for a cycle with ๐‘› vertices and we will call this an ๐‘›-cycle. We alsodenote by ๐พ๐‘› the complete graphwhich consists of ๐‘› vertices and all possible (๐‘›2) edgesbetween them. A copy of a complete graph in a graph ๐บ is often called a clique. Thereis a close relationship between some of the parts of a graphwhich we have just defined.

    Lemma 1.9.1. Let ๐บ be a graph and let ๐‘ข, ๐‘ฃ โˆˆ ๐‘‰ .

    (a) Any walk from ๐‘ข to ๐‘ฃ contains a path from ๐‘ข to ๐‘ฃ.(b) The union of any two different paths from ๐‘ข to ๐‘ฃ contains a cycle.

    Proof. We will prove (a) and leave (b) as an exercise. Let๐‘Š โˆถ ๐‘ฃ0, . . . , ๐‘ฃโ„“ be the walk.We will induct on โ„“, the length of๐‘Š . If โ„“ = 0, then๐‘Š is a path. So assume โ„“ โ‰ฅ 1. If๐‘Šis a path, then we are done. If not, then some vertex of๐‘Š is repeated, say ๐‘ฃ๐‘– = ๐‘ฃ๐‘— for๐‘– < ๐‘—. Then we have a ๐‘ขโ€“๐‘ฃ walk๐‘Š โ€ฒ โˆถ ๐‘ฃ0, ๐‘ฃ1, . . . , ๐‘ฃ๐‘–, ๐‘ฃ๐‘—+1, ๐‘ฃ๐‘—+2, . . . , ๐‘ฃโ„“ which is shorterthan๐‘Š . By induction,๐‘Š โ€ฒ contains a path ๐‘ƒ and so๐‘Š contains ๐‘ƒ as well. โ–ก

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    20 1. Basic Counting

    To state our first graphical enumeration result, let ๐’ข(๐‘‰) be the set of all graphs onthe vertex set ๐‘‰ . We will also use ๐’ข(๐‘‰, ๐‘˜) to denote the set of all graphs in ๐’ข(๐‘‰) with ๐‘˜edges.

    Theorem 1.9.2. For ๐‘› โ‰ฅ 1 and ๐‘˜ โ‰ฅ 0 we have

    #๐’ข([๐‘›]) = 2(๐‘›2)

    and

    #๐’ข([๐‘›], ๐‘˜) = ((๐‘›2)๐‘˜ ).

    Proof. If ๐‘‰ = [๐‘›] is given, then a graph ๐บ with vertex set ๐‘‰ is completely determinedby its edge set. Since there are ๐‘› vertices, there are (๐‘›2) possible edges to choose from.So the number of ๐บ in ๐’ข([๐‘›]) is the number of subsets of these edges, which, by The-orem 1.3.1, is the given power of 2. The proof for ๐’ข([๐‘›], ๐‘˜) is similar, just using thedefinition (1.4). โ–ก

    Agraph is unlabeled if the vertices in๐‘‰ are indistinguishable. If the type of graph isclear from the context or does not matter for the particular application at hand, we willomit the adjectives โ€œlabeledโ€ and โ€œunlabeledโ€. The enumeration of unlabeled graphsis much more complicated than for labeled ones. So this discussion is postponed untilSection 6.4 where we will develop the necessary tools.

    If ๐บ is a graph and ๐‘ฃ โˆˆ ๐‘‰ , then the degree of ๐‘ฃ is

    deg ๐‘ฃ = the number of ๐‘’ โˆˆ ๐ธ containing ๐‘ฃ.

    In our running example deg ๐‘ฃ = deg ๐‘ฅ = 3 and deg๐‘ค = deg ๐‘ฆ = 2. There is a nicerelationship between vertex degrees and the cardinality of the edge set. The demon-stration of the next result illustrates an important method of proof in combinatorics,counting in pairs.

    Theorem 1.9.3. For any graph ๐บ we have

    โˆ‘๐‘ฃโˆˆ๐‘‰

    deg ๐‘ฃ = 2|๐ธ|.

    Proof. Consider๐‘ƒ = {(๐‘ฃ, ๐‘’) | ๐‘ฃ is contained in ๐‘’}.

    Then#๐‘ƒ = โˆ‘

    ๐‘ฃโˆˆ๐‘‰(number of ๐‘’ containing ๐‘ฃ) = โˆ‘

    ๐‘ฃโˆˆ๐‘‰deg ๐‘ฃ.

    On the other hand

    #๐‘ƒ = โˆ‘๐‘’โˆˆ๐ธ

    (number of ๐‘ฃ contained in ๐‘’) = โˆ‘๐‘’โˆˆ๐ธ

    2 = 2|๐ธ|.

    Equating the two counts finishes the proof. โ–ก

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    1.9. Graphs and digraphs 21

    ๐‘ฃ ๐‘ค

    ๐‘ฅ๐‘ฆ

    Figure 1.8. A digraph ๐ท

    Theorem 1.9.3 is often called the Handshaking Lemma because of the followinginterpretation. Suppose ๐‘‰ is the set of people at a party and we draw an edge betweenperson ๐‘ฃ and person ๐‘ค if they shake hands during the festivities. Then adding up thenumber of handshakes given by each person gives twice the total number of hand-shakes.

    It is often useful to have specified directions along the edges. A labeled directedgraph, also called a digraph, is ๐ท = (๐‘‰, ๐ด) where ๐‘‰ is a set of vertices and ๐ด is a setof arcs which are ordered pairs of vertices. We use the notation ๐‘Ž = ๐‘ฃ๐‘ค for arcs andsay that ๐‘Ž goes from ๐‘ฃ to ๐‘ค. To illustrate, the digraph with ๐‘‰ = {๐‘ฃ, ๐‘ค, ๐‘ฅ, ๐‘ฆ} and ๐ด ={๐‘ฃ๐‘ค,๐‘ค๐‘ฃ,๐‘ค๐‘ฅ, ๐‘ฆ๐‘ฃ, ๐‘ฆ๐‘ฅ} is drawn in Figure 1.8. We use ๐‘‰(๐ท) and๐ด(๐ท) to denote the vertexset and arc set, respectively, of a digraph ๐ท when we wish to be more precise. Directedwalks, paths, and cycles are defined for digraphs similarly to their undirected cousins ingraphs, just insisting the ๐‘ฃ๐‘–โˆ’1๐‘ฃ๐‘– โˆˆ ๐ด for ๐‘– in the appropriate range. So, in our exampledigraph, ๐‘ƒ โˆถ ๐‘ฆ, ๐‘ฃ, ๐‘ค, ๐‘ฅ is a directed path and ๐ถ โˆถ ๐‘ฃ,๐‘ค is a directed cycle. Note that๐‘ค, ๐‘ฅ, ๐‘ฆ, ๐‘ฃ is not a directed path because the arc between ๐‘ฅ and ๐‘ฆ goes the wrong way.

    Let ๐’Ÿ(๐‘‰) and ๐’Ÿ(๐‘‰, ๐‘˜) be the set of digraphs and the set of digraphs with ๐‘˜ arcs,respectively, having vertex set ๐‘‰ . The next result is proved in much the same manneras Theorem 1.9.2 so the demonstration is omitted.

    Theorem 1.9.4. For ๐‘› โ‰ฅ 1 and ๐‘˜ โ‰ฅ 0 we have#๐’Ÿ([๐‘›]) = 2๐‘›(๐‘›โˆ’1)

    and

    #๐’Ÿ([๐‘›], ๐‘˜) = (๐‘›(๐‘› โˆ’ 1)๐‘˜ ). โ–ก

    In a digraph ๐ท there are two types of degrees. Vertex ๐‘ฃ โˆˆ ๐‘‰ has out-degree andin-degree

    odeg ๐‘ฃ = the number of ๐‘Ž โˆˆ ๐ด of the form ๐‘Ž = ๐‘ฃ๐‘ค,ideg ๐‘ฃ = the number of ๐‘Ž โˆˆ ๐ด of the form ๐‘Ž = ๐‘ค๐‘ฃ,

    respectively. In Figure 1.8, for example, odeg ๐‘ฃ = 1 and ideg ๐‘ฃ = 2. The next result willpermit us to finish our leftover business from Section 1.5. The union of digraphs ๐ทโˆช๐ธis the digraph with vertices ๐‘‰(๐ทโˆช๐ธ) = ๐‘‰(๐ท)โˆช๐‘‰(๐ธ) and arcs ๐ด(๐ทโˆช๐ธ) = ๐ด(๐ท)โˆช๐ด(๐ธ).

  • Prepublication copy provided to Dr Bruce Sagan. Please give confirmation to AMS by September 21, 2020.

    Not for print or electronic distribution. This file may not be posted electronically.

    22 1. Basic Counting

    Lemma 1.9.5. Let ๐ท = (๐‘‰, ๐ด) be a digraph. We have odeg ๐‘ฃ = ideg ๐‘ฃ = 1 for all ๐‘ฃ โˆˆ ๐‘‰if and only if ๐ท is a disjoint union of directed cycles.

    Proof. The reverse implication is easy to see since the out-degree and in-degree of anyvertex ๐‘ฃ of ๐ท would be the same as those degrees in the directed cycle containing ๐‘ฃ.But in such a cycle odeg ๐‘ฃ = ideg ๐‘ฃ = 1.

    For the forward direction, pick any ๐‘ฃ = ๐‘ฃ1 โˆˆ ๐‘‰ . Since odeg ๐‘ฃ1 = 1 there mustexist a vertex ๐‘ฃ2 with ๐‘ฃ1๐‘ฃ2 โˆˆ ๐ด. By the same token, there must be a ๐‘ฃ3 with ๐‘ฃ2๐‘ฃ3 โˆˆ ๐ด.Continue to generate a sequence ๐‘ฃ1, ๐‘ฃ2, . . . in this manner. Since ๐‘‰ is finite, there mustbe two indices ๐‘– < ๐‘— such that ๐‘ฃ๐‘– = ๐‘ฃ๐‘— . Let ๐‘– be the smallest such index and let ๐‘— bethe first index after ๐‘– where repetition occurs. Thus ๐‘– = 1, for if not, then we have๐‘ฃ๐‘–โˆ’1๐‘ฃ๐‘–, ๐‘ฃ๐‘—โˆ’1๐‘ฃ๐‘– โˆˆ ๐ด, contradicting the fact that ideg ๐‘ฃ๐‘– = 1. By definition of ๐‘—, we havea directed cycle ๐ถ โˆถ ๐‘ฃ1, ๐‘ฃ2, . . . , ๐‘ฃ๐‘—โˆ’1. Furthermore, no vertex of ๐ถ can be involved inanother arc since that would make its out-degree or in-degree too large. Continuing inthis manner, we can decompose ๐ท into disjoint directed cycles. โ–ก

    Sometimes it is useful to allow loops in a graph which are edges of the form ๐‘’ = ๐‘ฃ๐‘ฃ.Similarly, we canpermit loops as arcs๐‘Ž = ๐‘ฃ๐‘ฃ in a digraph. Another possibility is thatwewould wantmultiple edges, meaning that one could have more than one edge betweena given pair of vertices, making ๐ธ into a multiset. Multiple arcs are defined similarly.If we make no specification for our (di)graph, then we are assuming that it has neitherloops nor multiple edges. We will now prove Theorem 1.5.1.

    Proof (of Theorem 1.5.1). To any ๐œ‹ โˆˆ ๐”–๐‘› we associate its functional digraph ๐ท๐œ‹which has ๐‘‰ = [๐‘›] and an arc โƒ—๐šค๐šฅ โˆˆ ๐ด if and only if ๐œ‹(๐‘–) = ๐‘—. Now ๐ท๐œ‹ is a digraphwith loops. Because ๐œ‹ is a function we have odeg ๐‘– = 1 for all ๐‘– โˆˆ [๐‘›]. And because ๐œ‹is a bijection we also have ideg ๐‘– = 1 for all ๐‘–. The proof of the previous lemma worksequally well if one allows loops. So ๐ท๐œ‹ is a disjoint union of cycles. But cycles of thedigraph ๐ท๐œ‹ corre