text stringlengths 0 66.2k |
|---|
d(n+1) + [N/(N -n)] = [n d(n) ]/(N -n) |
Hmm, not sure. |
Alternatively, let me consider writing this as: |
d(n+1) = [n/(N -n)] d(n) - N/(N -n) |
This is a linear nonhomogeneous recurrence relation for d(n). |
The homogeneous part is d(n+1) = [n/(N -n)] d(n) |
The nonhomogeneous term is -N/(N -n) |
We can solve this using the method of integrating factors or summation. |
The general solution is the sum of the homogeneous solution and a particular solution. |
First, solve the homogeneous equation: |
d(n+1) = [n/(N -n)] d(n) |
Let me write this as: |
d(n+1)/d(n) = n/(N -n) |
This suggests that the homogeneous solution is a product: |
d_h(n) = d_h(1) * \prod_{k=1}^{n-1} [k/(N -k)] |
Because each step from 1 to n multiplies by the factor. |
Now, for the particular solution, since the nonhomogeneous term is -N/(N -n), we can use the method of variation of parameters. |
Assume a particular solution of the form d_p(n) = C(n) * d_h(n) |
Then, |
d_p(n+1) = C(n+1) d_h(n+1) = C(n+1) [ (n/(N -n)) d_h(n) ] |
Substitute into the recurrence: |
C(n+1) [n/(N -n) d_h(n) ] = [n/(N -n) C(n) d_h(n) ] - N/(N -n) |
Divide both sides by d_h(n): |
C(n+1) [n/(N -n) ] = [n/(N -n) C(n) ] - N/(N -n) |
Multiply both sides by (N -n)/n: |
C(n+1) = C(n) - N/n |
Thus, |
C(n+1) - C(n) = -N/n |
This is a telescoping recurrence. Summing from n=1 to m-1: |
C(m) - C(1) = -N \sum_{k=1}^{m-1} 1/k |
Assuming we set the initial condition for the particular solution such that C(1) is arbitrary (since we're looking for a particular solution), let's set C(1)=0 for simplicity. |
Thus, |
C(m) = -N \sum_{k=1}^{m-1} 1/k |
Therefore, the particular solution is: |
d_p(n) = C(n) d_h(n) = [ -N \sum_{k=1}^{n-1} 1/k ] * d_h(n) |
Thus, the general solution is: |
d(n) = d_h(n) [ C(1) - N \sum_{k=1}^{n-1} 1/k ] |
But since we can choose C(1) arbitrarily (as it's part of the homogeneous solution), we can set it to zero for the particular solution, and then the general solution is: |
d(n) = d_h(n) [ -N \sum_{k=1}^{n-1} 1/k ] + d_h(n) * C |
Wait, actually, the homogeneous solution is d_h(n) multiplied by a constant, and the particular solution includes the sum term. So the general solution is: |
d(n) = d_h(n) [ C - N \sum_{k=1}^{n-1} 1/k ] |
Now, applying boundary conditions. We know that f(N) is the expected time from N frogs on the shore. But since all frogs are on the shore, the next step will send one to the pool, so f(N) =1 + f(N-1). Wait, but actually, when all frogs are on the shore (n=N), the next step must move one to the pool, so f(N) =1 + f(N-1)... |
But we need another boundary condition. Since we are solving for E_1, perhaps we can use the condition that as n approaches N, but it's tricky. |
Alternatively, let's consider that when n=N, we have f(N) =1 + f(N-1), but this might not be helpful directly. |
Alternatively, perhaps the process can't go beyond N, so our domain is n from 0 to N, with f(0)=0. |
But to find the constant C, we might need another condition. Let's consider the behavior as n approaches N. |
Wait, when n = N, we have: |
d(N) = f(N) - f(N-1) |
But from the recurrence relation for n=N-1: |
(N-1)d(N) = (N-1) f(N-1) - (N - (N-1)) f(N) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.