Permutations and Combinations
-
Upload
annie-kris-buking -
Category
Documents
-
view
324 -
download
0
Transcript of Permutations and Combinations
For our CAT example, we do the following: 3! 3 x 2 x 1 6 3_C_2 = ------ = ----------- = --- = 3 2!(1!) 2 x 1 (1) 2
For our CAT example, we have: 3! 3 x 2 x 1 3_P_2 = ---- = ----------- = 6 1! 1
Thus the number of permutations of 4 different things taken 4 at a time is 4!. (See Topic 19.)
(To say taken 4 at a time is a convention. We mean, "4! is the number of permutations of 4 different things from a total of 4 different things.")
In general,
The number of permutations of n different things taken n at a timeis n!.
Example 1. Five different books are on a shelf. In how many different ways could you arrange them?
Answer. 5! = 1· 2· 3· 4· 5 = 120
Example 2. There are 6! permutations of the 6 letters of the word square.
a) In how many of them is r the second letter? _ r _ _ _ _
b) In how many of them are q and e next to each other?
Solution.
a) Let r be the second letter. Then there are 5 ways to fill the first spot. After that has happened, there are 4 ways to fill the third, 3 to fill the fourth, and so on. There are 5! such permutations.
b) Let q and e be next to each other as qe. Then we will be permuting the 5 units qe, s, u a, r.. They have 5! permutations. But q and e could be together as eq. Therefore, the total number of ways they can be next to each other is 2· 5! = 240.
Permutations
BY THE PERMUTATIONS of the letters abc we mean all of their possible arrangements:
abcacbbacbcacabcba
There are 6 permutations of three different things. As the number of things (letters) increases, their permutations grow astronomically. For example, if twelve different things are permuted, then the number of their permutations is 479,001,600.
Now, this enormous number was not found by counting them. It is derived theoretically from the Fundamental Principle of Counting:
If something can be chosen, or can happen, or be done, in m different ways, and, after that has happened, something else can be chosen in n different ways, then the number of ways of choosing both of them is m · n.
For example, imagine putting the letters a, b, c, d into a hat, and then drawing two of them in succession. We can draw the first in 4 different ways: either a or b or c or d. After that has happened, there are 3 ways to choose the second. That is, to each of those 4 ways there correspond 3. Therefore, there are 4· 3 or 12 possible ways to choose two letters from four.
ab ba ca da ac bc cb db ad bd cd dc
ab means that a was chosen first and b second; ba means that b was chosen first and a second; and so on.
Let us now consider the total number of permutations of all four letters. There are 4 ways to choose the first. 3 ways remain to choose the second, 2 ways to choose the third, and 1 way to choose the last. Therefore the number of permutations of 4 different things is
4· 3· 2· 1 = 24
Thus the number of permutations of 4 different things taken 4 at a time is 4!. (See Topic 19.)
(To say taken 4 at a time is a convention. We mean, "4! is the number of permutations of 4 different things from a total of 4 different things.")
In general,
The number of permutations of n different things taken n at a timeis n!.
Example 1. Five different books are on a shelf. In how many different ways could you arrange them?
Answer. 5! = 1· 2· 3· 4· 5 = 120
Example 2. There are 6! permutations of the 6 letters of the word square.
a) In how many of them is r the second letter? _ r _ _ _ _
b) In how many of them are q and e next to each other?
Solution.
a) Let r be the second letter. Then there are 5 ways to fill the first spot. After that has happened, there are 4 ways to fill the third, 3 to fill the fourth, and so on. There are 5! such permutations.
b) Let q and e be next to each other as qe. Then we will be permuting the 5 units qe, s, u a, r.. They have 5! permutations. But q and e could be together as eq. Therefore, the total number of ways they can be next to each other is 2· 5! = 240.
Permutations of less than all
We have seen that the number of ways of choosing 2 letters from 4 is 4· 3 = 12. We call this
"The number of permutations of 4 different things taken 2 at a time."
We will symbolize this as 4P2:
4P2 = 4· 3
The lower index 2 indicates the number of factors. The upper index 4 indicates the first factor.
For example, 8P3 means "the number of permutations of 8 different things taken 3 at a time." And
8P3 = 8· 7· 6 = 56· 6
= 50· 6 + 6· 6
= 336
For, there are 8 ways to choose the first, 7 ways to choose the second, and 6 ways to choose the third.
In general,
nPk = n(n − 1)(n − 2)· · · to k factors
Factorial representation
We saw in the Topic on factorials,
8!5!
= 8· 7· 6
5! is a factor of 8!, and therefore the 5!'s cancel.
Now, 8· 7· 6 is 8P3. We see, then, that 8P3 can be expressed in terms of factorials as
8P3 = 8 ! (8 − 3)!
= 8!5!
In general, the number of arrangements -- permutations -- of n things taken k at a time, can be represented as follows:
nPk = n ! (n − k)!
. . . . . . . . . . . .(1)
The upper factorial is the upper index of P, while the lower factorial is the difference of the indices.
Example 3. Express 10P4 in terms of factorials.
Solution. 10P4 = 10! 6!
The upper factorial is the upper index, and the lower factorial is the difference of the indices. When the 6!'s cancel, the numerator becomes 10· 9· 8· 7.
This is the number of permutations of 10 different things taken 4 at a time.
Example 4. Calculate nPn.
Solution. nPn = n ! (n − n)!
= n ! 0!
= n ! 1
= n!
nPn is the number of permutations of n different things taken n at a time -- it is the total number of permutations of n things: n!. The definition 0! = 1 makes line ( 1 ) above valid for all values of k: k = 0, 1, 2, . . . , n.
Problem 1. Write down all the permutations of xyz.
To see the answer, pass your mouse over the colored area. To cover the answer again, click "Refresh" ("Reload").
xyz, xzy, yxz, yzx, zxy, zyx.
Problem 2. How many permutations are there of the letters pqrs?
4! = 1· 2· 3· 4 = 24
Problem 3. a) How many different arrangements are there of the letters of the word numbers?
7! = 5,040
b) How many of those arrangements have b as the first letter?
Set b as the first letter, and permute the remaining 6. Therefore, there are 6! such arrangements.
c) How many have b as the last letter -- or in any specified position?
The same. 6!.
d) How many will have n, u, and m together?
Begin by permuting the 5 things -- num, b, e, r, s. They will have 5! permutations. But in each one of them, there are 3! rearrangements of num. Consequently, the total number of arrangements in which n, u, and m are together, is 3!· 5! = 6· 120 = 720.
Problem 4. a) How many different arrangements (permutations) are there of the digits 01234?
5! = 120
b) How many 5-digit numbers can you make of those digits, in which the
b) first digit is not 0?
Since 0 cannot be first, remove it. Then there will be 4 ways to choose the first digit. Now replace 0. It will now be one of 4 remaining digits. Therefore, there will be 4 ways to fill the second spot, 3 ways to fill the third, and so on. The total number of 5-digit numbers, then, is 4· 4! = 4· 24 = 96.
c) How many 5-digit odd numbers can you make?
Again, 0 cannot be first, so remove it. Since the number must be odd, it must end in either 1 or 3. Place 1, then, in the last position. _ _ _ _ 1. Therefore, for the first position, we may choose either 2, 3, or 4, so that there are 3 ways to choose the first digit. Now replace 0. Hence, there will be 3 ways to choose the second position, 2 ways to choose the third, and 1 way to choose the fourth. Therefore, the total number of odd numbers that end in 1, is 3· 3· 2· 1 = 18. The same analysis holds if we place 3 in the last position, so that the total number of odd numbers is 2· 18 = 36.
Problem 5.
a) If the five letters a, b, c, d, e are put into a hat, in how many different a) ways could you draw one out? 5
b) When one of them has been drawn, in how many ways could you a) draw a second? 4
c) Therefore, in how many ways could you draw two letters? 5· 4 = 20
This number is denoted by 5P2.
d) What is the meaning of the symbol 5P3?
The number of permutations of 5 different things taken 3 at a time.
e) Evaluate 5P3. 5· 4· 3 = 60
Problem 5. Evaluate
a) 6P3 = 120 b) 10P2 = 90 c) 7P5 = 2520
Problem 6. Express with factorials.
a) nPk n ! (n − k)!
b) 12P7 12! 5!
c) 8P2 8!6!
d) mP0 m ! m!
Topic 23, Section 2 - Combinations
Section 1: Permutations
Factorial representation of combinations
Combination problems
The sum of all combinations
In permutations, the order is all important -- we count abc as different from bca. But in combinations we are concerned only that a, b, and c have been selected. abc and bca are the same combination.
Here are all the combinations of abcd taken three at a time:
abc abd acd bcd.
There are four such combinations. We call this
The number of combinations of 4 things taken 3 at a time.
We will denote this number as 4C3. In general,
nCk = The number of combinations of n things taken k at a time.
Now, how are the number of combinations nCk related to the number of permutations, nPk ? To be specific, how are the combinations 4C3 related to the permutations 4P3?
Since the order does not matter in combinations, there are clearly fewer combinations than permutations. The combinations are contained among the permutations -- they are a "subset" of the permutations. Each of those four combinations, in fact, will give rise to 3! permutations:
abc abd acd bcdacb adb adc bdcbac bad cad cbdbca bda cda cdbcab dab dac dbccba dba dca dcb
Each column is the 3! permutations of that combination. But they are all one combination -- because the order does not matter. Hence there are 3! times as many permutations as combinations. 4C3 , therefore, will be 4P3 divided by 3! -- the number of permutations that each combination generates.
4C3 = 3!
=
4 · 3 · 21· 2· 3
Notice: The numerator and denominator have the same number of factors, 3, which is indicated by the lower index. The numerator has 3 factors starting with the upper index and going down, while the denominator is 3!.
In general, nCk = k!
.
nCk = n ( n − 1)( n − 2) · · · to k factors k!
Example 1. How many combinations are there of 5 things taken 4 at a time?
Solution. 5C4 =
5 · 4 · 3 · 21· 2· 3· 4
= 5
Again, both the numerator and denominator have the number of factors indicated by the lower index, which in this case is 4. The numerator has four factors beginning with the upper index 5 and going backwards. The denominator is 4!.
Example 2. Evaluate 8C6.
Solution. 8C6 =
8 · 7 · 6 · 5 · 4 · 31· 2· 3· 4· 5· 6
= 28
Both the numerator and denominator have 6 factors. The entire denominator cancels into the numerator. This will always be the case.
Example 3. Evaluate 8C2.
Solution. 8C2 =
8 · 71· 2
= 28
We see that 8C2 , the number of ways of taking 2 things from 8, is equal to 8C6 (Example 2), the number of ways of taking 8 minus 2, or 6. For, the number of ways of taking 2, is the same as the number of ways of leaving 6 behind.
Always:
nCk = nCn − k
The bottom indices, k on the left and n − k on the right, together add up to n.
Example 4. Write out nC3.
Solution. nC 3 = n ( n − 1)( n − 2) 1· 2· 3
The 3 factors in the numerator begin with n and go down.
Factorial representation
In terms of factorials, the number of selections -- combinations -- of n distinct things taken k at a time, can be represented as follows:
nCk = n ! (n − k)! k!
This is nPk divided by k!. Compare line (1) of Section 1.
Notice: In the denominator, n − k and k together equal the numerator n.
Note also the convention that the factorial of the lower index, k, is written in the denominator on the right.
Example 5. 8C3 = 8! 5! 3!
. (Note: 5 + 3 in the denominator equals 8 in the numerator.
Show that this is equal to
8 · 7 · 61· 2· 3
.
Solution. 5! is a factor of 8!, so it will cancel.
8! 5! 3!
=
8 · 7 · 6 · 5 !5!· 1· 2· 3
=
8 · 7 · 61· 2· 3
.
Example 6. Write each of the following with factorials: 8C6 , 8C2 .
Solution. 8C6 = 8! 2! 6!
. 8C2 = 8! 6! 2!
. But 2! 6! is equal to 6! 2!.
Therefore, we see that the number of ways of taking 6 things from 8, is the same as the number of ways of taking 2.
8C6 = 8C2
In general,
nCk = nCn − k
(See Problem 14, below.)
Example 7. Write 8C0 with factorials.
Solution. 8C0 = 8! 8! 0!
. Since 0! = 1, that fraction is equal to 1. There is
only 1 way to take 0 things from 8. This is the same as the number of ways of taking all 8.
Example 8. Write nCk + 1 with factorials.
Solution. Let us look at the factorial form:
mCj = m !
(m − j)! j!
The lower factorials are the difference of the indices, m − j, times the lower index, j.
Let us apply this to nCk + 1. The difference of the indices is
n − (k + 1) = n − k − 1
Therefore,
nCk + 1 =
n !
(n − k − 1)! (k + 1)!
Problem 7.
a) Write all the combinations of abcd taken 1 at a time.
To see the answer, pass your mouse over the colored area. To cover the answer again, click "Refresh" ("Reload").
a, b, c, d.
b) Write their combinations taken 2 at a time.
ab, ac, ad, bc, bd, cd.
c) Write their combinations taken 3 at a time.
abc, abd, acd, bcd.
d) Write their combinations taken 4 at a time.
abcd
Problem 8.
a) There are 3! permutations of the letters rpt. Those 3! permutations a) include how many combinations of rpt? One.
b) rpt is one of the 5C3 combinations of pqrst. Therefore, by how much
b) must the 5P3 permutations of pqrst be reduced, in order to have
b) only their 5C3 combinations? By 3!. 5C3 = 5P3/3!.
* * *
nCk = n ( n − 1)( n − 2) · · · to k factors k!
Problem 9. You have 5 shirts, but you will select only 3 for your vacation. In how many different ways can you do this?
5C3 = 10. The order in which you select them does not matter.
Problem 10. Evaluate the following.
a) 6C4 = 15 b) 5C3 = 10 c) 10C2 = 45 d) 10C8 = 45
e) 8C5 = 56 f) 8C3 = 56 g) 4C4 = 1 h) 4C0 = 1
Problem 11.
a) Write out nC4 . Notice how the last factor in the numerator is a) related to the lower index.
n ( n − 1)( n − 2)( n − 3) 1· 2· 3· 4
b) In the numerator of nCk , what will be the last factor? (n − k + 1)
In part a) where k = 4, the last factor is (n − 3), and 3 is 4 − 1. In general then, the last factor will be [n − (k − 1)] = (n − k + 1).We could also see that by imagining that each of the k factors has the form (n − j). In the first factor, j = 0. And in the kth, j = k − 1.
c) In the numerator of 20Cm , what will be the last factor? (21 − m)
* * *
nCk = n ! (n − k)! k!
Problem 12. Write the following with factorials.
a) uCv u ! (u − v)! v!
b) 9C3 9! 6! 3!
c) 9C6 9! 3! 6!
d) 12C11 12! 1! 11!
e) 12C12 12! 0! 12!
f) 12C0 12! 12! 0!
Therefore, what number is 12C0 ? 1
Problem 13. Write the following with factorials.
a) nCn − k n ! k! (n − k)!
b) n + 1Ck ( n + 1)! (n − k + 1)! k!
c) nCk − 1 n ! (n − k + 1)! (k − 1)!
d) n − 1Ck − 1 ( n − 1)! (n − k)! (k − 1)!
Problem 14.
a) In how many ways could you select three of these digits: 1, 2, 3, 4, 5 ?
5
C3
=
10
b) In how many ways could you not select two of them?
5
C2
= 10
c) Prove: nCk = nCn − k
nCk = n ! (n − k)! k!
= n ! k! (n − k)!
= nCn − k
The sum of all combinations
What is the sum of all the combinations of n things? That is, what is the sum of nC0 + nC1 + nC2 + . . . + nCn?
We will see that it is equal to 2n.
To analyze that sum, let us consider 4 distinct things -- a, b, c, d. And suppose that we are going to either choose or not choose each one of them.
That is, in how many different ways could we choose either none of them, or any 1, or any 2, or any 3, or all 4?
That number will be the sum of all the combinations of 4 things.
To find that number, let us assign either Yes or No to each one.
To a, then, there will be 2 possibilities. After that has happened, b will have one of those 2 assignments. After that, so will c, and after that so will d. The total number of possible assignments of Yes or No, then, is
2· 2· 2· 2 = 24.
This is the total number of ways that we could choose any of those four letters. The sum of all the combinations of 4 things is 24.
4C0 + 4C1 + 4C2 + 4C3 + 4C4 = 1 + 4 + 6 + 4 + 1 = 16 = 24.
In fact, here are these 16 possibilities:
a b c d
Yes Yes Yes Yes
No Yes Yes Yes
Yes No Yes Yes
Yes Yes No Yes
Yes Yes Yes No
No No Yes Yes
No Yes No Yes
No Yes Yes No
Yes No No Yes
Yes No Yes No
Yes Yes No No
No No No Yes
No No Yes No
No Yes No No
Yes No No No
No No No No
In general, the sum of all the combinations of n distinct things is 2n.
nC0 + nC1 + nC2 + . . . + nCn = 2n.
(Compare Problem 7, Lesson 25.)
Problem 15. At Joe's Pizza Parlor, in addition to cheese there are 8 different toppings. If you can order any number of toppings, then how many different toppings are possible?
28 = 256. For, this is the sum of all possibile combinations: either no topping, or 1, or 2, and so on, up to 8.
Problem 16.
a) A door can be opened only with a security code that consists of fivea) buttons: 1, 2, 3, 4, 5. A code consists of pressing any one button, or a) any two, or any three, or any four, or all five. a) How many possible codes are there? a) (You are to press all the buttons at once, so the order doesn't matter.)
This is the sum of all the combinations of 5 things -- except not taking any, 5C0, which is 1. The sum of all those combinations, then, is 25 − 1 = 32 − 1 = 31.
b) If, to open the door you must press three codes, then how many b) possible ways are there to open the door? a) Assume that the same code may be repeated.
There are 31 ways to choose the first code. Again, 31 ways to choose the second, and 31 ways to choose the third. Therefore, the total number of ways to open the door is 313 = 29,791.
Topic 23, Section 2 - Combinations
Section 1: Permutations
Factorial representation of combinations
Combination problems
The sum of all combinations
In permutations, the order is all important -- we count abc as different from bca. But in combinations we are concerned only that a, b, and c have been selected. abc and bca are the same combination.
Here are all the combinations of abcd taken three at a time:
abc abd acd bcd.
There are four such combinations. We call this
The number of combinations of 4 things taken 3 at a time.
We will denote this number as 4C3. In general,
nCk = The number of combinations of n things taken k at a time.
Now, how are the number of combinations nCk related to the number of permutations, nPk ? To be specific, how are the combinations 4C3 related to the permutations 4P3?
Since the order does not matter in combinations, there are clearly fewer combinations than permutations. The combinations are contained among the permutations -- they are a "subset" of the permutations. Each of those four combinations, in fact, will give rise to 3! permutations:
abc abd acd bcdacb adb adc bdcbac bad cad cbdbca bda cda cdbcab dab dac dbccba dba dca dcb
Each column is the 3! permutations of that combination. But they are all one combination -- because the order does not matter. Hence there are 3! times as many permutations as combinations. 4C3 , therefore, will be 4P3 divided by 3! -- the number of permutations that each combination generates.
4C3 = 3!
=
4 · 3 · 21· 2· 3
Notice: The numerator and denominator have the same number of factors, 3, which is indicated by the lower index. The numerator has 3 factors starting with the upper index and going down, while the denominator is 3!.
In general, nCk = k!
.
nCk = n ( n − 1)( n − 2) · · · to k factors k!
Example 1. How many combinations are there of 5 things taken 4 at a time?
Solution. 5C4 =
5 · 4 · 3 · 21· 2· 3· 4
= 5
Again, both the numerator and denominator have the number of factors indicated by the lower index, which in this case is 4. The numerator has four factors beginning with the upper index 5 and going backwards. The denominator is 4!.
Example 2. Evaluate 8C6.
Solution. 8C6 =
8 · 7 · 6 · 5 · 4 · 31· 2· 3· 4· 5· 6
= 28
Both the numerator and denominator have 6 factors. The entire denominator cancels into the numerator. This will always be the case.
Example 3. Evaluate 8C2.
Solution. 8C2 =
8 · 71· 2
= 28
We see that 8C2 , the number of ways of taking 2 things from 8, is equal to 8C6 (Example 2), the number of ways of taking 8 minus 2, or 6. For, the number of ways of taking 2, is the same as the number of ways of leaving 6 behind.
Always:
nCk = nCn − k
The bottom indices, k on the left and n − k on the right, together add up to n.
Example 4. Write out nC3.
Solution. nC 3 = n ( n − 1)( n − 2) 1· 2· 3
The 3 factors in the numerator begin with n and go down.
Factorial representation
In terms of factorials, the number of selections -- combinations -- of n distinct things taken k at a time, can be represented as follows:
nCk = n !
(n − k)! k!
This is nPk divided by k!. Compare line (1) of Section 1.
Notice: In the denominator, n − k and k together equal the numerator n.
Note also the convention that the factorial of the lower index, k, is written in the denominator on the right.
Example 5. 8C3 = 8! 5! 3!
. (Note: 5 + 3 in the denominator equals 8 in the numerator.
Show that this is equal to
8 · 7 · 61· 2· 3
.
Solution. 5! is a factor of 8!, so it will cancel.
8! 5! 3!
=
8 · 7 · 6 · 5 !5!· 1· 2· 3
=
8 · 7 · 61· 2· 3
.
Example 6. Write each of the following with factorials: 8C6 , 8C2 .
Solution. 8C6 = 8! 2! 6!
. 8C2 = 8! 6! 2!
. But 2! 6! is equal to 6! 2!.
Therefore, we see that the number of ways of taking 6 things from 8, is the same as the number of ways of taking 2.
8C6 = 8C2
In general,
nCk = nCn − k
(See Problem 14, below.)
Example 7. Write 8C0 with factorials.
Solution. 8C0 = 8! 8!
. Since 0! = 1, that fraction is equal to 1. There is
0!only 1 way to take 0 things from 8. This is the same as the number of ways of taking all 8.
Example 8. Write nCk + 1 with factorials.
Solution. Let us look at the factorial form:
mCj = m !
(m − j)! j!
The lower factorials are the difference of the indices, m − j, times the lower index, j.
Let us apply this to nCk + 1. The difference of the indices is
n − (k + 1) = n − k − 1
Therefore,
nCk + 1 =
n !
(n − k − 1)! (k + 1)!
Problem 7.
a) Write all the combinations of abcd taken 1 at a time.
To see the answer, pass your mouse over the colored area. To cover the answer again, click "Refresh" ("Reload").
a, b, c, d.
b) Write their combinations taken 2 at a time.
ab, ac, ad, bc, bd, cd.
c) Write their combinations taken 3 at a time.
abc, abd,
acd, bcd.
d) Write their combinations taken 4 at a time.
abcd
Problem 8.
a) There are 3! permutations of the letters rpt. Those 3! permutations a) include how many combinations of rpt? One.
b) rpt is one of the 5C3 combinations of pqrst. Therefore, by how much
b) must the 5P3 permutations of pqrst be reduced, in order to have
b) only their 5C3 combinations? By 3!. 5C3 = 5P3/3!.
* * *
nCk = n ( n − 1)( n − 2) · · · to k factors k!
Problem 9. You have 5 shirts, but you will select only 3 for your vacation. In how many different ways can you do this?
5C3 = 10. The order in which you select them does not matter.
Problem 10. Evaluate the following.
a) 6C4 = 15 b) 5C3 = 10 c) 10C2 = 45 d) 10C8 = 45
e) 8C5 = 56 f) 8C3 = 56 g) 4C4 = 1 h) 4C0 = 1
Problem 11.
a) Write out nC4 . Notice how the last factor in the numerator is a) related to the lower index.
n ( n − 1)( n − 2)( n − 3) 1· 2· 3· 4
b) In the numerator of nCk , what will be the last factor? (n − k + 1)
In part a) where k = 4, the last factor is (n − 3), and 3 is 4 − 1. In general then, the last factor will be [n − (k − 1)] = (n − k + 1).We could also see that by imagining that each of the k factors has the form (n − j). In the first factor, j = 0. And in the kth, j = k − 1.
c) In the numerator of 20Cm , what will be the last factor? (21 − m)
* * *
nCk = n ! (n − k)! k!
Problem 12. Write the following with factorials.
a) uCv u ! (u − v)! v!
b) 9C3 9! 6! 3!
c) 9C6 9! 3! 6!
d) 12C11 12! 1! 11!
e) 12C12 12! 0! 12!
f) 12C0 12! 12! 0!
Therefore, what number is 12C0 ? 1
Problem 13. Write the following with factorials.
a) nCn − k n ! k! (n − k)!
b) n + 1Ck ( n + 1)! (n − k + 1)! k!
c) nCk − 1 n ! (n − k + 1)! (k − 1)!
d) n − 1Ck − 1 ( n − 1)! (n − k)! (k − 1)!
Problem 14.
a) In how many ways could you select three of these digits: 1, 2, 3, 4, 5 ?
5
C3
= 10
b) In how many ways could you not select two of them?
5
C2
= 10
c) Prove: nCk = nCn − k
nCk = n ! (n − k)! k!
= n ! k! (n − k)!
= nCn − k
The sum of all combinations
What is the sum of all the combinations of n things? That is, what is the sum of nC0 + nC1 + nC2 + . . . + nCn?
We will see that it is equal to 2n.
To analyze that sum, let us consider 4 distinct things -- a, b, c, d. And suppose that we are going to either choose or not choose each one of them.
That is, in how many different ways could we choose either none of them, or any 1, or any 2, or any 3, or all 4?
That number will be the sum of all the combinations of 4 things.
To find that number, let us assign either Yes or No to each one.
To a, then, there will be 2 possibilities. After that has happened, b will have one of those 2 assignments. After that, so will c, and after that so will d. The total number of possible assignments of Yes or No, then, is
2· 2· 2· 2 = 24.
This is the total number of ways that we could choose any of those four letters. The sum of all the combinations of 4 things is 24.
4C0 + 4C1 + 4C2 + 4C3 + 4C4 = 1 + 4 + 6 + 4 + 1
= 16 = 24.
In fact, here are these 16 possibilities:
a b c d
Yes Yes Yes Yes
No Yes Yes Yes
Yes No Yes Yes
Yes Yes No Yes
Yes Yes Yes No
No No Yes Yes
No Yes No Yes
No Yes Yes No
Yes No No Yes
Yes No Yes No
Yes Yes No No
No No No Yes
No No Yes No
No Yes No No
Yes No No No
No No No No
In general, the sum of all the combinations of n distinct things is 2n.
nC0 + nC1 + nC2 + . . . + nCn = 2n.
(Compare Problem 7, Lesson 25.)
Problem 15. At Joe's Pizza Parlor, in addition to cheese there are 8 different toppings. If you can order any number of toppings, then how many different toppings are possible?
28 = 256. For, this is the sum of all possibile combinations: either no topping, or 1, or 2, and so on, up to 8.
Problem 16.
a) A door can be opened only with a security code that consists of fivea) buttons: 1, 2, 3, 4, 5. A code consists of pressing any one button, or a) any two, or any three, or any four, or all five. a) How many possible codes are there? a) (You are to press all the buttons at once, so the order doesn't matter.)
This is the sum of all the combinations of 5 things -- except not taking any, 5C0, which is 1. The sum of all those combinations, then, is 25 − 1 = 32 − 1 = 31.
b) If, to open the door you must press three codes, then how many b) possible ways are there to open the door? a) Assume that the same code may be repeated.
There are 31 ways to choose the first code. Again, 31 ways to choose the second, and 31 ways to choose the third. Therefore, the total number of ways to open the door is 313 = 29,791.