UPSC CSAT 2022 Q79: Counting Decimals with Distinct Digits — Solved
What is the number of numbers of the form 0·XY, where X and Y are distinct non-zero digits?
- 72
- 81
- 90
- 100
Answer: (a) 72
Solution
- Read the form. A number 0.XY has two decimal places. X is the tenths digit and Y is the hundredths digit. The value is X/10 + Y/100.
-
List the conditions. - Non-zero: X and Y each come from {1, 2, 3, 4, 5, 6, 7, 8, 9}. That gives 9 possible digits. - Distinct: X ≠ Y.
-
Check that different digit pairs give different numbers. Two numbers 0.XY and 0.X'Y' are equal only when X = X' and Y = Y'. For example, 0.12 and 0.21 are different numbers. So counting ordered pairs (X, Y) counts the numbers. Also, Y is never 0, so none of these numbers can be written in a shorter way, as 0.30 could be written 0.3. No number is counted twice.
- Choose X. Any of the 9 non-zero digits can be X. That gives 9 ways.
- Choose Y. Y must be non-zero and different from X. One of the 9 non-zero digits is already used as X, so 9 − 1 = 8 digits are left. That gives 8 ways.
- Multiply, using the multiplication principle: 9 × 8 = 72.
- Cross-check by subtracting. With no distinctness rule, the count is 9 × 9 = 81. The pairs with X = Y are 0.11, 0.22, …, 0.99, which is 9 numbers. So 81 − 9 = 72.
- Cross-check with the permutation formula. You are arranging 2 digits chosen from 9 into ordered places: ⁹P₂ = 9!/7! = 9 × 8 = 72.
Answer: 72.
Option-wise explanation
- a: correct — There are 9 choices for X and then 8 non-zero digits other than X for Y, so 9 × 8 = 72. Order matters because 0.12 ≠ 0.21.
- b: incorrect — 81 = 9 × 9. It ignores the word 'distinct' and so includes 0.11, 0.22, …, 0.99. You also get 81 if you keep 'distinct' but wrongly allow Y = 0 (9 × 9). That is the trap of applying only one of the two conditions.
- c: incorrect — 90 = 9 × 10. It treats only X as non-zero and lets Y be any of 0–9 with repeats allowed. That drops both conditions on Y.
- d: incorrect — 100 = 10 × 10 counts every two-place decimal from 0.00 to 0.99. It ignores both 'non-zero' and 'distinct'. It is the 'all possible decimals' trap.
How to eliminate
Each option comes from a different set of conditions. 100 = 10 × 10 uses no conditions, 90 = 9 × 10 uses one, and 81 = 9 × 9 uses one rule on each digit but still allows repeats. Only one option applies both 'non-zero' and 'distinct'. Do the product directly: X has 9 choices, Y has 8 left, so 9 × 8 = 72. A quick check also works. 81 includes the 9 repeated-digit numbers 0.11 to 0.99, and 81 − 9 = 72. The answer must be smaller than 81 because 81 still allows repeats. It must also be a multiple of 9, since each X gives the same number of Y choices. 72 is the only option that is a multiple of 9 and below 81. About 20–30 seconds. Attempt it in your first pass.
Know more
Filling ordered slots (multiplication principle)
When a number is built digit by digit, treat each digit position as a slot. Count the choices for each slot after applying every restriction, then multiply.
- Order matters when swapping digits gives a different number (0.12 ≠ 0.21). This is a permutation: ⁿPᵣ = n × (n − 1) × … for r slots.
- Repetition allowed: every slot keeps all n choices, so the count is nʳ.
- Fill the most restricted slot first. For example, a leading digit that cannot be 0 should be filled before the others.
| Condition on 0.XY | X choices | Y choices | Count |
|---|---|---|---|
| Any digits | 10 | 10 | 100 |
| X non-zero, Y any | 9 | 10 | 90 |
| Both non-zero, repeats allowed | 9 | 9 | 81 |
| Both non-zero, distinct | 9 | 8 | 72 |
| Distinct, zero allowed | 10 | 9 | 90 |
Worked variant. How many numbers of the form 0.XYZ have X, Y and Z as distinct non-zero digits?
X has 9 choices, Y has 8 and Z has 7, so 9 × 8 × 7 = 504.
Second variant. How many 3-digit whole numbers have all digits distinct?
The hundreds digit cannot be 0, so it has 9 choices. The tens digit can be 0 but not the hundreds digit, which leaves 9. The units digit has 8. So 9 × 9 × 8 = 648.
Watch-out. In a decimal, a trailing 0 can create duplicates, because 0.30 = 0.3. A 'non-zero' condition on the last digit rules this out. Check for it whenever zeros are allowed.