how to solve the following recurrence relation

49 Views Asked by At

Suppose I'm given the following recurrence relation, where $n, r, s$ are fixed

$$a_1 = ra_2+ sa_n$$ $$a_i = ra_{i+1}+sa_{i-1}, i=2,\dots n-1 $$ $$a_n = ra_1+sa_{n-1}$$

and we have $\sum_i^n a_i = 1$ and $r+s=1$.

I've to express the middle equation as $a_2-a_{k+1}=\sum_{i=2}^k = s(\sum_{i=2}^k a_{i-1}-a_{i+1}=a_1+a_2-a_k-a_{k+1}$ where I've used that the second relation is equivalent to

$$ a_i-a_{i+1}=s(a_{i-1}-a_{i+1}) $$

Apparently the solution should be $a_i=\frac{1}{n}$ but I don't see how I can get this from my attempts so far

1

There are 1 best solutions below

2
On BEST ANSWER

If $r=1$ or $r=0$ we have $a_1=a_2 = \cdots = a_n = \frac 1n$. From now on assume $r\neq 0, 1$. From $r+s=1$ we have $$r(a_{i+1}-a_i) = (1-r)(a_i - a_{i-1}) \tag1$$

If $\exists j, a_{j+1}=a_j$, it's easy to see that $a_{i+1}-a_i=0, \forall i$.

If not, then $a_{i+1} \neq a_i, \forall i$. We multiple $(1)$ from $i=1$ to $n$ (we may assume $a_0=a_n, a_{n+1}=a_1$), and divide both sides by $\prod_{i=1}^n (a_{i+1}-a_i) \neq 0$, then $r^n = (1-r)^n \implies r=\frac 12$ (note that when $n$ is even we cannot have $r=-(1-r)$). But then $$a_{i+1}-a_i = d, \forall i \tag2$$

We add $(2)$ for all $i$ then $0 =\sum a_i - \sum a_i = nd=0, d=0, a_i=\frac 1n$.