Probability Problem with $n$ keys A woman has $n$ keys, one of which will open a door.
a)If she tries the keys at random, discarding those that do not work, what is the probability that she will open the door on her $k^{\mathrm{th}}$ try?
Attempt: On her first try, she will have the correct key with probability $\frac1n$. If this does not work, she will throw it away and on her second attempt, she will have the correct key with probability $\frac1{(n-1)}$. So on her $k^{\mathrm{th}}$ try, the probability is $\frac1{(n-(k-1))}$
This does not agree with my solutions. 
b)The same as above but this time she does not discard the keys if they do not work.
Attempt: We want the probability on her $k^{\mathrm{th}}$ try. So we want to consider the probability that she must fail on her $k-1$ attempts. Since she keeps all her keys, the correct one is chosen with probability $\frac1n$ for each trial. So the desired probability is $(1-\frac{1}{n})^{k-1} (\frac1n)^k$.
Again, does not agree with solutions.
I can't really see any mistake in my logic. Can anyone offer any advice? Many thanks

For $(a)$, probability that she will open on the first try is $\dfrac1n$. You have this right.
However, the probability that she will open on the second try is when she has failed in her first attempt and succeeded in her second attempt. Hence, the probability is $$\underbrace{\dfrac{n-1}n}_{\text{Prob of failure in her $1^{st}$ attempt.}} \times \underbrace{\dfrac1{n-1}}_{\text{Prob of success in $2^{nd}$ attempt given failure in $1^{st}$ attempt.}} = \dfrac1n$$
Probability that she will open on the third try is when she has failed in her first and second attempt and succeeded in her third attempt. Hence, the probability is $$\underbrace{\dfrac{n-1}n}_{\text{Prob failure in her $1^{st}$ attempt.}} \times \underbrace{\dfrac{n-2}{n-1}}_{\text{Prob of success in $2^{nd}$ attempt given failure in $1^{st}$ attempt.}} \times \underbrace{\dfrac1{n-2}}_{\text{Prob of success in $3^{nd}$ attempt given failure in first two attempts.}} = \dfrac1n$$
Hence, the probability she opens in her $k^{th}$ attempt is $\dfrac1n$. (Also note that the probabilities must add up-to one i.e. $$\sum_{k=1}^{n} \dfrac1n = 1$$ which is not the case in your answer).
For $(b)$, the probability that she will open on her $k^{th}$ attempt is the probability she fails in her first $(k-1)$ attempts and succeed in her $k^{th}$ attempt. The probability for this is
$$\underbrace{\dfrac{n-1}{n}}_{\text{Fails in $1^{st}$ attempt}} \times \underbrace{\dfrac{n-1}{n}}_{\text{Fails in $2^{nd}$ attempt}} \times \cdots \underbrace{\dfrac{n-1}{n}}_{\text{Fails in $(k-1)^{th}$ attempt}} \times  \underbrace{\dfrac1{n}}_{\text{Succeeds in $k^{th}$ attempt}} = \left(1-\dfrac1n \right)^{k-1} \dfrac1n$$
Again a quick check here is the sum $$\sum_{k=1}^{\infty} \left(1-\dfrac1n \right)^{k-1} \dfrac1n$$ should be $1$. Note that here her number of tries could be arbitrarily large since she doesn't discard the keys from her previous tries.
