pascal’s triangle - umbccampbell/mepp/pascal-triangle/pascal... · 2014. 5. 6. · the numbers in...

33
5/6/2014 1 Pascal’s Triangle: Flipping Coins & Binomial Coefficients Robert Campbell

Upload: others

Post on 16-Oct-2020

16 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 1

Pascal’s Triangle: Flipping Coins & Binomial Coefficients

Robert Campbell

Page 2: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 2

An Experiment – Coin Flips

Break into teams

Flip a coin 6 times

Count the number of heads

Do this 64 times per team

Graph the results

How many times did each number of heads occur?

Page 3: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 3

Graphing Coin Flips

1

6

15

20

15

6

1

1 2 3 4 5 6 0

Page 4: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 4

Ways to Get 1 or 2 Heads

Flip 4 coins:

All Heads can only be gotten one way:

3 Heads (and 1 Tail) can be gotten four ways:

H H H H

T T T T H H H H H H H H H H H H

2 Heads (and 2 Tails) can be gotten six ways:

T T H H T T H H T T H H

T T H H T T H H T T H H

Page 5: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 5

Coins & Counting I

Given Five pennies

Four Heads and one Tails

How many ways can I arrange them in a line?

Page 6: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 6

Coins & Counting II

Given Five pennies

Three heads and two tails

How many ways can I arrange them in a line?

Page 7: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 7

Coins & Counting III 2 heads and 3 tails

(Same as 3 heads and 2 tails)

1 head and 4 tails

(Same as 4 heads and 1 tail)

No heads and 5 tails

Only one way

(Same as 5 heads and no tails)

(5P: 0H, 5T) = 1

(5P: 1H, 4T) = 5

(5P: 2H, 3T) = 10

(5P: 3H, 2T) = 10

(5P: 4H, 1T) = 5

(5P: 5H, 0T) = 1

Page 8: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 8

Coins & Counting IV Six pennies: 4 heads, 2 tails

51

5

102

5

1

5

2

5

2

6 So

Page 9: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 9

Counting Coin Flips

H T

H H H T T

T H

T

H H H H H T H

H T T

T T

H T

H

H

T H H T

T

T

T T

H H H H H H H T

H H H

H H H

H H H

T

T

T

T T

T T

T T

H H

H H

H H

H H

H H

H H

T T

T T

T T

H

H

H

T T T

T T T

T T T

T T T H

T T T T

Page 10: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 10

The Arithmetic Triangle

1

1 1

1 1+1=2 1

1 1+2=3 1 1+2=3

1 1+3=4 3 1 1+3=4 3+3=6

1 1 1+4=5 4+6=10 4+6=10 1+4=5

Page 11: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 11

The Arithmetic Triangle

The Rules: Make a triangle out of numbered boxes

1 box in first row, 2 boxes in second row, …

Leftmost and rightmost boxes in each row are 1

Other boxes - Add the two boxes above them

1

1 1

1 1 2

1 1 3 3

4 4 1 1 6

1 5 10 10 5 1

1 6 15 6 15 20 1

Page 12: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 12

Triangle’s History

Chinese: Jia Xian [1010-1070]

Yang Hui [1238-1298]

Indian Pingala [200 BC?] - Meru-prastara (staircase to Mt Meru)

Arabic Al-Karaji [953-1029]

Omar Khayyam [1048-1113]

European Tartaglia [1499-1557, Italy]

Pascal [1623-1662, France]

Page 13: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 13

Properties I – The Sums

1st Row - 1

2nd Row – 1+1 = 2

3rd Row – 1+2+1 = 4

4th Row – 1+3+3+1 = 8

5th Row – 1+4+6+4+1 = 16

6th Row – 1+5+10+10+5+1 = 32

Next row sum is twice – as we

add each box twice

Page 14: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 14

Properties II – The Diagonals

1st Diag – All 1’s

2nd Diag – The integers

3rd Diag – Triangular numbers

4th Diag – Tetrahedral numbers

Page 15: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 15

Coloring the Triangle

Color the odd squares black, the even squares white

1

1 1

1 1 2

1 1 3 3

4 4 1 1 6

1 5 10 10 5 1

1 6 15 6 15 20 1

Do you need to actually add?

Even + Even = Even

Odd + Even = Odd

Odd + Odd = Even

Color the triangle mod 3

If 3 divides the number - Black

If 3 divides the number plus 1 – Red

If 3 divides the number plus 2 – White

Why are there triangles in the pattern?

Page 16: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 16

Singmaster’s Conjecture Note: Any number n not 1 not found

below nth row

So, n only occurs finitely often, say #n

Conj: For some N, #n<N for all n

Examples:

2 occurs once (all others occur more often)

3, 4, 5 occur twice

6 occurs three times

Occurring 6 times: 120, 210, 1540, …

Occurring 8 times: 3003, …

Does any number occur 5, 7 or more

than 8 times?

Page 17: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 17

References & Resources

Pascal’s Arithmetical Triangle, A. W. F. Edwards, 2002

Pascal’s Triangle, V. A. Uspenskii, 1974

Slides, Coin Flips & Coloring the Triangle http://userpages.umbc.edu/~rcampbel/MEPP/Pascal-Triangle/

Math Forum (class materials) http://mathforum.org/workshops/usi/pascal/

Wikipedia http://en.wikipedia.org/wiki/Pascal’s_triangle

Page 18: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 18

Backup Slides

Page 19: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 19

Chevalier de Méré’s Bets

Bet: in four dice rolls it will come up 6 at least once.

Bet: in 24 rolls of two dice we will see double-6 at

least once.

So, my friend Monsieur Pascal, why do I usually win

the first bet but lose the second?

A friend and I were playing, having agreed that the

first to win 10 rounds won the pot. We had to quit

early when I had won 7 rounds and he had won 5.

How should we split the pot?

Page 20: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 20

Factorials I

How many ways can I line up 4 people?

Choose one person to stand on the left

4 possible choices

x4 x3 x2 x1 = 24

Choose one more to stand next to him

3 people to choose from

Choose one more to stand next to him

2 people left to choose from

Choose the last one

No real choice - only one is left

(4)(3)(2)(1) = 24 Possible ways

Page 21: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 21

Factorials II

(4)(3)(2)(1) is called “Four Factorial”

and is written 4!

Two factorial is 2! = (2)(1) = 2

Three factorial is 3! = (3)(2)(1) = 6

Four factorial is 4! = (4)(3)(2)(1) = 24

Ten factorial is 10! = (10)(9)(8)(7)(6)(5)(4)(3)(2)(1) =

3628800

Page 22: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 22

Binomial Coefficients I

The numbers in Pascal’s Triangle are called:

Binomial Coefficients

Choose numbers

The number of ways of lining up 5 pennies, 3 heads, 2

tails, is called (5 choose 2) or (5 choose 3)

(Lining up 5 pennies and “choosing” 2 of them to be heads)

(5 choose 0) = 1

(5 choose 1) = 5

(5 choose 2) = 10

(5 choose 3) = 10

(5 choose 4) = 5

(5 choose 5) = 1

Page 23: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 23

Binomial Coefficients II

To compute the “Choose Number” (6 choose 3): Fill in the first 6 rows of Pascal’s Triangle

OR - compute (6 choose 3) directly

How many ways can I choose 3 out of 6 possibilities? Choose one (6 possible choices)

Choose another (5 possible choices)

Choose a third (4 possible choices)

So … (6)(5)(4) = 120 possible choices

But … I don’t care which one I chose first - what order I chose

So … How may ways can I rearrange the 3 I did choose?

There are (6)(5)(4)/3! = 20 ways to choose 3 out of 6

Page 24: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 24

Binomial Coefficients III

(6 choose 3) = (6)(5)(4)/3! = (6)(5)(4)(3)(2)(1)/((3)(2)(1)3!) = 6!/(3! 3!)

Compute: (6)(5)(4)/((3)(2)(1)) = (6/3)(5)(4/2) = 20

(10 choose 3) = (10)(9)(8)/3! = (10)(9)(8)(7)(6)(5)(4)(3)(2)(1)/(7)(6)(5)(4)(3)(2)(1) 3!)

= 10!/(7! 3!)

Compute: (10)(9)(8)/((3)(2)(1))

= (10)(9/3)(8/2) = (10)(3)(4) = 120

(12 choose 4) = (12)(11)(10)(9)/4! = 12!/(8! 4!) Compute: (12)(11)(10)(9)/((4)(3)(2)(1))

= (12/4)(11)(10/2)(9/3) = (3)(11)(5)(3) = 495

Page 25: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 25

More Graphing Coin Flips

Bell Curve?

Central Limit Theorem

Try 220 = 1048576 trials of 20

flips each

1

6

15

20

15

6

1

1 2 3 4 5 6 0

Page 26: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 26

Another Experiment - Coloring

Demonstrate by coloring 8-triangle even-odd

Demonstrate by coloring 8-triangle mod 3

Try mods 3-10

Only those 0 mod N

Separate color for each mod

Page 27: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 27

Multinomials I

How many ways can I place 4 poker chips in a line if 2

are red, 1 is white and 1 is blue (and I don’t care

which red chip is which)?

How many ways can I arrange (4Chips; 4red, 0white, 0blue)?

How many ways can I arrange (4Chips; 3red, 1white, 0blue)?

How many ways can I arrange (4Chips; 2red, 2white, 0blue)?

How many ways can I arrange (4Chips; 2red, 1white, 1blue)?

How many ways can I arrange 6 chips if 3 are red, 2

white and 1 blue?

Page 28: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 28

Multinomials II

The number of ways to arrange objects of more than

two types are multinomial coefficients.

There are (6; 3, 2, 1) = 6!/(3! 2! 1!) = 60 ways to

arrange 6 chips if 3 are red, 2 white and 1 blue.

The multinomials fit together in a pyramid, just like the

binomials fit together in a triangle.

Page 29: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 29

Combinations

Flip a coin N times

How many ways are there to get H heads? !!

!

HHN

N

H

N

1

11234

1234

!0!04

!4

0

4

4

1123

1234

!1!14

!4

1

4

6

4

24

1212

1234

!2!24

!4

2

4

Flip a coin 4 times

There is 1 way to get no heads

There are 4 ways to get 1 head

There are 6 ways to get 2 heads

Flip a coin 8 times

There are 56 ways to get 3 heads

56

720

40320

12312345

12345678

!3!38

!8

3

8

Page 30: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 30

Polynomials & Binomial Coeffs

(x + y) is called a binomial because it has two terms

(x + y)2 = x2 + 2xy + y2.

(x + y)3 = x3 + 3x2y + 3xy2 + y3.

(x + y)4 = x4 + 4x3y + 6x2y2 + 4xy3 + y4.

(x + y)5 = x5 + 5x4y + 10x3y2 + 10x2y3 + 5xy4 + y5.

The binomial coefficients are called that because they

are coefficients of powers of binomials.

Page 31: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 31

Early History of the Triangle

Jia Xian [11th C, China]

Bhaskara [12th C, India]

Omar Khayyam [12th C, Persia]

Zhu Shijie [14th C, China]

Levi ben Gershon [14th C, France]

Tartaglia [16th C, Italy]

Pascal [17th C, France]

many others …

Page 32: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 32

An Exercise – Fill the Triangle

Given a blank form with rows through 7

(optional – could easily do on any blank sheet of paper)

Fill in the entries of the triangle

Save for later use, looking for patterns

Page 33: Pascal’s Triangle - UMBCcampbell/MEPP/Pascal-Triangle/Pascal... · 2014. 5. 6. · The numbers in Pascal’s Triangle are called: Binomial Coefficients Choose numbers The number

5/6/2014 33

The Arithmetic Triangle

1

1 1

1 1+1=2 1

1 1+2=3 1 1+2=3

1 1+3=4 3 1 1+3=4 3+3=6

1 1 1+4=5 4+6=10 4+6=10 1+4=5