Converting recurrence into matrix

60 Views Asked by At

How to convert $F(n) = F(n-2) + F(n-3) + 2n$ into a matrix?

I am not getting how to create matrix for this?

1

There are 1 best solutions below

0
On

If $v_n=(F(n),F(n-1),F(n-2),n,1)$, then $v_{n+1}$ can be computed from $v_n$ via $v_{n+1,1}=v_{n,2} + v_{n,3} + 2v_{n,4} + 2v_{n,5}$, $v_{n+1,2}=v_{n,1}$, $v_{n+1,3}=v_{n,2}$, $v_{n+1,4}=v_{n,4}+v_{n,5}$ and $v_{n+1,5}=v_{n,5}$. These rules are readily converted to a $5\times 5$ matrix.