1. Combinatorics

The Multiplication Principle for Counting Procedures

If a sequence can be described as a sequence of n independent steps, with i1 possible outcomes for the first step, i2 possible outcomes for the second step, , and in possible outcomes for the nth step, then the total number of composite outcomes of the procedure is i1i2in

The Addition Principle for Counting Procedures

If a procedure can be broken up into m events or cases whose sets of outcomes are mutually exclusive, with j1 possible outcomes for the first event, j2 possible outcomes for the second event, , and jm for the mth event, then the total number of outcomes of the procedure is j1+j2++jm

Suppose that a child is offered a bag containing three types of sweets, aniseed drops (A), butter mints (B) and cherry drops (C). In how many ways can the child select two sweets?

This problem is not defined well, since we are not told:

  • whether or not the same type of sweet can be selected twice, i.e. is AA allowed?
  • whether the order matter, i.e. is AB to be treated the same as BA, or not?

There are 4 cases to consider:

  1. Repeats are allowed and order matters. This gives 9 possibilities:
  2. Repeats are allowed and order doesn’t matter. This gives 6 possibilities:
  3. Repeats are not allowed and order matters. This gives 6 possibilities
  4. Repeats are not allowed and order doesn’t matter. This give 3 possibilities

At first glance the expression (a+b)n does not have much to do with Combinations, but it turns out that we can obtain the formula for the expansion of (a+b)n by using the formula for k-combinations of n objects

(a+b)3=(a+b)(a+b)(a+b)=aaa+aab+aba+abb+baa+bab+bba+bbb=a3+3a2b+3ab2+b3
Theorem 1.5

If a and b are real numbers and n is a positive integer, then (a+b)n=k=0n(nk)ankbk

Proof: (a+b)n=(a+b)(a+b) (n factors)

In the expansion of (a+b)n, a term of the form ankbk arises from choosing b from k factors and a from the other nk factors. This can be done in (nk) ways. Thus ankbk appears (nk) times in the expansion. It follows that:
(a+b)n=(n0)an1b1+(n2)an2b2++(nn1)a1bn1+(nn)a0bn=k=0n(nk)ankbk
The numbers (nk) are known as binomial coefficients because they appear in the expansion of (a+b)n

Example

What is the coefficient of x12y13 in the expansion of (x+y)25

(2513)=25!13!12!

Example

Find the coefficient of x4y5 in the expansion of (2xy)9

(1)5×(95)×24=2016

Example

Find the coefficient of x2y3z4 in the expansion of (x+y+z)9

Model as (x+(y+z))9
(97)(y+z)7
=(97)(74)=1260

Example

Prove that for a positive integer n, k=0n(nk)=2n

Proof using the Binomial Theorem
2n=(1+1)n=k=0n(nk)1nk1k=k=0n(nk)

Combinatorial Proof
A set with n elements has 2n different subsets
Each subset has k elements for k{0,1,,n}
There are (nk) subsets with k elements
Therefore the total number of subsets is k=0n(nk),
and hence k=0n(nk)=2n

The Pigeonhole Principle (or the Dirichlet Principle) is sometimes useful in answering the question:
Is there an item having a given property?

Pigeonhole Principle: If n pigeons fly into k pigeonholes and kn, then some pigeonhole contains at least two pigeons
Example:

Example

Ten people have the first name Alice, Bernard and Charles, and last names Lee, Mc-Duff and Ng. Show that at least two people have the same first and last names.

There are 3×3=9 possible names for the 10 people. If we think of people as pigeons and the names as pigeonholes, we can consider the assignments of names to people as assigning pigeonholes to pigeons. By the Pigeonhole Principle, some name (pigeonhole) is assigned to at least two people (pigeons)

Generalised Pigeonhole Principle: If n pigeons fly into k pigeonholes, then some pigeonhole contains at least nk pigeons

Proof:

Suppose that none of the pigeonholes contain more than nk1 pigeons. Then the total number of pigeons is at most k(nk1), which is always less than n


Example

What is the minimum number of students required in a discrete maths class to be sure that at least 6 will receive the same grade, if there are 5 possible grades, A,B,C,D and F

n5=6
n=5(61)+1=25+1=26