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?
This questions was previously asked in
Complete-Test, Previous year (2022)
Explanation:
The PIN contains three digits out of – 1, 2, 3, 4, 5, 6, and 7.
Now, there is no repetition of digits, digits are in decreasing order from left to right, and any two digits in the PIN differ by at least 2.
The maximum attempts will be equal to all the possible combinations of the PIN.
Let us consider the various possible cases:
Case I: The rightmost digit is 1
The possible combinations are: 531, 631, 731, 641, 741, 751 (i.e. 6 possible combinations)
Case II: The rightmost digit is 2
The possible combinations are: 642, 742, 752 (i.e. 3 possible combinations)
Case III: The rightmost digit is 3
The possible combinations are: 753 (i.e. 1 possible combination)
The rightmost digit cannot be more than 3.
So, the total number of possible combinations of the PIN = 6 + 3 + 1 = 10
By: Munesh Kumari ProfileResourcesReport error