The complementation principle
Sometimes, the “opposite” of an event could be easier to count. In such cases, we can use the technique of complements. Consider an event The complement of the event is denoted by and represents the set of outcomes not in
Technique: the complementation principle
Let represent the number of ways for an event to occur and represent the total number of ways for everything to occur with no restrictions. If represents the number of ways for not to occur, then
Example: counting using complements
Question
A five-digit number is formed using the digits 1,2,3,4,5,6,7,8,9. Repetitions are allowed.
How many of these numbers contain repeated digits?
Commentary
The condition of repeated digits is difficult to count directly. Consider, for example, the numbers 11234, 11223, 11134. There are so many possibilities to have repetitions!
Situations like this is where considering the complement simplifies the process. It is much easier to count the opposite: a number that does not contain any repetition.
Solution
Total number of ways
Number of ways for numbers without repeated digits
Required number of ways