Section 4.2 Combinations
Subsection 4.2.1 Combinations (simple)
Goal: count problems like the following (problem assigned later). Allen, Betty, Charles, Darla, and Earl run a race. Only the top three advance to the next race. How many outcomes are there for advancing to the next race?
Subsubsection 4.2.1.1 Model
Problem 4.2.1.
Perform the following steps using the alphabet {A,B,C,D,E}.
List all strings of length five with no letter repeated. (Yes, this is a long list.)
Alphabetize the list.
Group the strings such that two strings are in the same group if and only if they have the same first three letters (order matters).
Count the number of strings in each group.
Group the groups such that two groups are together if and only if the strings have the first three letters (order does not matter).
Count the number of super-groups.
Explain the count of both groupings.
To list all strings of length five with no letter repeated, begin by fixing the the first three letters to ABC. Now we know that there are two ways to complete the string: ABCDE and ABCED. This is because there are only two letters remaining and two spaces left in the string.
Now switch C for D. With the first three letters ABD, see that there are again two strings that result: ABDCE and ABDEC.
Let's repeat this method of writing down the two possible strings, then replacing the first three letters with the next set of three letters alphabetically. This naturally produces an alphabetical list. Repeat until we have 5!=120 strings total.
ABCDE, ABCED, ABDCE, ABDEC, ABECD, ABEDC, ACBDE, ACBED, ACDBE, ACDEB, ACEBD, ACEDB, ADBCE, ADBEC, ADCBE, ADCEB, ADEBC, ADECB, AEBCD, AEBDC, AECBD, AECDB, AEDBC, AEDCB
BACDE, BACED, BADCE, BADEC, BAECD, BAEDC, BCADE, BCAED, BCDAE, BCDEA, BCEAD, BCEDA, BDACE, BDAEC, BDCAE, BDCEA, BDEAC, BDECA, BEACD, BEADC, BECAD, BECDA, BEDAC, BEDCA
CABDE, CABED, CADBE, CADEB, CAEBD, CAEDB, CBADE, CBAED, CBDAE, CBDEA, CBEAD, CBEDA, CDABE, CDAEB, CDBAE, CDBEA, CDEAB, CDEBA, CEABD, CEADB, CEBAD, CEBDA, CEDAB, CEDBA
DABCE, DABEC, DACBE, DACEB, DAEBC, DAECB, DBACE, DBAEC, DBCAE, DBCEA, DBEAC, DBECA, DCABE, DCAEB, DCBAE, DCBEA, DCEAB, DCEBA, DEABC, DEACB, DEBAC, DEBCA, DECAB, DECBA
EABCD, EABDC, EACBD, EACDB, EADBC, EADCB, EBACD, EBADC, EBCAD, EBCDA, EBDAC, EBDCA, ECABD, ECADB, ECBAD, ECBDA, ECDAB, ECDBA, EDABC, EDACB, EDBAC, EDBCA, EDCAB, EDCBA
Notice that every two strings, there is a pair that shares the first three letters exactly. This is part of how we found the list of strings.
The number of strings that share the first three letters, without care to order, is 2 times 3!, which is 12. This is because there are 3! or 6 ways to rearrange the first three letters of any string, and for each rearrangement, there are 2 strings in the list.
Subsubsection 4.2.1.2 Problems
Problem 4.2.2.
Allen, Betty, Charles, Darla, and Earl run a race. Only the top three advance to the next race. How many outcomes are there for advancing to the next race?
Building off from the previous problem, we see that there are 10 ways to choose three people out of five.
Problem 4.2.3.
Allen, Betty, Charles, Darla, and Earl can serve on a committee. How many ways can a committee of three members be selected?
The number of possible ways committee members can be chosen is the same number of super sets in Problem 4.2.1 and the solution in Problem 4.2.2. so 10 different ways.
Problem 4.2.4.
Conjecture a formula for the number of ways to select \(k\) objects from a set of \(n\) objects.
An equation for the number of ways to select \(k\) objects from a set of \(n\) objects can be represented as so.
\(\binom n k = \frac{n!}{k!(n-k)!}\)
The numerator in this formula is the amount of ways to arrange \(n\) objects without repetitions. The \((n-k)!\) in the denominator represents the amount of objects we are not counting, the \(k!\) in the denominator represents the amount of ways to arrange the selected items.
Problem 4.2.5.
Count the number of possibilities for selecting committees of size four with the following conditions from the set of Allen, Betty, Charles, Darla, Earl, and Freda.
Allen must be on the committee
The committee must be half men and half women
Both conditions above must be met.
The same method can be used, but we now have a set of 6 people. In case (a), this reduces to the same problem again, for now Allen is given and we must just pick 3 people from the remaining 5. There are 10 ways to do this.
In case (b), we must pick two people from the three men and two from the three women. These choices can be independent, so the total count is
That is to say, there are three ways to choose 2 people from a group of 3. We first choose the women, then choose the men. We have three options for choosing the women, and three options for choosing the men. Thus for each of the three ways of choosing women, there are three ways to choose men, giving us a total of nine options.
In case (c), we must choose Allen, but we are free to choose any other man, while the choice of the two women is unrestricted. The count is thus
We have one way to choose Allen, two ways to choose the remaining man, and then again three ways to choose the two women.
Subsection 4.2.2 Partitions
Goal: count problems like the following (problem assigned later). Charles buys a dozen rolls. His options are milk, rye, and multi-grain. How many results are there?
Subsubsection 4.2.2.1 Model
Problem 4.2.6.
How many arrangements are there of the letters “oooooI.”
Since we cannot tell the difference between each "o", we simply need to find the number of ways the "l" can fit in a string of 5 "o"s.
The "l" can go in front, at the end, or in the 4 spaces between the 5 "o"s. This adds up to 6 arrangments.
Problem 4.2.7.
A group of five friends may vote for one of two candidates. They do so by standing on the left or right side of a room. How can this be counted using the previous problem?
Similarly to the previous problem, think of the 'l' as a divider between voters. 6 choose 1 = 6 voting scenarios.
Problem 4.2.8.
How many arrangements are there of the letters “oooooII.”
The total amount of arrangements is \(7 \cdot 6\) (total permutation) \(= 42/2\) (removing permutations that are similar like 1010000=0000101) \(= 21\) arrangements
The same number can be calulated by using the combination formula, where we choose where our both our 'l' goes to.
\(7!/((7-2)!2!) = (7 \cdot 6)/(2 \cdot 1) = 21\)
Problem 4.2.9.
A group of five friends may vote for one of three candidates. They do so by standing on the left side in the middle or on the right side of a room. How can this be counted using the previous problem?
Once again, we think of the \(l\)s dividing the friends into groups standing on the left, in the middle, or on the right side of the room.
Problems where a group of indistinguishable objects are distributed into distinguishable groups are called partitions.
Problem 4.2.10.
Conjecture a formula for the number of ways to partition \(n\) objects into \(r\) groups.
Let each n object be represented by a character in a string, and let the divider(s) between r groups be represented by a different character in the string.
To divide n objects into r groups, be must have \(r-1\) dividers to be placed between groups. Add n and \(r-1\) to obtain the total number of characters in the string. There are \((n + (r - 1))!\) strings that result.
We cannot tell the difference between the n objects, and we also cannot tell the difference between dividers. Let's remove the strings that are repetitive. This is done by dividing by the number of ways we can arrange the n objects, and dividing by the number of ways we can arrange the dividers. The final formula is \((n + (r - 1))! / (n!(r - 1)!)\)
Subsubsection 4.2.2.2 Problems
Problem 4.2.11.
Betty buys five scoops of ice cream. Her two choices are chocolate and vanilla. How many possible results are there?
This is a application of problem Problem 4.2.6, if we consider the five scoops as five things to be partitioned into two groups. Therefore, there are six ways Betty can order her ice cream.
Problem 4.2.12.
Betty can buy five scoops of ice cream. Her two choices are chocolate and vanilla. How many possible results are there?
Problem 4.2.13.
Betty can buy five scoops of ice cream. The ice cream shop now has chocolate, vanilla, and strawberry. How many possible results are there?
Suppose Betty is thinking of buying an ice cream cone. Thus, the order in which the scoops are placed certainly matters and the problem becomes a permutations question. Since she has three choices for each scoop, the following are the possible outcomes:
If she buys no scoops, then there is \(3^{0}=1\) possible outcome.
If she buys one scoop, then there is \(3^{1}=3\) possible outcomes.
If she buys two scoops, then there is \(3^{2}=9\) possible outcomes.
If she buys three scoops, then there is \(3^{3}=27\) possible outcomes.
If she buys four scoops, then there is \(3^{4}=81\) possible outcomes.
If she buys five scoops, then there is \(3^{5}=243\) possible outcomes.
This means that there are \(1+3+9+27+81+243=364\) possible outcomes to her decision to buy a cone.
Now suppose Betty is thinking of buying an ice cream bowl. Thus the order in which the scoops are placed doesn't really matter since she has equal access to all the scoops every time she takes a spoonfull. Since there are three different flavors of icecream, this becomes a question where she is building a partitions of up to five objects into three groups, which is a question we already have a formula for:
If she buys no scoops, then there is \(\frac{(0+2)!}{2!0!}=1\) possible outcome.
If she buys one scoop, then there is \(\frac{(1+2)!}{2!1!}=3\) possible outcomes.
If she buys two scoops, then there is \(\frac{(2+2)!}{2!2!}=6\) possible outcomes.
If she buys three scoops, then there is \(\frac{(3+2)!}{2!3!}=10\) possible outcomes.
If she buys four scoops, then there is \(\frac{(4+2)!}{2!4!}=15\) possible outcomes.
If she buys five scoops, then there is \(\frac{(5+2)!}{2!5!}=21\) possible outcomes.
This means that there are \(1+3+6+10+15+21=56\) possible outcomes to her decision to buy a bowl.
Problem 4.2.14.
Charles buys a dozen rolls. His options are milk, rye, and multi-grain. How many results are there?
Charles will buy 12 rolls. We are assuming these rolls have no distict indentity. Meaning they are indistinguishable.
By using the oooool method we can visualize this problem.
Where the red o's represent the rolls, and the blue bars represent dividers.
To count the number of ways he can buy the rolls. We will use the formula:
By subsituiting the values for r and n where r = 3 and n = 12, we get
So there are 91 ways for Charles to buy rolls given he has 3 types of rolls to choose from.