Sum & Product
Rules
Master the two fundamental counting principles that form the backbone of combinatorics and discrete mathematics.
What is Counting?
In discrete math, counting means determining the number of ways to perform a task or select objects from a set. This is the foundation of combinatorics: the branch of mathematics that deals with finite or countable structures.
Two rules govern nearly all counting arguments: the Sum Rule (for "or" situations) and the Product Rule (for "and" situations).
The Sum Rule
If a task can be done in one of two mutually exclusive ways: either by method \(A\) with \(n_1\) options, or by method \(B\) with \(n_2\) options, then the total number of ways is:
The word "or" is your signal: "you can pick from set \(A\) or set \(B\)." Since the options don't overlap, you simply add them.
Sum Rule Visualized
The Product Rule
If a task consists of a sequence of two steps: step 1 can be done in \(n_1\) ways, and then step 2 can be done in \(n_2\) ways (regardless of how step 1 was done), then the total number of ways is:
The word "and" is your signal: "first choose from step 1, and then choose from step 2." Each choice at step 1 pairs with every choice at step 2.
Product Rule Visualized
Formal Definitions
Sum vs Product: The Key
| Sum Rule | Product Rule | |
|---|---|---|
| Keyword | "or" | "and" / "then" |
| Operation | Addition | Multiplication |
| Tasks | Choose one alternative | Complete a sequence of steps |
| Set operation | \(A \cup B\) (disjoint union) | \(A \times B\) (Cartesian product) |
| Requirement | Sets must be disjoint | Steps must be independent |
| Example cue | "Pick a book or a movie" | "Pick a shirt and pants" |
How to Apply the Rules
Example 1: Sum Rule
A student must choose an elective: either a math course (5 options) or a science course (4 options). No course counts as both. How many choices are there?
Example 2: Product Rule
A license plate has one letter followed by two digits. How many distinct plates are possible?
Example 3: Both Rules Together
A password is either 3 lowercase letters or 2 digits followed by 1 uppercase letter. How many passwords exist?
Example 4: Bit Strings
How many bit strings of length 8 either start with 1 or end with 00?
Generalized Forms
Common Mistakes
Summary Table
| Sum Rule | Product Rule | |
|---|---|---|
| Formula | \( n_1 + n_2 + \cdots \) | \( n_1 \times n_2 \times \cdots \) |
| Signal words | "or", "either", "alternatively" | "and", "then", "followed by" |
| Condition | Disjoint alternatives | Independent sequential steps |
| Set notation | \( |A \cup B| \) | \( |A \times B| \) |
| Typical answer | Moderate (sum of parts) | Large (product grows fast) |
Question 1 of 5
A restaurant offers 6 appetizers and 10 main courses. If a diner orders one appetizer and one main course, how many meals are possible?
Question 2 of 5
You can travel from A to B by bus (3 routes) or train (5 routes). How many ways can you travel from A to B?
Question 3 of 5
How many 4-digit PINs (each digit 0-9) are possible?
Question 4 of 5
A password is either 2 uppercase letters or 3 digits. How many passwords exist?
Question 5 of 5
How many bit strings of length 6 begin with 1 or end with 1?