# CSCI 2824 Lecture 25 Notes: Binomial Theorem

In this lecture, we will continue with the binomial theorem and look at some applications. We will also look at recursive counting and counting unordered lists with repetitions.

## Biniomial Theorem

For all natural numbers , we can expand as

We can write it succinctly as .

Proof What is the coefficient of in . We write as . There are multiplicands.

To form a term where , we can choose out of multiplicands to “supply” the . The remaining will be chosen automatically to supply the s. There are choices. Each choice appears as a term which are then collected up.

Our reasoning above shows that the coefficient of where should be .

## Applications of Binomial Theorem

We can use the Binomial theorem to show some properties of the function.

1. .

Proof: Take the expansion of and substitute .

2. Let be an even number. Then we have .

Proof: Take and set . Write a similar result for odd.

3. Evaluate: .

Proof: Take . Using binomial theorem, we have .

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

Substituting , we get the required summation to be .

4. Likewise, can you evaluate this summation:

## Counting Unordered Lists With Repetition

Here is a problem: There are ten candy stores, each selling the same type of candy. How many ways are there for me to purchase candies from these stores?

• I could purchase all from one store.

• I could purchase from one store and one more from another store.

• I could purchase from one store, and one each from two other stores.

• I could purchase from one of the stores and two from another store…

• Ah.. the possibilities :-)

In other words, we are asking, how many ways are there of satisfying the following equation:

Note that refers to the number of candy bought from the first store any number ranging from . Similarly, refers to number of candy bought from store. Again, we can buy any natural number. Note that we cannot buy negative number of candies.

Naturally each of the but we do not add that explicitly. The only way can be is some other is negative, which cannot happen.

### Candy Purchasing and Binary Sequence

We will now “code up” the patterns of candy purchasing using binary strings made up of 0s and 1s.

Take a sequence of 0's. Each 0 represents a candy.

Our goal is to insert ’1's somewhere in this sequence. Eg.,

We interpret the sequence above to mean,

• Bought 1 candy from first store.

• Bought 2 candy from second store.

• Bought 3 candy from third store.

• Bought 23 candy from store

• Bought 2 candy from store

Let us take another example: Take another sequence of 0's and 1's with 0s and 9 1s.

What pattern of candy buying does it represent:

• 1 candy from store 1

• 1 candy from store 2

• 1 candy from store 9

• 21 candies from store 10.

What pattern of 0s and 1s represent the following pattern of candy purchasing?

• 0 candies from stores 1-5.

• 1 candy from store 6.

• 28 candies from store 7

• 0 candies from store 8

• 1 from store 9

• 0 from store 10.

### Claim

1. There is a one-to-one correspondence between the patterns of purchasing 30 candies from 10 stores and the number of binary sequences consisting of 30 0's and 9 1's.

2. There is a one-to-one corr. between the patterns of purchasing 30 candies from 10 stores and the number of solutions to the equation:

There are ten candy stores, each selling the same type of candy. How many ways are there for me to purchase candies from these stores?

Answer We have a corr. between each pattern of candy purchasing and a binary sequence with exactly 30 0's and 9 1's. Therefore, the required answer is simply (or ).

## Unordered Lists With Repetitions

1. Let us say we have different bags each containing unlimited quantities of an item. How many ways are there of choosing items from these bags?

Or equivalently,

2. What are the number of solutions to the equation:

or equivalently,

3. How many binary sequences of and exist with precisely 0's and 1's?

Answer to all of these problems is .

### Example-1

How many natural number solutions are there for the equation: ?

Answer Each solution can be viewed as inserting 3 s in between zeros. This gives us .

### Example-2

How many natural number solutions are there for the equation: ?

Answer We can write the problem equivalently as , where is a slack variable representing the left-over quantity which must be a natural number . Therefore, the answer is inserting 1s between zeros: .

### Example-3

How many positive integer solutions are there for the equation: ?

We require . Let us simply write . We have and .

This gives us solutions.

### Example-4

There are three shops that sell widgets. Our goal is to obtain widgets in all. But we are constrained to buy at least from each shop. How many ways of widget buying are available?

## Recursive Counting

In recursive counting, we express the count as a recurrence relation.

### Example-1

How many round-robin matches need to be played between teams?

We know that the answer is .

Answer Let be the number of round-robin matches that teams need to play. If , we know that .

Let us write a recurrence for . We note that team teams ). Therefore

where counts the number of round robin matches played all teams other than the last team and accounts for the last team.