Section 1: Counting and Enumeration

1.1: The Basics

Permutations

A permutation on an -element set is an arrangement of the elements in a specific order. A -permutation is an arragement of elements from the set.

We assume that all elements are distinct, by property of sets.

The total number of -permutations on an element set is given as

This is also known as the falling factorial of . Let be positive integers. Then, the falling factorial is given as

Example: Permutations with Repetition

How many rearrangements of are there?

Note the repetition. If they were all distinct, we would have combinations!

If we treat our ‘s as 4 distinct letters, there are ways to permute them. Similarly, for , there are ways to permute them. These cases should only be counted one in the original question, so we need to divide them out.

So, we find that our answer is

This result (and intuition) can be generalized to a theorem.

Theorem: Multinomial Coefficient

Suppose object 1 occurs times, object 2 occurs times, object k occurs times, to give us objects.

Then, the total number of arrangements of the objects is

Called the multinomial coefficient.

Combinations

The total number of ways to create a -element subset from , n choose k, is denoted

and called a combination of binomial coefficient.

Note that this is essentially a permutation without the ordering! This is why we divide by - we’re removing all cases that have the same ordering!

Binomial Theorem

For a positive integer , we have

The proof for above is omitted. However, intuitively, you can think of it as expanding

Then, for any , we can find its coefficient by choosing terms to contribute to the x, and choosing the remaining terms to contribute to the way. We find all ways we can do this (leading to the binomial coefficient you see!)

Example: Binomial Theorem Intuition, Extended

Suppose we are interested in the coefficient of from !

Well, of the 5 terms, we choose 3 to multiply the , 1 to multiply the , and 1 to multiply the . This gives us

This is essentially permutations with repetition!

Multinomial Theorem

1.2: Counting in Two Ways

Many combinatorial identities can be interpreted in multiple ways.

For example, consider

This describes the same count, but we can see it in 2 different ways!

  • The right hand side describes the number of ways to create a -size subset from .
  • The left hand side describes -size subsets that do or do not contain element .
    • If we do contain , then we choose elements from the remaining elements.
    • If we do not contain , then we choose elements from the remaining elements.

Another example:

This describes the total number of possible ways we can form a team with a leader among people.

  • In the right hand side, we choose a leader from a group of people, and for the remaining people, they choose to “include” or “not include” them in the team.
  • In the left hand side, we choose a team of people from total (), and among those people, choose a leader.

Another example:

  • In the RHS, we describe all ways to create a 3-size subset from .
  • In the LHS, let . We assign all of the elements to , , or , and find the number of ways we can create a 3-size subset, choosing 1 from each . First, let the first elements be in . Then, let the next element be in , and let the remaining be in . Choose 1 from each group , and find the number of ways we can do this. Thus, for any iteration, we have choices for , 1 choice for , and choices for .

1.3: Pigeonhole Principle

In its simplest form, the Pigeonhole Principle states that if pigeons into pigeonholes, there exists at least 1 pigeonhole with at least 2 pigeons. This is because you can fill in holes with 1 pigeon each, and are left with one extra pigeon that must go with one of the already filled holes.

More generally, if we have pigeons and pigeonholes, there exists a pigeonhole with at least pigeons (or, more than pigeons).

Example: Pigeonhole Principle

Prove that in a group of 40 poeple, at least 4 people have a birthday in the same month.

Here, let pigeons be people, and pigeonholes be months. We have 12 pigeonholes, and 40 pigeons.

By the pigeonhole principle, there exists at least 1 month with at least people.

1.4: Compositions and Set Partitions

Compositions

Let be non-negative integers such that

Then the ordered -tuple is a weak composition of into parts.

This can be seen as a way to give dollars to people, where some people may get none!

How many weak compositions of into are possible?

Theorem: Stars and Bars

There are

Possible weak compositions of into .

Example: Stars and Bars

How many non-negative integer solutions are there to ?

By the theorem, we have

What if a weak composition requires ? Well, we can simply give each 1, and then perform a weak composition on the remaining! This way, it doesn’t matter if the weak composition yields that someone got nothing, as they already have at least 1. We formalize this below.

The total -tuples satisfying , where each is a positive integer () is

Called a composition of into parts.

Partitions

Let be a finite set, and be non-empty subsets of . A partition of satisfies the following:

  1. Their union makes up

  2. The subsets are disjoint.

For a given , we say is partitioned into blocks.

Example: Partitions

Let .

We have 5 possible partitions:

Above, you can see that there are 3 cases of “2 blocks”.

A Stirling number of the second kind, denoted is the total number of partitions of into exactly blocks. By convention, .

There’s no easy formula for all ! However, we have some formulas for subsets of the stirling numbers.

Example: Stirling Numbers

What is ?

For , assign each number to 1 of 2 teams: . Subtract the cases where all are only in 1 team: .

Finally, divide by 2 because sets have no ordering.

Theorem: Stirling Numbers (Recurrence Relation)

For all non-negative integers ,

Theorem: Stirling Numbers (Summation)

We have

The proof will be covered later!

What if we didn’t want to be limited by blocks?

The total number of partitions of into any # of blocks is the Bell number, denoted . By convention, .

Example: Bell Numbers

From an earlier example, let .

We have 5 possible partitions:

So, .

Theorem: Bell Numbers (Summation)

We have

Example: Partitions

Let .

Recall that is surjective / onto if for every , there exists an such that .

How many surjective functions are there?

Here, we want to partition our domain values into blocks, where each block will be associated with one output. We multiply by , the total number of ways to associate one combination of blocks with the outputs.

1.5: Integer Partitions

A partition of integer is a positive sequence of integers , where , such that

So, is the same as . What matters is not what’s inside of the blocks, but the sizes of the blocks relative to one another!

We denote the total number of partitions of by . By convention, .

The formula for this is extremely complex!

Example: Case

We find that

There are 5 total partitions of 4! .

A Ferrers diagram (or Young Diagram) of an integer partition is a partial rectangular grid whose row contains dots (rectangles).

These diagrams can illustrate some very interesting relationships! One diagram representing is given below.

Interestingly, the conjugate of a partition on a diagram is a new grid whose column is now . Here, the conjugate would yield

Basically, we flip the entire thing along a diagonal!

We can use this to establish some interesting identities!

Theorem: Integer Partitions Identity

The total number of integer partitions of such that equals the total number satisfying

Each partition has a size of at least 2!

The converse also holds, with a similar proof.

The total partitions of into exactly parts is denoted .

Note that the previous definition did not establish this part requirement.

Theorem: Integer Partitions into Exactly Parts

For ,

1.6: The Twelvefold Way

We throw balls into bins. We consider the cases of the balls and bins being labeled (distinguishable) or not, and if each bin has no restriction, each bin has at least 1 ball, or each bin has at most 1 ball.

This forms 12 cases total, which can be solved with the methods described previously.

  1. Labeled balls to labeled bins
    1. No restriction: For every ball, we can put it in possible bins.
    1. At least 1 ball: We find the number of ways to partition into , and then permute what bin each group goes into.
    1. At most 1 ball (obvioulsly, ): Choose of the bins to place the balls into. Then, permute the ordering of how we place the balls.
  2. Unlabeled balls to labeled bins
    1. No restriction: Perform weak composition to decompose into (labeled) parts.
    1. At least 1 ball: First give each bin 1 dollar, then perform weak composition on the remaining parts.
    1. At most 1 ball: Choose bins of the to place a ball into.
  3. Labeled balls to unlabeled bins.
    1. No restriction: We partition the set of balls into , from . We do a sum instead of Bell numbers, as bell numbers will overcount (we cannot count higher than ).
    1. At least 1 ball: We partition the set of balls into parts.
    1. At most 1 ball: Just one way, as the bins are labeled!
  4. Unlabeled balls to unlabeled bins.
    1. No restriction: Some bins can be empty, so this is integer partitions into 1 bin, then 2 bins, and so forth until bins. Simple integer partitions assume the integers (bins) can never be empty, which is not true here.
    1. At least 1 ball: Each bin must have at least 1 ball, so this is integer partitions into parts.
    1. At most 1 ball: If , since nothing is labeled, we’ll just have bins filled with 1 ball. So, there is only 1 way.

1.7: Inclusion-Exclusion Principle

Theorem

Let , where is finite. Assume that the ‘s are non-empty.

Let , and denote . Define .

Then,

In other words, the union of all sets is the set minus the intersection of all subset combinations.

Applying Demorgan’s Law on this, we obtain

Where is the complement of .

Basically, sometimes when we want to find something, we can find it by considering its complements (which can be easer to solve)!

Example: Case

In the case, we have

This is commonly used everywhere in probability theory!

This principle is very useful in simplifying problems that may be quite complex, into simpler sub-problems that can be combined to yield our solution.

Example: Inclusion-Exclusion Principle

How many non-negative integer solutions are there to , where

Here, we have a max on our integers, which is really difficult to solve! However, it may be easier to solve using the inclusion-exclusion principle.

Here, we could perform weak compositions when , but we also have upper bounds.

Let

Note that , is all weak compositions.

We want

Example: Inclusion-Exclusion (4)

Twenty couples attend counseling. They sit at a circular, unlabeled table (exactly 40 chairs).

How many seatings assure no one sits next to their significant other?

Let denote the set where couple sits next to each other. We want

Note that what we are doing per term is selecting couples, then finding the number of orderings of our “40” people given that the couples are tied together (, because for each tied couple they’re 1 entity). Furthermore, we need to multiply by , as each couple pair could be swapped in order. Finaly, we divide by the number of rotations.

Note that we start at to include the empty set.