Combinations & Counting II

advertisement
Combinations & Counting II
Samuel Marateck © 2009
1
How many 4-letter words can we form from
the letters ABCD w/o replacements?
2
How many 4-letter words can we form from
the letters ABCD?
This is an example of an ordered list without
replacements.
3
How many 4-letter words can we form from
the letters ABCD w/o replacements?
4*3*2*1 or 4! or 24
4
How many 2-letter words can we form from
the letters ABCD w/o replacements? This is
another example of an ordered list
5
How many 2-letter words can we form from
the letters ABCD w/o replacements? This is
another example of an ordered list
4*3 or 12
6
How many 3-letter words can we form from
the letters AAB w/o replacements? This is
yet another ordered list; but there are now
repetitions of one of the letters!
7
How many 3-letter words can we form from
the letters AAB w/o replacements?
Let’s distinguish between the A’s by giving
them subscripts, A1 , A2 .
8
Let’s distinguish between the A’s by giving
them subscripts, A1 , A2 . So the # of words
that can be formed is 3*2*1 or 6. They are:
B A1 A2
B A2 A1
A2 B A1
A1 B A2
A2 B A1
A2 A1 B
A1 A2 B
9
If we don’t distinguish between the A’s, the
words that can be formed are:
B AA
ABA
A AB
We get the number of different words by
dividing by the # of ways the A’s can be
arranged or 2!
10
How many 3-letter words can we form from
the letters AAB w/o replacements?
It’s 3!/2! or 3.
11
How many distinct 11-letter words (ordered
lists) can we form from the letters in
mississippi w/o replacements?
12
How many distinct 11-letter words can we
form from the letters in mississippi w/o
replacements?
There are 4 s’s, 4 i’s, 2 p’s and 1 m. The #
of ways we can form words with the given
repetitions of these letters is 11! How do we
account for the repetitions?
13
There are 4 s’s, 4 i’s, 2 p’s and 1 m. The #
of ways we can form words with repetitions
is 11! How do we account for the repetitions.
We divide by 4! * 4! * 2!
The answer is 11!/(4!*4!*2!)
14
How many paths can we take from
point A to B using the lines.
B
•
A
15
The 2 directions we can go are
North and East.
B
•
A
16
This is an example of ordered lists
since a path depends upon the
order of N’s and E’s
B
•
A
17
One of the paths is:
NENENE
B
•
A
18
Another path is:
NENEEN
B
•
A
19
How many E’s and N’s must each
path contain?
B
•
A
20
There must be 3 N’s and 3 E’s in
any order in each path.
B
•
A
21
This is an example of an ordered
list w/o replacements but with
repetitions (of N and E).
B
•
A
22
The # of paths is therefore 6!/(3! 3!)
B
•
A
23
6!/(3! 3!) = 6*5*4*3*2*1/(6*6) =
5*4 or 20
24
Review
Ordered list with replacement. Example:
How many different lists of length k can we
get from tossing a coin. We can get 2
results, a head or tail.
25
How many different lists of length k can we
get from tossing a coin. We can get 2
results, a head or tail.
Answer: 2k
26
Ordered list without replacement. Example:
How many k different cards can we choose
from a deck of n cards?
27
How many k different cards can we choose
from a deck of n cards?
Answer: n*(n-1)*(n-2)*(n-3)..(n – k +1).
3 cards from a 52 deck: 52*51*50
28
Ordered list without replacement but with
repetition. Example:
How many 11-letter words can we make
from mississippi.
29
Ordered list without replacement but with
repetition. Example:
How many 11-letter words can we make
from mississippi.
Answer: 11!/(4!*4!*2!)
30
Unordered list without replacement.
Example:
How many committees of k people can we
choose from a pool of n?
31
Unordered list without replacement.
Example:
How many committees of k people can we
choose from a pool of n? ( n k)
32
What’s the probability of getting 2 kings,
1 queen, 3 jacks and another non-kqj in a
hand of 7 cards from a 52 card deck?
33
What’s the probability of getting 2 kings,
1 queen, 3 jacks and another non-kqj in a
hand of 7 cards from a 52 card deck?
( 4 2) ( 4 1) ( 4 3) ( 40 1)/ ( 52 7)
Note that the sum of the bottom numbers,
2+1+3+1 = 7, the number of cards in a hand.
Whereas the top numbers indicate the number of a
given type in a deck.
34
Unordered list with replacement (or
repetitions). Example:
Given an urn with red, green and blue
marbles, how many different combinations
of marbles can we get if we choose 5
marbles?
35
Given an urn with red, green and blue
marbles, how many different combinations
of marbles can we get if we choose 5
marbles?
Some of the combination are RRRRR,
GGGGG, GRBBB. The last one is the same
as BBBGR, GBBBR or RGBBB, since order
does not count.
36
Let’s look at RGBBB. We’ll let a 0 separate
the letters and a 1 for each letter. So we get
1010111. For RRRBB we get 1110110
since we need a 0 to separate the last B
from the non-existent G. There will always
be five 1’s and two 0’s.
37
There will always be five 1’s and two 0’s.
The # of ways we can permute 7 objects
with five repetitions of one and two of the
other is 7!/(5!*2!) = 7*6/2 = 21.
38
In general if we have we are choosing
n objects and k of them are different,
the number of combinations is:
(n + k -1)!/(n!*(k-1)!)
39
Download