By signing in you confirm you are 18 or older, or have your parent’s or guardian’s consent.

UPSC Prelims 2022 CSAT, question 55

Topic: Counting and probability

Q55

There is a numeric lock which has a 3-digit PIN. The PIN contains digits 1 to 7. There is no repetition of digits. The digits in the PIN from left to right are in decreasing order. Any two digits in the PIN differ by at least 2. How many maximum attempts does one need to find out the PIN with certainty?

  1. (a) 6
  2. (b) 8
  3. (c) 10Correct answer
  4. (d) 12

Solution.

Answer: (c) 10

  1. We need the number of 3-digit PINs (a,b,c)(a, b, c) with digits from {1,2,3,4,5,6,7}\{1, 2, 3, 4, 5, 6, 7\} such that a>b>ca > b > c and a−b≥2,b−c≥2a - b \ge 2, b - c \ge 2.
  2. Listing all valid triplets (a,b,c)(a, b, c) by the first digit aa: for a=5a = 5: (5,3,1)(5,3,1) (11); for a=6a = 6: (6,3,1),(6,4,1),(6,4,2)(6,3,1), (6,4,1), (6,4,2) (33); for a=7a = 7: (7,3,1),(7,4,1),(7,4,2),(7,5,1),(7,5,2),(7,5,3)(7,3,1), (7,4,1), (7,4,2), (7,5,1), (7,5,2), (7,5,3) (66).
  3. Thus there are 1+3+6=101 + 3 + 6 = 10 possible PINs, requiring at most 1010 attempts to find the PIN with certainty.