Top Banner
The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530 (Fall 2012) Counting September 13, 2013 1 / 12
52

The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Jun 01, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

The basic rules of counting

Math 30530, Fall 2013

September 13, 2013

Math 30530 (Fall 2012) Counting September 13, 2013 1 / 12

Page 2: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Basic counting rule 1 — The sum ruleSum rule 1: if an experiment can proceed in one of two ways,with

I n1 outcomes for the first way, andI n2 outcomes for the second,

then the total number of outcomes for the experiment is

n1 + n2

Example: Movie or dinner? #(screens) + #(restaurants)

Sum rule 2: if an experiment can proceed in one of m ways, withI n1 outcomes for the first way,I n2 outcomes for the second, . . ., andI nm outcomes for the mth,

then the total number of outcomes for the experiment is

n1 + n2 + . . .+ nm

Math 30530 (Fall 2012) Counting September 13, 2013 2 / 12

Page 3: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Basic counting rule 1 — The sum ruleSum rule 1: if an experiment can proceed in one of two ways,with

I n1 outcomes for the first way, andI n2 outcomes for the second,

then the total number of outcomes for the experiment is

n1 + n2

Example: Movie or dinner? #(screens) + #(restaurants)

Sum rule 2: if an experiment can proceed in one of m ways, withI n1 outcomes for the first way,I n2 outcomes for the second, . . ., andI nm outcomes for the mth,

then the total number of outcomes for the experiment is

n1 + n2 + . . .+ nm

Math 30530 (Fall 2012) Counting September 13, 2013 2 / 12

Page 4: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Basic counting rule 1 — The sum ruleSum rule 1: if an experiment can proceed in one of two ways,with

I n1 outcomes for the first way, andI n2 outcomes for the second,

then the total number of outcomes for the experiment is

n1 + n2

Example: Movie or dinner? #(screens) + #(restaurants)

Sum rule 2: if an experiment can proceed in one of m ways, withI n1 outcomes for the first way,I n2 outcomes for the second, . . ., andI nm outcomes for the mth,

then the total number of outcomes for the experiment is

n1 + n2 + . . .+ nm

Math 30530 (Fall 2012) Counting September 13, 2013 2 / 12

Page 5: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Basic counting rule 2 — The product ruleProduct rule 1: if an experiment is performed in two stages, with

I n1 outcomes for the first stage, andI n2 outcomes for the second, REGARDLESS OF FIRST,

then the total number of outcomes for the experiment is

n1n2

Example: Movie and dinner? #(screens) × #(restaurants)

Product rule 2: if an experiment is performed in m stages, withI n1 outcomes for the first stage, andI n2 outcomes for the second, REGARDLESS OF FIRST, . . ., andI nm outcomes for the mth, REGARDLESS OF ALL PREVIOUS,

then the total number of outcomes for the experiment is

n1n2 . . . nm

Math 30530 (Fall 2012) Counting September 13, 2013 3 / 12

Page 6: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Basic counting rule 2 — The product ruleProduct rule 1: if an experiment is performed in two stages, with

I n1 outcomes for the first stage, andI n2 outcomes for the second, REGARDLESS OF FIRST,

then the total number of outcomes for the experiment is

n1n2

Example: Movie and dinner? #(screens) × #(restaurants)

Product rule 2: if an experiment is performed in m stages, withI n1 outcomes for the first stage, andI n2 outcomes for the second, REGARDLESS OF FIRST, . . ., andI nm outcomes for the mth, REGARDLESS OF ALL PREVIOUS,

then the total number of outcomes for the experiment is

n1n2 . . . nm

Math 30530 (Fall 2012) Counting September 13, 2013 3 / 12

Page 7: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Basic counting rule 2 — The product ruleProduct rule 1: if an experiment is performed in two stages, with

I n1 outcomes for the first stage, andI n2 outcomes for the second, REGARDLESS OF FIRST,

then the total number of outcomes for the experiment is

n1n2

Example: Movie and dinner? #(screens) × #(restaurants)

Product rule 2: if an experiment is performed in m stages, withI n1 outcomes for the first stage, andI n2 outcomes for the second, REGARDLESS OF FIRST, . . ., andI nm outcomes for the mth, REGARDLESS OF ALL PREVIOUS,

then the total number of outcomes for the experiment is

n1n2 . . . nm

Math 30530 (Fall 2012) Counting September 13, 2013 3 / 12

Page 8: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Arranging objects in a rowIn how many ways can n different, distinct objects be lined up in a row?

n options for first item, then n − 1 for second (regardless of what waschosen first), then n − 2 for second, etc. So by product rule, final countis

n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

Example: Finishing orders in race with 8 runners, no ties allowed?

8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320

Notation: “n factorial”

n! = n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

1! = 1, 2! = 2, 3! = 6, 4! = 24, . . .,

34! ≈ 29,500,000,000,000,000,000,000,000,000,000,000,000

Convention: 0! = 1

Math 30530 (Fall 2012) Counting September 13, 2013 4 / 12

Page 9: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Arranging objects in a rowIn how many ways can n different, distinct objects be lined up in a row?

n options for first item, then n − 1 for second (regardless of what waschosen first), then n − 2 for second, etc. So by product rule, final countis

n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

Example: Finishing orders in race with 8 runners, no ties allowed?

8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320

Notation: “n factorial”

n! = n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

1! = 1, 2! = 2, 3! = 6, 4! = 24, . . .,

34! ≈ 29,500,000,000,000,000,000,000,000,000,000,000,000

Convention: 0! = 1

Math 30530 (Fall 2012) Counting September 13, 2013 4 / 12

Page 10: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Arranging objects in a rowIn how many ways can n different, distinct objects be lined up in a row?

n options for first item, then n − 1 for second (regardless of what waschosen first), then n − 2 for second, etc. So by product rule, final countis

n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

Example: Finishing orders in race with 8 runners, no ties allowed?

8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320

Notation: “n factorial”

n! = n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

1! = 1, 2! = 2, 3! = 6, 4! = 24, . . .,

34! ≈ 29,500,000,000,000,000,000,000,000,000,000,000,000

Convention: 0! = 1

Math 30530 (Fall 2012) Counting September 13, 2013 4 / 12

Page 11: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Arranging objects in a rowIn how many ways can n different, distinct objects be lined up in a row?

n options for first item, then n − 1 for second (regardless of what waschosen first), then n − 2 for second, etc. So by product rule, final countis

n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

Example: Finishing orders in race with 8 runners, no ties allowed?

8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320

Notation: “n factorial”

n! = n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

1! = 1, 2! = 2, 3! = 6, 4! = 24, . . .,

34! ≈ 29,500,000,000,000,000,000,000,000,000,000,000,000

Convention: 0! = 1

Math 30530 (Fall 2012) Counting September 13, 2013 4 / 12

Page 12: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Arranging objects in a rowIn how many ways can n different, distinct objects be lined up in a row?

n options for first item, then n − 1 for second (regardless of what waschosen first), then n − 2 for second, etc. So by product rule, final countis

n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

Example: Finishing orders in race with 8 runners, no ties allowed?

8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320

Notation: “n factorial”

n! = n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

1! = 1, 2! = 2, 3! = 6, 4! = 24, . . .,

34! ≈ 29,500,000,000,000,000,000,000,000,000,000,000,000

Convention: 0! = 1

Math 30530 (Fall 2012) Counting September 13, 2013 4 / 12

Page 13: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Arranging objects in a rowIn how many ways can n different, distinct objects be lined up in a row?

n options for first item, then n − 1 for second (regardless of what waschosen first), then n − 2 for second, etc. So by product rule, final countis

n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

Example: Finishing orders in race with 8 runners, no ties allowed?

8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320

Notation: “n factorial”

n! = n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

1! = 1, 2! = 2, 3! = 6, 4! = 24, . . .,

34! ≈ 29,500,000,000,000,000,000,000,000,000,000,000,000

Convention: 0! = 1

Math 30530 (Fall 2012) Counting September 13, 2013 4 / 12

Page 14: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Arranging objects in a rowIn how many ways can n different, distinct objects be lined up in a row?

n options for first item, then n − 1 for second (regardless of what waschosen first), then n − 2 for second, etc. So by product rule, final countis

n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

Example: Finishing orders in race with 8 runners, no ties allowed?

8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320

Notation: “n factorial”

n! = n × (n − 1)× (n − 2)× . . .× 3 × 2 × 1

1! = 1, 2! = 2, 3! = 6, 4! = 24, . . .,

34! ≈ 29,500,000,000,000,000,000,000,000,000,000,000,000

Convention: 0! = 1Math 30530 (Fall 2012) Counting September 13, 2013 4 / 12

Page 15: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k things from n, WITHOUT REPLACEMENTIn how many ways can we pull out k distinct items from among ndifferent, distinct objects?

Order matters: (the k items have to be lined up in a row)

n(n − 1) . . . (n − (k − 1)) =n!

(n − k)!(sometimes nPk )

Example: 1st, 2nd and 3th in race with 8 runners? 8×7×6 = 336

Order doesn’t matter: (the k items are thrown together in a bag)

n(n − 1) . . . (n − (k − 1))k !

=

(nk

)(“n choose k ”, sometimes nCk )

Example: Top three in race with eight runners?(8

3

)Basic counting rule 3 — The overcount rule

If x is an initial count of some set of objects, and each object youwant to count appears y times in x , then the correct count is x/y

Math 30530 (Fall 2012) Counting September 13, 2013 5 / 12

Page 16: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k things from n, WITHOUT REPLACEMENTIn how many ways can we pull out k distinct items from among ndifferent, distinct objects?

Order matters: (the k items have to be lined up in a row)

n(n − 1) . . . (n − (k − 1)) =n!

(n − k)!(sometimes nPk )

Example: 1st, 2nd and 3th in race with 8 runners? 8×7×6 = 336

Order doesn’t matter: (the k items are thrown together in a bag)

n(n − 1) . . . (n − (k − 1))k !

=

(nk

)(“n choose k ”, sometimes nCk )

Example: Top three in race with eight runners?(8

3

)Basic counting rule 3 — The overcount rule

If x is an initial count of some set of objects, and each object youwant to count appears y times in x , then the correct count is x/y

Math 30530 (Fall 2012) Counting September 13, 2013 5 / 12

Page 17: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k things from n, WITHOUT REPLACEMENTIn how many ways can we pull out k distinct items from among ndifferent, distinct objects?

Order matters: (the k items have to be lined up in a row)

n(n − 1) . . . (n − (k − 1)) =n!

(n − k)!(sometimes nPk )

Example: 1st, 2nd and 3th in race with 8 runners? 8×7×6 = 336

Order doesn’t matter: (the k items are thrown together in a bag)

n(n − 1) . . . (n − (k − 1))k !

=

(nk

)(“n choose k ”, sometimes nCk )

Example: Top three in race with eight runners?(8

3

)Basic counting rule 3 — The overcount rule

If x is an initial count of some set of objects, and each object youwant to count appears y times in x , then the correct count is x/y

Math 30530 (Fall 2012) Counting September 13, 2013 5 / 12

Page 18: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k things from n, WITHOUT REPLACEMENTIn how many ways can we pull out k distinct items from among ndifferent, distinct objects?

Order matters: (the k items have to be lined up in a row)

n(n − 1) . . . (n − (k − 1)) =n!

(n − k)!(sometimes nPk )

Example: 1st, 2nd and 3th in race with 8 runners? 8×7×6 = 336

Order doesn’t matter: (the k items are thrown together in a bag)

n(n − 1) . . . (n − (k − 1))k !

=

(nk

)(“n choose k ”, sometimes nCk )

Example: Top three in race with eight runners?(8

3

)Basic counting rule 3 — The overcount rule

If x is an initial count of some set of objects, and each object youwant to count appears y times in x , then the correct count is x/y

Math 30530 (Fall 2012) Counting September 13, 2013 5 / 12

Page 19: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k things from n, WITHOUT REPLACEMENTIn how many ways can we pull out k distinct items from among ndifferent, distinct objects?

Order matters: (the k items have to be lined up in a row)

n(n − 1) . . . (n − (k − 1)) =n!

(n − k)!(sometimes nPk )

Example: 1st, 2nd and 3th in race with 8 runners? 8×7×6 = 336

Order doesn’t matter: (the k items are thrown together in a bag)

n(n − 1) . . . (n − (k − 1))k !

=

(nk

)(“n choose k ”, sometimes nCk )

Example: Top three in race with eight runners?(8

3

)

Basic counting rule 3 — The overcount ruleIf x is an initial count of some set of objects, and each object youwant to count appears y times in x , then the correct count is x/y

Math 30530 (Fall 2012) Counting September 13, 2013 5 / 12

Page 20: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k things from n, WITHOUT REPLACEMENTIn how many ways can we pull out k distinct items from among ndifferent, distinct objects?

Order matters: (the k items have to be lined up in a row)

n(n − 1) . . . (n − (k − 1)) =n!

(n − k)!(sometimes nPk )

Example: 1st, 2nd and 3th in race with 8 runners? 8×7×6 = 336

Order doesn’t matter: (the k items are thrown together in a bag)

n(n − 1) . . . (n − (k − 1))k !

=

(nk

)(“n choose k ”, sometimes nCk )

Example: Top three in race with eight runners?(8

3

)Basic counting rule 3 — The overcount rule

If x is an initial count of some set of objects, and each object youwant to count appears y times in x , then the correct count is x/y

Math 30530 (Fall 2012) Counting September 13, 2013 5 / 12

Page 21: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesHow many ways can 10 people form a committee of 6, with achair, a secretary a treasurer and 3 general members?

(106

)6.5.4 = 25,200

What if John and Pat will not serve together, and Pat will onlyserve if Ellen is the chair?

First consider committees with John (so without Pat), then thosewith Pat (so also with Ellen as chair, and without John), and thenthose without both John and Pat(

85

)6.5.4 +

(74

)5.4 +

(86

)6.5.4 = 10,780

How many anagrams of MISSISSPPI?

11!/(4!4!2!1!) = 34,650

Math 30530 (Fall 2012) Counting September 13, 2013 6 / 12

Page 22: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesHow many ways can 10 people form a committee of 6, with achair, a secretary a treasurer and 3 general members?(

106

)6.5.4 = 25,200

What if John and Pat will not serve together, and Pat will onlyserve if Ellen is the chair?

First consider committees with John (so without Pat), then thosewith Pat (so also with Ellen as chair, and without John), and thenthose without both John and Pat(

85

)6.5.4 +

(74

)5.4 +

(86

)6.5.4 = 10,780

How many anagrams of MISSISSPPI?

11!/(4!4!2!1!) = 34,650

Math 30530 (Fall 2012) Counting September 13, 2013 6 / 12

Page 23: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesHow many ways can 10 people form a committee of 6, with achair, a secretary a treasurer and 3 general members?(

106

)6.5.4 = 25,200

What if John and Pat will not serve together, and Pat will onlyserve if Ellen is the chair?

First consider committees with John (so without Pat), then thosewith Pat (so also with Ellen as chair, and without John), and thenthose without both John and Pat(

85

)6.5.4 +

(74

)5.4 +

(86

)6.5.4 = 10,780

How many anagrams of MISSISSPPI?

11!/(4!4!2!1!) = 34,650

Math 30530 (Fall 2012) Counting September 13, 2013 6 / 12

Page 24: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesHow many ways can 10 people form a committee of 6, with achair, a secretary a treasurer and 3 general members?(

106

)6.5.4 = 25,200

What if John and Pat will not serve together, and Pat will onlyserve if Ellen is the chair?

First consider committees with John (so without Pat), then thosewith Pat (so also with Ellen as chair, and without John), and thenthose without both John and Pat(

85

)6.5.4 +

(74

)5.4 +

(86

)6.5.4 = 10,780

How many anagrams of MISSISSPPI?

11!/(4!4!2!1!) = 34,650

Math 30530 (Fall 2012) Counting September 13, 2013 6 / 12

Page 25: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesHow many ways can 10 people form a committee of 6, with achair, a secretary a treasurer and 3 general members?(

106

)6.5.4 = 25,200

What if John and Pat will not serve together, and Pat will onlyserve if Ellen is the chair?

First consider committees with John (so without Pat), then thosewith Pat (so also with Ellen as chair, and without John), and thenthose without both John and Pat(

85

)6.5.4 +

(74

)5.4 +

(86

)6.5.4 = 10,780

How many anagrams of MISSISSPPI?

11!/(4!4!2!1!) = 34,650

Math 30530 (Fall 2012) Counting September 13, 2013 6 / 12

Page 26: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesHow many ways can 10 people form a committee of 6, with achair, a secretary a treasurer and 3 general members?(

106

)6.5.4 = 25,200

What if John and Pat will not serve together, and Pat will onlyserve if Ellen is the chair?

First consider committees with John (so without Pat), then thosewith Pat (so also with Ellen as chair, and without John), and thenthose without both John and Pat(

85

)6.5.4 +

(74

)5.4 +

(86

)6.5.4 = 10,780

How many anagrams of MISSISSPPI?

11!/(4!4!2!1!) = 34,650

Math 30530 (Fall 2012) Counting September 13, 2013 6 / 12

Page 27: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some properties of binomial coefficients(nn

)= 1 (justifies 0! = 1) and

(n0

)= 1

(nk

)=( n

n−k

)(x + y)n =

∑nk=0

(nk

)xkyn−k (Binomial Theorem)

Special case:∑n

k=0(n

k

)= 2n

If I repeat the same trial n times, independently, and each time Ihave probability p of success, then the probability that I haveexactly k successes is

(nk

)pk (1 − p)n−k

Many identities, e.g.

I Committee/Chair: n(n−1

k−1

)= k

(nk

)I Pascal:

(nk

)=(n−1

k−1

)+(n−1

k

)I Homework:

∑nk=0

(nk

)2=(2n

n

)

Math 30530 (Fall 2012) Counting September 13, 2013 7 / 12

Page 28: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some properties of binomial coefficients(nn

)= 1 (justifies 0! = 1) and

(n0

)= 1(n

k

)=( n

n−k

)

(x + y)n =∑n

k=0(n

k

)xkyn−k (Binomial Theorem)

Special case:∑n

k=0(n

k

)= 2n

If I repeat the same trial n times, independently, and each time Ihave probability p of success, then the probability that I haveexactly k successes is

(nk

)pk (1 − p)n−k

Many identities, e.g.

I Committee/Chair: n(n−1

k−1

)= k

(nk

)I Pascal:

(nk

)=(n−1

k−1

)+(n−1

k

)I Homework:

∑nk=0

(nk

)2=(2n

n

)

Math 30530 (Fall 2012) Counting September 13, 2013 7 / 12

Page 29: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some properties of binomial coefficients(nn

)= 1 (justifies 0! = 1) and

(n0

)= 1(n

k

)=( n

n−k

)(x + y)n =

∑nk=0

(nk

)xkyn−k (Binomial Theorem)

Special case:∑n

k=0(n

k

)= 2n

If I repeat the same trial n times, independently, and each time Ihave probability p of success, then the probability that I haveexactly k successes is

(nk

)pk (1 − p)n−k

Many identities, e.g.

I Committee/Chair: n(n−1

k−1

)= k

(nk

)I Pascal:

(nk

)=(n−1

k−1

)+(n−1

k

)I Homework:

∑nk=0

(nk

)2=(2n

n

)

Math 30530 (Fall 2012) Counting September 13, 2013 7 / 12

Page 30: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some properties of binomial coefficients(nn

)= 1 (justifies 0! = 1) and

(n0

)= 1(n

k

)=( n

n−k

)(x + y)n =

∑nk=0

(nk

)xkyn−k (Binomial Theorem)

Special case:∑n

k=0(n

k

)= 2n

If I repeat the same trial n times, independently, and each time Ihave probability p of success, then the probability that I haveexactly k successes is

(nk

)pk (1 − p)n−k

Many identities, e.g.

I Committee/Chair: n(n−1

k−1

)= k

(nk

)I Pascal:

(nk

)=(n−1

k−1

)+(n−1

k

)I Homework:

∑nk=0

(nk

)2=(2n

n

)

Math 30530 (Fall 2012) Counting September 13, 2013 7 / 12

Page 31: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some properties of binomial coefficients(nn

)= 1 (justifies 0! = 1) and

(n0

)= 1(n

k

)=( n

n−k

)(x + y)n =

∑nk=0

(nk

)xkyn−k (Binomial Theorem)

Special case:∑n

k=0(n

k

)= 2n

If I repeat the same trial n times, independently, and each time Ihave probability p of success, then the probability that I haveexactly k successes is

(nk

)pk (1 − p)n−k

Many identities, e.g.

I Committee/Chair: n(n−1

k−1

)= k

(nk

)I Pascal:

(nk

)=(n−1

k−1

)+(n−1

k

)I Homework:

∑nk=0

(nk

)2=(2n

n

)

Math 30530 (Fall 2012) Counting September 13, 2013 7 / 12

Page 32: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some properties of binomial coefficients(nn

)= 1 (justifies 0! = 1) and

(n0

)= 1(n

k

)=( n

n−k

)(x + y)n =

∑nk=0

(nk

)xkyn−k (Binomial Theorem)

Special case:∑n

k=0(n

k

)= 2n

If I repeat the same trial n times, independently, and each time Ihave probability p of success, then the probability that I haveexactly k successes is

(nk

)pk (1 − p)n−k

Many identities, e.g.

I Committee/Chair: n(n−1

k−1

)= k

(nk

)

I Pascal:(n

k

)=(n−1

k−1

)+(n−1

k

)I Homework:

∑nk=0

(nk

)2=(2n

n

)

Math 30530 (Fall 2012) Counting September 13, 2013 7 / 12

Page 33: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some properties of binomial coefficients(nn

)= 1 (justifies 0! = 1) and

(n0

)= 1(n

k

)=( n

n−k

)(x + y)n =

∑nk=0

(nk

)xkyn−k (Binomial Theorem)

Special case:∑n

k=0(n

k

)= 2n

If I repeat the same trial n times, independently, and each time Ihave probability p of success, then the probability that I haveexactly k successes is

(nk

)pk (1 − p)n−k

Many identities, e.g.

I Committee/Chair: n(n−1

k−1

)= k

(nk

)I Pascal:

(nk

)=(n−1

k−1

)+(n−1

k

)

I Homework:∑n

k=0

(nk

)2=(2n

n

)

Math 30530 (Fall 2012) Counting September 13, 2013 7 / 12

Page 34: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some properties of binomial coefficients(nn

)= 1 (justifies 0! = 1) and

(n0

)= 1(n

k

)=( n

n−k

)(x + y)n =

∑nk=0

(nk

)xkyn−k (Binomial Theorem)

Special case:∑n

k=0(n

k

)= 2n

If I repeat the same trial n times, independently, and each time Ihave probability p of success, then the probability that I haveexactly k successes is

(nk

)pk (1 − p)n−k

Many identities, e.g.

I Committee/Chair: n(n−1

k−1

)= k

(nk

)I Pascal:

(nk

)=(n−1

k−1

)+(n−1

k

)I Homework:

∑nk=0

(nk

)2=(2n

n

)Math 30530 (Fall 2012) Counting September 13, 2013 7 / 12

Page 35: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Splitting a set up into classes of given sizesIn how many ways can we split (partition) a set of size n into r parts,with the first part having size n1, the second size n2, . . ., the r th size nr(and n = n1 + . . .+ nr )?

r = 2: same as choosing subset of size n1 (what’s left formssecond part of size n2), so

( nn1

)General r : Two expressions( n

n1

)(n−n1n2

). . .(n−n1−...−nr−1

nr

)n!

n1!n2!...nr !

}=

(n

n1,n2, . . . ,nr

)Same as number of anagrams of n-letter word with n1 repeats offirst letter, n2 of second, etc.!

Example: How many ways to break the class (of 33) into 11 groups of3? (

333,3, . . . ,3

)/11! =

33!11!3!11 ≈ 5.99 × 1020

Math 30530 (Fall 2012) Counting September 13, 2013 8 / 12

Page 36: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Splitting a set up into classes of given sizesIn how many ways can we split (partition) a set of size n into r parts,with the first part having size n1, the second size n2, . . ., the r th size nr(and n = n1 + . . .+ nr )?

r = 2: same as choosing subset of size n1 (what’s left formssecond part of size n2), so

( nn1

)

General r : Two expressions( nn1

)(n−n1n2

). . .(n−n1−...−nr−1

nr

)n!

n1!n2!...nr !

}=

(n

n1,n2, . . . ,nr

)Same as number of anagrams of n-letter word with n1 repeats offirst letter, n2 of second, etc.!

Example: How many ways to break the class (of 33) into 11 groups of3? (

333,3, . . . ,3

)/11! =

33!11!3!11 ≈ 5.99 × 1020

Math 30530 (Fall 2012) Counting September 13, 2013 8 / 12

Page 37: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Splitting a set up into classes of given sizesIn how many ways can we split (partition) a set of size n into r parts,with the first part having size n1, the second size n2, . . ., the r th size nr(and n = n1 + . . .+ nr )?

r = 2: same as choosing subset of size n1 (what’s left formssecond part of size n2), so

( nn1

)General r : Two expressions( n

n1

)(n−n1n2

). . .(n−n1−...−nr−1

nr

)n!

n1!n2!...nr !

}=

(n

n1,n2, . . . ,nr

)Same as number of anagrams of n-letter word with n1 repeats offirst letter, n2 of second, etc.!

Example: How many ways to break the class (of 33) into 11 groups of3? (

333,3, . . . ,3

)/11! =

33!11!3!11 ≈ 5.99 × 1020

Math 30530 (Fall 2012) Counting September 13, 2013 8 / 12

Page 38: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Splitting a set up into classes of given sizesIn how many ways can we split (partition) a set of size n into r parts,with the first part having size n1, the second size n2, . . ., the r th size nr(and n = n1 + . . .+ nr )?

r = 2: same as choosing subset of size n1 (what’s left formssecond part of size n2), so

( nn1

)General r : Two expressions( n

n1

)(n−n1n2

). . .(n−n1−...−nr−1

nr

)n!

n1!n2!...nr !

}=

(n

n1,n2, . . . ,nr

)Same as number of anagrams of n-letter word with n1 repeats offirst letter, n2 of second, etc.!

Example: How many ways to break the class (of 33) into 11 groups of3?

(33

3,3, . . . ,3

)/11! =

33!11!3!11 ≈ 5.99 × 1020

Math 30530 (Fall 2012) Counting September 13, 2013 8 / 12

Page 39: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Splitting a set up into classes of given sizesIn how many ways can we split (partition) a set of size n into r parts,with the first part having size n1, the second size n2, . . ., the r th size nr(and n = n1 + . . .+ nr )?

r = 2: same as choosing subset of size n1 (what’s left formssecond part of size n2), so

( nn1

)General r : Two expressions( n

n1

)(n−n1n2

). . .(n−n1−...−nr−1

nr

)n!

n1!n2!...nr !

}=

(n

n1,n2, . . . ,nr

)Same as number of anagrams of n-letter word with n1 repeats offirst letter, n2 of second, etc.!

Example: How many ways to break the class (of 33) into 11 groups of3? (

333,3, . . . ,3

)/11! =

33!11!3!11 ≈ 5.99 × 1020

Math 30530 (Fall 2012) Counting September 13, 2013 8 / 12

Page 40: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k items from n, WITH REPLACEMENTIn how many ways can we pull out k items from among n different,distinct objects, if each time we pull out an item, we note it and put itback?

Order matters: (we produce a list (first item, second, . . ., last))

nk

Example: 8 digit numbers with prime digits? 48

Example: In a group of 23 people, how likely is it that they all havetheir birthdays on a different date?

ways of choosing 23 different dates, in orderways of choosing 23 dates, in order

= 365×364×...×343365×365×...×365

≈ .4927 < 50%

Math 30530 (Fall 2012) Counting September 13, 2013 9 / 12

Page 41: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k items from n, WITH REPLACEMENTIn how many ways can we pull out k items from among n different,distinct objects, if each time we pull out an item, we note it and put itback?

Order matters: (we produce a list (first item, second, . . ., last))

nk

Example: 8 digit numbers with prime digits? 48

Example: In a group of 23 people, how likely is it that they all havetheir birthdays on a different date?

ways of choosing 23 different dates, in orderways of choosing 23 dates, in order

= 365×364×...×343365×365×...×365

≈ .4927 < 50%

Math 30530 (Fall 2012) Counting September 13, 2013 9 / 12

Page 42: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k items from n, WITH REPLACEMENTIn how many ways can we pull out k items from among n different,distinct objects, if each time we pull out an item, we note it and put itback?

Order matters: (we produce a list (first item, second, . . ., last))

nk

Example: 8 digit numbers with prime digits? 48

Example: In a group of 23 people, how likely is it that they all havetheir birthdays on a different date?

ways of choosing 23 different dates, in orderways of choosing 23 dates, in order

= 365×364×...×343365×365×...×365

≈ .4927 < 50%

Math 30530 (Fall 2012) Counting September 13, 2013 9 / 12

Page 43: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k items from n, WITH REPLACEMENTIn how many ways can we pull out k items from among n different,distinct objects, if each time we pull out an item, we note it and put itback?

Order matters: (we produce a list (first item, second, . . ., last))

nk

Example: 8 digit numbers with prime digits? 48

Example: In a group of 23 people, how likely is it that they all havetheir birthdays on a different date?

ways of choosing 23 different dates, in orderways of choosing 23 dates, in order

= 365×364×...×343365×365×...×365

≈ .4927 < 50%

Math 30530 (Fall 2012) Counting September 13, 2013 9 / 12

Page 44: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k items from n, WITH REPLACEMENTIn how many ways can we pull out k items from among n different,distinct objects, if each time we pull out an item, we note it and put itback?

Order matters: (we produce a list (first item, second, . . ., last))

nk

Example: 8 digit numbers with prime digits? 48

Example: In a group of 23 people, how likely is it that they all havetheir birthdays on a different date?

ways of choosing 23 different dates, in orderways of choosing 23 dates, in order

= 365×364×...×343365×365×...×365

≈ .4927 < 50%

Math 30530 (Fall 2012) Counting September 13, 2013 9 / 12

Page 45: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k items from n, WITH REPLACEMENTIn how many ways can we pull out k distinct items from among ndifferent, distinct objects?

Order doesn’t matter: (we just note how many of the first item,how many of the second, etc.)(

n + k − 1k

)Example: Select 8 single-digit primes, no particular order?(

118

)= 165

Math 30530 (Fall 2012) Counting September 13, 2013 10 / 12

Page 46: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k items from n, WITH REPLACEMENTIn how many ways can we pull out k distinct items from among ndifferent, distinct objects?

Order doesn’t matter: (we just note how many of the first item,how many of the second, etc.)(

n + k − 1k

)

Example: Select 8 single-digit primes, no particular order?(118

)= 165

Math 30530 (Fall 2012) Counting September 13, 2013 10 / 12

Page 47: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Selecting k items from n, WITH REPLACEMENTIn how many ways can we pull out k distinct items from among ndifferent, distinct objects?

Order doesn’t matter: (we just note how many of the first item,how many of the second, etc.)(

n + k − 1k

)Example: Select 8 single-digit primes, no particular order?(

118

)= 165

Math 30530 (Fall 2012) Counting September 13, 2013 10 / 12

Page 48: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesI have 36 identical prizes to distribute to the class (53 people). All Icare about is how many prizes each student gets. How manypossible ways to distribute are there?

Here n = 53 (I’m choosing from pool of students), r = 36 (I’mchoosing students to give prizes to), and I’m choosing withreplacement, order not mattering, so solution is(

53 + 36 − 136

)=

(8836

)≈ 6 × 1034

What’s the probability that Zeke doesn’t get a prize, assuming allways of distribution equally likely?(

8736

)/

(8836

)≈ .59

Math 30530 (Fall 2012) Counting September 13, 2013 11 / 12

Page 49: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesI have 36 identical prizes to distribute to the class (53 people). All Icare about is how many prizes each student gets. How manypossible ways to distribute are there?

Here n = 53 (I’m choosing from pool of students), r = 36 (I’mchoosing students to give prizes to), and I’m choosing withreplacement, order not mattering, so solution is(

53 + 36 − 136

)=

(8836

)≈ 6 × 1034

What’s the probability that Zeke doesn’t get a prize, assuming allways of distribution equally likely?(

8736

)/

(8836

)≈ .59

Math 30530 (Fall 2012) Counting September 13, 2013 11 / 12

Page 50: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesI have 36 identical prizes to distribute to the class (53 people). All Icare about is how many prizes each student gets. How manypossible ways to distribute are there?

Here n = 53 (I’m choosing from pool of students), r = 36 (I’mchoosing students to give prizes to), and I’m choosing withreplacement, order not mattering, so solution is(

53 + 36 − 136

)=

(8836

)≈ 6 × 1034

What’s the probability that Zeke doesn’t get a prize, assuming allways of distribution equally likely?

(8736

)/

(8836

)≈ .59

Math 30530 (Fall 2012) Counting September 13, 2013 11 / 12

Page 51: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Some examplesI have 36 identical prizes to distribute to the class (53 people). All Icare about is how many prizes each student gets. How manypossible ways to distribute are there?

Here n = 53 (I’m choosing from pool of students), r = 36 (I’mchoosing students to give prizes to), and I’m choosing withreplacement, order not mattering, so solution is(

53 + 36 − 136

)=

(8836

)≈ 6 × 1034

What’s the probability that Zeke doesn’t get a prize, assuming allways of distribution equally likely?(

8736

)/

(8836

)≈ .59

Math 30530 (Fall 2012) Counting September 13, 2013 11 / 12

Page 52: The basic rules of counting - University of Notre Damedgalvin1/30530/30530_F13/Counting.pdf · The basic rules of counting Math 30530, Fall 2013 September 13, 2013 Math 30530(Fall

Summary of counting problemsSum rule: A OR B? AddProduct rule: A THEN B? MultiplyOvercount rule: Each item counted too many times? DivideArranging n items in order: n!Selecting k items from n, WITHOUT REPLACEMENT

ORDER MATTERS: n!(n−k)!

ORDER DOESN’T MATTER:(n

k

)= n!

k!(n−k)!

Selecting k items from n, WITH REPLACEMENT

ORDER MATTERS: nk

ORDER DOESN’T MATTER:(n+k−1

k

)Partitioning n into classes of size n1, n2, . . ., nr , OR arranging n itemsin a row when there are n1 of first type, n2 of second, etc., and we can’ttell the difference within types:

( nn1,n2,...,nr

)= n!

n1!n2!...nr !

Math 30530 (Fall 2012) Counting September 13, 2013 12 / 12