Counting Principles
Using the Addition and Multiplication Principles
The company that sells customizable cases offers cases for tablets and smartphones. There are 3 supported tablet models and 5 supported smartphone models. The Addition Principle tells us that we can add the number of tablet options to the number of smartphone options to find the total number of options. By the Addition Principle, there are 8 total options, as we can see in Figure 1. Figure 1
A General Note: The Addition Principle
According to the Addition Principle, if one event can occur in [latex]m[/latex] ways and a second event with no common outcomes can occur in [latex]n[/latex] ways, then the first or second event can occur in [latex]m+n[/latex] ways.Example 1: Using the Addition Principle
There are 2 vegetarian entrée options and 5 meat entrée options on a dinner menu. What is the total number of entrée options?Solution
We can add the number of vegetarian options to the number of meat options to find the total number of entrée options. There are 7 total options.Try It 1
A student is shopping for a new computer. He is deciding among 3 desktop computers and 4 laptop computers. What is the total number of computer options? SolutionUsing the Multiplication Principle
The Multiplication Principle applies when we are making more than one selection. Suppose we are choosing an appetizer, an entrée, and a dessert. If there are 2 appetizer options, 3 entrée options, and 2 dessert options on a fixed-price dinner menu, there are a total of 12 possible choices of one each as shown in the tree diagram in Figure 2. The possible choices are:- soup, chicken, cake
- soup, chicken, pudding
- soup, fish, cake
- soup, fish, pudding
- soup, steak, cake
- soup, steak, pudding
- salad, chicken, cake
- salad, chicken, pudding
- salad, fish, cake
- salad, fish, pudding
- salad, steak, cake
- salad, steak, pudding
A General Note: The Multiplication Principle
According to the Multiplication Principle, if one event can occur in [latex]m[/latex] ways and a second event can occur in [latex]n[/latex] ways after the first event has occurred, then the two events can occur in [latex]m\times n[/latex] ways. This is also known as the Fundamental Counting Principle.Example 1: Using the Multiplication Principle
Diane packed 2 skirts, 4 blouses, and a sweater for her business trip. She will need to choose a skirt and a blouse for each outfit and decide whether to wear the sweater. Use the Multiplication Principle to find the total number of possible outfits.Solution
To find the total number of outfits, find the product of the number of skirt options, the number of blouse options, and the number of sweater options. There are 16 possible outfits.Try It 2
A restaurant offers a breakfast special that includes a breakfast sandwich, a side dish, and a beverage. There are 3 types of breakfast sandwiches, 4 side dish options, and 5 beverage choices. Find the total number of possible breakfast specials. SolutionFinding the Number of Permutations of n Distinct Objects
The Multiplication Principle can be used to solve a variety of problem types. One type of problem involves placing objects in order. We arrange letters into words and digits into numbers, line up for photographs, decorate rooms, and more. An ordering of objects is called a permutation.Finding the Number of Permutations of n Distinct Objects Using the Multiplication Principle
To solve permutation problems, it is often helpful to draw line segments for each option. That enables us to determine the number of each option so we can multiply. For instance, suppose we have four paintings, and we want to find the number of ways we can hang three of the paintings in order on the wall. We can draw three lines to represent the three places on the wall. There are four options for the first place, so we write a 4 on the first line. After the first place has been filled, there are three options for the second place so we write a 3 on the second line. After the second place has been filled, there are two options for the third place so we write a 2 on the third line. Finally, we find the product. There are 24 possible permutations of the paintings.How To: Given [latex]n[/latex] distinct options, determine how many permutations there are.
- Determine how many options there are for the first situation.
- Determine how many options are left for the second situation.
- Continue until all of the spots are filled.
- Multiply the numbers together.
Example 2: Finding the Number of Permutations Using the Multiplication Principle
At a swimming competition, nine swimmers compete in a race.- How many ways can they place first, second, and third?
- How many ways can they place first, second, and third if a swimmer named Ariel wins first place? (Assume there is only one contestant named Ariel.)
- How many ways can all nine swimmers line up for a photo?
Solution
- Draw lines for each place.There are 9 options for first place. Once someone has won first place, there are 8 remaining options for second place. Once first and second place have been won, there are 7 remaining options for third place.Multiply to find that there are 504 ways for the swimmers to place.
- Draw lines for describing each place.We know Ariel must win first place, so there is only 1 option for first place. There are 8 remaining options for second place, and then 7 remaining options for third place.Multiply to find that there are 56 ways for the swimmers to place if Ariel wins first.
- Draw lines for describing each place in the photo.There are 9 choices for the first spot, then 8 for the second, 7 for the third, 6 for the fourth, and so on until only 1 person remains for the last spot.There are 362,880 possible permutations for the swimmers to line up.
Analysis of the Solution
Note that in part c, we found there were 9! ways for 9 people to line up. The number of permutations of [latex]n[/latex] distinct objects can always be found by [latex]n![/latex].Try It 3
How many ways can the family line up for the portrait? SolutionTry It 4
How many ways can the photographer line up 3 family members? SolutionTry It 5
How many ways can the family line up for the portrait if the parents are required to stand on each end? SolutionFinding the Number of Permutations of n Distinct Objects Using a Formula
For some permutation problems, it is inconvenient to use the Multiplication Principle because there are so many numbers to multiply. Fortunately, we can solve these problems using a formula. Before we learn the formula, let’s look at two common notations for permutations. If we have a set of [latex]n[/latex] objects and we want to choose [latex]r[/latex] objects from the set in order, we write [latex]P\left(n,r\right)[/latex]. Another way to write this is [latex]{n}_{}{P}_{r}[/latex], a notation commonly seen on computers and calculators. To calculate [latex]P\left(n,r\right)[/latex], we begin by finding [latex]n![/latex], the number of ways to line up all [latex]n[/latex] objects. We then divide by [latex]\left(n-r\right)![/latex] to cancel out the [latex]\left(n-r\right)[/latex] items that we do not wish to line up. Let’s see how this works with a simple example. Imagine a club of six people. They need to elect a president, a vice president, and a treasurer. Six people can be elected president, any one of the five remaining people can be elected vice president, and any of the remaining four people could be elected treasurer. The number of ways this may be done is [latex]6\times 5\times 4=120[/latex]. Using factorials, we get the same result.[latex]\frac{6!}{3!}=\frac{6\cdot 5\cdot 4\cdot 3!}{3!}=6\cdot 5\cdot 4=120[/latex]
There are 120 ways to select 3 officers in order from a club with 6 members. We refer to this as a permutation of 6 taken 3 at a time. The general formula is as follows.
[latex]P\left(n,r\right)=\frac{n!}{\left(n-r\right)!}[/latex]
Note that the formula stills works if we are choosing all [latex]n[/latex] objects and placing them in order. In that case we would be dividing by [latex]\left(n-n\right)![/latex] or [latex]0![/latex], which we said earlier is equal to 1. So the number of permutations of [latex]n[/latex] objects taken [latex]n[/latex] at a time is [latex]\frac{n!}{1}[/latex] or just [latex]n!\text{.}[/latex]
A General Note: Formula for Permutations of n Distinct Objects
Given [latex]n[/latex] distinct objects, the number of ways to select [latex]r[/latex] objects from the set in order is[latex]P\left(n,r\right)=\frac{n!}{\left(n-r\right)!}[/latex]
How To: Given a word problem, evaluate the possible permutations.
- Identify [latex]n[/latex] from the given information.
- Identify [latex]r[/latex] from the given information.
- Replace [latex]n[/latex] and [latex]r[/latex] in the formula with the given values.
- Evaluate.
Example 3: Finding the Number of Permutations Using the Formula
A professor is creating an exam of 9 questions from a test bank of 12 questions. How many ways can she select and arrange the questions?Solution
Substitute [latex]n=12[/latex] and [latex]r=9[/latex] into the permutation formula and simplify.[latex]\begin{array}{l}\text{ }P\left(n,r\right)=\frac{n!}{\left(n-r\right)!}\hfill \\ P\left(12,9\right)=\frac{12!}{\left(12 - 9\right)!}=\frac{12!}{3!}=79\text{,}833\text{,}600\hfill \end{array}[/latex]
There are 79,833,600 possible permutations of exam questions!
Analysis of the Solution
We can also use a calculator to find permutations. For this problem, we would enter 15, press the [latex]{}_{n}{P}_{r}[/latex] function, enter 12, and then press the equal sign. The [latex]{}_{n}{P}_{r}[/latex] function may be located under the MATH menu with probability commands.Q & A
Could we have solved using the Multiplication Principle?
Yes. We could have multiplied [latex]15\cdot 14\cdot 13\cdot 12\cdot 11\cdot 10\cdot 9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4[/latex] to find the same answer.Try It 6
How many ways can the 7 actors line up? SolutionTry It 7
How many ways can 5 of the 7 actors be chosen to line up? SolutionFind the Number of Combinations Using the Formula
So far, we have looked at problems asking us to put objects in order. There are many problems in which we want to select a few objects from a group of objects, but we do not care about the order. When we are selecting objects and the order does not matter, we are dealing with combinations. A selection of [latex]r[/latex] objects from a set of [latex]n[/latex] objects where the order does not matter can be written as [latex]C\left(n,r\right)[/latex]. Just as with permutations, [latex]\text{C}\left(n,r\right)[/latex] can also be written as [latex]{}_{n}{C}_{r}[/latex]. In this case, the general formula is as follows.[latex]\text{C}\left(n,r\right)=\frac{n!}{r!\left(n-r\right)!}[/latex]
An earlier problem considered choosing 3 of 4 possible paintings to hang on a wall. We found that there were 24 ways to select 3 of the 4 paintings in order. But what if we did not care about the order? We would expect a smaller number because selecting paintings 1, 2, 3 would be the same as selecting paintings 2, 3, 1. To find the number of ways to select 3 of the 4 paintings, disregarding the order of the paintings, divide the number of permutations by the number of ways to order 3 paintings. There are [latex]3!=3\cdot 2\cdot 1=6[/latex] ways to order 3 paintings. There are [latex]\frac{24}{6}[/latex], or 4 ways to select 3 of the 4 paintings. This number makes sense because every time we are selecting 3 paintings, we are not selecting 1 painting. There are 4 paintings we could choose not to select, so there are 4 ways to select 3 of the 4 paintings.
A General Note: Formula for Combinations of n Distinct Objects
Given [latex]n[/latex] distinct objects, the number of ways to select [latex]r[/latex] objects from the set is[latex]\text{C}\left(n,r\right)=\frac{n!}{r!\left(n-r\right)!}[/latex]
How To: Given a number of options, determine the possible number of combinations.
- Identify [latex]n[/latex] from the given information.
- Identify [latex]r[/latex] from the given information.
- Replace [latex]n[/latex] and [latex]r[/latex] in the formula with the given values.
- Evaluate.
Example 4: Finding the Number of Combinations Using the Formula
A fast food restaurant offers five side dish options. Your meal comes with two side dishes.- How many ways can you select your side dishes?
- How many ways can you select 3 side dishes?
Solution
- We want to choose 2 side dishes from 5 options.
[latex]\text{C}\left(5,2\right)=\frac{5!}{2!\left(5 - 2\right)!}=10[/latex]
- We want to choose 3 side dishes from 5 options.
[latex]\text{C}\left(5,3\right)=\frac{5!}{3!\left(5 - 3\right)!}=10[/latex]
Analysis of the Solution
We can also use a graphing calculator to find combinations. Enter 5, then press [latex]{}_{n}{C}_{r}[/latex], enter 3, and then press the equal sign. The [latex]{}_{n}{C}_{r}[/latex], function may be located under the MATH menu with probability commands.Q & A
Is it a coincidence that parts (a) and (b) in Example 4 have the same answers?
No. When we choose r objects from n objects, we are not choosing [latex]\left(n-r\right)[/latex] objects. Therefore, [latex]C\left(n,r\right)=C\left(n,n-r\right)[/latex].Try It 8
An ice cream shop offers 10 flavors of ice cream. How many ways are there to choose 3 flavors for a banana split? SolutionFinding the Number of Subsets of a Set
We have looked only at combination problems in which we chose exactly [latex]r[/latex] objects. In some problems, we want to consider choosing every possible number of objects. Consider, for example, a pizza restaurant that offers 5 toppings. Any number of toppings can be ordered. How many different pizzas are possible? To answer this question, we need to consider pizzas with any number of toppings. There is [latex]C\left(5,0\right)=1[/latex] way to order a pizza with no toppings. There are [latex]C\left(5,1\right)=5[/latex] ways to order a pizza with exactly one topping. If we continue this process, we get[latex]C\left(5,0\right)+C\left(5,1\right)+C\left(5,2\right)+C\left(5,3\right)+C\left(5,4\right)+C\left(5,5\right)=32[/latex]
There are 32 possible pizzas. This result is equal to [latex]{2}^{5}[/latex].
We are presented with a sequence of choices. For each of the [latex]n[/latex] objects we have two choices: include it in the subset or not. So for the whole subset we have made [latex]n[/latex] choices, each with two options. So there are a total of [latex]2\cdot 2\cdot 2\cdot \dots \cdot 2[/latex] possible resulting subsets, all the way from the empty subset, which we obtain when we say "no" each time, to the original set itself, which we obtain when we say "yes" each time.
A General Note: Formula for the Number of Subsets of a Set
A set containing n distinct objects has [latex]{2}^{n}[/latex] subsets.Example 5: Finding the Number of Subsets of a Set
A restaurant offers butter, cheese, chives, and sour cream as toppings for a baked potato. How many different ways are there to order a potato?Solution
We are looking for the number of subsets of a set with 4 objects. Substitute [latex]n=4[/latex] into the formula.[latex]\begin{array}{l}{2}^{n}={2}^{4}\hfill \\ \text{ }=16\hfill \end{array}[/latex]
There are 16 possible ways to order a potato.
Try It 9
A sundae bar at a wedding has 6 toppings to choose from. Any number of toppings can be chosen. How many different sundaes are possible? SolutionFinding the Number of Permutations of n Non-Distinct Objects
We have studied permutations where all of the objects involved were distinct. What happens if some of the objects are indistinguishable? For example, suppose there is a sheet of 12 stickers. If all of the stickers were distinct, there would be [latex]12![/latex] ways to order the stickers. However, 4 of the stickers are identical stars, and 3 are identical moons. Because all of the objects are not distinct, many of the [latex]12![/latex] permutations we counted are duplicates. The general formula for this situation is as follows.[latex]\frac{n!}{{r}_{1}!{r}_{2}!\dots {r}_{k}!}[/latex]
In this example, we need to divide by the number of ways to order the 4 stars and the ways to order the 3 moons to find the number of unique permutations of the stickers. There are [latex]4![/latex] ways to order the stars and [latex]3![/latex] ways to order the moon.
[latex]\frac{12!}{4!3!}=3\text{,}326\text{,}400[/latex]
There are 3,326,400 ways to order the sheet of stickers.
A General Note: Formula for Finding the Number of Permutations of n Non-Distinct Objects
If there are [latex]n[/latex] elements in a set and [latex]{r}_{1}[/latex] are alike, [latex]{r}_{2}[/latex] are alike, [latex]{r}_{3}[/latex] are alike, and so on through [latex]{r}_{k}[/latex], the number of permutations can be found by[latex]\frac{n!}{{r}_{1}!{r}_{2}!\dots {r}_{k}!}[/latex]
Example 6: Finding the Number of Permutations of n Non-Distinct Objects
Find the number of rearrangements of the letters in the word DISTINCT.Solution
There are 8 letters. Both I and T are repeated 2 times. Substitute [latex]n=8, {r}_{1}=2, [/latex] and [latex] {r}_{2}=2 [/latex] into the formula.[latex]\frac{8!}{2!2!}=10\text{,}080 [/latex]
There are 10,080 arrangements.
Try It 10
Find the number of rearrangements of the letters in the word CARRIER. SolutionKey Equations
number of permutations of [latex]n[/latex] distinct objects taken [latex]r[/latex] at a time | [latex]P\left(n,r\right)=\frac{n!}{\left(n-r\right)!}[/latex] |
number of combinations of [latex]n[/latex] distinct objects taken [latex]r[/latex] at a time | [latex]C\left(n,r\right)=\frac{n!}{r!\left(n-r\right)!}[/latex] |
number of permutations of [latex]n[/latex] non-distinct objects | [latex]\frac{n!}{{r}_{1}!{r}_{2}!\dots {r}_{k}!}[/latex] |
Key Concepts
- If one event can occur in [latex]m[/latex] ways and a second event with no common outcomes can occur in [latex]n[/latex] ways, then the first or second event can occur in [latex]m+n[/latex] ways.
- If one event can occur in [latex]m[/latex] ways and a second event can occur in [latex]n[/latex] ways after the first event has occurred, then the two events can occur in [latex]m\times n[/latex] ways.
- A permutation is an ordering of [latex]n[/latex] objects.
- If we have a set of [latex]n[/latex] objects and we want to choose [latex]r[/latex] objects from the set in order, we write [latex]P\left(n,r\right)[/latex].
- Permutation problems can be solved using the Multiplication Principle or the formula for [latex]P\left(n,r\right)[/latex].
- A selection of objects where the order does not matter is a combination.
- Given [latex]n[/latex] distinct objects, the number of ways to select [latex]r[/latex] objects from the set is [latex]\text{C}\left(n,r\right)[/latex] and can be found using a formula.
- A set containing [latex]n[/latex] distinct objects has [latex]{2}^{n}[/latex] subsets.
- For counting problems involving non-distinct objects, we need to divide to avoid counting duplicate permutations.
Glossary
- Addition Principle
- if one event can occur in [latex]m[/latex] ways and a second event with no common outcomes can occur in [latex]n[/latex] ways, then the first or second event can occur in [latex]m+n[/latex] ways
- combination
- a selection of objects in which order does not matter
- Fundamental Counting Principle
- if one event can occur in [latex]m[/latex] ways and a second event can occur in [latex]n[/latex] ways after the first event has occurred, then the two events can occur in [latex]m\times n[/latex] ways; also known as the Multiplication Principle
- Multiplication Principle
- if one event can occur in [latex]m[/latex] ways and a second event can occur in [latex]n[/latex] ways after the first event has occurred, then the two events can occur in [latex]m\times n[/latex] ways; also known as the Fundamental Counting Principle
- permutation
- a selection of objects in which order matters
Section Exercises
1. Use the Addition Principle of counting to explain how many ways event [latex]A\text{ or }B[/latex] can occur. 2. Use the Multiplication Principle of counting to explain how many ways event [latex]A\text{ and }B[/latex] can occur. Answer the following questions. 3. When given two separate events, how do we know whether to apply the Addition Principle or the Multiplication Principle when calculating possible outcomes? What conjunctions may help to determine which operations to use? 4. Describe how the permutation of [latex]n[/latex] objects differs from the permutation of choosing [latex]r[/latex] objects from a set of [latex]n[/latex] objects. Include how each is calculated. 5. What is the term for the arrangement that selects [latex]r[/latex] objects from a set of [latex]n[/latex] objects when the order of the [latex]r[/latex] objects is not important? What is the formula for calculating the number of possible outcomes for this type of arrangement? For the following exercises, determine whether to use the Addition Principle or the Multiplication Principle. Then perform the calculations. 6. Let the set [latex]A=\left\{-5,-3,-1,2,3,4,5,6\right\}[/latex]. How many ways are there to choose a negative or an even number from [latex]\mathrm{A?}[/latex] 7. Let the set [latex]B=\left\{-23,-16,-7,-2,20,36,48,72\right\}[/latex]. How many ways are there to choose a positive or an odd number from [latex]A?[/latex] 8. How many ways are there to pick a red ace or a club from a standard card playing deck? 9. How many ways are there to pick a paint color from 5 shades of green, 4 shades of blue, or 7 shades of yellow? 10. How many outcomes are possible from tossing a pair of coins? 11. How many outcomes are possible from tossing a coin and rolling a 6-sided die? 12. How many two-letter strings—the first letter from [latex]A[/latex] and the second letter from [latex]B-[/latex] can be formed from the sets [latex]A=\left\{b,c,d\right\}[/latex] and [latex]B=\left\{a,e,i,o,u\right\}?[/latex] 13. How many ways are there to construct a string of 3 digits if numbers can be repeated? 14. How many ways are there to construct a string of 3 digits if numbers cannot be repeated? For the following exercises, compute the value of the expression. 15. [latex]P\left(5,2\right)[/latex] 16. [latex]P\left(8,4\right)[/latex] 17. [latex]P\left(3,3\right)[/latex] 18. [latex]P\left(9,6\right)[/latex] 19. [latex]P\left(11,5\right)[/latex] 20. [latex]C\left(8,5\right)[/latex] 21. [latex]C\left(12,4\right)[/latex] 22. [latex]C\left(26,3\right)[/latex] 23. [latex]C\left(7,6\right)[/latex] 24. [latex]C\left(10,3\right)[/latex] For the following exercises, find the number of subsets in each given set. 25. [latex]\left\{1,2,3,4,5,6,7,8,9,10\right\}[/latex] 26. [latex]\left\{a,b,c,\dots ,z\right\}[/latex] 27. A set containing 5 distinct numbers, 4 distinct letters, and 3 distinct symbols 28. The set of even numbers from 2 to 28 29. The set of two-digit numbers between 1 and 100 containing the digit 0 For the following exercises, find the distinct number of arrangements. 30. The letters in the word "juggernaut" 31. The letters in the word "academia" 32. The letters in the word "academia" that begin and end in "a" 33. The symbols in the string #,#,#,@,@,$,$,$,%,%,%,% 34. The symbols in the string #,#,#,@,@,$,$,$,%,%,%,% that begin and end with "%" 35. The set, [latex]S[/latex] consists of [latex]\text{900,000,000}[/latex] whole numbers, each being the same number of digits long. How many digits long is a number from [latex]S?[/latex] (Hint: use the fact that a whole number cannot start with the digit 0.) 36. The number of 5-element subsets from a set containing [latex]n[/latex] elements is equal to the number of 6-element subsets from the same set. What is the value of [latex]n?[/latex] (Hint: the order in which the elements for the subsets are chosen is not important.) 37. Can [latex]C\left(n,r\right)[/latex] ever equal [latex]P\left(n,r\right)?[/latex] Explain. 38. Suppose a set [latex]A[/latex] has 2,048 subsets. How many distinct objects are contained in [latex]A?[/latex] 39. How many arrangements can be made from the letters of the word "mountains" if all the vowels must form a string? 40. A family consisting of 2 parents and 3 children is to pose for a picture with 2 family members in the front and 3 in the back.- How many arrangements are possible with no restrictions?
- How many arrangements are possible if the parents must sit in the front?
- How many arrangements are possible if the parents must be next to each other?
Licenses & Attributions
CC licensed content, Original
- Precalculus. Provided by: OpenStax Authored by: OpenStax College. Located at: https://cnx.org/contents/[email protected]:1/Preface. License: CC BY: Attribution.