A nonnegative matrix \( \mathbf{S} \) is called a stochastic matrix if all its row sums are one. From an irreducible stochastic matrix \( \mathbf{S} \), we can transform it into an ideal flow matrix \( \mathbf{F} \) whose total flow is \( \kappa \). An ideal flow matrix is a nonnegative matrix that is premagic and irreducible. Premagic matrix is a square matrix where the sum of rows is equal to the transpose of the sum of columns.
Let \( \mathbf{C} = [c_{ij}] \) be the capacity matrix, \( \kappa \) be the parameter, and \( \mathbf{j} \) be the column vector of ones. Then, the stochastic matrix \( \mathbf{S} \) is given by proportional formula: $$ \textbf{S}=\textbf{C} \: ./ \left ( \textbf{C}\textbf{j}\textbf{j}^{T} \right ) $$ Symbol ./ represent elementwise division where division by zero remains zero by definition. Let \( \textbf{I} \) be the identity matrix, then the node vector \( \mathbf{\pi} \) is computed with parameter total flow \( \kappa \) as $$ \mathbf{\pi} =\begin{bmatrix} \mathbf{S}^{T}-\mathbf{I} \\ \mathbf{j}^{T} \end{bmatrix} \setminus \begin{bmatrix} \mathbf{0} \\ \kappa \end{bmatrix} $$ The notation \( \mathbf{x} = \mathbf{K} \setminus \mathbf{b} \) means \( \mathbf{x} = \mathbf{K}^{+} \mathbf{b} \) where \( \mathbf{K}^{+} = (\mathbf{K}^{T}\mathbf{K})^{-1} \mathbf{K}^{T} \) is the Generalized Left Inverse of the Moore Penrose Inverse.The notation \( \mathbf{x} = \mathbf{K} \setminus \mathbf{b} \) means \( \mathbf{x} = \mathbf{K}^{+} \mathbf{b} \) where \( \mathbf{K}^{+} = (\mathbf{K}^{T}\mathbf{K})^{-1} \mathbf{K}^{T} \) is the Generalized Left Inverse of the Moore Penrose Inverse. From the node vector \( \mathbf{\pi} \) and stochastic matrix \( \mathbf{S} \) we can compute the flow matrix . $$ \mathbf{F} = \left (\mathbf{\pi} \cdot \mathbf{j}^{T} \right ) \circ \mathbf{S} $$
Read: Graph Theory and Linear Algebra
Use the lab tool below to convert a Stochastic matrix into an Ideal Flow matrix.
Stochastic matrix
Pattern of Stochastic Matrix
\( \kappa \):
Flow matrix
Pattern of Flow Matrix
IFN Lab: Stochastic to Ideal Flow Matrix