# Enumerative Combinatorics

## Contents

# 1.11. Enumerative Combinatorics#

Main references for this section are [37, 60, 81].

## 1.11.1. Basic Counting#

There are two basic principles of counting: the sum rule and the product rule. The sum rule is derived from the cardinality of union of disjoint sets. The product rule is derived from the Cartesian product of two sets.

### 1.11.1.1. Product Rule#

(Product rule)

Suppose an experiment has two aspects. First aspect can vary in \(n_1\) ways. Second aspect can vary in \(n_2\) ways. Assume that the two aspects are independent. Then the total number of outcomes is

If there are \(k\) different aspects each of which can vary in \(n_i\) ways for \(i \in 1,\dots,k\), then the total number of outcomes is

Examples

If there are three possible coffee choices and two possible doughnut choices then the number of different combinations of coffee and doughnut are six.

If a t-shirt comes in three different sizes and four different colors, then there are twelve different varieties of the same t-shirt.

### 1.11.1.2. Sum Rule#

(Sum rule)

Suppose that the outcome of an experiment consists of two different cases \(A\) and \(B\) which are mutually exclusive of each other. In other words, if \(A\) occurs then \(B\) cannot occur and vice-versa. Suppose that there are \(n_1\) possible outcomes under the case \(A\) and \(n_2\) possible outcomes under the case \(B\). Then the total number of outcomes is

In general, if the outcome of an experiment has \(k\) distinct cases which are mutually exclusive and if for each \(i\)-th case, there are \(n_i\) possible outcomes, then the total number of outcomes is

(sum rule for sets)

The sum rule in set theory is as follows. If \(A\) and \(B\) are finite and disjoint sets, then

Examples

Suppose a house has two floors. The first floor has \(3\) rooms and the second floor has \(5\) rooms. Then the number of ways you can select a room is \(3 + 5 = 8\).

Suppose a team has \(3\) men and \(4\) women members. Then the number of ways you can select a team member is \(3 + 4 = 7\).

Suppose we have to pick either a single letter or a single digit. There are \(26\) possible letters and \(10\) possible digits. Thus, there are \(36\) possible outcomes.

## 1.11.2. Permutations#

Permutations are different arrangements of a given finite set of objects.

(Permutation)

A *permutation* of \(n\) distinct objects is an arrangement of those
objects in a definite order. If \(r \in \{1, \dots, n \}\) then
an \(r\)-*permutation* of \(n\) objects is an arrangement of \(r\)
of the \(n\) objects in a definite order.

(Permutations of A,B,C)

Following are the possible permutations of the three letters A,B,C.

A, B, C

A, C, B

B, A, C

B, C, A

C, A, B

C, B, A

As we can see there are \(6\) different permutations.

\(2\)-permutations of A,B,C,D)

(Following are the possible ways to pick and arrange 2 letters out of the set {A, B, C, D}.

A, B

A, C

A, D

B, A

B, C

B, D

C, A

C, B

C, D

D, A

D, B

D, C

There are 12 possible \(2\)-permutations.

\(r\) permutations)

(Number ofThe number of \(r\) permutations of \(n\) objects, denoted by \(P(n, r)\), is given by

Proof. We proceed as follows.

There are \(n\) ways of choosing the first object.

Once the first object has been chosen, there are \(n-1\) ways of choosing the second object.

Continuing in the same manner, once \(p\) objects have been chosen, there are \(n-p\) ways of choosing the \(p+1\)-th object.

At the end, when \(r-1\) objects have been chosen, then there are \(n-(r-1)=n-r+1\) ways of choosing the last object.

By the product rule, the total number of arrangements is

\[ n (n -1) \dots (n -r +1). \]

(Factorial)

The factorial of \(n\), denoted as \(n!\) is defined as

By convention, we define \(0! = 1\).

It is clear that the number of permutations of \(n\) objects is \(n!\).

We can also see that the number of \(r\)-permutations of \(n\) objects is given by the formula

\[ P(n, r) = \frac{n!}{(n-r)!}. \]

(Round table seating arrangement problem)

You are a family of three. You have invited five guests for a party. Your dining table can seat all the eight people. As hosts, you don’t want to sit together on the table. The guests can be seated arbitrarily. How many seating arrangements are possible?

We note that only the relative arrangements of people matters.

Let your family members be called A, B, C.

Let the guests be labeled as 1,2,3,4,5.

We shall identify an arrangement starting from where A is sitting and then going clockwise.

An example arrangement is A,1,2,B,3,4,C,5.

Note that neither B nor C can be at the end as that would lead to them sitting next to A.

Since A is always at the beginning of an arrangement, we can drop it.

Let us replace all the guests by *.

Then the arrangement looks like *, *, B, *, *, C, *.

Forget about the seats for the moment and just look at this arrangement.

We see that B and C must be placed between the guests so that they are not sitting next to each other.

We can think of slots between guests and denote them by |.

Then the guests and slots between them can be represented as * | * | * | * | *.

There are 4 slots between 5 guests.

We can see that we can place B and C into either of these 4 slots.

The number of ways the 2 slots out of 4 can be selected is \(P(4,2) = 4 \times 3 = 12\).

Once the slots have been picked up by B and C, the guests can arrange themselves in \(5!=120\) different ways.

By the product rule, the total number of arrangements is \(12 \times 120 = 1440\).

## 1.11.3. Combinations#

\(r\)-combination)

(Assume that we have \(n\) distinct objects (where \(n \in \Nat\)).
An \(r\)-*combination* of \(n\) objects is a subset consisting of
\(r\) of those objects where \(0 \leq r \leq n\).

The number of \(r\) combinations of \(n\) objects is denoted by \(\binom{n}{r}\) or \(C(n, r)\).

There is only 1 way of to choose all \(n\) objects. Hence \(C(n, n) = 1\).

There is only 1 way to choose none of the \(n\) objects. Hence \(C(n, 0) = 1\).

There are \(n\) ways to choose one of the \(n\) objects. Hence \(C(n, 1) = n\).

There are \(n\) ways to choose \(n-1\) of the \(n\) objects as it is equivalent to drop one of the \(n\) objects. Hence \(C(n, n-1) = n\).

\(r\)-combinations)

(Number ofThe number of \(r\)-combinations of \(n\) objects is given by

Proof. This follows from the fact that each \(r\)-combination results in \(r!\) \(r\)-permutations.

By Theorem 1.41 the number of \(r\)-permutations of \(n\) objects is

\[ P(n, r) = \frac{n!}{(n-r)!}. \]Let \(k = C(n, r)\).

Then for each of the unordered subsets of \(r\) elements, there are \(r!\) ways that we can arrange them in a specific order.

Hence

\[ r! k = P(n, r) \]by the product rule.

Hence we have

\[ C(n, r) = k = \frac{P(n, r)}{r!} = \frac{n!}{r! (n-r)!}. \]

What is the number of ways to choose 3 hearts from a deck of cards at least one of which is an ace or a king?

There are 13 cards of the suit of hearts.

The selection includes a king but no ace. Number of ways to choose 2 other cards is \(C(11, 2)\).

The selection includes an ace but no king. Number of ways to choose 2 other cards is \(C(11, 2)\).

The selection includes both king and ace. Number of ways to choose the third card is \(C(11, 1)\).

Total number of ways is

\[ C(11, 2) + C(11, 2) + C(11, 1) = 55 + 55 + 11 = 121. \]

Here is another way to divide the problem in two cases.

The selection includes an ace. In this case the number of ways the remaining two cards can be selected is \(C(12, 2)\).

The selection includes a king but not an ace. The number of ways the remaining two cards can be chosen is \(C(11, 2)\).

Hence total number of cases is

\[ C(12, 2) + C(11, 2) = 66 + 55 = 121. \]

Here is a third approach.

Ace is included: \(C(12, 2)\) ways.

King is included: \(C(12, 2)\) ways.

Both of these cases include the case where both ace and king are included.

The number of ways both ace and king can be selected is \(C(11, 1)\).

Since this is double counted, hence we need to subtract it from total number of cases.

Thus, we get

\[ C(12, 2) + C(12, 2) - C(11, 1) = 66 + 66 - 11 = 132 - 11 = 121. \]

## 1.11.4. Binomial Theorem#

(Binomial coefficient)

For any nonnegative \(n\) and any integer
\(r\) with \(0 \leq r \leq n\), the
*binomial coefficient* is defined as

This is another name for the number of \(r\)-combinations of \(n\) objects.

(Binomial theorem)

For any \(a\) and \(b\) and any nonnegative integer \(n\), we have

As a special case, we have

Setting \(x=1\), we get

Proof. Consider the simpler cases first:

For \(n=0\), both L.H.S. and R.H.S. reduce to \(1\).

For \(n=1\), the L.H.S. is \(a + b\). The R.H.S. is

\[ {1 \choose 0}b + {1 \choose 1}a = b + a = a + b. \]

We now consider the general case.

We can write

\[ (a + b)^n = (a + b) \dots (a + b). \]There are \(n\) factors of \((a + b)\) on the R.H.S..

Consider the term \(a^r b^{n - r}\).

This is attained by choosing \(a\) from \(r\) factors and \(b\) from remaining \(n-r\) factors.

There are \(\binom{n}{r}\) ways to choose \(r\) out of \(n\) factors from which \(a\) can be picked.

Thus, the coefficient of \(a^r b^{n - r}\) in the expansion of \((a + b)^n\) is \(n \choose r\).

The smallest power of \(a\) in the expansion is \(0\) and the largest power is \(n\).

Thus, we have

\[ (a + b)^n = \sum_{r=0}^n \binom{n}{r} a^r b^{n - r}. \]The special case is obtained by setting \(a=x\) and \(b=1\).

For any natural number \(n\) we have

Proof. From the binomial theorem we have:

Differentiating on both sides, we get

Putting \(x=0\), we get

## 1.11.5. Bijections#

Recall from Definition 1.82
that two sets are equivalent if there exists
a bijection (a bijective function) between them.
In that case, the sets are said to have the
same cardinality.
In this section, we are dealing
with finite sets only.
Recall from Definition 1.84
that a set is called finite if there is a bijection
between the set and a
segment
of natural numbers.
Thus, there exists a bijection between two finite
sets, then they have the same number of elements.
This gives us a powerful method of counting
the number of elements in a finite set. If we
can find a bijection between a given set and
a set whose number of elements is known, then
we know the number of elements of the given
set is also known. This technique is known
as the *bijective technique*.

We use this technique to provide a proof for the number of subsets of a finite set.

(Number of subsets of a finite set)

Let \(A\) be a set of \(n\) elements. Then the number of subsets of \(A\) is \(2^n\).

Proof. We develop a bijection between subsets of \(A\) and binary strings of length \(n\).

Let \(A = \{a_1, \dots, a_n \}\).

Let each bit of a binary string \(b_1 b_2 \dots b_n\) correspond to an element of \(A\) (\(a_i \to b_i\)).

For each subset \(X\) of \(A\), the let the corresponding binary string be formed as follows:

If \(a_i \in X\), then \(b_i = 1\).

Otherwise, \(b_i = 0\).

It is easy to see that this is a bijection between the set of subsets of \(A\) and the set of binary strings of length \(n\).

The number of possible binary strings of length \(n\) is \(2^n\) since each bit can take exactly \(2\) values.

Hence, due to the equivalence of the two sets, the number of subsets of \(A\) is \(2^n\).

Following is an example of mapping between subsets of the set \(\{ x, y, z \}\) and binary strings of length \(3\).

subset |
\(b_1\) |
\(b_2\) |
\(b_3\) |
---|---|---|---|

\(\EmptySet\) |
0 |
0 |
0 |

\(\{ x \}\) |
1 |
0 |
0 |

\(\{ y \}\) |
0 |
1 |
0 |

\(\{ z \}\) |
0 |
0 |
1 |

\(\{ x, y \}\) |
1 |
1 |
0 |

\(\{ y, z \}\) |
0 |
1 |
1 |

\(\{ x, z \}\) |
1 |
0 |
1 |

\(\{ x, y, z \}\) |
1 |
1 |
1 |

## 1.11.6. Combinatorial Proofs#

(Combinatorial proofs)

If \(f(n)\) and \(g(n)\) are functions that count the number of solutions to some problem involving \(n\) objects, then \(f(n) = g(n)\) for every \(n\).

(Combinatorial identity)

Let there be two functions \(f, g : \ZZ_+ \to \ZZ\).
Suppose there exists a problem about \(n\) objects
such that the number of solutions to the problem
in one way is given by \(f(n)\) and the number of
solutions to the same problem in another way
is given by \(g(n)\) for every \(n\). Then
this is a *combinatorial proof* of the
identity

The equation \(f(n) = g(n)\) is known as
a *combinatorial identity*.

Note

The concept of combinatorial proofs and identity is also applicable to the problems with multiple variables.

Proof. Consider the problem of choosing \(r\) objects from a set of \(n\) objects.

By definition, the number of ways \(r\) objects can be chosen from a set of \(n\) objects is given by \(n \choose r\).

Choosing \(r\) objects from a set of \(n\) objects is equivalent to leaving the remaining \(n-r\) objects from the set.

The number of ways to leave \(n-r\) objects out of \(n\) objects is \(n \choose n - r\).

Hence we have the combinatorial identity

\[ {n \choose r} = {n \choose n - r}. \]

### 1.11.6.1. Sum of Binomial Coefficients#

For every natural number \(n\), we have

We already showed this result in Theorem 1.43. Let us look at a combinatorial proof.

By Theorem 1.45, the number of subsets of a set of \(n\) elements is \(2^n\).

Another way of counting the number of subsets of \(n\) elements is as follows.

Each subset has \(r\) elements where \(0 \leq r \leq n\).

The number of subsets of \(r\) elements is \(n \choose r\).

Hence total number of subsets is \(\sum_{r=0}^n {n \choose r}\).

By Theorem 1.46, the two must be equal.

### 1.11.6.2. Pascal’s Identity#

(Pascal’s identity)

For integers \(n\) and \(k\), we have

Proof. Let there be \(n\) objects.

The L.H.S. is the number of ways of choosing \(k\) objects from \(n\) object.

Fix some object \(x\).

In a selection of \(k\) objects, either \(x\) is selected or it is not selected.

If \(x\) is selected, then there are \(n -1 \choose k - 1\) ways of selecting the remaining \(k-1\) objects.

If \(x\) is not selected, then all the \(k\) objects must be selected from the remaining \(n-1\) objects.

The two cases are mutually exclusive and add up to

\[ {n -1 \choose k - 1} + {n - 1 \choose k} \]on the R.H.S..

### 1.11.6.3. Hockey Stick Identity#

\(r\)-combinations)

(Recursive rule for computingConsider the problem of choosing \(r\) objects from a set of \(n\) objects. By definition, the number of ways we can choose \(r\) objects is \(n \choose r\). Following is another way to count the same.

Let us label the objects as \(1,2, \dots, n\).

We consider \(n\) different cases as follows.

Each subset can be identified by the largest label inside it.

In the \(k\)-th case, we consider all the subsets where the largest label is \(k\).

Since this object is decided, the number of ways of choosing the remaining \(r-1\) objects from the \(k-1\) objects whose labels are smaller than \(k\) is given by \(k - 1 \choose r - 1\).

Since any such subset must have at least \(r\) objects, hence the minimum possible value of \(k\) is \(r\).

The maximum possible value of \(k\) is \(n\).

Hence, the total number of elements is given by

\[ \sum_{k=r}^n {k - 1 \choose r - 1}. \]We get the identity

\[ {n \choose r} = \sum_{k=r}^n {k - 1 \choose r - 1}. \]By replacing \(k-1\) with \(i\), we get another version

\[ {n \choose r} = \sum_{i=r-1}^{n-1} {i \choose r - 1}. \]

This identity enables us to compute \(n \choose r\) if \(i \choose r - 1\) is known for all values of \(r-1 \leq i \leq n-1\).

(Hockey stick identity)

Note that for \(0 \leq t < k\), \(t \choose k = 0\).

Proof. Consider the set of \(n+1\) numbers \(S = \{ 0,2,\dots, n\}\).

The R.H.S. is the number of ways of choosing \(k+1\) numbers from \(S\).

For any \(t \in S\), consider the ways of choosing \(k+1\) numbers from \(S\) such that \(t\) is the highest number in the subset.

Since \(t\) is already chosen and all other numbers must be less than \(t\), hence there are \(t \choose k\) ways of choosing remaining \(k\) numbers.

\(t\) can vary from \(0\) to \(n\).

Each term on the L.H.S. is the number of ways of choosing \(k+1\) numbers so that \(t\) is the highest number.

These are mutually exclusive cases.

Hence, L.H.S. is also the number of ways \(k+1\) numbers can be chosen from \(S\).

### 1.11.6.4. Vandermonde’s Identity#

(Vandermonde’s identity)

For any nonnegative integers \(r, m, n\), we have

Proof. We shall use a combinatorial double counting proof.

Let \(S\) be a set of \(m + n\) objects which can be split into two disjoint subsets \(A\) of \(m\) objects and \(B\) of \(n\) objects.

For example, a committee of \(m + n\) people can be split into subgroups of \(m\) men and \(n\) women.

The number of ways to select \(r\) objects from \(S\) is given by \(m + n \choose r\).

Each selection of \(r\) objects consists of \(k\) objects from the subset \(A\) and the remaining \(r - k\) objects from the subset \(B\) where \(0 \leq k \leq r\).

There are \(m \choose k\) ways of selecting \(k\) objects from \(A\).

There are \(n \choose r - k\) ways of selecting \(r - k\) objects from \(B\).

Hence, by the product rule, there are

\[ {m \choose k}{n \choose r - k} \]ways of selecting \(k\) objects from \(A\) and \(r - k\) objects from \(B\).

By the sum rule over possible values of \(k\), the number of ways of choosing \(r\) objects from \(S\) is given by

\[ \sum_{k = 0}^r {m \choose k}{n \choose r - k}. \]Hence, L.H.S. an R.H.S. must be identical.

For any nonnegative integer \(n\), we have

Proof. In Theorem 1.50, Let \(m=n\) and \(r=n\). Then we have

However

for every \(k\). Hence

### 1.11.6.5. More Identities#

Consider two sets \(A\) and \(B\) each of which consist of \(n\) objects. Assume that the sets \(A\) and \(B\) are disjoint. We wish to select \(r\) objects from \(A\) and \(B\) together with the condition that at least \(1\) object must be chosen from the set \(B\). Following are different ways of counting.

Method 1

There are \(2 n \choose r\) ways of choosing \(r\) objects out of the \(2 n\) objects we have.

There are \(n \choose r\) ways in which no object from the set \(B\) has been selected.

Hence, the number of ways to select at least one object from \(B\) is given by

\[ {2 n \choose r} - {n \choose r}. \]

Method 2

We can consider the following \(r\) different cases. \(i\) objects from the set \(B\) have been chosen where \(1 \leq i \leq r\).

For the \(i\)-th case, the total number of ways to choose \(i\) objects from the set \(B\) and the remaining \(r-i\) objects from the set \(A\) is given by

\[ {n \choose i}{n \choose r -i}. \]Hence, the total number of ways of choosing \(r\) objects from \(A\) and \(B\) with at least one object from \(B\) is

\[ \sum_{i=1}^r {n \choose i}{n \choose r -i}. \]By Theorem 1.46, we get the combinatorial identity

\[ \sum_{i=1}^r {n \choose i}{n \choose r -i} = {2 n \choose r} - {n \choose r}. \]

## 1.11.7. Counting with Repetitions#

We now consider a different type of problem. Rather than selecting objects from a given set of \(n\) distinct objects, we assume that there are \(n\) types of objects available and we are free to choose as many objects of a particular type as we want. Thus, we allow for the repetition of objects of the same type.

(Two digit numbers)

How many 2 digit numbers are possible?

On the first digit, we can have one of the nine nonzero digits.

On the second digit, we can have any of the ten digits.

Hence, total number of two digit numbers is:

\[ 9 \times 10 = 90. \]Readers can verify that this includes all the numbers from \(10\) to \(99\).

We allow for repetition (e.g. \(11, 22, 33\)).

(Four digit pins)

We often use \(4\) digit pins for different applications. In this case, \(0\) may be allowed as the first digit. Then the number of possible \(4\) digit pins is \(10^4 = 10,000\).

### 1.11.7.1. Combinations with Repetitions#

\(r\)-combinations with repetitions)

(The number of ways of choosing \(r\) objects from \(n\) types of objects (with replacement or repetition) is

Proof. The \(n\) categories of objects can be separated by \(n-1\) bars like below

We have \(n\) slots (or urns) for the \(n\) categories.

There are \(n-1\) bars between them.

Suppose that \(r\) objects that have been chosen can be split as \(r_1\) objects of the category \(a_1\), \(r_2\) objects of categories \(a_2\) and so on.

Then we have

\[ r = r_1 + r_2 + \dots + r_n. \]Note that some of the \(r_i\) may be zero also.

Let each object be represented by the symbol \(-\) (dash).

Then the arrangement may look something like

\[ -- | - | | --- | - | \dots | | | | ----| -- \]\(r_1\) dashes followed by a bar, then \(r_2\) dashes followed by a bar and so on.

Different arrangements of \(r\) dashes and \(n-1\) bars lead to different ways of selecting \(r\) objects from \(n\) categories of objects.

We can think of the arrangement as a string of dashes and bars.

Then, the problem is equivalent to the counting the number of strings consisting of \(r\) dashes and \(n-1\) bars.

The total length of such strings is \(n + r - 1\).

The number of strings with \(r\) dashes is \(n + r -1 \choose r\).

This is also same as the number of strings with \(n-1\) bars which is \(n + r - 1 \choose n - 1\).

### 1.11.7.2. Multiset Permutations#

(Multiset permutations)

Let \(A\) be a multiset of \(n\) objects of \(m\) types. Assume that \(A\) contains \(r_1\) objects of type \(1\), \(r_2\) objects of type \(2\) and so on. Accordingly

Then, the number of permutations of these \(n\) objects is

Proof. Approach 1

If all \(n\) objects were distinct, then the number of permutations will have been \(n!\).

Now, when \(r_1\) of these objects are indistinguishable from each other, then all \(r_1!\) permutations of these \(r_1\) objects are identical.

Hence, making the \(r_1\) objects indistinguishable reduces the number of arrangements to \(\frac{n!}{r_1!}\).

Similarly, making the next \(r_2\) objects indistinguishable from each other reduces the number of arrangements to \(\frac{n!}{r_1! r_2!}\).

Continuing in the fashion, making the last \(r_m\) objects indistinguishable from each other reduces the number of arrangements to \(\frac{n!}{r_1! r_2 ! \dots r_m!}\).

Approach 2

In any arrangement of \(n\) objects, there are \(n\) slots.

The number of ways we can choose \(r_1\) slots to place first \(r_1\) objects of type \(1\) (which are indistinguishable) is given by \(n \choose r_1\).

The number of ways we can choose the next \(r_2\) slots to place next \(r_2\) objects of type \(2\) (which are indistinguishable) is given by \(n - r_1 \choose r_2\).

Continuing in the same manner, the number of ways to choose the last \(r_m\) slots to place the last \(r_m\) objects of type \(m\) (which are indistinguishable) is given by \(n - r_1 - \dots - r_{m - 1} \choose r_m\).

By the product rule, the total number of ways is

\[ {n \choose r_1}{n - r_1 \choose r_2}\dots {n - r_1 - \dots - r_{m - 1} \choose r_m}. \]This expands to

\[\begin{split} & \frac{n!}{r_1! (n-r_1)!} \frac{(n - r_1)!}{r_2! (n-r_1 - r_2)!} \dots \frac{(n - r_1 - \dots - r_{m-1})!}{r_m! 0!}\\ & = \frac{n!}{r_1! r_2 ! \dots r_m!}. \end{split}\]

(Volunteer selection)

You have 3 projects A, B and C. You have a team of 20 volunteers available.

Project A needs 3 people.

Project B needs 5 people.

Project C needs 9 people.

How many ways, can you assign volunteers to projects?

We can introduce a fourth category D of volunteers who are not assigned to any project.

The D category has \(20 - 3 - 5 - 9 = 3\) volunteers.

Thus, we need to split 20 volunteers into 4 groups of sizes 3,5,9, and 3 respectively.

A particular assignment might look like

\[ AAABBBBBCCCCCCCCCDDD. \]Another assignment might look like

\[ CDCABCABCCBBCCCDADCB. \]We can see that the assignment consists of permutations of 20 labels which are of 4 types (A, B, C, D).

Hence the number of permutations is given by

\[ \frac{20!}{3! 5! 9! 3!}. \]

### 1.11.7.3. Multinomial Theorem#

(Multinomial coefficient)

For nonnegative integers \(r_1, r_2, \dots, r_m\) such that \(\sum_{i=1}^m r_i = n\), the multinomial coefficient is defined as

It is clear that the multinomial coefficient is equal to the number of permutations of \(n\) objects of \(m\) types where \(r_1\) objects are of type \(1\), \(r_2\) objects are of type \(2\) and so on.

Also note that for \(n=0\), we have \(r_i=0\) and the multinomial coefficient becomes

(Multinomial theorem)

For arbitrary \(x_1, x_2, \dots, x_m\) and some nonnegative integer \(n\), we have

The number of terms of the sum on the R.H.S. is given by

Proof. Consider the basic cases first.

For \(m=1\), the result is trivial as there is exactly one term on the R.H.S. given by \(x_1^n\).

For \(m=2\), (1.4) reduces to

\[\begin{split} (x_1 + x_2)^n &= \sum_{k_1 + k_2 = n}{n \choose k_1, k_2}x_1^{k_1} x_2^{k_2}\\ &= \sum_{k=0}^n {n \choose k}x_1^k x_2^{n - k}. \end{split}\]We replaced \(k_1\) by \(k\) and \(k_2\) by \(n-k\).

This is the binomial theorem already proven in Theorem 1.43.

For \(n=0\), both L.H.S. and R.H.S. reduce to \(1\).

We now consider the general case.

Each term on the R.H.S. is of the form

\[ C \prod_{1 \leq r \leq m}x_r^{k_r} \]such that \(k_1 + \dots + k_m = n\) and \(C\) is some coefficient.

There are \(m\) types of variables \(x_1, \dots, x_m\).

In the product, there are total \(n\) variables.

The number of ways \(n\) objects of \(m\) types can be selected is given by

\[ n + m - 1 \choose n \]due to Theorem 1.51.

This establishes the number of terms on the R.H.S..

It remains to calculate \(C\).

We can see that \(\prod_{1 \leq r \leq m}x_r^{k_r}\) arises on the R.H.S. from the different permutations of \(r_1\) variables of type \(x_1\), \(r_2\) variables of type \(x_2\) and so on up to \(r_m\) variables of type \(x_m\).

The number of permutations of \(n\) variables of \(m\) types \(x_1, \dots, x_m\) with counts \(r_1, \dots, r_m\) is given by

\[ \frac{n!}{r_1! r_2 ! \dots r_m!} \]due to Theorem 1.52.

Hence

\[ C = {n \choose r_1, r_2, \dots, r_m} \]as per the definition of the multinomial coefficient.

## 1.11.8. Recursion#

(Recursively defined sequence)

We say that a sequence \(\{t_n \} = t_1, t_2, \dots, t_n, \dots\)
is *recursively defined* if for every integer \(n\) greater than
or equal to some bound \(b \geq 0\), the value of \(t_n\) depends
on at least some of the values \(t_1, \dots, t_{n -1}\).
The values for \(t_1, \dots, t_{b-1}\) are given explicitly.
These are referred to as the *initial conditions* for the
recursively defined sequence. The equation that defines
\(t_n\) from \(t_1, \dots, t_{n-1}\) is called a
*recursive relation*.

(Fibonacci sequence)

The famous *Fibonacci sequence*,
denoted by \(f_0, f_1, f_2, \dots\),
is defined as follows:

\(f_0 = 1\).

\(f_1 = 1\).

for every \(n \geq 2\), we have

\[ f_n = f_{n-1} + f_{n - 2}. \]

The sequence is attributed to the Italian mathematician Leonardo Pisano (“Fibonacci”) of the 13th century. However, it has been known to Indian mathematicians as early as the 6th century.

For recursive sequences, we aim to solve the following types of problems:

Devise a formula for \(t_n\) such that one doesn’t have to compute every term in the recursion to compute \(t_n\).

If such a closed form solution is not possible, then develop some upper or lower bounds on the value of \(t_n\).

## 1.11.9. Induction#

The principle of mathematical induction plays a major role in many important results in enumerative combinatorics. This is especially relevant for recursively defined sequences. We suggest the readers to review the definitions and results in Principle of Mathematical Induction.

We shall show that

for every integer \(n \geq 2\).

Base case: for \(n=2\) we have \(2! = 2 = 2^2 - 2\).

Inductive hypothesis: assume that the statement is true for some \(k \geq 2\); i.e.,

\[ k! \geq 2^k - 2. \]Inductive step:

For \(k+1\), we have

\[ (k+1)! = (k+1) k! \geq (k + 1) (2^k - 2). \]Since \(k \geq 2\), hence \(k+1 \geq 3\).

Hence

\[ (k+1)! \geq 3 (2^k - 2) = 2 \cdot 2^k + 2^k - 6 = 2^{k+1} + 2^k - 6. \]Since \(k \geq 2\), hence \(2^k \geq 4\).

Hence \(2^k -6 \geq 4 - 6 = -2\).

Hence

\[ (k+1)! \geq 2^{k+1} + 2^k - 6 \geq 2^{k+1} - 2. \]Thus, the inequality is true for \(k+1\) also.

Hence, by mathematical induction, the inequality holds for every \(n \geq 2\).

\(n\) natural numbers)

(Sum of firstThe sum for first \(n\) natural numbers is given by

We show this equality using a recursively defined sequence.

Let \(s_1 = 1\).

Let \(s_n = s_{n - 1} + n\) for every \(n \geq 2\).

We can see that \(\{ s_n \}\) is a recursively defined sequence where the \(n\)-th term represents the sum of first \(n\) natural numbers.

We now prove that \(s_n = \frac{n (n + 1)}{2}\) using mathematical induction.

For \(n=1\), \(s_1 = 1 = \frac{1 \cdot 2}{2}\).

Assume that the equality is true for some \(n\).

Then for \(n+1\), we have

\[\begin{split} s_{n + 1} = s_n + (n+1) &= \frac{n (n + 1)}{2} + n + 1 \\ &= \frac{n (n + 1) + 2 (n + 1)}{2} \\ &= \frac{(n + 1)(n + 2)}{2}. \end{split}\]We can see that the equality holds for \(n+1\) also.

Hence, by mathematical induction, it holds for all \(n \geq 1\).

### 1.11.9.1. Strong Induction#

The following examples require the principle of strong induction (Theorem 1.22).

Consider the sequence \(\{ t_n \}\) defined as follows:

\(t_1 = 2\).

For every \(n \geq 2\),

\[ t_n = \sum_{i=1}^{n-1} t_i. \]

We can see that

\(t_2 = t_1 = 2\).

\(t_3 = t_1 + t_2 = 2 + 2 = 4\).

\(t_4 = t_1 + t_2 + t_3 = 2 + 2 + 4 = 4 + 4 = 8\).

We now claim that \(t_n = 2^{n-1}\) for every \(n \geq 2\). We shall use the strong induction principle (Theorem 1.22).

We are given that \(t_1 = 2\).

By strong induction hypothesis, let us assume that \(t_i = 2^{i - 1}\) for every \(i\) with \(2 \leq i \leq k\).

By the recursive relation, we have

\[\begin{split} t_{k + 1} &= \sum_{i=1}^k t_i \\ &= t_1 + \sum_{i=2}^k t_i \\ &= 2 + \sum_{i=2}^k 2^{i-1} \\ &= 1 + 2^0 + \sum_{i=1}^{k-1} 2^i\\ &= 1 + \sum_{i=0}^{k-1} 2^i\\ &= 1 + 2^k - 1\\ &= 2^k. \end{split}\]Thus, the equality is true for \(k+1\) also.

Hence, by principle of strong induction, it is true for every \(n \geq 2\).

\(n\) disks)

(StackingYou are given \(n\) disks. You need to arrange them into a single tower of disks. You can make small individual towers of disks and then stack one tower on top of the some other one. You are free to make as many towers of disks as you need. Each move consists of stacking one tower over the other. Once a tower has been formed, you are not allowed to break it. How many moves will it take to form the single tower?

We claim that it will take \(n-1\) moves.

Base case: for \(n=1\), there is a single disk and it is the tower in itself. Hence nothing more is to be done. Number of moves required is \(0\).

Strong induction hypothesis: Assume that for some \(n=k\), you can make the tower of \(i\) disks in \(i-1\) moves for every \(i \in 1,\dots,k\).

Induction step: Consider the problem of stacking \(k+1\) disks.

We can see that the last step consists of stacking the last remaining two towers into a single tower.

Assume that the two remaining towers \(A\) and \(B\) have \(j\) and \(k+1 - j\) disks respectively.

Both towers consist of at least \(1\) disk.

Hence neither tower can have \(k+1\) disks.

Clearly, \(j \leq k\) and \(k + 1 - j \leq k\).

It will take \(j-1\) moves to form the tower \(A\) by induction hypothesis.

It will take \(k - j\) moves to form the tower \(B\) by induction hypothesis.

It will take \(1\) more move to stack \(A\) and \(B\) together.

Hence total number of moves required is

\[ j - 1 + k - j + 1 = k. \]Hence to stack a tower of \(k+1\) disks, we need \(k\) moves.

We can see that by strong induction, for every \(n\), it takes \(n-1\) moves to stack the \(n\) disks into a single tower.

## 1.11.10. Pigeonhole Principle#

Pigeonhole principle is one of the most powerful counting arguments.

(Pigeonhole principle)

If there are \(n\) objects that fall into \(m\) different categories and \(n > m\), then at least two of the objects fall into the same category.

If there are \(m\) pigeonholes and \(n\) pigeons with \(n > m\), then at least one pigeonhole must hold more than one pigeons. The name of this principle comes from the example of pigeons as objects and pigeonholes as categories.

Proof. We argue as follows.

Consider the first \(m\) objects.

If any two of these objects belong to the same category, then we are done.

Otherwise, there is exactly one object for each of the \(m\) categories from this set of first \(m\) objects.

There are \(n - m > 0\) objects still left. Hence there is at least one more object.

This object must fall into one of the \(m\) categories.

This category will then have at least \(2\) items.

(Sock-picking)

Assume that a drawer contains socks of two colors (blue and black). The socks can be worn on either foot. We are pulling the socks from the drawer without looking at them. What is the minimum number of socks we need to pull so that we are guaranteed to have a pair of same color?

Socks are the objects.

Each color can be considered as a category.

There are thus \(m=2\) categories.

We need more than one sock in at least one category.

If \(n > m = 2\), then we have at least one color for which we have two or more socks.

Minimum value of \(n\) satisfying \(n > m\) is \(3\).

Thus, we need to draw at least \(3\) socks to guarantee that we have one pair of same color.

(Hand-shaking)

Let there be \(n\) people in a room with \(n >1\) They are shaking hands with each other. Then there is always a pair of people who will shake hands with the same number of people.

One person can shake hands with at the minimum \(0\) number of people and at the maximum \(n-1\) number of people.

We define the categories as the number of people to which one has shaken hands.

Thus, the categories are labeled \(0,1,2,\dots,n-1\).

We can see that there are \(n\) categories and \(n\) people.

However, the category \(0\) and category \(n-1\) cannot both have a person simultaneously.

Suppose there is someone who has shaken hands with no one.

Then there cannot be anyone who has shaken hands with everyone.

Hence if category \(0\) is nonempty, then category \(n-1\) must be empty.

Now suppose there is someone who has shaken hands with everyone.

Then there cannot be anyone who has shaken hands with no one.

Hence if category \(n-1\) is nonempty, then category \(0\) must be empty.

Thus, either \(0\) or \(n-1\) or both must be empty.

Hence the \(n\) people must be fitted into at most \(n-1\) categories.

By pigeonhole principle, at least one of these categories must have more than one person.

(Hair counting)

At any given time there live at least two people in California with the same number of hairs on their heads.

The current population of California is around \(40\) million.

Typical human head has an average of about \(150,000\) hairs.

An upper bound on the number of hairs on human head is \(1\) million.

Hence by pigeonhole principle, there must be people in California with the same number of hairs on their heads.

(Subset sum)

Consider the set \(S = \{1,2,3,4,5,6,7,8,9 \}\). We claim that every \(6\) element subset of \(S\) must contain at least two numbers whose sum is \(10\).

Let us first identify which pairs of numbers sum to \(10\).

We can see that \(1+9=2+8=3+7=4+6=10\). There are \(4\) such pairs.

We now split the \(9\) numbers to \(5\) categories as follows:

\(1,9 \to A\)

\(2,8 \to B\)

\(3,7 \to C\)

\(4,6 \to D\)

\(5 \to E\).

Consider any subset of \(S\) of \(6\) elements.

Let its members be \(\{ n_1, n_2, n_3, n_4, n_5, n_6 \}\).

Put these numbers into the \(5\) categories above based on rule that a number should go into the category mapped for it.

There are \(5\) categories and \(6\) numbers.

By pigeonhole principle, at least one of the categories should have more than one number.

Category \(E\) cannot have two numbers. It can only have \(5\).

Hence, at least one of \(A, B, C, D\) has two numbers.

But each of these categories consist of two numbers whose sum is \(10\).

Hence every \(6\) element subset of \(S\) must contain at least two numbers whose sum is \(10\).

(Same color rectangle)

Let there be \(n\) given colors. Assume that each point of the plane has been assigned one of these \(n\) colors. Then there exists a rectangle whose four corners have the same color.

To prove this, we need to discretize the problem first so that we can apply the pigeonhole principle. We can do this by creating a grid of points.

Consider an \(r \times c\) grid of points.

If there are enough number of rows, then we can guarantee that some of points in each column have same color.

Similarly, if there are enough number of columns, we can guarantee that some of the points in each row have same color.

If we can guarantee that two rows and two columns contain points of same color, we have found a rectangle of same color corners.

How many rows and columns do we need?

We consider a grid of points with \(n+1\) rows and \(n {n + 1 \choose 2} + 1\) columns.

Let \(p = {n + 1 \choose 2}\). Hence, we have \(n p + 1\) columns.

Let us first examine the points each column.

There are \(n+1\) points in each column.

There are only \(n\) colors which can be assigned to point.

Hence, in each column, there exists a pair of points which has the same color.

Now examine the pair of points in each column.

Since there are \(n+1\) points, hence there are \(p = {n + 1 \choose 2}\) pairs of points in each column.

There are \(p\) pairs of points and \(n\) colors.

Hence there are \(n p\) ways of choosing a unique pair of points and a unique color.

Thus, in at most \(n p \) columns, a pair of points doesn’t appear at the same location with the same color.

Hence if we have \(n p + 1\) columns, then there exist at least two columns such that the same color occupies the same two locations in both the columns.

These four points form a rectangle whose points have the same color.

### 1.11.10.1. Generalized Pigeonhole Principle#

(Generalized pigeonhole principle)

If there are \(n\) objects that fall into \(m\) different categories and \(n > k m\), for some positive integer \(k\), then at least \(k+1\) of the objects fall into the same category.

Proof. .

Consider the first \(km\) objects.

If \(k+1\) of them fall into the same category, we are done.

Otherwise, exactly \(k\) of them must fall into the each category.

Since \(n > km\), hence there is one more object.

This object must fall into one of these \(m\) categories.

Since every category already has \(k\) objects, hence there will be \(k+1\) objects in the category to which the \(km + 1\)-th object falls.

We show the application of the generalized pigeonhole principle to prove Erdős–Szekeres theorem.

(Erdős–Szekeres theorem)

For every pair of integers \(a,b \geq 1\), if \(S\) is a sequence of \(ab + 1\) distinct real numbers, then there is either an increasing subsequence of length \(a + 1\) or a decreasing subsequence of length \(b + 1\) in \(S\).

Proof. Let \(n = a b + 1\). Define a function \(f\) which maps every element \(x \in S\) to the length of the longest increasing subsequence that begins with \(x\).

If there exists some \(x \in S\) such that \(f(x) \geq a + 1\) then we are done.

Otherwise, we have that \(f(x) \leq a\) for every \(x \in S\).

We note that for every \(x \in S\), there exists an increasing subsequence of length \(1\).

Hence \(f(x) \geq 1\) for every \(x \in S\).

Hence we have \(1 \leq f(x) \leq a\) for every \(x \in S\).

Hence, there are \(a\) possible values of \(f(x)\).

Since \(n > a b\), hence there exists at least \(b + 1\) values of \(S\) which have the same value of \(f(x)\) due to the generalized pigeonhole principle.

Let \(T = \{t_1, t_2, \dots, t_{b+1} \}\) be a subsequence of \(S\) such that \(f(x)\) is identical for every \(x \in T\).

We now claim that \(T\) is a decreasing subsequence of \(S\).

Let \(x, y \in T\) such that \(x\) appears before \(y\) in \(S\).

Since all values in \(S\) are distinct, hence \(x \neq y\).

Assume that \(x < y\).

Then by taking \(x\) and the increasing subsequence of \(S\) of length \(f(y)\) starting at \(y\), we can form a subsequence of length \(f(y) + 1\) starting from \(x\).

This contradicts the fact that \(f(x) = f(y)\).

Hence \(x > y\) must hold.

Hence for every \(t_i, t_j \in T\), such that \(i < j\), we have \(t_i > t_j\).

Hence we have \(t_1 > t_2 > \dots > t_{b + 1}\).

Hence there exists a decreasing subsequence of length \(b + 1\).

## 1.11.11. Inclusion Exclusion Principle#

Recall from Remark 1.23 that for finitely many mutually disjoint finite sets, the number of elements of their union is equal to the sum of the number of elements of individual sets.

Inclusion-exclusion principle is a way of counting the number of elements of unions of finite sets which may be overlapping.

For two sets, we add the counts of individual sets, then subtract the count of their intersection.

For three sets:

Add the counts of individual sets

Subtract the counts of their pairwise intersections

Add the count of their triple intersection.

For four sets:

Add individual counts

Subtract pairwise intersection counts

Add counts of intersections of every selection of three sets

Subtract the count of the intersection of all sets.

And so on.

(Inclusion-exclusion principle for 2 sets)

Let \(A\) and \(B\) be two finite sets. Then

Proof. .

Recall that \(A \setminus B\) and \(A \cap B\) are disjoint and

\[ A = (A \setminus B) \cup (A \cap B). \]Hence \(|A| = |A \setminus B| + |A \cap B|\).

Similarly \(|B| = |B \setminus A| + |A \cap B|\).

Also recall that

\[ A \cup B = (A \setminus B) \cup (B \setminus A) \cup (A \cap B) \]and these three sets are disjoint.

Hence \(|A \cup B | = |A \setminus B| + |B \setminus A| + |A \cap B|\).

Substituting from previous identities

\[ |A \cup B | = |A| - |A \cap B| + |B| - |A \cap B| + |A \cap B| = |A | + |B | - | A \cap B | \]as desired.

We can now generalize the principle for a finite number of sets

\(n\) sets)

(Inclusion-exclusion principle forLet \(\AAA = \{ A_1, A_2, \dots, A_n \}\) be a family of \(n\) finite sets which are not necessarily disjoint. Then the size (cardinality) of their union is given by:

where \(S_k\) is the sum of the cardinalities of all \(k\)-set intersections among the sets \(A_1, \dots, A_n\). In particular,

In general for every \(k \in 1,\dots,n\), we can write:

One can see that there are \(n \choose k\) ways of choosing \(k\) sets from the family \(\AAA\) of \(n\) sets. Hence, each \(S_k\) is a sum of \(n \choose k\) terms.

Proof. We prove this result by mathematical induction.

Base case: The statement is true for \(n=1\), since

\[ | A_1 | = S_1 = | A_1|. \]Inductive hypothesis: Assume that the statement is true for some \(n\).

We shall now prove it for \(n+1\).

Let \(\AAA = \{ A_1, \dots, A_{n+1}\}\) be a family of \(n+1\) sets.

Let \(A = A_1 \cup A_2 \cup \dots \cup A_n\).

Then \(A_1 \cup A_2 \cup \dots \cup A_n \cup A_{n+1} = A \cup A_{n + 1}\).

By Theorem 1.57, we have

\[ | A \cup A_{n+1} | = |A | + | A_{n+1} | - | A \cap A_{n+1} |. \]By inductive hypothesis:

\[ |A| = \sum_{k=1}^n (-1)^{k+1}S_k \]where

\[ S_k = \sum_{1 \leq i_1 < i_2 < \dots < i_k \leq n} | A_{i_1} \cap A_{i_2} \cap \dots \cap A_{i_k} |. \]Let \(B_i = A_i \cap A_{n+1}\) for \(i=1,\dots,n\).

Then \(A \cap A_{n+1} = B_1 \cup B_2 \cup \dots \cup B_n\).

By inductive hypothesis:

\[ |A \cap A_{n+1}| = \sum_{l=1}^n (-1)^{l+1}T_l \]where

\[\begin{split} T_l &= \sum_{1 \leq i_1 < i_2 < \dots < i_l \leq n} | B_{i_1} \cap B_{i_2} \cap \dots \cap B_{i_l} | \\ &= \sum_{1 \leq i_1 < i_2 < \dots < i_l \leq n} | A_{i_1} \cap A_{i_2} \cap \dots \cap A_{i_l} \cap A_{n+1}|. \end{split}\]We can now write

\[\begin{split} &| A_1 \cup A_2 \cup \dots \cup A_n \cup A_{n+1} | \\ &= |A | + | A_{n+1} | - | A \cap A_{n+1} |\\ &= \sum_{k=1}^n (-1)^{k+1}S_k + | A_{n+1} | - \left ( \sum_{l=1}^n (-1)^{l+1}T_l \right) \\ &= S_1 + | A_{n+1} | + \sum_{k=2}^n (-1)^{k+1}S_k + \sum_{l=1}^{n-1} (-1)^{l+2} T_l + (-1)^{n + 2} T_n\\ &= S_1 + | A_{n+1} | + \sum_{k=2}^n (-1)^{k+1} (S_k + T_{k -1}) + (-1)^{n + 2} T_n. \end{split}\]We now define \(U_j\) for \(j=1,\dots,n+1\) as follows:

For \(j=1\) we define

\[ U_1 = S_1 + | A_{n+1} | = |A_1 | + |A_2| + \dots + |A_n| + | A_{n+1} |. \]For \(j=2,\dots,n\) we define

\[\begin{split} U_j &= S_j + T_{j -1} \\ &= \sum_{1 \leq i_1 < i_2 < \dots < i_j \leq n} | A_{i_1} \cap A_{i_2} \cap \dots \cap A_{i_j} |\\ &+ \sum_{1 \leq i_1 < i_2 < \dots < i_{j-1} \leq n} | A_{i_1} \cap A_{i_2} \cap \dots \cap A_{i_{j-1}} \cap A_{n+1}| \\ &= \sum_{1 \leq i_1 < i_2 < \dots < i_j \leq n+1} | A_{i_1} \cap A_{i_2} \cap \dots \cap A_{i_j} |. \end{split}\]We can see that the terms in \(S_j\) are the intersections of \(j\) sets from \(\AAA\) not including \(A_{n + 1}\)

The terms in \(T_{j-1}\) are intersections of \(j\) sets from \(\AAA\) including \(A_{n+1}\).

Hence the terms in \(U_j\) are the intersections of \(j\) sets from \(\AAA\).

\(U_j\) is indeed the sum of cardinalities of all \(j\)-set intersections of \(\AAA\).

For \(j=n+1\) we define

\[ U_{n+1} = T_n = | A_1 \cap A_2 \cap \dots \cap A_n \cap A_{n+1}|. \]This is nothing but the one and only intersection of all sets in \(\AAA\).

We can see that

\[ | A_1 \cup A_2 \cup \dots \cup A_n \cup A_{n+1} | = \sum_{j=1}^{n+1} (-1)^{j+1}U_j \]where

\[ U_j = \sum_{1 \leq i_1 < i_2 < \dots < i_j \leq n+1} | A_{i_1} \cap A_{i_2} \cap \dots \cap A_{i_j} |. \]Hence the inclusion-exclusion principle statement is true for \(n+1\) also.

Hence by mathematical induction, the statement is true for all \(n\).

## 1.11.12. Generating Functions#

A generating function is a way of encoding an infinite sequence of numbers \(\{ t_n \}\) by treating them as the coefficients of a formal power series.

(Ordinary generating function)

The *ordinary generating function* of a sequence
\(t_0, t_1, \dots, t_n, \dots\) is given by

A generating function is not evaluated for any specific value of \(x\). It is a formal structure which enables us to manipulate the sequences more conveniently.

(Exponential generating function)

The *exponential generating function* of a sequence
\(t_0, t_1, \dots, t_n, \dots\) is given by

### 1.11.12.1. Generalized Binomial Theorem#

Recall from Theorem 1.43 that for a nonnegative integer \(n\), we have

We now wish to generalize it for negative \(n\) also.

(Generalized binomial coefficient)

For any real \(n\) and any nonnegative integer \(r\), the
*generalized binomial coefficient* is defined as

Note that for a nonnegative \(n\) and \(r \leq n\), the definition agrees with the binomial coefficient as defined in Definition 1.122.

(Binomial coefficient for negative integers)

If \(n\) is a positive integer, then

Proof. We have

Factoring \(-1\) out of each term in the R.H.S. numerator gives us

\[\begin{split} & (-1)^r \frac{n (n+1) \dots (n + r - 1)}{r!} \\ &= (-1)^r \frac{(n + r - 1) \dots (n+1) n }{r!}\\ &= (-1)^r \frac{(n + r - 1) \dots (n+1) n (n-1) \dots 1 }{r! (n-1)!}\\ &= (-1)^r \frac{(n +r - 1)!}{r! (n-1)!} \\ &= (-1)^r {n + r - 1 \choose r}. \end{split}\]

(Generalized binomial theorem)

For any \(n \in \RR\), we have

We shall show that

Let \(y = -x\).

Then \((1-x)^{-1} = (1 + y)^{-1}\).

By Theorem 1.60,

\[ (1 + y)^{-1} = \sum_{r=0}^{\infty} {-1 \choose r} y^r \]By Theorem 1.59

\[ {-1 \choose r} = (-1)^r {1 + r - 1 \choose r} = (-1)^r { r \choose r} = (-1)^r. \]Hence

\[ (1 + y)^{-1} = \sum_{r=0}^{\infty} (-1)^r y^r. \]But \(y^r = (-x)^r = (-1)^r x^r\).

Putting back, we get

\[ (1 - x)^{-1} = \sum_{r=0}^{\infty} (-1)^r (-1)^r x^r = \sum_{r=0}^{\infty} x^r. \]