137
Lecture Notes Combinatorics Lecture by Torsten Ueckerdt (KIT) Problem Classes by Jonathan Rollin (KIT) Lecture Notes by Stefan Walzer (TU Ilmenau) Last updated: July 19, 2016 1

Lecture Notes Combinatorics - · PDF fileLecture Notes Combinatorics Lecture by Torsten Ueckerdt (KIT) Problem Classes by Jonathan Rollin (KIT) Lecture Notes by Stefan Walzer (TU Ilmenau)

Embed Size (px)

Citation preview

  • Lecture Notes

    Combinatorics

    Lecture by Torsten Ueckerdt (KIT)Problem Classes by Jonathan Rollin (KIT)

    Lecture Notes by Stefan Walzer (TU Ilmenau)

    Last updated: July 19, 2016

    1

  • Contents

    0 What is Combinatorics? 4

    1 Permutations and Combinations 101.1 Basic Counting Principles . . . . . . . . . . . . . . . . . . . . . . 10

    1.1.1 Addition Principle . . . . . . . . . . . . . . . . . . . . . . 101.1.2 Multiplication Principle . . . . . . . . . . . . . . . . . . . 101.1.3 Subtraction Principle . . . . . . . . . . . . . . . . . . . . 111.1.4 Bijection Principle . . . . . . . . . . . . . . . . . . . . . . 111.1.5 Pigeonhole Principle . . . . . . . . . . . . . . . . . . . . . 111.1.6 Double counting . . . . . . . . . . . . . . . . . . . . . . . 12

    1.2 Ordered Arrangements Strings, Maps and Products . . . . . . 121.2.1 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . 13

    1.3 Unordered Arrangements Combinations, Subsets and Multisets . . . . . . . . . . . . . . . . 14

    1.4 Multinomial Coefficients . . . . . . . . . . . . . . . . . . . . . . . 161.5 The Twelvefold Way Balls in Boxes . . . . . . . . . . . . . . . 22

    1.5.1 U L: n Unlabeled Balls in k Labeled Boxes . . . . . . 221.5.2 L U: n Labeled Balls in k Unlabeled Boxes . . . . . . 241.5.3 L L: n Labeled Balls in k Labeled Boxes . . . . . . . 261.5.4 U U: n Unlabeled Balls in k Unlabeled Boxes . . . . 281.5.5 Summary: The Twelvefold Way . . . . . . . . . . . . . . . 29

    1.6 Binomial Coefficients Examples and Identities . . . . . . . . . . 301.7 Permutations of Sets . . . . . . . . . . . . . . . . . . . . . . . . . 34

    1.7.1 Cycle Decompositions . . . . . . . . . . . . . . . . . . . . 351.7.2 Transpositions . . . . . . . . . . . . . . . . . . . . . . . . 381.7.3 Derangements . . . . . . . . . . . . . . . . . . . . . . . . . 40

    2 Inclusion-Exclusion-Principleand Mobius Inversion 442.1 The Inclusion-Exclusion Principle . . . . . . . . . . . . . . . . . . 44

    2.1.1 Applications . . . . . . . . . . . . . . . . . . . . . . . . . 462.1.2 Stronger Version of PIE . . . . . . . . . . . . . . . . . . . 51

    2.2 Mobius Inversion Formula . . . . . . . . . . . . . . . . . . . . . . 52

    3 Generating Functions 573.1 Newtons Binomial Theorem . . . . . . . . . . . . . . . . . . . . . 613.2 Exponential Generating Functions . . . . . . . . . . . . . . . . . 623.3 Recurrence Relations . . . . . . . . . . . . . . . . . . . . . . . . . 66

    3.3.1 Advancement Operator . . . . . . . . . . . . . . . . . . . 693.3.2 Non-homogeneous Recurrences . . . . . . . . . . . . . . . 733.3.3 Solving Recurrences using Generating Functions . . . . . 75

    4 Partitions 774.1 Partitioning [n] the set on n elements . . . . . . . . . . . . . . . 77

    4.1.1 Non-Crossing Partitions . . . . . . . . . . . . . . . . . . . 784.2 Partitioning n the natural number . . . . . . . . . . . . . . . . 794.3 Young Tableau . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

    4.3.1 Counting Tableaux . . . . . . . . . . . . . . . . . . . . . . 91

    2

  • 4.3.2 Counting Tableaux of the Same Shape . . . . . . . . . . . 92

    5 Partially Ordered Sets 995.1 Subposets, Extensions and Dimension . . . . . . . . . . . . . . . 1035.2 Capturing Posets between two Lines . . . . . . . . . . . . . . . . 1095.3 Sets of Sets and Multisets Lattices . . . . . . . . . . . . . . . . 115

    5.3.1 Symmetric Chain Partition . . . . . . . . . . . . . . . . . 1185.4 General Lattices . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

    6 Designs 1246.1 (Non-)Existence of Designs . . . . . . . . . . . . . . . . . . . . . 1256.2 Construction of Designs . . . . . . . . . . . . . . . . . . . . . . . 1276.3 Projective Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . 1296.4 Steiner Triple Systems . . . . . . . . . . . . . . . . . . . . . . . . 1306.5 Resolvable Designs . . . . . . . . . . . . . . . . . . . . . . . . . . 1316.6 Latin Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

    3

  • What is Combinatorics?

    Combinatorics is a young field of mathematics, starting to be an independentbranch only in the 20th century. However, combinatorial methods and problemshave been around ever since. Many combinatorial problems look entertainingor aesthetically pleasing and indeed one can say that roots of combinatorics liein mathematical recreations and games. Nonetheless, this field has grown to beof great importance in todays world, not only because of its use for other fieldslike physical sciences, social sciences, biological sciences, information theory andcomputer science.

    Combinatorics is concerned with:

    Arrangements of elements in a set into patterns satisfying specific rules,generally referred to as discrete structures. Here discrete (as opposedto continuous) typically also means finite, although we will consider someinfinite structures as well.

    The existence, enumeration, analysis and optimization of discrete struc-tures.

    Interconnections, generalizations- and specialization-relations between sev-eral discrete structures.

    Existence: We want to arrange elements in a set into patterns satisfyingcertain rules. Is this possible? Under which conditions is it possible?What are necessary, what sufficient conditions? How do we find suchan arrangement?

    Enumeration: Assume certain arrangements are possible. How manysuch arrangements exist? Can we say there are at least this many,at most this many or exactly this many? How do we generate allarrangements efficiently?

    Classification: Assume there are many arrangements. Do some of thesearrangements differ from others in a particular way? Is there a naturalpartition of all arrangements into specific classes?

    Meta-Structure: Do the arrangements even carry a natural underlyingstructure, e.g., some ordering? When are two arrangements closer toeach other or more similar than some other pair of arrangements? Aredifferent classes of arrangements in a particular relation?

    Optimization: Assume some arrangements differ from others accordingto some measurement. Can we find or characterize the arrangementswith maximum or minimum measure, i.e. the best or worst ar-rangements?

    4

  • Interconnections: Assume a discrete structure has some properties (num-ber of arrangements, . . . ) that match with another discrete structure.Can we specify a concrete connection between these structures? Ifthis other structure is well-known, can we draw conclusions about ourstructure at hand?

    We will give some life to this abstract list of tasks in the context of thefollowing example.

    Example (Dimer Problem). Consider a generalized chessboard of size mn (mrows and n columns). We want to cover it perfectly with dominoes of size 2 1or with generalized dominoes called polyominoes of size k 1. That meanswe want to put dominoes (or polyominoes) horizontally or vertically onto theboard such that every square of the board is covered and no two dominoes (orpolyominoes) overlap. A perfect covering is also called tiling. Consider Figure1 for an example.

    !

    Figure 1: The 6 8 board can be tiled with 24 dominoes. The 5 5 boardcannot be tiled with dominoes.

    Existence

    If you look at Figure 1, you may notice that whenever m and n are both odd(in the Figure they were both 5), then the board has an odd number of squaresand a tiling with dominoes is not possible. If, on the other hand, m is even orn is even, a tiling can easily be found. We will generalize this observation forpolyominoes:

    Claim. An mn board can be tiled with polyominoes of size 1 k if and onlyif k divides m or n.

    Proof. If k divides m, it is easy to construct a tiling: Just cover everycolumn with m/k vertical polyominoes. Similarly, if k divides n, coverevery row using n/k horizontal polyominoes.

    Assume k divides neither m nor n (but note that k could still dividethe product m n). We need to show that no tiling is possible. Wewrite m = s1k + r1, n = s2k + r2 for appropriate s1, s2, r1, r2 N and0 < r1, r2 < k. Without loss of generality, assume r1 r2 (the argumentis similar if r2 < r1). Consider the colouring of the m n board with kcolours as shown in Figure 2.

    5

  • k

    k

    12345678

    1 2 3 4 5 6 7 8 9

    Figure 2: Our polyominoes have size k 1. We use k colours (1 = white, k =black) to colour the mn board (here: k = 6, m = 8, n = 9). Cutting the boardat coordinates that are multiples of k divides the board into several chunks. Allchunks have the same number of squares of each color, except for the bottomright chunk where there are more squares of color 1 (here: white) than of color2 (here: light gray).

    Formally, the colour of the square (i, j) is defined to be ((ij) mod k)+1.Any polyomino of size k 1 that is placed on the board will cover exactlyone square of each colour. However, there are more squares of colour 1than of colour 2, which shows that no tiling with k1 dominoes is possible.Indeed, for the number of squares coloured with 1 and 2 we have:

    # squares coloured with 1 = ks1s2 + s1r2 + s2r1 + r2

    # squares coloured with 2 = ks1s2 + s1r2 + s2r1 + r2 1

    Now that the existence of tilings is answered for rectangular boards, we maybe inclined to consider other types of boards as well:

    Claim (Mutilated Chessboard). The nn board with bottom-left and top-rightsquare removed (see Figure 3) cannot be tiled with (regular) dominoes.

    Figure 3: A mutilated 66 board. The missing corners have the same colour.

    Proof. If n is odd, then the total number of squares is odd and clearly no tilingcan exist. If n is even, consider the usual chessboard-colouring: In it, the missingsquares are of the same colour, say black. Since there was an equal number of