Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

5.4: Counting Methods

( \newcommand{\kernel}{\mathrm{null}\,}\)

Learning Objectives

Students will be able to:

  • Apply the multiplication rule to quickly count the number of possible outcomes.
  • Count the number of different possible arrangements by using the permutation rule.
  • Count the number of different possible groupings by using the combinations rule.

Recall that

P(A)= number of ways for A to occur  total number of outcomes 

for theoretical probabilities. So far the problems we have looked at had rather small total number of outcomes. We could easily count the number of elements in the sample space. If there are a large number of elements in the sample space we can use counting techniques such as permutations or combinations to count them.

Multiplication Principle and Tree Diagrams

The simplest of the counting techniques is the multiplication principle. A tree diagram is a useful tool for visualizing the multiplication principle.

Example 5.4.1: Multiplication Principle for a Three Course Dinner

Let’s say that a person walks into a restaurant for a three course dinner. There are four different salads, three different entrees, and two different desserts to choose from. Assuming the person wants to eat a salad, an entrée and a desert, how many different meals are possible?

Solution

imageedit_1_8071501825.png
Figure 5.4.1: Tree Diagram for Three-Course Dinner

Looking at the tree diagram we can see that the total number of meals is 4×3×2=24meals.

Definition: Multiplication Principle

If there are n1 ways to of choosing the first item, n2 ways of choosing the second item after the first item is chosen, n3 ways of choosing the third item after the first two have been chosen, and so on until there are nk ways of choosing the last item after the earlier choices, then the total number of choices overall is given by

n1×n2×n3×n4×n5...×nk.

Example 5.4.2: Multiplication Principle for Lining up People

Let’s look at the number of ways that four people can line up. We can choose any of the four people to be first. Then there are three people who can be second and two people who can be third. At this point there is only one person left to be last. Using the multiplication principle there are

4×3×2×1=24ways

for four people to line up.

This type of calculation occurs frequently in counting problems so we have some notation to simplify the problem.

Definition: Factorial

The factorial of n, read “n factorial” is

n!=n(n1)(n2)(n3)...(2)(1).

By this definition, 0!=1.

Example 5.4.3: Factorials

5!=5×4×3×2×1=1208!=8×7×6×5×4×3×2×1=40,320

Factorials get very large very fast.

20!=2.43×1018

and

40!=8.16×1047.

70! is larger than most calculators can handle.

The multiplication principle may seem like a very simple idea but it is very powerful. Many complex counting problems can be solved using the multiplication principle.

Example 5.4.4: Multiplication Principle for License Plates

Some license plates in Arizona consist of three digits followed by three letters. How many license plates of this type are possible if:

  1. There are 10 digits (0, 1, 2, 3, …, 9) and 26 letters. (101010)(262626)digits=17,576,000license plates 
  2. letters can be repeated but digits cannot? (10_9_8_)(262626)letters=12,654,720license plates
  3. the first digit cannot be zero and both digits and letters can be repeated? (9_10_10_)digits(26_2626)letters=15,818,400license plates
  4. neither digits nor numbers can be repeated. (10_9_8_)digits(26_25_24_)letters=11,232,000license plates

Permutations

Consider the following counting problems:

  1. In how many ways can three runners finish a race?
  2. In how many ways can a group of three people be chosen to work on a project?

What is the difference between these two problems? In the first problem the order that the runners finish the race matters. In the second problem the order in which the three people are chosen is not important, only which three people are chosen matters.

Definition: Permutation

A permutation is an arrangement of a set of items. The number of permutations of n items taking r at a time is given by:​​​

P(n,r)=n!(nr)!

Note: Many calculators can calculate permutations directly. Look for a function that looks like nPr or P(n,r)

Example 5.4.5: Permutation for Race Cars

Let’s look at a simple example to understand the formula for the number of permutations of a set of objects. Assume that 10 cars are in a race. In how many ways can three cars finish in first, second and third place? The order in which the cars finish is important. Use the multiplication principle. There are 10 possible cars to finish first. Once a car has finished first, there are nine cars to finish second. After the second car is finished, any of the eight remaining cars can finish third. 10 x 9 x 8 = 720. This is a permutation of 10 items taking three at a time.

Using the permutation formula (Equation ???):

P(10,3)=10!(103)!=10!7!=109876543217654321=1098=720

Using the multiplication principle (Equation ???):

10_9_8_=720

There are 720 different ways for cars to finish in the top three places.

Example 5.4.6: Permutation for Orchestra Programs

The school orchestra is planning to play six pieces of music at their next concert. How many different programs are possible?

Solution

This is a permutation because they are arranging the songs in order to make the program. Using the permutation formula (Equation ???):

P(6,6)=6!(66)!=6!0!=7201=720

Using the multiplication principle (Equation ???):

6_5_4_3_2_1_=720

There are 720 different ways of arranging the songs to make the program.

Example 5.4.7: Permutation for Club Officers

The Volunteer Club has 18 members. An election is held to choose a president, vice-president and secretary. In how many ways can the three officers be chosen?

Solution

The order in which the officers are chosen matters so this is a permutation.

Using the permutation formula (Equation ???):

P(18,3)=18!(183)!=18!15!=1876=4896

Note: All digits in 18! in the numerator from 15 down to one will cancel with the 15! in the denominator.

Using the multiplication principle (Equation ???):

18_17_16_=4896Pres.V.P.Sec.

There are 4896 different ways the three officers can be chosen.

Another notation for permutations is nPr. So, P(18,3) can also be written as 18P3. Most scientific calculators have an nPr button or function.

Combinations

Example 5.4.8: Formula for Combinations

Choose a committee of two people from persons A, B, C, D and E. By the multiplication principle there are \*5 \cdot 4 = 20\) ways to arrange the two people.

AB AC AD AE BA BC BD BE CA CB

CD CE DA DB DC DE EA EB EC ED

Committees AB and BA are the same committee. Similarly for committees CD and DC. Every committee is counted twice.

202=10

so there are 10 possible different committees.

Now choose a committee of three people from persons A, B, C, D and E. There are 543=60 ways to pick three people in order. Think about the committees with persons A, B and C. There are 3!=6 of them.

ABC ACB BAC BCA CAB CBA

Each of these is counted as one of the 60 possibilities but they are the same committee. Each committee is counted six times so there are

606=10different committees.

In both cases we divided the number of permutations by the number of ways to rearrange the people chosen.

The number of permutations of n people taking r at a time is P(n,r) and the number of ways to rearrange the people chosen is r!. Putting these together we get

n!# ways to arrange r items =P(n,r)r!=(nr)!r!1=n!(nr)!1r!=n!(nr)!r!

Definition: Combination

A combination is a selection of objects in which the order of selection does not matter. The number of combinations of n items taking r at a time is:

C(n,r)=n!r!(nr)!

Note: Many calculators can calculate combinations directly. Look for a function that looks like nCr or (C(n,r)).

Example 5.4.9: Combination for Picking Books

A student has a summer reading list of eight books. The student must read five of the books before the end of the summer. In how many ways can the student read five of the eight books?

Solution

The order of the books is not important, only which books are read. This is a combination of eight items taking five at a time.

C(8,5)=8!5!(85)!=8!5!3!=8×7×6×5×4×3×2×15×4×3×2×1=8×7×63×2×1=8×7=56

There are 56 ways to choose five of the books to read.

Example 5.4.10: Combination for Halloween Candy

A child wants to pick three pieces of Halloween candy to take in her school lunch box. If there are 13 pieces of candy to choose from, how many ways can she pick the three pieces?

Solution

This is a combination because it does not matter in what order the candy is chosen.

C(13,3)=13!3!(133)!=13!3!10!=13×12×11×10×9×8×7×6×5×4×3×2×1(3×2×1)(10×9×8×7×6×5×4×3×2×1=13×12×113×2×1=17166=286

There are 286 ways to choose the three pieces of candy to pack in her lunch.

Note: The difference between a combination and a permutation is whether order matters or not. If the order of the items is important, use a permutation. If the order of the items is not important, use a combination.

Example 5.4.11: Permutation or Combination for Bicycle Serial Numbers

A serial number for a particular model of bicycle consists of a letter followed by four digits and ends with two letters. Neither letters nor numbers can be repeated. How many different serial numbers are possible?

Solution

This is a permutation because the order matters.

Use the multiplication principle to solve this. There are 26 letters and 10 digits possible.

26109_8_7_25_24_=78,624,000

There are 78,624,000 different serial numbers of this form.

Example 5.4.12: Permutation or Combination for Choosing Men and Women

A class consists of 15 men and 12 women. In how many ways can two men and two women be chosen to participate in an in-class activity?

Solution

This is a combination since the order in which the people is chosen is not important.

Choose two men:

C(15,2)=15!2!(152)!=15!2!13!=105

Choose two women:

C(12,2)=12!2!(122)!=12!2!10!=66

We want 2 men and 2 women so multiply these results.

105(66)=6930

There are 6930 ways to choose two men and two women to participate.

Probabilities Involving Permutations and Combinations

Now that we can calculate the number of permutations or combinations, we can use that information to calculate probabilities.

Example 5.4.13: Probability with a Combination for Choosing Students

There are 20 students in a class. Twelve of the students are women. The names of the students are put into a hat and five names are drawn. What is the probability that all of the chosen students are women?

Solution

This is a combination because the order of choosing the students is not important.

P( all females )=# ways to pick 5 women # ways to pick 5 students 

The number of way to choose 5 women is

C(12,5)=792

The number of ways to choose 5 students is

C(20,5)=15,504

P( all females )=# ways to pick 5 women # ways to pick 5 students =79215,504=0.051

The probability that all the chosen students are women is 0.051 or 5.1%.

Example 5.4.14: Probability with a Permutation for a Duck Race

The local Boys and Girls Club holds a duck race to raise money. Community members buy a rubber duck marked with a numeral between 1 and 30, inclusive. The box of 30 ducks is emptied into a creek and allowed to float downstream to the finish line. What is the probability that ducks numbered 5, 18 and 21 finish in first, second and third, respectively?

Solution

This is a permutation since the order of finish is important.

P(5,18&21 finish 1 st, 2 nd & 3 rd)=# ways 5,18&21 finish 1 st, 2 nd &3rd# ways any ducks can finish 1 st, 2 nd & 3rd 

There is only one way that the ducks can finish with #5 in first, #18 in second and #21 in third.

The number of ways any ducks can finish in first, second and third is

P(30,3)=24,360

P(5,18&21 finish 1 st, 2 nd &3rd)=# ways 5,18&21 finish 1 st, 2 nd &3 rd # ways any ducks can finish 1st,,2nd&3 rd=124,3604.10x105

The probability that ducks numbered 5, 18 and 21 finish in first, second and third, respectively, is approximately 0.000041 or 0.0041%.

Example 5.4.15: Probability with a Permutation for Two-Card Poker Hands

A poker hand consists of two cards. What is the probability that the poker hand consists of two jacks or two fives?

Solution

It’s not possible to get two jacks and two fives at the same time so these are mutually exclusive events.

The number of ways to get two jacks is

C(4,2)=6.

The number of ways to get two fives is

C(4,2)=6

The number of ways to get two jacks or two fives is

6+6=12

The total number of ways to get a 2-card poker hand is

C(52,2)=1326

P(2 jacks or 2 fives )= number of ways to get 2 jacks or 2 fives  number of ways to choose 2 cards =1213260.009

The probability of getting two jacks or two fives is approximately 0.009 or 0.9%.

Example 5.4.16: Probability with a Combination for Rotten Apples

A basket contains 10 good apples and two bad apples. If a distracted shopper reaches into the basket and picks three apples without looking, what is the probability he gets one bad apple?

Solution

This is a combination since the order in which the apples were picked is not important. He picks three apples total. If one apple is bad the other two must be good. Find the probability of one bad apple and two good apples.

P( one bad and two good apples )=# ways to get one bad and two good apples # ways to get three apples 

The number of ways to get one bad and two good apples is

C(2,1)C(10,2)=245=90

The number of ways to get three apples is

C(10,3)=120

P( one bad and two good apples )=# ways to get one bad and two good apples # ways to get three apples =90120=0.75

The probability of getting one bad apple out of three apples is 0.75 or 75%


This page titled 5.4: Counting Methods is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Maxie Inigo, Jennifer Jameson, Kathryn Kozak, Maya Lanzetta, & Kim Sonier via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?