Solution (source code)

= Solution

With $S_i\simeq N_i$, the infective equations become
$$
\dot I_i=\beta\sum_j\frac{N_iC_{ij}}{N_j}I_j-\gamma I_i
=\beta\sum_jC_{ji}I_j-\gamma I_i,
$$
where reciprocity was used. For a column vector $\mathbf I$,
$$
\dot{\mathbf I}=\gamma(\mathbf L-\mathbf1)\mathbf I,
\qquad
\boxed{\mathbf L=\frac\beta\gamma\mathbf C^T}.
$$
Therefore
$$
\boxed{\mathbf I(t)=e^{\gamma(\mathbf L-\mathbf1)t}\mathbf I(0)}.
$$