XXV OM - III - Task 2

Salmon swimming upstream must overcome two waterfalls. The probability that a salmon will overcome the first waterfall in a given attempt is $ p > 0 $, and the probability of overcoming the second waterfall in a given attempt is $ q > 0 $. We assume that successive attempts to overcome the waterfalls are independent. Calculate the probability of the event that the salmon will not overcome the first waterfall in $ n $ attempts, given that in $ n $ attempts it will not overcome both waterfalls.
Let $ A_n $ be the event that the salmon does not overcome the first waterfall in $ n $ attempts, and $ B_n $ - the event that the salmon does not overcome both waterfalls in $ n $ attempts. Since the probability that the salmon does not overcome the first waterfall in one attempt is $ 1 - p $, and the attempts are independent, therefore






Event $ B_n $ will occur when either the salmon does not overcome the first waterfall in $ n $ attempts, or it overcomes the first waterfall in the $ k $-th attempt $ (1 \leq k \leq n) $ and does not overcome the second waterfall in the remaining $ n-k $ attempts. Therefore,






If $ p = q $, then formula (2) takes the form






If $ q = 1 $, then






In this case, the salmon would overcome the second waterfall in the first attempt. Therefore, event $ B_n $ will occur when the salmon does not overcome the first waterfall in $ n $ attempts or overcomes it only in the $ n $-th attempt.
Formula (4) follows from formula (2) if we assume that $ 0^0 = 1 $.
Finally, if $ p \ne q $ and $ q < 1 $, then using the formula for the sum of the terms of a geometric sequence, we transform (2) as follows:






We thus have in this case






If event $ A_n $ occurs, then event $ B_n $ will certainly occur. Therefore, $ A_n \cap B_n = A_n $. From the formula for conditional probability, we obtain






If $ n = 1 $, then from the conditions of the problem, $ p(A_n) = 1 - p $ and $ p(B_n) = 1 $. Therefore, from (6) we obtain that $ p(A_n \mid B_n) = 1 - p $. Henceforth, we will assume that $ n \geq 2 $.
Notice that if $ p \ne q $, then $ p(B_n) \ne 0 $. Indeed, if it were, then from formula (5) we would obtain $ p(1 - q)^n = q(1 - p)^n $. From this,




If, for example, $ p < q $, then $ 1 - p > 1 - q $ and equality (7) cannot hold. Similarly, we prove that (7) does not hold if $ p > q $.
If $ p = q $ and $ p(B_n) = 0 $, then from formula (3) it follows that $ p = 1 $. Therefore, in the case where $ p = q = 1 $ (and only in this case) the conditional probability $ p(A_n \mid B_n) $ does not exist. We calculate it in the remaining cases.
If $ p = q < 1 $, then from (1), (3), and (6) we obtain






If $ p < q = 1 $, then from (1), (4), and (6) we obtain






If $ p \ne q < 1 $, then from (1), (5), and (6) we obtain






Note.
We will examine in each case the number $ g = \lim_{n \to \infty} p(A_n \mid B_n) $.
If $ p = q < 1 $, then from formula (8) it follows that $ g = 0 $.
If $ p < q = 1 $, then from formula (9) it follows that $ g = 1 - p = 1 - \frac{p}{1} $.
If $ p < q < 1 $, then $ 1 - p > 1 - q $ and $ \lim_{n \to \infty} \left( \frac{1-p}{1-q} \right)^n = \infty $. Therefore, from (10) it follows that $ g = \frac{p-q}{-q} = 1 - \frac{p}{q} $.
If $ q < p \leq 1 $, then $ 1 - p < 1 - q $ and $ \lim_{n \to \infty} \left( \frac{1-p}{1-q} \right)^n = 0 $. Therefore, from (10) we obtain that $ g = 0 $.
Thus, in all cases, $ g = \max \left(0, 1 - \frac{p}{q} \right) $.