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?
The correct answer is (C) 10.
Explanation:
Given digits are 1 to 7. PIN has 3 distinct digits in decreasing order from left to right (let digits be a > b > c). Also, any two adjacent digits differ by at least 2 (a - b >= 2 and b - c >= 2). Let us list all valid combinations (a, b, c): If a=7, b can be 5 (c=3 or 1 -> (7,5,3), (7,5,1)) or b=4 (c=2 -> (7,4,2)). If a=6, b can be 4 (c=2 -> (6,4,2)) or b=3 (c=1 -> (6,3,1)). If a=5, b can be 3 (c=1 -> (5,3,1)). Total valid combinations = 2 + 1 + 2 + 1 = 6. Since there are only 6 possible valid PINs, one needs a maximum of 6 attempts to find the correct PIN with certainty.
हिंदी में प्रश्न एवं आदर्श उत्तर
एक संख्या-आधारित ताला है, जिसके लिए 3-अंक की वैयक्तिक अभिज्ञान संख्या (पिन) है। पिन में 1 से 7 तक अंक हैं। कोई अंक दोबारा नहीं आता। पिन के अंक बाएँ से दाहिने तरफ घटते हुए क्रम में हैं। पिन के किसी भी दो अंकों के बीच कम-से-कम 2 का अंतर है। अधिकतम कितने प्रयासों में पिन का निश्चित पता लगाया जा सकता है?
सही उत्तर (C) 10 है।
व्याख्या:
Given digits are 1 to 7. PIN has 3 distinct digits in decreasing order from left to right (let digits be a > b > c). Also, any two adjacent digits differ by at least 2 (a - b >= 2 and b - c >= 2). Let us list all valid combinations (a, b, c): If a=7, b can be 5 (c=3 or 1 -> (7,5,3), (7,5,1)) or b=4 (c=2 -> (7,4,2)). If a=6, b can be 4 (c=2 -> (6,4,2)) or b=3 (c=1 -> (6,3,1)). If a=5, b can be 3 (c=1 -> (5,3,1)). Total valid combinations = 2 + 1 + 2 + 1 = 6. Since there are only 6 possible valid PINs, one needs a maximum of 6 attempts to find the correct PIN with certainty.