Ch. 12.2: Combinations

advertisement
Ch. 12.2: Combinations
Last section, a Permutation was defined generally as an ordered list of elements
selected from some set. In this section, we define a Combination as an unordered
collection of elements selected from some set. Again, this definition is a bit vague. In
general, it is easier to consider cases in which elements are not allowed to be repeated
– then, a combination is the same as a subset.
Example 1: List all possible 3-permutations and 3-combinations of the set
A = {a, b, c, d}, with no repetitions allowed.
ANSWER: Following the book, we can make a table:
Combinations
(order not important)
{a, b, c}
{a, b, d}
{a, c, d}
{b, c, d}
Permutations
(order important)
(a, b, c),
(a, b, d),
(a, c, d),
(b, c, d),
(a, c, b),
(a, d, b),
(a, d, c),
(b, d, c),
(b, a, c),
(b, a, d),
(c, a, d),
(c, b, d),
(b, c, a),
(b, d, a),
(c, d, a),
(c, d, b),
(c, a, b),
(d, a, b),
(d, a, c),
(d, b, c),
(c, b, a)
(d, b, a)
(d, c, a)
(d, c, b)
Notice that the combinations are all subsets of cardinality 3. Also each unique combination on the left corresponds to 6 unique permutations on the right, because we can
reorder the elements of each combination in 3! = 6 different ways.
Thus, if N = the total number of 3-combinations possible, then we can write:
4 P3
=
4!
= N × 3!
(4 − 3)!
or in other words, N =
4!
3! (4 − 3)!
This example can be generalized to sets of any (finite) size, which gives us the following
formula:
1
Number of Combinations without Repetitions
The total number of combinations of r elements selected from a
set of n elements without repetition is given by the binomial
coefficient:
n
n!
=
n Cr =
r!(n − r)!
r
Again, by convention,
n C0
= 1, for any n.
Example 2: (the Committee Problem) Consider the same club members from last
section: { Tom, Calvin, Doug, Jane, Mary, Iris }. In how many different ways can a
3-person committee be selected from this group?
ANSWER: We assume that all persons on a committee have equal status; therefore,
the order of the committee members is not important, and the committee is just a
combination. The total number of 3-combinations possible in this case is:
6×5×4
6
6!
=
= 20.
=
3!(6 − 3)!
3×2×1
3
Example 3: Using the same club members as above, in how many ways can 2 different
committees be chosen if committee A has 3 people, committee B has 2 people, and no
member can serve on both?
ANSWER: We can use the Fundamental Counting Principle here:
• First choose Committee A from the 6 members: there are 6 C3 = 20 possible ways
to do this.
• Next, choose Committee B from the 3 remaining members: there are 3 C2 = 3
possible ways to do this.
Thus, there are 20 × 3 = 60 possible ways to choose both.
2
Notice this answer can be written in the following form:
6 3
6!
(6 − 3)!
6!
6
=
×
=
=
3 2
3! (6 − 3)! 2! (6 − 3 − 2)!
3! 2! 1!
3, 2, 1
This is the multinomial coefficient that was introduced in the last section, with regards
to permutations in which elements are repeated. It turns out this same formula holds
for multi-combinations, or labeled-partitions as well.
(The text does not introduce these concepts, but just FYI, when we speak of partitioning a set, we mean regrouping all the elements of the set into disjoint subsets.
The previous question could be read “In how many ways can a set of 6 elements be
partitioned into 3 distinctly-labeled subsets of sizes 3, 2, and 1?”)
This next example is a little more complicated. It illustrates how the Fundamental
Counting Principle can be used along with binomial coefficients.
Example 4: In Texas Holdem Poker, one is dealt a hand of 5 cards from a total of 52
(no Jokers).
(a) How many different poker hands are possible? (assuming there’s no cheating!)
(b) In how many of those hands does one have 4 of a kind ?
(c) In how many of those hands does one have 3 of a kind ?
(d) In how many of those hands does one have a full-house?
3
ANSWER: A deck of cards consists of 4 suits, each with 13 faces:
{A♠, 2♠, 3♠, 4♠, 5♠, 6♠, 7♠, 8♠, 9♠, 10♠, J♠, Q♠, K♠}
{A♥, 2♥, 3♥, 4♥, 5♥, 6♥, 7♥, 8♥, 9♥, 10♥, J♥, Q♥, K♥}
{A♣, 2♣, 3♣, 4♣, 5♣, 6♣, 7♣, 8♣, 9♣, 10♣, J♣, Q♣, K♣}
{A♦, 2♦, 3♦, 4♦, 5♦, 6♦, 7♦, 8♦, 9♦, 10♦, J♦, Q♦, K♦}
(a) The order of cards in a hand is irrelevant. Thus, there are 52 C5 = 2, 598, 960 unique
hands.
(b) A 4 of a kind consists of 4 cards with the same face. Since there are only 4 suits,
each with 13 cards, there are only 13 ways to choose 4 cards of the same face (1
way to choose 4 Ace’s, 1 way to choose 4 2’s, . . . , and 1 way to choose 4 K’s).
The 5th card can be any of the remaining 52 − 4 = 48. Thus the number of unique
4 of a kind hands is:
13 × 48 = 624.
(c) A 3 of a kind consists of 3 cards with the same face, and 2 with different faces.
For each of the 13 faces, there are 4 C3 ways of choosing a combination of 3. The
remaining 2 cards must be of different faces not already chosen (otherwise, it would
be a 4 of a kind), as well as different from each other (otherwise it would be a fullhouse). There are thus 12 C2 ways to choose the faces, and each can have 4 possible
suits. Thus, the number of unique 3 of a kind hands is:
4 12
13
(4)2 = 54, 912.
3
2
(d) A full-house consists of 3 cards of one face, and 2 cards of another. There are
13(4 C3 ) different combinations of 3 same-face cards. For the remaining 2 cards,
there are 12(4 C2 ) different combinations. Thus, the number of unique full-house
hands is:
4 4
(13)(12)
= 3, 744.
3 2
4
Download