Find the probability that no more than three attempts will be required to open the lock

Let me provide a different solution that is often applied to such problems.
The trick is to use the opposite of what we want to find first. And then subtract its probability from $1$.

Let:
P(A)=P(1st attempt successful)=1/5
P(B)=P(2nd attempt successful)=1/4
P(C)=P(3rd attempt successful)=1/3

You found - correctly - that \begin{aligned}P(\text{one of first 3 keys fit}) &=P(A\lor B\lor C)\\&= P(A)+ P(\lnot A\land B) + P(\lnot A\land \lnot B\land C)\\ &= \frac 15 + \frac 45\cdot \frac 14 + \frac 45\cdot \frac 34\cdot \frac13\\ &= \frac 15 + \frac {\not 4}5\cdot \frac 1{\not 4} + \frac {\not 4}5\cdot \frac{\not 3}{\not 4}\cdot \frac1{\not 3}\\ &=\frac 35\end{aligned}

If we find the opposite first, we get: \begin{aligned}P(\text{one of first 3 keys fit})&=1-P(\text{none of the first 3 keys fit}) \\ &= 1 - P(\lnot A\land\lnot B\land\lnot C)\\ &= 1-\frac 45\cdot \frac 34\cdot \frac 23\\ &= 1-\frac {\not 4}5\cdot \frac {\not 3}{\not 4}\cdot \frac 2{\not 3}\\ &= \frac 35\end{aligned}


There are 5 keys, 1 opens the lock and we choose 3 randomly without replacement. The probability that the "good" key is among the 3 chosen ones is $$ \frac{\binom11\binom{4}{2}}{\binom{5}{3}}= 0.6 $$ The same as your answer. Your solution is fine.


Your solution and also Mick's solution are correct. I just want to point out how underutilized permutation is for probability:

The right key is chosen first, second, or third, $3$ possibilities. The other $4$ order of taking can be assigned to the remaining $4$ keys in $4!$ ways.

Probability is $\frac{3\times 4!}{5!}=0.6$

generalization:

In Mick’s solution, the probability of taking the correct keys out of $n$ keys within the first $k$ takes is $\frac{\binom{1}{1}\binom{n-1\ \ }{k-1\ \ }}{\binom{n}{k}} =\frac{k}{n}$

In my solution, it is $\frac{k\times (n-1)!}{n!}\ \ =\frac{k}{n}$

Tags:

Probability