Question and written solution
Question
Let be the set of all seven-digit numbers that can be formed using the digits , and . For example, is in , but is NOT in . Then the number of elements in such that at least one of the digits and appears exactly twice in , is equal to ____.
Solution
- First count all seven-digit strings, allowing a leading . The condition only involves the digits and ; every other place is a , which is just background.
- Choose the places that hold or , and let be the number of fillings with exactly two s or exactly two s. For the two cases never overlap, so ; for the string has both, so . This gives for .
- All strings: . Strings starting with : the same count on the other places, .
- Swapping every with keeps the condition, so strings starting with and with are equally many: each.
- Real numbers start with or : .
Answer:
Key idea: When the condition treats and alike, the answer is .
Watch this solution on YouTube from 5:36 ↗