text
stringlengths
0
66.2k
n=1:
E(1) = 1 + (1/4) E(0) + (3/4) E(2) = 1 + (3/4) E(2)
n=2:
E(2) = 1 + (2/4) E(1) + (2/4) E(3) = 1 + (1/2) E(1) + (1/2) E(3)
n=3:
E(3) = 1 + (3/4) E(2) + (1/4) E(4)
n=4:
E(4) = 1 + (4/4) E(3) = 1 + E(3)
So let's substitute E(4) into E(3):
E(3) = 1 + (3/4) E(2) + (1/4)(1 + E(3))
E(3) = 1 + (3/4) E(2) + 1/4 + (1/4) E(3)
E(3) - (1/4) E(3) = 1 + 1/4 + (3/4) E(2)
(3/4) E(3) = 5/4 + (3/4) E(2)
Multiply both sides by 4/3:
E(3) = 5/3 + E(2)
Now, substitute E(3) into the equation for E(2):
E(2) = 1 + (1/2) E(1) + (1/2)(5/3 + E(2))
E(2) = 1 + (1/2) E(1) + 5/6 + (1/2) E(2)
E(2) - (1/2) E(2) = 1 + 5/6 + (1/2) E(1)
(1/2) E(2) = 11/6 + (1/2) E(1)
Multiply both sides by 2:
E(2) = 11/3 + E(1)
Now substitute E(2) into E(1):
E(1) = 1 + (3/4)(11/3 + E(1))
Calculate:
E(1) = 1 + (3/4)*(11/3) + (3/4) E(1)
Simplify:
E(1) = 1 + (11/4) + (3/4) E(1)
E(1) - (3/4) E(1) = 1 + 11/4
(1/4) E(1) = 15/4
Multiply both sides by 4:
E(1) = 15
Hmm, so N=4 gives E(1)=15. The pattern seems like 1, 3, 7, 15... which is 2^1 -1, 2^2 -1, 2^3 -1, 2^4 -1. Wait:
Wait 2^1 -1 =1, 2^2 -1=3, 2^3 -1=7, 2^4 -1=15. Exactly! So for N=1: 2^1 -1=1, N=2: 2^2-1=3, N=3: 2^3 -1=7, N=4: 2^4 -1=15. So the pattern is E(1) = 2^N -1. Wait, but N here is the total number of frogs? Wait, in the problem, N=2019. Wait, but in our examples above, when N=1 (total frogs), E(1)=1=2^1-1, N=2, E(1)=3=2^2 ...
Wait, but let's check N=4, which gives 15=2^4 -1=16-1=15. So yes, the pattern holds. Therefore, perhaps in general, for N frogs, starting from n=1, the expected time to reach 0 is 2^N -1. Wait, but hold on, in the problem statement, the total number of frogs is 2018 in the pool and 1 on the shore, so total N=2019. So a...
Wait a second, maybe I made a mistake here. Let me check N=1,2,3,4 again.
Wait, for N=1, starting at n=1, it takes exactly 1 step, which is 2^1 -1 =1. Correct.
N=2: E(1)=3, which is 2^2 -1=3. Correct.
N=3: 7=2^3 -1. Correct.
N=4: 15=2^4 -1. Correct.
So the formula seems to hold here. But then, for N=2019, the answer would be 2^2019 -1, which is an enormous number. But maybe the problem is designed that way? Let me think again.
Alternatively, perhaps there's a miscalculation here. Let me see for N=2, let's actually compute the expectation step by step.
For N=2, starting at n=1. Let me compute E(1).
At each step, from n=1, with probability 1/2, we go to 0 (done in 1 step), or with probability 1/2, we go to 2. From 2, we have to go back to 1 in the next step, and then from 1 again. So the expectation can be written as:
E(1) = 1 + (1/2)(0) + (1/2)(E(2))
But E(2) = 1 + E(1), since from 2 you go back to 1 in 1 step, and then have to wait E(1) more steps.
Therefore:
E(1) = 1 + (1/2)(0) + (1/2)(1 + E(1))
So E(1) = 1 + 1/2 + (1/2) E(1)
Then, E(1) - (1/2) E(1) = 3/2 => (1/2) E(1) = 3/2 => E(1)=3. Correct.