text
stringlengths
0
66.2k
b - (2a N + b(N -2))/N = [ bN -2a N -b(N -2) ] / N
= [ bN -2a N -bN + 2b ] / N
= [ -2a N + 2b ] / N
= -2a + (2b)/N
Constant terms:
c -1 - (a + b + c) = -1 -a - b
Thus, the equation becomes:
(4a / N) n² + [ -2a + (2b)/N ] n + (-1 -a - b ) = 0
This must hold for all n, so each coefficient must be zero:
1. Coefficient of n²: 4a / N =0 ⇒ a=0
2. Coefficient of n: -2a + (2b)/N =0. If a=0, then (2b)/N =0 ⇒ b=0
3. Constant term: -1 -a - b = -1 -0 -0 = -1 ≠0. Contradiction.
Therefore, quadratic assumption also doesn't work. Hmm, this is getting frustrating. Maybe there's another approach.
Wait, going back to the small cases, the pattern was E(1)=2^N -1. Let me see if that holds for N=4.
Wait N=4 gives 15=2^4 -1, yes. So perhaps the general formula is E(1)=2^N -1. If that's the case, then for N=2019, it would be 2^2019 -1. But let me see if there's a way to justify this.
Alternatively, maybe think of the expected time as similar to a symmetric random walk but with different probabilities.
Alternatively, note that in the Gambler's Ruin problem, the expected time to reach 0 starting from k is k(N -k) when the walk is unbiased. But in our case, the transition probabilities are not symmetric.
Alternatively, let's think of the problem as follows: each time a frog moves, it's like a step either +1 or -1 with certain probabilities. The process is a Markov chain, and we need the expected time to reach 0 from 1.
Alternatively, perhaps we can model this as a martingale and use optional stopping theorem?
Alternatively, let me consider the difference equation again. Let me denote E(n) as the expected time from n. Then:
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 see if I can find a particular solution and homogeneous solution.
First, solve the homogeneous equation:
(N -n) E(n+1) - N E(n) + n E(n-1) =0
Let me try to find a solution of the form E(n) = C n. Let's test this.
Assume E(n) = C n.
Plug into homogeneous equation:
(N -n) C(n+1) - N C n + n C(n-1) =0 ?
Compute each term:
First term: (N -n) C(n+1) = C [N(n+1) -n(n+1)] = C [Nn + N -n² -n]
Second term: -N C n
Third term: n C(n-1) = C [n(n-1)]
Total:
C [Nn + N -n² -n -Nn + n(n -1) ]
Simplify term by term:
Nn cancels with -Nn.
Left with: C [N -n² -n + n² -n ]
= C [N - 2n ]
This must equal zero for all n, which is only possible if C=0, which is trivial. So not helpful.
Alternatively, maybe E(n) = C n^2.
Let me try E(n) = C n².
Plug into homogeneous equation:
(N -n) C(n+1)^2 - N C n² + n C(n-1)^2 =0
Expand each term:
First term: C(N -n)(n² + 2n +1) = C [N(n² +2n +1) -n(n² +2n +1) ]
= C [Nn² + 2Nn + N -n^3 -2n² -n ]
Second term: -N C n²
Third term: C n (n² - 2n +1 ) = C [n^3 -2n² +n ]