Define an to be a positive integer of or more digits where the digits are strictly increasing moving left to right. Similarly, define a to be a positive integer of or more digits where the digits are strictly decreasing moving left to right. For instance, the number is an upno and is a downno. Let equal the total number of and let equal the total number of . What is ?
- A)
- B)
- C)
- D)
- E)
Answer
E
Key insight
An upno is a subset of {1,...,9} of size at least 2 and a downno a subset of {0,...,9}; the counts are 2^9 - 10 and 2^10 - 11.
Solution
A strictly increasing (or decreasing) number is determined by its set of digits: once the digits are chosen, there is exactly one way to arrange them in increasing order and one way in decreasing order. So counting upnos and downnos is counting sets of digits.
Upnos: the digit cannot appear, because in increasing order it would be the leading digit. So an upno is a subset of with at least elements:
Downnos: may appear, since in decreasing order it lands at the end (like ). A downno is a subset of with at least elements:
Therefore .
The answer is .
Why this works
When an ordering is forced, objects correspond bijectively to unordered sets, and sets are counted by powers of . The whole difference between and comes from the single digit , which is legal only at the end of a number; the extra digit doubles the subset count, and the correction for tiny subsets does the rest.
Alternative approach
Every upno on digits reverses into a downno without , so those cancel in . The surplus downnos are exactly the ones ending in : a nonempty subset of followed by , which gives .
The trap
Forgetting that 0 can end a downno but can never start an upno, which wrongly makes U = D and gives 0.
Common mistakes
- Forgetting that 0 can end a downno but can never start an upno, which wrongly makes U = D and gives 0.
- Not removing the empty set and the one-digit numbers, so that is reported.
Techniques
Map the objects to something easier to count · Count the complement and subtract from the total