# Balance equation

In probability theory, a balance equation is an equation that describes the probability flux associated with a Markov chain in and out of states or set of states.

## Global balance

The global balance equations (also known as full balance equations) are a set of equations that characterize the equilibrium distribution (or any stationary distribution) of a Markov chain, when such a distribution exists.

For a continuous time Markov chain with state space ${\mathcal {S}}$ , transition rate from state $i$ to $j$ given by $q_{ij}$ and equilibrium distribution given by $\pi$ , the global balance equations are given by

$\pi _{i}=\sum _{j\in S}\pi _{j}q_{ji},$ or equivalently

$\pi _{i}\sum _{j\in S\setminus \{i\}}q_{ij}=\sum _{j\in S\setminus \{i\}}\pi _{j}q_{ji}.$ for all $i\in S$ . Here $\pi _{i}q_{ij}$ represents the probability flux from state $i$ to state $j$ . So the left-hand side represents the total flow from out of state i into states other than i, while the right-hand side represents the total flow out of all states $j\neq i$ into state $i$ . In general it is computationally intractable to solve this system of equations for most queueing models.

## Detailed balance

For a continuous time Markov chain (CTMC) with transition rate matrix $Q$ , if $\pi _{i}$ can be found such that for every pair of states $i$ and $j$ $\pi _{i}q_{ij}=\pi _{j}q_{ji}$ holds, then by summing over $j$ , the global balance equations are satisfied and $\pi$ is the stationary distribution of the process. If such a solution can be found the resulting equations are usually much easier than directly solving the global balance equations.

A CTMC is reversible if and only if the detailed balance conditions are satisfied for every pair of states $i$ and $j$ .

A discrete time Markov chains (DTMC) with transition matrix $P$ and equilibrium distribution $\pi$ is said to be in detailed balance if for all pairs $i$ and $j$ ,

$\pi _{i}p_{ij}=\pi _{j}p_{ji}.$ When a solution can be found, as in the case of a CTMC, the computation is usually much quicker than directly solving the global balance equations.

## Local balance

In some situations, terms on either side of the global balance equations cancel. The global balance equations can then be partitioned to give a set of local balance equations (also known as partial balance equations, independent balance equations or individual balance equations). These balance equations were first considered by Peter Whittle. The resulting equations are somewhere between detailed balance and global balance equations. Any solution $\pi$ to the local balance equations is always a solution to the global balance equations (we can recover the global balance equations by summing the relevant local balance equations), but the converse is not always true. Often, constructing local balance equations is equivalent to removing the outer summations in the global balance equations for certain terms.

During the 1980s it was thought local balance was a requirement for a product-form equilibrium distribution, but Gelenbe's G-network model showed this not to be the case.