1

Is it true that any linear recurrence $f_n$ can be written as:

$$f_n = \sum_{i=1}^{k} \alpha_i r_i^n$$

where $f_n$ is a linear recurrence of degree $k$ and $r_i$ represents a root of the characteristic polynomial, which can be uniquely described by the coefficients of the recurrence? (for example the recurrence $f_n = 10f_{n-1} - 3f_{n-2}$ has characteristic polynomial $1-10x+3x^2$).

The $\alpha$ terms would be solved through system of equations assuming you knew the first $k$ values of the recurrence.

AJJ
  • 2,043
  • 3
  • 17
  • 28

1 Answers1

4

First, I think you mean "linear homogeneous recurrence with constant coefficients".

Second, the answer is no, but only just barely. Assuming the $r_i$ can be complex, the only problem arises when the $r_i$ are duplicated. In this case not all solutions to the recurrence are of this form. For example, $f_n - 2f_{n-1} + f_{n-2} = 0$ has one solution $f_n = f_0$. Yet there is clearly a solution to this recurrence with, say, $f_0=0,f_1=1$. It turns out that in these cases, the additional "missing" solutions to the recurrence are of the form $n r^n,n^2 r^n,\dots$; thus a root of multiplicity $k$ contributes $k$ linearly independent solutions to the recurrence.

Ian
  • 101,645
  • "linear homogeneous recurrence with constant coefficients", what's the difference between this and "linear recurrence"? – AJJ Jan 06 '16 at 16:17
  • 2
    @ArukaJ Homogeneous means that if you move all the terms involving $f$ to one side, the right side is zero. $f_n - 2f_{n-1} + f_{n-2} = n^2$ would be a linear inhomogeneous recurrence with constant coefficients. Constant coefficients just means what it sounds like: $f_n - f_{n-1} = 0$ has constant coefficients whereas $f_n - n f_{n-1} = 0$ does not. – Ian Jan 06 '16 at 16:19
  • If I understand: sometimes the roots of the characteristic polynomial are complex, meaning duplicate $r_i$, meaning they have to be removed? (so it is possible for a recurrence of degree $3$ for example to have $k=2$ after removing the duplicate pieces?) – AJJ Jan 06 '16 at 16:22
  • 1
    @ArukaJ I don't think you fully understand. Looking at $f_n - 2f_{n-1} + f_n = 0$, this has characteristic polynomial $x^2-2x+1$. This has a double root of $1$. Thus the procedure you described gives a solution of the form $1^n$; any multiple of this is also a solution. But there are other solutions, as you can see by taking $f_0=0,f_1=1$. There is another solution $n1^n$. All solutions are some combination of $1^n$ and $n1^n$. – Ian Jan 06 '16 at 16:30
  • @ArukaJ no. He means: if we don't allow complex $r_i$, then of course we have a problem, since sometimes the roots are complex. However, even if we do allow complex $r_i$ ("assuming the $r_i$ can be complex..."), we still run into a problem when there are duplicate $r_i$. – Ben Grossmann Jan 06 '16 at 16:31
  • I'm trying to work out the example but I am a little confused. Do you mean the recurrence $f_n = 2 f_{n-1} - f_{n-2}$? – AJJ Jan 06 '16 at 16:39
  • @ArukaJ It is the same. – Ian Jan 06 '16 at 16:39
  • So with $x^2-2x+1 = (x-1)(x-1)$, my method would say $f_0 = \alpha_1(1)^0 + \alpha_2(1)^0$ and $f_1 = \alpha_1(1)^1 + \alpha_2(1)^1$, or $f_0 = \alpha_1 + \alpha_2$ and $f_1 = \alpha_1 + \alpha_2$, which somehow implies $f_0 = f_1$? Is this a problem that only occurs when the roots are all $1$s? I'm not sure what this implies because it appears to be a method that works for many other recurrences. – AJJ Jan 06 '16 at 16:40
  • @ArukaJ In this case you get all the $f_n$ are the same, but that only happened because I happened to choose the root to be $1$. You will have a similar issue with $f_n - 4f_{n-1} + 4f_{n-2} = 0$ (where the repeated root is $2$). – Ian Jan 06 '16 at 16:41
  • This is bothering me because clearly $f_0$ and $f_1$ can be different; I'm not sure why this method implies that all $f_n$ should be the same. I've never run into this kind of case before. – AJJ Jan 06 '16 at 16:43
  • @ArukaJ It's not true that all the $f_n$ actually must be the same. But it is true if you restrict attention only to solutions which are a linear combination of exponentials. The general solution to the example I gave turns out to be $f_n=an+b$ (or more specifically, $f_n=(f_1-f_0)n+f_0$). – Ian Jan 06 '16 at 16:43
  • Sorry I meant $f_0 = f_1$, which doesn't tell me what the $\alpha$ terms should be. I think this implies that I can choose the $\alpha$ terms to be anything as long as they sum up to $f_0$ and as long as $f_0 = f_1$, but then all $f_n$ terms past that will have the same values anyway, so then all $f_n = f_0$ in that scenario. – AJJ Jan 06 '16 at 16:45
  • 1
    @ArukaJ Yes, if $f_0=f_1$ then you get the "exponential" solution $f_n=f_0 1^n$ (which of course is just $f_0$). But if $f_0 \neq f_1$ then your method does not allow you to solve the recurrence. – Ian Jan 06 '16 at 16:46
  • Which makes sense because if all solutions are the same (call it $x$) then $2x-x = x$, okay I am on board with that now. Is there a better way to write the expression I have in the original post so I don't fall into this sort of trap? I still don't fully understand the $nr^n$ thing. – AJJ Jan 06 '16 at 16:48
  • 1
    @ArukaJ There is not really a compact way to write the general form of the solution. Linear algebra tells us some additional things, but not much. As for the $nr^n$ thing, just try it. Plug $n2^n$ into $f_n=4f_{n-1}-4f_{n-2}$ and see that it works. – Ian Jan 06 '16 at 16:50
  • Maybe easier if I ask it this way: So if I had just given you $f_n = 2f_{n-1} - f_{n-2}$ and asked you to write a closed form, you would know the characteristic polynomial is $1-2x+x^2$; how would you then turn that into closed-form? – AJJ Jan 06 '16 at 16:51
  • 1
    @ArukaJ I'd see there's a double root of $1$, so the general solution is $a1^n + bn1^n$, where $a,b$ are arbitrary numbers. – Ian Jan 06 '16 at 16:52
  • So let's say there is a triple root of $r$. Does this mean the general solution is $ar^n + bnr^n + cn^2r^n$? – AJJ Jan 06 '16 at 16:52
  • 1
    @ArukaJ That's right (assuming that's the only root, as well). It could happen that you have several roots of various multiplicities; for instance, there's a recurrence with the characteristic polynomial $(x-1)^2(x-2)^3(x-6)$, whose general solution is $a1^n + bn1^n + c 2^n + dn2^n + k n^2 2^n + p 6^n$. – Ian Jan 06 '16 at 16:54
  • And this would work, also, for complex roots? – AJJ Jan 06 '16 at 16:55
  • 1
    @ArukaJ The method doesn't care about complex roots as long as the coefficients are also allowed to be complex. – Ian Jan 06 '16 at 16:55
  • This has been very enlightening; thanks so much for the explanations! – AJJ Jan 06 '16 at 16:56