Download Further Counting Problems

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Coin Flip Questions
Suppose you flip a coin five times and write down the sequence
of results, like “HHHHH” or “HTTHT.”
1
How many ways can you get exactly 1 head?
2
How many ways can you get exactly 2 heads?
3
How many ways can you get exactly 3 heads?
Coin Flip Questions
Suppose you flip a coin five times and write down the sequence
of results, like “HHHHH” or “HTTHT.”
1
How many ways can you get exactly 1 head? C(5, 1) = 5
2
How many ways can you get exactly 2 heads?
3
How many ways can you get exactly 3 heads?
Coin Flip Questions
Suppose you flip a coin five times and write down the sequence
of results, like “HHHHH” or “HTTHT.”
1
How many ways can you get exactly 1 head? C(5, 1) = 5
2
How many ways can you get exactly 2 heads? C(5, 2) = 10
3
How many ways can you get exactly 3 heads?
Coin Flip Questions
Suppose you flip a coin five times and write down the sequence
of results, like “HHHHH” or “HTTHT.”
1
How many ways can you get exactly 1 head? C(5, 1) = 5
2
How many ways can you get exactly 2 heads? C(5, 2) = 10
3
How many ways can you get exactly 3 heads? C(5, 3) = 10
Coin Flip Questions
Suppose you flip a coin five times and write down the sequence
of results, like “HHHHH” or “HTTHT.”
1
How many ways can you get exactly 1 head? C(5, 1) = 5
2
How many ways can you get exactly 2 heads? C(5, 2) = 10
3
How many ways can you get exactly 3 heads? C(5, 3) = 10
and a more complicated question. . .
4
How many ways are there to get at most 2 heads?
4
How many ways are there to get at most 2 heads?
Solution
“At most 2 heads” means “0 heads or 1 head or 2 heads.”
1 sequence has 0 heads.
5 sequences have 1 head.
10 sequences have 2 heads.
So the number of sequences with at most 2 heads is
1 + 5 + 10 = 16.
“At least” and “at most”
Remember,
at least ≥
at most ≤
For example, “at least 5” means 5 or 6 or 7 or 8 or . . .
For example, “at most 5” means 5 or 4 or 3 or 2 or 1 or 0.
The Additive Principle
The Additive Principle
If you can choose one of m options OR one of n options, the
total number of possibilities is
m + n.
Compare this with the Multiplicative Principle from before:
The Multiplicative Principle
If you have to choose one of m options AND one of n options,
the total number of possibilities is
mn.
The Additive Principle
The Additive Principle
If you can choose one of m options OR one of n options, the
total number of possibilities is
m + n.
Compare this with the Multiplicative Principle from before:
The Multiplicative Principle
If you have to choose one of m options AND one of n options,
the total number of possibilities is
mn.
An important table
or
and
+
×
Another question
You flip a coin 5 times and record the sequence of heads and
tails, just as before.
5
How many ways are there to get at least 2 heads?
The Complement Principle
Instead of counting the number of good ways, sometimes it’s
easier to count the number of bad ways and subtract.
The Complement Principle
If you are trying to count the number of ways to do something in
some “good” way,
(# good ways) = (total # ways) − (# bad ways)
A bigger question
You flip a coin 20 times and record the sequence of heads and
tails, just as before.
6
How many ways are there to get at least 2 heads?
A bigger question
You flip a coin 20 times and record the sequence of heads and
tails, just as before.
6
How many ways are there to get at least 2 heads?
Bad solution:
C(20, 2) + C(20, 3) + C(20, 4) + C(20, 5) + C(20, 6) + · · ·
A bigger question
You flip a coin 20 times and record the sequence of heads and
tails, just as before.
6
How many ways are there to get at least 2 heads?
Bad solution:
C(20, 2) + C(20, 3) + C(20, 4) + C(20, 5) + C(20, 6) + · · ·
Good solution:
If a “good” sequence has at least 2 heads, then a “bad”
sequence has less than 2 heads.
A bigger question
You flip a coin 20 times and record the sequence of heads and
tails, just as before.
6
How many ways are there to get at least 2 heads?
Bad solution:
C(20, 2) + C(20, 3) + C(20, 4) + C(20, 5) + C(20, 6) + · · ·
Good solution:
If a “good” sequence has at least 2 heads, then a “bad”
sequence has less than 2 heads.
Total # of sequences:
220 = 1,048,576
A bigger question
You flip a coin 20 times and record the sequence of heads and
tails, just as before.
6
How many ways are there to get at least 2 heads?
Bad solution:
C(20, 2) + C(20, 3) + C(20, 4) + C(20, 5) + C(20, 6) + · · ·
Good solution:
If a “good” sequence has at least 2 heads, then a “bad”
sequence has less than 2 heads.
Total # of sequences:
220 = 1,048,576
# of bad sequences: C(20, 0) + C(20, 1) =
21
A bigger question
You flip a coin 20 times and record the sequence of heads and
tails, just as before.
6
How many ways are there to get at least 2 heads?
Bad solution:
C(20, 2) + C(20, 3) + C(20, 4) + C(20, 5) + C(20, 6) + · · ·
Good solution:
If a “good” sequence has at least 2 heads, then a “bad”
sequence has less than 2 heads.
Total # of sequences:
220 = 1,048,576
− # of bad sequences: C(20, 0) + C(20, 1) =
21
# of good sequences:
1,048,555
Sock Questions
You have 5 blue socks and 3 white socks in your sock drawer at
random. You want to draw 3 socks from the drawer.
1
How many ways are there to do this?
2
How many ways can you do this and get 3 white socks?
3
How many ways can you do this and get 2 white socks and
1 blue sock?
4
How many ways can you do this and get 1 white sock and
2 blue socks?
5
How many ways can you do this and get 3 blue socks?
6
How many ways can you do this and get at least 2 white
socks?
Multiple Steps
Multi-Step Strategy
To do a complicated problem, try to break it up into a sequence
of smaller choices. Then we’ll use the multiplicative principle to
combine those smaller numbers.
A Short Summary
We’ve learned several principles for attacking these counting
problems.
Multi-Step Strategy: Break the problem up into a
sequence of smaller choices. (Once we figure out those
smaller numbers, we can multiply them together.)
Additive Principle: If you can do X or Y, count the
number of ways of each of them and add.
Change the words “at least” and “at most” into several
options with “or.” For example, “at most 3” means “0 or 1 or
2 or 3.”
Complement Principle: If counting the good ways seems
hard, maybe it would be easier to count the bad ways and
subtract.
Practice Problems
1
How many 5-card poker hands have exactly 3 spades?
2
How many 5-card poker hands have at least one spade?