Counting by complement

间接法(排除法)计数

How does counting by complement work?

Count everything without the restriction and subtract the cases that break it; useful for at least and at most.

SkillKP000793

Sign in to read the whole lesson, with 3 exercises

Sign in / Sign up

Mastery goals

  • Can count the outcomes with a property by subtracting those without it from the total

Solution 3 is an indirect method: first find the number of permutations of 3 digits taken from the 10 digits, then subtract the number of those permutations with 0 in the hundreds place (these are not three-digit numbers); the result is the number of three-digit numbers with no repeated digits.

hundredstensunitsA₁₀³ wayshundreds 0tensunitsA₉² ways
Left: 3 of the digits 0–9 are put in the three places, in ways. Right: those with 0 in the hundreds place, where the tens and units digits are 2 of the remaining 9 digits, in ways.

From the solutions of the problems above we can see that, once we have the concept of a permutation and the formula for the number of permutations, we can easily solve the special kind of counting problem "find the number of all the permutations of () elements taken from different elements".

Related points

All points in this topic

Cite this page: Counting by complement · KnowledgeTree (知识树), https://www.knowledgetree.world/en/kp/KP000793