A Markov chain discrete-time Markov chain - DTMC is a random process that undergoes transitions from one state to another on a state space. It must possess the “memorylessness” property , namely, that the probability distribution of the next state depends only on the current state and not on the sequence of events that preceded it. The material presented in this subsection will be useful for the study of queuing systems treated in the later subsections of Appendix B.3 and Chapters 4 and 5.
More formally, a stochastic process {Xn,n=0,1,2,…} that takes a finite or countable number of possible values is said to be in state i at time n if Xn=i. We assume that there is a fixed probability Pij that if the process is in state i it will next be in state j,
for all states i0,i1,…,in−1,i,j and all n≥0. Such a stochastic process is known as a (discrete) Markov chain. The Markovian property, expressed by Eq. (B.2), is that the conditional distribution of any future state Xn+1 given the past states X0,X1,…,Xn−1 and the present state Xn is independent of the past states and depends only on the present state. Thus, a Markov chain is a sequence of random variables X1,X2,X3,… with the Markov property. Since the process must make a transition into some state, ∑∞j=0Pij=1,i=0,1,…,Pij≥0,i,j≥0.
A Markov chain is said to be homogeneous in time if the transition probability between two distinct states depends only on the time step difference, i.e. Pr{Xm+n=j∣Xm=i}=Pnij. Here, we focus on homogeneous Markov processes.
Eq. (B.2) defines the so-called one-step transition probabilities , namely probabilities that describe the transition of the chain in one time step. These transitions can be depicted via a state diagram, where a state diagram is a directed graph used to picture the state transitions. The states that the chain transitions to will be called neighboring states. Similarly, the n-step probabilities that the process will be in state j starting at i after n successive transitions (n successive time steps) are
Pnij=Pr{Xn+m=j∣Xm=i},n,i,j≥0.
(B.3)
In order to compute the n-step transition probabilities, the Chapman-Kolmogorov equations shown in the following can be employed:
Pn+mij=∑∞k=0PnikPmkj,for alln,m≥0,alli,j.
(B.4)
If fnij is the probability that starting in state i, the first transition to j occurs at time n, then state j is said to be recurrent if fjj=1, which means that starting at state j the process will return to state j with probability 1 for some time n (fjj=∑∞n=1fnij). A state is transient if fjj<1. If state j is recurrent and μj=∑∞n=1nfnjj denotes the expected number of transitions needed to return to start j (mean recurrence time - expected return time in state j), then state j is positive recurrent if μj<∞ and null recurrent if μj=∞. A state j is said to be accessible from a state i (written i→j) if a system that started in state i has a nonzero probability of transitioning into state j at some point (Pr{Xn=j∣X0=i}=Pnij>0 for some n>0). A state i has period k if any return to state i must occur in multiples of k time steps. If k=1, then the state is said to be aperiodic, namely, returns to state i can occur at irregular times. A Markov chain is aperiodic if every state is aperiodic and an irreducible Markov chain only needs one aperiodic state to imply all states are aperiodic. A state i is called absorbing if it is impossible to leave this state.
A state i is said to be ergodic if it is aperiodic and positive recurrent, namely, if it is recurrent, has a period of 1, and it has finite mean recurrence time. If all states in an irreducible Markov chain are ergodic, then the chain is said to be ergodic. It can be shown that a finite state irreducible Markov chain is ergodic if it has an aperiodic state.
If an irreducible aperiodic Markov chain is positive recurrent, then we can define as πj=limn→∞Pnij, where Pnij is obtained from (B.3) for n=1. Let S denote the set of possible states that the process can make a transition to. If there is a probability distribution over states π such that
πj=∑i∈SπiPr{Xn+1=j∣Xn=i}
(B.5)
for every state j and every time n then π is a stationary distribution of the Markov chain. An irreducible chain has a stationary distribution if and only if all of its states are positive recurrent. In that case, π is unique and related to the expected return time Mj by πj=CMj, where C is a normalizing constant independent of the state. The chain converges to the stationary distribution regardless of the initial state distribution. Such π is called the equilibrium distribution of the chain. For a finite state space, a stationary distribution π is a (row) vector, whose entries are non-negative and sum to 1, it is unchanged by the operation of transition matrix P and it is defined by πP=π. In addition, 0≤πj≤1 and ∑j∈Sπj=1. Then the transition probability distribution can be represented by the transition matrixP, with the (i,j)th element of P equal to πj=Pr{Xn+1=j∣Xn=i}.
B.3.2. Continuous-time Markov Processes
A continuous-time Markov process may be in one of the finite or infinite many (however countably infinite many) states at a time. The probability that the process transitions from state i to j at time t0+t is defined as Pr{X(t0+t)=j∣X(t0)=j} and it is independent of the behavior of X(t) prior to t0. If X(t) is a homogeneous Markov process, the above probability depends only on the elapsed time required for the transition and not the initial time t0. Thus in this case, Pij(t)=Pr{X(t0+t)=j∣X(t0)=i} or Pij(t)=Pr{X(t)=j∣X(0)=i}, denoted by state transition rates as opposed to the corresponding state transition probabilities in the discrete case (Pnij). The state transition rates are obtained as derivatives of the state transition probabilities at t=0. Markov processes, in general, are characterized by the basic property that the past has no influence on the future if the present is specified and can be expressed in the continuous form as
Pr{X(n)=xn∣X(n−1),….X(1)}=Pr{X(n)=xn∣X(n−1)}.
(B.6)
All Markov processes share the interesting property that the time it takes for a change of state, called sojourn time is an exponentially distributed random variable [174].
The initial probability distribution of state i is given by Pi(0)=P{X(0)}=i, defined analogously for the rest of states, and the unconditional probability that the process is in state j at time t is defined as Pj(t)=∑iPi(0)Pij(t). For arbitrary t and s, the continuous version of the Chapman-Kolmogorov equations is given by
Pij(t+s)=P{X(t+s)=j∣X(0)=i}=∑kPik(t)Pkj(s).
(B.7)
B.3.3. Birth-and-Death Processes
The birth-death process is a special case of continuous-time Markov chain (CTMC), where the state transitions are of two types only, namely, “births,” which increase the state variable by one and “deaths,” which decrease the state by one [174]. A typical example is that of some banks which have a security door that allows only one person at a time to enter/leave the bank. In this case, irrespective of the system state, at each time instant the next event is either the arrival of a customer in the bank, or the departure of a customer that completed the required service and leaves the building. In these and similar cases, when a birth occurs, the process goes from state n to n+1. When a death occurs, the process goes from state n to state n−1. The state diagram evolution for such a process is depicted in Fig. B.3. Such processes are specified by their birth rates {λi}i=0…∞ and death rates {μi}i=1…∞. A pure birth process is a birth-death process where μi=0for alli≥0, while a pure death process is a birth-death process where λi=0for alli≥0. A (homogeneous) Poisson process is a pure birth process where λi=λfor alli≥0.
The global balance equations (also known as full balance equations) are a set of equations that in principle can be solved to give the equilibrium distribution of a Markov process (when such a distribution exists). For a continuous-time Markov process with state space S, transition rate from state i to j given by qij and equilibrium distribution given by π, the global balance equations are given for every state i in S by
∑j∈S{i}πiqij=∑j∈S{i}πjqji,
(B.8)
where πiqij represents the probability flux for state i to state j.
For a CTMC with transition rate matrix Q=[qij], if πi can be found such that for every pair of states i and j, πiqij=πjqji holds, then the global balance equations are satisfied and π 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. Furthermore, a CTMC is reversible if and only if the detailed balance conditions are satisfied for every pair of states i and j.
In queuing theory, the birth-death process is the most fundamental example of a queuing model. In the following, we provide a brief overview of simple and characteristic birth-death queuing systems that have particular interest for the analysis of queuing networks and some of the methodologies presented in this book, especially in Chapter 4. The rest of the systems presented in this subsection with an infinite queue are all characteristic examples of birth-death systems defined in this subsection.
B.3.4. The M∕M∕1 Queuing System
The M∕M∕1 queue is a system having a single server, where arrivals are determined by a Poisson process and job service times have an exponential distribution. Arrivals are assumed to occur at rate λ and service times have an exponential distribution with mean 1∕μ. The single server operates according to a FIFO discipline. When the service of a customer is complete, the customer at the head of the queue leaves the storage space entering the server, the customer that completed service leaves the systems, and the number of customers in the system reduces by one. The buffer (queue) of the system is of infinite size.
The model is considered stable only if λ<μ. If, on average, arrivals happen faster than service completions the queue will grow indefinitely long and the system will not have a stationary distribution. Assuming ρ=λ∕μ for the utilization of the buffer and require ρ<1 for the queue to be stable, ρ represents the average proportion of time for which the server is occupied. In order to see this more intuitively, consider the version of Little’s law with respect to the server, which gives the average number of customers in the server Nw with respect to the arrival rate λ and the mean service time 1∕μ, Nw=λμ=ρ. For the M∕M∕1 system to be stable, at most one customer at a time should be in service, as expected by the definition of its operation.
The corresponding state diagram is of birth-death type, similar to Fig. B.3. Useful closed-form expressions may be obtained for various quantities of interest. More details on the analysis methodology of the M∕M∕1 queue can be found in [25,142], etc. The most useful results obtained include the following:
• The steady-state probability distribution is given by pn=ρn(1−ρ),n=0,1,…
• The average number of customers in the system in the steady state is N=λμ−λ.
• The average system delay per customer (waiting time plus service time) is T=1μ−λ.
• The average waiting time in queue is W=ρμ−λ.
• The average number of customers in the queue is NQ=ρ21−ρ.
Additional quantities of interest can be obtained via analysis as shown in [25] and other references targeted explicitly to queuing theory analysis [33,36,90,142,209,211,229].
B.3.5. The M∕M∕m System and Other Multiserver Queuing Systems
The M∕M∕1 queue is a very simple system that emerges frequently in various occasions. However, oftentimes, multiserver systems are employed. In this subsection, we overview the most fundamental of them. As with the M∕M∕1 system, for all these multiserver systems, it is possible to derive a set of equations from the corresponding state transition diagram and solve for the steady-state (equilibrium) probabilities. Using Little’s law allows computing the average delay per customer and other quantities of interest.
The M∕M∕m queuing system
The M∕M∕m system is similar to the M∕M∕1 with respect to the arrival process (Poisson), the independence of service times, and the exponentially distributed and independent interarrival times. However, this system has m parallel servers, meaning that a customer at the head of the queue (ready to receive service) can be routed to any of the server currently available, once a customer completes service in one of them.
Applying the analysis methodology of balance equations, the corresponding outcomes for the quantities of interest obtained in the M∕M∕1 case are as follows:
• The probability that an arriving customer will find all servers buys and will be forced to queue is PQ=p0(mρ)mm!(1−ρ), where p0 is given by the expression
p0=[1+∑m−1n=1(mρ)nn!+∑∞n=m(mρ)nm!1mn−m]−1.
(B.9)
• The average number of customers in the system in the steady state is N=mρ+ρPQ1−ρ.
• The average system delay per customer (waiting time plus service time) is T=1μ+PQmμ−λ.
• The average waiting time in queue is W=ρPQλ(1−ρ).
• The average number of customers in the queue is NQ=PQρ1−ρ.
Now the utilization of the system is defined as ρ=λmμ<1. In order to understand this stability condition for the system, note that now m servers operate in parallel each with an exponentially distributed service rate of μ. This means that the combined server will be operating as a single server with service rate which will be the minimum of m exponential distributions. This has been proven to be again exponentially distributed with rate the sum of partial rates mμ. Thus, for the mean service time expression in the similar application of Little’s law that we performed for the M∕M∕1 system, now for the case for the M∕M∕m would yield λmμ.
The M∕M∕∞ queuing system
In several cases, the available service has such a capacity that practically, any customer entering the system receives immediate service. Typical examples include web platforms receiving requests and serving them immediately (up to a certain point of course). In practice, the number of available servers is always finite. However, whenever the number of available servers is such that no queuing at all is observed, the system might well be considered as of an M∕M∕∞ type.
The M∕M∕∞ system can be considered as the limit of the M∕M∕m system when m→∞. Consequently, in the limiting case where the number of servers is high (theoretically infinite number of servers), m=∞, one obtains a M∕M∕∞ system for which the quantities of interest become the following:
• The average number of customers in the system in the steady state N=λμ.
• The average system delay per customer (waiting time plus service time) T=1μ.
Clearly, for such a system where a customer always finds an available empty server, there is no queuing and thus NQ=0,W=0. The response time for each arriving job is a single exponential distribution with parameter μ as already explained and it thus coincides with the average system delay per customer given above. One should also notice that the stationary distribution of a more general queue with practical applications, the M∕G∕∞ queue where the service discipline can be arbitrary, but arrivals are Poisson and there exists an infinite number of servers, is the same as that of the M∕M∕∞ queue. This implies that an overprovisioned system, i.e. one with practically infinite number of servers, behaves the same irrespective of the service policy and the behavior is rather simple, since each customer is essentially served immediately. Thus, the mean number of customers in the system will be N=λμ in any case.
The steady-state distribution of the system is given by the expression
pn=(λμ)ne−λ∕μn!,n=0,1,…
(B.10)
with p0=e−λ∕μ. From the above expression, it can be seen that the system is always stable, as no special constraint on the latter distribution is required. This is also intuitively verified by the fact that no matter how heavy the input load of customers, there are always available servers to satisfy it (infinite number). Thus, the number of customers waiting in the systems never grows arbitrarily and the system will be stable. In fact, it can be shown that the number of customers in the system is Poisson distributed even if the service time distribution is not exponential, e.g. in M∕G∕∞[25]. The M∕M∕∞ system is also known as the Erlang-C model, as opposed to the Erlang-B that will be described in the following.
The M∕M∕m∕m queuing system
This system is identical to an M∕M∕m system with the difference that there is no queuing buffer space. The system consists of a facility where arrivals form a single queue and are governed by a Poisson process, there are m servers and job service times are exponentially distributed. Thus, the total capacity of the system is defined by the number of customers the system can serve instantaneously, which also means that when an arriving customer finds all m servers of the system busy, it is blocked from entering the system and thus discarded. For this reason, the model is called a loss system. The lost customers are said to be blocked. Practical examples of such systems are telephone exchanges, cellular phones, and other more general flow-service based systems.
In general, it is tough to obtain analytic expressions for the quantities of interest mentioned above for the other systems presented. However, it is possible to obtain the probability of i customers in the system and the blocking probability pm, namely, the probability that an arriving customer will find all servers busy and will be discarded from the system
pm=(λ∕μ)m/m!∑mn=0(λ∕μ)n/n!.
(B.11)
The latter is known as the Erlang B formula. This is also called the Erlang-B loss function and tabular solutions are usually provided in the related references. More details can be obtained in the corresponding references [25,33,36,90,142,209,211,229]. It should be noted that as m→∞, the above distribution approaches the Poisson distribution of the M∕M∕∞ system, described above.