Learning

open
close

Counting Principles

June 23, 2024 | by Bloom Code Studio

Learning Objectives

In this section, you will:

  • Solve counting problems using the Addition Principle.
  • Solve counting problems using the Multiplication Principle.
  • Solve counting problems using permutations involving n distinct objects.
  • Solve counting problems using combinations.
  • Find the number of subsets of a given set.
  • Solve counting problems using permutations involving n non-distinct objects.

A new company sells customizable cases for tablets and smartphones. Each case comes in a variety of colors and can be personalized for an additional fee with images or a monogram. A customer can choose not to personalize or could choose to have one, two, or three images or a monogram. The customer can choose the order of the images and the letters in the monogram. The company is working with an agency to develop a marketing campaign with a focus on the huge number of options they offer. Counting the possibilities is challenging!

We encounter a wide variety of counting problems every day. There is a branch of mathematics devoted to the study of counting problems such as this one. Other applications of counting include secure passwords, horse racing outcomes, and college scheduling choices. We will examine this type of mathematics in this section.

Using the Addition Principle

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.

The addition of 3 iPods and 4 iPhones.

Figure 1

THE ADDITION PRINCIPLE

According to the Addition Principle, if one event can occur in m๐‘š ways and a second event with no common outcomes can occur in n๐‘› ways, then the first or second event can occur in m+n๐‘š+๐‘› 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.The addition of the type of options for an entree.

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?

Using 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.

A tree diagram of the different menu combinations.

Figure 2

The possible choices are:

  1. soup, chicken, cake
  2. soup, chicken, pudding
  3. soup, fish, cake
  4. soup, fish, pudding
  5. soup, steak, cake
  6. soup, steak, pudding
  7. salad, chicken, cake
  8. salad, chicken, pudding
  9. salad, fish, cake
  10. salad, fish, pudding
  11. salad, steak, cake
  12. salad, steak, pudding

We can also find the total number of possible dinners by multiplying.

We could also conclude that there are 12 possible dinner choices simply by applying the Multiplication Principle.

#of appetizer options ร—              2                  ร—#of entree options ร—             3              ร—#of dessert options              2=12#of appetizer options ร—#of entree options ร—#of dessert options              2                  ร—             3              ร—              2=12

THE MULTIPLICATION PRINCIPLE

According to the Multiplication Principle, if one event can occur in m๐‘š ways and a second event can occur in n๐‘› ways after the first event has occurred, then the two events can occur in mร—n๐‘šร—๐‘› ways. This is also known as the Fundamental Counting Principle.

EXAMPLE 2

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.The multiplication of number of skirt options (2) times the number of blouse options (4) times the number of sweater options (2) which equals 16.

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.

Finding 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.Four times two blanks spots.

After the first place has been filled, there are three options for the second place so we write a 3 on the second line.Four times three times one blank spot.

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 n๐‘› distinct options, determine how many permutations there are.

  1. Determine how many options there are for the first situation.
  2. Determine how many options are left for the second situation.
  3. Continue until all of the spots are filled.
  4. Multiply the numbers together.

EXAMPLE 3

Finding the Number of Permutations Using the Multiplication Principle

At a swimming competition, nine swimmers compete in a race.

  1. โ“How many ways can they place first, second, and third?
  2. โ“‘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.)
  3. โ“’How many ways can all nine swimmers line up for a photo?

Solution

  1. โ“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.
  2. โ“‘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.
  3. โ“’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

Note that in part c, we found there were 9! ways for 9 people to line up. The number of permutations of n๐‘› distinct objects can always be found by n!.๐‘›!.

A family of five is having portraits taken. Use the Multiplication Principle to find the following.

TRY IT #3

How many ways can the family line up for the portrait?

TRY IT #4

How many ways can the photographer line up 3 family members?

TRY IT #5

How many ways can the family line up for the portrait if the parents are required to stand on each end?

Finding 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 n๐‘› objects and we want to choose r๐‘Ÿ objects from the set in order, we write P(n,r).๐‘ƒ(๐‘›,๐‘Ÿ). Another way to write this is nPr,๐‘›๐‘ƒ๐‘Ÿ, a notation commonly seen on computers and calculators. To calculate P(n,r),๐‘ƒ(๐‘›,๐‘Ÿ), we begin by finding n!,๐‘›!, the number of ways to line up all n๐‘› objects. We then divide by (nโˆ’r)!(๐‘›โˆ’๐‘Ÿ)! to cancel out the (nโˆ’r)(๐‘›โˆ’๐‘Ÿ) 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 6ร—5ร—4=120.6ร—5ร—4=120. Using factorials, we get the same result.

6!3!=6โ‹…5โ‹…4โ‹…3!3!=6โ‹…5โ‹…4=1206!3!=6ยท5ยท4ยท3!3!=6ยท5ยท4=120

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.

P(n,r)=n!(nโˆ’r)!๐‘ƒ(๐‘›,๐‘Ÿ)=๐‘›!(๐‘›โˆ’๐‘Ÿ)!

Note that the formula stills works if we are choosing underlineallend underline n๐‘› objects and placing them in order. In that case we would be dividing by (nโˆ’n)!(๐‘›โˆ’๐‘›)! or 0!,0!, which we said earlier is equal to 1. So the number of permutations of n๐‘› objects taken n๐‘› at a time is n!1๐‘›!1 or just n!.๐‘›!.

FORMULA FOR PERMUTATIONS OF N DISTINCT OBJECTS

Given n๐‘› distinct objects, the number of ways to select r๐‘Ÿ objects from the set in order is

P(n,r)=n!(nโˆ’r)!๐‘ƒ(๐‘›,๐‘Ÿ)=๐‘›!(๐‘›โˆ’๐‘Ÿ)!

HOW TO

Given a word problem, evaluate the possible permutations.

  1. Identifyย n๐‘›ย from the given information.
  2. Identifyย r๐‘Ÿย from the given information.
  3. Replaceย n๐‘›ย andย r๐‘Ÿย in the formula with the given values.
  4. Evaluate.

EXAMPLE 4

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 n=12๐‘›=12 and r=9๐‘Ÿ=9 into the permutation formula and simplify.

 P(n,r)=n!(nโˆ’r)!P(12,9)=12!(12โˆ’9)!=12!3!=79,833,600 ๐‘ƒ(๐‘›,๐‘Ÿ)=๐‘›!(๐‘›โˆ’๐‘Ÿ)!๐‘ƒ(12,9)=12!(12โˆ’9)!=12!3!=79,833,600

There are 79,833,600 possible permutations of exam questions!

Analysis

We can also use a calculator to find permutations. For this problem, we would enter 12, press the nPr๐‘›๐‘ƒ๐‘Ÿ function, enter 9, and then press the equal sign. The nPr๐‘›๐‘ƒ๐‘Ÿ function may be located under the MATH menu with probability commands.

Q&A

Could we have solvedย Example 4ย using the Multiplication Principle?

Yes. We could have multiplied 12โ‹…11โ‹…10โ‹…9โ‹…8โ‹…7โ‹…6โ‹…5โ‹…412โ‹…11โ‹…10โ‹…9โ‹…8โ‹…7โ‹…6โ‹…5โ‹…4 to find the same answer.

A play has a cast of 7 actors preparing to make their curtain call. Use the permutation formula to find the following.

TRY IT #6

How many ways can the 7 actors line up?

TRY IT #7

How many ways can 5 of the 7 actors be chosen to line up?

Find 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 r๐‘Ÿ objects from a set of n๐‘› objects where the order does not matter can be written as C(n,r).๐ถ(๐‘›,๐‘Ÿ). Just as with permutations, C(n,r)C(๐‘›,๐‘Ÿ) can also be written as nCr.๐‘›๐ถ๐‘Ÿ. In this case, the general formula is as follows.

C(n,r)=n!r!(nโˆ’r)!C(๐‘›,๐‘Ÿ)=๐‘›!๐‘Ÿ!(๐‘›โˆ’๐‘Ÿ)!

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 3!=3โ‹…2โ‹…1=63!=3ยท2ยท1=6 ways to order 3 paintings. There are 246,246, 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.

FORMULA FOR COMBINATIONS OF N DISTINCT OBJECTS

Given n๐‘› distinct objects, the number of ways to select r๐‘Ÿ objects from the set is

C(n,r)=n!r!(nโˆ’r)!C(๐‘›,๐‘Ÿ)=๐‘›!๐‘Ÿ!(๐‘›โˆ’๐‘Ÿ)!

HOW TO

Given a number of options, determine the possible number of combinations.

  1. Identifyย n๐‘›ย from the given information.
  2. Identifyย r๐‘Ÿย from the given information.
  3. Replaceย n๐‘›ย andย r๐‘Ÿย in the formula with the given values.
  4. Evaluate.

EXAMPLE 5

Finding the Number of Combinations Using the Formula

A fast food restaurant offers five side dish options. Your meal comes with two side dishes.

  1. โ“How many ways can you select your side dishes?
  2. โ“‘How many ways can you select 3 side dishes?

Solution

  1. โ“We want to choose 2 side dishes from 5 options.C(5,2)=5!2!(5โˆ’2)!=10C(5,2)=5!2!(5โˆ’2)!=10
  2. โ“‘We want to choose 3 side dishes from 5 options.C(5,3)=5!3!(5โˆ’3)!=10C(5,3)=5!3!(5โˆ’3)!=10

Analysis

We can also use a graphing calculator to find combinations. Enter 5, then press nCr,๐‘›๐ถ๐‘Ÿ, enter 3, and then press the equal sign. The nCr,๐‘›๐ถ๐‘Ÿ, function may be located under the MATH menu with probability commands.

Q&A

Is it a coincidence that parts (a) and (b) inย Example 5ย have the same answers?

No. When we choose r objects from n objects, we areย notย choosingย (nโ€“r)(๐‘›โ€“๐‘Ÿ)ย objects. Therefore,ย C(n,r)=C(n,nโ€“r).๐ถ(๐‘›,๐‘Ÿ)=๐ถ(๐‘›,๐‘›โ€“๐‘Ÿ).

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?

Finding the Number of Subsets of a Set

We have looked only at combination problems in which we chose exactly r๐‘Ÿ 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 C(5,0)=1๐ถ(5,0)=1 way to order a pizza with no toppings. There are C(5,1)=5๐ถ(5,1)=5 ways to order a pizza with exactly one topping. If we continue this process, we get

C(5,0)+C(5,1)+C(5,2)+C(5,3)+C(5,4)+C(5,5)=32๐ถ(5,0)+๐ถ(5,1)+๐ถ(5,2)+๐ถ(5,3)+๐ถ(5,4)+๐ถ(5,5)=32

There are 32 possible pizzas. This result is equal to 25.25.

We are presented with a sequence of choices. For each of the n๐‘› objects we have two choices: include it in the subset or not. So for the whole subset we have made n๐‘› choices, each with two options. So there are a total of 2โ‹…2โ‹…2โ‹…โ€ฆโ‹…22ยท2ยท2ยทโ€ฆยท2 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.

FORMULA FOR THE NUMBER OF SUBSETS OF A SET

A set containing n distinct objects has 2n2๐‘› subsets.

EXAMPLE 6

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 n=4๐‘›=4 into the formula.

2n=24   =162๐‘›=24   =16

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?

Finding 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 12!12! 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 12!12! permutations we counted are duplicates. The general formula for this situation is as follows.

n!r1!r2!โ€ฆrk!๐‘›!๐‘Ÿ1!๐‘Ÿ2!โ€ฆ๐‘Ÿ๐‘˜!

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 4!4! ways to order the stars and 3!3! ways to order the moon.

12!4!3!=3,326,40012!4!3!=3,326,400

There are 3,326,400 ways to order the sheet of stickers.

FORMULA FOR FINDING THE NUMBER OF PERMUTATIONS OF N NON-DISTINCT OBJECTS

If there are n๐‘› elements in a set and r1๐‘Ÿ1 are alike, r2๐‘Ÿ2 are alike, r3๐‘Ÿ3 are alike, and so on through rk,๐‘Ÿ๐‘˜, the number of permutations can be found by

n!r1!r2!โ€ฆrk!๐‘›!๐‘Ÿ1!๐‘Ÿ2!โ€ฆ๐‘Ÿ๐‘˜!

EXAMPLE 7

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 n=8, r1=2, ๐‘›=8, ๐‘Ÿ1=2,  and  r2=2  ๐‘Ÿ2=2  into the formula.

8!2!2!=10,080 8!2!2!=10,080 

There are 10,080 arrangements.

TRY IT #10

Find the number of rearrangements of the letters in the word CARRIER.

RELATED POSTS

View all

view all