IFN Lab: Stochastic to Ideal Flow Matrix

qrStochastic2Flow

By Kardi Teknomo, PhD

< Previous | Index | Next >

Brief Description

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} $$

Learning Objectives

Prerequisite

Read: Graph Theory and Linear Algebra

Instruction

Use the lab tool below to convert a Stochastic matrix into an Ideal Flow matrix.

  1. Generate random stochastic matrix by clicking or to generate random Irreducible Stochastic matrix. You can also modify the matrix manually. End each row by a semicolon. Separate each data in one row by comma or a space.
  2. Set total flow and click to convert the stochastic matrix into an ideal flow matrix. Your network must be strongly connected.
  3. Alternatively, set total flow and click to forcely convert the stochastic matrix into an ideal flow matrix. Your network can be weakly connected.

Experiment and Discussion

Lab Tool: Stochastic to Ideal Flow

size

Stochastic matrix




Pattern of Stochastic Matrix




\( \kappa \):


Flow matrix




Pattern of Flow Matrix



IFN Lab: Stochastic to Ideal Flow Matrix

Index