Lecture 24: Combinations

Take a set A with n elements: A = {1,...,n}. A k- combination from A is a subset B subseteq A formed by choosing any k elements from A:

  • Each element can be chosen at most once.

  • The order does not matter.

The number of k- combinations of n elements is written {}^nC_k.

Example-1

There are 15 players available to our coach of which she can choose to form a team consisting of 4 people. How many possible choices of teams does she have?

Answer We have a set of size 15 people. What is needed here is a 4-combination from this set. The answer is therefore {}^15C_4.

Example-2

There are n teams in a round-robin tournament where each pair of teams play exactly one match. How many matches need to be played?

Answer Each match is a 2-combination from the set of n teams. Therefore, the number of matches is {}^n C_2.

Example-3

A cricket coach can make up a team of 11 cricketers amongst 20 possible candidates. She has

  • Plans to have 3 specialist bowlers (pitchers) have 5 to choose from.

  • Plans to have 3 specialist batsmen (hitters) and have 5 to choose from.

  • Plans to have 1 wicketkeeper and has 2 to choose from.

  • Plans to have 4 all-rounders (pinch hitters+relief pitchers) and has 8 to choose from.

How many possible choices of teams does she have, given her plans above.

Answer {}^5C_3 * {}^5C_3 * {}^2C_1 * {}^8C_4 .

Example-4

There are 10 stalls in the farmer's market. Each stall sells apples and oranges. We can (a) skip a stall, (b) buy two apples in each stall or (c) alternatively buy two oranges.

How many ways are there of buying 14 apples and 2 oranges.

Computing the Number of Combinations

So far, we have seen {}^nC_k. What exactly is it in terms of numbers? There are two ways of thinking about it:

From Permutations to Combinations

In a k-permutation of n elements:

  • We choose k out of n.

  • All choices need to be distinct.

  • Finally, order of choice matters.

The number of k-permutations is {}^nP_k = frac{n!}{(n-k)!}.

In a k-combination, the order of choice does not matter.

Let us relate k-permutations and k-combinations.

Here is a way of looking at k-permutations:

  • Choose a k-combination from the set ({}^nC_k possible choices)

  • Choose an order of the chosen elements (k * (k-1) *...* 2 *1 = k! possible choices).

Thinking about things above, we get the following identity: {}^nP_k = (k!) * {}^n C_k.

We already reasoned out {}^nP_k = frac{n!}{(n-k)!}. Therefore, the formula for {}^n C_k should be

 {}^n C_k = frac{n!}{(n-k)! k!}  = frac{ n * (n-1) * (n-2) * cdots * (n-k+1)}{ k * (k-1) * cdots * 1 }

Let us play around with it:

 {}^n C_2 = frac{n!}{(n-2)! 2!} = frac{ n (n-1) } {2}

  • What are expressions for {}^nC_1, {}^nC_2, {}^nC_n, {}^nC_{n-2} and so on?

  • What is {}^{2n}C_n?

Claim {}^nC_k = {}^nC_{n-k}.

Let us give an intuitive reason for this: {}^nC_k means choosing k elements out of a total of n. We can look at it also as choosing which elements to include or choosing which elements to exclude. There are {}^nC_k ways of choosing elements to include in our subset. On the other hand, there are {}^nC_{n-k} ways of choosing which elements to exclude. Both views are counting the same thing. Therefore they better be the same.

Mathematically, just write down the formulae:

 {}^nC_k = frac{n!}{(n-k)! k!}  mbox{and} {}^nC_{n-k} = frac{n!}{(n-(n-k))! (n-k)!} = frac{n!}{(n-k)! k!} = {}^nC_k

Example-1

Six people would like to sit around a round table. It does not matter where a person sits, but what matters is who sits next to him/her. In other words, choices 1,2,3,4,5,6 or 6,1,2,3,4,5 are the same since each choice leaves the same neighbors. How many possible seating choices are there?

Answer Let us say the number is K. We see that once we choose a seating order, we can obtain 6 different permutations of it that are equivalent since they correspond to the same seating order. Therefore K=frac{6!}{6} = 120.

Recursively Counting Combinations

Here is another way of thinking. We need to choose a subset of k elements from a set of size n:  A = {1,...,n}.

    1. If n < k then we have no choice. If k=0 then we have 1 choice (the empty set) and if k=1 then we have n choices.

    2. Otherwise, choose whether or not to include the smallest numbered element 1.

  • If we decide to select 1, we have to choose k-1 from the remaining n-1.

  • If not, we have to choose k from the remaining n.

Therefore  {}^nC_k = {}^{n-1}C_{k-1} + {}^{n-1}C_{k}

Connection between {}^nC_k and the Pascal's triangle in class.

Binomial Theorem

Now for a bit of algebra. Let us consider polynomials (x+y)^n.

  • (x+y)^1 = x + y .

  • (x+y)^2 = x^2 + 2xy + y^2 .

  • (x+y)^3 = x^3 + 3x^2y + 3 xy^2 + y^3.

  • (x+y)^4 = x^4 + 4 x^3 y + 6 x^2 y^2 + 4 x y^3 + y^4.

  • (x+y)^5 = ??? (answer in class).

The question is what (x+y)^n should be.

Take (x+y)*(x+y)*(x+y) * (x+y). I am interested in the coefficients of various terms.

Let us start with x^4.

  • Why is its coefficient 1 ? If we look at it there is just one way to form x^4 (by choosing x from all the x+y).

  • On the other hand, why is the coefficient of x^3 y equal to 4? The answer is that there are 4 possible ways in which x^3y is formed in the product. Can you identify them?

How many ways are there of forming x^2y^2? Simple, we have to choose 2 xs (the remaining 2 will naturally yield y). There are four possible multiplicands (x+y) of which we can choose 2 “x” in {}^4C_2 ways.

If you understood the argument above then you have understood the theorem we are about to prove.

Binomial Theorem

For all natural numbers n, we can expand (x+y)^n as

 (x+y)^n = {}^n C_n x^n + {}^n C_{n-1} x^{n-1} y + {}^n C_{n-2} x^{n-2} y^2 + cdots + {}^nC_j x^j y^{n-j} + cdots + {}^nC_1 x y^{n-1} + {}^nC_n y^n

We can write it succinctly as  sum_{j=0}^n {}^nC_j x^j y^{n-j}.

Proof What is the coefficient of x^j y^{n-j} in (x+y)^n. We write (x+y)^n as (x+y)* .... * (x+y). There are n multiplicands.

To form a term x^j y^{n-j} where j geq 0, we can choose j out of n multiplicands to “supply” the x. The remaining will be chosen automatically to supply the ys. There are {}^nC_j choices. Each choice appears as a term which are then collected up.

Our reasoning above shows that the coefficient of x^j y^{n-j} where j geq 0 should be {}^nC_j.

Example-1

Expand (1+x)^n?

Answer (1+x)^n = sum_{j=0}^n {}^nC_j x^j 1^{n-j} = sum_{j=0}^n {}^nC_j x^j .

Applications of Binomial Theorem

We can use the Binomial theorem to show some properties of the {}^nC_k function.

1. sum_{j=1}^n {}^nC_j = 2^n.

Proof: Take the expansion of (1+x)^n and substitute x=1.

 (1+1)^n = sum_{j=0}^n {}^nC_j x^j

2. Let n be an even number. Then we have {}^nC_0 + {}^nC_2 + ldots + {}^nC_{n} = {}^nC_1 + {}^nC_3 + ldots + {}^nC_{n-1}.

Proof: Take (1+x)^n and set x = -1. Write a similar result for n odd.

3. Evaluate:  sum_{j=1}^n j {}^nC_j  = {}^n C_1 + 2 {}^nC_2 + 3 {}^n C_3 + ldots + n {}^n C_n.

Proof: Take (1+x)^n. Using binomial theorem, we have (1+x)^n =sum_{j=0}^n {}^nC_j x^j .

Take the derivative of both sides w.r.t x. We get:

 n (1+x)^{n-1} = sum_{j=1}^n {}^nC_j (j x^{j-1})

Substituting x=1, we get the required summation to be n 2^{n-1}.

4. Likewise, can you evaluate this summation:

 sum_{j=0}^n frac{1}{j+1} {}^nC_j  = frac{{}^nC_0}{1} + frac{{}^nC_1}{2} + frac{{}^nC_2}{3} + frac{{}^nC_3}{4} + ldots + frac{{}^nC_n}{(n+1)}