1 Combinations & Counting II Samuel Marateck © 2009.
-
Upload
korbin-dodgen -
Category
Documents
-
view
217 -
download
0
Transcript of 1 Combinations & Counting II Samuel Marateck © 2009.
1
Combinations & Counting II
Samuel Marateck © 2009
2
How many 4-letter words can we form from
the letters ABCD w/o replacements?
3
How many 4-letter words can we form from
the letters ABCD?
This is an example of an ordered list without
replacements.
4
How many 4-letter words can we form from
the letters ABCD w/o replacements?
4*3*2*1 or 4! or 24
5
How many 2-letter words can we form from
the letters ABCD w/o replacements? This is
another example of an ordered list
6
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
7
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!
8
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 .
9
Let’s distinguish between the A’s by givingthem subscripts, A1 , A2 . So the # of wordsthat 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
10
If we don’t distinguish between the A’s, thewords that can be formed are:
B A A
A B A
A A BWe get the number of different words by dividing by the # of ways the A’s can be arranged or 2!
11
How many 3-letter words can we form from
the letters AAB w/o replacements?
It’s 3!/2! or 3.
12
How many distinct 11-letter words (ordered
lists) can we form from the letters in
mississippi w/o replacements?
13
How many distinct 11-letter words can weform from the letters in mississippi w/oreplacements? 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?
14
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!)
15
How many paths can we take from point A to B using the lines.
B
•
A
16
The 2 directions we can go are North and East.
B
•
A
17
This is an example of ordered listssince a path depends upon the
order of N’s and E’s B
•
A
18
One of the paths is:NENENE
B
•
A
19
Another path is:NENEEN
B
•
A
20
How many E’s and N’s must eachpath contain?
B
•
A
21
There must be 3 N’s and 3 E’s in any order in each path.
B
•
A
22
This is an example of an ordered list w/o replacements but with
repetitions (of N and E). B
•
A
23
The # of paths is therefore 6!/(3! 3!)
B
•
A
24
6!/(3! 3!) = 6*5*4*3*2*1/(6*6) =
5*4 or 20
25
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.
26
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
27
Ordered list without replacement. Example:
How many k different cards can we choose
from a deck of n cards?
28
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
29
Ordered list without replacement but with
repetition. Example:
How many 11-letter words can we make
from mississippi.
30
Ordered list without replacement but with
repetition. Example:
How many 11-letter words can we make
from mississippi.
Answer: 11!/(4!*4!*2!)
31
Unordered list without replacement.
Example:
How many committees of k people can we
choose from a pool of n?
32
Unordered list without replacement.
Example:
How many committees of k people can we
choose from a pool of n? ( n k)
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?
34
What’s the probability of getting 2 kings,1 queen, 3 jacks and another non-kqj in ahand 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.
35
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?
36
Given an urn with red, green and bluemarbles, how many different combinationsof marbles can we get if we choose 5marbles?
Some of the combination are RRRRR,GGGGG, GRBBB. The last one is the sameas BBBGR, GBBBR or RGBBB, since orderdoes not count.
37
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.
38
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.
39
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)!)