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 formula_1, transition rate from state formula_2 to formula_3 given by formula_4 and equilibrium distribution given by formula_5, the global balance equations are given by or equivalently  for all formula_8. Here formula_9 represents the probability flux from state formula_2 to state formula_3. 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 formula_12 into state formula_2. 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 formula_14, if formula_15 can be found such that for every pair of states formula_2 and formula_3 holds, then by summing  over formula_3, the global balance equations are satisfied and formula_5 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 formula_2 and formula_3. A discrete time Markov chains (DTMC) with transition matrix formula_23 and equilibrium distribution formula_5 is said to be in detailed balance if for all pairs formula_2 and formula_3, 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 formula_5 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.