2,762 views

1 Answer

Best answer
2 votes
2 votes

In the best case: will need N-1 tries.
In the worst case:
1st lock will need = N-1 tries [i.e. last no. of key not need to compare ]
2nd will need= N-2 
tries
.
.
.
(N-1)th locks need = 

So, total tries  = N-1+N-2 +N-3 + ..... 1
                           =N1n=1n
n=1N1n
                            = (N1)N/2(N1)N/2

so (20 *19)/2= 190

selected by
Answer:

Related questions

1 votes
1 votes
1 answer
1
sh!va asked Mar 7, 2017
807 views
What is the value ofa) 2 $a^2$ $b^2$ $c^2$b) 4 $a^2$ $b^2$ $c^2$c) 8 $a^2$ $b^2$ $c^2$d) 0
1 votes
1 votes
1 answer
2
sh!va asked Mar 7, 2017
592 views
A and B are two candidates appearing for an interview by a company. The probability that A is selected is 0.5 and the probability that both A and B are selected is at mos...
1 votes
1 votes
2 answers
3
sh!va asked Mar 7, 2017
839 views
There are 20 locks and 20 matching keys. Maximum number of trials required to match all the locks is(a) 190(b) 210(c) 400(d) 40
0 votes
0 votes
1 answer
4
sh!va asked Mar 7, 2017
1,231 views
Equation of the line normal to function f(x)= $(x - 8) ^{2/3}$ +1 at P(0, 5) is(a) y = 3x -5(b) 3y = x - 15(c) 3y = x+15(d) y=3x+5