text stringlengths 0 66.2k |
|---|
The process is similar to a biased random walk on the integers from 0 to N, with absorbing state at 0. The expected time to absorption starting from 1 is E(1). |
In some cases, like when the walk is unbiased (p = q), the expected time is n(N -n). But here, the walk is biased towards 0 when n < N/2 and away when n > N/2. |
However, in our examples, the expected time was 2^N -1, which is exponential in N. This suggests that the walk has a very high expected time because the probability of moving away from 0 increases as you get closer, making it hard to reach 0. |
Alternatively, maybe there's a clever way to see that E(n) = 2^N -1 - 2^{N -n}. |
Wait for N=2: |
E(1)=3=2^2 -1 - 2^{2-1}=4-1-2=1? No, that doesn't work. |
Alternatively, perhaps E(n)=2^{N} - 2^{N -n}. |
For N=2, E(1)=2^2 -2^{1}=4-2=2, which is not correct. Hmm. |
Alternatively, maybe E(n)=2^{N} -1 - (N -n). For N=2, E(1)=4-1 -1=2, no. |
Alternatively, perhaps the formula is indeed E(1)=2^N -1. Let me see for N=1: 2^1 -1=1, correct. N=2:3, N=3:7, N=4:15. This seems to hold. So maybe the general formula is E(1)=2^N -1. If that's the case, then for N=2019, the answer is 2^{2019} -1. But that seems extremely large. However, given the small cases fit, perh... |
Alternatively, maybe there's a different way to see this. Let me consider that each time a frog is selected, the number of frogs on the shore either decreases by 1 or increases by 1. The process is similar to a Markov chain where transitions depend on the current state. |
Suppose we think of the expected time E(n) to reach 0 from n. The recurrence is: |
E(n) = 1 + (n/N) E(n-1) + ((N-n)/N) E(n+1) |
We can rearrange this as: |
(N -n) E(n+1) - N E(n) + n E(n-1) = -N |
This is a linear recurrence relation. Let me consider the homogeneous equation: |
(N -n) E(n+1) - N E(n) + n E(n-1) =0 |
Suppose we look for solutions of the form E(n) = A r^n. Let's substitute: |
(N -n) A r^{n+1} - N A r^n + n A r^{n-1} =0 |
Divide by A r^{n-1}: |
(N -n) r^2 - N r + n =0 |
This must hold for all n, which requires coefficients of like powers of n to be zero: |
Coefficient of n: -r^2 +1 =0 ⇒ r^2=1 ⇒ r=1 or r=-1 |
Constant term: N r^2 - N r =0 ⇒ N(r^2 - r)=0 ⇒ r=0 or r=1 |
Thus, the only common solution is r=1. Therefore, the homogeneous solution is E(n) = C, a constant. But this can't be the general solution since the nonhomogeneous term is -N. |
To find a particular solution, let's try E_p(n) = D n. Substitute into the equation: |
(N -n) D(n+1) - N D n + n D(n-1) = -N |
Expand: |
(N -n) D(n+1) - N D n + n D(n-1) = -N |
Assume E_p(n) = D n: |
Left side: |
(N -n) D(n+1) - N D n + n D(n-1) |
= D [ (N -n)(n+1) - N n + n(n-1) ] |
Expand each term: |
(N -n)(n+1) = N(n+1) -n(n+1) = Nn +N -n² -n |
-N n = -N n |
n(n-1) =n² -n |
Total inside the brackets: |
[Nn +N -n² -n -Nn +n² -n] = N -2n |
Thus, left side is D(N -2n) = -N |
So D(N -2n) = -N ⇒ D = -N/(N -2n) |
But this depends on n, which is not allowed for a particular solution. Thus, this trial solution doesn't work. |
Alternatively, try E_p(n) = D n^2: |
Left side: |
(N -n) D(n+1)^2 - N D n^2 + n D(n-1)^2 |
= D [ (N -n)(n+1)^2 - N n^2 +n(n-1)^2 ] |
Expand each term: |
(N -n)(n+1)^2 = N(n+1)^2 -n(n+1)^2 |
= N(n² +2n +1) -n(n² +2n +1) |
= Nn² +2Nn +N -n^3 -2n² -n |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.