IFN Lab: Capacity to Ideal Flow Matrix

qrCapacity2Flow

By Kardi Teknomo, PhD

< Previous | Index | Next >

Brief Description

A capacity matrix \( \mathbf{C} \) is a nonnegative weighted adjacency matrix. An ideal flow matrix \( \mathbf{F} \) 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. To convert capacity matrix to an ideal flow matrix contains several steps. First the Capacity matrix is converted to stochastic matrix using the following formula: Let \( \mathbf{C} = [c_{ij}] \) be the capacity matrix, \( \alpha \) and \( \beta \) be the parameters, and \( \mathbf{S} = [s_{ij}] \) be the stochastic matrix. Then, each element \( s_{ij} \) of \( \mathbf{S} \) is given by $$ s_{ij} = \frac{c_{ij}^\alpha e^{\beta c_{ij}}}{\sum_{k=1}^{n} c_{ik}^\alpha e^{\beta c_{ik}}} $$ where \( n \) is the number of columns (or rows, since it's a square matrix) in \( \mathbf{C} \). 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 \). 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 Capacity matrix into an Ideal Flow matrix.

  1. Generate random capacity matrix by clicking . The matrix is not necessarily irreducible. Thus, you may check using available operations in the selection. 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 (it means you capacity matrix must be irreducible).
  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: Capacity to Ideal Flow

size

Capacity matrix




Pattern of Capacity Matrix




\( \kappa \):


Flow matrix




Pattern of Flow Matrix



IFN Lab: Capacity to Ideal Flow Matrix

Index