The Rule of Difference, Difference Rule^{1} , or similarly named technique is used in counting problems often found in mathematics and computer science. Not all Discrete Mathematics textbooks cover this rule in the context of counting as it is simple and intuitive. This rule serves as a common technique used in counting problems.

The Rule of Difference

Given a set of items T with a subset A, the number of items not in subset A, named subset B, is equal to the number of items in set T minus the number of items in subset A.

N(B) = N(T) - N(A)

Example 1

Extending Example 1 from the post on the Rule of Sum, out of a total school population of 900 (students and faculty), how many people are *not* eligible to join the school committee?

The result of the original problem showed that 70 people were eligible for joining the school committee. So, we have the total set T of 900 people, and subset A of 70 eligible people.

By the Rule of Difference,

N(T) - N(A) = N(B)

900 - 70 = 830

830 people are not eligible to join the school committee.

Example 2

Extending Example 1 from the post on the Rule of Product, out of 300 parking spots, the ones *not* labeled will be designated for guest parking. How many guest parking spots will there be?

The result of the original problem showed that there will be a total of 260 labeled parking spots. So, we have the total set T of 300 parking spots, and a subset A of 260 labeled parking spots.

By the Rule of Difference,

N(T) - N(A) = N(B)

300 - 260 = 40

There will be 40 guest parking spots.

*Discrete mathematics with applications*.(5th ed., pp.590). Cengage. ISBN 978-1-337-69419-3.