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?
- A6
- B8
- C10Correct
- D12
Explanation
The problem asks for the maximum number of attempts needed to find a 3-digit PIN with certainty. This is equivalent to finding the total number of possible valid PINs that satisfy all given conditions.
Let the 3-digit PIN be represented as XYZ. The conditions are:
- The digits are from 1 to 7 (i.e., {1, 2, 3, 4, 5, 6, 7}).
- No repetition of digits (X, Y, Z are distinct).
- The digits are in decreasing order from left to right (X > Y > Z).
- Any two digits in the PIN differ by at least 2. This implies X - Y >= 2 and Y - Z >= 2. (The condition X - Z >= 2 is automatically satisfied if X > Y > Z, X - Y >= 2, and Y - Z >= 2).
Let's list all possible valid PINs by systematically choosing the digits:
-
Starting with X = 7 (the largest possible digit):
- If Y = 5 (since 7 - 5 = 2, satisfying X - Y >= 2): Z must be chosen such that 5 - Z >= 2, so Z = 1. Possible Z values: {3, 2, 1}. This gives PINs: (7, 5, 3), (7, 5, 2), (7, 5, 1) - (3 PINs)
- If Y = 4 (since 7 - 4 = 3, satisfying X - Y >= 2): Z must be chosen such that 4 - Z >= 2, so Z = 1. Possible Z values: {2, 1}. This gives PINs: (7, 4, 2), (7, 4, 1) - (2 PINs)
- If Y = 3 (since 7 - 3 = 4, satisfying X - Y >= 2): Z must be chosen such that 3 - Z >= 2, so Z = 1. Possible Z value: {1}. This gives PIN: (7, 3, 1) - (1 PIN)
- (Note: Y cannot be 6 because 7 - 6 = 1, which is not >= 2. Y cannot be less than 3 because Y - Z >= 2 and Z must be at least 1, so Y must be at least 3.) Total PINs for X = 7: 3 + 2 + 1 = 6 PINs.
-
Starting with X = 6:
- If Y = 4 (since 6 - 4 = 2, satisfying X - Y >= 2): Z must be chosen such that 4 - Z >= 2, so Z = 1. Possible Z values: {2, 1}. This gives PINs: (6, 4, 2), (6, 4, 1) - (2 PINs)
- If Y = 3 (since 6 - 3 = 3, satisfying X - Y >= 2): Z must be chosen such that 3 - Z >= 2, so Z = 1. Possible Z value: {1}. This gives PIN: (6, 3, 1) - (1 PIN)
- (Note: Y cannot be 5 because 6 - 5 = 1. Y cannot be less than 3.) Total PINs for X = 6: 2 + 1 = 3 PINs.
-
Starting with X = 5:
- If Y = 3 (since 5 - 3 = 2, satisfying X - Y >= 2): Z must be chosen such that 3 - Z >= 2, so Z = 1. Possible Z value: {1}. This gives PIN: (5, 3, 1) - (1 PIN)
- (Note: Y cannot be 4 because 5 - 4 = 1. Y cannot be less than 3.) Total PINs for X = 5: 1 PIN.
-
Starting with X = 4:
- If X = 4, then Y must be = 2). However, Y must also be >= 3 (because Y - Z >= 2 and Z >= 1, so Y >= 1 + 2 = 3). These conditions (Y = 3) are contradictory. Therefore, no PINs can start with 4 or any smaller digit.
Total number of possible valid PINs = 6 (for X=7) + 3 (for X=6) + 1 (for X=5) = 10 PINs.
To find the PIN with certainty, one might have to try all possible valid PINs in the worst-case scenario. If there are 10 possible PINs, the maximum number of attempts needed is 10.
The final answer is C.

Related questions
More UPSC Prelims practice from the same subject and topic.
- Prelims 2022CSATQuantitative Aptitude
The letters A, B, C, D and E are arranged in such a way that there are exactly two letters between A and E. How many such arrangements are possible?
- Prelims 2022CSATQuantitative Aptitude
A, B and C are three places such that there are three different roads from A to B, four different roads from B to C and three different roads from A to C. In how many different ways can one travel fro…
- Prelims 2022CSATQuantitative Aptitude
One non-zero digit, one vowel and one consonant from English alphabet (in capital) are to be used in forming passwords, such that each password has to start with a vowel and end with a consonant. How …
- Prelims 2022CSATQuantitative Aptitude
There are 9 cups placed on a table arranged in equal number of rows and columns out of which 6 cups contain coffee and 3 cups contain tea. In how many ways can they be arranged so that each row should…
- Prelims 2022CSATQuantitative Aptitude
An Identity Card has the number ABCDEFG, not necessarily in that order, where each letter represents a distinct digit (1, 2, 4, 5, 7, 8, 9 only). The number is divisible by 9. After deleting the first…
- Prelims 2022CSATQuantitative Aptitude
A bill for ₹1,840 is paid in the denominations of ₹50, ₹20 and ₹10 notes. 50 notes in all are used. Consider the following statements: 1. 25 notes of ₹50 are used and the remaining are in the denomina…