UPSC CSAT 2025 Q58: Digit Constraints in a 5-Digit Number — Solved

The 5-digit number PQRST (all distinct digits) is such that T ≠ 0. P is thrice T. S is greater than Q by 4, while Q is greater than R by 3. How many such 5-digit numbers are possible ?

  1. 3
  2. 4
  3. 5
  4. 6

Answer: (b) 4

Solution

  1. Write the number as digits. The number is P Q R S T, with five different digits. P is the first digit, so P ≠ 0. We are also told T ≠ 0.

  2. Use P = 3 × T. P must be a single digit (9 or less), so 3 × T ≤ 9, which gives T ≤ 3. T ≠ 0, so T can be 1, 2 or 3. - T = 1 → P = 3 - T = 2 → P = 6 - T = 3 → P = 9 This gives 3 possible (P, T) pairs: (3, 1), (6, 2), (9, 3).

  3. Join the other two conditions. Q = R + 3 and S = Q + 4. So S = R + 3 + 4 = R + 7.

  4. Find R, Q and S. S must be 9 or less, so R + 7 ≤ 9, which gives R ≤ 2. R can be 0, 1 or 2. - R = 0 → Q = 3, S = 7 - R = 1 → Q = 4, S = 8 - R = 2 → Q = 5, S = 9 This gives 3 possible (R, Q, S) triples: (0, 3, 7), (1, 4, 8), (2, 5, 9).

  5. Combine and check that all digits are different. That is 3 × 3 = 9 combinations. Check each one:

(P, T) (R, Q, S) Number PQRST Repeated digit? Valid?
(3, 1) (0, 3, 7) 3 3 0 7 1 Q = P = 3 No
(3, 1) (1, 4, 8) 3 4 1 8 1 R = T = 1 No
(3, 1) (2, 5, 9) 35291 none Yes
(6, 2) (0, 3, 7) 63072 none Yes
(6, 2) (1, 4, 8) 64182 none Yes
(6, 2) (2, 5, 9) 6 5 2 9 2 R = T = 2 No
(9, 3) (0, 3, 7) 9 3 0 7 3 Q = T = 3 No
(9, 3) (1, 4, 8) 94183 none Yes
(9, 3) (2, 5, 9) 9 5 2 9 3 S = P = 9 No
  1. Count the valid numbers. 35291, 63072, 64182 and 94183. That is 4 numbers.

Answer: 4 such numbers are possible.

Option-wise explanation

  • a: incorrect — 3 is the number of (P, T) pairs, and also the number of (R, Q, S) triples. It is not the number of valid 5-digit numbers. You get 3 if you stop after one set of cases, or if you miss one valid combination such as 94183.
  • b: correct — The 3 (P, T) pairs and 3 (R, Q, S) triples give 9 combinations. Five of them repeat a digit, which leaves exactly 4 numbers: 35291, 63072, 64182 and 94183.
  • c: incorrect — To get 5, you would have to accept one combination that repeats a digit, for example 93073, where Q = T = 3. This is the trap of checking each condition separately and forgetting that all five digits must be different.
  • d: incorrect — To get 6, you would have to miss two clashes, for example the ones where a digit from the R-Q-S chain equals T (1 or 3). Students often check the new digits against P but forget to check them against T.

How to eliminate

Do not test the options one by one. Build the two small lists straight away. From P = 3T: (3,1), (6,2), (9,3). From S = R + 7: R is 0, 1 or 2, so (R, Q, S) is (0,3,7), (1,4,8) or (2,5,9). That gives at most 3 × 3 = 9 numbers. Now remove the clashes quickly. For each (P, T) pair, check whether P or T appears in a triple:

  • P,T = 3,1: the 3 is in (0,3,7) and the 1 is in (1,4,8). One triple is left.
  • P,T = 6,2: the 2 is in (2,5,9). Two triples are left.
  • P,T = 9,3: the 3 is in (0,3,7) and the 9 is in (2,5,9). One triple is left. Total = 1 + 2 + 1 = 4. You do not need to write out the numbers. About 60–90 seconds once you merge Q = R + 3 and S = Q + 4 into S = R + 7. Attempt this in the first round: it is short and gives a sure mark.

Know more

Digit-constraint counting: bound, list, then remove clashes

Most questions of the form "how many numbers have digits with these relations" break into three moves.

  1. Chain the relations. Join links that share a digit into one equation, so Q = R + 3 and S = Q + 4 become S = R + 7. Fewer variables means fewer cases.
  2. Bound each chain using 0 ≤ digit ≤ 9. The largest digit in the chain sets an upper limit, and the leading digit (≠ 0) or any "≠ 0" rule sets a lower limit. This gives a short list for each chain.
  3. Multiply, then remove clashes. Independent chains give (list 1 size) × (list 2 size) combinations. If the digits must be different, cross out every pair that repeats a digit. Find the clashes by looking for shared digits; do not write out every number.

Worked variant. ABCD has four different digits, D ≠ 0, A = 2D and C = B + 5.

Chain Options Count
(A, D) (2,1), (4,2), (6,3), (8,4) 4
(B, C) (0,5), (1,6), (2,7), (3,8), (4,9) 5

That gives 4 × 5 = 20 combinations. Each (A, D) pair clashes with exactly 2 of the (B, C) pairs. For (2,1), the clashes are (1,6) and (2,7). So 20 − 4 × 2 = 12 numbers.

When there are several chains, count how many "all different" clashes there are before you start adding up.