Corequisite Skills for Introductory StatisticsXYZ Homework Edition

3.7 The Multiplication Rule for Counting

The Multiplication Rule for Counting

A source-bound narrated opening with a worked example, an eight-second thinking pause, a checked result, English captions, and a transcript.

Close up of a hand lifting two playing cards at a poker table.
Close up of a hand lifting two playing cards at a poker table.
Figure 3.4 The Multiplication Rule for Counting allows us to compute more complicated probabilities, like drawing two aces from a deck.The Multiplication Rule for Counting allows us to compute more complicated probabilities, like drawing two aces from a deck. (credit: “Pair of Aces – Poker” by Poker Photos/Flickr, CC BY 2.0)

One of the first bits of mathematical knowledge children learn is how to count objects by pointing to them in turn and saying: “one, two, three, …” That’s a useful skill, but when the number of things that we need to count grows large, that method becomes onerous (or, for very large numbers, impossible for humans to accomplish in a typical human lifespan). So, mathematicians have developed short cuts to counting big numbers. These techniques fall under the mathematical discipline of combinatorics, which is devoted to counting.

Multiplication as a Combinatorial Short Cut

One of the first combinatorial short cuts to counting students learn in school has to do with areas of rectangles. If we have a set of objects to be counted that can be physically arranged into a rectangular shape, then we can use multiplication to do the counting for us. Consider this set of objects (Figure 3.5):

A group of beach balls arranged in 1 long row.
A group of beach balls arranged in 1 long row.
Figure 3.5

Certainly we can count them by pointing and running through the numbers, but it’s more efficient to group them (Figure 3.6).

A group of beach balls arranged in 4 rows of 6 balls.
A group of beach balls arranged in 4 rows of 6 balls.
Figure 3.6

If we group the balls by 4s, we see that we have 6 groups (or, we can see this arrangement as 4 groups of 6 balls). Since multiplication is repeated addition (i.e., 6×4=4+4+4+4+4+4), we can use this grouping to quickly see that there are 24 balls.

Let’s generalize this idea a little bit. Let’s say that we’re visiting a bakery that offers customized cupcakes. For the cake, we have three choices: vanilla, chocolate, and strawberry. Each cupcake can be topped with one of four types of frosting: vanilla, chocolate, lemon, and strawberry. How many different cupcake combinations are possible? We can think of laying out all the possibilities in a grid, with cake choices defining the rows and frosting choices defining the columns (Figure 3.7).

from itertools import product

# The bakery, exactly as the section sets it up.
cakes     = ["vanilla", "chocolate", "strawberry"]
frostings = ["vanilla", "chocolate", "lemon", "strawberry"]

outcomes = list(product(cakes, frostings))
print(f"{len(cakes)} cakes x {len(frostings)} frostings = {len(cakes) * len(frostings)}")
print(f"and the list really does have {len(outcomes)} entries:\n")
for i, (cake, frosting) in enumerate(outcomes, 1):
    print(f"  {i:>2}. {cake:<10} cake with {frosting} frosting")

print()
print("The rule does not care that the stages are different sizes, or that")
print("they are different KINDS of thing. Add a third stage and it still holds:")
sprinkles = ["none", "rainbow"]
print(f"  {len(cakes)} x {len(frostings)} x {len(sprinkles)} = "
      f"{len(list(product(cakes, frostings, sprinkles)))}")

print()
print("When every stage offers the SAME choices, the product collapses to a power:")
for k in (1, 2, 3, 4):
    print(f"  {k} scoop(s) from {len(frostings)} frostings, repeats allowed: "
          f"{len(frostings)}^{k} = {len(frostings) ** k}")
print()
print("Change `cakes` or `frostings` and the product moves; the power table")
print("below it depends on `frostings` alone, because that is the stage being")
print("repeated.")
A rectangular grid with 3 rows and 4 columns. The row headers representing the cakes show vanilla, chocolate, and strawberry. The column headers representing the frostings show vanilla, chocolate, lemon, and strawberry. Data from the grid are as follows. Row 1: vanilla cake with vanilla frosting, vanilla cake with chocolate frosting, vanilla cake with lemon frosting, and vanilla cake with strawberry frosting. Row 2: chocolate cake with vanilla frosting, chocolate cake with chocolate frosting, chocolate cake with lemon frosting, and chocolate cake with strawberry frosting. Row 3: strawberry cake with vanilla frosting, strawberry cake with chocolate frosting, strawberry cake with lemon frosting, and strawberry cake with strawberry frosting.
A rectangular grid with 3 rows and 4 columns. The row headers representing the cakes show vanilla, chocolate, and strawberry. The column headers representing the frostings show vanilla, chocolate, lemon, and strawberry. Data from the grid are as follows. Row 1: vanilla cake with vanilla frosting, vanilla cake with chocolate frosting, vanilla cake with lemon frosting, and vanilla cake with strawberry frosting. Row 2: chocolate cake with vanilla frosting, chocolate cake with chocolate frosting, chocolate cake with lemon frosting, and chocolate cake with strawberry frosting. Row 3: strawberry cake with vanilla frosting, strawberry cake with chocolate frosting, strawberry cake with lemon frosting, and strawberry cake with strawberry frosting.
Figure 3.7

Since there are 3 rows (cakes) and 4 columns (frostings), we have 3×4=12 possible combinations. This is the reasoning behind the Multiplication Rule for Counting, which is also known as the Fundamental Counting Principle. This rule says that if there are n choices for the first task and, for each first choice, m choices for the second task, then there are n×m ways to accomplish both tasks. We can tack on additional tasks by multiplying the number of ways to accomplish those tasks to our previous product. Each additional task must likewise offer its stated number of choices for every earlier choice sequence. Publisher note: in the license-plate and ID-code examples, count the stated unrestricted formats. Letters and digits may repeat, leading zeroes are allowed, and each unrestricted letter position has 26 choices.

An ice-cream parlor sells 26 different flavors of ice cream. A basic sundae has one scoop of any flavor of ice cream, your choice of one of 3 sauces, and any one of 8 different toppings.

How many different basic sundaes are possible?

The ice-cream parlor also sells a medium sundae. The options are the same except it starts with 2 scoops of ice cream, which can be the same flavor or different flavors. For this counting model, distinguish the first scoop position from the second: exchanging different flavors between those positions counts as a different outcome. Choose one sauce and one topping independently. How many ordered medium-sundae outcomes are there?

The ice-cream parlor also sells a large sundae. The choice of a large sundae allows you to choose any 3 scoops of ice cream, any 2 sauces (they can be the same, or you can choose 2 different ones), and any 3 toppings (that might be 3 servings of the same topping, or 2 servings of one topping and a single serving of another, or 3 different toppings). For this counting model, distinguish all three scoop positions, both sauce-serving positions, and all three topping-serving positions. Choices in every position are independent and may repeat; exchanging different choices between positions counts as a different outcome. How many ordered large-sundae outcomes are possible?

A company that builds custom computers offers 4 hard drive sizes, 4 memory sizes, 3 graphics cards, and 3 display options. How many computer configurations do they offer, if customers choose one of each customization?

A video game allows users to customize their avatars. There are 12 hair styles that users may choose from, as well as 5 hair colors, 8 skin tones, 24 shirts, 12 pants, and 8 shoes. How many different avatars are possible?

A small company has 3 divisions: Sales, Research and Development, and Manufacturing. One person from each division will be chosen to create an advisory board for the management group. If there are 8 people in Sales, 15 in Research and Development, and 48 in Manufacturing, how many different compositions of the advisory board are possible?

A multiple-choice quiz has 5 questions, each of which has 4 possible answers. How many different ways are there to respond to this quiz?

The teacher decides to make the quiz from above a little harder by offering 5 responses on each of the 5 questions. How many ways are there to respond to this quiz?

For a simplified model of U.S. broadcast call-sign formats, consider four-letter strings. The first letter is either K or W; each remaining position can use any of the 26 letters in the alphabet, and letters may repeat. How many four-letter strings are possible under this model? This counts the stated formats, not assigned or available call signs.

Little sister has asked big brother to play a new game she’s invented. It uses a modified deck of cards with 3 suits and only the numbered cards (those with rank 2 through 10). How many cards are in her deck?

The board game Mastermind has 2 players. One of them is designated the codemaker who creates a code that consists of a series of 4 colors (indicated in the game with 4 colored pegs), which may contain repeats. The other player, who is the codebreaker, tries to guess the code. If there are 6 colors that the codemaker can use to make the code, how many possible codes can be made?

Corequisite Skills for Introductory Statistics is a custom course edition compiled for Introductory Statistics corequisite courses from OpenStax Contemporary Mathematics, Elementary Algebra 2e, Intermediate Algebra 2e, Prealgebra 2e. Content by OpenStax is reproduced as published, apart from any corrections recorded for this edition. Sections are renumbered to follow the course outline. The course outline is adapted from Larry Green's Support Course for Elementary Statistics (LibreTexts, https://stats.libretexts.org/Bookshelves/Introductory_Statistics/Support_Course_for_Elementary_Statistics), used under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Lessons 2.4 and 6.7 are written for this edition by XYZ Homework. Every OpenStax lesson is abridged to the subsections and practice exercises this course uses. Lessons are headed with their course titles, not the source section titles. Access the complete originals free at openstax.org. License: CC-BY-NC-SA-4.0.

⇩ Download ▾

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.