Docsity

Recursive Thinking: Combinatorial Coefficients and Pascal's Triangle, Schemes and Mind Maps of Law

Toggle sidebar
bg1
Recursive thinking
1
The trains problem intro-
duced us to the powerful idea
of recursive thinking. Here
we extend this approach.
ABC
BCD
ABD
BCE
ABE
BCF
ABF
BDE
ACD
BDF
ACE
BEF
ACF
CDE
ADE
CDF
ADF
CEF
AEF
DEF
3. Recursive thinking.
(1) The combinatorial coefficients.
The combinatorial coefficient “n choose r,” is written (𝑛
𝑟) or on
your calculator it might be written C
𝑛 𝑟 or C𝑛,𝑟. By definition, (𝑛
𝑟)
is the number of ways of choosing r objects from a set of n objects.
Equivalently it is the number of subsets of size r in a set of size n.
Example 1. Show how the pentagon at the right provides a simple
argument that there are 10 ways to select 2 objects from a set of 5:
(5
2) = 10
Solution. In the diagram, take the red vertices to be the 5 objects
and the 10 connecting lines to be the different ways to choose 2 of
these.
Example 2. Suppose the polygon above had 8 sides––an octagon!
Would that give you a formula for (8
2)?
Solution. As before we would have an edge between every pair of
vertices. Then how many edges would there be? Well each vertex
is connected to all 7 remaining vertices so that’s 7 edges for each
vertex. That seems to be 8×7 edges but each edge is counted
twice. Thus the answer is
(8
2) = 8 × 7
2=28
Example 3. Do these examples give you a formula for (𝑛
2)?
Yes they do:
(𝑛
2) = 𝑛(𝑛 − 1)
2.
Example 4 Make list of all the subsets of size 3 of the 6 letters
{A, B, C, D, E, F}.
To do this in a way that allows you to be sure you are correct, your
listing needs to be organized. There are many ways to organize it
and it’s of interest to have different groups report on the way they
did it.
One standard way to do it is alphabetical—pretend that they are
words in the dictionary. See the table at the right.
This tells us that
(6
3) = 20.
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Recursive Thinking: Combinatorial Coefficients and Pascal's Triangle and more Schemes and Mind Maps Law in PDF only on Docsity!

The trains problem intro-

duced us to the powerful idea

of recursive thinking. Here

we extend this approach.

ABC BCD

ABD BCE

ABE BCF

ABF BDE

ACD BDF

ACE BEF

ACF CDE

ADE CDF

ADF CEF

AEF DEF

3. Recursive thinking.

(1) The combinatorial coefficients.

The combinatorial coefficient “ n choose r ,” is written (

) or on

your calculator it might be written C 𝑛 𝑟

or C

𝑛,𝑟

. By definition, (

is the number of ways of choosing r objects from a set of n objects.

Equivalently it is the number of subsets of size r in a set of size n.

Example 1. Show how the pentagon at the right provides a simple

argument that there are 10 ways to select 2 objects from a set of 5:

Solution. In the diagram, take the red vertices to be the 5 objects

and the 10 connecting lines to be the different ways to choose 2 of

these.

Example 2. Suppose the polygon above had 8 sides––an octagon!

Would that give you a formula for (

Solution. As before we would have an edge between every pair of

vertices. Then how many edges would there be? Well each vertex

is connected to all 7 remaining vertices so that’s 7 edges for each

vertex. That seems to be 8 × 7 edges but each edge is counted

twice. Thus the answer is

8 × 7

Example 3. Do these examples give you a formula for (

Yes they do:

Example 4 Make list of all the subsets of size 3 of the 6 letters

{A, B, C, D, E, F}.

To do this in a way that allows you to be sure you are correct, your

listing needs to be organized. There are many ways to organize it

and it’s of interest to have different groups report on the way they

did it.

One standard way to do it is alphabetical—pretend that they are

words in the dictionary. See the table at the right.

This tells us that

Pascal’s triangle gives us the combinatorial coefficients

The r

th

entry of row n in Pascal’s triangle is (

), the number of ways of

choosing r objects from n.

[This uses the convention that indexing starts at zero—the top row of the

triangle is row 0 and the left-hand entry of every row is the 0

th

entry.]

row0 1

row1 1 1

row2 1 2 1

row3 1 3 3 1

row4 1 4 6 4 1

row5 1 5 10 10 5 1

row6 1 6 15 20 15 6 1

row7 1 7 21 35 35 21 7 1

row8 1 8 28 56 70 56 28 8 1

Pascal’s triangle

If you don’t know about Pascal’s triangle, it’s time you did. Like the Fibonacci numbers, it has a simple

structure, and its entries have some fascinating properties. The top row, with a single 1 is the zeroth row

and the rows are numbered 1, 2, 3, … down from there. The last row displayed above is the “

th

” row.

There are 1’s on each end of every row and otherwise each entry is the sum of the two entries above it.

That description is enough to completely specify the entries of the triangle.

I ask the class what they know about this triangle and someone tells me that they give us the coefficients

in a binomial expansion (known simply as the binomial coefficients ) while someone else offers that the en-

tries are the combinatorial coefficients we have just been talking about. Indeed we are investigating that

one right now.

Let’s check this out with the examples above. From Pascal’s Triangle we see that indeed:

Of course this raises a big question. If the combinatorial coefficients are found in the triangle, that means

they must satisfy the sum law. In that case, there should expect there to be a natural reason for the sum

law to hold.

G (7)

G (6)

G (8)

T

T

H

(2) Two Heads in a row

(a) A coin is tossed n times producing a sequence of heads (H) and tails

(T). Let T ( n ) denote the number of different possible sequences of H and

T could result from those n tosses? Find a formula for T ( n ).

Solution. There are many ways to come to the answer and it’s good to

have students discuss the various arguments they come up with. One is

to start with small n and observe that T (1) = 2, T (2) = 4, T (3) = 8 and

T (4) = 16 and infer from that that 𝑇(𝑛) = 2

𝑛

But can you be certain? One way is to argue that, for example, T (4) has

to be twice T (3) because I can take any possible sequence of length 3

and put either an H or a T in front of it, and that way I get all the se-

quences of length 4. That’s a trains-type argument and is quite power-

ful.

Finally a student might make a slightly more sophisticated argument

using probabilistic independence––there are 2 possibilities for the first

slot, and for each of these, 2 possibilities for the second, then 2 for the

third, etc. giving us the product of n 2’s.

(b) Let’s call a sequence of tosses “good” if it has two consecutive heads

for the first time on the last two tosses. Let G ( n ) be the number of good

sequences of length n. For example G (5) = 3 as there are 3 good se-

quences:

HTTHH, THTHH, TTTHH

By similarly enumerating the possibilities, find G ( n ) for all n ≤ 8 and fill

in the table at the right. Can you see a pattern?

(c) When we fill in the table, we find the Fibonacci numbers. Do they

keep going? Can we be certain that G (8) = 13?

Solution. What we want is a general argument that

And one thinks right away of trying to use a trains-type argument. Let’s

try to show that G (8) = G (7) + G (6).

Okay. A good sequence of length 8 must either start with a T or with an

H. If it starts with a T, the remaining 7 tosses can be any good sequence

of length 7, so there are G (7) of those. If it starts with an H, the very next

toss will need to be a T (as the first HH must come at the end) and then

after that, the next 6 tosses can be any good sequence of length 6. , so

there are G (6) of those.

Since the total number is G (8), we are finished.

# tosses

n

# good

G ( n )

# tosses

n

# good

G ( n )

row0 1

row1 1 1

row2 1 2 1

row3 1 3 3 1

row4 1 4 6 4 1

row5 1 5 10 10 5 1

row6 1 6 15 20 15 6 1

row7 1 7 21 35 35 21 7 1

row8 1 8 28 56 70 56 28 8 1

Appendix. The binomial coefficients

Some student know Pascal’s triangle as the recipe for expanding a binomial power. For example suppose

you want to expand the 6

th

power of (𝑎 + 𝑏). You would get:

6

6

5

4

2

3

3

2

4

5

6

The coefficients we get are the entries in row 6 of the triangle. Our job is to understand why this is the

case.

Understanding the binomial expansion.

Perhaps the first thing to do is to make sure that everyone understand what (𝑎 + 𝑏)

6

really is:

6

That is, it’s the product of 6 copies of ( a + b ). Now to get a typical term in the expansion of this product,

we take one term out of each of the 6 brackets and multiply them together. And the total number of terms

we get is the number of different ways that we can do that. For example, if we decided to take the a out of

the first two terms and the last two terms, and take b out of the middle two terms, we’d get the term

aabbaa which we’d write as 𝑎

4

2

. Of course there are other ways of getting the term 𝑎

4

2

, for example

we could take a out of the first four terms and b out of the last two. In fact the expansion above tells us

there are 15 different ways of getting the term 𝑎

4

2

. Can we convince ourselves of that? This is a good

question to get a couple of volunteers up to the front to explain the reason to their classmates.

To get 4 a ’s and 2 b ’s I need to choose 2 brackets to take the b ’s from and then I take a from the remaining

4 brackets. In how many ways can I do that? The answer is––the number of ways I can choose 2 things

from 6 and that’s (

) and that’s 15.

The same argument works for the other terms and that gives us the general formula:

6

6

5

4

2

3

3

2

4

5

6

We use the same kind

of thinking we used

for trains. If it’s true

that

7

6

5

That suggests that

there might be a natu-

ral way to partition

the set of all se-

quences of length 7

into 2 kinds, with 𝑠

6

of

one kind and 𝑠

5

of the

other

  1. [6 marks] Let 𝑠 𝑛

be the number of sequences of length n made up of 1’s and

2’s that have no consecutive 2’s. We will call such sequences “good.” For ex-

ample, of the following sequences of length 9, the two on the left are good and

the two on the right are not good.

(a) By direct enumeration find the first 4 values of 𝑠

𝑛

and fill out the table at

the right.

(b)Making use of the pattern that you find in the table, provide a conjecture for

a recursive formula that might generate the 𝑠 𝑛

(that is, find a formula for 𝑠

𝑛

in

terms of some of the preceding 𝑠 𝑘

(c) Provide a careful argument for your conjecture. Note that you are not

asked to solve the recursion, but to make an argument, based on the property

of the sequences, that your recursive formula must hold. If you don’t want to

work with a general n , you can do what we often do in class and work with

particular numbers.

Solution

(a) By direct enumeration we fill in the table

(b) We are struck by the fact that we have the Fibonacci property—each term

being the sum of the two previous terms:

𝑛

𝑛− 1

𝑛− 2

or

7

6

5

(c) We make the argument for n = 7. Every good sequence of length 7 must

either begin with a 1 or with a 2. In the latter case the next member of the se-

quence must be a 1. So we have two kinds of good sequences of length 7: those

that start with 1 and those that start with 21.

In the first case the rest of the sequence can be any good sequence of length 6,

and in the second case the rest of the sequence can be any good sequence of

length 5. That accounts for all the good sequences of length 7 sequences so

that

7

6

5

n

𝑛

n s n

1 2

2 3

3 5

4 8

n 𝑡

𝑛

The next two problems seem to need some creative inspiration. Students who are

into problem-solving will love them.

  1. Below is displayed a left-justified copy of Pascal's triangle. Observe that the train

numbers are the sums of the diagonals (these are in 1-1 correspondence with the

left-hand 1's). For example, starting at the 1 in bottom left corner, we get:

[Put a ruler through the diagonal line of numbers and see that it passes through 34.]

Using combinatorial notation, this can be written:

9

Formulate this in general and find a "train-theoretic" proof.

1 1 2 3 5 8 13 21 34

1

1 1

1 2 1

1 3 3 1

1 4 6 4 1

1 5 10 10 5 1

1 6 15 20 15 6 1

1 7 21 35 35 21 7 1

1 8 28 56 70 56 28 8 1

Solution. Somehow there must be an elegant way to partition the 34 trains of length 8 into 5 sets, each

having the different numbers of elements found in the 5 summands. For example, the number in the third

set must be easily seen to be equal to the number of ways of choosing two objects from 6.

The argument is surprisingly simple. Condition on the number of 2-cars in the train. For example, to get

the fourth term, suppose there are three 2-cars. Then there will be two 1-cars and thus five cars in all. To

make the train we have to decide which of those five cars will be the three 2-cars, and to do that we have

to choose three slots out of five:

Here is one such choice.

2

1 2 2 1

There are 5

C

3

choices in all and that’s the fourth term in the sum. The terms in order correspond to having

zero 2-cars, one 2-car, two 2-cars, three 2-cars and four 2-cars.