There are n locks and n matching keys. If all the locks and keys are to be perfectly matched, find the maximum number of trials required to open a lock.
A
None of the above
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
n(n+1)2
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
n(n+1)(n+2)6
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
n(n−1)2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is Bn(n+1)2 The maximum number of trials needed for the first key is n. For the second key, it will be n−1.
Now, for the r th key, the maximum number of trials needed is n−r+1. Thus, the required answer is n+(n−1)+⋯+1=n(n+1)2