Here is example of converting fibonacci function into matrices.
Fibonacci sequence defines
$$ f(1)=1 $$
$$ f(2)=1 $$
$$ f(x) = f(x-1) + f(x-2) $$
It can be converted into matrix
$$ \begin{bmatrix} 1 & 1\\ 1 & 0 \end{bmatrix}^n = \begin{bmatrix} f(n+1) & f(n) \\ f(n) & f(n-1) \end{bmatrix} $$
For example. if we want to find the 400th fibonacci number, then we do this calculation. $$ A_{1}= \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix}^{400} $$
I have similar problem. I'd like to know if this problem can be converted into matrix or not. It is the problem description.
Suppose, we have a table
Table 1. Table of $F_i$ and $A_i$
| i | $F_i$ | $A_i$ |
|---|---|---|
| 0 | 0 | 0.25 |
| 1 | 0 | 0.45 |
| 2 | 1 | 0.55 |
| 3 | 1 | 0.92 |
Table 2. Table of set $S_i$
| i | $S_i$ |
|---|---|
| 0 | {0, 2} |
| 1 | {1, 3} |
The equation is written below.
$$ f(i, 1) = A_i $$
$$ f(i, d) = A_i + g(F_i, d - 1) $$
$$ g(i, d) = \sum_{j}^{j \in S_i} f(j, d) $$
I'd like to calculate $f(0, 400)$ using matrix. Could you tell me if this problem can be converted into matrix, please?
Your system can be write as $$X(d)=MX(d-1)+A$$ where $$X(d)=\begin{bmatrix} f(0,d)\\ f(1,d) \\ f(2,d) \\ f(3,d) \end{bmatrix},$$ $$M=\begin{bmatrix} 1 & 0 & 1 & 0\\ 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 0 & 1 & 0 & 1 \end{bmatrix},$$ and $$A=\begin{bmatrix} A_0\\ A_1 \\ A_2 \\ A_3 \end{bmatrix}.$$ With initial condition $X(1)=A$. By noting that the matriz $M$ satisfies $M^n=2^{n-2}U$ where $$U=\begin{bmatrix} 1 & 1 & 1 & 1\\ 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 \end{bmatrix},$$ we have $$X(d)=M^{d-1}A+...+M^3A+M^2A+MA+A$$ that is $$X(d)=2^{d-3}UA+...+2^2UA+2^1UA+2^0UA+MA+A$$ $$X(d)=(2^{d-3}+...+2^2+2^1+2^0)UA+MA+A$$ $$X(d)=(2^{d-2}-1)UA+MA+A.$$
It's interest to note that, although the dynamics occur in $R^4$, the essential behavior is in a 2d plane.