5

Let $f : \mathbb{N} \to [0,1]$ be a function defined by $$ f(n)=\frac{f(n-1) + f(n-2) + f(n-3)}{3},\ n\geq 4$$ with $f(1) = f(2) = 0$ and $f(3) = 1$.

Find the value of $$L = \lim_{n\to\infty} f(n)$$

Context


This problem came to me while watching this Ted Ed riddle on YouTube. There's a long queue of souls, with the leading three standing on three different platforms in front of Cerberus, the three headed 'Hound of Hades'. In each turn, one of the three heads of Cerberus bites the soul in front of it (the probability of each head biting is $\displaystyle1/3$), which gets resurrected. If there's any soul ahead of the resurrected one, it leaves the queue without getting resurrected. After that the souls move ahead to fill the empty spots on the three platforms and this process continues.

The probability of any soul getting resurrected is found to be following the recurrence relation given above with the leading soul at the start designated as $n = 4$ for simplification of the domain of $f.$

During the video, the narrator claims that as $n\to \infty,$ the probability of the $\,n\text{th}$ soul getting resurrected tends to $1/2$ because the expected number of souls getting resurrected is asymptotic to $n/2$. It is logical because in each turn, $0, 1$ or $2$ souls are kept in the underworld with equal probabilities. Therefore, after each turn, one soul is resurrected while (on average) one soul gets out of the line, which yields the narrator's claim.

Question


I want to know whether I can get rid of this expected value and probability approach and tackle the problem purely as finding the limit of a recursive sequence.

  • 2
    I see no reason for closing. This is a new user asking a legitimate question imo. Although not much has been tried by the poster, it might be because that person is new and does not know where to begin. – mick Mar 30 '25 at 23:18
  • 1
    It should have been closed as a multiduplicate, and not answered here. See for instance https://math.stackexchange.com/questions/4205834. – Anne Bauval May 08 '25 at 17:35

3 Answers3

6

Start by expanding $f(n)$. We have

\begin{align} f(n)&=\frac{1}{3}f(n-1)+\frac{1}{3}f(n-2)+\frac{1}{3}f(n-3)\\ &=\frac{1}{3}\left(\frac{1}{3}f(n-2)+\frac{1}{3}f(n-3)+\frac{1}{3}f(n-4)\right)+\frac{1}{3}f(n-2)+\frac{1}{3}f(n-3)\\ &=\left(\frac{1}{3^2}+\frac{1}{3}\right)f(n-2)+\left(\frac{1}{3^2}+\frac{1}{3}\right)f(n-3)+\frac{1}{3}f(n-4)\\ &=\left(\frac{1}{3^3}+\frac{1}{3^2}+\frac{1}{3}\right)f(n-3)+\left(\frac{1}{3^3}+\frac{1}{3^2}+\frac{1}{3}\right)f(n-4)+\left(\frac{1}{3^3}+\frac{1}{3^2}\right)f(n-5)\\ &=\ldots\\ &=\left(\sum_{k=1}^{n-3}\frac{1}{3^k}\right)f(3)+(\ldots)f(2)+(\ldots)f(1)\\ &=\sum_{k=1}^{n-3}\frac{1}{3^k}. \end{align}

Now take the limit of this sum as $n\to\infty$.

Rócherz
  • 4,241
  • There's a miscalculation in the term containing f(n-3), f(n-4) and f(n-5). The coefficient of f(n-3) actually comes out to be (1/3³ + 2/3² + 1/3) which changes the coefficients afterwards. So please clarify it. – Nishant Kalonia Mar 27 '25 at 11:44
  • The numerators of each fraction seem to follow a Tribonacci array. Have a look here https://oeis.org/search?q=1%2C7%2C21%2C30%2C19%2C3&language=english&go=Search – Fisherman's Friend Mar 27 '25 at 15:00
  • If that is the case, how does it follow that L = 1/2? – Nishant Kalonia Mar 28 '25 at 13:12
2

Showing that the sequence $f(n)$ is convergent is standard; one way to see this is that this just simply a third order recursion and therefore $f(n)$ has a closed formula as a linear combination of terms of the form $\alpha^n$ where $3\alpha^3 = \alpha^2 + \alpha + 1$. One solution is $\alpha = 1$, and the other two are in absolute value less than $1$ and will therefore vanish in the limit.

The interesting part is to determine its limit. Let $g(n) = f(n-3) + 2f(n-2) + 3f(n-1)$ for all $n \geq 4$. Then the recursion yields that $$ g(n+1) = f(n-2) + 2f(n-1) + 3f(n) = f(n-3) + 2f(n-2) + 3f(n-1) = g(n). $$ In other words, the sequence $g(n)$ is constant. Since $g(4) = 3$, this shows that $g(n) = 3$ for all $n$. As $f$ approaches its limit $L$, this shows that $3 = 6L$ and therefore $L = 1/2$.

Mike Daas
  • 2,212
  • Please explain the $\alpha^n$ argument as I didn't understand it. – Nishant Kalonia Mar 30 '25 at 15:19
  • You can Google "how to solve a linear recursion" and learn about this; it is a standard technique. See for example here: https://mathcircle.berkeley.edu/sites/default/files/BMC6/ps/linear.pdf – Mike Daas Mar 30 '25 at 15:21
  • Would you be able to explain it a little bit – Nishant Kalonia Mar 30 '25 at 15:29
  • Letac Gérard just gave you the answer – Mike Daas Mar 30 '25 at 15:31
  • 2
    The technique of using $g(n) $ is pretty cool and it applies to any sequence $f(n) $ which is average of previous $k$ terms (here $k=3$).+1 – Paramanand Singh Mar 30 '25 at 18:12
  • How did you reach at the breakthrough in the form of $g(n)$? – Nishant Kalonia Mar 31 '25 at 08:51
  • absolute value less than 1 ? – Claude Leibovici Mar 31 '25 at 10:47
  • Yeah this trick generalises, and gives the answer for all possible starting conditions for any sequence of the form of taking the average of the previous $k$ terms for fixed $k$. I actually came up with it while trying to solve this problem for myself a few years ago and figured this question was the perfect opportunity to showcase it! I think at the time I guessed the trick retroactively from the answer after having deduced the limit value in a different and more painful way first – Mike Daas Mar 31 '25 at 11:20
2

$f$ belongs to the three dimensional complex linear space generated by the three sequences $(1)$, $(r^n )$ and $(\overline{r}^n)$ where $1,\ r,\ \overline{r}$ are the three roots of $3z^3-z^2-z-1=(z-1) (3z^2+2z+1)=0.$ There exists three complex constants $A,B,C$ such that $$f(n)=A+Br^n+C\overline{r }^n$$ Furthermore we have $r\overline{r}=1/3$ which implies $\lim_n f(n)=A$. Using the initial conditions $f(1)=f(2)=0$ and $f(3)=1$ we get $f(0)=3$. Finally since $f$ is real the numbers $A$ and $Br^n+C\overline{r }^n$ are real implying $C=\overline{B}.$

For solving the linear system

$$3=A+B+\overline{B}, \ 0=A+Br+\overline{Br}, \ 0=A+Br^2+\overline{Br^2}$$ it is useful to consider the two auxiliary variables $D=B+\overline{B}$ and $E=Br+\overline{Br}$ which give $3(Br^2+\overline{Br^2})+2E+D=0$. The computation gives $A=1/2$ (and $D=5/2$ and $E=-1/2$). The exact values of $B$ and $r$ have no interest here.