Explicit Scheme, matrix-vector formulation
This results in a matrix-vector multiplication
\begin{equation*}
V_{j+1} = \mathbf{A}V_{j}
\end{equation*}
with the matrix
\mathbf{A} given by
\begin{equation*}
\mathbf{A}=\begin{bmatrix}1-2\alpha&\alpha&0& 0\dots\\
\alpha&1-2\alpha&\alpha & 0\dots \\
\dots & \dots & \dots & \dots \\
0\dots & 0\dots &\alpha& 1-2\alpha\end{bmatrix}
\end{equation*}
which means we can rewrite the original partial differential equation as
a set of matrix-vector multiplications
\begin{equation*}
V_{j+1} = \mathbf{A}V_{j}=\dots = \mathbf{A}^{j+1}V_0,
\end{equation*}
where
V_0 is the initial vector at time
t=0 defined by the initial value
g(x) .
In the numerical implementation
one should avoid to treat this problem as a matrix vector multiplication
since the matrix is triangular and at most three elements in each row are different from zero.