Counting for Fun, Basics – Part 1: The Rule of Sum

The Rule of Sum1 , Sum Rule2 , Addition Rule3, or similarly named technique is used in counting problems often found in mathematics and computer science. Most all Discrete Mathematics textbooks cover this rule in the topic of counting. This rule serves as a basis for later counting techniques.

The Rule of Sum
If there are n ways of performing a task, and there are m ways of performing a second task, and these tasks cannot be done at the same time, then there are n + m possible ways to choose how to perform one of these tasks.

Example 1
A school committee needs to fill to fill a vacancy for a representative from one of two groups:

    • a computer science faculty member
    • a computer science student

There are 7 computer science faculty, and 63 computer science students. These two groups are mutually exclusive, there is no one who is both a student and faculty.
So, there are 7 ways to choose a computer science faculty member. There are 63 ways to pick a student. When the Rule of Sum is applied, there are 7 + 63, or 70 ways to choose a representative.

Example 2
The Rule of Sum can be extended to more than two sets of choices. Example 1 from above can be amended to allow a third group of people, the electrical engineering faculty which consists of 8 people.
After applying the Rule of Sum to this new problem, there are 7 + 63 + 8, or 78 possible ways to choose a representative.

Example 3
An English student may select a topic for a final essay from four separate categories. The first category has three choices, the second category has four choices, the third category has three choices, and the fourth category has five choices.
By applying the Rule of Sum, the English student has 3 + 4 + 3 + 5, or 15 topic choices.

Example 4
A person decides to go shopping at a single store, to either the east side of town, or the west side of town. The east side of town has an electronics store and a game store. The west side of town has a candy store, a book store, and a hobby store. So, there are two ways to pick a store on the east side of town, and three choices on the west side of town.
By applying the Rule of Sum, there are 2 + 3, or 5 total stores to choose from.


1. Wikipedia contributors. (2021, November 19). Rule of sum. In Wikipedia, The Free Encyclopedia. Retrieved from
2. Rosen, K. H. (1999). Discrete mathematics and its applications(4th ed., pp.232-234). WCB/McGraw-Hill. ISBN 0-07-289905-0.
3. Epp, S. S. (2020). Discrete mathematics with applications.(5th ed., pp.589-590). Cengage. ISBN 978-1-337-69419-3.