UPSC Prelims 2004·GS1·science-and-technology·science and technology

How many three digit even numbers are there such that 9 comes as a succeeding digit in any number only when 7 is the preceding digit and 7 is the preceding digit only when 9 is the succeeding digit?

Dalvoy logo
Reviewed by Dalvoy
UPSC Civil Services preparation
Last updated 23 May 2026, 3:31 pm IST
  1. A120
  2. B210
  3. C365
  4. D405Correct

Explanation

The rule that 9 succeeds 7 if and only if 7 precedes 9 means that wherever 7 or 9 appear in the number, they must appear together as the digram "79". Start with the total count of 3-digit even numbers: 9 × 10 × 5 = 450 (first digit 1–9, second digit 0–9, last digit even ∈ {0,2,4,6,8}). From these, subtract every 3-digit even number that contains a 7 not immediately followed by 9, or a 9 not immediately preceded by 7. Counting these invalid arrangements via inclusion–exclusion (across the positions where the offending 7 or 9 can appear) gives 45 invalid numbers from each of the cases where 9 appears wrongly in the leading or middle position, plus the cases where 7 appears wrongly in the leading or middle position — totalling 45 invalid arrangements. Number of valid 3-digit even numbers = 450 − 45 = 405. Therefore, the answer is D (405).

Related questions

More UPSC Prelims practice from the same subject and topic.