Skip to content
Question 123 of 134

Q.There are n locks and n matching keys. If all the locks and keys are to be perfectly matched, then the maximum number of trials is:

(a) n(n−1)n(n-1)
(b) n(n+1)n(n+1)
(c) nn
(d) n(n+1)2\dfrac{n(n+1)}{2}
Puducherry TnboardTamil Nadu HSC First Year (DGE) Board 2024MCQ· 1mImportance★★★★★
92% · 123/134 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Matching n keys to n locks one lock at a time, the worst-case total number of trials needed is n(n+1)2\dfrac{n(n+1)}{2}.

Work on the locks one at a time, always trying the remaining untried keys on the current lock.

For the first lock, there are n candidate keys. In the worst case you try n-1 wrong keys first, and even the final (guaranteed correct) key still needs to be physically inserted and turned to open the lock, so opening the first lock can take up to n trials.

For the second lock, only n-1 keys remain (the correct key for lock 1 is now used up), so it takes up to n-1 trials.

…

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.