KA-0018Complementary counting
5 points, difficulty 3 of 3Level 3–4about 105sA three-digit code uses only the digits 1, 2 and 3, and digits may repeat. How many such codes contain at least one 3?
Hints
Take them one at a time. The first gives nothing away.
1A nudge
Count the codes with no 3 at all.
2The strategy
At least one is a signal to count the opposite. Find how many codes avoid the digit 3 completely, then take that away from the total number of codes.
3The full solution
There are 3 x 3 x 3 = 27 codes altogether. Codes using only 1 and 2 number 2 x 2 x 2 = 8. So codes containing at least one 3 number 27 - 8 = 19.
Solution— no shortcut on this one
Count everything, then remove what you do not want. Each of the three positions has 3 choices, so there are 27 codes in total. Codes with no 3 use only 1 and 2, so there are 8 of them. Codes with at least one 3 number 27 - 8 = 19. The transferable idea: at least one almost always means count the complement.
Why this is on the test: At least one is the standard trigger for complementary counting; counting the wanted cases directly here means three overlapping cases and a wrong answer.