Maths : Basic Numeracy

Q 129 / 370

UPSC CSE Prelims 2022

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?

EXPLANATION

Correct Option (C)

The problem requires determining the total number of unique 3-digit PINs that can be formed using digits 1 to 7, subject to the following constraints:

  • No repetition of digits.
  • Digits from left to right are in strictly decreasing order (d1 > d2 > d3).
  • Any two adjacent digits in the PIN must differ by at least 2 (d1 - d2 ≥ 2 and d2 - d3 ≥ 2).

We systematically list all possible PINs by considering the first digit (d1):

  • If the first digit (d1) is 7:

    • If the second digit (d2) is 5 (7 - 5 = 2): The third digit (d3) must be 3 or less (5 - d3 ≥ 2). Possible d3 values: {3, 2, 1}. This yields 3 PINs: (7, 5, 3), (7, 5, 2), (7, 5, 1).
    • If the second digit (d2) is 4 (7 - 4 = 3): The third digit (d3) must be 2 or less (4 - d3 ≥ 2). Possible d3 values: {2, 1}. This yields 2 PINs: (7, 4, 2), (7, 4, 1).
    • If the second digit (d2) is 3 (7 - 3 = 4): The third digit (d3) must be 1 or less (3 - d3 ≥ 2). Possible d3 value: {1}. This yields 1 PIN: (7, 3, 1).

    Total for d1 = 7: 3 + 2 + 1 = 6 PINs.

  • If the first digit (d1) is 6:

    • If the second digit (d2) is 4 (6 - 4 = 2): The third digit (d3) must be 2 or less (4 - d3 ≥ 2). Possible d3 values: {2, 1}. This yields 2 PINs: (6, 4, 2), (6, 4, 1).
    • If the second digit (d2) is 3 (6 - 3 = 3): The third digit (d3) must be 1 or less (3 - d3 ≥ 2). Possible d3 value: {1}. This yields 1 PIN: (6, 3, 1).

    Total for d1 = 6: 2 + 1 = 3 PINs.

  • If the first digit (d1) is 5:

    • If the second digit (d2) is 3 (5 - 3 = 2): The third digit (d3) must be 1 or less (3 - d3 ≥ 2). Possible d3 value: {1}. This yields 1 PIN: (5, 3, 1).

    Total for d1 = 5: 1 PIN.

  • If the first digit (d1) is 4 or less:

    It is not possible to form a valid PIN. For example, if d1 = 4, the maximum possible d2 would be 2 (4 - 2 = 2). Then, d3 would need to be 0 or less (2 - d3 ≥ 2), which is not allowed as digits are restricted to 1-7.

Summing the possibilities: 6 (for d1=7) + 3 (for d1=6) + 1 (for d1=5) = 10.

Therefore, a maximum of 10 attempts are needed to find the PIN with certainty.

Incorrect Options:

Options (A) 6, (B) 8, and (D) 12 are incorrect because they do not represent the complete set of valid PIN combinations derived from the given constraints. The systematic calculation demonstrates that there are exactly 10 such unique PINs that satisfy all the specified conditions.

Explanation figure for the question: There is a numeric lock which has a 3-digit PIN. The PIN contains digits 1 to 7. There is…