AN INTRODUCTION TO QUEUEING THEORY AND MATRIXANALYTIC METHODS
This page intentionally left blank
An Introduction to Queueing Theory and MatrixAnalytic Methods by
L. BREUER University of Trier, Germany and
D. BAUM University of Trier, Germany
A C.I.P. Catalogue record for this book is available from the Library of Congress.
ISBN ISBN ISBN ISBN
1402036302 (HB) 9781402036309 (HB) 1402036310 (ebook) 9781402036316 (ebook)
Published by Springer, P.O. Box 17, 3300 AA Dordrecht, The Netherlands. www.springeronline.com
Printed on acidfree paper
All Rights Reserved © 2005 Springer No part of this work may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, microfilming, recording or otherwise, without written permission from the Publisher, with the exception of any material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work.
Printed in the Netherlands.
Contents
List of Figures Foreword
ix xi
1. QUEUES: THE ART OF MODELLING
1
Part I
Markovian Methods
2. MARKOV CHAINS AND QUEUES IN DISCRETE TIME Definition 1 2 Classification of States Stationary Distributions 3 4 Restricted Markov Chains 5 Conditions for Positive Recurrence 6 The M/M/1 queue in discrete time
11 11 15 20 27 29 31
3. HOMOGENEOUS MARKOV PROCESSES ON DISCRETE STATE SPACES Definition 1 2 Stationary Distribution
39 39 46
4. MARKOVIAN QUEUES IN CONTINUOUS TIME The M/M/1 Queue 1 2 Skip–Free Markov Processes The M/M/∞ Queue 3 4 The M/M/k Queue The M/M/k/k Queue 5 The M/M/k/k+c/N Queue 6
51 51 54 55 56 58 59
vi
AN INTRODUCTION TO QUEUEING THEORY
5. MARKOVIAN QUEUEING NETWORKS Balance Equations and Reversibility Properties 1 2 Jackson and GordonNewell Networks Symmetric Service Disciplines 3
Part II
63 65 80 99
Semi–Markovian Methods
6. RENEWAL THEORY Renewal Processes 1 2 Renewal Function and Renewal Equations Renewal Theorems 3 4 Residual Life Times and Stationary Renewal Processes Renewal Reward Processes 5
113 113 116 118 124 130
7. MARKOV RENEWAL THEORY Regenerative Processes 1 2 Semi–Markov Processes 3 Semi–regenerative Processes
135 135 138 144
8. SEMI–MARKOVIAN QUEUES The GI/M/1 Queue 1 2 The M/G/1 Queue 3 The GI/M/m Queue
147 147 155 160
Part III
Matrix–Analytic Methods
9. PHASE–TYPE DISTRIBUTIONS Motivation 1 2 Definition and Examples 3 Moments 4 Closure Properties
169 169 171 176 178
10. MARKOVIAN ARRIVAL PROCESSES The PH renewal process 1 2 From PH renewal processes to MAPs 3 From MAPs to BMAPs 4 Distribution of the Number of Arrivals Expected Number of Arrivals 5
185 185 187 188 190 192
Contents
vii
11. THE GI/PH/1 QUEUE The Embedded Markov Chain 1 2 Stationary Distribution at Arrival Instants 3 Ergodicity of the Embedded Markov Chain 4 Asymptotic Distribution of the System Process
197 198 199 204 208
12. THE BMAP/G/1 QUEUE The Embedded Markov Chain 1 2 The Matrix G 3 Stationary Distribution at Service Completions 4 Asymptotic Distribution of the System Process Stability Conditions 5
213 214 215 216 218 224
13. DISCRETE TIME APPROACHES Discrete Phase–Type Distributions 1 2 BMAPs in Discrete Time 3 Blockwise Skip–Free Markov Chains 4 The PH/PH/1 Queue in Discrete Time
229 229 232 234 236
14. SPATIAL MARKOVIAN ARRIVAL PROCESSES Arrivals in Space 1 2 Properties of Spatial MAPs
239 240 245
15. APPENDIX Conditional Expectations and Probabilities 1 2 Extension Theorems 3 Transforms 4 Gershgorin’s Circle Theorem
253 253 256 258 260
References
263
Index
269
This page intentionally left blank
List of Figures
1.1 1.2 1.3 3.1 3.2 4.1 4.2 4.3 4.4 4.5 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 6.1 7.1 8.1 9.1 9.2 9.3 9.4
Single server queue Multi–server queue Total system time Typical path Poisson process M/M/1 queue Transition rates for the M/M/1 queue A skip–free Markov process M/M/k queue A closed computer network Open Queueing Network Modified Network Central Server Model Modified Central Server Model FCFS Order Cox Distribution LCFS Order Simple model of a computer pool Random variables of a renewal process T Typical path of a semiMarkov process Fix point as intersection with diagonal Erlang distribution Generalized Erlang distribution Hyper–exponential distribution Cox distribution
2 2 6 40 43 51 52 54 57 60 64 91 96 98 103 103 104 108 113 139 150 174 175 175 176
x
AN INTRODUCTION TO QUEUEING THEORY
9.5 9.6 9.7
Convolution of two PH distributions Mixture of two PH distributions Superposition of two PH distributions
179 180 182
Foreword
The present textbook contains the records of a two–semester course on queueing theory, including an introduction to matrix–analytic methods. This course comprises four hours of lectures and two hours of exercises per week and has been taught at the University of Trier, Germany, for about ten years in sequence. The course is directed to last year undergraduate and first year graduate students of applied probability and computer science, who have already completed an introduction to probability theory. Its purpose is to present material that is close enough to concrete queueing models and their applications, while providing a sound mathematical foundation for the analysis of these. Thus the goal of the present book is two–fold. On the one hand, students who are mainly interested in applications easily feel bored by elaborate mathematical questions in the theory of stochastic processes. The presentation of the mathematical foundations in our courses is chosen to cover only the necessary results, which are needed for a solid foundation of the methods of queueing analysis. Further, students oriented towards applications expect to have a justification for their mathematical efforts in terms of immediate use in queueing analysis. This is the main reason why we have decided to introduce new mathematical concepts only when they will be used in the immediate sequel. On the other hand, students of applied probability do not want any heuristic derivations just for the sake of yielding fast results for the model at hand. They want to see the close connections between queueing theory and the theory of stochastic processes. For them, a systematic introduction to the necessary concepts of Markov renewal theory is indispensable. Further, they are not interested in any technical details of queueing applications, but want to see the reflection of the mathematical concepts in the queueing model as purely as possible.
xii
AN INTRODUCTION TO QUEUEING THEORY
A prominent part of the book will be devoted to matrix–analytic methods. This is a collection of approaches which extend the applicability of Markov renewal methods to queueing theory by introducing a finite number of auxiliary states. For the embedded Markov chains this leads to transition matrices in block form having the same structure as the classical models. With a few modifications they can be analyzed in the same way.
Matrix–analytic methods have become quite popular in queueing theory during the last twenty years. The intention to include these in a students’ introduction to queueing theory has been the main motivation for the authors to write the present book. Its aim is a presentation of the most important matrix– analytic concepts like phase–type distributions, Markovian arrival processes, the GI/PH/1 and BMAP/G/1 queues as well as QBDs and discrete time approaches. This is the content of part III of this book. As an introductory course for students it is necessary to provide the required results from Markov renewal theory before. This is done in part I, which contains Markovian theory, and part II which combines the concepts of part I with renewal theory in order to obtain a foundation for Markov renewal theory. Certainly only few students would like to acquire this theoretical body without some motivating applications in classical queueing theory. These are introduced as soon as the necessary theoretical background is provided.
The book is organized as follows. The first chapter gives a short overview of the diverse application areas for queueing theory and defines queues and their system processes (number of users in the system). The appendix sections in chapter 15 provide an easy reference to some basic concepts of analysis and probability theory. For the simple Markovian queueing models (in discrete and continuous time) it suffices to give a short introduction to Markov chains and processes, and then present an analysis of some queueing examples. This is done in chapters 2 through 4. Chapter 5 gives an introduction to the analysis of simple queueing networks, in particular Jackson and Gordon–Newell networks as well as BCMP networks. This concludes the first part of the book, which deals with Markovian methods exclusively. The second part is devoted to semi–Markovian methods. In chapter 6 the most important results of renewal theory are provided. Chapter 7 contains a short introduction to Markov renewal theory. This will be necessary for the analysis of the classical semi–Markovian queues (namely the GI/M/1 and M/G/1 systems), which is presented in chapter 8. More recent approaches which are usually subsumed under the term ”matrix– analytic methods” are presented in the third part of the book. In chapters
Foreword
xiii
9 and 10 the basic concepts of phase–type distributions and Markovian arrival processes are introduced. The matrix–analytic analogues to the GI/M/1 and M/G/1 queues, namely the GI/PH/1 and BMAP/G/1 systems are analyzed in chapters 11 and 12. Chapter 13 gives a short overview on discrete time analogues. Further blockwise skip–free Markov chains, also known as QBD processes, are analyzed, with an application to the PH/PH/1 queue in discrete time. Finally, in chapter 14 a generalization of BMAPs towards spatial Markovian arrival processes is presented. Of course, most of the more classical material can be found in existing textbooks on stochastic processes. For example, C¸inlar [25] and Ross [75] still contain, in our view, the most systematic treatment of semi–Markovian queues. Also of great value, mostly for the theory of Markov chains and processes, are the courses on stochastic processes by Karlin and Taylor [46, 47]. Further important results may be found in Doob [31], Asmussen [5], and Nelson [61]. The material on queueing networks can be found in Mitrani [60], Kelly [48], and Kleinrock [50]. Monographs on matrix–analytic methods are the pioneering books by Neuts [65, 66], and Latouche and Ramaswami [52]. For discrete time methods the overview paper by Alfa [2] was helpful. However, some aspects of standard presentation have been changed in order to alleviate the mathematical burden for the students. The stationary regime for Markov chains has been introduced as an asymptotic mean over time in order to avoid the introduction of periodicity of states. The definition of Markov processes in chapter 3 is much closer to the derivation of immediate results. It is not necessary to derive the standard path properties in lengthy preliminary analyses, since these are already included in the definition. Nevertheless, the close connection between the phenomena observed in queueing systems and the definition given in our textbook is immediately clear to the student.
The introduction of renewal theory has been postponed to the second part of the book in order to show a variety of queueing application of a purely Markovian nature first. The drawback that a proof for asymptotic behaviour of Markov processes must be deferred appears bearable for an average student. The proof of Blackwell’s theorem, and thus also for the equivalent key renewal theorem, has been omitted as it is too technical for a student presentation in the authors’ opinion. The same holds for proofs regarding the necessity of the stability condition for the queues GI/PH/1 and BMAP/G/1. Only proofs for sufficiency have been included because they are easily based on the classical Foster criteria. At the end of each chapter there will be a collection of exercises, some of them representing necessary auxiliary results to complete the proofs presented in
xiv
AN INTRODUCTION TO QUEUEING THEORY
the lectures. Additional material is given as exercises, too, e.g. examples of computer networks or certain special queueing system. The book is written according to the actual scripts of the lecture courses given at the University of Trier, Germany. It is intended not only to collect material which can be used for an introductory course on queueing theory, but to propose the scripts of the lectures themselves. The book contains exactly as much material as the authors (as lecturers) could present in two semesters. Thus a lecturer using this textbook does not need to choose and reassemble the material for a course from sources which must be shortened because there is no time to treat them completely. This entails saving the work of reformulating notations and checking dependencies. For a course of only one semester we propose to teach parts I and II of this book, leaving out sections 5.3 and 8.3.
Chapter 1 QUEUES: THE ART OF MODELLING
Stochastic modelling is the application of probability theory to the description and analysis of real world phenomena. It is thus comparable to physics, with the distinguishing property that mostly technical and not natural systems are investigated. These are usually so complex that deterministic laws cannot be formulated, a circumstance that leads to pervasive use of stochastic concepts. Application fields as telecommunication or insurance bring methods and results of stochastic modelling to the attention of applied sciences such as engineering or economics. On the other hand, often new technological developments give rise to new questions in an application field, which in turn may open a new direction in stochastic research, and thus provide an impetus to applied probability. Stochastic modelling is a science with close interaction between theory and practical applications. This is nice because it combines the possibility of theoretical beauty with a real–world meaning of its key concepts. On the other hand, it is difficult to cover the whole width from theoretical foundations to the details of practical applications. The present book is an essay to give an introduction to the theory of stochastic modelling in a systematic way without losing contact to its applicability. One of the most important domains in stochastic modelling is the field of queueing theory. This shall be the topic of this treatise. Many real systems can be reduced to components which can be modelled by the concept of a so–called queue. The basic idea of this concept has been borrowed from the every–day experience of the queues at the checkout counters in a supermarket. A queue in the more exact scientific sense consists of a system into which there comes a stream of users who demand some capacity of the system over a certain time interval before they leave the system again. It is said that the users are served in the system by one or many servers. Thus a queueing system can be
2
AN INTRODUCTION TO QUEUEING THEORY
described by a (stochastic) specification of the arrival stream and of the system demand for every user as well as a definition of the service mechanism. The former describe the input into a queue, while the latter represents the functioning of the inner mechanisms of a queueing system. Before we give an exact definition of a queueing system, a few examples shall provide an idea of the variety of applications.
Example 1.1 Single Server Queue
arrival process
queue
Figure 1.1.
server
departure process
Single server queue
A queue in front of the checkout counter of a supermarket may serve as the simplest illustration for a queueing system. There is one input stream, and one server who serves the customers in order of their appearance at the counter. This service discipline, which does not admit any preferences among users, is called first come first served (abbr.: FCFS).
Example 1.2 Multi–Server Queue
arrival process
departure process
queue
servers Figure 1.2.
Multi–server queue
Queues: The Art of Modelling
3
The first real application of queueing theory, in fact the one that engendered the development of the whole field of research, has been the design and analysis of telephone networks. In the early days of Erlang at the beginning of the 20th century, telephone calls first went to an operator before they could be conected to the person that was to be reached by the call. Thus an important part of a telephone network could be modelled by a queueing system in which the servers are the operators in a call center who connect the incoming calls (which are modelled by the input stream of users) to their addressees. Here, the time of connecting is represented by the service demand of a user. A crucial performance measure of such a system is the probability that a person who wants to get a connection for a call finds all operators busy and thus cannot be served. This value is called the loss probability of the system. For a modern call center, where questions are answered instead of cables connected, the service times represent the time of the call between the user and the operator. Example 1.3 In recent times, computer networks (the most prominent example is the internet) have increasingly become the object of applications of queueing theory. For example, a server in a computer network receives demands from its clients and needs to serve them. The demands make up the input stream into the queueing sytem that represents the server utilization. A service discipline that is often used in these kinds of application is the following: The processing capacity of the server is divided into equal parts among the jobs such that none of the clients is favoured, but each client’s service time depends on the total number of clients that are resident at the same time. Because of its prevalence in computer applications, this service discipline is called processor sharing. Example 1.4 Queues find further applications in airport traffic. Here, the servers are the several landing fields available for arriving airplanes, while the latter are the users of the system. Obviously, there cannot be any queue of planes waiting in the air, so that an arriving airplane finding all landing fields in use needs instead to fly an extra circle around the airport and then try again for a possibility to land. Such a manoeuver is called a retrial, and the corresponding queueing model is called a retrial queue. Since with every extra circle that a plane has to perform its gasoline is reduced more, the priority of such an aircraft to obtain a landing permission is increasing and should be higher than that of more recent airplanes with fewer retrials. Such an influence on the service schedule is called priority queueing. Example 1.5 More complicated queueing models have been developed for the design of traffic lights at crossroads. In such a model, there are several distinguishable queues which represent the different roads leading to the intersection. A green light at one road means that vehicles waiting on it are served
4
AN INTRODUCTION TO QUEUEING THEORY
on a first come first served base. There are as many servers as there are traffic lights at the intersection, and it is obvious that these servers must function in dependence on each other. Such queueing systems are called polling systems.
Example 1.6 In modern production systems an analysis of assembly lines has become a fundamental necessity. They are modelled by so–called tandem queueing networks, which are defined as a series of several single queueing systems where the output of one queue forms the input of the next. Example 1.7 Finally, perhaps the most interesting object of analysis for today’s computer science, the internet, would merely appear as a highly complex queueing network, at least so from the point of view of stochastic modelling. These examples illustrate the very different interpretations and thus applications that queueing systems can assume. They should suffice as a motivation to undergo the strain of developing methods and concepts for the analysis of queueing systems of the highest possible complexity and generality. Our introduction to the theory of queues gives a (hopefully) balanced presentation of potentially very general methods of analysis based on the theory of Markov renewal processes, and at the same time tries to apply these to the practically relevant analyses of queueing systems. Opening the exact part of the presentation we begin with a definition of the concept of a queue: For every n ∈ N, let Tn and Sn denote positive real–valued random variables with Tn+1 > Tn for all n ∈ N. The sequence T = (T Tn : n ∈ N0 ) is called arrival point process and S = (S Sn : n ∈ N) is the sequence of service times. Further choose a number k of servers and the system capacity c, with k , c ∈ N ∪ {∞}. Finally a service discipline B needs to be specified. This can be first come first served (FCFS), last come first served (LCFS), processor sharing (PS), sometimes working with certain priorities or preemption rules. Normally we choose FCFS, meaning that the first user who arrives in the system will be the first to get access to a server. If other service disciplines will be used, they will be explained whenever introduced.
The 5–tuple (T , S, k , c, B ) is called a queue (or queueing system) with arrival point process T , sequence of service times S, number k of servers, system capacity c, and service discipline B. Define further the nth inter–arrival time by Z1 := T1 and Zn := Tn − Tn−1 for all n ≥ 2. The standard way to specify a queue is the Kendall notation. This merely denotes the 5–tuple (T , S , k, c, B ) in the above definition by T /S/k /c/B and additionally sets some conventions for interpreting this
5
Queues: The Art of Modelling
notation: If the 4th or 5th parameter is left out, this is agreed to mean c = ∞ or B = F C F S, respectively. Further, for the first two parameters the letters M (resp. G) stand for geometric (resp. general) inter–arrival and service times for queues in discrete time and for exponential (resp. general) inter–arrival and service times for queues in continuous time. There are additional conventions: D stands for deterministic (Dirac) distributions, Geo is the same as M for discrete time systems, etc. The main goal of any queueing analysis will be to specify and analyze the system process Q = (Qt : t ≥ 0), where Qt is the number of users in the queueing system (usually including the number of users in service) at time t. An important measure (in case of existence) will be the asymptotic distribution of Qt for t tending to infinity. Our first result concerns a sample path property of general conservative systems with inputs and outputs. Conservative systems do not create or destroy users. Let α(t) denote the number of arrivals into the system until time t. Define λt := α(t)/t as the average arrival rate during the interval [0, t]. Further define T as the average time a user spends in the system. Finally denote the ¯t . Then we can state average number of users in the system during [0, t] by N
Theorem 1.8 Little’s Result ¯ = limt→∞ N ¯t does If the limit λ = limt→∞ λt and T do exist, then the limit N exist, too, and the relation ¯ = λT N holds.
Proof: We introduce the notation δ(t) for the number of departures from the system during [0, t] and N (t) for the number of users in the system. If the system starts empty, then these definitions imply the relation N (t) = α(t) − δ(t) for all times t (see the following figure).
Denote the total time that all users have spent in the system during [0, t] by t N (s) ds γ(t) := 0
If we define Tt as the system time per user averaged over all users in the interval [0, t], then the definitions of α(t) and γ(t) imply the relation Tt =
γ(t) α(t)
(1.1)
6
AN INTRODUCTION TO QUEUEING THEORY
number of users
N(t) α (t)
δ (t)
time
Figure 1.3.
Total system time
The average number of users in the system during [0, t] can be obtained as ¯t = γ(t) = γ(t) · α(t) = λt Tt N t α(t) t
where the last equality comes from (1.1) and the definition of λt . If the limits ¯ = λT follows for t λ and T = limt→∞ Tt exist, then the stated relation N tending to infinity. For ease of reference, we finally provide a table of some basic probability distributions which will occur frequently throughout the book.
Distribution
Density
Range
Parameters
Exponential
λe−λt
t>0
λ>0
Erlang
mµ(mµt)m−1 −mµt e (m−1)!
t>0
m ∈ N, µ > 0
Poisson
λn −λ n! e
n ∈ N0
λ>0
Geometric
(1 − p)pn
n ∈ N0
p ∈]0, 1[
Binomial
N n
pn (1 − p)N −n 0 ≤ n ≤ N
N ∈ N, p ∈]0, 1[
Queues: The Art of Modelling
7
Notes The first formal proof for Little’s result appeared in Little [53]. The proof presented here is taken from Kleinrock [50].
PART I
MARKOVIAN METHODS
Chapter 2 MARKOV CHAINS AND QUEUES IN DISCRETE TIME
1.
Definition
Let Xn with n ∈ N0 denote random variables on a discrete space E . The sequence X = (X Xn : n ∈ N0 ) is called a stochastic chain. If P is a probability measure X such that P (X Xn+1 = jX0 = i0 , . . . , Xn = in ) = P (X Xn+1 = jX Xn = in )
(2.1)
for all i0 , . . . , in , j ∈ E and n ∈ N0 , then the sequence X shall be called a Markov chain on E . The probability measure P is called the distribution of X , and E is called the state space of X . Xn = in ) are independent of the If the conditional probabilities P (X Xn+1 = jX time index n ∈ N0 , then we call the Markov chain X homogeneous and denote pij := P (X Xn+1 = jX Xn = i) for all i, j ∈ E. The probability pij is called transition probability from state i to state j. The matrix P := (pij )i,j∈E shall be called transition matrix of the chain X . Condition (2.1) is referred to as the Markov property.
Example 2.1 If (X Xn : n ∈ N0 ) are random variables on a discrete space E , which are stochastically independent and identically distributed (shortly: iid), then the chain X = (X Xn : n ∈ N0 ) is a homogeneous Markov chain. Example 2.2 Discrete Random Walk Set E := Z and let (S Sn : n ∈ N) be a sequence of iid random variables with values in Z and distribution π. Define X0 := 0 and Xn := nk=1 Sk for all
12
AN INTRODUCTION TO QUEUEING THEORY
n ∈ N. Then the chain X = (X Xn : n ∈ N0 ) is a homogeneous Markov chain with transition probabilities pij = πj −i . This chain is called discrete random walk. Example 2.3 Bernoulli process Set E := N0 and choose any parameter 0 < p < 1. The definitions X0 := 0 as well as p, j =i+1 pij := 1 − p, j = i Xn : n ∈ N0 ). It is for i ∈ N0 determine a homogeneous Markov chain X = (X called Bernoulli process with parameter p. So far, al examples have been chosen as to be homogeneous. The following theorem shows that there is a good reason for this: Xn : n ∈ N0 ) a Markov chain on a discrete state Theorem 2.4 Be X = (X space E . Then there is a homogeneous Markov chain X ′ = (X Xn′ : n ∈ N0 ) ′ on the state space E × N0 such that Xn = pr1 (X Xn ) for all n ∈ N0 , with pr1 denoting the projection to the first dimension.
Proof: Let X be a Markov chain with transition probabilities pn;ij := P(X Xn+1 = jX Xn = i)
which may depend on the time instant n. Define the two–dimensional random variables Xn′ := (X Xn , n) for all n ∈ N0 and denote the resulting distribution of the chain X ′ = (X Xn′ : n ∈ N0 ) by P′ . By definition we obtain Xn = pr1 (X Xn′ ) for all n ∈ N0 . Further P′ (X0′ = (i, k)) = δk0 · P(X0 = i) holds for all i ∈ E , and all transition probabilities ′ p′(i,k),(j,l) = P′ (Xk+1 = (j, l)Xk′ = (i, k )) = δl,k+1 · pk;ij
can be expressed without a time index. Hence the Markov chain X ′ is homogeneous.
Because of this result, we will from now on treat only homogeneous Markov chains and omit the adjective ”homogeneous”. Let P denote the transition matrix of a Markov chain on E. Then as an immediate consequence of its definition we obtain pij ∈ [0, 1] for all i, j ∈ E
Markov Chains and Queues in Discrete Time
13
and j∈E pij = 1 for all i ∈ E. A matrix P with these properties is called a stochastic matrix on E. In the following we shall demonstrate that, given an initial distribution, a Markov chain is uniquely determined by its transition matrix. Thus any stochastic matrix defines a family of Markov chains.
Theorem 2.5 Let X denote a homogeneous Markov chain on E with transition matrix P . Then the relation Xn = i) = pi,j1 · . . . · pjm−1 ,jm P (X Xn+1 = j1 , . . . , Xn+m = jm X holds for all n ∈ N0 , m ∈ N, and i, j1 , . . . , jm ∈ E . Proof: This is easily shown by induction on m. For m = 1 the statement holds by definition of P . For m > 1 we can write
P(X Xn+1 =j1 , . . . , Xn+m = jm X Xn = i) P (X Xn+1 = j1 , . . . , Xn+m = jm , Xn = i) = P (X Xn = i) P (X Xn+1 = j1 , . . . , Xn+m = jm , Xn = i) = P (X Xn+1 = j1 , . . . , Xn+m−1 = jm−1 , Xn = i) P (X Xn+1 = j1 , . . . , Xn+m−1 = jm−1 , Xn = i) × P (X Xn = i) = P (X Xn+m = jm X Xn = i, Xn+1 = j1 , . . . , Xn+m−1 = jm−1 ) × pi,j1 · . . . · pjm−2 ,jm−1 = pjm−1 ,jm · pi,j1 · . . . · pjm−2 ,jm−1 because of the induction hypothesis and the Markov property.
Let π be a probability distribution on E with P(X0 = i) = πi for all i ∈ E. Then theorem 2.5 immediately yields P (X0 = j0 , X1 = j1 , . . . , Xm = jm ) = πj0 · pj0 ,j1 . . . pjm−1 ,jm
(2.2)
for all m ∈ N and j0 , . . . , jm ∈ E . The chain with this distribution P is denoted by X π and called the π–version of X . The probability measure π is called initial distribution for X .
Theorem 2.5 and the extension theorem by Tulcea (see appendix 2) show that a Markov chain is uniquely determined by its transition matrix and its initial distribution. Whenever the initial distribution π is not important or understood from the context, we will simply write X instead of X π . However, in an exact manner the notation X denotes the family of all the versions X π of X , indexed by their initial distribution π.
14
AN INTRODUCTION TO QUEUEING THEORY
Theorem 2.6 Let X denote a homogeneous Markov chain with transition matrix P . Then the relation Xn = i) = P m (i, j) P(X Xn+m = jX holds for all m, n ∈ N0 and i, j ∈ E, with P m (i, j) denoting the (i, j)th entry of the mth power of the matrix P . In particular, P 0 equals the identity matrix.
Proof: This follows by induction on m. For m = 1 the statement holds by definition of P . For m > 1 we can write P (X Xn+m = j, Xn = i) P (X Xn = i) P (X Xn+m = j, Xn+m−1 = k, Xn = i) = P (X Xn+m−1 = k, Xn = i)
Xn = i) = P(X Xn+m = jX
k∈E
=
×
k∈E
=
k∈E
P (X Xn+m−1 = k, Xn = i) P (X Xn = i)
P (X Xn+m = jX Xn+m−1 = k, Xn = i) · P m−1 (i, k) pkj · P m−1 (i, k) = P m (i, j)
because of the induction hypothesis and the Markov property.
Thus the probabilities for transitions in m steps are given by the mth power of the transition matrix P . The rule P m+n = P m P n for the multiplication of matrices and theorem 2.6 lead to the decompositions P(X P(X Xm+n = jX0 = i) = Xm = kX0 = i) · P(X Xn = jX0 = k) k∈E
which are known as the Chapman–Kolmogorov equations.
For later purposes we will need a relation closely related to the Markov property, which is called the strong Markov property. Let τ denote a random variable with values in N0 ∪ {∞}, such that the condition P(τ ≤ nX ) = P(τ ≤ nX0 , . . . , Xn )
(2.3)
holds for all n ∈ N0 . Such a random variable is called a (discrete) stopping time for X . The defining condition means that the probability for the event {τ ≤ n} depends only on the evolution of the chain until time n. In other
Markov Chains and Queues in Discrete Time
15
words, the determination of a stopping time does not require any knowledge of the future. Now the strong Markov property is stated in Theorem 2.7 Let X denote a Markov chain and τ a stopping time for X with P(τ < ∞) = 1. Then the relation Xm = jX0 = iτ ) P(X Xτ +m = jX0 = i0 , . . . , Xτ = iτ ) = P(X holds for all m ∈ N and i0 , . . . , iτ , j ∈ E . Proof: The fact that the stopping time τ is finite and may assume only countably many values can be exploited in the transformation P(X Xτ +m = jX0 = i0 , . . . , Xτ = iτ ) ∞ P(τ = n, Xτ +m = jX0 = i0 , . . . , Xτ = iτ ) = =
n=0 ∞
P(X Xτ +m = jτ = n, X0 = i0 , . . . , Xτ = iτ )
∞
P(X Xn+m = jX Xn = iτ ) · P(τ = nX )
n=0
× P(τ = nX0 = i0 , . . . , Xτ = iτ )
= =
n=0 ∞ n=0
P(τ = nX ) · P(X Xm = jX0 = iτ )
which yields the statement, as τ is finite with probability one.
2.
Classification of States
Let X denote a Markov chain with state space E and transition matrix P . We call a state j ∈ E accessible from a state i ∈ E if there is a number m ∈ N0 with P (X Xm = jX0 = i) > 0. This relation shall be denoted by i → j . If for two states i, j ∈ E , the relations i → j and j → i hold, then i and j are said to communicate, in notation i ↔ j. Theorem 2.8 The relation ↔ of communication between states is an equivalence relation. Proof: Because of P 0 = I, communication is reflexive. Symmetry holds by definition. Thus it remains to show transitivity. For this, assume i ↔ j
16
AN INTRODUCTION TO QUEUEING THEORY
and j ↔ k for three states i, j, k ∈ E . This means that there are numbers m, n ∈ N0 with P m (i, j) > 0 and P n (j, k ) > 0. Hence, by the Chapman– Kolmogorov equation, we obtain P(X P(X Xm+n = kX0 = i) = Xm = hX0 = i) · P(X Xn = kX0 = h) h∈E
≥ P(X Xm = jX0 = i) · P(X Xn = kX0 = j) > 0
which proves i → k. The remaining proof of k → i is completely analogous. Because of this result and the countability, we can divide the state space E of a Markov chain into a partition of countably many equivalence classes with respect to the communication of states. Any such equivalence class shall be called communication class. A communication class C ⊂ E that does not allow access to states outside itself, i.e. for which the implication i → j,
i∈C
⇒
j∈C
holds, is called closed. If a closed equivalence class consists only of one state, then this state shall be called absorbing. If a Markov chain has only one communication class, i.e. if all states are communicating, then it is called irreducible. Otherwise it is called reducible. Example 2.9 Let X denote a discrete random walk (see example 2.2) with the specification π1 = p and π−1 = 1 − p for some parameter 0 < p < 1. Then X is irreducible.
Example 2.10 The Bernoulli process (see example 2.3) with non–trivial parameter 0 < p < 1 is to the highest degree reducible. Every state x ∈ N0 forms an own communication class. None of these is closed, thus there are no absorbing states. Theorem 2.11 Be X a Markov chain with state space E and transition matrix P . Let C = {cn : n ∈ I} ⊂ E with I ⊂ N be a closed communication class. Define the matrix P ′ by its entries p′ij := pci ,cj for all i, j ∈ I. Then P ′ is stochastic. Proof: By definition, p′ij ∈ [0, 1] for all i, j ∈ I. Since C is closed, pci ,k = 0 for all i ∈ I and k ∈ / C. This implies p′ij = pci ,cj = 1 − pci ,k = 1 j∈I
j∈I
k∈ /C
Markov Chains and Queues in Discrete Time
17
for all i ∈ I, as P is stochastic.
Thus the restriction of a Markov chain X with state space E to the states of one of its closed communication classes C defines a new Markov chain with state space C. If the states are relabeled according to their affiliation to a communication class, the transition matrix of X can be displayed in a block matrix form as ⎤ ⎡ Q Q1 Q2 Q3 Q4 . . . ⎢ 0 P1 0 0 0 . . .⎥ ⎥ ⎢ ⎢ 0 0 P2 0 0 . . .⎥ (2.4) P =⎢ ⎥ ⎢0 0 0 P3 0 . . .⎥ ⎦ ⎣ . . .. .. .. . . . .. ..
with Pn being stochastic matrices on the closed communication classes Cn . The first row contains the transition probabilities starting from communication classes that are not closed.
Let X denote a Markov chain with state space E. In the rest of this section we shall investigate distribution and expectation of the following random variables: Define τj as the stopping time of the first visit to the state j ∈ E , i.e. τj := min{n ∈ N : Xn = j}
Denote the distribution of τj by Fk (i, j) := P(ττj = kX0 = i) for all i, j ∈ E and k ∈ N. Lemma 2.12 The conditional distribution of the first visit to the state j ∈ E, given an initial state X0 = i, can be determined iteratively by k=1 pij , Fk (i, j) = , p F (h j), k≥2 h=j ih k−1 for all i, j ∈ E.
Proof: For k = 1, the definition yields F1 (i, j) = P(ττj = 1X0 = i) = P(X1 = jX0 = i) = pij for all i, j ∈ E. For k ≥ 2, conditioning upon X1 yields Fk (i, j) = P(X1 = j, . . . , Xk−1 = j, Xk = jX0 = i)
18
AN INTRODUCTION TO QUEUEING THEORY
=
P(X1 = hX0 = i)
h=j
× P(X2 = j, . . . , Xk−1 = j, Xk = jX0 = i, X1 = h) = pih · P(X1 = j, . . . , Xk−2 = j, Xk−1 = jX0 = h) h=j
due to the Markov property.
Now define fij := P(ττj < ∞X0 = i) =
∞
Fk (i, j)
(2.5)
k=1
for all i, j ∈ E, which represents the probability of ever visiting state j after beginning in state i. Summing up over all k ∈ N in the formula of Lemma 2.12 leads to pih fhj (2.6) fij = pij + h=j
for all i, j ∈ E. The proof is left as an exercise.
Define Nj as the random variable of the total number of visits to the state j ∈ E . Expression (2.6) is useful for computing the distribution of Nj :
Theorem 2.13 Let X denote a Markov chain with state space E . The total number of visits to a state j ∈ E under the condition that the chain starts in state i is given by m−1 P(N Nj = mX0 = j) = fjj (1 − fjj )
and for i = j P(N Nj = mX0 = i) =
1 − fij , m−1 (1 − fjj ), fij fjj
m=0 m≥1
Thus the distribution of Nj is modified geometric. (1)
Proof: Define τj
(k+1)
:= τj and τj
(k)
:= min{n > τj
: Xn = j} for all (k)
k ∈ N, with the convention that min ∅ = ∞. Note that τj (l ) τj
= ∞ for all l > k .
(k)
Then the sequence (ττj
= ∞ implies
: k ∈ N) is a sequence of stopping times. The event (k)
{N Nj = m} is the same as the intersection of the events {ττj
< ∞} for
19
Markov Chains and Queues in Discrete Time (M +1)
k = 1, . . . , M and {ττj = ∞}, with M = m if i = j and M = m − 1 if i = j. Now this event can be further described by the intersection of the events (k+1) (k) (M +1) (M ) − τj < ∞} for k = 0, . . . , M − 1 and {ττj − τj = ∞}, with {ττj (0)
M as above and the convention τj (k+1)
:= 0.
(k)
The subevent {ττj − τj < ∞} has probability fij for k = 0 and because of the strong Markov property (see theorem 2.7) probability fjj for k > 0. The (M +1) (M ) − τj probability for {ττj = ∞} is 1 − fij for M = 0 and 1 − fjj for M > 0. Once more the strong Markov property is the reason for independence of the subevents. Now multiplication of the probabilities leads to the formulae in the statement. Summing over all m in the above theorem leads to
Corollary 2.14 For all j ∈ E, the zero–one law 1, fjj < 1 P(N Nj < ∞X0 = j) = 0, fjj = 1 holds, i.e. depending on fjj there are almost certainly infinitely many visits to a state j ∈ E.
This result gives rise to the following definitions: A state j ∈ E is called recurrent if fjj = 1 and transient otherwise. Let us further define the potential matrix R = (rij )i,j∈E of the Markov chain by its entries rij := E(N Nj X0 = i) for all i, j ∈ E. Thus an entry rij gives the expected number of visits to the state j ∈ E under the condition that the chain starts in state i ∈ E . As such, rij can be computed by ∞ rij = P n (i, j) (2.7) n=0
for all i, j ∈ E. The results in theorem 2.13 and corollary 2.14 yield
Corollary 2.15 For all i, j ∈ E the relations rjj = (1 − fjj )−1
and
rij = fij rjj
hold, with the conventions 0−1 := ∞ and 0 · ∞ := 0 included. In particular, the expected number rjj of visits to the state j ∈ E is finite if j is transient and infinite if j is recurrent.
20
AN INTRODUCTION TO QUEUEING THEORY
Theorem 2.16 Recurrence and transience of states are class properties with respect to the relation ↔. Furthermore, a recurrent communication class is always closed. Proof: Assume that i ∈ E is transient and i ↔ j. Then there are numbers m, n ∈ N with 0 < P m (i, j) ≤ 1 and 0 < P n (j, i) ≤ 1. The inequalities ∞
k=0
P k (i, i) ≥
∞ h=0
P m+h+n (i, i) ≥ P m (i, j)P n (j, i)
∞
P k (j, j)
k=0
now imply rjj < ∞ because of representation (2.7). According to corollary 2.15 this means that j is transient, too. If j is recurrent, then the same inequalities lead to rii ≥ P m (i, j)P n (j, i)rjj = ∞
which signifies that i is recurrent, too. Since the above arguments are symmetric in i and j, the proof of the first statement is complete. For the second statement assume that i ∈ E belongs to a communication class C ⊂ E and pij > 0 for some state j ∈ E \ C. Then pih fhi ≤ 1 − pij < 1 fii = pii + h=i
according to formula (2.6), since fji = 0 (otherwise i ↔ j). Thus i is transient, which proves the second statement. Theorem 2.17 If the state j ∈ E is transient, then limn→∞ P n (i, j) = 0, regardless of the initial state i ∈ E . Proof: If the state j is transient, then the first equation in corollary 2.15 yields rjj < ∞. The second equation in the same corollary now implies rij < ∞, which by the representation (2.7) completes the proof.
3.
Stationary Distributions
Let X denote a Markov chain with state space E and π a measure on E. If P(X Xn = i) = P(X0 = i) = πi for all n ∈ N and i ∈ E , then X π is called stationary, and π is called a stationary measure for X . If furthermore π is a probability measure, then it is called stationary distribution for X .
21
Markov Chains and Queues in Discrete Time
Theorem 2.18 Let X denote a Markov chain with state space E and transition matrix P . Further, let π denote a probability distribution on E with πP = π, i.e. and πj p j i πj = 1 πi = j∈E
j∈E
for all i ∈ E . Then π is a stationary distribution for X . If π is a stationary distribution for X , then πP = π holds.
Proof: Let P(X0 = i) = πi for all i ∈ E. Then P(X Xn = i) = P(X0 = i) for all n ∈ N and i ∈ E follows by induction on n. The case n = 1 holds by assumption, and the induction step follows by induction hypothesis and the Markov property. The last statement is obvious. The following examples show some features of stationary distributions: Example 2.19 Let the transition matrix of a Markov chain X be given by ⎛ ⎞ 0.8 0.2 0 0 ⎜0.2 0.8 0 0⎟ ⎟ P =⎜ ⎝0 0 0.4 0.6⎠ 0 0 0.6 0.4
Then π = (0.5, 0.5, 0, 0), π ′ = (0, 0, 0.5, 0.5) as well as any linear combination of them are stationary distributions for X . This shows that a stationary distribution does not need to be unique. Example 2.20 Bernoulli process (see example 2.1) The transition matrix of a Bernoulli process has the structure ⎛ ⎞ p 1−p 0 0 ... .. ⎟ ⎜ .⎟ p 1−p 0 ⎜ 0 ⎜ P =⎜ .. ⎟ .⎟ p p 0 0 1 − ⎝ ⎠ .. .. .. .. .. . . . . .
Hence π P = π implies first
π0 · (1 − p) = π0
⇒
π0 = 0
since 0 < p < 1. Assume that πn = 0 for any n ∈ N0 . This and the condition πP = π further imply for πn+1 πn · p + πn+1 · (1 − p) = πn+1
⇒
πn+1 = 0
22
AN INTRODUCTION TO QUEUEING THEORY
which completes an induction argument proving πn = 0 for all n ∈ N0 . Hence the Bernoulli process does not have a stationary distribution. Example 2.21 The solution of πP = π and j∈E πj = 1 is unique for 1−p p P = p 1−p with 0 < p < 1. Thus there are transition matrices which have exactly one stationary distribution. The question of existence and uniqueness of a stationary distribution is one of the most important problems in the theory of Markov chains. A simple answer can be given in the transient case (cf. example 2.20): Theorem 2.22 A transient Markov chain (i.e. a Markov chain with transient states only) has no stationary distribution. Proof: Assume that π P = π holds for some distribution π and take any enu∈ N) of the state space E . Choose any index m ∈ N meration E = (sn : n ed, there is an index M > m > 0. Since ∞ with πsm n=1 πsn = 1 is bound ∞ such that ∞ π Set − < π . ε := π sm sm n=M sn n=M πsn . According to then orem 2.17, there is an index N ∈ N such that P (si , sm ) < ε for all i ≤ M and n ≥ N . Then the stationarity of π implies πs m =
∞
πsi P N (si , sm ) =
i=1
<ε+
M −1
πsi P N (si , sm ) +
i=1
∞
∞
πsi P N (si , sm )
i=M
πsi = πsm
i=M
which is a contradiction. For the recurrent case, a finer distinction will be necessary. While the expected total number rjj of visits to a recurrent state j ∈ E is always infinite (see corollary 2.15), there are differences in the rate of visits to a recurrent state. In order to describe these, define Ni (n) as the number of visits to state i until time n. Further define for a recurrent state i ∈ E the mean time mi := E(ττi X0 = i) until the first visit to i (after time zero) under the condition that the chain starts in i. By definition mi > 0 for all i ∈ E. The elementary renewal theorem
Markov Chains and Queues in Discrete Time
23
(which will be proven later as theorem 6.12) states that E(N Ni (n)X0 = j) 1 = n→∞ n mi lim
(2.8)
for all recurrent i ∈ E and independently of j ∈ E provided j ↔ i, with the convention of 1/∞ := 0. Thus the asymptotic rate of visits to a recurrent state is determined by the mean recurrence time of this state. This gives reason to the following definition: A recurrent state i ∈ E with mi = E(ττi X0 = i) < ∞ will be called positive recurrent, otherwise i is called null recurrent. The distinction between positive and null recurrence is supported by the equivalence relation ↔, as shown in
Theorem 2.23 Positive recurrence and null recurrence are class properties with respect to the relation of communication between states. Proof: Assume that i ↔ j for two states i, j ∈ E and i is null recurrent. Thus there are numbers m, n ∈ N with P n (i, j) > 0 and P m (j, i) > 0. Because of k the representation E(N Ni (k)X0 = i) = l=0 P l (i, i), we obtain 0 = lim
k→∞
k
l=0 P
l (i, i)
k k−m−n
P l (j, j)
· P n (i, j)P m (j, i) k k−m−n l P (j, j) k−m−n = lim · l=0 · P n (i, j)P m (j, i) k→∞ k k−m−n k l l=0 P (j, j) = lim · P n (i, j)P m (j, i) k→∞ k P n (i, j)P m (j, i) = mj ≥ lim
k→∞
l=0
and thus mj = ∞, which signifies the null recurrence of j .
Thus we can call a communication class positive recurrent or null recurrent. In the former case, a construction of a stationary distribution is given in Theorem 2.24 Let i ∈ E be positive recurrent and define the mean first visit time mi := E(ττi X0 = i). Then a stationary distribution π is given by πj := m−1 i ·
∞
n=0
P(X Xn = j, τi > nX0 = i)
24
AN INTRODUCTION TO QUEUEING THEORY
for all j ∈ E. In particular, πi = m−1 i and πk = 0 for all states k outside of the communication class belonging to i. Proof: First of all, π is a probability measure since ∞
P(X Xn = j, τi > nX0 = i) =
j∈E n=0
=
∞
P(X Xn = j, τi > nX0 = i)
n=0 j∈E ∞
P(ττi > nX0 = i) = mi
n=0
The particular statements in the theorem are obvious from theorem 2.16 and the definition of π. The stationarity of π is shown as follows. First we obtain ∞
πj = m−1 i ·
n=0 ∞
= m−1 i ·
n=1 ∞
= m−1 i ·
n=1
P(X Xn = j, τi > nX0 = i) P(X Xn = j, τi ≥ nX0 = i) P(X Xn = j, τi > n − 1X0 = i)
since X0 = Xτi = i in the conditioning set {X0 = i}. Because of P(X Xn = j, τi > n − 1X0 = i) P(X Xn = j, τi > n − 1, X0 = i) = P(X0 = i) P(X Xn = j, Xn−1 = k, τi > n − 1, X0 = i) = P(X0 = i) k∈E
=
P(X Xn = j, Xn−1 = k, τi > n − 1, X0 = i) P(X Xn−1 = k, τi > n − 1, X0 = i)
k∈E\{i}
=
×
k∈E
P(X Xn−1 = k, τi > n − 1, X0 = i) P(X0 = i)
pkj P(X Xn−1 = k, τi > n − 1X0 = i)
we can transform further ∞ −1 πj = mi · pkj P(X Xn−1 = k, τi > n − 1X0 = i) n=1 k∈E
25
Markov Chains and Queues in Discrete Time
=
k∈E
pkj · m−1 i
∞
n=0
P(X Xn = k, τi > nX0 = i) =
πk p k j
k∈E
which completes the proof. Theorem 2.25 Let X denote an irreducible, positive recurrent Markov chain. Then X has a unique stationary distribution. Proof: Existence has been shown in theorem 2.24. Uniqueness of the stationary distribution can be seen as follows. Let π denote the stationary distribution as constructed in theorem 2.24 and i the positive recurrent state that served as recurrence point for π. Further, let ν denote any stationary distribution for X . Then there is a state j ∈ E with νj > 0 and a number m ∈ N with P m (j, i) > 0, since X is irreducible. Consequently we obtain νi = νk P m (k , i) ≥ νj P m (j, i) > 0 k∈E
Hence we can multiply ν by a skalar factor c such that c · νi = πi = 1/mi . Denote ν˜ := c · ν.
Let P˜ denote the transition matrix P without the ith column, i.e. we define the (j, k )th entry of P˜ by p˜j k = pj k if k = i and zero otherwise. Denote further the Dirac measure on i by δ i , i.e. δji = 1 if i = j and zero otherwise. Then the ∞ ˜ n i stationary distribution π can be represented by π = m−1 n=0 P . i ·δ We first claim that mi ν˜ = δ i + mi ν˜P˜ . This is clear for the entry ν˜i and easily seen for ν˜j with j = i because in this case (˜ ν P˜ )j = c · (νP )j = ν˜j . Now we can proceed with the same argument to see that mi ν˜ = δ i + (δ i + mi ν˜P˜ )P˜ = δ i + δ i P˜ + mi ν˜P˜ 2 = . . . ∞ = δi P˜ n = mi π n=0
Hence ν˜ already is a probability measure and the skalar factor must be c = 1. This yields ν = ν˜ = π and thus the statement.
Remark 2.26 At a closer look the assumption of irreducibility may be relaxed to some extend. For example, if there is exactly one closed positive recurrent communication class and a set of transient and inaccessible states (i.e. states j
26
AN INTRODUCTION TO QUEUEING THEORY
for which there is no state i with i → j), then the above statement still holds although X is not irreducible. A first consequence of the uniqueness is the following simpler representation of the stationary distribution:
Theorem 2.27 Let X denote an irreducible, positive recurrent Markov chain. Then the stationary distribution π of X is given by πj = m−1 j =
1 E(ττj X0 = j)
for all j ∈ E. Proof: Since all states in E are positive recurrent, the construction in theorem 2.24 can be pursued for any inital state j . This yields πj = m−1 j for all j ∈ E. The statement now follows from the uniqueness of the stationary distribution. Corollary 2.28 For an irreducible, positive recurrent Markov chain, the stationary probability πj of a state j coincides with its asymptotic rate of recurrence, i.e. E(N Nj (n)X0 = i) = πj lim n→∞ n for all j ∈ E and independently of i ∈ E . Further, if an asymptotic distribution p = limn→∞ P(X Xn = .) does exist, then it coincides with the stationary distribution. In particular, it is independent of the initial distribution of X .
Proof: The first statement immediately follows from equation n(2.8).l For the P (i, j). If second statement, it suffices to employ E(N Nj (n)X0 = i) = l=0 an asymptotic distribution p does exist, then for any initial distribution ν we obtain νi lim P n (i, j) pj = lim (ν P n )j = n→∞
=
i∈E
= πj independently of ν.
νi lim
n→∞
n
i∈E
l=0 P
n
n→∞
l (i, j)
=
i∈E
νi πj
27
Markov Chains and Queues in Discrete Time
4.
Restricted Markov Chains
Now let F ⊂ E denote any subset of the state space E . Define τF (k) to be the stopping time of the kth visit of X to the set F , i.e. τF (k + 1) := min{n > τF (k) : Xn ∈ F }
with τF (0) := 0. If X is recurrent, then the strong Markov property (theorem 2.7) ensures that the chain X F = (X XnF : n ∈ N) with XnF := XτF (n) is a recurrent Markov chain, too. It is called the Markov chain restricted to F . In case of positive recurrence, we can obtain the stationary distribution of X F from the stationary distribution of X in a simple manner: Theorem 2.29 If the Markov chain X is positive recurrent, then the stationary distribution of X F is given by πjF =
for all j ∈ F .
πj k ∈F
πk
Proof: Choose any state i ∈ F and recall from theorem 2.24 the expression πj : =
m−1 i
·
∞
P(X Xn = j, τi > nX0 = i)
n=0
which holds for all j ∈ F . For πjF we can perform the same construction with respect to the chain X F . By the definition of X F it is clear that the number of visits to the state j between two consecutive visits to i is the same for the chains X and X F . Hence the sum expression for πjF , which is the expectation of that number of visits, remains the same as for πj . The other factor m−1 i o an serves on y as a norma zat on in the formula above is independent f j d l li i constant, i.e. in order to secure that j∈E πj = 1. Hence for a construction of πjF with respect to X F this needs to be replaced by (mi · k∈F πk )−1 , which then yields the statement. Theorem 2.30 Let X = (X Xn : n ∈ N0 ) denote an irreducible and positive recurrent Markov chain with discrete state space E. Further let F ⊂ E denote any subset of E , and X F the Markov chain restricted to F . Denote τF := min{n ∈ N : Xn ∈ F }
28
AN INTRODUCTION TO QUEUEING THEORY
Then a measure ν on E is stationary for X if and only if ν ′ = (ννi : i ∈ F ) is stationary for X F and νj =
νk
∞
P(X Xn = j, τF > nX0 = k)
(2.9)
n=0
k ∈F
for all j ∈ E \ F . Proof: Due to theorem 2.29 it suffices to prove equation (2.9) for j ∈ E \ F . Choose any state i ∈ F and define τi := min{n ∈ N : Xn = i} According to theorem 2.24 the stationary measure v for X is given by τ −1 ∞ i P(X Xn = j, τi > nX0 = i) = νi · Ei 1Xn =j νj = ν i · n=0
n=0
for j ∈ E \ F , where Ei denotes the conditional expectation given X0 = i. Define further τiF := min{n ∈ N : XnF = i}
Because of the strong Markov property we can proceed as ⎛ F ⎞ τi −1 τ F −1 EX F 1Xm =j ⎠ νj = νi · Ei ⎝ n
n=0
= νi ·
k ∈F
⎛
Ei ⎝
m=0
τiF −1
n=0
⎞
1XnF =k ⎠ · Ek
τ −1 F
1Xm =j
m=0
Regarding the restricted Markov chain X F , theorem 2.24 states that ⎛ F ⎞ τi −1 ∞ νk P(X 1XnF =k ⎠ = XnF = k, τiF > nX0F = i) = Ei ⎝ νi n=0
n=0
for all k ∈ F . Hence we obtain νj =
k ∈F
which was to be proven.
νk
∞
n=0
P(X Xn = j, τF > nX0 = k)
Markov Chains and Queues in Discrete Time
5.
29
Conditions for Positive Recurrence
In the third part of this course we will need some results on the behaviour of a Markov chain on a finite subset of its state space. As a first fundamental result we state Theorem 2.31 An irreducible Markov chain with finite state space F is positive recurrent. Proof: For all n ∈ N and i ∈ F we have j∈E P n (i, j) = 1. Hence it is n not possible that limn→ ∞ P (i, j) = 0 for all j ∈ F . Thus there is one state ∞ h ∈ F such that rhh = n=0 P n (h, h) = ∞, which means by corollary 2.15 that h is recurrent and by irreducibility that the chain is recurrent.
If the chain were null recurrent, then according to the relation in (2.8) n
1 k P (i, j) = 0 n→∞ n lim
k=1
would hold for all j ∈ F , independently of i because of irreducibility. But this would imply that limn→∞ P n (i, j) = 0 for all j ∈ F , which contradicts our first observation in this proof. Hence the chain must be positive recurrent. For irreducible Markov chains the condition E(ττi X0 = i) < ∞ implies positive recurrence of state i and hence positive recurrence of the whole chain. Writing τF for the time of the first visit to the set F , we now can state the following generalization of this condition: Theorem 2.32 Let X denote an irreducible Markov chain with state space E and be F ⊂ E a finite subset of E . The chain X is positive recurrent if and only if E(ττF X0 = i) < ∞ for all i ∈ F . Proof: If X is positive recurrent, then E(ττF X0 = i) ≤ E(ττi X0 = i) < ∞ for all i ∈ F , by the definition of positive recurrence. Now assume that E(ττF X0 = i) < ∞ for all i ∈ F . Define the stopping times σ(i) := min{k ∈ N : XkF = i} and random variables Yk := τF (k)−τF (k −1). Since F is finite, m := maxj∈F E(ττF X0 = j) < ∞. We shall denote the
30
AN INTRODUCTION TO QUEUEING THEORY
conditional expectation given X0 = i by Ei . For i ∈ F we now obtain ⎛ ⎞ σ(i) ∞ Yk ⎠ = Ei E(Y Yk X XτF (k−1) ) · 1k≤σ(i) E(ττi X0 = i) = Ei ⎝ k=1
≤m·
∞
k=1
k=1
P(σ(i) ≥ k X0 = i) = m · E(σ(i)X0 = i)
Since F is finite, X F is positive recurrent by theorem 2.31. Hence we know that E(σ(i)X0 = i) < ∞, and thus E(ττi X0 = i) < ∞ which shows that X is positive recurrent. An often difficult problem is to determine whether a given Markov chain is positive recurrent or not. Concerning this, we now introduce one of the most important criteria for the existence of stationary distributions of Markov chains occuring in queueing theory. It is known as Foster’s criterion.
Theorem 2.33 Let X denote an irreducible Markov chain with countable state space E and transition matrix P . Further let F denote a finite subset of E . If there is a function h : E → R with inf {h(i) : i ∈ E} > −∞, such that the conditions
k∈E
pik h(k) < ∞
and
k∈E
pj k h(k) ≤ h(j) − ε
hold for some ε > 0 and all i ∈ F and j ∈ E \ F , then X is positive recurrent. Proof: Without loss of generality we can assume h(i) ≥ 0 for all i ∈ E, since otherwise we only need to increase h by a suitable constant. Define the stopping time τF := min{n ∈ N0 : Xn ∈ F }. First we observe that E(h(X Xn+1 ) · 1τF >n+1 X0 , . . . , Xn ) ≤ E(h(X Xn+1 ) · 1τF >n X0 , . . . , Xn ) = 1τF >n · pXn ,k h(k) k∈E
≤ 1τF >n · (h(X Xn ) − ε) = h(X Xn ) · 1τF >n − ε · 1τF >n
31
Markov Chains and Queues in Discrete Time
holds for all n ∈ N0 , where the first equality is due to (15.3). We now proceed with 0 ≤ E(h(X Xn+1 ) · 1τF >n+1 X0 = i) = E(E(h(X Xn+1 ) · 1τF >n+1 X0 , . . . , Xn )X0 = i) ≤ E(h(X Xn ) · 1τF >n X0 = i) − εP(ττF > nX0 = i) ≤ ... n ≤ E(h(X0 ) · 1τF >0 X0 = i) − ε ·P(ττF > k X0 = i) k=0
which holds for all i ∈ E \ F and n ∈ N0 . For n → ∞ this implies E(ττF X0 = i) =
∞
k=0
P(ττF > k X0 = i) ≤ h(i)/ε < ∞
for i ∈ E \ F . Now the mean return time to the state set F is bounded by E(ττF X0 = i) = pij + pij E(ττF + 1X0 = j) j∈F
≤ 1 + ε−1
j∈E\F
j∈E
pij h(j) < ∞
for all i ∈ F , which completes the proof.
6.
The M/M/1 queue in discrete time
Choose any parameters 0 < p, q < 1. Let the arrival process be distributed as a Bernoulli process with parameter p and the service times (S Sn : n ∈ N0 ) be iid according to the geometric distribution with parameter q.
The geometric service time distribution and the Bernoulli arrival process have been chosen because this simplifies the formulation of the system process in terms of a Markov model due to the following memoryless property: Theorem 2.34 Let S be distributed geometrically with parameter q, i.e. let P(S = k) = (1 − q)k−1 q for all k ∈ N. Then P(S = kS > k − 1) = q holds for the conditional distribution, independently of k . Likewise, if Zn is the nth inter–arrival time of a Bernoulli process with parameter p, then the relation Zn > k − 1) = p holds, independently of k and n. P(Z Zn = kZ
32
AN INTRODUCTION TO QUEUEING THEORY
Proof: First the proof for the geometric distribution: For all k ∈ N, the argument P(S = k) P(S = k, S > k − 1) = P(S > k − 1) P(S > k − 1) k −1 (1 − q) q = =q (1 − q)k−1
P(S = kS > k − 1) =
holds, which shows the first statement. For a Bernoulli process, the nth inter– arrival time Zn = Tn − Tn−1 is distributed geometrically with parameter p, due to the strong Markov property. This completes the proof for the second statement.
Thus the memoryless property states that no matter how long a service time or an inter–arrival time has already passed, the probability of a service completion or an arrival at the next time instant is always the same. Hence the system process Q = (Qn : n ∈ N0 ) of the M/M/1 queue in discrete time with arrival process T and service times Sn can be formulated easily as a homogeneous Markov chain. It has state space E = N0 and transition probabilities p01 := p, p00 := 1 − p, and ⎧ ⎪ j =i+1 ⎨p(1 − q ), pij := pq + (1 − p)(1 − q ), j = i ⎪ ⎩ q(1 − p), j =i−1
for i ≥ 1. Because of the simple state space, the transition matrix can be displayed in the form of a triagonal matrix ⎛ ⎞ 1−p p 0 ... .. ⎟ ⎜ .⎟ p(1 − q) ⎜q(1 − p) pq + (1 − p)(1 − q) ⎜ P =⎜ .. ⎟ .⎟ 1 0 q( − p) pq + (1 − p)(1 − q) ⎝ ⎠ .. .. .. .. . . . .
Since p, q > 0, the chain Q is irreducible. If p < q, then h(n) := n defines a function which satisfies the conditions for Foster’s criterion, as ∞
k=0
pik h(k) = q(1 − p) · (i − 1) + (qp + (1 − q)(1 − p)) · i + p(1 − q) · (i + 1) = i − q(1 − p) + p(1 − q) = i − q + p ≤ i − ε
33
Markov Chains and Queues in Discrete Time
for all i ∈ N, with ε = q − p > 0, and ∞ k=0 p0k · h(k) = p < ∞ show. The ratio p/q is called the load of the queue. Thus the system process Q is positive recurrent if the queue load is less than one. In order to derive a stationary distribution for Q, we first introduce notations p′ := p(1 − q) and q ′ := q(1 − p). Then we translate the condition π P = π into the equations π0 = π0 (1 − p) + π1 q ′ π1 = π0 p + π1 (1 − p′ − q ′ ) + π2 q ′ πn = πn−1 p′ + πn (1 − (p′ + q ′ )) + πn+1 q ′
(2.10) (2.11) (2.12)
for all n ≥ 2. For the solution, we guess the geometric form πn+1 = πn · r for all n ≥ 1, with r > 0. Thus equation (2.12) becomes 0 = πn p′ − πn r(p′ + q ′ ) + πn r2 q ′ = πn p′ − r(p′ + q ′ ) + r2 q ′
for all n ≥ 1, which leads for non–trivial π = 0 to the roots r = 1 and r = p′ /q ′ of the quadratic term. In the first case r = 1, we obtain πn+1 = πn for all n ≥ 1. This implies j∈E πj = ∞ and thus cannot lead to a stationary distribution. Hence in the case r = 1 the geometric approach is not successful.
The second root r = p′ /q ′ allows solutions for the other equations (2.10) and (2.11) too. This can be checked as follows: First, the relation π1 = π0
p ρ = π0 ′ q 1−p
is a requirement from equation (2.10). Then the second equation (2.11) yields 1 1 p ′ ′ ′ ′ (p + q ) − p π0 π2 = ′ π1 (p + q ) − π0 p = ′ q q q′ ′ p p + q′ p′ − π = π0 ′ 1 = 1 ′ q q′ q in accordance with our geometric approach. Now normalization of π leads to ∞ ∞ p p′ n−1 πn = π0 1 + ′ 1= q q′ n=0
n=1
34
AN INTRODUCTION TO QUEUEING THEORY
from which we obtain −1 −1 ∞ p p′ n−1 p π0 = 1 + ′ = 1+ ′ q q′ q (1 − p′ /q ′ ) n=1 −1 p q−p = 1+ ′ = (q ′ − p′ )(q ′ − p′ + p)−1 = ′ q −p q =1−ρ
with ρ := p/q , because of q ′ − p′ = q − p. Hence the approach πn+1 = πn · r with r = p′ /q ′ leads to a solution of πP = π. Note that r < 1 if and only if p < q. Further, the mean inter–arrival time is E(T T1 ) = 1/p and the mean service time is E(S1 ) = 1/q . Thus the geometric approach is successful if the so–called stability condition ρ=
p E(S1 ) = <1 q E(T T1 )
holds. This condition simply postulates that the mean service time be shorter than the mean inter–arrival time. In this case, the stationary distribution π of Q has the form π0 = 1 − ρ
and
πn = (1 − ρ)
ρ n−1 r 1−p
for all n ≥ 1. It thus is a modified geometric distribution with parameter r = p′ /q ′ < 1.
Notes Markov chains originate from a series of papers written by A. Markov at the beginning of the 20th century. His first application is given here as exercise 2.3. However, methods and terminology at that time were very different from today’s presentations. The literature on Markov chains is perhaps the most extensive in the field of stochastic processes. This is not surprising, as Markov chains form a simple and useful starting point for the introduction of other processes. Textbook presentations are given in Feller [34], Breiman [16], Karlin and Taylor [46], or C¸ inlar [25], to name but a few. The treatment in Ross [75] contains the useful concept of time–reversible Markov chains. An exhaustive introduction to Markov chains on general state spaces and conditions for their positive recurrence is given in Meyn and Tweedie [59].
35
Markov Chains and Queues in Discrete Time
Exercise 2.1 Let (X Xn : n ∈ N0 ) be a family of iid random variables with discrete state space. Show that X = (X Xn : n ∈ N0 ) is a homogeneous Markov chain. Exercise 2.2 Let (X Xn : n ∈ N0 ) be iid random variables on N0 with probabilities ai := P(X Xn = i) for all n, i ∈ N0 . The event Xn > max(X0 , . . . , Xn−1 ) for n ≥ 1 is called a record at time n. Define Ti as the time of the ith record, i.e. T0 := 0 and Ti+1 := min{n ∈ N : Xn > XTi } for all i ∈ N0 . Denote the ith record value by Ri := XTi . Show that (Ri : i ∈ N0 ) and ((Ri , Ti ) : i ∈ N0 ) are Markov chains by determining their transition probabilities. Exercise 2.3 Diffusion model by Bernoulli and Laplace The following is a stochastic model for the flow of two incompressible fluids between two containers: Two boxes contain m balls each. Of these 2m balls, b are black and the others are white. The system is said to be in state i if the first box contains i black balls. A state transition is performed by choosing one ball out of each box at random (meaning here that each ball is chosen with equal probability) and then interchanging the two. Derive a Markov chain model for the system and determine the transition probabilities. Exercise 2.4 Let X denote a Markov chain with m < ∞ states. Show that if state j is accessible from state i, then it is accessible in at most m − 1 transitions. Exercise 2.5 Let p = (pn : n ∈ N0 ) be a discrete probability distribution and define ⎛ ⎞ p0 p1 p2 . . . . ⎟ ⎜ p0 p1 . . ⎟ ⎜ ⎜ P =⎜ . ⎟ ⎟ p0 . . ⎠ ⎝ .. .
with all non–specified entries being zero. Let X denote a Markov chain with state space N0 and transition matrix P . Derive an expression (in terms of discrete convolutions) for the transition probabilities P(X Xn+m = jX Xn = i) with n, m ∈ N0 and i, j ∈ N0 . Apply the result to the special case of a Bernoulli process (see example 2.3). Exercise 2.6 Prove equation (2.6). Exercise 2.7 Prove the equation P n (i, j) = n ∈ N and i, j ∈ E.
n
k=1 Fk (i, j)P
n−k (j, j)
for all
36
AN INTRODUCTION TO QUEUEING THEORY
Exercise 2.8 Let X denote a Markov chain with state space E = {1, . . . , 10} and transition matrix ⎛ ⎞ 1/2 0 1/2 0 0 0 0 0 0 0 ⎜ 0 1/3 0 0 0 0 2/3 0 0 0 ⎟ ⎜ ⎟ ⎜ 1 0 0 0 0 0 0 0 0 0 ⎟ ⎜ ⎟ ⎜ 0 0 0 0 1 0 0 0 0 0 ⎟ ⎜ ⎟ ⎜ 0 ⎟ 0 0 1/3 1/3 0 0 0 1/3 0 ⎟ P =⎜ ⎜ 0 0 0 0 0 1 0 0 0 0 ⎟ ⎜ ⎟ ⎜ 0 0 0 0 0 0 1/4 0 3/4 0 ⎟ ⎜ ⎟ ⎜ 0 0 1/4 1/4 0 0 0 1/4 0 1/4⎟ ⎜ ⎟ ⎝ 0 1 0 0 0 0 0 0 0 0 ⎠ 0 1/3 0 0 1/3 0 0 0 0 1/3
Reorder the states according to their communication classes and determine the resulting form of the transition matrix as in representation (2.4). Determine further a transition graph, in which
means that fij > 0. Exercise 2.9 Prove equation (2.7). Hint: Derive a representation of Nj in terms of the random variables 1, Xn = j An := 0, Xn = j Exercise 2.10 Prove corollary 2.15. Exercise 2.11 Prove remark 2.26. Exercise 2.12 A server’s up time is k time units with probability pk = 2−k , k ∈ N. After failure the server is immediately replaced by an identical new one. The up time of the new server is of course independent of the behaviour of all preceding servers. Let Xn denote the remaining up time of the server at time n ∈ N0 . Determine the transition probabilities for the Markov chain X = (X Xn : n ∈ N0 ) and determine the stationary distribution of X .
37
Markov Chains and Queues in Discrete Time
Exercise 2.13 Let P denote the transition matrix of an irreducible Markov chain X with discrete state space E = F ∪ F c , where F c = E \ F . Write P in block notation as PF F PF F c P = PF c F PF c F c
Show that the Markov chain X F restricted to the state space F has transition matrix P F = PF F + PF F c (I − PF c F c )−1 PF c F
with I denoting the identity matrix on F c .
Exercise 2.14 Let X denote a Markov chain with state space E = {0, . . . , m} and transition matrix ⎞ ⎛ p00 p01 ⎟ ⎜p10 p11 p12 ⎟ ⎜ ⎟ ⎜ p21 p22 p23 P =⎜ ⎟ ⎟ ⎜ . . . . . . ⎝ . . . ⎠ pm,m−1 pmm
where pij > 0 for i − j = 1. Show that the stationary distribution π of X is uniquely determined by ⎛ ⎞−1 j n m pi−1,i pi−1,i ⎠ π0 = ⎝ πn = π0 · and pi,i−1 pi,i−1 i=1
j=0 i=1
for all n = 1, . . . , m. Use this result to determine the stationary distribution of the Bernoulli–Laplace diffusion model with b = m (see exercise 2.3). Exercise 2.15 Show that the second condition in theorem 2.33 can be substituted by the condition pij h(j) ≤ h(i) − 1 for all i ∈ E \ F . j∈E
Exercise 2.16 Show the following complement to theorem 2.33: Let P denote the transition matrix of a positive recurrent Markov chain with discrete state space E. Then there is a function h : E → R and a finite subset F ⊂ E such that pij h(j) < ∞ for all i ∈ F , and j∈E
j∈E
pij h(j) ≤ h(i) − 1
for all i ∈ E \ F .
38
AN INTRODUCTION TO QUEUEING THEORY
Hint: Consider the conditional expectation of the remaining time until returning to a fixed set F of states.
Exercise 2.17 For the discrete, non–negative random walk with transition matrix ⎞ ⎛ p00 p01 ⎟ ⎜p10 0 p12 ⎜ ⎟ P =⎜ ⎟ p 0 p 10 12 ⎝ ⎠ .. .. .. . . . determine the criterion of positive recurrence according to theorem 2.33.
Chapter 3 HOMOGENEOUS MARKOV PROCESSES ON DISCRETE STATE SPACES
In the present chapter we will transfer the discrete time results of the previous chapter to Markov processes in continuous time.
1.
Definition
Tn : n ∈ N) denote a sequence of positive real–valued Define T0 := 0 and let (T random variables with Tn+1 > Tn for all n ∈ N0 and Tn → ∞ as n → ∞. Further, let E denote a countable state space and (X Xn : n ∈ N0 ) a sequence of E–valued random variables. A process Y = (Y Yt : t ∈ R+ 0 ) in continuous time with for Tn ≤ t < Tn+1 Yt := Xn is called a pure jump process. The variable Hn := Tn+1 − Tn (resp. Xn ) is called the nth holding time (resp. the nth state) of the process Y. If further X = (X Xn : n ∈ N0 ) is a Markov chain with transition matrix P = (pij )i,j∈E and the variables Hn are independent and distributed exponentially with parameter λXn only depending on the state Xn , then Y is called homogeneous Markov process with discrete state space E . The chain X is called the embedded Markov chain of Y . As a technical assumption we always agree upon ˆ := sup{λi : i ∈ E} < ∞, i.e. the parameters for the exponenthe condition λ tial holding times shall be bounded. An immediate consequence of the definition is that the paths of a Markov process are step functions. The lengths of the holding times are almost certainly strictly positive, since exponential distributions are zero with probability zero.
40
AN INTRODUCTION TO QUEUEING THEORY
Yt X3
X1 X0= X 2 T1 H0
Figure 3.1.
T3
T2 H1
H2
T4
...
time
H3
Typical path of a Markov process with discrete state space
Example 3.1 Poisson process Define Xn := n deterministically. Then X = (X Xn : n ∈ N0 ) is a Markov chain with state space E = N0 and transition probabilities pn,n+1 = 1 for all n ∈ N0 . Let the holding times Hn be distributed exponentially with identical parameter λ > 0. Then the resulting process Y as defined in the above definition is a Markov process with state space N0 . It is called Poisson process with intensity (also: rate or parameter) λ. Next we want to prove a property similar to the Markov property for Markov chains in discrete time. To this aim, we need to show the memoryless property for the exponential distribution, which is the analogue to the memoryless property for geometric distributions in discrete time. Lemma 3.2 Let H denote a random variable having an exponential distribution with parameter λ. Then the memoryless property P(H > t + sH > s) = P(H > t)
holds for all time durations s, t > 0. Proof: We immediately check P(H > t + sH > s) = =
which holds for all s, t > 0.
P(H > t + s) P(H > t + s, H > s) = P(H > s) P(H > s) e−λ·(t+s) = e−λ·t = P(H > t) e−λ·s
Homogeneous Markov Processes on Discrete State Spaces
41
Theorem 3.3 Let Y denote a Markov process with discrete state space E. Then the Markov property P(Y Yt = jY Yu : u ≤ s) = P(Y Yt = jY Ys ) holds for all times s < t and states j ∈ E .
Proof: Denote the state at time s by Ys = i. Because of the memoryless property of the exponential holding times, the remaining time in state i is distributed exponentially with parameter λi , no matter how long the preceeding holding time has been. After the holding time in the present state elapses, the process changes to another state j according to the homogeneous Markov chain X . Hence the probability for the next state being j is given by pij , independently of any state of the process before time s. Now another exponential holding time begins, and thus the past before time s will not have any influence on the future of the process Y. Analogous to the discrete time case, for any two time instances s < t the conYs = i) shall be called the transition probaditional probabilities P(Y Yt = jY bilities from time s to time t. We will now derive a recursion formula for the transition probabilities of a Markov process by conditioning on the number of jumps between time s and time t:
Theorem 3.4 The transition probabilities of a Markov process Y are given by Ys = i) = P(Y Yt = jY
∞
(n)
Pij (s, t)
n=0
for all times s < t and states i, j ∈ E , with (0)
Pij (s, t) = δij · e−λi ·(t−s)
and recursively (n+1) Pij (s, t)
=
t s
e−λi ·u λi
(n)
pik Pkj (u, t) du
k∈E
for all n ∈ N0 . Proof: The above representation follows immediately by conditioning on the (n) number of jumps in ]s, t]. The expressions Pij (s, t) represent the conditional probabilities that Yt = j and there are n jumps in ]s, t] given that
42
AN INTRODUCTION TO QUEUEING THEORY
Ys = i. In the recursion formula the integral comprises all times u of a possible first jump along with the Lebesgue density e−λi ·u λi of this event, after which the probability of n remaining jumps reaching state j at time t is given (n) by k∈E pik Pkj (u, t).
For every two time instances s < t, define the transition probability matrix P (s, t) from time s to time t by its entries Yt = jY Ys = i) Pij (s, t) := P(Y Using the recursion formula, it is shown by induction on n that the conditional (n) probabilities Pij (s, t) are homogeneous in time, i.e. they satisfy (n)
(n)
Pij (s, t) = Pij (0, t − s) for all s < t. Thus we can from now on restrict the analysis to the transition probability matrices P (t) := P (0, t)
with t ≥ 0. With this notation the Markov property yields the Chapman– Kolmogorov equations P (s + t) = P (s)P (t) for all time durations s, t ≥ 0. Thus the family {P (t) : t ≥ 0} of transition probability matrices forms a semi–group under the composition of matrix multiplication. In particular, we obtain for the neutral element of this semi–group P (0) = IE := (δij )i,j∈E with δij = 1 for i = j and zero otherwise.
In order to derive a simpler expression for the transition probability matrices, we need to introduce another concept, which will be called the generator matrix. This is defined as the matrix G = (gij )i,j∈E on E with entries −λi · (1 − pii ), i = j gij := i = j λi · pij , for all states i, j ∈ E. In particular, the relation gii = − gij
(3.1)
j =i
holds for all i ∈ E.
The (i, j)th entry of the generator G is called the infinitesimal transition rate from state i to state j . Using these, we can illustrate the dynamics of a Markov process in a directed graph where the nodes represent the states and an edge
43
Homogeneous Markov Processes on Discrete State Spaces
r
means that gij = r > 0. Such a graph is called a state transition graph of the Markov process. With the convention pii = 0 the state transition graph uniquely determines the Markov process.
Example 3.5 The state transition graph of the Poisson process with intensity λ (see example 3.1) is given by λ λ
...
Figure 3.2. Poisson process
Theorem 3.6 The transition probabilities Pij (t) of a Markov process satisfy the systems dP Pij (t) = Pik (t)gkj = gik Pkj (t) dt k∈E
k∈E
of differential equations. These are called the Kolmogorov forward and backward equations. Proof: From the representation in theorem 3.4, it follows by induction on the number of jumps that all restricted probabilities P (n) (t) are Lebesgue inte(n) grable with respect to t over finite intervals. Since the sum of all Pij (t) is a probability and thus bounded, we conclude by majorized convergence that also P (t) is Lebesgue integrable with respect to t over finite intervals. Now we can state the recursion Pij (t) = e−λi ·t · δij +
t
e−λi ·s λi
k∈E
pik Pkj (t − s) ds
which results from conditioning on the time s of the first jump from state i. We obtain further t e+λi ·u λi pik Pkj (u) du Pij (t) = e−λi ·t · δij + 0
k∈E
44
AN INTRODUCTION TO QUEUEING THEORY
by substituting u = t − s in the integral. Since k∈E pik = 1 is bounded, we conclude that P (t) is continuous in t. Further, we can differentiate P (t) as given in the recursion and obtain t dP Pij (t) −λi ·t = −λi e · δij + f (u) du + e−λi ·t · f (t) dt 0
with f denoting the integrand function. This means nothing else than dP Pij (t) = −λi Pij (t) + λi pik Pkj (t) dt k∈E = −λi (1 − pii ) · Pij(t) + gik Pkj (t) k=i
and thus proves the backward equations. For the forward equations, one only needs to use the Chapman–Kolmogorov equations and apply the backward equations in Pkj (h) − δkj Pij (t + h) − Pij (t) dP Pij (t) = lim = lim Pik (t) h→0 h→0 dt h h k∈E
=
Pkj (h) − Pkj (0) = Pik (t)gkj h→0 h
Pik (t) lim
k∈E
k∈E
which holds for all i, j ∈ E . Theorem 3.7 The transition probability matrices can be expressed in terms of the generator by ∞ n t n P (t) = eG·t := G n! n=0
for all t ≥ 0, with
Gn
denoting the nth power of the matrix G.
Proof: First we validate the solution by ∞
∞
∞
n=0
n=1
n=1
d tn n n d tn n tn−1 d G·t e = G = G = G = GeG·t dt dt dt n! n! (n − 1)!
which holds for all t ≥ 0. Furthermore, it is obvious that ∞ ∞ n tn t n n G·t G = G G = eG·t G Ge = G n! n! n=0
n=0
45
Homogeneous Markov Processes on Discrete State Spaces
and thus P (t) = eG·t is a solution of Kolmogorov’s forward and backward equations.
Now we show uniqueness of the solution. Let P˜ (t) denote another solution of the forward equations. The differential equations with initial condition translate into the integral equations t t ˜ P˜ (u)G du P (u)G du and P (t) = IE + P (t) = IE + 0
Define a norm for matrices M = (mij )i,j∈E on E by ⎧ ⎫ ⎨ ⎬ M := sup mij  : i ∈ E ⎩ ⎭ j∈E
ˆ and AB ≤ A · B for any two matrices A and B on Then G ≤ 2 · λ E . Further we obtain t ˜ ˜ P (t) − P (t) = P (u) − P (u) du G 0 t ≤ (3.2) P (u) − P˜ (u) du · G 0
≤ ∆t · t · G
(3.3)
with ∆t := sup{ P (u) − P˜ (u) : u ≤ t}, which is finite, since for all u ≥ 0 we know that P (u) = P˜ (u) = 1. Plugging the result (3.3) into the right hand of the bound (3.2) again (with time u instead of t), we obtain t t2 ˜ ∆t · u · G du · G = ∆t · · G 2 P (t) − P (t) ≤ 2 0 Likewise, n–fold repetition of this step achieves the bound
ˆ · t)n tn (2λ ˜ · G n ≤ ∆t · P (t) − P (t) ≤ ∆t · n! n! which in the limit n → ∞ yields 0 ≤ P (t) − P˜ (t) ≤ 0 and consequently P (t) = P˜ (t). As t has been chosen arbitrarily, the statement is proven. Hence the generator of a Markov process uniquely determines all its transition matrices. This can also be seen from the definition, if we agree (without loss
46
AN INTRODUCTION TO QUEUEING THEORY
of generality) upon the convention pii = 0 for all ∈ E. Then the parameters for the definition of the Markov process can be recovered by λi = −gii
and
pij =
gij −gii
for all i = j ∈ E. However, as in the discrete time case of Markov chains, Markov processes are not completely determined by their transition probability matrices only. The missing link to a complete characterization again is given by the initial Y0 = X0 = i) for all i ∈ E. Then we can express distribution π with πi = P(Y all finite–dimensional marginal distributions as in
Theorem 3.8 For a Markov process Y with initial distribution π and time instances 0 < t1 < . . . < tn , n ∈ N, the equation P(Y Yt1 = j1 , . . . , Ytn = jn ) πi Pi,j1 (t1 )P = Pj1 ,j2 (t2 − t1 ) . . . Pjn−1 ,jn (tn − tn−1 ) i∈E
holds for all j1 , . . . , jn ∈ E.
The proof is left as an exercise. Thus a Markov process Y with transition probability matrices (P (t) : t ≥ 0) admits a variety of versions depending on the initial distribution π . Any such version shall be denoted by Y π .
2.
Stationary Distribution
From now on we shall convene on the technical assumption ˇ := inf {λi : i ∈ E} > 0 λ
which holds for all queueing systems that we will examine. Then a Markov process is called irreducible, transient, recurrent or positive recurrent if the defining Markov chain is. An initial distribution π is called stationary if the process Y π is stationary, i.e. if P(Y Ytπ1 = j1 , . . . , Ytπn = jn ) = P(Y Ytπ1 +s = j1 , . . . , Ytπn +s = jn ) for all n ∈ N, 0 ≤ t1 < . . . < tn , and states j1 , . . . , jn ∈ E , and s ≥ 0.
Theorem 3.9 A distribution π on E is stationary if and only if π G = 0 holds.
47
Homogeneous Markov Processes on Discrete State Spaces
Proof: First we obtain G·t
πP (t) = πe
=
∞ n t
n=0
n!
n
π G = πIIE +
∞ n t
n=1
n!
π Gn = π + 0 = π
for all t ≥ 0, with 0 denoting the zero measure on E . With this, theorem 3.8 yields Ytπ1 = j1 , . . . , Ytπn = jn ) P(Y πi Pi,j1 (t1 )P = Pj1 ,j2 (t2 − t1 ) . . . Pjn−1 ,jn (tn − tn−1 ) i∈E
= πj1 Pj1 ,j2 (t2 − t1 ) . . . Pjn−1 ,jn (tn − tn−1 ) πi Pi,j1 (t1 + s)P = Pj1 ,j2 (t2 − t1 ) . . . Pjn−1 ,jn (tn − tn−1 ) i∈E
= P(Y Ytπ1 +s = j1 , . . . , Ytπn +s = jn )
for all times t1 < . . . < tn with n ∈ N, and states j1 , . . . , jn ∈ E. Hence the process Y π is stationary.
we necessarily obtain On the other hand, if π is a stationary distribution, then tn n π P (t) = π eG·t = π for all t ≥ 0. As above, this means ∞ n=1 n! π G = 0 for all t ≥ 0, which yields πG = 0 because of the uniqueness of the zero power series. By definition of the generator G and equation (3.1), the equation π G = 0 is equivalent to an equation system πi gij = −πj gjj ⇐⇒ πi gij = πj gji (3.4) i=j
i=j
i=j
for all j ∈ E. This system can be intepreted as follows. We call the value πi gij stochastic flow from state i to state j in equilibrium. Then the above equations mean that the accrued stochastic flow into any state j equals the flow out of this state. Equations (3.4) are called the (global) balance equations. Example 3.10 The generator of the Poisson process with parameter λ (see example 3.1) is given by ⎛ ⎞ −λ λ 0 0 ... .. ⎟ ⎜ .⎟ 0 ⎜ 0 −λ λ ⎜ G=⎜ .. ⎟ .⎟ 0 −λ λ ⎝ 0 ⎠ .. .. .. .. .. . . . . .
48
AN INTRODUCTION TO QUEUEING THEORY
This process has no stationary distribution, which can be seen as follows. The balance equations for the Poisson process are given by π0 λ = 0
and
πi λ = πi−1 λ
for all i ≥ 1. It is immediately evident that these are solvable only by πi = 0 for all i ∈ E, which means that there is no stationary distribution π.
The question of existence and uniqueness of a stationary distribution for Y can be reduced to the same question for X , which we have examined in the preceding chapter: Theorem 3.11 Let the underlying Markov chain X in the definition of the Markov process Y be irreducible and positive recurrent. Further assume that ˇ := inf{λi : i ∈ E} > 0. Then there is a unique stationary distribution for λ Y. Proof: According to theorems 2.25 and 2.18, the transition matrix P of X admits a unique stationary distribution ν with νP = ν . The generator G is defined by G = Λ(P − IE ), with Λ = diag(λi : i ∈ E). Hence the measure ˇ > 0, the measure µ is finite, with total µ := νΛ−1 is stationary for Y. Since λ −1 ˇ mass bounded by λ < ∞. Now the normalization πj : =
µj i∈E
µi
νj /λj i∈E νi /λi
=
(3.5)
for all j ∈ E yields a stationary distribution for Y . This is unique because ν is unique and the construction of π from ν is reversible.
Finally we give two important results for the asymptotic behaviour of a Markov process. These shall be proven in chapter 7 (see example 7.13). We call a Markov process regular if it satisfies the conditions given in the preceding theorem. If Y is a regular Markov process, then the limit Yt = j) = πj lim P(Y
t→∞
(3.6)
of the marginal distribution at time t tends to the stationary distribution as t tends to infinity. Further the limit lim Pij (t) = πj
t→∞
holds for all i, j ∈ E and is independent of i.
(3.7)
Homogeneous Markov Processes on Discrete State Spaces
49
Notes An early text book on Markov processes with discrete state space is Chung [27]. Other classical text book presentation are Karlin and Taylor [46], Breiman [16], or C¸ inlar [25]. An exposition on non–homogeneous Markov processes on discrete state spaces can be found under the name Markov jump processes in Gikhman and Skorokhod [39, 38].
Exercise 3.1 Consider a population of male and female species. There is an infinitesimal rate λ > 0 that any male and female produce a single offspring, which will be female with probability p. Determine a Markov process which models the numbers Ft and Mt of female and male species at any time t. Exercise 3.2 Let X and Y denote two independent random variables which are distributed exponentially with parameters λ and µ, respectively. Prove the following properties: (a) X = Y almost certainly. (b) The random variable Z := min{X, Y } is distributed exponentially with parameter λ + µ. (c) P(X < Y ) = λ/(λ + µ) Exercise 3.3 Let Y (1) and Y (2) denote independent Poisson processes with intensities λ1 and λ2 , respectively. Show that the process Y = (Y Yt : t ∈ R+ 0) (1) (2) defined by Yt = Yt + Yt for all t ≥ 0 is a Poisson process with intensity λ = λ1 + λ2 . The process Y is called the superposition of Y (1) and Y (2) . Exercise 3.4 Prove theorem 3.8. Exercise 3.5 Determine the finite–dimensional marginal distributions for a Poisson process with parameter λ. Exercise 3.6 Let Y denote a Poisson process with parameter λ. Given that there is exactly one arrival in the interval [0, t], show that the exact time of the arrival within [0, t] is uniformly distributed. Exercise 3.7 Verify the Chapman–Kolmogorov equations for a Poisson process.
Chapter 4 MARKOVIAN QUEUES IN CONTINUOUS TIME
The methods of analyzing Markov processes are already sufficient for the treatment of quite a variety of queueing systems. These are commonly known as elementary or Markovian queues. The most classical of them shall be examined in this chapter.
1.
The M/M/1 Queue
The M/M/1 queue in continuous time is defined by the following characteristics: The arrival process is a Poisson process with some rate λ > 0. The service times are iid and distributed exponentially with service rate µ > 0. There is one server and the service discipline is first come first served (FCFS, see example 1.1).
Poisson(λ)
Exp(µ)
Figure 4.1. M/M/1 queue
For the Poisson process, the inter–arrival times are distributed exponentially with parameter λ. Since the exponential distribution is memoryless, the system process Q = (Qt : t ∈ R+ 0 ) can be modelled by a Markov process with state
52
AN INTRODUCTION TO QUEUEING THEORY
space E = N0 and generator ⎛ ⎞ −λ λ 0 0 ... .. ⎟ ⎜ .⎟ λ 0 ⎜ µ −λ − µ G=⎜ .. ⎟ ⎜ .⎟ −λ − µ λ µ ⎝ 0 ⎠ .. .. .. .. .. . . . . . Here, the first line represents the possible transitions if the system is empty. In this case there can only occur single arrivals according to the Poisson process with rate λ. If the system is not empty, there are two possibilities: Either an arrival occurs (with rate λ) or a service is completed (with rate µ). Contrary to the M/M/1 queue in discrete time, arrivals and service completions cannot occur at the same time. This follows from the memoryless property of the exponential distribution and exercise 3.2. The parameter of the holding time for the states of a non–empty system is explained by exercise 3.2.
Clearly, the structure of the matrix G shows that the process Q is irreducible and hence there is at most one stationary distribution π for Q. According to theorem 3.9, this must satisfy πG = 0, which translates into the system π0 λ = π1 µ πn (λ + µ) = πn−1 λ + πn+1 µ ∞ πn = 1
for all
(4.1) (4.2)
n≥1
(4.3)
n=0
of equations, where the latter is simply the normalization of the distribution π. The first two equations are the global balance equations and can be illustrated by the following scheme: λ
λ
1 µ
λ
λ
...
2 µ
Figure 4.2.
λ
µ
m µ
... µ
Transition rates for the M/M/1 queue
This gives the rates of jumps between the states of the system. If we encircle any one state, then the sum of the rates belonging to the arcs reaching into this state must equal the sum of the rates which belong to the arcs that go out of this state. If this is the case, then we say that the system is in balance. The conditions for this are given in equations (4.1) and (4.2).
53
Markovian Queues in Continuous Time
The solution of the above system of equations can be obtained by the following considerations: The first equation yields π1 = π0
λ = : π0 ρ µ
with ρ := λ/µ. By induction on n we obtain from the second equation 1 λ λ (πn (λ + µ) − πn−1 λ) = πn + πn − πn−1 µ µ µ = πn ρ
πn+1 =
for all n ∈ N, where the last equality holds by induction hypothesis. Thus the geometric approach πn = π0 ρn for all n ∈ N0 solves the first two equations. The last equation now yields 1=
∞
πn = π0
n=0
∞
ρn =
n=0
1 π0 1−ρ
if and only if ρ < 1, which means λ < µ. Hence there is a stationary distribution of the system, given by
πn = (1 − ρ)ρn for all n ∈ N0 , if and only if the so–called queue load ρ = λ/µ remains smaller than one.
In this case several performance measures of the queueing system can be derived immediately. All of them are computed by means of the stationary distribution. Thus they hold only for the system being in equilibrium, which is attained asymptotically. For instance, the probability that the system is empty is given by π0 = 1 − ρ. The mean and the variance of the number N of users in the system are given as ∞ ∞ ρ E(N ) = nπn = (1 − ρ) nρn = 1−ρ
and Var(N ) = in the system is
n=1 ρ/(1 − ρ)2 . The
RK =
∞
n=K
n=1
probability RK that there are at least K users
πn = (1 − ρ)
∞
ρn = ρK
n=K
As expected, these equations show that with increasing load ρ → 1 the mean number of users in the system grows and the probability of an idle system decreases.
54
2.
AN INTRODUCTION TO QUEUEING THEORY
Skip–Free Markov Processes
There are many variations of the M/M/1 queue which can be analyzed by the same method. In order to show this we first put the analysis presented in the preceding section in a more general context. This will be applicable to a large variety of queueing models. The Markov process which models the M/M/1 queue has the decisive property that transitions are allowed to neighbouring states only, i.e. gij = 0 for states i, j ∈ N0 with i − j > 1. The result is a very simple state transition graph of a linear form and correspondingly a set of balance equations, given by (4.1) and (4.2), which can be solved easily. We can retain the same method of analysis if we relax the special assumption that gi,i+1 and gi,i−1 be independent of i. Thus we define a skip–free Markov process by the property that its generator G = (gij )i,j∈E satisfies gij = 0 for all states i, j ∈ E ⊂ N0 with i − j > 1. For queueing systems this means that there are only single arrivals or departures. Thus every Markovian queueing system with single arrivals and departures can be modelled by a skip–free Markov process. Denote the remaining infinitesimal transition rates by λi := gi,i+1
and
µi := gi,i−1
for all possible values of i. The rates λi and µi are called arrival rates and departure rates, respectively. The state transition graph of such a process assumes the form
λ0 0
λ1 1
µ1 Figure 4.3.
λ2 2
µ2
... µ3
A skip–free Markov process
Its balance equations are given by λ0 π0 = µ1 π1 and (λi + µi )πi = λi−1 πi−1 + µi+1 πi+1 for all i ∈ N. By induction on i it is easily shown that these are equivalent to the equation system (4.4) λi−1 πi−1 = µi πi
55
Markovian Queues in Continuous Time
for all i ∈ N. This system is solved by successive elimination with a solution of the form i−1 λj λ0 λ1 · · · λi−1 = π0 (4.5) πi = π0 µj+1 µ1 µ2 · · · µi j=0
for all i ≥ 1. The so lution π is a probability distribution if and only if it can be normalized, i.e. if n∈E πn = 1. This condition implies 1=
n∈E
π0
n−1 j=0
−1 n λj λj = π0 µj+1 µj+1
n∈E j=0
with the empty product being defined as one. This means that ⎛ ⎞−1 −1 n λj ⎠ π0 = ⎝ µj+1
(4.6)
n∈E j=0
and thus π is a probability distribution if and only if the series in the brackets converges. In this case, the stationary distribution of a skip–free Markov process is given by (4.6) and (4.5).
3.
The M/M/∞ Queue
The first application of the analysis of the last section to a queueing system shall be the M/M/∞ queue. This is a queue without queueing: There are infinitely many servers such that every incoming user finds an idle server immediately. Arrivals are governed by a Poisson process with intensity λ > 0, and the service times are exponentially distributed with rate µ > 0, equal for each server. Due to lemma 3.2, the system process is Markovian. Furthermore, there are only single arrivals and departures. Hence the M/M/∞ queue can be modelled by a skip–free Markov process. Since the arrival process is independent of the rest of the queue, the arrival rates of the respective skip–free Markov process are constant. In the notation of section 2 we can thus specify λn = λ for all n ∈ N0 . Departures occur upon service completions. According to lemma 3.2 and due to the memoryless property of the exponential distribution (see lemma 3.2), the departure rates are given by µn = n · µ for all n ∈ N. Define ρ := λ/µ. Then the series in (4.6) assumes the value ∞ n −1 ∞ λj ρn = = eρ µj+1 n!
n=0 j=0
n=0
56
AN INTRODUCTION TO QUEUEING THEORY
and thus converges regardless of the value of ρ. This means that the M/M/∞ queue always has a stationary distribution, which is not surprising as infinitely many servers cannot be exhausted, whatever the arrival intensity amounts to.
Due to formulae (4.6) and (4.5), we obtain the stationary distribution π as given by π0 = e−ρ and ρn πn = e−ρ · n! for all n ∈ N, which is a Poisson distribution with parameter ρ. Hence the mean and the variance of the number N of users in the stationary system are given by E(N ) = Var(N ) = ρ.
Since there is no queueing in the M/M/∞ system, all waiting times are zero and the mean sojourn time in the system equals 1/µ. This means that all users passing through such a system are independently kept there for an exponentially distributed time. In the context of queueing networks (see chapter 5), the M/M/∞ queue is therefore often called an (independent) delay system.
4.
The M/M/k Queue
The M/M/k queue is provided with k identical servers which can serve users in parallel. Users arrive according to a Poisson process with intensity λ > 0, and the service time distribution is exponential with parameter µ > 0 at all servers. Whenever a user arrives and finds all servers busy (i.e. at least k users in the system) he queues up in the waiting room. From there the next waiting user is served in the order of a FIFO discipline as soon as one of the servers becomes idle. An arriving user finding less than k users already in the system (i.e. there are idle servers at the time of arrival) chooses any server and starts service immediately. For this type of queue the dynamics is a mixture between the M/M/∞ queue and the M/M/1 queue. Up to the value of k users in the system, the service (and thus the departure) rate increases like µn = n · µ for 1 ≤ n ≤ k. Starting from k users in the system there are no servers anymore to keep up with newly arriving users, and the departure rate remains µn = k · µ for all n ≥ k + 1. The independence of the arrival process yields constant arrival rates λn = λ for all n ∈ N0 . Again we define ρ := λ/µ. The series in (4.6) specifies to k−1 n ∞ n −1 ∞ λj ρk ρ !n ρ = + µj+1 n! k! k
n=0 j=0
n=0
n=0
57
Markovian Queues in Continuous Time
µ λ
arrival process
queue µ
departure process
servers Figure 4.4. M/M/k queue
which is finite if and only if ρ < k . In this case the stationary distribution π is given by formulae (4.6) and (4.5) as k−1 −1 ρn ρk π0 = + n! (k − 1)! · (k − ρ) n=0
and ρn , 1≤n≤k n! ρ !n−k πn = πk · , n>k k Here we see the M/M/∞ form for n ≤ k and the M/M/1 form beginning with n ≥ k , where πk substitutes the base value that is played by π0 for the pure M/M/1 queue. πn = π0 ·
The fact that the M/M/k queue behaves for more than k users in the system like an M/M/1 queue with load ρ/k is further illustrated by the following observation. Let N denote the number of users in the system that is in equilibrium. Consider the conditional probability pn := P(N = nN ≥ k ) for n ≥ k. This is computed as " ∞ πn ρ !n−k ρ !i−k ρ !n−k ρ! pn = ∞ = πk = 1− πk k k k k i=k πi i=k
Since n−k is the number Nq of users waiting in the queue, the conditional distribution of Nq given that all servers are busy has exactly the same (geometric) form as the stationary distribution for the M/M/1 system process.
58
AN INTRODUCTION TO QUEUEING THEORY
The probability P{N ≥ k} of the conditioning event that in equilibrium all servers are busy is given by ∞
n=k
πn =
1 + (k − 1)! · (k − ρ) ·
k−1 n−k ρ
n=0
n!
−1
(4.7)
This is the probability that a newly arriving user must wait before he is served. The above formula for it is called Erlang’s delay formula.
5.
The M/M/k/k Queue
In stochastic modelling there always is a trade–off between the adaptation of the model to reality and its simplicity, i.e. its analytic tractability. We have seen that the nicest solutions could be derived for the M/M/1 queue (a geometric distribution) and the M/M/∞ queue (a Poisson distribution). The solution for the M/M/k queue, which is more realistic for most practical applications, is also more involved. For all these models we kept the often unrealistic assumption of an infinite waiting room. The models in this and the following sections stem from more realistic specifications. Historically, they belong to the first applications which founded the field of queueing theory. In the times of A.K. Erlang, at the beginning of the 20th century, telephone calls had to be connected by an operator. The telephone companies installed call centers where a number k of operators served call requests which arrived from a large number of subscribers. Whenever all operators are busy with serving call requests and a new subscriber calls to get a line, this subscriber will be rejected. If we model the arriving requests by a Poisson process and the duration of the operators’ services by an exponential distribution, then we get an M/M/k/k queue as a model for this application. The subscribers with their call requests are the users and the operators are the servers. There are k servers and as many places in the system, i.e. there is no additional waiting room.
Let the intensity of the Poisson arrival process and the rate of the exponential service times be denoted by λ > 0 and µ > 0, respectively. Again we can use a skip–free Markov process to analyze this system. In this notation, we obtain λn = λ for all n = 0, . . . , k − 1 and µn = n · µ for n = 1, . . . , k. The values of λn and µn are zero for all other indices n. Define ρ := λ/µ. The series in (4.6) is in this case k −1 n λj ρn = µj+1 n! n∈E j=0
n=0
59
Markovian Queues in Continuous Time
which is finite, regardless of the value for ρ. Hence a stationary distribution π always exists and is given by π0 =
k ρn
n=0
n!
−1
and
πn = π 0 ·
ρn n!
for all n = 1, . . . , k. The main performance measure for this application is the probability that all operators are busy and the company is unable to accept new call requests. This is given by ρk πk = k!
k ρn
n=0
n!
−1
which of course is valid only under the stationary regime, i.e. in equilibrium. This expression is known as Erlang’s loss formula. Note that the expression of π0 for the M/M/∞ queue is the limit of the respective expression for the M/M/k/k model as k tends to infinity. Even further, the stationary distribution for the M/M/k/k queue converges to the stationary distribution of the M/M/∞ for increasing k.
6.
The M/M/k/k+c/N Queue
A simplifying assumption in the previous model has been the constant arrival rates λn = λ. This implies that even for a high number of users in the queue the intensity of new arrivals does not diminish. While this is a reasonable assumption for an application to call centers, where the number of operators (and thus the maximal number of users in the system) is only marginal compared to the number of all subscribers, there are other applications for which such an assumption would not be realistic. Consider a closed computer network with k servers and N terminals. Every terminal sends a job to one of the servers after some exponentially distributed think time. If a server is available, i.e. idle, then this job is served, demanding an exponential service time. A terminal that has a job in a server may not send another job request during the service time. Whenever a terminal sends a job request and all servers are busy at that time, then the job is put into a queue. This queue has maximal capacity c, i.e. if a terminal sends a job request and the queue is already filled with c jobs, then this new job request is rejected and the terminal starts another think time.
This application can be modelled by an M/M/k/k+c/N queue if we interpret the users in the system as the job requests that are in service or waiting. Denote
60
AN INTRODUCTION TO QUEUEING THEORY λ
µ
queue
λ
µ
terminals servers
Figure 4.5.
A closed computer network
the parameters of the exponential think time and service time distributions by λ > 0 and µ > 0, respectively. Without loss of generality we may assume that k + c ≤ N . Then the queue in consideration is a skip–free Markov process with arrival rates λn = (N − n) · λ for n = 0, . . . , k + c − 1 and departure rates µn = min(n, k ) · µ for n = 1, . . . , k + c. As always, define ρ := λ/µ. The series in (4.6) amounts to k k+c −1 n λj N N ! · ρn = · ρn + µj+1 n (N − n)! · k! · k n−k n=0
n∈E j=0
(4.8)
n=k+1
and thus is finite for every value of ρ. The stationary distribution π is given by π0 =
k N
n=0
n
· ρn +
k+c
n=k+1
N ! · ρn (N − n)! · k! · k n−k
−1
and N πn = π0 · · ρn , 1≤n≤k n N ! · ρn πn = π0 · , k+1≤n≤k+c (N − n)! · k! · k n−k
There are several interesting special cases. For c = 0 there is no room for a queue of waiting jobs. Then the stationary distribution simplifies to a binomial
Markovian Queues in Continuous Time
61
distribution with parameters (N , p), where p = ρ/(1 + ρ), which is truncated to the states n = 0, . . . , k. Such a distribution is called an Engset distribution.
For c = N −k the queue has an important application in reliability theory. This is known as the machine repair problem. In a production site there are N machines which are prone to failure. Each of them breaks down after a working time which is exponentially distributed with parameter λ. There are k repairmen that take care of the broken machines sequentially. The repair times are exponential with parameter µ. Then the system process of the M/M /k /N/N queue yields the number of broken machines.
Notes The models presented in this chapter are the oldest within queueing theory. Applications to telephone networks date back to the beginning of the 20th century, notably Erlang [33] and Engset [32]. Skip–free Markov processes have been extensively used for populations models. Therefore the name birth–and–death processes is very popular for them, with λi and µi denoting the transition rates for a birth and a death, respectively, if the population has i members. However, the authors think that such a name is inappropriate for queueing models and thus prefer the more technical term skip–free.
For more Markovian queueing models see Kleinrock [50]. An analysis of non– homogeneous (namely periodic) Markovian queues is given in Breuer [17, 22]. Exercise 4.1 Verify the formula Var(N ) = ρ/(1 − ρ)2 for the stationary variance of the number of users in the M/M/1 queue. Exercise 4.2 Show that the equation system (4.4) is equivalent to the balance equations for a skip–free Markov process. Prove the form (4.5) of its solution. Exercise 4.3 Prove Erlang’s delay formula (4.7). Exercise 4.4 Compare the stationary mean number of users in the system for the following three queueing systems: (a) an M/M/1 queue with arrival intensity λ and service rate µ, (b) an M/M/2 system with arrival intensity λ and service rate µ/2, and (c) two independent M/M/1 queues with arrival intensity λ/2 to each of them and equal service rate µ. Explain the differences. Exercise 4.5 Explain equation (4.8).
62
AN INTRODUCTION TO QUEUEING THEORY
Exercise 4.6 Show that the stationary distribution for an M /M /k /k /N queue is an Engset distribution. Exercise 4.7 Analyze the M/M/1/c queue with arrival intensity λ and service rate µ. This always has a stationary distribution π . Show that in the limit c → ∞, there are two possibilities: Either ρ < 1 and π converges to the stationary distribution of the M/M/1 queue, or ρ ≥ 1 and π converges to the zero measure. Exercise 4.8 Examine the M/M/1 queue with users who are discouraged by long queue lengths. This can be modelled by arrival rates λn = λ/(n + 1) for all n ∈ N0 . Show that the stationary distribution is Poisson.
Chapter 5 MARKOVIAN QUEUEING NETWORKS
A set of interconnected queueing stations in which any user, upon departing from one station, can join another or must leave the total system is called a queueing network. The paths along which a user may travel from station to station are determined by routing probabilities qij . Travel times, in general, are assumed to be zero. A queueing network may be regarded as a directed graph whose nodes represent the stations, and whose edges represent links between nodes. Between nodes i and j an edge exists if and only if the routing probability qij , i.e. the probability to join station j after service completion at station i, is greater than zero. There may be also links from and to the outside of the network, representing the possibility for users to enter or leave the system. Let qj 0 dety for a user to depart from the network after being served note the probabili at node j. Then M k=0 qjk = 1, with M the number of stations in the network. The matrix Q = (qij )i,j≤M is called the routing matrix of the network. Given Q, th e probabilities for network departures are implicitly determined by qj 0 = 1 − M k=1 qjk .
Routing probabilities may be state dependent, where a network state usually is defined by the vector n = (n1 , . . . , nM ) of actual numbers ni of customers in stations i = 1, . . . , M . More complex state definitions arise when customers of different classes require different amounts of service and follow different routes through the network. It may be the case that a particular routing behaviour is associated with a certain group of classes, while other groups follow different rules. This leads to the notion of chains in a network. A chain defines a particular subset (called category) of customers who travel through the network according to a particular routing mechanism. Class changes of customers within a chain are possible, but no customer can pass over to some class
64
AN INTRODUCTION TO QUEUEING THEORY
of another chain. The pair of class and chain identifiers is called a category index.
? 
qij
q0i
? ? 6
#
6 j
"! !
j
i #
j
"! ! ?
qj 0

k #
? j6 ! 6 "!
Figure 5.1. Open Queueing Network
A network is called a closed network if there is no traffic entering the network from outside, and all departure probabilities qi0 are zero. A network that allows incoming and outgoing traffic is called an open network. Since we are only interested in systems that eventually reach equilibrium, the cases with entering but no outgoing traffic, or vice versa, are excluded from investigation. As mentioned above, it is further possible to discriminate between different user classes and different chains in a network. Each chain is associated with its own routing matrix Qc . In this case the network may be open for some chains, and closed for others. Such a network is called a mixed network. In this book we concentrate on the case of state independent routing. In the simplest case, when customers are nondistinguishable, the dynamic behaviour of a queueing network is best described by a vectorvalued stochastic process (N Nt : t ≥ 0) with state space NM 0 . In case that we consider different customer classes and/or special characteristics of service or even interarrival times, a network state, clearly, may be described differently. As a construct for stochastic modelling, queueing networks are subject to performance analysis, the performance measures of interest being similar to those for isolated stations. In most cases one is interested in the average delay (or system time) T¯ that a user experiences when travelling through the network, and in the mean ¯ of customers that are resithroughput S¯ as well as the mean total number N dent. According to Little’s result (see theorem 1.9), these quantities are related by ¯. S¯ · T¯ = N (5.1)
They can easily be evaluated by means of the stationary state probabilities (that hold in equilibrium), if those exist and are known. For instance, with pn denot
65
Markovian Queueing Networks
ing the stationary probability for the network to be in state n = (n1 , . . . , nM ), ¯ = N
n∈NM 0
pn ·
M
ni .
i=1
In general, the calculation of stationary probabilities, if they exist, represents an unsolved or at least intricate problem. This is due to the fact that in most cases no closed form expressions are known. Nevertheless, there are queueing networks for which stationary state probabilities can be obtained by forming the product of all those stationary state probabilities that are associated with the network stations in isolation. Such queueing networks are called product form (PF) networks or separable networks. Among separable networks, the best understood are Markovian queueing networks, i.e. networks for which the stochastic process (N Nt : t ≥ 0) is Markov, and which allow a product form solution. We shall be concerned mainly with the class of PFnetworks in the following sections, and shall concentrate on the most simple cases only. For continuing information about queueing networks of more complex structure the reader is referred to the abundant literature on this topic.
1.
Balance Equations and Reversibility Properties
Let N = (N Nt : t ≥ 0) be a vectorvalued continuous time Markov process with state space E that describes a queueing network with M stations. In the simplest case, when there is only one class of customers travelling through the network, and no phase structures need to be considered for service (and interarrival) time distributions, the state space E forms a subset of NM 0 . N can be considered as a random walk process on the network graph. Let G = (gmn )m,n∈E denote the generator matrix of N . Then, given that the process is irreducible, it assumes equilibrium if and only if the system of equations pm gmn = o (5.2) pG = m∈E
possesses a finite positive solution p = (p n )n∈E (see theorem 3.9). Any such solution p can be normed as to satisfy n∈E pn = 1 and to represent the unique stationary distribution of N , i. e. the joint stationary queue length distribution of the network. For indistinguishable customers, irreducibility of N is equivalent to the possibility for a customer to be able, upon leaving a station i and subsequently travelling through the network, to finally reach any other station j or, in case of an open network, to reach the exterior of the network. Mathematically spoken, this means that there are integers
66
AN INTRODUCTION TO QUEUEING THEORY
# k1 = i, k2 , . . . , kn , kn+1 = j such that ℓn=1 qkℓ ,kℓ+1 > 0, where in case that the exterior is meant by the source or the destination, the respective index i or j has value 0.
Equation (5.2) mirrors a situation that we call global balance. A term of the form pm gmn , where gmn is the instantaneous transition rate from state m to state n, is called probabilit y flux or rate of flow from m to n. Since G, as a generator matrix, satisfies n∈E gmn = 0, (5.2) is equivalent to pm gmn = pn gnm , (5.3) m∈E m= n
m∈E m= n
stating that the probability flux into state n equals the probability flux out of state n. As opposed to that, we speak of a detailed balance equation, if pm gmn = pn gnm .
(5.4)
There are several concepts of balance between rates of flow in Markov processes and, correspondingly, in Markovian queueing networks. These concepts are tightly connected with the property of reversibility in the theory of Markov processes. In order to illustrate this relationship, let us first specify what (r) Nt )t∈R+ associated with some is meant by a reversed process N (r) = (N 0 Markov process N = (N Nt )t∈R+ with state space E. 0
The reversal N (r) of the Markov process N is a process that is developing in time in forward direction just as the original process does in backward direction, on the same state space E, i. e., for some τ ∈ R+ 0 , we have (r) + Nt = Nτ −t ∀ t ∈ R0 . If N is timehomogeneous and stationary, the value of τ does not matter, and so (r)
Nt
= N−t
for all
t ∈ R+ 0.
N is called the forward process corresponding to the reversed or backward process N (r) . If the forward process N is timehomogeneous, irreducible, and stationary, then so is the reversed process N (r) . (r) Let G = (gmn )m,n∈E and G(r) = (gmn )m,n∈E denote the generator matrices of N and N (r) , respectively, with total transition rates (r) (r) γm = gmn , γm = gmn for any m ∈ E. n∈E n= m
n∈E n= m
(r)
As can easily be seen, the instantaneous transition rates gmn and gmn are, in general, not the same for an arbitrary pair of states m, n. On the other
67
Markovian Queueing Networks (r)
side, given that p = (pn )n∈E and p(r) = (pn )n∈E denote the stationary distribution vectors of N and N (r) , we have p(r) = p.
(5.5)
This follows directly from the fact that reversing time does not alter the average fraction of time the process spends in a state. Setting −t−dt =: t0 , the defining equation (r)
(r)
(r)
(r)
P(N Nt+dt = n, Nt = m) = P(N−t−dt = n, N−t = m) = P(N Nt0 +dt = m, Nt0 = n) (r)
(r)
(r)
leads to pm · P(N Nt+dt = n  Nt = m) = pn · P(N Nt0 +dt = m  Nt0 = n), such that, by dividing both sides by dt, letting dt → 0, and observing (5.5), we obtain (r) (5.6) pm · gmn = pn · gnm . An important statement that characterizes the transition rates of the reversed process is the following.
Theorem 5.1 Let N = (N Nt )t∈R+ be a stationary Markov process with state 0 space E and generator G = (gmn )m,n∈E . Assume that there are nonnegative ∗ numbers gm n satisfying ∗ gmn = gm n = 0 for all m ∈ E , n∈E
n∈E
and positive numbers pn , n ∈ E, summing to 1, such that the equations ∗ pm gmn = pn gnm for all m ∈ E
∗ ) (r) is the generator of the reversed are satisfied. Then (gm n m,n∈E = G process, and the pn , n ∈ E, form the stationary probability vector p for both, the reversed and the forward process.
Proof: In order to show that p = (pn )n∈E is the stationary vector of N , ob ! ∗ serve that m∈E pm gmn = pn m∈E gnm = pn m∈E gnm = o, saying ∗ that p satisfies the global balance equation. Additionally, pm gmn = pn gnm (r) ∗ implies gnm = gnm according to (5.6). Joint distributions of the original and the reversed process are not identical in general. With t1 < . . . < tk , a k th order joint distribution of N reads pm1 ...mk (t1 , . . . , tk ) = P(N Nt1 = m1 , . . . , Ntk = mk ),
68
AN INTRODUCTION TO QUEUEING THEORY
whereas (r)
(r)
P(N Nt1 = m1 , . . . , Ntk = mk ) = P(N N−t1 = m1 , . . . , N−tk = mk ), which need not be the same as pm1 ...mk (t1 , . . . , tk ). Definition 5.2 A stochastic process is called reversible, if the joint distributions of the forward and the reversed process are identical, i.e. (r)
(r)
P(N Nt1 = m1 , . . . , Ntk = mk ). Nt1 = m1 , . . . , Ntk = mk ) = P(N Reversibility is related to the notion of detailed balance equations (5.4). First note that any reversible Markov process is stationary, as can immediately be deduced from the equality P(N Nt1 , . . . , Ntk ) = P(N Nt1 +τ , . . . , Ntk +τ ) = P(N N−t1 , . . . , N−tk ) for any τ ∈ R+ 0 . Secondly, the following more general statement holds.
Theorem 5.3 A stationary Markov process N = (N Nt )t∈R+ is reversible if and 0 only if the detailed balance equations (5.4) are satisfie for all m, n ∈ E and d some positive vector p = (pn )n∈E with n∈E pn = 1.
Proof: 1. The properties of stationarity and reversibility imply that P(N Nt = n) does not depend on t. The numbers P(N Nt = n) =: pn are positive and sum to 1. From reversibility and timehomogeneity we can conclude that (r)
(r)
P(N Nt+dt = n, Nt Nt+dt = n, Nt = m) = P(N
= m)
= P(N N−t−dt = n, N−t = m),
which (setting −t − dt =: t0 ) is equivalent to pm · P(N Nt+dt = n  Nt = m) = pn · P(N Nt0 +dt = m  Nt0 = n).1 Forming the differential quotient on each side, one obtains (5.4). 2. The detailed balance equations guarantee global balance, so p represents the equilibrium distribution of the Markov process. Considering now an arbitrary interval [−T , T ], we calculate the joint probability density for the event that the process is in state m1 at time −T , jumps to state m2 at time −T + x1 , time −T + x1 + x2 , and so forth, until it reaches state mk to state m3 at k−1 at time −T + ν=1 xν , staying there until T , i. e. for some time interval of k length xk that satisfies ν=1 xν = 2T . The probability, that upon leaving a 1 Remember,
that it is even possible here to replace t0 by t due to timehomogeneity.
69
Markovian Queueing Networks
state mν the process jumps to state mν+1 , is gmν mν +1 /γmν . Further, since we have a Markov process, the probability density of the sojourn time in state mν equals γmν e−γmν ·xν , whereas we have P(sojourn time in state mk > xk ) = e−γmk ·xk . As a consequence, the probability density for the above mentioned process behaviour in [−T, T ] reads pm1 e−γm1 ·x1 gm1 m2 e−γm2 ·x2 gm2 m3 . . . e−γmk−1 ·xk−1 gmk−1 mk e−γmk ·xk . Applying now the detailed balance property, we obtain for the same density the expression pmk e−γm1 ·x1 gmk mk−1 e−γm2 ·x2 gmk−1 mk−2 . . . e−γmk−1 ·xk−1 gm2 m1 e−γmk ·xk !
(since pm1 gm1 m2 gm2 m3 = pm2 gm2 m1 gm2 m3 = pm3 gm3 m2 gm2 m1 , etc.). This density, but, describes a process behaviour, where the process starts at time −T in state mk , stays there for some time xk , then jumps to state mk−1 , stays there for some time xk−1 , and so forth, until it reaches state m1 , where it remains at least for a period of x1 time units. Consequently, the reversed process (N Nt )t∈[−T,T ] proves to behave exactly in the same way as the reversed process (N N−t )t∈[−T,T ] . Since T has been arbitrarily chosen, N must be reversible.
For queueing network analyses the property of product form related to the state probabilities of isolated stations is of paramount importance. The following result relates reversibility with some other type of product form. Theorem 5.4 The stationary distribution of any irreducible and reversible Markov process can be calculated from a product of ratios of transition rates. Proof: Let N be an irreducible and reversible stationary Markov process, such that, according to theorem 5.3, the detailed balance equations (5.4) are satisfied. We select an arbitrary state, say s = (s1 , . . . , sM ), as a fixed ”starting state”, from which any other state n is reachable due to irreducibility, that is, there is at least one sequence s = m1 , m2 , . . . , mk = n such that gm1 m2 gm2 m3 . . . gmk−1 mk = 0. Using this fact, we further select for each state n ∈ E one and only one connecting sequence of this form with m1 = s and mk = n, and define positive numbers πn by gm m gm m ...gm m 1 2 2 3 k−1 k for n = s gmk mk−1 gmk−1 mk−2 ...gm2 m1 πn = 1 for n = s
70
AN INTRODUCTION TO QUEUEING THEORY
(clearly, the intermediate states mν as well as the value of the index k depend on n). Next, setting n∈E πn = C, we show that the distribution vector ˜ = (˜n )n∈E with p k(n)−1 1 1 gmν mν +1 p˜n = πn = C C gmν +1 mν !
ν=1
satisfies the global balance equation (5.2). For that purpose, observe that according to detailed balance, k(n)−1
k(n)−1 gmν mν +1 pmν +1 pn = = , πn = gmν +1 mν pmν ps ν=1
ν=1
which is true also for n = s. Consequently,
n∈E
p˜n gnm =
! pn 1 1 gsm + · gnm = pn gnm = 0, C ps ps C n∈E n∈E
n= s
˜ = p. This proves the assertion. implying that p
Let Ni,t denote the random number of customers in a single queueing station i at time t. If (N Ni,t )t∈R+ is a stationary reversible Markov process then we call i 0 a reversible queueing station. An important consequence from reversibility is the socalled inputoutput property: For any reversible queueing station the departure process has the same joint distribution as the arrival process. This is due to the fact that, whereas the points in time when Ni,t increases by 1 correspond to arrivals, the points in time when Ni,t decreases by 1 correspond to de(r) partures and, by definition, to the epochs when the reverse process (N Ni,t )t∈R+ 0 increases by 1. Since joint distributions of the original and the reverse process are the same, the arrival and the departure process exhibit the same joint statistics. As a consequence, we have the fact that a reversible queueing station, when being fed by a Poisson (Markov) stream, causes a Poisson (Markov) output stream. This property is called M ⇒ M property. Before considering other balance concepts, let us point to a general property of stationary Markov processes. Assume, as we do mostly in this chapter, that a stationary Markov process N can be interpreted as a random walk in a finite graph G; then the rates of flow in opposite directions across a cut in G are identical. In other words, for some arbitrary subset A in the set E of nodes
71
Markovian Queueing Networks
(the state space) we have2
pm gmn =
m∈A n∈E\A
pn gnm .
m∈A n∈E\A
This is a direct consequence from global balance, since by summing on both sides of (5.3) over all n, and subtracting pm gmn = pn gnm m∈A n∈E
m∈A n∈A
, we obtain the above equation. Opposed to the notions of global and detailed balance, the term partial balance plays an important role. In fact, the property of partial balance is the most general property, since global and detailed balance as well as other terms (such as station or local balance) can be regarded as special cases of partial balance. An irreducible stationary Markov process with equilibrium distribution p = (pn )n∈E and transition rates gmn is said to be in partial balance with respect to a subset A of its state space E , if pm gmn = pn gnm , n ∈ A. (5.7) m∈A
m∈A
Notice, that the stationary distribution p satisfies the partial balance equations (5.7) if and only if pm gmn = pn gnm , n ∈ A; m∈E\A
m∈E\A
this follows from stationarity, i. e. the fact that the process is in global balance and satisfies (5.3). In many application oriented publications the property of partial balance is described in somewhat vague terms, e. g. saying that partial balance for some state m is present if the rate of flow out of m due to changes of a particular nature equals the rate of flow into m due to changes of that very particular nature. It is here the point to pay attention to the fact that a network state, in general, is determined by several actual values of system parameters, rather than just by 2 The
exterior of a queueing network is represented by a node ”0”, such that q0i is a routing probability into node i from outside the network, and qj0 is the routing probability from node j to outside the network. The node 0 is contained in the node set of G.
72
AN INTRODUCTION TO QUEUEING THEORY
the number of customers in each station (the latter definition leading to E = NM 0 ). For example, in a multiclass network with R classes a state description may contain information about the number of class r customers, their actual waiting (and/or server occupancy) positions, and the actual phases of service at every station i ∈ {1, . . . , M }. Accordingly, the term partial balance includes a variety of specific definitions, among which the notions of station balance and local balance deserve particular notice. Probably the most important property is that of local balance. Introduced by Chandy et alii [26], this term depicts a situation, where the rate of flow into a network state m due to the arrival of a class r customer at a network queue i is balanced against the rate of flow out of the same network state due to the departure of a class r customer from that network queue i. If the state description contains information about the actual phase of service in case of nonexponentially distributed service times, state changes are caused also by phase transitions or by an entry into the first phase of a service time distribution. Local balance, then, means that the probability flux into network state m due to the arrival of a class r customer at a network queue i by entering a service phase ℓ equals the probability flux out of the same network state due to the departure of a class r customer from that service phase ℓ at queue i. Chandy used the term ”stage of service” for the tripel (i, r, ℓ) of queue index i, class index r, and phase index ℓ. Thus, a network is said to be in local balance, if the rate of flow into a stage (i, r, ℓ) of service is equal to the rate of flow out of the same stage (i, r, ℓ) of service for all admissible values of i, r, and ℓ. dep (r)
Let us write gm ni for the rate out of state m due to a departure of a class r customer from queue i (this rate is zero if there is no such customer at i in state ar r (r) m), and gn mi for the rate into state m due to an arrival of a class r customer at queue i. The local balance equations then read ar r (r)
pn gnmi
dep (r)
= pm gmni
for all
i ∈ {1, . . . , M }, 1 ≤ r ≤ R.
(5.8)
To illustrate the concept, consider a single class queueing network with M stations whose states are completely described by the vectors m = (m1 , . . . , mM ) of station specific customer numbers. Let λi (mi ) and µi (mi ), respectively, denote the arrival rate into, and the service completion rate at station i, when there are mi customers present (i = 1, . . . , M ). According to the above definition of local balance, the rate of flow into some network state m due to an arrival at queue i must be equal to the rate of flow out of state m due to a departure from queue i. Let ei denote a vector of length M that has a 1 at position i and zeros at all other positions (the ith canonical row base vector). An arrival at queue i can transfer a state n into m only if n equals m − ei (notice that a transition from m − ei + ej to m would be due to a departure from queue j ,
73
Markovian Queueing Networks
rather than due to an arrival at queue i). Similarly, a departure from queue i can transfer the state m only to one of the two states m − ei or m − ei + ej . As a consequence, the local balance equations for that simple single class network with state space NM 0 read pm−ei λi (mi − 1) = pm µi (mi ) qi0 +
M
pm µi (mi ) qij
j=1
for all i ∈ {1, . . . , M }, where qi0 and qij , respectively, are the routing probabilitiesfrom station i to the exterior of the network and to station j . Observing qi0 + M i=1 qij = 1 and µi (0) = 0, we finally state that local balance means pm−ei λi (mi − 1) = pm µi (mi ) if mi ≥ 1,
i = 1, . . . , M.
(5.9)
The next theorem should be considered as the central result with respect to the notion of local balance. We provide an exemplary proof only for the most simple situation of a single class network with state space E = NM 0 , whose state descriptions m = (m1 , . . . , mM ) reflect the station occupancies and whose routing probabilities are state independent. The general case can be handled similarly, although leading to more complex and intricate expressions. We refer to the books of Kelly [48], Kant [45] and Nelson [61] for further details. Theorem 5.5 Local balance implies global balance and product form.
Proof: (For the most simple case with only one class of customer and state independent routing, where a state at some arbitrary point in time is determined by the actual numbers of customers present in the network queues.)
1. Assume that a probability distribution (pn )n∈E satisfies the local balance equations (5.8). We show that (pn )n∈E then satisfies global balance. Consider all neighbouring states m ± ei and m ± ei ∓ ej that are reachable from state m, such that the probability flux into state m is given by
n∈E n= m
pn gnm =
M
ar r i pm−ei gm−e im
i=1
+
M i=1
depi pm+ei gm+e im
+
M M i=1 j=1
depi pm+ei −ej gm+e . i −ej m
74
AN INTRODUCTION TO QUEUEING THEORY
Applying (5.8), this yields
pn gnm =
M
depi pm gm m−ei +
i=1
n∈E n= m
+
M M
depi pm gm m−ei +ej +
i=1 j=1
M
depi pm+ei gm+e im
i=1
+
M M
depi pm+ei −ej gm+e . i −ej m
i=1 j=1
Now express m as m = n − ei in the first of the two sums in the second line, and as m = n − ei + ej in the second one. Then these expressions can be rewritten as M
i pn gndenp−e i
+
i=1
M M
! i pn gndenp−e = i +ej
i=1 j=1
M
ar r i pn−ei gn−e in
i=1
=
M
ar r i pm gm m+ei ,
i=1
such that the global flux into state m reads ⎧ ⎫ M M M M ⎨ ⎬ depi depi ar r i pn gnm = pm gm + g + g . m m−ei +ej m m+ei m−ei ⎩ ⎭ n∈E n= m
i=1
i=1 j=1
i=1
The right hand side, but, of this expression is nothing else than the total probability flux out of state m, which proves that (pn )n∈E satisfies global balance and, therefore, is the equilibrium state distribution of the network process N . Consequently, all probability distributions over E that satisfy the local balance equations must coincide with the unique equilibrium state distribution of the network process N . 2. We show that the distribution vector (pn )n∈E that satisfies local balance has product form. Take any network station i in isolation, i.e. decoupled from the network, and provide the same input flow to i that the station experiences when communicationg with other stations in the network, such that the arrival and departure rates are the same as before. Obviously, local balance implies that i is in equilibrium. Let pi (mi ) be the steady state probability for the isolated station i to be in state mi , and let λi (mi ) and µi (mi ) denote the arrival rate into i and the departure rate from i, respectively, when i is in state mi . Then, equations (5.8) take the form pi (mi − 1)λi (mi − 1) = pi (mi ) µi (mi ) ∀ mi ≥ 1.
75
Markovian Queueing Networks
˜ = (˜n )n∈E over E = NM Define a probability vector p 0 by M 1 p˜n = pi (ni ) for n = (n1 , . . . , nM ), CM i=1
# where CM = n∈E M i=1 pi (ni ). In the network, the arrival rates into station i and the departure rates from station i, respectively, are ar r i gm−e = λi (mi − 1), im
depi gm m−ei = µi (mi ) qi0 ,
depi gm m−ei +ej = µi (mi ) qij
˜ leads to for i, j ∈ {1, . . . , M }. The construction of p ar r i p˜m−ei gm−e = im depi p˜m gm m−ei +
M j=1
pi (mi − 1) λi (mi − 1), pi (mi )
M ! ! depi gm = p ˜ µ (m ) q + µ (m ) q m i i i0 i i ij , m−ei +ej j=1
! M depi depi ar r i g which implies that p˜m−ei gm−e = p ˜ + g m m m−ei j=1 m m−ei +ej , i.e. im ˜ satisfies the local balance equations. Consequently, p ˜ coincides with the p uniquely determined equilibrium distribution p = (pn )n∈E of N . In general, it is necessary to be careful when reading statements on local balance in the literature since, unfortunately, there are no uniform standards for the definition of this notion. The reader who is interested in physical meanings and practice oriented versions is referred to the book of Van Dijk [30]. Another remark is in place addressing the property of station balance. Here the term ”station” does not stand for ”network station” in the sense of ”a queue in the network” rather, it marks a position in the waiting or server room of a single queue that is occupied by one customer! A queue, in turn, is viewed as a set of stations. To illustrate the situation, consider an isolated multiple server queue that is visited by customers from different classes. Obviously, for a ”firstcome firstserved” (FCFS) or ”lastcome firstserved” (LCFS) scheduling discipline, the waiting positions at the top and the end of the queue, respectively, have particular meanings. Additionally, in case that specific servers are associated with specific classes, also the discrimination between servers (where service completions are to be expected) may be of importance. In that case to each server there is assigned a special subqueue containing customers at their waiting positions.
76
AN INTRODUCTION TO QUEUEING THEORY
Bearing these peculiarities in mind, a ”station” is determined by a position index j. A network queue i is viewed as a set of stations, and if there are in total ni customers resident at i, the occupied stations are indexed r1 , . . . , rni , with rj indicating the class of the customer at station (position) j . Even more complex descriptions are in use when routing chains are to be distinguished in the network, each containing users of different classes; we shall mention that below. In the more simple case, when discriminating between classes only, a possible single queue state definition is given by a 2ni  tupel ni := (r1 , . . . , rni , x1 , . . . , xni ), where i marks the queue in the network, ni is the actual number of customers at this queue i, σi = (r1 , . . . , rni ) forms the sequence of customer classes at positions 1, . . . , ni , and x1 , . . . , xni is a vector of remaining service requirements at these ni positions. So, we have m = (n1 , . . . , nM ) when speaking of state m ∈ E . A queueing network is said to be in ”station” balance if during state m for any position (”station”) j the actual fraction of the service rate associated with that position is proportional to the probability that a customer of the same category will arrive and be placed into this position. ”Station” balance is tightly connected to the notion of symmetric service disciplines that we shall deal with in section 3 below. There we shall give a more precise definition. Clearly, ”station” balance implies local balance and, consequently, global balance and product form. We have set the word ”station” in quotation marks for two reasons: First, the term position in most cases reflects more precisely what is meant when describing a specific network state in a system with position depending dynamics and several chains and/or customer classes. Second, we wish to reserve the term station in this introductory book for a true queueing station in a network. There is a multitude of excellent books on that topic, and for details we refer to the literature mentioned at the end of this chapter. Let us now turn back to the relationships between reversibility properties and flow balance. Asking for a property that guarantees partial balance we are led to the notion of quasireversibility. Let again N = (N Nt : t ≥ 0) be a Markov process with state space E that describes the dynamics of a queueing system serving customers from R different classes. As we saw already, a state n ∈ E may be identified by a fairly complex description, rather than merely by indicating the respective numbers of class specific customers in various stations. Definition 5.6 N is called quasireversible if for any time t0 the state Nt0 is independent of arrival times of class r customers after t0 and departure times of class r customers prior to t0 (1 ≤ r ≤ R).
77
Markovian Queueing Networks
A quasireversible process, in general, is not reversible (see exercise 5.3), and reversibility, in turn, does not imply quasireversibility. Accordingly, it should be stressed that these two notions are completely unrelated. For queueing networks, but, the property of quasireversibility is of significant pertinence. This is due to the fact that — as we shall see below — quasireversibility gives rise to product form expressions for the equilibrium state probabilities. Queues in ”station” balance form an important subclass in the set of quasireversible queues. We first prove a result that is usually termed the inputoutput property of quasireversible queues. Lemma 5.7 (InputOutput Property) The arrival epochs as well as the departure epochs of class r customers in a stationary quasireversible queue form Poisson processes with class specific identical rates λr . Proof: The set of all states n ∈ E that provide the same state information as a given state m except that there is one class r customer more in the system, is marked S(m + r). Let G = (gmn )m,n∈E be the generator matrix of N ; then the rate of state changes due to class r arrivals when the state is mt at time t is λr (mt ) = gmt n . n∈S(mt +r)
1. According to quasireversibility the probability of a class r arrival during the interval (t, t + dt] is independent of the state mt , and so is λr (mt ) = λr . Further, according to the Markov property, the path realization prior to t has no influence on the probability for an arrival in (t, t + dt], which means that the arrival process is memoryless with rate λr , independent of all earlier states prior to t. Consequently, the class r arrival epochs form an independent Poisson process with rate λr . 2. Interchanging the meaning of arrivals and departures of class r customers, the reverse process N (r) again is to be interpreted as the state process of a queue with R customer classes, and since N is quasireversible, so is N (r) . Therefore, the same reasoning applies, stating that the class r arrival process (r) of N (r) forms a Poisson process with rate δr = n∈S(mt +r) gmt n . This rate is the class r departure rate of N , and so, due to stationarity, equals λr , which proves the assertion. We are now in the position to formulate the relationship between quasireversibility and partial balance. Lemma 5.8 Any quasireversible Markov process N = (N Nt : t ≥ 0) over some state space E that describes the dynamics of a queueing system with R
78
AN INTRODUCTION TO QUEUEING THEORY
customer classes satisfies partial balance with respect to the set S(m + r) for any m ∈ E. Proof: Remember, that S(m + r) describes the set of all states n ∈ E that provide the same state information as a given state m except that there is one class r customer more in the system. From equation (5.6) we obtain (r) gmn = pn · gnm , pm n∈S(m+r)
n∈S(m+r)
since the reversal of the reverse process is the original one. According to the proof of lemma 5.7, (r) gmn = gmn , λr = and so pm
n∈S(m+r)
n∈S(m+r)
n∈S(m+r)
gmn =
n∈S(m+r)
pn · gnm .
Let us now consider a vectorvalued continuous time Markov process N = (N Nt : t ≥ 0) with state space E that describes a multiclass queueing network with M stations and R classes of customers. Upon completing service at one station i, a class r customer not only may join another station j of the network or depart from the network, but also may change its class before joining another queue. In general, the probability to undergo such type of change may depend on the history of the customer’s behaviour and on the state of the process. The analysis of queueing networks of that generality has turned out to be very complex, if not impossible. When speaking of Markovian queueing networks in this chapter, we mean a subclass of networks that is characterized by the property that the routing probabilities are memoryless and independent of the network states, this way defining the transition matrix of a Markov chain. Let qir;jr′ denote the probability that a class r customer, after leaving queue i, joins queue j as a class r′ customer, and set qir;00 for the probability that a cl r customer leaves the network after service completion at station i. Then ass M R r ′ =1 qir;jr′ + qir;00 = 1, and the discrete time  discrete state Markov j=1 chain defined by
Q = (qir;jr′ )i,j ∈{0,...,M },r,r′ ∈{0,...,R} 3 3 Where,
for j = 0 only r ′ = 0 is possible, and vice versa.
79
Markovian Queueing Networks
is called the routing chain. A queueing network of that type is said to perform Markov routing.
Remark 5.9 If an asymptotic distribution p for a Markovian network process N = (N Nt : t ≥ 0) does exist, then there is an asymptotic marginal distribution pi = pi (k) for any queue i, too. This can be seen from pi (k) = =
lim P(pri (N Nt ) = k) = lim
t→∞
n∈pri−1 (k)
t→∞
lim P(N Nt = n) =
t→∞
P(N Nt = n)
n∈pri−1 (k)
pn ,
n∈pri−1 (k)
with pri denoting the projection on the ith station specific state component, and pri−1 (k) = {n ∈ NM 0 : ni = k}. We close this section by formulating some sort of a quintessence from the above treatment of quasireversibility.
Theorem 5.10 Let N = (N Nt : t ≥ 0) be a stationary vectorvalued continuous time Markov process with state space E that describes a multiclass queueing network with M stations and R classes of customers. If each queueing station in isolation behaves as a quasireversible queue, and if the network performs Markov routing, then N is again quasireversible, and its equilibrium distribution p = (pn )n∈E assumes product form, i.e. pn =
M 1 fi (ni ), C i=1
where fi (ni ) is a state depending function for an isolated station i in steady state ni , and C is some normalization factor. We give a sketch of the proof for the simple case of a network whose states are defined by class specific customer occupancies only, and in which no class changes occur. For the more general cases we refer to the excellent treatments given by Kelly [61], and Nelson [48].
Proof: Stationarity of the whole network implies that of any single station. Consider a station i in isolation with the same class specific input streams, and let pi (ni ) = pi (ki1 , . . . , kiR ) for kr ∈ N0 and r ∈ {1, . . . , R} be its
80
AN INTRODUCTION TO QUEUEING THEORY
steady state distribution. Quasireversibility means that the input and the output stream for each customer class r at i are Poisson (with same rate λir ), so we have pi (ki1 , . . . , kir − 1, . . . , kiR ) λir = pi (ki1 , . . . , kiR ) µir (kir ). Construct a probability distribution by M
pn =
1 pi (ki1 , . . . , kiR ). C(M , R) i=1
Then this distribution satisfies local balance (cf. proof of theorem 5.5) and, therefore, also global balance. Notice, that the essential property here for a product form to hold is the property of each station to produce, when being fed by a Poisson input stream, an output stream that again is Poisson. This is nothing else than the M ⇒ M property.
2.
Jackson and GordonNewell Networks
Let us consider now the simplest type of queueing network. This is an open or closed single class network of, say, M queues, whose state space is determined by the station specific numbers of customers only. Let N = (N Nt : t ≥ 0) denote the stochastic process that describes the dynamics of such a network with respect to the varying numbers of customers in the stations.4 Its state space E is a subset of NM 0 . As before, we denote with Q = (qij )i,j ∈{1,...,M } the routing matrix, and with G = (gmn )m,n∈NM the generator of N . An open network of that kind is called 0 a Jackson network if the following conditions are satisfied.
1 Any user entering N at some node i may reach any other node in finitely many steps with positive probability. Similarly, starting from some node i a user can leave the network in finitely many steps with positive probability (i ∈ {1, . . . , M }). 2 The network performs Markov routing, i.e. Q represents the transition matrix of a Markov chain. 3 Each queueing station i is of type ∗/M /si with si ∈ N ∪ {∞}, i.e. the service time distribution at station i is exponential with parameter µi for each of the si servers. 4 The
letter N may also stand for the queueing network itself, as long as no ambiguities are to be expected.
81
Markovian Queueing Networks
4 The total arrival stream from outside the network forms a Poisson stream of intensity γ. The separate arrival streams to stat ions i = 1, . . . , M are determined by the routing probabilities q0i with M i=1 q0i = 1. They are Poisson streams with intensities γ q0i =: γi . N is irreducible due to property 1, and is Markov due to the memoryless property of the exponential service and interarrival time distributions. As such, the network assumes equilibrium if and only if there exists a positive finite solution p = (pn )n∈E to the system of equations pG = pm gmn = o, m∈E
where G = (gmn )m,n∈NM is the generator of N . 0
Let λi and δi , respectively, denote the total mean arrival and departure rates at stations i = 1, . . . , M , each being independent of the actual occupancy at the stations. Then, λi = γi + M j=1 δj qji . In equilibrium, δi = λi for each i ∈ {1, . . . , M }, and so λ i = γi +
M
λj qji ,
i = 1, . . . , M.
(5.10)
j=1
(5.10) is called the system of traffic equations for a Jackson network in equilibrium. The next lemma shows that this system always possesses a unique solution. Lemma 5.11 For a Jackson network with routing matrix Q, the matrix I − Q is invertible.
Proof: Consider a Markov chain X with transition matrix 1 0 P = , q0 Q where q0 = (q10 , . . . , qM 0 )T is a column vector, and 0 = (0, . . . , 0) is the zero row vector. Irreducibility of the Jackson network implies that the set of states {1, . . . , M } forms a transient communication class in the state space of X , whereas the state zero is absorbing. Hence, according to corollary 2.15, the ˜ of the potential matrix R of X (as defined in (2.7)) that contains submatrix R entrie s R(ij) with i, j ∈ {1, . . . , M } only, is finite. Due to the structure of P , ˜ is finite, the Neumann series ˜ = ∞ Qn , and since R R n=1 ˜+I = R
∞
n=0
Qn = (I − Q)−1
82
AN INTRODUCTION TO QUEUEING THEORY
is finite, too. This proves the assertion. We denote, as usual, by ρi = λi /µi the load factor of station i, 1 ≤ i ≤ M . In general, the service completion rate at each station i is state dependent, given by µi (ni ) = µi min(si , ni ) when there are ni customers present at i. Obviously, a necessary condition for the network process N to attain equilibrium is that all individual station specific processes attain equilibrium, i.e. stationarity of N implies (5.11) ρi < si for all i ∈ {1, . . . , M }.
The following statement has first been proven by Jackson as early as in 1963 [42]. It shows that (5.11) not only is a necessary, but also a sufficient condition for stationarity of N , and that any Jackson network is a product form (PF) network. Theorem 5.12 (Jackson) Let N denote a Markov process describing a Jackson network with M stations, and assume ρi < si for all 1 ≤ i ≤ M . Then a stationary distribution of N exists and is given by pn =
M
pi (ni ),
(5.12)
i=1
for n = (n1 , . . . , nM ), where pi = (pi (ni ))ni ∈N0 is the stationary distribution of an isolated M/M /si queueing system with arrival rate λi and service rate µi at each server.
Proof: (pn )n∈NM is a probability distribution since pi (ni ) ≥ 0 for all i ∈ 0 {1, . . . , M }, and
pn =
n∈NM 0
∞
n1 =0
...
∞ M
pi (ni ) =
nM =0 i=1
M ∞
pi (ni ) = 1.
i=1 ni =0
From equations (5.11), (5.12), and (5.9) we know that pm−ei λi = pm µi (si )
for all
i ∈ {1, . . . , M },
which means that the distribution (5.9) satisfies local balance. Thus, by theorem 5.5, (pn )n∈NM is the equilibrium distribution of N . 0 Jackson has proved this theorem by directly establishing the global balance relations. We repeat his rationale here for pedagogical reasons in order to
83
Markovian Queueing Networks
illustrate the interplay of input and output flows in a Jackson network. For a Jackson network, the transition rates gnm into a network state m = (m1 , . . . , mM ) read ⎧ if n = m − ei ⎨ γi 1 · µ (n + ) q gnm = j j ji if n = m − ei + ej , ⎩ µi (ni + 1) · qi0 if n = m + ei
whereas the rates out of a network state m = (n1 . . . . , nM ) read ⎧ if n = m + ei ⎨ γi µi (ni ) · qij if n = m − ei + ej . gmn = ⎩ µi (ni ) · qi0 if n = m − ei
Due to ρi < si for all i, each network station in isolation with same arrival rates assumes equilibrium, satisfying the local balance equations pi (mi + 1) µi (mi + 1) = pi (mi ) λi for all mi ≥ 0, 1 ≤ i ≤ M . Consequently, an expression of the form (5.12) leads to5 pm−ei
=
k=i
pm−ei +ej
=
pk (mk ) pi (mi − 1) = pm
k=i,j
pm+ei
=
µi (mi ) , λi
pk (mk ) pi (mi − 1) pj (mj + 1) = pm
pk (nk ) pi (ni + 1) = pm
k=i
λj µi (mi ) , λi µj (mj + 1)
λi , µi (mi + 1)
and the probability flow into network state m is ⎧ ⎫ M M M M ⎨ ⎬ µi (mi ) µi (mi ) pn gnm = pm + λj qji + λi qi0 , ⎩ ⎭ λi λi M i=1
n∈N0
i=1 j=1
i=1
which, according to M j=1 λj qji = λi − γi (which follows from the traffic M equations) and j=1 qij = 1 − qi0 , reduces further to
n∈NM 0
5 Note
pn gnm = pm
M i=1
! µi (mi ) + γi .
that pi (ν) = 0 for ν < 0, and µi (ν) = 0 for ν ≤ 0, 1 ≤ i ≤ M .
(5.13)
84
AN INTRODUCTION TO QUEUEING THEORY
On the other side, by the same reasoning, the probability flow out of network state m can be rewritten as ⎧ ⎫ M M M M ⎨ ⎬ pm gmn = pm γi + µi (mi ) qij + µi (mi ) qi0 , ⎩ ⎭ M n∈N0
i=1
i=1 j=1
i=1
and this, as is easily seen, is the same as (5.13), proving theorem 5.12.
A closed network possessing all the properties 1  3 of a Jackson network (with the exception of property 4) is called a GordonNewell network, or GN network for short. As shown by W. J. Gordon and G. F. Newell in 1967 [40], such a network assumes equilibrium with stationary distribution M
1 pi (ni ) pn = C˜M (K) i=1
(5.14)
for n = (n1 , . . . , nM ), where again pi = (pi (ni ))ni ∈N0 is the stationary distribution of an isolated M/M /si queueing system with arrival rate λi and service # rate µi at each server, and where C˜M (K) = n∈E M i=1 pi (ni ) represents a normalization factor that guarantees n∈E pn = 1 (K the constant number of customers in the network).
This statement is usually called the Theorem of GordonNewell. Its proof is given by the same reasoning as for the theorem of Jackson by setting γi = 0 and qi0 = 0 for 1 ≤ i ≤ M . In both cases the participating network stations behave as if being completely independent, a result that is somewhat surprising, since — at least for a GordonNewell network — the dependency of station obvious: Given, that there are K customers in the network, specific events is we always have M i=1 ni = K. The reason behind is the M ⇒ M property that implies local balance. The state space E = E (M , K) of a GordonNewell network with M stations and K customers is given as the set of vectors $ M ni = K E (M , K) = n = (n1 , . . . , nM ) : ni ≥ 0 ∀ i, i=1
and has size
M +K −1 E(M , K) = . M −1
The latter is easily seen by induction: Obviously, E(M , 0) = E(1, K) = 1. Further, we have E(2, K) = K + 1, since, according to n1 + n2 = K, any state n = (n1 , n2 ) is already determined by only one of its entries ni ∈
85
Markovian Queueing Networks
+K−2 {0, 1, . . . , K}. Assume that E (M − 1, K) = MM . Adding another −2 node to the network that is appropriately connected with the former nodes, the new node may contain ν ∈ {0, 1, . . . , K} users when there are K − ν users at the remaining M − 1 nodes. Hence, K K M + (K − ν) − 2 M −2+ν E(M , K) = = M −2 M −2 ν=0 ν=0 K M −2+ν M −1 , = + M −1 M −2 ν=1
and the well known relation n n n+1 , + = k k+1 k+1 with k = M − 2 and n = M − 2 + ν , yields
K M −1+ν M −2+ν M −1 − E(M , K) = + M −1 M −1 M −1 ν=1 M −1+K = . M −1
2.1
The Performance of a Jackson Network
The performance measures of a Jackson network are easily obtained from those of isolated M/M /si stations. As has previously been shown, pi (0) =
pi (ni ) =
s −1 i ρk
ρ si i + i k! si !
⎧k=0 n ⎨ pi (0) ρi i ⎩ pi (0)
−1 ρi −1 , 1− si
ni ! ! ni ssi ρi i si si !
for 0 ≤ ni ≤ si for ni ≥ si
,
where ρi = λi /µi .6 So, for a Jackson network, any state probability is immediately obtained from (5.12), whereas for a GordonNewell network it is necessary to additionally compute the normalization constant. Notice, that the steady state probabilities depend only on the mean values x ¯i = 1/µi of the 6 In
some publications the quantity ρi is defined as ρi = λi /(si µi ) and termed utilization factor; this is the mean fraction of active servers (see [50]).
86
AN INTRODUCTION TO QUEUEING THEORY
service time distributions, and not on higher moments. This property is common to all product form networks, and is called the product form network insensitivity property. ¯i denote the mean number of customers in the Let, for an M/M /si station, N ¯ Q the mean waiting time in the queue, station, T¯i the mean sojourn time, W i ¯ Q the mean queue length, and S¯i the mean throughput through the station. N i Then, ρsi i +1 ¯i = ρi + pi (0) , N (si − 1)!(si − ρi )2 ρsi i 1 1 + pi (0) , T¯i = µi (si − 1)!(si − ρi )2 ρsi i ¯ Q = 1 pi (0) W , i µi (si − 1)!(si − ρi )2 ¯Q = N ¯ i − ρi , N i ¯ Si = λi , ¯ of customers is and the total average number N ¯ = N
M
¯i . N
i=1
Applying Little’s result (see theorem 1.9), the total mean sojourn time or network delay a customer experiences is obtained as 1 ¯ , T¯ = N γ ¯ where γ = M i=1 γi = S is the total mean throughput through the network. We denote by τi the mean time between a user’s arrival at node i and his final departure from the network. For this quantity we immediately realize the relation M ¯ qij τj , 1 ≤ i ≤ M. τ i = Ti + j=1
Let vi denote the mean number of visits a user makes at sation i. The total number of customers that enter the network per unit time is γ , and each of these customers visits node i in the average for vi times, so γ vi gives the average ratio of arrivals per unit time at station i, implying that γ vi = λi . The traffic equations (5.10), therefore, yield M
γi vi = + vj qij , γ j=1
1 ≤ i ≤ M.
(5.15)
87
Markovian Queueing Networks
For any Jackson network the system (5.15) always possesses a unique nonnegative solution due to lemma 5.11.
2.2
Computational Methods for GordonNewell Networks
The calculation of performance measures of a GordonNewell network is by far not as easy as in the case of Jackson networks. The main problem consists in computing the normalization constant C˜M (K) =
M
pi (ni ).
(5.16)
n∈E(M ,K) i=1
What is the reason? It is simply the fact that the huge number of terms occurring in (5.16) makes it very difficult, in general, to numerically evaluate the product form solution. Special algorithmic methods are in place here, and we shall demonstrate one below.
The Convolution Algorithm Consider the traffic equations of a GN network, λi =
M
1 ≤ i ≤ M.
λj qij ,
j=1
(5.17)
Obviously, the quantities λi are only determined up to some nonzero constant, and in order not to identify them with the ”true” arrival rates, it is convenient to replace the term λi by yi and just look at these yi as solutions of the above system (5.17). For technical reasons we set xi (ni ) :=
pi (ni ) , pi (0)
and
C˜M (K) CM (K) := #M . i=1 pi (0)
The product form equation (5.14) then takes the form M
pn =
1 xi (ni ), CM (K)
(5.18)
i=1
and according to the local balance equations pi (ni + 1) µi (ni + 1) = pi (ni ) λi as well as the convention λi = yi we have xi (0) = 1,
xi (k) = xi (k − 1)
yi for 1 ≤ k ≤ K. µi (k)
(5.19)
88
AN INTRODUCTION TO QUEUEING THEORY
Thus, given any solution y1 , . . . , yM of the system of traffic equations (5.17), we can compute all the xi (ni ) simply by iteration. Let us pause here for a moment in order to introduce the notion of discrete convolution of vectors of equal length (or even sequences with infinitely many components): Given a = (a1 , . . . , aN ) and b = (b1 , . . . , bN ), the convolution of a and b is defined as the vector c = (c1 , . . . , cN ) of same length that has the components ck =
k
ak−ℓ bℓ =
ℓ= 0
k
aℓ bk−ℓ ,
ℓ= 0
0≤k≤N
(N ≤ ∞). The common symbol for the convolution operation is the ”∗”, i.e. we write c = a ∗ b. It is obvious that (a ∗ b) ∗ c = a ∗ (b ∗ c) for arbitrary vectors a, b, c ∈ RN . For a convolution of some vector a ∈ RN with itself we write a∗n = a∗n−1 ∗ a for n ≥ 1,
where a∗0 is defined as a∗0 = (1, 0, . . . , 0), hence a∗0 ∗ b = b for all b ∈ RN .
We return now to the problem of computing the steady state probabilities (5.18). Although the xi (ni ) can easily be computed by iteration, the compu # tation of the normalization constant CM (K) = n∈EM (K) M i=1 xi (ni ) still turns out to be rather difficult if M and K attain large values. In this situation J. Buzen [24] observed that (5.16) is nothing else than the K th component of the discrete convolution of the vectors xi = (xi (0), xi (1), . . . , xi (K)).
Precisely, we have CM (K) =
M
n∈E(M ,K) i=1
!
xi (ni ) = (x1 ∗ . . . ∗ xM )(K).
(5.20)
Formally, expression (5.20) is characterized by the two parameters M and K, and so it is suggesting itself that we define, for 1 ≤ m ≤ M , 1 ≤ k ≤ K , the components Cm (k) of the convolution vector Cm = x1 ∗ . . . ∗ xm by Cm (k) =
m
n∈E(m,k) i=1
xi (ni ) = (x1 ∗ . . . ∗ xm )(k),
& % m where E(m, k) = n = (n1 , . . . , nm ) : ni ≥ 0, n = k . Similarly, i=1 i
the constant CM (K) can be written as the K th component of the convolution of CM −1 and xM : CM (K) = (CM −1 ∗ xM )(K).
89
Markovian Queueing Networks
In general terms, we arrive at Cm (k) = (Cm−1 ∗ xm )(k),
1 ≤ m ≤ M , 1 ≤ k ≤ K.
(5.21)
This, in fact, is the basis of Buzen’s convolution algorithm. It can roughly be described as follows. 1 Set C0 (0) = 1, and C0 (ℓ) = 0 for 1 ≤ ℓ ≤ K. 2 For all m, 1 ≤ m ≤ M , set xm (0) = 1. 3 Compute successively, for any m ∈ {1, . . . , M }and k = # 0, . . . , K , the m values xm (k) = xm−1 ym /µm (k) and Cm (k) = n∈Em (k) i=1 xi (ni ).
Performance Measures The computation of all the (normalization) constants Cm (k) opens the way for an easy and direct evaluation of station specific performance measures. Note that, by adequate renumbering, we always can achieve that an arbitrary station has index M . Let pM (n; K) denote the marginal steady state probability to find n users at station M . Then, according to the product form (5.18), p(n1 ,n2 ,...,nM −1 ,n) pM (n; K) = n∈E(M −1,K−n)
=
n∈E(M −1,K−n)
=
#M −1 i=1
xi (ni ) xM (n) CM (K)
CM −1 (K − n) · xM (n). CM (K)
(5.22)
¯M (K) of customers in station M is now immediately The mean number N 7 obtained as K ¯M (K) = N pM (n; K) · n. n=0
Hence, K
¯M (K) = N
1 CM −1 (K − n) xM (n) · n. CM (K)
(5.23)
n=0
7 We
intentionally indicate here and in the following in each term the total number of customers present in the network.
90
AN INTRODUCTION TO QUEUEING THEORY
It may be worthwile to note that this expression again takes the form of a convolution: Set zM = (0, xM (1), 2xM (2), . . . , K xM (K)); then ¯M (K) = (CM −1 ∗ zM )(K) . N CM (K) In equilibrium, the mean throughput rate S¯M (K) through station M in a GN network with K customers equals the mean arrival rate λM (K) (as well as the mean departure rate δM (K)). It is given as S¯M (K) =
K
pM (n; K) µm (n).
n=1
From this expression, by inserting (5.21) and exploiting (5.19), we obtain CM (K − 1) · yM . S¯M (K) = CM (K)
(5.24)
We proceed to calculate the mean time T¯M (K) a user spends in a station i (mean system time, or mean sojourn time). According to Little’s result we ¯M (K) = N¯¯M (K) , and so the above results yield have T¯M (K) = λ1M N S (K) M
T¯M (K) =
K
− n) xM (n) n . CM (K − 1) yM
n=1 CM −1 (K
(5.25)
¯ Q (K, si ) of customers waiting in the queue at some staThe mean number N i tion i that has si exponential servers is given as K ni =si pi (ni ; K) (ni − si ). Thus, by (5.21), K C (K − n) xM (n) (n − sM ) Q ¯ (K, si ) = n=sM M −1 . (5.26) N M CM (K)
The Principle of Mean Value Analysis In case that each network station either is a single server station or an infinite server station, an even easier way can be pursued, avoiding the explicit computation of the values (5.21). In fact, it is possible to obtain all mean values by some simple iteration process. For stations with more than 1 and less than K servers, but, one still has to rely on (5.21) and related expressions. The approach in question, in its general form, is called mean value analysis (MVA) and has been suggested by Reiser and Lavenberg in 1980 [73].
91
Markovian Queueing Networks
For a GN network the mean visiting numbers satisfy the equations vi =
M
vj qji ,
j=1
1 ≤ i ≤ M.
(5.27)
These equations, clearly, do not possess a unique solution, as has been the case for an open network. So, neither we can determine the exact values for the visiting numbers vi and the mean arrival rates λi , nor we can compute other mean values by imitating the previous approach. In order to achieve yet similar results, we proceed by turning a closed network into an open one without changing any of the performance criteria. The idea is the following: Add another fictitious node 0 to the network graph between two nodes i0 and j0 that are connected by an edge (possibly i0 = j0 ), where i0 , j0 ∈ {1, . . . , M } (see figure 5.2).
qi0 j
6 h
i0 ? ht 6
j
qjj0
j0 ? ht6
0 qi0 0 q0j0 
virtual node Figure 5.2.
Modified Network
Any customer, who is routed to node j0 after service completion at node i0 is now assumed to depart from the network, and to be immediately replaced by another new customer who enters the network at node j0 . This way, the number K of customers in the network is preserved all the time, and all network parameters remain exactly the same. The construction allows to speak of performance items like network delay T (i.e. the total time a customer spends In particular, we shall in the network), or throughput S through the network. M ¯ 8 ¯ = be able to calculate the mean values T¯, S¯ and N i=1 Ni , and to determine the mean number vi of visits that a customer makes at station i for i ∈ {1, . . . , M }. 8 These
values depend on the number K of customers in the network, and we shall indicate this dependency in the following.
92
AN INTRODUCTION TO QUEUEING THEORY
First observe that any ”newly arriving” customer from ”outside the network” (i.e. from node 0) visits node i0 exactly k times with probability given by qi0 j0 (1 − qi0 j0 )k−1 , implying that the mean number vi0 of visits at node i0 for any customer in this open network attains the value vi0 =
∞
k=1
k qi0 j0 (1 − qi0 j0 )k−1 =
1 qi0 j0
.
This determines all other visiting numbers vi according to equation (5.27): vi =
M
vj qji +
j =1 j= i0
qi0 i . qi0 j0
Equations (5.17) and (5.27) show that the vectors λ = (λ1 , . . . , λM ) and v = (v1 , . . . , vM ) are proportional, λ = γ v. The λi (and so the constant γ ) depend on the number K, whereas the vi are functions of the routing probabilities only. Since in equilibrium the average departure rate from node i0 equals its average arrival rate λi0 , the expression λi0 qi0 j0 = λi0 /vi0 represents the mean transfer rate from node i0 to node j0 in the original GN network. Consequently, in our artificial open network, the constant γ is nothing else than the total average input rate from outside (or throughput rate S¯ through) the network: ¯ λi0 qi0 j0 = λi0 /vi0 = γ = S(K).
The visit numbers λi /γ = vi are sometimes referred to as relative throughput rates. Let again, for any station i ∈ {1, . . . , M } in a network with K customers, ¯i (K, si ) the mean number of customers in i, and by T¯i (K, si ) the denote by N mean sojourn time in station i if there are si servers at that station. We obtain the following relations: ¯i (K, si ) = λi T¯i (si ) N K =
M
(Little’s rule),
¯i (K, si ) = S(K) ¯ N
i=1
T¯(K) =
M i=1
M
vi T¯i (K, si ),
i=1
vi T¯i (K, si ) =
M i=1
λi ¯ Ti (K, si ). ¯ S(K)
¯ The last equation confirms K = S(K) T¯(K) (Little’s rule). Notice, that the mean system times T¯i (K, si ) cannot be calculated as sojourn times of isolated independent M/M /si stations as in case of a Jackson network, since the numbers Ni (K, si ) are now dependent upon each other due to the second of the
Markovian Queueing Networks
93
above equations. Accordingly, we have to find another way to compute the T¯i (K, si ) in order to solve the equations for all other unknowns.
Let us call a customer, who has completed service at some station j and is about to enter station i (but not yet there), to be a customer in transit to i. Assume that such a customer ”sees” Ai (K, si ) customers in total, and AQ i (K, si ) customers waiting in the queue at station i immediately before his entrance ¯ there. Clearly, Ai (K, si ) and AQ i (K, si ) are random numbers. Let Ai (K, si ) Q and A¯i (K, si ) denote their respective expectations. With A¯i (K, si ) the mean system times T¯i (K, si ) for the cases si = 1 and si ≥ K are given as 1 1 ¯ µi + µi Ai (K, si ) if si = 1 T¯i (K, si ) = (5.28) 1 if si ≥ K µi (remember, that service times are exponentially distributed, and that 1/µi is the mean of the service time at station i). We shall show later that the corresponding value for the case 1 < si < K reads (! 1 1 ' ¯Q T¯i (K, si ) = 1+ Ai (K, si ) + bi (K − 1) , 1 < si < K, µi si
where bi (K − 1) is the probability for the event that, in a closed network of same type with K − 1 customers, all of the si servers at station i are occupied. The task here is to compute the mean values A¯Q i (K, si ) as well as the probabilities bi (K − 1) for i ∈ {1, . . . , M }. In order to determine the A¯i (K, si ) in (5.28) we mention an important general feature of product form networks that is called the arrival property in case of open networks, and the random observer property in case of closed ones.9 Here we confine ourself to the case of a single class GN network, but it should be clear from the proof below that this property also holds for multiclass (open or closed) PF networks. Theorem 5.13 (Random Observer Property) Let ai (n−ei ) denote the probability for the event that a customer in transit to i ”sees” the state disposition n − ei = (n1 , . . . , ni − 1, . . . , nM ) immediately before his arrival at station i. If N describes a closed GN network with, say, K customers, then this probability ai (n − ei ) is the same as the steady state probability for state n − ei for a network of same type with one customer less. 9 For
a single queueing station this is comparable with the PASTA property (Poisson arrivals see time averages).
94
AN INTRODUCTION TO QUEUEING THEORY
Proof: We denote by ηi (n) the mean number of customers in transit to i per unit time who ”see” the state disposition n. Obviously, we have ηi (n − ei ) =
M
pn−ei +ej gn−ei +ej n .
(5.29)
j=1
The probability ai (n − ei ) can be expressed as the relative portion of the rate ηi (n − ei ) compared with the sum over all rates ηi (m): ai (n − ei ) =
ηi (n − ei ) . m∈E(M ,K) ηi (m)
Observing gn−ei +ej n = µj (nj + 1)qqji , as well as the local balance equations pj (nj + 1) µj (nj + 1) = pj (nj ) λj ,
and exploiting the product form (5.14), we obtain from (5.29), that ηi (n − ei ) = pn−ei
M
λj qji = pn−ei λi ,
j=1
and likewise ηi (m) = pm λi for any m ∈ E(M , K), i ∈ {1, . . . , M }. This proves an−ei = pn−ei .
The random observer property enables us to determine the values A¯i (K, si ) and A¯Q i (K, si ) as ¯i (K − 1, si ), A¯i (K, si ) = N
¯Q A¯Q i (K, si ) = Ni (K − 1, si )
for i ∈ {1, . . . , M }, where we indicate by si the number of servers, and by K or K − 1 the number of customers in the network. According to these results the station specific mean system times in a GN network with K customers are given by10 ⎧ 1 1 ¯ if si = 1 i (K − 1, si ) ⎪ µ i + µi N ⎨ 1 if si ≥ K T¯i (K, si ) = . µi ' (! ⎪ ⎩ 1 1+ 1 N ¯ Q (K − 1, si ) + bi (K − 1) if 1 < si < K µi
si
i
(5.30)
10 The
third line expression for 1 < si < K will be derived later.
Markovian Queueing Networks
95
For a network that is built up by only single server or infinite server stations we arrive at a system of recursion equations for the unknowns T¯i (K, si ), ¯i (K, si ), and S(K) ¯ , viz. N 1 1 ¯ µi + µi Ni (K − 1, si ) if si = 1 T¯i (K, si ) = , 1 if si ≥ K µi K , ¯ i=1 vi Ti (K, si ) ¯i (K, si ) = vi S(K) ¯ N T¯i (K, si ). ¯ = S(K)
M
(5.31)
In essence these expressions explain what is usually meant with ”mean value analysis” for GordonNewell networks: It is a simple iteration process that ¯i (0, si ) = 0 and T¯i (1, si ) = 1/µi and requires to compute successtarts with N ¯ ¯i (K, si ) according to sively, for 1 ≤ k ≤ K, the values T¯i (k , si ), S(K) , and N (5.31). The computational overhead is fairly small, and can even be further reduced if ¯i (K − 1, si ) approximate results are tolerated. The quantities A¯i (K, si ) = N may roughly be estimated as K −1 ¯ Ni (K, si ), A¯i (K, si ) ≈ K
a relation that is exact for K = 1, and tends, for increasing K , asymptotically to an exact equation. It even provides, in many practical cases, good results for intermediate values of K. Inserted in (5.31) we obtain vi (K−1)T¯i (K,si ) 1 M if si = 1 ¯ µi 1 + ¯ . Ti (K, si ) = ℓ=1 vℓ Tℓ (K,sℓ ) 1 if si ≥ K µi So we see that, if one accepts approximate results, the overhead for the computation of the Ti (K, si ) can drastically be reduced, and limited to the solution of some fixedpoint equations. It may also be the case that the total mean throughput rate S¯ = γ is given in a concrete situation, meaning that we can measure somehow the average transfer rate between two connected network nodes i0 and j0 . Then the relative throughput rates λi /vi = γ and, consequently, the exact arrival rates λi are obtained immediately, providing the T¯i (K, si ) from direct recursion: λi ¯ 1 µi + µi Ti (K − 1, si ) if si = 1 . T¯i (K, si ) = 1 if si ≥ K µi We refer the reader to the literature for more detailed descriptions of the principles of mean value analysis. A practice oriented treatment, for instance, is
96
AN INTRODUCTION TO QUEUEING THEORY
given in the book of Bolch et al. [15], where several examples and algorithms are presented.
Example (Central Server Systems). A closed network in which all customers are routed through some particular station before they can visit other network nodes is called a central server system. Examples for real configurations that may be modelled this way are computer multiprogramming systems (with a fixed degree of multiprogramming), multiprocessor systems connected with external memory modules, or a combination of independently working machines together with one single repair unit that is visited whenever one of the machines fails. The latter configuration is representative for many related ones and is known as the machinerepairman model (already encountered in section 6). Common to all is the possibility to model the system as a closed queueing network of the above mentioned type. Consider, for instance, a multiprocessor system in which each processor or CPU is connected with a bank of memory modules. As soon as a processor needs some data (e.g. instructions) from a memory module it sends a request to the bank and stops working until the request is satisfied. The memory modules have buffers into which requests are arranged according to the firstcome firstserved (FCFS) order. A request is ”served” by sending back the data to the requesting processor. Such a system can be modelled as a closed network in which the multiprocessor system represents one single infinite server (IS) station, and the, say, M − 1 memory modules are single server queueing stations (see figure 5.3). B B \ \B ? . 6 B .. B B
6

% .. % % . e Ae A A 
IS station M
Figure 5.3.
j1
A j2 A eA eA % j % j M −1

?
Central Server Model
The number K of processors usually is much higher (e.g. 28 = 256) than the number of memory modules. Since a processor is assumed to wait (remains in idle state) when a request to the memory bank has been sent, these requests are to be interpreted as the ”users” of the single server stations numbered 1, . . . , M − 1, whereas intermediately executed job partitions represent
97
Markovian Queueing Networks
the ”users” in the central IS station. In many cases it is well justified to assume the time to satisfy a request being exponentially distributed. We shall see below that — with respect to an expected product form solution — there is no reason to restrict possible choices of service time distributions at the central IS server to negative exponential distributions (section 3). Nevertheless, in order to give a simple formulation, we confine ourselves to the case of an IS station with identical exponential servers with rate µM . As a consequence, the multiprocessor system can be modelled as a closed PF (GordonNewell) network. After partially executing a job a processor may execute another partition or send a request to the memory bank. In practice, the memory bank is needed only for, say, κ times in the average. Let κ be identical for all processors. We summarize the assumptions as follows: Service times at the memory modules i = 1, . . . , M − 1 are exponentially distributed with parameters µi .
Processor execution times are exponentially distributed with mean 1/µM . Each processor references memory module i in the long run with probabil−1 ity qM i , where M i=1 qM i = 1 (central server condition).
After κ execution times a job is finished, and starts anew (as another job) immediately after at the same processor.
Turning the closed network into an open one by applying a similar construction as mentioned in this section, the interpretation of restarts after job finishing finds its adequate portrayal in the model. Let a virtual node (the ”network exterior”) be inserted between the routing edge from M to M , such that the mean number of visits to node M attains the value vM = 1/qM M = κ (figure 5.4). Then the routing probabilities satisfy the relations qM 0 +
M −1
qM i = 1,
i=1
qiM qij
q M 0 = q M 0 = qM M
= 1 for all i ∈ {1, . . . , M − 1}, = 0 for all i, j ∈ {1, . . . , M − 1} 1 1 = = . vm κ
What are the performance measures to be computed? It is likely that one is interested, in the first line, in the mean time T¯ that is required to completely
98
AN INTRODUCTION TO QUEUEING THEORY 6
q0M

qM 0 B % B .. \ % \B tt?  % . . e 6 B .. Ae B B A A
A j2 A eA eA % j % j

M −1
IS station M
Figure 5.4.
j1
?
Modified Central Server Model
execute a job, the average delay T¯i at memory module i per request, the total mean throughput S¯ of jobs through the multiprocessor system, and the average ¯i of requests waiting or being treated at some memory module i. number N
These quantities are easily obtained according to the mean value analysis principle: Exploiting equations (5.30), merely the corresponding iteration process ¯i (0, si ) = 0 as the starting value. has to be performed, using N
The General Case 1 < si < K We close this section by turning back to the general case of GN networks that contain multiple server stations with si < K. Relying on the results from convolution analysis, we can express the quantity T¯(K; si ) for a customer’s mean sojourn time at some station i ∈ {1, . . . , M } as a function of the quantities ¯ Q (K −1, si ) and bi (K − 1) as follows. Let a renumbering be performed such N i that our station under consideration has index M . According to xM (0) = 1 and xM (n)/yM = xM (n − 1)/µM (n), the expression (5.25) can be rewritten as T¯M (K) = =
K CM −1 (K − 1 − [n − 1]) xM (n − 1) n
n=1 sM n=1
CM (K − 1) µM (n)
CM −1 (K − 1 − [n − 1]) xM (n − 1) n CM (K − 1) n µM +
K
n=sM +1
CM −1 (K − 1 − [n − 1]) xM (n − 1) n CM (K − 1) sM µM
99
Markovian Queueing Networks
=
K−1
n=0
CM −1 (K − 1 − n) xM (n) CM (K − 1) µM +
1 sM µM
K
n=sM +1
CM −1 (K − 1 − n) xM (n − 1) (n − sM ) . CM (K − 1)
Exploiting K−1 n=0 CM −1 (K − 1 − n)xM (n) = (CM −1 ∗ xM )(K − 1) = CM (K − 1) in the first term, and setting n − sM = (n − 1) − sM + 1 in the second one, we obtain from (5.21) and (5.26) K−1 1 1 CM −1 (K − 1 − n) xM (n) + (n − sM ) T¯M (K) = µM µM sM n=s CM (K − 1) M K−1 CM −1 (K − 1 − n) xM (n) + CM (K − 1) n=sM K−1 1 1 ¯ Q (K − 1, sM ) + = + N pM (n; K − 1) . M µM µM sM n=s M
K−1
The sum n=sM pM (n; K − 1) represents the probability for the event that, in a network with K − 1 customers, at least as many customers are present at station M as there are servers, which is nothing else than the probability bM (K − 1) for the event that all servers sM are occupied. Hence, replacing the index M by an arbitrary station index i ∈ {1, . . . , M }, we have (! 1 1 ' ¯Q (5.32) T¯i (K) = 1+ Ni (K − 1, si ) + bi (K − 1) . µi si The remaining mean values are given by equations (5.23), (5.24), and (5.26). In principle, all performance measures of a GordonNewell network with K customers can be calculated from the corresponding expressions for a network with one customer less, as is obvious from equations (5.30) and (5.32).
3.
Symmetric Service Disciplines
Consider a queueing network with several chains and R customer classes, and remember that the pair (r, c) of class and chain identifiers defines the category (i) of a customer. Let µj rc (ni ) denote the mean service rate for a category (r, c) customer at position j in station i, when the latter is in state ni , and denote by (i) πjrc (ni ) the probability for the event that a category (r, c) customer in transit to i is going to enter this very position j when immediately before his entrance
100
AN INTRODUCTION TO QUEUEING THEORY
the state is ni . Further, let µ(i) (ni ) be the total mean service rate at station i in that state. Then (i) µj rc (ni ) (i) =: ϕj rc (ni ) µ(i) (ni ) represents the fraction of the service rate that category (r, c) customers in position j produce at station i in state ni . Definition 5.14 The service discipline at a station i is called a symmetric service discipline, and the station is said to be in station balance, if (i)
(i)
ϕj rc (ni + erc ) = πjrc (ni ),
(5.33)
(i)
that is, if the service rate µj rc (ni + erc ) is proportional to the probability (i)
πjrc (ni ).11
The main difference between station balance and local balance lies in the fact that station balance, in comparing rates, links together the position of a customer who completes service and the position that an arriving customer is about to occupy, whereas local balance just relates arrival and departure rates for customers of same type. Two conclusions are immediately to be drawn from this fact: Station balance implies local balance, but not vice versa. A nonexponential service discipline can only be symmetric if any arriving customer receives service immediately, i.e. as soon as he enters the system. We now give some examples for symmetric disciplines. Thereby, in order to illustrate the relationships between the arrangement probability upon arrival and the fraction of service rate at some position, we confine ourselves to the (i) case that only one class and only one chain exists, such that ϕj rc (ni + erc ) =: (i)
ϕj (ni + 1), and the condition for symmetry reads (i)
(i)
ϕj (ni + 1) = πj (ni ).
The reader should realize that this simplification is unimportant for the examples given below, and that symmetry also holds in these cases when there are several chains and several classes. 11 Again,
the vector erc is defined as to contain a 1 at the entry of ni that belongs to the category (r, c), and zeros anywhere else.
101
Markovian Queueing Networks
1. Processor sharing (PS) discipline. This is the limiting case for τ → 0 of a Round Robin discipline that provides service to each customer in form of time slices of duration τ . Positions in the queue remain undefined and can be assumed to be equal. For the fraction of service in state ni + 1 (i.e. when there are ni + 1 customers in station i) we have, for any j ∈ {1, . . . , ni + 1}, (i)
ϕj (ni + 1) =
1 . ni + 1
If the state is ni immediately before an arrival, then the newly arriving customer can be arranged in any of ni + 1 positions with same probability. So, (i) (i) πj (ni ) = ni1+1 = ϕj (ni + 1), and the discipline proves to be symmetric. 2. Infinite servers (IS) discipline. As in case of processor sharing the posi(i) tion of a customer doesn’t play any role. The fraction ϕj (ni + 1) of the service rate that an (ni + 1)th customer receives is always the (ni + 1)th (i) part of the total service rate in this state, viz. ϕj (ni + 1) = 1/(ni + 1). The position where to be inserted is not important for an arriving customer, and may be seen to be equal for each position among, or in front of, or behind, (i) the ni existing customers in the station. Thus, the probability πj (ni ) is (i)
(i)
the same for all j, and πj (ni ) = 1/(ni + 1) = ϕj (ni + 1), showing the symmetry also in this case. 3. Lastcome firstserved preemptiveresume (LCFSPR) discipline. In this discipline any newly arriving customer ousts the one in service from his place. Let the position of the customer in service be 1. Then the fraction (i) ϕ1 (ni + 1) of service that the arriving customer receives, is one since all (i) other customers are not served during state ni + 1, i.e. ϕ1 (ni + 1) = 1. (i) On the other side, the probability π1 (ni ) for the event that an arriving customer is arranged in position 1 at station i (when station i was in state ni im(i) (i) mediately before his arrival) is one, too. Therefore, ϕ1 (ni + 1) = π1 (ni ).
A special role plays the firstcome firstserved (FCFS) discipline. As is easily seen, this discipline is not symmetric, since an arriving customer is always added to the queue at its end whereas service is provided only to the customer at its front (first) position. If customers deserve service from different service time distributions then (5.33) cannot be satisfied for all. There is, but, one exception: If service times are chosen from the same exponential distribution for all customers, then positions and customers are indistinguishable, and the actual service completion rate at any time, also at an arrival instant,
102
AN INTRODUCTION TO QUEUEING THEORY
remains the same due to the memoryless property of the exponential distribution. That means that the rate / fraction equation (5.33) holds. Consequently, an FCFS station providing exponential service with the same intensity to all its customers attains station balance. A network station that provides service according to one of the above disciplines is called a PS station, IS station, LCFSPR station, or FCFS exponential station, respectively. We are now in the position to conclude, that a multiple chain/multiple class queueing network that is fed by Poisson arrival streams (if open or mixed), and is built up by stations of types PS, LCFSPR, IS, or FCFS exponential, attains station balance and, consequently, local balance and product form.
This result has first been proven by Baskett, Chandy, Muntz, and Palacios in 1977 [8], and is well known as the BCMP theorem. The authors introduced a numbering for the four types of service disciplines that has been adopted by most experts in the field. It runs as follows: Type 1 service: The service discipline is FCFS, and all customers have the same negativeexponential service time distribution. The service rate may depend on the number of customers at the station (this is the case when there are more than one servers available). Type 2 service: The service discipline is PS, there is a single server at the station, and each class of customer may have a distinct service time distribution. The service time distributions have rational Laplace transform. Type 3 service: The number of servers at the station is greater than or equal to the maximum number of customers that may visit this station (IS discipline). Each class of customer may have a distinct service time distribution. The service time distributions have rational Laplace transform. Type 4 service: There is a single server at the station, the service discipline is LCFSPR, and each class of customer may have a distinct service time distribution. The service time distributions have rational Laplace transform. The BCMP theorem explicitly describes the factors of the product form for closed, open or mixed networks (with Poisson arrival streams). In order to present these results adequately we have to explain some details. First, two types of arrival process are distinguished: A single Poisson arrival stream whose intensity γ may be a function of the state dependent total number K(n) of customers in the network, or several chain specific Poisson streams with intensities γc that in turn depend on the numbers Kc (n) of customers in the
103
Markovian Queueing Networks
respective chains (1 ≤ c ≤ V , V the total number of chains). Second, the state descriptions are type specific as follows:
1 For type 1 service stations (exponential service, undistinguishable customers) the queue specific states are represented by the vectors ni = (ri1 , . . . , rini ),
where ni is the total number of customers present at station i, and rij is the class of the customer at position j in the queue. Positions are counted beginning from the ”server position” 1 up to the end of the queue ni . The need for discriminating between classes will become clear below when we specify fi (ni ). rini . . . ri3 ri2
FCFS Order
Figure 5.5.
2 For types 2 and 3 the service time distributions have rational Laplace transform, so they belong to the family of Coxdistributions. A Cox distribution is characterized by a sequence of exponential stages that are visited by the customer in service in compliance with routing probabilities αirℓ . These probabilities (or their complementary values 1 − αirℓ ) steer the customer to the next stage or to exit from service (see figure 5.4). Here r is the class index of the customer in service, and i the station index.
αir1 = 1
αir2
αir3
αiruir
 2 . . .T T T T T T T T T T 1 − αir2 1 − αir3
Figure 5.6.

1 − αiruir
Cox Distribution
The state vector ni of station i takes the form ni = (si1 , . . . , siR ), where each sir = (sir1 , . . . , siruir ) is a vector of labels sirℓ , and ) number of class r customers (if any) at sirℓ = station i, who are in stage ℓ of service.
104
AN INTRODUCTION TO QUEUEING THEORY
sirℓ is set to zero if there are no class r customers in station i. uir is the number of exponential stages for a class r service time distribution at i (1 ≤ r ≤ R).
3 Type 4 centers are characterized by the LCFSPR scheduling discipline, offering service according to Cox distributed service times. Whereas in case of PS or IS disciplines (types 2 and 3) the customer position has no significance, here it is very important. The socalled LCFS order has the opposite direction of FCFS order (see figure 5.5). The state vector ni reflects the classes as well as the stages of service of all the customers at their respective positions, ! ni = (r1 , ℓ1 ), (r2 , ℓ2 ), . . . , (rni , ℓni ) . ni is the total number of customers in station i in that state, rj is the class, and ℓj the stage of service of the customer in position j . Position ni is that of the customer who arrived last and who is actually in service. ri1 ri2 . . . rini −1
Figure 5.7. LCFS Order
If there exist open chains in the network, then one may count the customer visits to the stations. The mean visit number to station i of a class r customer who belongs to chain c is defined as the ratio virc =
λirc , γc (K Kc (n))
where λirc is the mean arrival rate of category (r, c) customers at station i, Kc (n)) is the total chain c arrival rate from outside the network, that and γc (K may be dependent upon the number Kc (n) of class c customers in the network during state n. Let Mc be the subset of stations visited by chain c, and Rc the subset of classes occurring in chain c, and set Ec = Mc × Rc . Then the λirc satisfy the traffic equations λirc = γc (K Kc (n)) q0;irc + λj sc qjsc;irc . (j,s)∈Ec
Consequently, the mean visit numbers virc (also called the relative throughputs) satisfy the equations vj sc qjsc;irc . (5.34) virc = q0;irc + (j,s)∈Ec
105
Markovian Queueing Networks
We are now in the position to formulate the result of Baskett, Chandy, Muntz, and Palacios. Let R be the total number of customer classes, V the total number of chains, and Airℓ the product of steering probabilities in a Cox distribution (compare figure 5.6), i.e., for 1 ≤ i ≤ M , 1 ≤ r ≤ R, and 1 ≤ ℓ ≤ uir , Airℓ =
ℓ
αirν .
ν=1
Theorem 5.15 (BCMP theorem) Let an open, closed, or mixed queueing network with V chains and R customer classes contain service stations of types 1, 2, 3, or 4, only. Assume, that in case of an open or mixed network the external arrival streams are Poisson of type 1 or 2, respectively. Then, the network attains equilibrium with a product form steady state distribution M
d(n) fi (ni ), pn = C
(5.35)
i=1
where the fi (ni ) are service type dependent state functions, and the value d(n) is defined by
d(n) =
⎧ 1 ⎪ ⎪ ⎪ ⎪ ⎪ # ⎪ ⎨ K(n)−1 ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩
for a closed network (only 1 chain, no external arrival process) γ(k) for an open network (only 1 chain, k=0 . external arrival process of first type) #V #Kc (n)−1 γc (k) for a mixed network (several chains, c=1 k=0 external arrival processes of second type)
The state functions fi (ni ) are given by the following expressions.
Type 1 (FCFS exponential): fi (ni ) =
ni virij . µi (j)
j=1
Type 2 (PS, Cox distribution): fi (ni ) = ni !
uir R vir Airℓ sirℓ
r =1 ℓ=1
µirℓ
1 sirℓ !
.
106
AN INTRODUCTION TO QUEUEING THEORY
Type 3 (IS, Cox distribution): fi (ni ) =
uir R vir Airℓ sirℓ
r =1 ℓ=1
µirℓ
1 sirℓ !
.
Type 4 (LCFSPR Cox distribution): fi (ni ) =
ni virij Airij ℓj . µirij ℓj
j=1
Essentially, the BCMP theorem is a consequence from the fact that station balance implies local balance and product form. The detailed elaboration of the above mentioned concrete expressions for the factors in (5.35) can be performed by applying the symmetry relations (5.33) and the resulting local balance equations to the product of state probabilities of isolated stations, just as in case of Jackson or GordonNewell networks. This line of reasoning has been pursued by Baskett, Chandy, Muntz, and Palacios. We do not repeat this here, rather we refer to their original work in [8].
Notes There is a multitude of additional results on queueing networks, including various algorithms for the exact and approximate treatment of product form (PF) networks, refined approximation methods for nonPF networks, generalizations to networks with blocking, approximation techniques for networks with priority handling, and even maximum entropy methods. To cover all these results would go far beyond of the scope of this introductory book. The elements of queueing network theory can already be found in Kleinrock’s fundamental book on queueing systems (Volume I: Theory) [50], and in an early overview on exact and approximate methods for the evaluation of steady state probabilities of Markovian networks (including Jackson, GordonNewell, and BCMP networks) by Gelenbe and Pujolle in 1987 [36]. Also in 1987 appeared the excellent little introduction to performance analysis methods for computer communication systems by I. Mitrani [60]. The beginner is well advised to read this book first. It presents a neatly formulated and easy to understand explanation of the basic ideas behind various fundamental approaches. A standard work on reversibility properties and their relationships to balance behaviour is that of Kelly of the year 1979 [48]. The various techniques developed there are employed also by Nelson in his recommended treatise on probability, stochastic processes, and queueing theory [61]. We further refer to the more application oriented books of Van Dijk [30], who addresses the
Markovian Queueing Networks
107
physical background of flow balance properties, and Harrison and Patel [41] who — with respect to queueing networks — describe several applications to computer networks and computer architectures. A more recently published comprehensive treatment of queueing networks and Markov chains is that of Bolch et alii [15]. This book covers all main aspects of modern queueing network analysis, and presents up to date algorithmic methods. The reader may also find an exhaustive list of references in [15]. Finally, we refer to the excellent investigation of queueing networks with discrete time scale that has been presented in 2001 by Daduna [29]. Due to the discrete structure of most of todays communication systems this approach should attain particular attention in the future.
Exercise 5.1 Show that a stationary Markov process whose undirected state transition diagram forms a tree is reversible. Hint: Use the fact that the probability flux in one direction across a cut of the graph equals the flux in opposite direction. Exercise 5.2 Show that any stationary birthdeath process is quasireversible, and conclude from this fact the Theorem of Burke for M /M /s queues: The departure process of an M/M /s queue is Poisson with same rate as the arrival process. Exercise 5.3 Prove that a quasireversible process need not be reversible. Hint: Consider an M/M /1 queue with mean arrival rate λ, whose state 1 is separated in two different states 1′ and 1′′ , such that 1′ is reached from state 0 with rate λ · p, and state 1′′ is reached from state 0 with rate λ · (1 − p) for 0 < p < 1, the departure rates remaining unchanged. Exercise 5.4 A data transmission unit works as follows. Data packages arrive at the unit according to a Poisson process with intensity λ. For each data package there is an exponential time (with parameter µ) from the beginning of transmission to the receipt of an acknowledgement. Arriving packages which find the transmission unit busy wait in a queue and are served in FCFS order. The buffer for the queue is so large that it may be assumed to be infinite. With probability p, a data package incurs a transmission error and needs to be retransmitted. The stream of data packages to retransmitted is added to the regular arrival stream. a) Derive a model for this kind of data transmission in terms of a Jackson network. b) Show that the combined stream of regularly arriving packages and the packages to be retransmitted is not a Poisson process. c) Determine the mean time needed for a successful transmission of a data package in the stationary regime.
108
AN INTRODUCTION TO QUEUEING THEORY
Exercise 5.5 A server in a computer pool is modelled as a queueing network with two stations. The first of these represents the CPU, the second one all output devices. Service times in both stations are distributed exponentially, with parameters µ1 and µ2 . Jobs arrive from the pool as a Poisson process with intensity λ. After service in the CPU, a job is done with probability p. With probability 1 − p it needs additional service by one of the output devices.
λ
CPU
Figure 5.8.
p
output
Simple model of a computer pool
Determine the mean sojourn time of a job in the server under the stationary regime. Networks consisting of some stations in series are called tandem queues. However, in general tandem queues the service times do not need to be exponential. Exercise 5.6 For a cyclic closed network with M stations, the routing matrix Q is given by ⎧ ⎪ ⎨1, j = i + 1, 1 ≤ i < M Q(i, j) := 1, j = 1, i = M ⎪ ⎩ 0, else Assume that there are K users in the network. Show that the stationary distribution is given by 1 µK−n 1 1 · #M p(n) = ni G(K) i=2 µi
with µi denoting the service rate at station i.
Exercise 5.7 An internet based company seeks to ensure constant online access, because it cannot operate without. To this aim, two servers instead of one are employed concurrently. Each of them has a failure rate λ > 0, meaning that their up time is exponentially distributed with parameter λ. After failure, a server is repaired with probability p. The repair time is distributed exponentially with parameter µ1 > 0. With probability 1 − p, the server must be replaced by a new one, which requires an installation time that is distributed exponentially with parameter µ2 > 0. After the server is repaired, there is still a probability q that it must be replaced by a new one, requiring additionally the same installation time.
Markovian Queueing Networks
109
Derive a model for this situation in terms of a Gordon–Newell network. For the values λ = 2, µ1 = 1, µ2 = 3, p = 3/4, and q = 1/3, determine the stationary probability that both servers are down and the company cannot operate. Compare this to the stationary probability that the company cannot operate for the case that only one server is employed. Such questions are typical for reliability theory.
Part II SEMIMARKOVIAN METHODS
This page intentionally left blank
Chapter 6 RENEWAL THEORY
1.
Renewal Processes
Be (X Xn : n ∈ N0 ) a sequence of independent positive random variables, and assume that (X Xn : n ∈ N) are identically distributed. Define the sequence S = (S Sn : n ∈ N) by S1 := X0 and Sn+1 := Sn + Xn for all n ∈ N. The random variable Sn , with n ∈ N, is called the nth renewal time, while the time duration Xn is called the nth renewal interval. Further define the random variable of the number of renewals until time t by Nt := max{n ∈ N : Sn ≤ t} for all t ≥ 0 with the convention max ∅ = 0. Then the continuous time process N = (N Nt : t ∈ R+ 0 ) is called a renewal process. The random variable X0 is called the delay of N . If X0 and X1 have the same distribution, then N is called an ordinary renewal process.
Nt = 2 S1
0 X0~ G
S2 X1~ F
t
S3
...
time
X2~ F
Figure 6.1. Random variables of a renewal process
We will always assume that P(X1 = 0) = 0 and m := E(X1 ) < ∞ is finite. The strong law of large numbers implies that Sn /n → m with probability one
114
AN INTRODUCTION TO QUEUEING THEORY
as n → ∞. Hence Sn < t cannot hold for infinitely many n and thus Nt is finite with probability one. By standard notation we will write G(x) := P(X0 ≤ x)
and
F (x) := P(X1 ≤ x)
for all x ∈ R+ 0.
Example 6.1 A light bulb has been installed at time zero. After a duration X0 , it will go out of order. We assume that it will be immediately replaced by a new light bulb at time S1 = X0 . Assume that the new light bulb is of a type identical to the old one. Then the duration X1 until it goes out of order is distributed identically to X0 . Of course, the life times of the light bulbs are independent from one another. Keeping up this rechangement policy over time, the number Nt of used light bulbs until time t forms an ordinary renewal process. Remark 6.2 A Poisson process with intensity λ (see example 3.1) is an ordinary renewal process with F (x) = G(x) = 1 − e−λx , i.e. the renewal intervals have an exponential distribution. Thus a renewal process can be seen as a generalization of the Poisson process with respect to the distribution of the renewal intervals. In order to derive an expression for the distribution and the expectation of Nt at any time t, we need to introduce the concept of convolutions of a non–negative function and a distribution function. Let F denote a distribution function on + + R+ 0 and g : R0 → R0 a Lebesgue–measurable function which is bounded on all finite intervals [0, t] with t ≥ 0. Then the function defined by t F ∗ g(t) := g(t − u) dF (u) 0
for all t ∈ R is called the convolution of F and g . In particular, the definition of a convolution applies if g is a distribution function. As an exercise the reader can prove
Theorem 6.3 For any distribution functions F and G as well as non–negative Lebesgue–measurable functions (gn : n ∈ N) on R+ 0 , the following properties hold: (1) The convolution F ∗ G is a distribution function on R+ 0. (2) F ∗ G=G∗F ∞ (3) F ∗ ∞ n=1 gn = n=1 F ∗ gn (4) The Dirac measure δ0 on 0 with distribution function I0 , which is defined by I0 (t) := 1 for all t ≥ 0 and I0 (t) := 0 otherwise, is neutral in regard to convolutions, i.e. I0 ∗ G = G for all distribution functions G.
115
Renewal Theory
(5) If the random variables X and Y are independent and distributed according to F and G, respectively, then P(X + Y ≤ t) = F ∗ G(t) for all t ≥ 0. (6) F ∗ (G ∗ g) = (F ∗ G) ∗ g
Let F denote any distribution function for a real–valued random variable. Define the convolutional powers by F ∗1 := F and recursively F ∗n+1 := F ∗n ∗F for all n ∈ N. Because of property (4) in the above theorem, we define F ∗0 := I0 for every distribution function F . Now denote the distribution function of the random variable X1 (and hence of all Xn with n ≥ 1) and X0 by F and G, respectively. Since the random variables (X Xn : n ∈ N) are iid, part (5) of the above theorem yields for all Nt ≥ n) = P(S Sn ≤ t) = G ∗ F ∗n−1 (t) and thus we n ∈ N0 the relation P(N obtain P(N Nt = 0) = 1 − G(t) and P(N Nt = n) = P(S Sn ≤ t) − P(S Sn+1 ≤ t) = G ∗ F ∗n−1 (t) − G ∗ F ∗n (t)
for n ≥ 1. The expectation of Nt is given by E(N Nt ) =
∞
n=1
P(N Nt ≥ n) =
∞
n=1
P(S Sn ≤ t) = G ∗
∞
F ∗n (t)
(6.1)
n=0
for all t ≥ 0 (for the first equality see Exercise 6.2). The rate of growth of a renewal process is described by
Theorem 6.4 Let N = (N Nt : t ≥ 0) denote a renewal process with renewal intervals having mean length m < ∞. Then Nt 1 = t→∞ t m lim
holds with probability one. Proof: By definition of Nt (see picture below and figure 1), the inequalities SNt ≤ t ≤ SNt +1 hold with probability one for all times t. SN
t t
SN t + 1
time
Dividing these by Nt and using the strong law of large numbers, we obtain Sn SNt = lim n→∞ n t→∞ Nt t ≤ lim t→∞ Nt SNt +1 Nt + 1 Sn+1 n+1 ≤ lim · = lim · lim =m·1 n→∞ n + 1 n→∞ t→∞ Nt + 1 Nt n
m = lim
116
AN INTRODUCTION TO QUEUEING THEORY
which proves the statement. Because of this theorem, the inverse 1/m of the mean length of a renewal interval is called the rate of the renewal process. It describes the asymptotic rate at which renewals occur. Example 6.5 Regarding a Poisson process N = (N Nt : t ≥ 0) with intensity λ > 0, it can be shown that P(N Nt = n) =
(λt)n −λt e n!
(6.2)
for all t ≥ 0 and n ∈ N0 . The expectation of Nt is given by E(N Nt ) = λ · t.
Thus a Poisson process with intensity λ has at time t a Poisson distribution with parameter λ · t. Moreover, the intensity λ is also the rate of the Poisson process, since a mean renewal interval has length 1/λ. Given an observed stream of events (e.g. job requests at a server) over some time interval of length t, we can count the number N (t) of events that have occurred in this interval. If we want to model such event streams by a Poisson process, then we need to find a statistical estimator for the intensity λ. Now theorem 6.4 states that the fraction N (t)/t comes close to λ for large interval lengths t. Thus a consistent statistical estimator for the intensity λ is given by ˆ = N (t)/t. λ Example 6.6 There is a discrete–time analogue of the Poisson process, which is called Bernoulli process. This is an ordinary renewal process with renewal intervals that have a geometric distribution. Given a parameter p ∈]0, 1[, the length of the renewal intervals is distributed as P(X1 = n) = p · (1 − p)n−1 for n ∈ N.
2.
Renewal Function and Renewal Equations
∞ ∗n The function defined by R(t) := n=1 F (t) for all t ≥ 0 is called the renewal function of the process N . The renewal function will play a central role in renewal theory. First we need to show that it remains finite:
Theorem 6.7 If F (0) < 1, then R(t) =
∞
n=1 F
∗n (t)
< ∞ for all t ≥ 0.
Proof: Since F (0) < 1 and F is continuous to the right, there is a number α > 0 such that F (α) < 1. Fix any t ≥ 0 and choose k ∈ N such that k · α > t. Then F ∗k (t) ≤ 1 − (1 − F (α))k =: 1 − β with 0 < β < 1. Thence
117
Renewal Theory
we obtain the bound F ∗mk (t) ≤ (1 − β)m for any m ∈ N. Since F (0−) = 0, we can use F ∗n (t) ≥ F ∗h (t) for all n < h ∈ N. Putting these bounds together, we obtain R(t) =
∞
n=1
F ∗n (t) ≤ k ·
∞
m=0
F ∗mk (t) ≤ k ·
∞
m=0
(1 − β )m =
k <∞ β
since β > 0. Theorem 6.8 An ordinary renewal process is uniquely determined by its renewal function. Proof: First we take the Laplace–St form (LST, see appendix 3) on ie∞ltjes trans n ∗ both sides of the equation R(t) = n=1 F (t). This yields ˜ = R(s)
∞
n=1
for s > 0, or
∗n (s) = F ˜ (s) · * F
F˜ (s) =
∞
(F˜ (s))n =
n=0
F˜ (s) 1 − F˜ (s)
(6.3)
˜ R(s) ˜ 1 + R(s)
˜ . Now and thus determines the LST F˜ (s) of F uniquely in terms of R(s) uniqueness of the LST yields the statement.
For an ordinary renewal process we can derive an implicit integral equation for the renewal function, which is known as a renewal equation. Note that for an ordinary renewal process E(N Nt ) = R(t) for all times t (see (6.1) with G = F ). Hence the function R is increasing. If we condition upon the length x of the first renewal interval X0 , we obtain ∞ E(N Nt ) = E(N Nt X0 = x) dF (x) 0
Nt X0 = x) = 0 for Since E(N Nt X0 = x) = 1 + R(t − x) for t ≥ x and E(N t < x, we can simplify this equation to t t (1 + R(t − x)) dF (x) = F (t) + R(t − x) dF (x) R(t) = 0
for all t ≥ 0. A renewal equation is the generalized form t g(t − x) dF (x), t≥0 g(t) = h(t) + 0
(6.4)
118
AN INTRODUCTION TO QUEUEING THEORY
where a function h on [0, ∞[ and a distribution function F on [0, ∞[ are given and the function g on [0, ∞[ is unknown. The solution is given in Theorem 6.9 The unique solution g to equation (6.4) is given by t g(t) = h(t − x) dR(x) + h(t) where R(t) =
∞
n=1
F ∗n (t)
denotes the renewal function for F .
Proof: (6.4) can be written as g = h+g∗ F . Because of the definition Equation ∗n we obtain R= ∞ F n=1 F ∗ (R ∗ h + h) = F ∗ h +
∞
n=1
F ∗n+1 ∗ h =
∞
n=1
F ∗n ∗ h = R ∗ h
which shows that g = R ∗ h + h is indeed a solution of (6.4). Let g ′ denote another solution and define the function δ := g ′ − R ∗ h − h
Then (6.4) implies δ = F ∗ δ and thus δ = F ∗n ∗ δ for all n ∈ N. Since R(t) < ∞ for any fixed t ≥ 0, we infer that F ∗n → 0 as n → ∞. Hence δ(t) = 0 for all t ≥ 0, which completes the proof.
3.
Renewal Theorems
In order to present the most powerful results of renewal theory, it will be useful to introduce stopping times and Wald’s lemma. Recall from (2.3) that a random variable S with values in N0 ∪ {∞} is called a stopping time for the sequence X = (X0 : n ∈ N0 ) if P(S ≤ nX ) = P(S ≤ nX0 , . . . , Xn )
(6.5)
holds for all n ∈ N0 . Lemma 6.10 For a renewal process N with delay X0 and renewal intervals (X Xn : n ∈ N), the random variable Nt is a stopping time for the sequence (X Xn : n ∈ N0 ).
Proof: This follows from the observation that Nt = k is equivalent to k−1
n=0
Xn ≤ t <
k
n=0
Xn
119
Renewal Theory
which implies that the event Nt ≤ k depends only on X0 , . . . , Xk . Lemma 6.11 Wald’s Lemma Be X = (X Xn : n ∈ N0 ) a sequence of stochastically independent positive random variables with the same expectation E(X Xn ) = m for all n ∈ N. The expectations E(X0 ) and E(X1 ) shall be finite. Further be S a stopping time of the sequence X with E(S) < ∞. Then S E Xn = E(X0 ) + E(S) · m n=0
Proof: For all n ∈ N0 define the random variables In := 1 on the set {S ≥ n} and In := 0 else. Then Sn=0 Xn = ∞ n=0 In Xn and hence ∞ S ∞ E Xn = E In Xn = E(IIn Xn ) n=0
n=0
n=0
by monotone convergence, as In and Xn are non–negative. S being a stopping time for X , we obtain by definition P(S ≥ 0) = 1, and further P(S ≥ nX ) = 1 − P(S ≤ n − 1X ) = 1 − P(S ≤ n − 1X0 , . . . , Xn−1 ) for all n ∈ N. Since the Xn are independent, In and Xn are independent, too, which implies E(II0 X0 ) = E(X0 ) and E(IIn Xn ) = E(IIn ) · E(X Xn ) = P(S ≥ n) · m for all n ∈ N. Now the relation ∞ n=1 P(S ≥ n) = E(S) yields S ∞ ∞ P(S ≥ n) · m E Xn = E(IIn Xn ) = E(X0 ) + n=0
n=0
n=1
= E(X0 ) + E(S) · m
Theorem 6.12 Elementary Renewal Theorem Be N a renewal process with renewal intervals (X Xn : n ∈ N) and mean renewal time E(X1 ) = m > 0. Assume further that the mean delay is finite, i.e. E(X0 ) < ∞. Then for the counting function Nt the limit lim
t→∞
E(N Nt ) 1 = t m
120
AN INTRODUCTION TO QUEUEING THEORY
holds, with the convention 1/∞ := 0. t Proof: For every t ≥ 0, the bound t < N n=0 Xn holds almost surely. By Wald’s lemma, this implies N t t<E Xn = E(X0 ) + E(N Nt ) · m n=0
and thence for m < ∞ 1 E(X0 ) E(N Nt ) − < m m·t t for all t ≥ 0. For E(X0 ) < ∞ and t → ∞, this yields the bound lim inf t→∞
E(N Nt ) 1 ≥ t m
which trivially holds for the case m = ∞. Now it remains to show that lim supt→∞ E(N Nt )/t ≤ 1/m. To this aim we ˜ , with the same delay consider the truncated renewal process, denoted by N ˜ ˜ X0 = X0 but renewal intervals Xn = min(X Xn , M ) for all n ∈ N, with M ˜ 1 ). being a fixed constant. Denote further m ˜ = E(X ˜ ˜ n ≤ M the bound N˜t X Because of X n=0 n ≤ t + M holds almost certainly for all t ≥ 0. Taking expectations and applying Wald’s lemma, we obtain ⎛ ⎞ ˜t N ˜t ) · m ˜n⎠ ≤ t + M E(X0 ) + E(N ˜ = E⎝ X n=0
For E(X0 ) < ∞ and t → ∞, this yields lim sup t→∞
˜t ) E(N 1 ≤ t m ˜
˜ n ≤ Xn for all n ∈ N, we know that N ˜t ≥ Nt for all t ≥ 0. Thus we Since X obtain further E(N Nt ) 1 lim sup ≤ t m ˜ t→∞ for any constant M . Now the result follows for M → ∞.
121
Renewal Theory
Remark 6.13 In view of theorem 6.4 one might be tempted to think that this trivially implied the statement of the above theorem 6.12. However, the following example shows that a limit with probability one in general does not imply a limit in expectation. Let U denote a random variable which is uniformly distributed on the interval ]0, 1[. Further define the random variables (V Vn : n ∈ N) by 0, U > 1/n Vn := n, U ≤ 1/n Since U > 0 with probability one, we obtain the limit Vn → 0,
n→∞
with probability one. On the other hand, the expectation for Vn is given by E(V Vn ) = n · P(U ≤ 1/n) = n ·
1 =1 n
for all n ∈ N and thus E(V Vn ) → 1 as n → ∞. A non–negative random variable X (and also its distr ibution function F ) is called lattice if there is a positive number d > 0 with ∞ n=0 P(X = nd) = 1. If X is lattice, then the largest such number d is called the period of X (and F ). The definition states that a lattice random variable X assumes only values that are multiples of its period d. The next result is proven in Feller [35]. The proof is lengthy and technical and therefore not repeated. Theorem 6.14 Blackwell’s Theorem Be N a renewal process with renewal intervals (X Xn : n ∈ N) and mean renewal time E(X1 ) = m. If X1 is not lattice, then for any s > 0 the counting function Nt behaves asymptotically as lim (E(N Nt+s ) − E(N Nt )) =
t→∞
s m
with the convention 1/∞ := 0.
Blackwell’s theorem suggests the following argument: Because of the identity E(N Nt ) = R(t), it states that asymptotically R(t + s) − R(t) → s ·
1 m
as
t→∞
122
AN INTRODUCTION TO QUEUEING THEORY
This means that increments of the renewal function t → R(t) tend to be linear (with coefficient 1/m) for large t. If we let s → 0, this would suggest dR(t) →
1 dt m
t→∞
as
For functions g which behave nice enough and vanish at infinity (i.e. g(t) → 0 as t → ∞), we thus can hope to establish lim
t
t→∞ 0
g(t − x) dR(x) =
1 m
∞
g(t) dt 0
In order to do this, we first need to define what we require as ”nice behaviour” from g. Let g : R+ 0 → R denote a real–valued function on the time axis and define for a > 0 and n ∈ N (6.6) Mn (a) := sup{g(x) : (n − 1)a ≤ x ≤ na} mn (a) := inf {g(x) : (n − 1)a ≤ x ≤ na} (6.7) ∞ T e unct o s ca e directly Riemann inte rabl h f i n g i ll d g e if Mn (a) and n=1 M ∞ ′ n=1 mn (a) are finite for some a > 0 (and then for all 0 < a < a), and lim a
a→0
∞
n=1
Mn (a) = lim a a→0
∞
mn (a)
(6.8)
n=1
Remark 6.15 Direct Riemann integrability is somewhat stronger than usual Riemann integrability. The similarity is that upper and lower sums converge to the same limit as a → 0. The difference is that this must happen uniformly for all intervals of the time axis. In the rest of this book, we will deal with only two kinds of directly Riemann integrable functions. For these we provide the following lemma, which the reader may prove as an exercise. Lemma 6.16 Assume that g(t) ≥ 0 for all t ≥ 0. If either (1) g is non–increasing and Lebesgue integrable, or (2) g is Riemann integrable and there is a function g ∗ with g(t) ≤ g ∗ (t) for all t ≥ 0, such that g ∗ is directly Riemann integrable, then g is directly Riemann integrable.
Now we can state the main result of renewal theory:
123
Renewal Theory
Theorem 6.17 Key Renewal Theorem Assume that m = E(X1 ) > 0, where X1 is not lattice, and let g denote a directly Riemann integrable function. Then t 1 ∞ lim (R ∗ g)(t) = lim g(t − x) dR(x) = g(y) dy t→∞ t→∞ 0 m 0 holds with the convention 1/∞ = 0.
Proof: Let (xn : n ∈ N0 ) with x0 := 0 denote any countable partition of the time axis R+ 0 into intervals of the form In := [xn−1 , xn [. Define the indicator function of In by in (t) := 1 if t ∈ In and in (t) := 0 otherwise. Then t t−xn−1 dR(u) (R ∗ in )(t) = in (t − u) dR(u) = t−xn
= R(t − xn−1 ) − R(t − xn )
for all t > xn . Now Blackwell’s theorem 6.14 yields lim (R ∗ in )(t) =
t→∞
xn − xn−1 m
for every n ∈ N.
For any finite interval [t − l, t[ of length l, the interpretation that R(t) = E(N Nt ) for an ordinary renewal process N yields with Gt (x) := P(SNt +1 − t ≤ x) the bound l (R(l − x) + 1) dGt (x) R(t + l) − R(t) = E(N Nt+l − Nt ) = 0
≤ R(l) + 1 =: B(l) < ∞
for every l > 0. For a function h = ∞ n=1 cn in with maximal interval length M and coefficients bounded by ∞ n=1 cn < ∞, we obtain thus k
n=1
cn · (R ∗ in )(t) ≤ (R ∗ h)(t) ≤
k
n=1
cn · (R ∗ in )(t) + B(M ) ·
∞
n=k+1
for every k ∈ N and t ≥ 0. Letting first t → ∞ and then k → ∞, the limit ∞
lim (R ∗ h)(t) =
t→∞
1 1 cn · (xn − xn−1 ) = m m n=1
∞
h(y) dy
cn
124
AN INTRODUCTION TO QUEUEING THEORY
is established for any such function h. Since g is directly Riemann integrable, there is a family of functions fl :=
∞
mn (l)in
and hl :=
n=1
∞
Mn (l)in
n=1
using the definitions (6.6) and (6.7). These functions satisfy fl ≤ g ≤ hl and have the form of the function h above with interval length l. Then R ∗ fl ≤ R ∗ g ≤ R ∗ hl for all l > 0, and the result follows for l → 0 according to condition (6.8).
This proof shows that the key renewal theorem is a consequence of Blackwell’s theorem. The simple case g := 1[0,s[ , i.e. g(t) = 1 for 0 ≤ t < s and g(t) = 0 for t ≥ s yields 1 ·s m as an application of the key renewal theorem. Hence the statements in Blackwell’s and the key renewal theorem are equivalent. lim (E(N Nt+s ) − E(N Nt )) = lim (E(N Nt − Nt−s )) = lim (R ∗ g)(t) =
t→∞
t→∞
t→∞
Besides its central role in renewal theory, the key renewal theorem will serve mainly two purposes in the further presentation. First, it will give a foundation for the proof of the main limit theorem in Markov renewal theory (see chapter 7). Second, it yields a limit theorem for regenerative processes (see section 1) as an immediate corollary.
4.
Residual Life Times and Stationary Renewal Processes
Choose any time t ≥ 0. Denote the duration from t until the next arrival by Bt := SNt +1 − t and call it the residual life time (or the excess life) at t. Further we define At := t − SNt and call At the age at t. The distribution of Bt appeared already in the proof of theorem 6.17.
Theorem 6.18 Be N an ordinary renewal process with renewal intervals having distribution function F . Then t (1 − F (t + x − y)) dR(y) P(Bt ≤ x) = F (t + x) − 0
for all t ≥ 0. Further the limit
lim P(Bt ≤ x) =
t→∞
1 m
x
(1 − F (y)) dy
(6.9)
125
Renewal Theory
holds if F is not lattice.
Proof: Fix any x ≥ 0. First abbreviate g(t) := P(Bt > x) for all t ≥ 0. Conditioning on X0 yields ∞ P(Bt > xX0 = s) dF (s) g(t) = 0
By definition the event {Bt > x} is equivalent to the event that there are no renewals in the interval ]t, t + x]. This observation and the fact that the process restarts at S1 = X0 yield ⎧ ⎪ ⎨g(t − s), s ≤ t P(Bt > xX0 = s) = 0, t<s≤t+x ⎪ ⎩ s>t+x 1, Hence we obtain the renewal equation t g(t − s) dF (s) + 1 − F (t + x) g(t) =
(6.10)
with solution g(t) =
t
(1 − F (t + x − y )) dR(y) + 1 − F (t + x)
This yields the first statement. The second one is obtained by using the key renewal theorem to equation (6.10). This is applicable by condition (1) of lemma 6.16 and leads to 1 ∞ 1 ∞ lim g(t) = (1 − F (t + x)) dt = (1 − F (y)) dy t→∞ m 0 m x +∞ and because of m = 0 (1 − F (y)) dy we obtain further 1 ∞ 1 x lim P(Bt ≤ x) = 1 − (1 − F (y)) dy = (1 − F (y)) dy t→∞ m x m 0
Remark 6.19 For m = ∞, equation (6.9) states that the residual life time asymptotically tends to infinity with probability one. Because of the equality {At > x} = {Bt−x > x}, an immediate application of theorem 6.18 is
126
AN INTRODUCTION TO QUEUEING THEORY
Corollary 6.20 Be N an ordinary renewal process with renewal intervals having distribution function F . Then + t−x F (t) − 0 (1 − F (t − y)) dR(y), x < t P(At ≤ x) = 1, x≥t If F is not lattice, then the limit lim P(At ≤ x) =
t→∞
1 m
x
(1 − F (y)) dy
holds.
Remark 6.21 The above results show that the distributions of age and residual life time asymptotically tend to be the same. For m = ∞ the same phenomenon as for the residual life time happens: The age asymptotically tends to infinity with probability one. Theorem 6.22 If F is not lattice and E(X12 ) < ∞, then the limit lim E(Bt ) =
t→∞
E(X12 ) 2m
holds. Proof: Define the functions g(t) = E(Bt ) and h(t) := E Bt · 1{X0 >t} for all t ≥ 0. Then the renewal equation t g(t − x) dF (x) g(t) = h(t) + 0
holds. The function h is positive, not increasing, and integrable with ∞ ∞ ∞ h(t) dt = (x − t) dF (x) dt 0 t=0 x=t ∞ x ∞ 2 x dF (x) = (x − t) dt dF (x) = x=0 t=0 x=0 2 E(X12 ) = 2
Thus the key renewal theorem applies (due to condition (1) of lemma 6.16) and yields 1 ∞ E(X12 ) h(t) dt = lim E(Bt ) = t→∞ 2m m 0
127
Renewal Theory
which completes the proof. For a stationary renewal process we would postulate that the distribution of the counts in an interval [s, s + t] be independent of s and thus equal the distribution of Nt . If this holds for a process N , then we also say that N has stationary increments. This implies in particular that the distribution of the residual life time must be independent of t, i.e. it coincides with the distribution of B0 and hence of X0 . Regarding the limit given in (6.9), we first guess that it satisfies 1 x (1 − F (y)) dy (6.11) P(X0 ≤ x) = m 0 for all x ≥ 0, where F denotes the distribution function of X1 and further m = E(X1 ) < ∞. Indeed we can show
Theorem 6.23 For a renewal process N defined by (6.11) the following properties hold: (1) E(N Nt ) = t/m for+ all t ≥ 0 x (2) P(Bt ≤ x) = m−1 0 (1 − F (y)) dy for all t ≥ 0 (3) N has stationary increments. Proof: (1) The distribution G of X0 has a density g(t) = the Laplace–Stieltjes transform (LST) of G is
1 m (1
− F (t)) Hence
∞ ∞ 1 1 (1 − F (t)) dt = e−st dt − e−st F (t) dt m m 0 0 0 ∞ ˜ (s) 1 1 1 1 − F − = e−st dF (t) = m s s 0 sm
˜ G(s) =
∞
e−st
with F˜ (s) denoting the LST ∞of F∗.n According to (6.1) we have the representation E(N Nt ) = G ∗ n=0 F (t) for all t ≥ 0. Hence the LST of M (t) := E(N Nt ) is given by ˜ (s) = M
˜ 1 G(s) = ˜ sm 1 − F (s)
for all s > 0, and thus coincides with the LST of the measure dx/m. Since the LST uniquely determines a function on [0, ∞[, this proves the first statement.
128
AN INTRODUCTION TO QUEUEING THEORY
(2) The joint distributions
P(Bt > x, Nt = 0) = 1 − G(t + x) ∞ P(Bt > x, Nt = nS P(Bt > x, Nt = n) = Sn = y) dG ∗ F ∗n−1 (y) 0 t = (1 − F (t + x − y)) dG ∗ F ∗n−1 (y) 0
for n ≥ 1 are immediate from the definition. Abbreviating F c (x) := 1− F (x), Gc (x) := 1 − G(x), and denoting M (t) := E(N Nt ), we can write
P(Bt > x) =
∞
P(Bt > x, Nt = n)
n=0 c
= G (t + x) +
∞
t
n=1 0
c
= G (t + x) +
t
F (t + x − y) d
= Gc (t + x) +
t
c
F c (t + x − y) dG ∗ F ∗n−1 (y)
∞
n=1
G∗F
∗n−1
(y)
F c (t + x − y) dM (y)
Using statement (1) and the definition of G, we obtain 1 t+x 1 t P(Bt > x) = 1 − (1 − F (y)) dy + (1 − F (t + x − y)) dy m 0 m 0 x 1 =1− (1 − F (y)) dy m 0
which proves the second statement.
(3) The difference Nt+s − Ns simply counts the number Nt′ of events in time t of the renewal process N ′ with the same distribution F of X1 but a delay X0′ ∼ Bs . Now statement (2) shows that X0 ∼ Bs = B0 . Hence we obtain Nt′ = Nt = Nt+s − Ns in distribution, which was to be proven.
Because of the results above a renewal process which satisfies condition (6.11) is called stationary renewal process. As one would expect, also the mean residual life time E(Bt ) of a stationary renewal process coincides with the limit of the mean residual life time of an ordinary renewal process: Lemma 6.24 For a non–negative random variable X the nth moment can be expressed by ∞
E(X n ) =
P(X > x) · nxn−1 dx
129
Renewal Theory
Proof: This follows simply by writing ∞ P(X n > z) dz = E(X n ) = 0
and substituting x =
√ n
∞
P(X >
√ n
z) dz
z with nxn−1 dx = dz.
Theorem 6.25 For a stationary renewal process with E(X12 ) < ∞ the mean residual life time is given by E(Bt ) =
E(X12 ) 2m
independently of t ≥ 0. Proof: Using part (2) of theorem 6.23, we obtain ∞ 1 ∞ ∞ P(Bt > y) dy = E(Bt ) = (1 − F (x)) dx dy m y=0 x=y 0 1 ∞ x 1 ∞ P(X1 > x) · x dx = (1 − F (x)) dy dx = m x=0 y=0 m x=0 and the statement follows from lemma 6.24. Example 6.26 Waiting time at a bus stop Consider a bus stop where buses are scheduled to arrive in intervals of length T . However, due to traffic variations the real inter–arrival times are uniformly distributed within intervals [T − a, T + a] with some a > 0. Now suppose that somebody arrives at the bus stop ”at random”, i.e. without knowing the bus schedule. Then we can model the mean waiting time for the next bus by the mean residual life time E(Bt ) in a stationary renewal process with distribution X1 ∼ U (T − a, T + a). We obtain T +a 1 1 1 2 a2 2 E(X1 ) = x2 dx = · 6T a + 2a3 = T 2 + 2a T −a 2a 3 3
and by theorem 6.25
2
T 2 + a3 T a2 E(Bt ) = = + 2·T 2 6·T
Thus the mean waiting time for random inter–arrival times (meaning a > 0) is longer than it would be for deterministic ones (namely T /2). This phenomenon is called the waiting time paradox.
130
5.
AN INTRODUCTION TO QUEUEING THEORY
Renewal Reward Processes
Consider an ordinary renewal process where for every renewal interval Xn there is a real–valued random variable Yn , called the nth reward, which may Xn , Yn ), n ∈ N0 are iid, then the two–dimensional depend on Xn . If the pairs (X stochastic chain ((X Xn , Yn ) : n ∈ N0 ) is called an ordinary renewal reward process. The random variable Y (t) =
N t −1
Yn
n=0
is called the total reward until time t.
Theorem 6.27 If E(Y Y1 ) and m = E(X1 ) are finite, then lim
t→∞
Y (t) E(Y Y1 ) = t m
holds with probability one. If there is further a constant c ∈ R with Y1 > c almost certainly, then E(Y Y1 ) E(Y (t)) = lim t→∞ t m Proof: The first statement follows from Nt −1 Yn Nt Y (t) = n=0 · t Nt t
as the first factor tends to E(Y Y1 ) by the strong law of large numbers and the second tends to 1/m according to theorem 6.4. For the second statement, we can assume without loss of generality that Y1 is positive almost certainly, since otherwise we consider Zn := Yn +c instead. Nt is a stopping time for the sequence (Y Yn : n ∈ N0 ), as {N Nt ≤ n} is independent of (X Xn+k : k ∈ N) and thus independent of (Y Yn+k : k ∈ N). Hence we can apply Wald’s lemma, which yields N N −1 t t Yn = E Yn − E (Y YNt ) = R(t) · E(Y Y1 ) − E (Y YN t ) E n=0
n=0
and thus R(t) E(Y (t)) E (Y YN t ) · E(Y = Y1 ) − t t t
131
Renewal Theory
for all t > 0. Because of limt→∞ R(t)/t = 1/m it now remains to show that YNt )/t = 0. To this aim we condition on X0 to obtain limt→∞ E(Y ∞ g(t) := E (Y YNt ) = E (Y YNt X0 = u) dF (u) 0 t ∞ = E (Y YNt X0 = u) dF (u) + E (Y YNt X0 = u) dF (u) 0
t
for all t > 0. Abbreviating the latter integral by h(t) and recognizing that E (Y YNt X0 = u) = g(t − u), we obtain the renewal equation t g(t − u) dF (u) + h(t) g(t) = 0
Theorem 6.9 yields the unique solution t g(t) = h(t) + h(t − u) dR(u) 0
for all t > 0. As X0 > t implies Nt = 0, we know further that ∞ E (Y Y0 X0 = u) dF (u) ≤ E(Y Y0 ) < ∞ h(t) = t
and h(t) → 0 as t → ∞. This means that for any given ε > 0 there is a T > 0 such that h(t) < ε for all t ≥ T . Using this we obtain h(t) 1 t−T 1 t g(t) ≤ + h(t − u) dR(u) + h(t − u) dR(u) t t t 0 t t−T ε R(t − T ) R(t) − R(t − T ) ≤ +ε· + E(Y Y0 ) · t t t for all t > T . For t → ∞ the right–hand side tends to ε/m by the elementary renewal theorem, as R(t) − R(t − T ) is bounded by R(T ) + 1 (see the proof of the key renewal theorem). This completes the proof, as ε can be chosen arbitrarily small.
Example 6.28 Machine maintenance Consider a machine that is prone to failure and may be either repaired or replaced by a new machine. Let Xn denote the run time of the machine after the n − 1st failure and assume λ := E(X1 ) < ∞. Since the state of the machine after the nth repair is usually worse than after the n − 1st repair, we model this by the assumption that (an−1 Xn : n ∈ N) with a ≥ 1 forms a renewal process. In particular, the Xn , n ∈ N are independent random variables. The sequence
132
AN INTRODUCTION TO QUEUEING THEORY
(X Xn : n ∈ N) is called a non–increasing geometric process with parameter a. The reward rate for the machine running is r = 1.
The duration of the nth repair is denoted by Yn , n ∈ N, with the assumption µ := E(Y Y1 ) < ∞. As the machine becomes more and more difficult to repair, we assume that (bn−1 Yn : n ∈ N) with b ≤ 1 forms a renewal process. The sequence (Y Yn : n ∈ N) is called a non–decreasing geometric process with parameter b. Again this implies that the Yn , n ∈ N are independent random variables. Furthermore we assume that {X Xn , Yn : n ∈ N} is an independent set of random variables. The cost (i.e. the negative reward) rate for the repair of the machine is denoted by c1 > 0. Instead of repairing the machine after a failure, we can choose to replace it by a new machine. This incurs a fixed cost c2 > c1 . Given this information, we want to determine the long–run expected reward per unit time for the machine. This depends on the variable N ∈ N which indicates the policy that a machine is replaced after the N th failure. Clearly the replacement times (T Tn : n ∈ N0 ) with T0 := 0 form an ordinary renewal process and the reward of a machine (i.e. between replacement times) is independent from the rewards and life times of other machines. Denote the life time and the reward of the nth machine by Ln := Tn − Tn−1 and Rn , respectively. Then ((Ln , Rn ) : n ∈ N) is a renewal reward process and the long–run expected reward per unit time is given by N −1 −(k−1) −(k−1) − c · µ − c2 λ N b E(R1 ) 1 k=1 a R(N ) = = N kN=1−1 −(k−1) k 1 −( − ) E(L1 ) λ k=1 a + µ k=1 b according to theorem 6.27. In order to find the optimal replacement policy, this equation can now be used to determine the value N which maximizes the expected reward rate R(N ).
Notes A classical presentation of renewal theory is chapter 11 in Feller [35]. The presentation in this chapter is largely adapted to Ross [74, 75] as well as Karlin and Taylor [46]. The concept of regenerative processes has been developed by Feller and Smith [80, 81]. Example 6.28 is taken from Lam Yeh [51].
Exercise 6.1 Prove theorem 6.3. Exercise 6.2 In the proof for Wald’s lemma 6.11 we have + ∞used the relation ∞ E(S) = n=0 P(S > n), and in theorem 6.18 E(F ) = 0 (1 − F (y)) dy. Give a proof for these equations.
133
Renewal Theory
Exercise 6.3 Show for a Poisson process N with intensity λ > 0 that P(N Nt = k) =
(λt)k −λt e k!
for all t ≥ 0 and k ∈ N0 , and E(N Nt ) = λ · t.
Exercise 6.4 A plumber receives orders at time intervals which are distributed exponentially with parameter λ. As soon as he has received an order he goes to work, which takes an exponentially distributed time with parameter µ. During work he cannot receive any orders. Assume that at time zero the plumber is working. Give a model of the plumber receiving orders in terms of a renewal process and determine the density of the renewal intervals’ distribution. Exercise 6.5 An intelligence agency eavesdrops on telephone calls automatically. If there occurs a suspicious sequence of words, a closer investigation is initiated. The probabilitiy for such a sequence is one in a thousand for every call. The length of a call is distributed exponentially with a mean of 20 seconds. How long is the expected amount of time before a closer investigation begins? Use Wald’s lemma. Exercise 6.6 Let N = (N Nt : t ≥ 0) denote an ordinary renewal process with X1 ∼ F . Show that the current life time XNt satisfies P(XNt > x) ≥ 1 − F (x) for all x ≥ 0.
Exercise 6.7 Give an example which shows why we need to assume in Blackwell’s theorem that the distribution of the renewal intervals is not lattice. Exercise 6.8 Prove lemma 6.16. Exercise 6.9 Show that the age At of a stationary renewal process is distributed as 1 x (1 − F (y)) dy P(At ≤ x) = m 0 independently of t ≥ 0.
Exercise 6.10 Show that for an ordinary renewal process with E(X12 ) < ∞ and m := E(X1 ) the limit lim E(At ) =
t→∞
E(X12 ) 2m
134
AN INTRODUCTION TO QUEUEING THEORY
holds.
Exercise 6.11 Passengers arrive at a train station according to an ordinary renewal process with rate 1/m. As soon as there are N passengers waiting, the train departs. The cost for the ticket per passenger is C. Assume that the railway company reimburses every passenger for the waiting time by an amount of W per time unit that the passenger had to wait. Determine the minimal value for C such that this train connection will be profitable in the long run. Exercise 6.12 A delayed renewal reward process is defined as a stochastic Xn , Yn ) : n ∈ N) is an ordinary chain ((X Xn , Yn ) : n ∈ N0 ) for which ((X renewal reward process and X0 ≥ 0. The pair (X0 , Y0 ) may have a different distribution than (X1 , Y1 ). Prove the statement of theorem 6.27 for a delayed Y0 ) < ∞. renewal reward process that satisfies E(X0 ) < ∞ and E(Y
Chapter 7 MARKOV RENEWAL THEORY
1.
Regenerative Processes
Let Y = (Y Yt : t ≥ 0) denote a stochastic process on a discrete state space E with right–continuous paths. Further let T denote a random variable with values in [0, ∞] such that the condition P(T ≤ tY ) = P(T ≤ tY Ys : s ≤ t)
(7.1)
holds for all t ∈ R+ 0 . Such a random variable is called a (continuous) stopping time for the process Y. As in the analogue for discrete time, the defining condition means that the probability for the event {T ≤ t} depends only on the evolution of the process until Yt . In other words, the determination of a stopping time does not require any knowledge of the future.
If there is a sequence T = (T Tn : n ∈ N0 ) of stopping times for Y with T0 := 0 and Tn+1 > Tn for all n ∈ N0 such that T defines an ordinary renewal process, and if further Yu : u ≤ Tn ) = P(Y Yt1 = j1 , . . . , Ytk = jk ) P(Y YTn +t1 = j1 , . . . , YTn +tk = jk Y for all k ∈ N, t1 , . . . , tk ≥ 0 and n ∈ N0 holds, then Y is called a regenerative process. The Tn are called regeneration times and the defining condition above is called regeneration property. The interval [T Tn−1 , Tn [ is called the nth regeneration cycle.
Example 7.1 M/G/k Queue The M/G/k queue has a Poisson arrival process and k servers with general service time distribution. Whenever the queue is empty, all servers are idle and
136
AN INTRODUCTION TO QUEUEING THEORY
only the arrival process has an effect on the future. Thus the system process regenerates at the points Tn of the system becoming idle for the nth time. The durations Tn+1 − Tn between these points are iid. Hence the M/G/k system process is a regenerative process. T1 ) = m < ∞ holds and if the funcTheorem 7.2 If T1 is not lattice and E(T tion Kj (t) := P(T T1 > t, Yt = j) is Riemann integrable, then 1 ∞ πj := lim P(Y Yt = j) = Kj (t) dt t→∞ m 0 for all j ∈ E.
Proof: Let F denote the distribution function of T1 . By conditioning on the first regeneration time T1 , we obtain the equation t P(Y P(Y Yt = j) = P(T T1 > t, Yt = j) + Yt = jT T1 = s) dF (s) 0 t = P(T T1 > t, Yt = j) + P(Y Yt−s = j) dF (s) 0
where the second equality is due to the regeneration property. The function T1 > t, Yt = j) is non–negative and bounded by P(T T1 > t), which Kj (t) = P(T in turn is Lebesgue integrable and non–increasing. By assumption Kj (t) is Riemann integrable. Hence lemma 6.16 yields that Kj (t) is directly Riemann integrable. Thus the key renewal theorem 6.17 applies and yields the statement. Introduce a real–valued function f : E → R on the state space of the process Y. The value f (i) can be interpreted as a reward rate which is incurred in state i ∈ E.
Theorem 7.3 If E(T T1 ) < ∞ and f is bounded, then +T E 0 1 f (Y Yt ) dt 1 t lim f (Y Ys ) ds = t→∞ t 0 E(T T1 ) holds with probability one. If further E(T T12 ) < ∞, then +T t E 0 1 f (Y Yt ) dt 1 lim E f (Y Ys ) ds = t→∞ t 0 E(T T1 ) +T Ys ) ds for all n ∈ N0 . Proof: Define Xn := Tn+1 − Tn and Zn := Tnn+1 f (Y Since Y is regenerative, the chain ((X Xn , Zn ) : n ∈ N0 ) is a renewal reward
137
Markov Renewal Theory
process, with Nt := max{n ∈ N0 : Tn ≤ t} and Z(t) := as usual. We can write t t f (Y Ys ) ds = Z(t) + f (Y Ys ) ds 0
Nt −1 n=0
Zn defined
(7.2)
TNt
for all t ≥ 0. Since Z(t)/t converges to the fraction on the right–hand side +t of the statement (see theorem 6.27), it remains to show that t−1 TN f (Y Ys ) ds t tends to zero as t → ∞. We obtain t 1 t 1 Nt X Nt Nt f (Y Ys ) ds = f (Y Ys ) ds · ≤ · sup f (i) · t TNt Nt TNt t Nt i∈E t → lim
n→∞
Xn Nt · sup f (i) · lim t→∞ t n i∈E
as t → ∞. According to the strong law of large numbers, we know that n k=1 Xk /n → m < ∞ almost certainly and hence Xn /n → 0 as n → ∞. This and theorem 6.4 complete the proof for the first statement. The same partition (7.2) and theorem 6.27 show ! that for the second statement +t −1 it remains to show that t E TN f (Y Ys ) ds → 0 as t → ∞. However, this t follows from t
TNt
f (Y Ys ) ds ≤ At · sup f (i) i∈E
and limt→∞ E(At ) = E(X12 )/(2m) < ∞ by exercise 6.10 and the assumption that E(T T12 ) be finite. ,+ , , T , T1 ) as well as E , 0 1 f (Y Yt ) dt, are Theorem 7.4 If T1 is not lattice and E(T finite, then +T E 0 1 f (Y Yt ) dt = πj · f (j) E(T T1 ) j∈E
T1 ) < ∞, then with πj as defined in theorem 7.2. If T1 is not lattice and E(T 1 πj = lim t→∞ t
t
1{YYs =j} ds
holds with probability one for all j ∈ E . This means that the limiting probability πj of j equals the asymptotic proportion of time spent in state j for every path.
138
AN INTRODUCTION TO QUEUEING THEORY
Proof: The Lebesgue construction of an integral yields T1 T1 f (Y Yt ) dt = f (j) · 1{YYt =j} dt 0
j∈E
and after taking expectations we obtain T1 E f (Y Yt ) dt = f (j) · 0
j∈E
∞
Kj (t) dt
with Kj (t) = P(T T1 > t, Yt = j). Now the first statement follows from theorem 7.2. The second statement follows from the first one and theorem 7.3 for f (Y Yt ) := 1{YYt =j} .
2.
Semi–Markov Processes
In this section we will introduce a special class of regenerative processes which is very useful for the analysis of many queueing systems. Let E denote a countable state space. For every n ∈ N0 , let Xn denote a random variable on E and Tn a random variable on R+ 0 such that T0 := 0, Tn < Tn+1 for all n ∈ N0 , and supn→∞ Tn = ∞ almost surely. Define the process Y = (Y Yt : t ∈ R+ 0 ) by Yt := Xn
for Tn ≤ t < Tn+1
for all t ≥ 0. If
P(X Xn+1 = j, Tn+1 − Tn ≤ uX0 , . . . , Xn , T0 , . . . , Tn ) = P(X Xn+1 = j, Tn+1 − Tn ≤ uX Xn ) (7.3) holds for all n ∈ N0 , j ∈ E, and u ∈ R+ 0 , then Y is called a semi–Markov process on E. The sequence (X , T ) = ((X Xn , Tn ) : n ∈ N0 ) of random variables is called the embedded Markov renewal chain. We will treat only homogeneous semi–Markov processes, i.e. those for which Xn+1 = j, Tn+1 − Tn ≤ tX Xn = i) Fij (t) := P(X is independent of n. For all i, j ∈ E , the functions t → Fij (t) are assumed non–lattice.
By definition a semi–Markov process is a pure jump process. Thus the sample paths are step functions:
139
Markov Renewal Theory
Figure 7.1.
Typical path of a semi–Markov process
By construction, the semi–Markov process Y is determined by the embedded Markov renewal chain (X , T ) and vice versa. Remark 7.5 Let Y denote an homogeneous Markov process with discrete state space E and parameters λi , i ∈ E, for the exponential holding times. The embedded Markov chain X of Y shall have transition matrix P = (pij )i,j∈E . Then Y is a semi–Markov process with ! Fij (t) = pij · 1 − e−λi ·t
for all i, j ∈ E. Thus for a Markov process the distribution of Tn+1 − Tn is exponential and independent of the state entered at time Tn+1 . These are the two features for which the semi–Markov process is a generalization of the Markov process on a discrete state space.
Theorem 7.6 Let Y be a semi–Markov process with embedded Markov renewal chain (X , T ). Then X = (X Xn : n ∈ N0 ) is a Markov chain. Proof: From the condition (7.3) we obtain for every n ∈ N0 P(X Xn+1 = jX0 , . . . , Xn ) = P(X Xn+1 = j, Tn+1 − Tn < ∞X0 , . . . , Xn ) Xn ) = P(X Xn+1 = j, Tn+1 − Tn < ∞X = P(X Xn+1 = jX Xn ) since all Tn are finite by definition. We denote the transition matrix of X by P = (pij )i,j∈E . Then the relation pij := P(X Xn+1 = jX Xn = i) = lim Fij (t) t→∞
140
AN INTRODUCTION TO QUEUEING THEORY
obviously holds for all i, j ∈ E . This means in particular that the functions Fij (t) are distinct from distribution functions in the feature that the total mass distributed by them may be less than one. Therefore they shall be called sub– stochastic distribution functions. According to its embedded Markov chain X , we call a semi–Markov process irreducible, recurrent or transient. Clearly, an irreducible recurrent semi– Markov process is regenerative, as one can fix any initial state i ∈ E and find the times of visiting this state to be a renewal process.
Define Gij (t) := Fij (t)/pij for all t ≥ 0 and i, j ∈ E if pij > 0, while Gij (t) := 0 otherwise. The definitions of P and F yield the interpretation Gij (t) = P(T Tn+1 − Tn ≤ tX Xn = i, Xn+1 = j)
which in turn yields Theorem 7.7 Let Y denote a semi–Markov process with state space E and embedded Markov renewal chain (X , T ). Then P(T T1 − T0 ≤ u1 , . . . , Tn − Tn−1 ≤ un X0 , . . . , Xn ) = GX0 ,X1 (u1 ) . . . GXn−1 ,Xn (un ) for all n ∈ N, meaning that the increments T1 − T0 , . . . , Tn − Tn−1 are conditionally independent, given the values X0 , . . . , Xn . Remark 7.8 If the state space E is trivial, i.e. consisting of only one element, then these increments are even iid. In this case, T = (T Tn : n ∈ N0 ) is a renewal process. This property and theorem 7.6 justify the name Markov renewal theory for the study of semi–Markov processes, as the latter generalize Markov processes and renewal processes at the same time.
2.1
Transient distributions
For Markov chains and Markov processes we have been able to give formulae for the transition matrices. Because of the Markov property, this in turn determined all finite–dimensional marginal distributions and thus the complete distribution of the process. In the case of a semi–Markov process, we cannot give as much information. However, what we can derive are the transition probabilities starting from a regeneration time. Since T0 := 0 is a deterministic regeneration point, this yields together with a given initial distribution the one–dimensional marginal distributions at any given time. These shall be called transient distributions. In order to determine the transient distributions of a semi–Markov process, we will view the collection F = (F Fij )i,j∈E of sub–stochastic distribution func
141
Markov Renewal Theory
tions as a matrix with entries being functions instead of numbers. This matrix contains all stochastic laws for the construction of the semi–Markov process Y. Therefore it shall be called the characterizing matrix of Y. We define a matrix convolution of two such matrices F and G by the entries t (F ∗ G)ij (t) := Gkj (t − u) dF Fik (u) k∈E
for all i, j ∈ E and t ≥ 0. Based on this definition, we define the matrix convolutional powers by F ∗0 := IE , denoting the identity matrix on E, and by recursion F ∗n+1 = F ∗n ∗ F . Now we can state the following formula for the transient distributions of a semi–Markov process:
Theorem 7.9 Let Y denote a semi–Markov process with characterizing matrix Then the transient distribution of Y π at F , and π any initial distribution of Y. any time t is given by P(Y Ytπ = j) = i∈E πi Pij (t) with ∞ t 1− Fjk (t − u) dF Fij∗n (u) Pij (t) = n=0 0
k∈E
Proof: This expression is obtained by conditioning on the number n of renewal intervals that have passed until time t.
2.2
Asymptotic behaviour
Next we want to examine the asymptotic behaviour of the transient distributions, i.e. we want to determine the limits limt→∞ P(Y Yt = j) for all j ∈ E. This will be achieved by specifying the results which have already been obtained for regenerative processes. If we want to use theorem 7.2, then we need the information for the respective regenerative process with embedded renewals being the visits to any fixed state j ∈ E. Define ∞ T1 · 1X1 =j X0 = i) = t dF Fij (t) mij := E(T 0 ∞ mi := E(T T1 X0 = i) = mij = 1− Fik (t) dt j∈E
k∈E
for all i, j ∈ E. Further define Tn : Xn = j, n ∈ N} and τj := min{T
µij := E(ττj X0 = i)
(7.4)
142
AN INTRODUCTION TO QUEUEING THEORY
for all i, j ∈ E. The random variable τj is called first return time to state j.
Now consider any Markov renewal time Tn . If the Markov chain X is irreducible and positive recurrent with stationary distribution ν = (ννi : i ∈ E), then we would expect a proportion νj of sample paths with transition into j at time Tn . Furthermore, mj represents the mean time spent in state j until the next transition happens at time Tn+1 . Therefore, if there is an asymptotic distribution πj = limt→∞ P(Y Yt = j), we would expect it to be proportional to νj · mj , i.e. νj · mj πj = i∈E νi · mi We will prove this by examining the above mentioned embedded regenerative process of visits to state j. Lemma 7.10 The relation µij = mi +
pik µkj
k=j
holds for all i, j ∈ E.
Proof: Conditioning on the state X1 = k at time T1 , we can write µij =
k∈E
=
E(ττj · 1X1 =k X0 = i) = mik +
k∈E
k=j
(pik µkj + mik ) + mij
k=j
pik · µkj = mi +
pik µkj
k=j
which is the statement. Lemma 7.11 Let Y denote a semi–Markov process with embedded Markov renewal chain (X , T ). Assume that X is positive recurrent and denote its stationary distribution by ν = ν P . Further assume that i∈E νi mi < ∞. Then the mean recurrence time of a state j ∈ E can be expressed by µjj = E(ττj X0 = j) = for all j ∈ E.
1 νi mi νj i∈E
143
Markov Renewal Theory
Proof: We multiply both sides of lemma 7.10 by νi and sum up over all i ∈ E . Then we obtain νi µij = νi mi + νi pik µkj = νi mi + µkj νi pik i∈E
i∈E
=
k=j
i∈E
νi mi +
i∈E
k=j
i∈E
νk µkj
k=j
i∈E
which implies νj µjj =
νi mi
i∈E
and thus the statement.
Theorem 7.12 Let Y denote a semi–Markov process with embedded Markov renewal chain (X , T ) and characterizing matrix F . Assume that X is irreducible and positive recurrent and ν = νP is the stationary distribution of its transition matrix P . Further assume that i∈E νi mi < ∞. Then the limits νj mj i∈E νi mi
πj := lim P(Y Yt = j) = t→∞
hold for all j ∈ E , independent of the initial distribution.
Proof: Since the times of successive visits to state j form a (possibly delayed) renewal process, the process Y is regenerative. Since all functions Fij are assumed non–lattice, the regeneration cycles of Y are not lattice either. Thus we can apply theorem 7.2 (in the form of exercise 7.1), which yields Yt = j) = lim P(Y
t→∞
mj µjj
Now lemma 7.11 leads to the statement. Example 7.13 This limit theorem finally suffices for an application to Markov processes. The two limit theorems (3.6) and (3.7) follow from the interpretation of a Markov process as a special semi–Markov process. For a Markov process, the mean holding times in a state i are given by ∞ ∞ 1 P(T T1 > tY Y0 = i) dt = e−λi ·t dt = mi = λi 0 0
144
AN INTRODUCTION TO QUEUEING THEORY
ˇ > 0 for all i ∈ E, we know that for all i ∈ E. Since λi ≥ λ i∈E νi mi < ∞. Hence we obtain ν j /λ j i∈E νi /λi
Yt = j) = lim Pij (t) = lim P(Y
t→∞
t→∞
as given in equation (3.5).
3.
Semi–regenerative Processes
Semi–Markov processes play a similar role for the analysis of a more general class of processes that renewal processes have played for the analysis of regenerative processes. These more general processes are called semi–regenerative and shall be defined as follows:
Let Z = (Z Zt : t ∈ R+ 0 ) denote a stochastic process with countable state space E. Then Z is called a semi–regenerative process if there is an embedded Markov renewal chain (X , T ) such that all Tn are stopping times for Z, all Xn are deterministic functions of (Z Zu : u ≤ Tn ), and P(Z ZTn +t1 = j1 , . . . , ZTn +tk = jk Z Zu : u ≤ Tn , Xn = i) = P(Z Zt1 = j1 , . . . , Ztk = jk X0 = i) (7.5) holds for all n, k ∈ N, i, j1 , . . . , jk ∈ E, and t1 < . . . < tk ∈ R+ 0 . This condition postulates that for any prediction of the process (Z Zu : u ≥ Tn ) all information of the past (Z Zu : u ≤ Tn ) is contained in the state Xn . We abbreviate T1 > t, Zt = jX0 = i) Kij (t) := P(T for all i, j ∈ E and t ∈ R+ 0.
Theorem 7.14 The transient distributions of a semi–regenerative process Z with embedded Markov renewal sequence (X , T ) and initial distribution π are given by P(Z Zt = j) = i∈E πi Pij (t) with Pij (t) =
∞
n=0 k∈E
t
∗n Kkj (t − u) dF Fik (u)
for all t > 0 and i, j ∈ E . Proof: This expression is obtained by conditioning upon the number n of Markov renewal points until time t and the state k which is observed at the last Markov renewal point before t.
145
Markov Renewal Theory
The following limit theorem is the main result of this chapter and will be applied to many classical queueing systems later on. We define the column vector m = (mi : i ∈ E) with mi := E(T T1 X0 = i) for all i ∈ E, and abbreviate νm := i∈E νi mi .
Theorem 7.15 Let Z denote a semi–regenerative process with irreducible and positive recurrent embedded Markov chain X . Denote the stationary distribution of X by ν and assume that νm < ∞. Then the limit ∞ 1 Zt = j) = νk Kk j (t) dt lim P(Z t→∞ νm 0 k∈E
holds for all j ∈ E and is independent of the initial distribution.
Proof: Since X is positive recurrent and νm < ∞, the process Z is regenerative with regeneration times being the transition times to some state i ∈ E. Then theorem 7.2 and lemma 7.11 yield ∞ 1 P(Z lim P(Z Zt = j) = Zt = j, τi > tX0 = i) dt t→∞ µii 0 τi νi · Ei 1Zt =j dt = νm 0 with τi defined as in (7.4) and Ei denoting the conditional expectation given X0 = i. Defining the stopping time σi = min{n ∈ N : Xn = i}, we can write i τi = σn= Tn − Tn−1 ). The semi–regenerative property (7.5) yields 1 (T , T1 , Tn , Ei 1Zt =j dt, Zu : u ≤ Tn−1 , Xn−1 = k = Ek 1Zt =j dt , Tn−1 0 for all n ∈ N and k ∈ E. Hence we can write σ T1 i νi Zt = j) = · Ei EXn−1 1Zt =j dt lim P(Z t→∞ νm 0 n=1 σ T1 i νi = · Ei 1Xn−1 =k · Ek 1Zt =j dt νm 0 n=1 k∈E σ T1 i νi · Ei 1Xn−1 =k · Ek 1Zt =j dt = νm 0 k∈E
n=1
146
AN INTRODUCTION TO QUEUEING THEORY
By theorems 2.24 and 2.27 we get σ i νk Ei 1Xn−1 =k = νi n=1
whence the statement follows.
Notes Early papers on Markov renewal theory go back to Pyke [69, 70]. Classical textbooks on semi–Markov processes are Ross [74, 75] and C¸inlar [25], the latter containing further an extensive presentation on semi–regenerative processes. The proof for theorem 7.15 is due to Asmussen [5]. For more advanced material on regenerative processes see Kalashnikov [44]. Exercise 7.1 A regenerative process is called a delayed regenerative process if the respective sequence T = (T Tn : n ∈ N) of stopping times is a delayed renewal process. Prove theorem 7.2 for delayed regenerative processes. Exercise 7.2 Prove theorem 7.7. Exercise 7.3 Consider a machine that switches states between ”on” and ”off ”. First it is switched on for an amount X1 of time, then it is off for an amount Y1 of time, followed by an amount X2 of time switched on, and so forth. Assume that the sequences (X Xn : n ∈ N) and (Y Yn : n ∈ N) are both iid with distribution functions F and G for X1 and Y1 , respectively. Give a model for the state of the machine in terms of a semi–Markov process and show that for F ∗ G being not lattice and E(X1 + Y1 ) < ∞ the long–run fraction πon of time that the machine is switched on can be expressed as
πon =
E(X1 ) E(X1 ) + E(Y Y1 )
Such a process is called an alternating renewal process.
Exercise 7.4 For a positive recurrent Markov process with discrete state space E, derive an expression for the mean recurrence time to a state i ∈ E.
Chapter 8 SEMI–MARKOVIAN QUEUES
The term semi–Markovian queues signifies the class of queues that can be analyzed by means of an embedded semi–Markov process, i.e. by modelling the system process of the queue as a semi–regenerative process.
1.
The GI/M/1 Queue
The first queue that shall serve as an example for an application of the semi– Markovian method is the GI/M/1 queue. This has an arrival stream which is a renewal process, i.e. the inter–arrival times are iid with some common distribution function A. There is one single server with exponential service time distribution. Its intensity, i.e. the parameter of the exponential distribution, shall be denoted by µ > 0. The service displine is FCFS and the capacity of the waiting room is unbounded. The system process Q = (Qt : t ∈ R+ 0 ) has state space E = N0 , with Qt indicating the number of users in the system (i.e. in service or waiting) at time t. It can be modelled by a Markov process only for the case of exponential inter–arrival times, i.e. for A(t) = 1 − e−λt with some λ > 0, since only the exponential distribution is memoryless (see section 4). For general distribution functions A, we need to find another method of analysis. One feature that clearly distinguishes this particular queueing system GI/M/1 is the independence of the arrival process from the rest of the system, which leads immediately to the construction of an embedded Markov renewal sequence at times of arrivals. This is possible since at times of arrival we know that the new inter–arrival time has just begun and because of the memoryless service time distribution we do not need to remember anything else than the number
148
AN INTRODUCTION TO QUEUEING THEORY
of users in the system. Thus an analysis of the system as a semi–regenerative process seems appropriate. That this is indeed successful will be shown in the following.
Define Tn as the time of the nth arrival and Xn := QTn − 1 as the number of users in the system immediately before the nth arrival. Clearly, the Tn are stopping times and Xn is a deterministic function of QTn . Assume that A is not lattice. Further we postulate A(0) = 0 and E(A) < ∞. This implies in particular that Tn → ∞ almost surely as n tends to infinity. The sequence X = (X Xn : n ∈ N0 ) is a Markov chain since at times of arrivals the future of the system is determined only by the current number of users in the system, due to the memoryless property of the service times. The same property of the queue ensures the validity of equation (7.5) for the system process Q. Thus the system process Q is semi–regenerative with embedded Markov renewal chain (X , T ), denoting T = (T Tn : n ∈ N0 ) with T0 := 0. For the characterizing matrix F of (X , T ) we obtain Tn+1 − Tn ≤ x, Xn+1 = jX Xn = i) Fij (x) = P(T ⎧+ x + i 1−j −µt (µt) ⎪ dA(t), 1 ≤ j ≤ i + 1 ⎨ 0 e i (i+1−j)! = 1 − k=0 Fik (x), j=0 ⎪ ⎩ 0, j >i+1
for all i, j ∈ E = N0 . The transition probability matrix P = (pij )i,j∈N0 of X is given by its entries ⎧ + ∞ −µt (µt)i+1−j ⎪ ⎨ai+1−j := 0 e (i+1−j)! dA(t), 1 ≤ j ≤ i + 1 i pij = bi := 1 − n=0 an , j=0 ⎪ ⎩ 0, j >i+1
for all i, j ∈ N0 . Here the first line describes the case that within an inter– arrival time exactly i + 1 − j users are served such that immediately before the next arrival there are j users in the system, given that i users have been in the system immediately before the last arrival. The third line states that after one inter–arrival period there can only be an increase by one user in the system. The second line distributes the remaining probability mass to the only possible case left. Clearly, bn = ∞ k=n+1 ak holds for all n ∈ N0 . With the abbreviations an and bn , the matrix P is strucured as ⎛ ⎞ b0 a0 0 0 0 . . . ⎜b1 a1 a0 0 0 . . .⎟ ⎜ ⎟ P = ⎜b2 a2 a1 a0 0 . . .⎟ (8.1) ⎝ ⎠ .. .. . . . . . . . . . . . . . .
149
Semi–Markovian Queues
Such a matrix is called upper Hessenberg matrix or skip–free to the right. It is characterized by the feature that above the first diagonal on top of the main diagonal the matrices contain only zeros.
The function K(t) describing the behaviour of the system process between T1 > t, Qt = jX0 = i) Markov renewal points is given by Kij (t) = P(T for i, j ∈ N0 . Exploiting the independence of arrival process and service we obtain ⎧ i+1−j −µt (µt) ⎪ 1≤j ≤i+1 ⎨(1 − A(t)) · e (i+1−j)! , n t (µ ) ∞ Kij (t) = (1 − A(t)) · e−µt n=i+1 n! , j = 0 ⎪ ⎩ 0, j >i+1
(8.2)
for all t > 0, and i, j ∈ N0 . The transient distributions of the system process can now be determined according to theorem 7.14.
In order to employ theorem 7.15 for the calculation of the asymptotic distribution of the system process, we need to determine the stationary distribution ν of X , and the vector m of the mean time between Markov renewal points. The vector m is obtained in a straightforward manner as T1 X0 = i) = E(A) mi = E(T
(8.3)
independently of i ∈ N0 , since the arrival process does not depend on the number of users in the system. Thus the vector m is constant.
The most difficult part is to determine the stationary distribution ν of the Markov chain X . Since a0 > 0 and bn > 0 for all n ∈ N0 , the transition matrix P is clearly irreducible. Hence there is at most one stationary distribution of X . The stationary distribution ν of X can be determined by solving the following system of equations: ν0 =
∞
ν n bn
and
n=0
νk =
∞
νn an−k+1
(8.4)
n=k−1
With a geometric approach, i.e. assuming νn = (1 − ξ) · ξ n for all n ∈ N0 and some 0 < ξ < 1, the equations for k ≥ 1 can be transformed to (1 − ξ)ξ k = (1 − ξ)
∞
n=k−1
ξ n an−k+1
⇔
ξ=
∞
n=0
ξ n an
(8.5)
150
AN INTRODUCTION TO QUEUEING THEORY
If some 0 < ξ < 1 satisfies this equation, then
ν0 = =
∞
n=0 ∞ k=1
νn bn = (1 − ξ)
∞
n=0
ξn
∞
k=n+1 ∞
ak (1 − ξ k ) = 1 − a0 −
k=1
ak = (1 − ξ)
k−1 ∞
ak ξ n
k=1 n=0
ak ξ k = 1 − a0 − (ξ − a0 ) = 1 − ξ
holds, too. This means that the approach νn = (1 − ξ)ξ n
for all n ∈ N0
(8.6)
would yield an stationary distribution for X if the number 0 < ξ < 1 satisfying ξ= ∞ n=0 ξ an can be determined.
n To this aim, we consider the power series f (x) = ∞ n=0 an x which is well– defined on the interval [0, 1]. Clearly, f (1) = 1 and f (0) = a0 > 0. Since which means that the an > 0 for all n ∈ N0 , we obtain f ′′ (x) > 0 for all x n function f is strictly convex on [0, 1]. A fix point ξ = ∞ n=0 ξ an geometrically signifies the first coordinate of an intersection between f and the identity function.
1
f(x) a0
ξ
Figure 8.1.
1
Fix point as intersection with diagonal
The above properties of f and the mean value theorem together imply that such a fix point ξ does exist if and only if the condition f ′ (1) > 1 is satisfied.
151
Semi–Markovian Queues
Because of ′
f (1) = =
∞
nan =
n=1 ∞ 0
∞
−µt
e
∞ (µt)n dA(t) n n!
n=1
∞ ∞ (µt)n−1 −µt e (µt) dA(t) = µ · t dA(t) (n − 1)! 0 n=1
this condition translates to µ · E(A) > 1
⇔
E(A) >
1 µ
(8.7)
which simply means that the mean inter–arrival time is strictly greater than the mean service time. Remark 8.1 One way to calculate the number ξ is the following: We start with ξ0 := 0 and iterate by ξn+1 := f (ξn ) for all n ∈ N0 . Then ξ = limn→∞ ξn . In order to prove this we first observe that the sequence (ξn : n ∈ N0 ) is strictly increasing. This follows by induction, as ξ1 = a0 > 0 = ξ0 and ξn+1 =
∞
ak ξnk >
k=0
∞
ak ξnk−1 = ξn
k=0
by induction hypothesis, since all an are strictly positive. Again by induction we obtain ξn < 1 for all n ∈ N0 , as ξ0 < 1 and ξn =
∞
ak ξnk−1
<
k=0
∞
ak = 1
k=0
for all n ∈ N. Hence the sequence (ξn : n ∈ N0 ) converges as it is increasing and bounded. Now for the limit ξ∞ we obtain ξ∞ = lim ξn = lim ξn+1 = lim n→∞
=
∞
n→∞
n→∞
∞
ak ξnk
k=0
=
∞
k=0
ak
lim ξn
n→∞
!k
k ak ξ∞
k=0
which means that ξ∞ is a fix point for the function f . This is strictly increasing, as f ′ (x) > 0 for all x > 0 due to the positivity of all an . Hence f (x) < f (ξ) = ξ
for all
x<ξ
Since the sequence (ξn : n ∈ N0 ) starts with ξ0 = 0, this means that ξn < ξ for all n ∈ N0 . Hence ξ∞ = ξ, since ξ is the only fix point smaller than one.
152
AN INTRODUCTION TO QUEUEING THEORY
Now theorem 7.15 can be applied with the values for ν , m and K as determined above. This yields for the asymptotic distribution of the GI/M/1 queue the following results (see exercises): (1 − ξ)ξ j−1 ∞ (1 − A(t))e−µt(1−ξ) dt (8.8) πj := lim P(Qt = j) = t→∞ E(A) 0 for all j ≥ 1 and
1 π0 := lim P(Qt = 0) = 1 − t→∞ E(A)
∞
(1 − A(t))e−µt(1−ξ) dt
(8.9)
Because of ξ=
∞
n=0
an ξ n =
∞
e−µt
∞ (µtξ)n
n!
n=0
dA(t) =
∞
e−µt(1−ξ) dA(t)
and integration by parts ∞ A(t)e−µt(1−ξ) dt =
(∞ −1 ' A(t)e−µt(1−ξ) µ(1 − ξ) 0 ∞ −1 − e−µt(1−ξ) dA(t) µ(1 − ξ) 0 ξ = µ(1 − ξ)
we obtain ∞ −µt(1−ξ) dt = (1 − A(t))e 0
∞
−µt(1−ξ)
e
=
dt −
∞
A(t)e−µt(1−ξ) dt
ξ 1 1 − = µ(1 − ξ) µ(1 − ξ) µ
(8.10)
Hence the asymptotic distributions are given by
π0 = 1 − ρ
and
πj = (1 − ξ)ξ j−1 ρ
for j ≥ 1, with ρ := (µ · E(A))−1 . The condition (8.7), which assures positive recurrence of the chain X , is equivalent to the stability condition ρ < 1. This guarantees the existence of an asymptotic distribution of the system process. The value ρ is called the load of the queueing system. If ρ ≥ 1, which means that the mean service time is not smaller than the mean inter–arrrival time, we expect the queue to be unstable. For the system process Q and already for its embedded Markov chain X we would in this case expect
153
Semi–Markovian Queues
that no asymptotic resp. stationary distributions exist. This will be shown in the remainder of this section. To this aim we will use the concept of a subinvariant measure, which is defined as follows: Let E denote a countable space and P an irreducible stochastic matrix with state space E. A measure µ on E is called subinvariant for P if µi pij µj ≥ i∈E
holds for all j ∈ E. If there is an equality in the above relation, then µ is called invariant for P .
Let X denote a Markov chain with transition matrix P . Define the so–called taboo probabilities in n steps by TP
n
(i, j) := P(X Xn = j, Xk ∈ / T ∀ 0 < k < nX0 = i)
(8.11)
for all i, j ∈ E and the taboo set T ⊂ E . If T = {α} has only one element, we will write α instead of {α} as an index. Now we can show the following important result for irreducible stochastic matrices:
Theorem 8.2 Let X denote an irreducible Markov chain with transition matrix P and countable state space E. Choose any state α ∈ E. Then the measure µα defined by ∞ n α µj := α P (α, j) n=1
is the minimal subinvariant measure for P in the sense that for any other subinvariant measure µ with µα = 1 the relation µj ≥ µαj holds for all j ∈ E. Further µα is invariant for P if and only if P is recurrent. In this case, µα is the only subinvariant measure for P with µαα = 1. Proof: By definition of µα , we obtain
µαi pij
=
µαα pα,j
i∈E
+
∞
i=α n=1 ∞
≤ α P 1 (α, j) + = µαj
αP
αP
n
n
(α, i)pij
(α, j)
n=2
where the inequality comes from the bound µαα = P(ττα < ∞X0 = α) ≤ 1, with τα denoting the first return time to state α. Thus µα is subinvariant and invariant if and only if P(ττα < ∞X0 = α) = 1, i.e. if X is recurrent.
154
AN INTRODUCTION TO QUEUEING THEORY
Let µ denote any other subinvariant measure for P with µα = 1. We will show by induction on n that µj ≥ nk=1 α P k (α, j) holds for all n ≥ 1. First, subinvariance of µ yields µj ≥
i∈E
µi pij ≥ µα pα,j = pα,j = α P 1 (α, j)
for all j ∈ E. The induction step follows from µj ≥ µα pα,j + =
n+ 1
αP
k
i=α
µi pij ≥ pα,j +
n i=α
k=1
αP
k
(α, i) pij
(α, j)
k=1
where the first inequality is due to the subinvariance of µ and the second one follows from the induction hypothesis. The minimality of µα follows in the limit n → ∞. Assume that X is recurrent which implies invariance of µα and µαα = 1. Let µ denote another subinvariant measure for P and assume µα = 1. If µ = µα , then there is a state j ∈ E and a number n ∈ N such that µj > µαj and P n (j, α) > 0, due to the minimality of µα and irreducibility of P . Then we obtain 1 = µα ≥ µi · P n (i, α) > µαi · P n (i, α) = µαα = 1 i∈E
i∈E
which is a contradiction. Hence there is no other subinvariant measure µ with µα = 1. Now we will apply this result to the embedded Markov chain X immediately before arrival times of a GI/M/1 queue. Define the sets [k] := {0, . . . , k} for all k ∈ N0 . Because of the upper Hessenberg structure of the transition matrix P , we obtain 0P
n
(0, k + 1) =
n −1 l=1
0P
l
(0, k ) · [k] P n−l (k , k + 1)
(8.12)
for all k ∈ N by conditioning upon the time of the last visit to state k. The self– similarity of P yields [k] P l (k , k + 1) = 0 P l (0, 1). Summing the equations in
155
Semi–Markovian Queues
(8.12) for all n ≥ 1 yields ∞
0P
n
(0, k + 1) =
n=1
=
=
∞ n −1
0P
l
(0, k ) · [k] P n−l (k , k + 1)
n=1 l=1 ∞ ∞ n−l l (k , k + 1) 0 P (0, k ) [k] P n=l+1 l=1 ∞ ∞ n n 0 P (0, k ) · 0 P (0, 1) n=1 n=1
Setting α = 0, we obtain for the minimal subinvariant measure µ0k+1 = µ0k · µ01
⇔
µ0k = µ00 · ξ k
with ξ = µ01 . Thus any invariant measure for P must have a geometric form. ), the parameter of this geometric distribution is given by the Because of (8.5 n fix point ξ = ∞ n=1 an ξ . If there is no solution 0 < ξ < 1 for this equation, then there cannot exist a finite invariant measure and hence no stationary distribution.
2.
The M/G/1 Queue
The classical counterpart of the GI/M/1 queue is the M/G/1 queue. It admits a similar method of analysis. The M/G/1 queue has a Poisson arrival process and general iid service time distributions. One server works according to the FCFS discipline. The waiting room is infinite such that there are no lost users. Denote the arrival intensity, which is the parameter of the Poisson arrival process, by λ > 0. Further denote the distribution function of the service time by B. In the GI/M/1 queue, the exponential service time appears to be a rather special assumption, since telephone calls, demands on server capacity etc. are certainly not memoryless. This peculiarity translates to memoryless inter–arrival times for the M/G/1 counterpart. However, the following theorem 8.3 shows that this property follows from a few assumptions which can often be observed in classical fields of application, such as the classical (voice only) telephone network. A pure jump process A = (At : t ∈ R+ 0 ) with state space N0 and the property that At ≥ As for all t > s is called a counting process or an arrival process. For an arrival process in a classical telephone network we may assume the following properties. There is a large population of possible users which all act independently from each others. Hence only a finite number of users can
156
AN INTRODUCTION TO QUEUEING THEORY
decide to use the system within a finite time interval. Their decision to enter the system, i.e. to use the system capacity, is homogeneous in time.
Theorem 8.3 Let A denote an arrival process with the following properties: (a) Only a finite number of arrivals occur within a finite time interval. (b) The process A has indendent increments, i.e. the random variables At − As and Av − Au are independent for all s < t ≤ u < v. (c) The process A has stationary increments, i.e. the distribution of At − As for any s < t depends only on the distance t − s. (d) There are only single arrivals, i.e. limh→0 (At+h − At ) ≤ 1 almost certainly for all t ≥ 0. Then A is a homogeneous Poisson process. Proof: Let Φ(t) denote the probability that no arrivals occur in the interval [0, t[, i.e. define Φ(t) := P(At − A0 = 0)
for all t ≥ 0. By definition, 0 ≤ Φ(t) ≤ 1 for all t ≥ 0. Because of assumption (a), the function Φ does not vanish identically, i.e. Φ = 0. Assumptions (b) and (c) imply Φ(s + t) = Φ(s) · Φ(t) (8.13) for all s, t > 0. If there were a time t0 > 0 with Φ(t0 ) = 0, then property (8.13) would yield 0 = Φ(t0 ) = (Φ(t0 /2))2 = (Φ(t0 /4))4 = . . .
such that Φ would vanish arbitrarily near t = 0 and therefore Φ = 0 since Φ is monotone non–increasing. Hence Φ(t) > 0 for all t ≥ 0. The only monotone non–vanishing solution to (8.13) is given by Φ(t) = e−λt for some value λ ≥ 0. By assumptions (b) and (c), this means that the time until the first arrival is distributed exponentially with parameter λ, where λ is independent of the number of arrivals that have already occurred. By assumption (d) there is only one arrival at a time. These two conditions are exactly the defining properties of the Poisson process as given in example 6.5. The case λ = 0 corresponds to the singular case where no arrivals occur ever. Again, the system process Q = (Qt : t ∈ R+ 0 ) has state space E = N0 and Qt denotes the number of users in the system at time t. Similar to the GI/M/1 queue we can construct an embedded Markov chain by considering the number of users in the system immediately after service completions. At
157
Semi–Markovian Queues
these time instances we know that the current service (if there is one) has just begun and need only to remember the number of users in the system in order to predict this number immediately after the next service completion. Define T0 := 0 and Tn as the time of the nth service completion. Further define T := (T Tn : n ∈ N0 ). Let Xn := QTn for all n ∈ N0 and assume that at the time origin there are no users in the system. The Tn are stopping times for Q and by definition Xn is a deterministic function of QTn . Assume that 0 < E(B) < ∞. This implies Tn → ∞ for n → ∞. As shown above, the chain X = (X Xn : n ∈ N0 ) is a Markov chain due to the fact that at service completion times there is either no new service (if the system is empty) or a new service has just begun. The same property of the queue yields condition (7.5). Hence Q is a semi–regenerative process with embedded Markov renewal chain (X , T ). The transition matrix P of X is given by its entries +∞ k dB(t), ak := 0 e−λt (λt) k ! pij = 0,
j =i−1+k j
for i ≥ 1, and p0,j = aj for all j ∈ N0 . The first line above describes the fact that during one service time there need to be k = j − i + 1 arrivals in order to observe j users in the system after the next service completion if there were i users after the last service completion. The second line simply states that within one service time not more than one user can leave the system. The entries p0,j are explained by the fact that if the system is empty after a service completion, then the next service starts only after an arrival has occurred and hence p0,j = p1,j . The matrix P is structured as ⎛
a0 ⎜a0 ⎜ P =⎜0 ⎝ .. .
a1 a1 a0 .. .
a2 a2 a1 .. .
⎞ a3 . . . a3 . . .⎟ ⎟ a2 . . .⎟ ⎠ .. .. . .
Such a matrix is called lower Hessenberg matrix or skip–free to the left. The Markov renewal chain (X , T ) is characterized by Fij (t) = pij · Gij (t), with Gij (t) = P(T Tn+1 − Tn ≤ tX Xn = i, Xn+1 = j) B(t), i>0 = + t −λu λB (t − u) du, i = 0 0 e
158
AN INTRODUCTION TO QUEUEING THEORY
independently of j ∈ N0 . The values Kij (t) = P(T T1 > t, Qt = jX0 = i) are given by ⎧ −λt ⎪ i=j=0 ⎪ ⎨e+ , t −λu −λ(t−u) (λ(t−u))j−1 λe (1 − B(t − u)) du, i = 0, j > 0 Kij (t) = 0 e ((j−1)! ⎪ ⎪ (λt)j −i −λt ⎩ (1 − B(t)) · e 0 0.
Sinceall an are strictly positive, the matr ∞ix P is clearly irreducible. Assume n se := na < 1 a d t ε 1 − that ∞ n n=1 n=1 nan . Further define the function f (n) := n for all n ∈ N0 . Because of ∞
∞
pij f (j) =
j=0
=
aj−i+1 j =
j=i−1 ∞
n=1
∞
j=i−1
aj−i+1 (j − i + 1) + i − 1
nan − 1 + f (i) ≤ f (i) − ε
criterion (see theorem 2.33) and for all i ≥ 1, the function f satisfies Foster’s hence X is positive recurrent if the condition ∞ n=1 nan < 1 holds. Since ∞
n=1
nan =
∞ n
n=1
∞
e−λt
(λt)n dB(t) = n!
= λ · E(B)
∞ ∞
e−λt
n=1
(λt)n−1 (λt) dB (t) (n − 1)!
the above condition is equivalent to the stability condition ρ := λ · E(B) < 1
⇔
E(B) <
1 λ
(8.14)
which simply states that the mean service time be strictly smaller than the mean inter–arrival time. In order to obtain the stationary distribution ν for X , we need to solve the equation system ν0 = ν0 a0 + ν1 a0 ν1 = ν0 a1 + ν1 a1 + ν2 a0 ν2 = ν0 a2 + ν1 a2 + ν2 a1 + ν3 a0 ...
159
Semi–Markovian Queues
For each line k, adding the first k equations yields the recursive scheme a0 ν1 = ν0 r0 a0 ν2 = ν0 r1 + ν1 r1 (8.15) a0 ν3 = ν0 r2 + ν1 r2 + ν2 r1 ... ∞ with th e abbreviations rk := 1 − kn=0 an = n=k+1 an . Define further ∞ ∞ n note t at r := r a d h r = na = ρ < 1 and a0 = 1 − r0 . n n=0 n n=1 Adding all these equations yields (1 − r0 )
∞
νn = ν0 r +
n=1
∞
n=1
νn (r − r0 )
(8.16)
which implies ∞
νn = ν0
n=1
r 1−r
⇐⇒
1 = ν0
r + (1 − r) ν0 = 1−r 1−ρ
Hence the stationary distribution of X is given by ν0 = 1 − ρ and the recursive scheme above.
Theorem 8.4 If the stability condition (8.14) holds, then the asymptotic distribution of the M/G/1 queue is given by πj := lim P(Qt = j) = νj t→∞
for all j ∈ N0 .
Proof: By theorem 7.15 and the fact that Kij (t) = 0 for i > j we obtain j
1 νi πj = νm i=0
∞
Kij (t) dt 0
for all j ∈ E. For the mean renewal interval we get ∞ 1 1−ρ 1 νm = ν0 + E(B) + νn E(B) = + E(B) = λ λ λ n=1
Thus it remains to prove that πj = λ
j i=0
νi
∞
Kij (t) dt = νj
160
AN INTRODUCTION TO QUEUEING THEORY
¯ := 1 − B(t) for all t ≥ 0. First we holds for all j ∈ E . Abbreviate B(t) observe for j > 0 ∞ ∞ t (λ(t − u))j−1 ¯ K0,j (t) dt = e−λu λe−λ(t−u) B(t − u) du dt (j − 1)! 0 0 0 ∞ ∞ (λt)j−1 ¯ −λs = e λ ds · e−λt B(t) dt (j − 1)! 0 0 ∞ = K1,j (t) dt 0
For 1 ≤ i ≤ j it can be shown (see exercises) that ∞ ∞ (λt)j−i ¯ B(t) dt Kij (t) dt = e−λt (j − i)! 0 0 ∞ 1 ∞ (λt)k = dB(t) e−λt λ 0 k!
(8.17)
k=j−i+1
rj−i λ the last equality by definition of (an )n∈N0 and rj−i . Hence we obtain for j ≥ 1 =
πj = ν0 rj−1 +
j
νi rj−i = νj
i=1
according to (8.15). As π and ν are probability distributions and we have shown that πj = νj for all j ≥ 1, we can infer π0 = ν0 as well. As we have done for the GI/M/1 queue, we want to show now that in case of ρ ≥ 1 there is no stationary distribution of the embedded Markov chain X at times of service completion. We will prove this by contradiction. Assume that ρ ≥ 1 and ν be a stationary distribution. Then the recursion scheme and in particular equation (8.16) holds, regardless of the value for ρ = r.
For the case r = 1 we obtain from this equation 0 = ν0 , which implies further νn = 0 for all n ≥ 1 because of P being irreducible. This is in contradiction to the assumpt ion that ν be a distribution. In the case r > 1, we get from equation (8.16) that ∞ n=1 νn = r > 1, again a contradiction to the assumption that ν be a distribution.
3.
The GI/M/m Queue
The last example for semi–Markovian queues is a multi–server queue with exponential servers. Denote all the parameters as for the GI/M/1 queue, i.e.
Semi–Markovian Queues
161
the inter–arrival times are iid with distribution function A, and every server has an exponential distribution with parameter µ > 0. Of course, instead of one server as in section 1, we now have m servers. The service displine is FCFS and the capacity of the waiting room is unbounded. Regardless of the number of servers, all of them are memoryless. Hence the times of arrivals lead to an embedded Markov renewal chain, just as in the case m = 1. The system process Q = (Qt : t ∈ R+ 0 ) has state space E = N0 , with Qt indicating the number of users in the system (i.e. in service or waiting) at time t. Define Tn as the time of the nth arrival and Xn := QTn − 1 as the number of users in the system immediately before the nth arrival. Clearly, the Tn are stopping times and Xn is a deterministic function of QTn . Again we assume that A is not lattice, and 0 < E(A) < ∞. This implies in particular that Tn → ∞ almost surely as n tends to infinity. The sequence X = (X Xn : n ∈ N0 ) is a Markov chain since at times of arrivals the future of the system is determined only by the current number of users in the system, due to the memoryless property of the service times. The same property of the queue ensures the validity of equation (7.5) for the system process Q. Thus the system process Q is semi–regenerative with embedded Markov renewal chain (X , T ). The transition probabilities pij of X are derived by the following considerations. Clearly, there may be only one arrival in any interval ]T Tn , Tn+1 ]. Hence pij = 0 for j > i + 1. Now consider the case j ≤ i + 1 ≤ m. This means that during one inter– arrival period no user is waiting and all are served with exponential intensity µ. Given that the inter–arrival period has length t > 0, the probability for any user to complete service is 1 − e−µt . A transition from state i to state j for the − j outof i + 1 users are served during one Markov chain X means that i + 1i+1 inter–arrival period. There are i+1−j = i+1 combinations to choose which j users complete their service and which do not. Hence for j ≤ i + 1 ≤ m we obtain ∞ i+1 (1 − e−µt )i+1−j (e−µt )j dA(t) (8.18) pij = j 0 by conditioning on the length t of the inter–arrival period. Note that the integrand is the binomial distribution with i + 1 degrees of freedom and parameter e−µt evaluated at 0 ≤ j ≤ i + 1.
The third case is m ≤ j ≤ i + 1. Here, all m servers are busy during the complete inter–arrival period. Then the number of users served in time t is distributed like a Poisson process (see example 6.5) with intensity m · µ evaluated
162
AN INTRODUCTION TO QUEUEING THEORY
at time t. Conditioning on the length of the inter–arrival period, we obtain ∞ (mµ · t)i+1−j −mµ·t dA(t) e (8.19) pij = (i + 1 − j)! 0 for m ≤ j ≤ i + 1. Note that this expression coincides with formula (8.18) for m = j = i + 1. Furthermore it depends only on the difference i + 1 − j , but not on the values of i, j themselves.
The last case to consider is j < m < i + 1. In this situation there are i + 1 − m users waiting in the queue at the beginning of the inter–arrival period, while m − j servers are idle at the end of it. This is a mixture between the second and the third case. First the regime of the latter governs, until there are no waiting users any more (i.e. the queue has emptied). Then the former case applies. Thus we condition first on the length t of the inter–arrival period and then on the time u < t to empty the queue. The time to empty the queue has µ with i + 1 − m stages and intensity mµ. After an Erlang distribution Eim+1−m p that the number of served users has a binomial distribution Bm with m degrees of freedom and parameter p := e−µ(t−u) . This leads to an expression ∞ t µ p pij = Bm (m − j) dE Eim+1−m (u) dA(t) 0 0 ∞ m −jµt t (mµu)i−m −µu = e (e − e−µt )m−j mµ du dA(t) j (i − m)! 0 0 (8.20) which the reader may verify as an exercise. Collecting these results, we can sketch the structure of the transition matrix as ⎛ ⎞ p01 p00 ⎜ p10 ⎟ p11 p12 ⎜ ⎟ . . ⎜ ⎟ .. .. ⎜ ⎟ ⎜ ⎟ . . p . p ⎜ m−2,0 ⎟ m−2,m−1 ⎜ ⎟ pm−1,0 . . . pm−1,m−1 β0 ⎟ P =⎜ ⎜ ⎟ pm,m−1 β1 β0 ⎜ pm,0 . . . ⎟ ⎜ ⎟ .. .. .. .. ⎜ ⎟ . . . . ⎜ ⎟ ⎜ p ⎟ pm+n,m−1 βn+1 βn . . . β0 ⎝ m+n,0 . . . ⎠ .. .. .. .. .. . . . . .
abbreviating βk := pi,i+1−k in case (8.19). The non–specified entries in P correspond to the case j > i + 1 and hence are zero. The matrix P has an upper Hessenberg form like the respective transition matrix for the GI/M/1
163
Semi–Markovian Queues
queue. The most important part of it is the lower right–hand part containing the entries βn . The other parts are boundary conditions.
In order to determine the stationary distribution of X , we first consider the partition E = F ∪ F c with F = {0, . . . , m − 2}. We then obtain for the transition matrix P ′ of the Markov chain restricted to F c the form ⎛ ⎞ r0 β0 ⎜r1 β1 β0 ⎟ ⎜ ⎟ ′ P = ⎜r2 β2 β1 β0 ⎟ ⎝ ⎠ .. .. . . . . . . . . . . . with rn = 1 − nk=0 βk . This has the same form as the transition matrix (8.1) for the GI/M/1 queue. Define ρ=
1 mµ · E(A)
The arguments in section 1 all apply to the matrix P ′ with ρ defined as above. In the case ρ < 1 we obtain a stationary distribution ν ′ = ν ′ P ′ given by νn′ = (1 − ξ)ξ n
∞
(8.21)
with ξ = n=0 ξ n βn . For the case ρ ≥ 1 it follows that P ′ (and hence P ) is not positive recurrent. In the following we assume ρ < 1. By theorem 2.30 there is a unique extension of ν ′ to a stationary measure for P , denoted by ν ′′ = ν ′′ P . For this we have νn′′ = νn′ −m+1 for all n ≥ m − 1 and ∞ ∞ ′′ ′′ νk pk,n+1 = νk′′ pk,n+1 ν n+ 1 = k=0
k=n
for all n = 0, . . . , m − 2, which leads to ∞ 1 ′′ ′′ ′′ νn+1 · (1 − pn+1,n+1 ) − νk pk,n+1 νn = pn,n+1
(8.22)
k=n+2
′′ νm −2
′′ ′′ νm −3 , . . . , ν0
and iteratively can be determined by formula (8.22). Thus The stationary distribution ν = ν P for X is then given as ν = c · ν ′′ for a constant c > 0. This is determined by c
−1
=
∞
n=0
νn′′
=
m −2
νn′′ + 1
(8.23)
n=0
Altogether, formulae (8.21), (8.22), and (8.23) yield the stationary distribution ν = νP for X .
164
AN INTRODUCTION TO QUEUEING THEORY
The asymptotic distribution π of the queueing process Q can now be obtained by theorem 7.15. For n ≥ m we obtain ∞ ∞ c (mµt)k+1−n k−(m−1) dt (1 − ξ)ξ (1 − A(t))e−mµt πn = E(A) (k + 1 − n)! 0 k=n−1 ∞ (mµt · ξ)k+1−n c · (1 − ξ) ∞ −mµt n−m dt = (1 − A(t))e ξ E(A) (k + 1 − n)! 0 k=n−1 c · (1 − ξ) n−m ∞ = ξ (1 − A(t))e−mµt·(1−ξ) dt E(A) 0 Due to (8.10) the integral above equals (mµ)−1 and thus we get to πn = ρ · c · (1 − ξ)ξ n−m
(8.24)
for n ≥ m. The asymptotic probability that all servers are busy is given by ∞
n=m
πn = ρ · c
Hence the conditional asymptotic probability that there are k users in the queue (i.e. k + m users in the system) given that all servers are busy equals π ∞m+k = (1 − ξ)ξ k n=m πn
which means that the conditional asymptotic queue length distribution given that all servers are busy is geometric.
Concerning the asymptotic probabilities πn with n = 1, . . . , m−1, we employ the rate conservation law, for which we first give an intuitive explanation. The arrival process of the GI/M/m queue is a renewal process with renewal intervals distributed by A. Blackwell’s theorem 6.14 states that asymptotically an arrival occurs with constant rate (E(A))−1 . Given that an arrival occurs, there is an asymptotic probability νn−1 of observing n users in the system. On the other hand, out of state n ≤ m − 1 (which has asymptotic probability πn ) the exponential servers provide a constant rate n · µ to switch to state n − 1. Now the rate conservation law states that asymptotically νn−1 ·
1 = πn · nµ E(A)
which means that the probability flow from state n − 1 to state n equals the flow from n to n − 1. This yields νn−1 (8.25) πn = nµ · E(A)
165
Semi–Markovian Queues
for n = 1, . . . , m − 1. Finally we obtain π0 by normalization, i.e. π0 = 1 −
∞
n=1
πn = 1 − ρ · c − mρ
m −1 n=1
νn−1 n
This and formulae (8.25) and (8.24) collect all asymptotic probabilities.
Notes The idea to analyze the M/G/1 queue via its embedded Markov chain has been presented in Kendall [49]. Earlier text book presentations for the M/G/1 and the GI/M/1 queue can be found in Cohen [28] or C¸inlar [25]. The former contains further many special queues which are analyzed via embedded Markov chains as well. The GI/M/m queue has been examined in Kleinrock [50] and Asmussen [5]. The latter contains further an exact presentation of the rate conservation law. For more examples of semi–Markovian queues see Cohen [28]. An application of the semi–Markov method to tandem queues is given in Breuer et al. [23]. Exercise 8.1 Assume exponential service times and a Poisson arrival process for the M/G/1 and GI/M/1 queue, respectively, and show that the results for the asymptotic distribution coincide with the results obtained for the M/M/1 queue. Exercise 8.2 Verify equalities (8.8) and (8.9). Exercise 8.3 Compute mean and variance of the asymptotic number of users in the system for the GI/M/1 queue. These may be expressed in terms of ξ. Derive further the mean sojourn time in the system. Exercise 8.4 Verify equality (8.17). Exercise 8.5 For an M/G/1 queue, show that the z–transform of the number of users which arrive during a service is given by H(z) =
∞
n=0
an z n = B ∗ (λ − λz)
for all z < 1, where B ∗ denotes the LST of the service time distribution. Show that the mean and the variance of this number are ρ and λ2 µ2 (B), respectively, where µ2 (B) denotes the second moment of the service time distribution.
166
AN INTRODUCTION TO QUEUEING THEORY
Exercise 8.6 Consider an M/G/1 queue with batch arrivals. Instead of single arrivals as in the ordinary M/G/1 queue, at every arrival instant the arrival consists of a batch of n ∈ N independent users with probability gn . Arrival instants are distributed as a Poisson process ∞ witnh intensity λ > 0. a) Define the z–transform G(z) := n=1 gn z of the batch size distribution. Show that the z–transform of the number of users which arrive in an interval of length t is N ∗ (t, z ) = e−λt(1−G(z )) . b) Let B ∗ (s) denote the LST of the service time distribution. Show that the z–transform of the number of users which arrive during a service is given by B ∗ (λ − λG(z)). Exercise 8.7 Let Qdn denote the number of users in the system after the nth departure and Kn the number of arrivals between the nth and the n + 1st departure. Justify the relation Dn+1 = (Dn − 1)+ + Kn
where a+ = max(0, a). As n tends to infinity, we obtain for D := limn→∞ Dn and K := limn→∞ Kn the equality D = D − 1D>0 + K in distribution. Take the expectation of D2 in order to derive E(D) = ρ +
ρ2 µ2 (B) 2(1 − ρ)µ21 (B)
(8.26)
where µ21 (B) and µ2 (B) denote the squared first and the second moment of the service time distribution. Use the results from exercise 8.5. Why is this also the mean asymptotic number of users in the system? Equation (8.26) is known as the Pollaczek–Khinchin mean value formula. Exercise 8.8 Show that the asymptotic mean number of users in an M/G/1 queue is minimal for deterministic service time distributions. Exercise 8.9 Derive expression (8.20).
Part III MatrixAnalytic Methods
This page intentionally left blank
Chapter 9 PHASE–TYPE DISTRIBUTIONS
The memoryless property of the exponential distribution has been substantial for arriving at embedded Markov chains in chapter 8 when analyzing GI/M/1 and M/G/1 queues. The stationary distributions of these chains served as a foothold for a semi–regenerative analysis. Our goal pursued in the next two chapters is to find generalizations beyond the exponential distribution and/or the Poisson process that are more versatile in their modelling capacity, but still allowing analyses of the respective queues by means of embedded Markov chains.
1.
Motivation
In the present chapter, an extremely versatile class of distributions, the so– called phase–type or PH distributions, will be introduced. It is possible to approximate any distribution on the non–negative real numbers by a PH distribution, and the resulting queueing models can be analyzed almost as if we have dealt with the exponential distribution. As a motivation, we begin with a practical example. Consider the M/M/c/c+K queue, which is defined as follows. Arrivals are modelled by a Poisson process with rate λ > 0. Service times are exponentially distributed with rate µ > 0. There are c servers, and the capacity of the waiting room is K. That means that in total there is room for c+K users in the system including the servers. If upon an arrival the system is filled, i.e. with c + K users already in it, this arriving user is not admitted into the system. In this case we say that the arriving user
170
AN INTRODUCTION TO QUEUEING THEORY
is lost. Queueing systems with the possibility of such an event are thus called loss systems.
The queue described above is a simple Markov process with generator ⎛ ⎞ −λ λ ⎜ µ −λ − µ ⎟ λ ⎜ ⎟ ⎜ ⎟ 2µ −λ − 2µ λ ⎜ ⎟ .. .. .. ⎜ ⎟ . . . ⎜ ⎟ Q=⎜ ⎟ cµ −λ − cµ λ ⎜ ⎟ ⎜ ⎟ .. .. .. ⎜ ⎟ . . . ⎜ ⎟ ⎝ cµ −λ − cµ λ ⎠ cµ −cµ
up to the first loss (all non–specified entries equal zero).
From a system administrator’s point of view, the loss of a user is regarded as a bad event, and thus the question arises naturally how the distribution of the time up to the first loss might be expressed. However, the above description of the queueing process simply ignores loss events, as can be seen from the missing λ entries in the last line of the generator.
In order to include a possible loss event into our model of the queue, we add a new element to the state space and enlarge the generator as follows: ⎛ ⎞ −λ λ ⎜ µ −λ − µ λ ⎟ ⎜ ⎟ .. .. .. ⎜ ⎟ . . . ⎜ ⎟ ⎜ ⎟ c cµ µ −λ − λ ⎜ ⎟ Q′ = ⎜ ⎟ .. .. .. ⎜ ⎟ . . . ⎜ ⎟ ⎜ ⎟ cµ −λ − cµ λ ⎜ ⎟ ⎝ cµ −λ − cµ λ ⎠ 0 ... ... 0
again with all non–specified entries being zero. The first m = c + K + 1 states describe the number of users in the system, just as in the former generator Q. But now there is the possibility to enter another state m + 1 with rate λ from state m, obviously meaning exactly that a loss has occured. Since we want to observe the system only until the first loss, we choose the loss state m + 1 as an absorbing one. Thus all entries in the last line are zero. Now the system administrator’s question can be formulated mathematically as the distribution of the time until the Markov process with generator Q′ enters the absorbing state m + 1. Exactly this problem is addressed (in a general form) by the concept of a phase–type distribution.
171
Phase–Type Distributions
2.
Definition and Examples
Definition 9.1 Let X = (X Xt : t ≥ 0) denote an homogeneous Markov process with finite state space {1, . . . , m + 1} and generator T η Q= 0 0
where T is a square matrix of dimension m, η a column vector and 0 the zero row vector of the same dimension. The initial distribution of X shall be the row vector α ˜ = (α, αm+1 ), with α being a row vector of dimension m. The first states {1, . . . , m} shall be transient, while the state m + 1 is absorbing. Let Z := inf{t ≥ 0 : Xt = m + 1} be the random variable of the time until absorption in state m + 1. The distribution of Z is called phase–type distribution (or shortly PH distribution) with parameters (α, T ). We write Z ∼ P H(α, T ). The dimension m of T is called the order of the distribution P H(α, T ). The states {1, . . . , m} are also called phases, which gives rise to the name phase–type distribution. Let 1 denote the column vector of dimension m with all entries equal to one. The first observations to be derived from the above definition are η = −T 1
and αm+1 = 1 − α1
These follow immediately from the properties that the row sums of a generator are zero and the sum of a probability vector is one. The vector η is called the exit vector of the PH distribution. Now the distribution function and the density of a PH distribution are derived in Theorem 9.2 Let Z ∼ P H(α, T ). Then the distribution function of Z is given by F (t) := P(Z ≤ t) = 1 − αeT ·t 1
(9.1)
for all t ≥ 0, and the density function is f (t) = αeT ·t η for all t > 0. Here, the function eT ·t := exp(T · t) := matrix exponential function.
(9.2) ∞
tn
n=0 n! T
n
denotes a
Proof: For the Markov process X with generator Q as given in definition 9.1 the equation T ·t 1 − eT ·t 1 e P (t) = exp(Q · t) = 0 1
172
AN INTRODUCTION TO QUEUEING THEORY
holds for the transition matrix P (t) at every time t ≥ 0. This implies F (t) = αe ˜ Q·t em+1 = αm+1 + α · (1 − eT ·t 1) = αm+1 + α1 − αeT ·t 1
= 1 − αeT ·t 1
with em+1 denoting the m+1st canonical base vector. For the density function we obtain f (t) = F ′ (t) = −α
d T ·t e 1 = −αT eT ·t 1 = αeT ·t (−T 1) = αeT ·t η dt
which was to be proven. A first consequence is F (0) = αm+1 , which is also clear from definition 9.1. An important question to be examined is when a phase–type distribution is non–defective, i.e. what the conditions for F (∞) = limt→∞ F (t) = 1 are. This is answered in
Theorem 9.3 Let F denote a P H(α, T ) distribution function. F is non– defective, i.e. F (∞) = 1 for all α, if and only if T is invertible. In this case, (−T −1 )ij is the expected total time spent in state j given that the process X started in state i. Proof: Let Eij denote the expected total time spent in state j given that the process X started in i. Define E = (E Eij )i,j≤m as the respective matrix of expectations. First we assume that F (∞) = 1 for all α, i.e. that F is non–defective. This means that with probability one there is an absorption from any initial state i. This implies for E to be finite, i.e. Eij < ∞
for all i, j ∈ {1, . . . , m}
Conditioning on the first state visited after i yields the relations Eij =
Tik Ek j −Tii k=i
Eii =
for all i = j
Tik 1 + Ek i −Tii −Tii k=i
In matrix notation, this is expressed as T E = −I , with I denoting the identity matrix. Hence we obtain E = −T −1 , which was to be proven.
173
Phase–Type Distributions
Now we assume that T is invertible. Define the vector Φ(x) = exp(T x)1 for all x ≥ 0. The numbers Φi (x) are the probabilities that the process X is in one of the states {1, . . . , m} after time x given that the initial state was i. Hence Φi (x) ∈ [0, 1]
for all i ∈ {1, . . . , m}
Further the equation eT ·t = I +
t
T eT ·x dx
holds as can be seen by differentiating both sides and acknowledging eT ·0 = I. Multiplying by T −1 from the left side and by 1 from the right side yields t −1 −1 T ·t −1 T Φ(t) = T e 1 = T 1 + eT ·x dx1 0
As all entries of Φ(t) are finite, we obtain for t tending to infinity t lim eT ·x dx < ∞ t→∞ 0
in an entry–wise meaning. But the values (eT ·x )ij are simply the probability that the process X is in state j at time x given that it started in state i. Hence we obtain ∞ (eT ·x )ij dx < ∞ for all i, j ∈ {1, . . . , m} Eij = 0
which means that all states j ∈ {1, . . . , m} are transient. Thus an absorption in state m + 1 is certain regardless of the initial distribution, which was to be proven. From now on T shall be assumed to be invertible. In order to show the versatility of the phase–type concept, we shall give a few examples below. Important characteristics for distributions are their moments. Given a distribution function F , its nth moment (if existing) is given by ∞ tn dF (t) Mn (F ) := 0
Clearly, the first moment is the mean of the distribution. The nth moment of the exponential distribution with parameter λ is given by Mn = n!/(λn ) (see exercises). Another important characteristic is the so–called squared coefficient of variation, defined by CV (F ) := Var(F )/E(F )2
174
AN INTRODUCTION TO QUEUEING THEORY
with Var(F ) denoting the variance of F . For any exponential distribution this equals one. The values of the squared coefficient of variation will explain the names for the hypo and hyper–exponential distributions introduced below. Example 9.4 Erlang distribution A well–known distribution within the family of Gamma distributions is the so–called Erlang distribution. An Erlang distribution Enλ with n degrees of freedom (or stages) and parameter λ is the distribution of the sum of n exponential random variables with parameter λ. It has the density function f (t) =
λn tn−1 e−λt (n − 1)!
for all t ≥ 0. Its interpretation as a succession of n exponential distributions with rate λ each can be illustrated graphically as in λ λ Figure 9.1.
...
λ
Erlang distribution
Here we see that an Erlang distribution can be represented as the holding time in the transient state set {1, . . . , n} of a Markov chain with absorbing state n + 1 where the only possible transitions occur from a state k to the next state k + 1 (for k = 1, . . . , n), with rate λ each. In terms of our definition 9.1, we have a PH representation ⎛ ⎞ ⎛ ⎞ −λ λ 0 ⎜ ⎟ ⎜ .. ⎟ . . . . ⎜ ⎟ ⎜ ⎟ . . α = (1, 0, . . . , 0), T = ⎜ ⎟ and η = ⎜ . ⎟ ⎝ ⎠ ⎝0⎠ −λ λ −λ λ
with all non–specified entries in T being zero.
The mean of an Erlang distribution with n degrees of freedom and parameter λ is n/λ, while its squared coefficient of variation is 1/n, i.e. less than one if n > 1 (see exercises). This explains the name hypo–exponential distribution appearing in the next example. Example 9.5 Generalized Erlang distribution A slight generalization of the Erlang distribution is obtained if one admits the exponential stages to have different parameters. Then we talk about a generalized Erlang (or a hypo–exponential) distribution. The representation as a PH distribution results in the figure
Phase–Type Distributions
λ1 λ2 Figure 9.2.
175
λn−1
...
Generalized Erlang distribution
and leads to a PH representation ⎛ ⎞ −λ1 λ1 ⎜ ⎟ .. .. ⎜ ⎟ . . α = (1, 0, . . . , 0), T = ⎜ ⎟ ⎝ −λn−1 λn−1 ⎠ −λn
⎛
⎞ 0 ⎜ .. ⎟ ⎜ ⎟ and η = ⎜ . ⎟ ⎝0⎠ λn
with all non–specified entries in T being zero. For this family of distributions, a closed formula for the density function is already rather complex.
Example 9.6 Hyper–exponential distribution A hyper–exponential distribution is a finite mixture of n ∈ N exponential distributions with different parameters λk (k = 1, . . . , n). Its density function is given as n qk λk e−λk t f (t) = with proportions qk > 0 of this distribution is
HH
k=1 satisfying nk=1 qk
= 1. A graphical representation
q1 * q2
.. .
HH qn HH j Figure 9.3. Hyper–exponential distribution
This leads to a PH representation by ⎛ −λ 1 ⎜ α = (π1 , . . . , πn ), T = ⎝
..
⎞
.
−λn
⎟ ⎠
⎛
⎞ λ1 ⎜ ⎟ and η = ⎝ ... ⎠ λn
176
AN INTRODUCTION TO QUEUEING THEORY
with all non–specified entries in T being zero. n The mean of a hyper–exponential distribution is i=1 πi /λi , while its squared coefficient of variation is always larger than one if n > 1. This explains the name hyper–exponential distribution.
Example 9.7 Cox distribution A more complex example of the classical families of distributions are the Cox distributions. These are generalized Erlang distributions with preemptive exit options. A Coxian random variable measures the holding time within the box depicted as q1 q2 qn−1  ... @ 1 − q1 @ 1 − q2 @ 1 − qn−1 @ @ @ R @ R @ R @ Figure 9.4.
Cox distribution
A Cox distribution can be described as a special PH distribution with parameters α = (1, 0, . . . , 0) and ⎛ ⎞ ⎛ ⎞ (1 − q1 )λ1 −λ1 q1 λ1 ⎟ ⎜ ⎟ ⎜ .. .. .. ⎜ ⎟ ⎜ ⎟ . . . T =⎜ η=⎜ ⎟, ⎟ ⎠ ⎝ ⎝ −λn−1 qn−1 λn−1 (1 − qn−1 )λn−1 ⎠ −λn λn for which all non–specified entries in T are zero.
As we have seen in example 9.6, the set of transient states in a PH distribution may fall apart into several communication classes. The definition of a phase– type distribution leaves open the possibility of a transient communication class which cannot be entered because the respective initial probabilities contained in the row vector α are zero. Such states are called superfluous, since the Markov process X defining the PH distribution will never be in such a state. As we will obtain the same distribution of the time until absorption if we leave out superfluous states, we shall from now on (unless stated otherwise) assume that there are no superfluous states in the definition of a phase–type distribution.
3.
Moments
A good means to determine the moments of a distribution is the Laplace– Stieltjes transform (or shortly LST, see appendix). This is derived in
177
Phase–Type Distributions
Theorem 9.8 The LST of a phase–type distribution F = P H(α, T ) is given by ∞
Φ(s) :=
e−st dF (t) = αm+1 + α(s · I − T )−1 η
for all s ∈ C with Re(s) ≥ 0.
Proof: For s = 0 the statement is obvious. Be s = 0 and Re(s) ≥ 0. Integration by parts yields ∞ ∞ −1  −st T ·t .∞ −st T ·t − dt e−st eT ·t dt = e e e e T 0 s 0 0
As f of theorem 9.3 that + ∞T Tis·t assumed to be invertible, we know from theTproo ·t = 0, also entry–wise. dt entry–w se, an ence li e < ∞ i d h m e t→∞ 0 This yields ∞ ∞ 1 1 e−st eT ·t dt = · I + · e−st eT ·t dtT s s 0 0
which implies
∞
and hence ∞ 0
e−st eT ·t dt (s · I − T ) = I
e−st eT ·t dt = (s · I − T )−1
This leads to
for all s = 0 with Re(s) ≥ 0.
∞ e−st dF (t) = αm+1 + e−st αeT ·t η dt 0 0 ∞ −st T ·t = αm+1 + α e e dt η = αm+1 + α(s · I − T )−1 η
Φ(s) =
∞
which is the statement. Corollary 9.9 Let Z ∼ P H(α, T ). The moments of Z are given by
E(Z n ) = (−1)n · n! · αT −n 1 for all n ∈ N. Proof: Because of dn (s · I − T )−1 = (−1)n · n! · (s · I − T )−(n+1) d sn
178
AN INTRODUCTION TO QUEUEING THEORY
we obtain dn Φ(s)s=0 d sn = n! · α(s · I − T )−(n+1) s=0 η = n! · α(−T )−n (−T )−1 (−T )1
E(Z n ) = (−1)n ·
= n! · α(−T )−n 1
In the next chapter it will be shown in corollary 10.12 that another expression for the mean is given by E(Z) = (πη)−1 with π(T + ηα) = 0.
4.
Closure Properties
A useful advantage of phase–type distributions is the fact that certain compositions of PH distributions result in PH distributions again. This means that the class of PH distributions is closed under these compositions. For PH distributed random variables Z1 and Z2 we will show closure properties for the compositions Z1 +Z Z2 (convolution), pZ1 +(1 − p)Z Z2 with p ∈ [0, 1] (mixture), and min(Z1 , Z2 ).
Theorem 9.10 Let Zi ∼ P H(α(i) , T (i) ) of order mi for i = 1, 2. Then Z = Z1 + Z2 ∼ P H(α, T ) of order m = m1 + m2 with representation (1) αk , 1≤k≤m αk = (1) (2) αm1 +1 · αk−m1 , m1 + 1 ≤ k ≤ m and (1) (1) (2) η α T T = 0 T (2) where η (1) = −T (1) 1m1 and 0 denotes a zero matrix of appropriate dimension. Proof: By definition, Zi is the random variable of the time until absorption in a Markov process Xi with transient states {1, . . . , mi } and an absorbing state which shall be denoted by ei in this proof. The transition rates of Xi within the set of transient states are given by the matrix T (i) and the absorption rates from the transient states to the absorbing state are given by the vector η (i) .
Then the random variable Z = Z1 + Z2 is the total time duration of first entering e1 and then e2 in the Markov process which is structured as follows:
179
Phase–Type Distributions
α(1) @
@
@
(1) αm1 +1@
η (1)
@ R ? @
e1
α(2) @
@
(2)@ αm2 +1@
R @
Figure 9.5.
η (2)
?
e2
Convolution of two PH distributions
Here the point e1 is not a state of the Markov process described above but only an auxiliary construction aid for a better illustration. In particular there is no holding time in e1 . The only absorbing state in the Markov process constructed above is e2 . (1)
With probability αm1 +1 we enter the first absorbing state e1 immediately, while the vector α(1) contains the probabilities that we first enter the set of transient states of X1 . In the latter case, the matrix T (1) and then the vector η (1) determine the time until the first absorption in e1 . After having reached e1 , the chain immediately (i.e. with no holding time in e1 ) proceeds to the second stage, which is completely analogous to the first. (2) With probability αm2 +1 we enter the second absorbing state e2 immediately, while the vector α(2) contains the probabilities that we first enter the set of transient states of X2 . In the latter case, the matrix T (2) and then the vector η (2) determine the time until the first absorption in e2 .
Thus we get to the second absorbing state e2 immediately with probability (1) (2) αm1 +1 · αm2 +1 . There are transient states {1, . . . , m1 , m1 + 1, . . . , m1 + m2 }. The first m1 of these are reached with probabilities α1 , . . . , αm1 , while the last m2 of these states can only be reached via an immediate first absorption in e1 (1) (2) and thus with probabilities αm1 +1 · αi for i = 1, . . . , m2 . This explains the expression for α. In order to explain the structure of T , we observe first that there is no path from the second set of transient states to the first, whence the lower left entry of T is zero. The diagonal entries of T describe the transition rates within the two sets of transient states, respectively, and thus are given by T (1) and T (2) . The only way to get from the first to the second set of transient states is the path via e1 for which we first need the rates given in η (1) and then the probabilities
180
AN INTRODUCTION TO QUEUEING THEORY
contained in α(2) . Hence the upper right entry of T .
Theorem 9.11 Let Zi ∼ P H(α(i) , T (i) ) of order mi for i = 1, 2, as well as p ∈ [0, 1]. Then Z = pZ1 + (1 − p)Z Z2 ∼ P H(α, T ) of order m = m1 + m2 with representation (1) T 0 (1) (2) α = (p · α , (1 − p) · α ) and T = 0 T (2) where 0 denote zero matrices of appropriate dimensions. Proof: Going along the line of reasoning of the last proof, we observe that Z is equal to Z1 with probability p and equal to Z2 with probability 1 − p. Hence we obtain the following construction of a Markov process:
XX X XXXX
(1) XX η XXX (1) (2) XX z X pαm1 +1 + (1 − p)αm2 +1  e : @ @ η (2) (1 − p)α(2)@ @ R @
pα(1)
Figure 9.6.
Mixture of two PH distributions (1)
Here, we enter the first set of transient states with probabilities p · αi for (2) i = 1, . . . , m1 and the second set with probabilities (1 − p) · αi for phases i = m1 + 1, . . . , m2 . This explains the expression for α.
From either of these sets we proceed with transition matrices T (i) and exit vectors η (i) , i = 1, 2, in order to reach the absorbing state e. There is no path from one set of transient states to the other, which explains the structure of T . The absorbing state e can be reached immediately (i.e without entering any (1) (2) transient state) with probability pαm1 +1 + (1 − p)αm2 +1 . In order to formulate the next theorem, we first need to define the so–called Kronecker compositions of matrices. Let A = (aij ) and B = (bij ) denote
181
Phase–Type Distributions
n1 × m1 and n2 × m2 matrices, respectively. The Kronecker product of A and B is defined as the (n1 · n2 ) × (m1 · m2 ) matrix A ⊗ B with entries (A ⊗ B)(i1 ,i2 ),(j1 ,j2 ) := ai1 ,j1 · bi2 ,j2 for all 1 ≤ ik ≤ nk and 1 ≤ jk ≤ mk , k = 1, 2. As a block matrix we can write ⎛ ⎞ a11 B . . . a1m1 B ⎟ ⎜ .. A ⊗ B = ⎝ ... ⎠ . an1 1 B . . . an1 m1 B
If A and B are square matrices, i.e. nk = mk for k = 1, 2, then the Kronecker sum A ⊕ B of the matrices A and B is defined as A ⊕ B := A ⊗ I2 + I1 ⊗ B
with Ik denoting the nk × nk identity matrix for k = 1, 2. Example 9.12 Let n1 = m1 = 1 and n2 = m2 = 2. If A = −λ and −µ µ −(λ + µ) µ B= , then A ⊕ B = 0 −µ 0 −(λ + µ) is an explicit expression for the Kronecker sum of A and B.
Theorem 9.13 Let Zi ∼ P H(α(i) , T (i) ) of order mi for i = 1, 2 and define Z = min(Z1 , Z2 ). Then Z ∼ P H(α, T ) of order m = m1 · m2 with representation α = α(1) ⊗ α(2)
and T = T (1) ⊕ T (2)
in terms of the Kronecker compositions. Proof: For i = 1, 2, the random variables Zi are the times until absorption (i) in the Markov processes Xi = (X Xt : t ≥ 0) where the initial distributions for the transient states are α(i) and the transition rates among the transient states are given by T (i) . Thus we can determine Z if we start running X1 and X2 concurrently and stop whenever the first of the two processes enters the absorbing state. We will show that the two–dimensional Markov process X depicted as in the figure below has the same time until absorption as the first absorption of the concurrent processes X1 and X2 . The state space of X shall be E = {(i, j) : 1 ≤ i ≤ m1 , 1 ≤ j ≤ m2 } ∪ {e}
182
AN INTRODUCTION TO QUEUEING THEORY
H
T (1) ⊕ T (2)
α(1) ⊗ α(2)
HH HH
HH
HH
η
HH ? je
Figure 9.7. Superposition of two PH distributions
where e is the absorbing state and all other states are transient. We will keep (1) (2) in mind the interpretation that Xt = (i, j) means Xt = i and Xt = j for all transient states i, j. The exit vector η of dimension m1 · m2 has entries (1) (2) ηij = ηi + ηj for all i ≤ m1 and j ≤ m2 . Since we start the processes X1 and X2 independently, we clearly have an initial distribution (1)
P(X0 = (i, j)) = P(X0
(2)
= i) · P(X0
(1)
(2)
= j) = αi · αj
which explains the expression for α. If the process X is in state (i, j), this means that the exponential holding times in the states i (for X1 ) and j (for X2 ) are running concurrently. According to lemma 3.2 they almost certainly do not stop at the same time instant. Thus X has only state transitions from (2) (1) (i, j) to either (i, h) or (k , j). These occur with transition rates Tjh or Tik , respectively, if h and k are transient states. According to lemma 3.2 the holding (1) (2) time in state (i, j) is exponential with parameter −(T Tii + Tjj ). This explains the structure of T . The values of η are readily verified by ⎛ ⎞ (1) (2) (2) (1) T + T ⎠ ηij = −(T 1m1 m2 )(i,j) = − ⎝T + T + ii
jj
jh
h=j
=−
m1 k=1
(1)
Tik −
m2
(2)
(1)
Tjh = ηi
ik
k=i
(2)
+ ηj
h=1
Thus we can see that Z = min(Z1 , Z2 ) is the time until absorption in the Markov process X . Example 9.4 and theorem 9.11 already suffice to prove the following powerful
Phase–Type Distributions
183
Theorem 9.14 The class of phase–type distributions is dense (in terms of weak convergence) within the class of all distributions on R+ 0. Proof: Let F : R+ 0 → [0, 1] denote any non–negative distribution function. Since it is bounded, monotone and right–continuous, we can approximate F by a step function G with countably many jumps at (tn : n ∈ N0 ), where tn < tn+1 for all n ∈ N. The error ε > 0 of approximation can be chosen arbitrarily small such that F (t) − G(t) < ε holds for all t ≥ 0. If t0 = 0, i.e. if there is a jump of G at zero, we can write ˜ G = p0 · δ0 + (1 − p0 ) · G
˜ = (G−G(0))/(1−p0 ). The Dirac distribution function with p0 = G(0) and G δ0 is a phase–type distribution with m = 0 and αm+1 = 1. In view of example 9.4 and theorem 9.11, it now suffices to show that we can approximate the ˜ by a finite mixture of Erlang distributions. First we find a truncation function G ˜ such that G(T ) > 1 − ε. Then there is a number N ∈ N such point T of G ˜ can be approximated by that tn > T for all n > N . Thus G H=
N −1
n=1
˜ n ) − G(t ˜ n−1 )) · δtn + (1 − G(t ˜ N )) · δt (G(t N
with an error bounded by ε. For every n = 1, . . . , N we approximate the Dirac distribution δtn by a suitable Erlang distribution. This possible because of the following argument: The variance of an Erlang distribution Ekkλ of order k with parameter k · λ is given by (k · λ2 )−1 (see exercises) and thus tends to zero as k grows larger. Since the mean of such an Erlang distribution is 1/λ (see exercises), Chebyshev’s inequality tells us that the sequence (Ekkλ : k ∈ N) converges in probability (and hence weakly) towards δtn if we chose λ = 1/tn . This means that there is a K/t number K ∈ N such that the distribution function Hn of an EK n distribution satisfies H Hn (t) − δtn (t) < ε for all t ≥ 0.
If we pursue the above approximation method for every n = 1, . . . , N and define ˜ = H
N −1
n=1
˜ n ) − G(t ˜ n−1 )) · Hn + (1 − G(t ˜ N )) · HN (G(t
˜ < ε. According to example then we obtain an approximation bound H − H ˜ 9.4 and theorem 9.11 the distribution H is phase–type. ˜ with an apIn summary, we have approximated F by p0 · δ0 + (1 − p0 ) · H proximation bound of 3 · ε. This proves our statement.
184
AN INTRODUCTION TO QUEUEING THEORY
Notes Phase–type distributions have been introduced in Neuts [62] as a generalization of the Erlang and hyper–exponential distribution. A classical introduction to phase–type distributions is given in Neuts [65]. Statistical methods for fitting PH distributions are given in Asmussen et al. [7]. Phase–type distributions with infinitely many phases are introduced in Shi et al. [78], and Shi and Liu [79]. The name of a superfluous state as well as the motivating example at the beginning of the section have been taken from Latouche and Ramaswami [52]. The proofs of the closure properties have been chosen to be as constructive and illustrating as possible. More classical proofs via comparison of the Laplace transforms can be found in Neuts [65]. Exercise 9.1 Show that the density f (t) of a phase–type distribution function is strictly positive for all t > 0. Exercise 9.2 Compute the Laplace–Stieltjes transform, all moments as well as the squared coefficient of variation for the exponential, the Erlang, and the hyper–exponential distribution. Exercise 9.3 Use the results from exercise 9.2 in order to show that the Erlang distribution with parameter nλ and n degrees of freedom is the n–fold convolution of an exponential distribution with parameter nλ. Employ this result for a simple proof of formula (6.2). Exercise 9.4 Consider two machines running independently at the same time. The one has a life time which is distributed as a generalized Erlang with two stages and parameters λ1 and λ2 . The other machine’s life time has a hyper– exponential distribution with density f (t) = p · µ1 e−µ1 t + (1 − p) · µ2 e−µ2 t . As soon as a machine fails, it is given to repair which takes an exponentially distributed amount of time with parameter κ. After repair it starts working immediately. Determine the distribution of the time until both machines are broken down. Exercise 9.5 Consider the M/PH/k queue with Poisson input and phase–type service time distribution for all its k servers. Derive a description for this queue in terms of a (k + 1)–dimensional Markov process. Exercise 9.6 Find the stationary distribution for the M/PH/1 queue.
Chapter 10 MARKOVIAN ARRIVAL PROCESSES
In this chapter we are going to generalize the concept of a Poisson process in three steps. We shall arrive thereby at the class of so–called Batch Markovian Arrival Processes (shortly BMAPs) that comprises a great variety of processes and so provides much more realistic modelling tools than the class of processes considered so far can offer. The big advantage of the very procedure of generalizing basic Markovian concepts is that it essentially keeps a lot of Markovian behaviour.
1.
The PH renewal process
The Poisson process is a renewal process with exponentially distributed renewal intervals (see example 6.5). In the last section we have introduced a powerful generalization of the exponential distribution. As a first step to go beyond the Poisson process, it seems natural to replace the exponential distribution of the renewal intervals by a phase–type distribution. This leads us immediately to the class of PH renewal processes. To be precise, a renewal process N = (N Nt : t ∈ R+ 0 ) with phase–type distributed renewal intervals is called a PH renewal process. While a concrete determination of the renewal function or the time–dependent behaviour of an arbitrary renewal process is hard to derive, we have seen in example 6.5 that in the case of exponential renewal intervals, i.e. for the Poisson process, simple expressions can be derived. Since an exponential distribution is a phase–type distribution of order m = 1, a PH renewal process clearly generalizes the Poisson process. We want to show that the behaviour of PH renewal processes can still be described by rather simple expressions.
186
AN INTRODUCTION TO QUEUEING THEORY
To this aim, we first will give a Markovian description of a PH renewal process. For a phase–type distribution P H(α, T ), the remaining time Z until absorption, given that the current phase is i, can be expressed by P(Z ≤ tX0 = i) = 1 − ei eT ·t 1 and thus has the same form as a P H(ei , T ) distribution, with ei denoting the ith canonical row base vector. This is the conditional memoryless property of the phase–type distribution. If we keep track of the current phase of the PH distribution during renewal intervals, then we obtain a Markovian description (N , J ) of the PH renewal process N . This is derived as follows (cf. notations in definition 1). Clearly, the state space of Y = (N , J ) is E = N0 × {1, . . . , m}, with Nt denoting the number of arrivals until time t and Jt being the current phase at time t. The holding times depend only on the current phase of the PH distribution, i.e. λn,i = λi for all n ∈ N0 . Since N is a renewal process, the state transitions of the embedded Markov chain X are restricted by pn,i;m,j = 0 for m < n or m > n + 1. Thus there are state transitions from (m, i) to (m + 1, j) or to (m, j), which are called transitions with or without arrivals, respectively. For transitions without arrivals, there is no renewal event and hence no absorption for the PH distribution, which means that these transitions are described by the parameter matrix T of the PH distribution of the renewal intervals. For transitions with arrivals, we observe the following dynamics. Being in phase i, there is an absorption (hence a renewal event) with rate ηi . After that, a new PH–distributed renewal interval begins and a phase is chosen according to the initial phase distribution α. Hence transitions with arrivals are determined by the rate matrix A := ηα with η := −T 1. After ordering the state space E = N0 × {1, . . . , m} lexicographically, we can write the infinitesimal generator matrix G of the Markov process Y = (N , J ) as a block matrix ⎛ ⎞ T A ⎜ ⎟ T A ⎜ ⎟ G=⎜ ⎟ T A ⎝ ⎠ .. .. . .
with the non–specified blocks being zero matrices, and A := η α.
Before analyzing the behaviour of this process, we shall generalize its structure two steps further. Then we will pursue an analysis from a more general viewpoint.
187
Markovian Arrival Processes
2.
From PH renewal processes to MAPs
An essential feature of the PH renewal process is that immediately after an arrival (i.e. a renewal event) the phase distribution always is α. This makes it a real renewal process with iid renewal intervals. However, in modern communication systems like the internet or other computer networks there may be strong correlations between subsequent inter–arrival times. Thus it is a natural idea to introduce a dependence between the subsequent renewal intervals. This can be done without changing the block structure of the generator. Writing down the row vectors of the matrix A, we observe ⎞ ⎛ η1 · α ⎟ ⎜ A = ⎝ ... ⎠ ηm · α
meaning that the row entries differ only by a scalar ηi and thus the new phase after an arrival is chosen independently of the phase immediately before that arrival.
If we relax this restriction, we arrive at a new matrix ⎛ ⎞ η1 · α1 ⎜ ⎟ .. A′ = ⎝ ⎠ . ηm · αm
with the only requirement that αi 1 = 1 for all i = 1, . . . , m. Here the phase distribution after an arrival depends on the phase immediately before that arrival. However, the requirement αi 1 = 1 in connection with the fact that η = −T 1 simply restates the observation that the row entries of a generator matrix sum up to zero. Thus there is no real restriction in choosing A′ . If we denote D0 := T and D1 := A′ as usually done in the literature, we arrive at a generator ⎛ ⎞ D0 D 1 ⎜ ⎟ D0 D1 ⎜ ⎟ G=⎜ ⎟ D D 0 1 ⎝ ⎠ .. .. . .
with no restrictions on the matrices D0 and D1 except that G be a generator matrix and D1 is non–negative. A Markov process with such a generator is called Markovian Arrival Process (or shortly MAP). These arrival processes play an important part in today’s queueing models.
188
AN INTRODUCTION TO QUEUEING THEORY
Differing from PH renewal processes as a special case, MAPs are not renewal but semi–Markov processes (see section 2). The methods we will employ for their analysis still allow a further generalization, which also is motivated by observations of traffic in modern communication networks.
3.
From MAPs to BMAPs
In a computer network it is not uncommon that a client sends various jobs to the server at the same time. After being sent they are treated as separate entities. For our modelling tools concerning the arrival process this means that we observe several arrivals at the same time. These are called batch arrivals or arrivals in batches. It is a simple matter to include this into our concept of Markovian arrival processes. We observe that for MAPs the matrix D0 on the main block diagonal contains the transition rates without arrivals. The matrix D1 on the first upper block diagonal contains transition rates with single arrivals. The lexicographic order of the state space implies that any (positive) entry in the k th upper block diagonal of the generator matrix G would be a transition rate for an arrival of k jobs at the same time. Hence a natural extension of MAPs which include the possibility of batch arrivals are Markov processes with a generator of the block structure ⎞ ⎛ D0 D1 D2 D3 . . . . ⎟ ⎜ D0 D1 D2 . . ⎟ ⎜ ⎜ G=⎜ .. ⎟ .⎟ D D ⎠ ⎝ 0 1 .. .. . .
again with the non–specified blocks (i.e. all entries in the lower block diagonals) being zero matrices. Such processes are called Batch Markovian Arrival Processes (or shortly BMAPs). A matrix Dk contains the transition rates for a batch arrival of size k, i.e. the event that k jobs arrive at the same time. The sequence ∆ = (Dn : n ∈ N0 ) uniquely determines the generator G and thus the BMAP. We call it the characterizing matrix sequence or the sequence of characterizing matrices for the BMAP. The entry Dk;ij with k ≤ 1 and i, j ≤ m indicates the transition rate for a batch arrival of size k occuring in connection with a phase transition from i to j. The entry D0;ij with i = j ≤ m indicates the transition rate for a phase transition from i to j without an arrival. Finally, the entry D0;ii with i ≤ m indicates the negative parameter of the exponential holding time in any state (n, i) with n ≥ 0 and i ≤ m.
Markovian Arrival Processes
189
Clearly, MAPs and thus PH renewal processes are special cases of BMAPs. The following examples further show the great versatility of the BMAP concept.
Example 10.1 Markov–modulated Poisson process One of the most prominent examples of a MAP is the Markov–modulated Poisson process (or shortly: MMPP). It is a doubly stochastic Poisson process in the following sense: First we define an underlying (or governing) Markov process X with a finite number m of states. This is sometimes referred to as the environment process. Denote its generator by R. Depending on the state of X , single arrivals occur with one of the rates λ1 , . . . , λm . Define the diagonal matrix Λ = diag(λ1 , . . . , λm ). Then we obtain a BMAP specification of the MMPP by setting D0 = R − Λ, D1 = Λ, and Dk = 0 for k ≥ 2. This process is often used to model a semi–Poisson behaviour where the rates of the Poisson arrivals depend on a changing environment. Example 10.2 Interrupted PH renewal process Consider a source that emits arrivals according to a PH renewal process. This source may not be working during certain time intervals, due to failure or other reasons of inactivity. Denote the parameters for the second PH distribution (governing the durations of inactivity) (β, U ) where U shall be of order n. Denote the number of active states by m. If the source is in an active state i, it may change to inactivity with rate γi and to another active state k with rate Sik . Arrivals in state i occur with rate ηi , and the initial distribution of active states is given by the row vector α. Define the off–diagona l entries of the square matrix S to be the rates Sik and set Sii := −γi − k=i Sik − ηi . Then the interrupted PH renewal process has a BMAP specification S γβ ηα 0 D0 = and D1 = να U 0 0 with ν = −U 1n , Dk = 0 for k ≥ 2. The name interrupted PH renewal process comes from the fact that this process models the behaviour of a source which normally emits arrivals according to a PH renewal process but may be interrupted for PH–distributed periods of time. A classical special case of the interrupted PH renewal process is the interrupted Poisson process (shortly: IPP), where n = m = 1. Example 10.3 As we have seen in the beginning of section 9 the time until an overflow occurs in a Markovian queue can be modelled by a PH distribution. Likewise, the output process of Markovian queueing networks with finite buffers can be described as a MAP.
190
AN INTRODUCTION TO QUEUEING THEORY
A useful feature of BMAPs is the closure property under superposition. Let (i) Ni = (N Nt : t ≥ 0) for i = 1, 2 denote two arrival processes. Then the (1) (2) process N = (N Nt : t ≥ 0) defined by Nt := Nt + Nt is called the superposition of N1 and N2 . Analogously to the proof of theorem 9.13 one can show
Theorem 10.4 If N1 and N2 are two BMAPs with characterizing matrices (i) (Dn : n ∈ N0 ) for i = 1, 2, then the superposition N = N1 + N2 is a BMAP (1) (2) with characterizing matrices Dn = Dn ⊕ Dn for all n ∈ N0 .
4.
Distribution of the Number of Arrivals
The most important random variable of a BMAP is the number Nt of arrivals until some time t. Since BMAPs are Markov processes, we can express all transition probabilities in terms of the generator matrix G and thus in terms of the characterizing matrices Dn . According to theorem 3.7, the transition probability matrix P (t) of a BMAP Y = (N , J ) with generator G is given by P (t) = eG·t :=
∞ n t
n=0
n!
Gn
(10.1)
for all t ≥ 0, with Gn denoting the nth power of the matrix G. Here the entry Pk,i;n,j (t) = P(N Nt = n, Jt = jN N0 = k, J0 = i) indicates the conditional probability that until time t there have been n arrivals and the phase at time t is j given that at time 0 there already have been k arrivals and the phase is i.
In order to find an expression of P (t) in terms of the matrices Dn , we need to introduce convolutions of matrix sequences. Let M = (M Mn : n ∈ N0 ) and K = (K Kn : n ∈ N0 ) denote two sequences of m×m matrices. The convolution M ∗ K of these sequences is defined as the sequence L = (Ln : n ∈ N0 ) of m × m matrices with Ln := nk=0 Mk Kn−k for all n ∈ N0 .
Define the convolutional powers of a matrix sequence M by the initial sequence M∗0 := (I, 0, 0, . . .) and recursively M∗(n+1) := M∗n ∗ M for all n ∈ N0 . If we denote the kth matrix of a sequence M∗n by M∗kn , then we can write M∗0 k = δk0 · I for all k ∈ N0 , with δk0 denoting the Kronecker function and I denoting the m × m identity matrix. Further we have by definition M∗1 k = Mk for all k ∈ N0 . With these definitions we can state
Lemma 10.5 For all n ∈ N0 , the nth power of the generator matrix G of a BMAP has block entries n n = ∆∗l−k Gkl
191
Markovian Arrival Processes
for all k ≤ l ∈ N0 , and Gnkl = 0 for all k > l ∈ N0 . Proof: Fix any k , l ∈ N0 . Clearly, G0 is the identity matrix, which proves the statement for n = 0. Now assume that the statement is true for some n ∈ N0 . Then ∞ l n+1 n n Gkl = Gkh Ghl = Gkh Ghl h=0
h=k
n Gkh
since = 0 for h < k by induction hypothesis and Ghl = 0 for h > l n+1 as G is an upper triangular block matrix. In particular we obtain Gkl = 0 for k > l and we can assume k ≤ l. The induction hypothesis as well as the n = ∆∗n and G = D structure of G yield Gkh hl l−h . Hence we obtain h−k n+1 Gkl =
l
n ∆∗h−k Dl−h =
h=k
l−k
∗(n+1)
∆∗hn Dl−k−h = ∆l−k
h=0
which completes the proof. Define the convolutional exponential of a matrix seq uence M by the setn ∗n quence e∗M·t of matrices with the kth matrix being ∞ n=0 n! Mk for all k ∈ N0 . Further define the matrices Pkl (t) = (P Pk,i;l,j (t))i,j≤m . With these definitions and the above lemma we arrive at Corollary 10.6 The (k , l)th block entry of the transition probability matrix of a BMAP with characterizing sequence ∆ is given by ∞ n t ∗n ∆ Pl−k (t) := Pkl (t) = e∗∆·t l−k := n! l−k
n=0
for all k ≤ l ∈ N0 , and Pkl (t) = 0 for all k > l ∈ N0 .
It is not surprising that we obtain Pkl (t) = 0 for k > l as a BMAP cannot count more arrivals in any subset of a time interval than in the time interval itself. Furthermore, it is not surprising to see that the block entry Pkl (t) depends only on the difference l − k, since future arrivals depend only on the current phase and not on the number of arrivals observed in the past. Thus we can abbreviate notations by Pk (t) := P0,k (t). An immediate consequence is Corollary 10.7 The matrix containing the probabilities that within a time interval of length t there are no arrivals is given by P0 (t) = eD0 ·t
192
AN INTRODUCTION TO QUEUEING THEORY
for all t ≥ 0.
Define τ := min{t ≥ 0 : Nt > 0) as the stopping time until the first arrival. Then the expectation matrix E(τ ) of τ , having dimension m × m and entries J0 = i), is given by E(τ · 1Jτ =j J ∞ E(τ ) = eD0 ·t dt = −D0−1 (10.2) 0
For a BMAP with characterizing matrices (Dn : n ∈ N0 ) define the matrix D D := ∞ n=0 n . This describes the transition rates of the marginal process J = (J Jt : t ≥ 0), which is called the phase process of the BMAP. Define PijΦ (t))i,j≤m with entries the transition probability matrix of J by P Φ (t) = (P PijΦ (t) := P(J Jt = jJ J0 = i). For this we obtain Theorem 10.8 The transition probability matrix of the phase process J is given by ∞ P Φ (t) = Pk (t) = eD·t k=0
for all t ≥ 0 and i, j ≤ m.
Proof: The first equation holds by definition, since the phase process is the marginal process of (N , J ) in the second dimension. The second equation is obtained via corollary 10.6 and Fubini’s theorem as ∞ n ∞ ∞ n ∞ ∞ n t t Pk (t) = ∆∗kn = Dk = eD·t n! n! k=0
n=0
k=0
n=0
k=0
where the second equality is due to the relation n ∞ ∞ ∆∗kn = Dk k=0
(10.3)
k=0
which the reader may prove as an exercise.
5.
Expected Number of Arrivals
The expressions Pk (t) will help us to derive a simple representation of the expected number E(N Nt ) of arrivals until time t. To this aim we first derive an n expression for the z–transform which is defined as Nt∗ (z) := ∞ n=0 Pn (t)z
193
Markovian Arrival Processes
for z ∈ C with z ≤ 1. The zn–transform of the matrices (Dn : n ∈ N0 ) is defined as D(z) := ∞ n=0 Dn z . Using this, we obtain
Theorem 10.9 The z–transform of a BMAP having characterizing matrices (Dn : n ∈ N0 ) is given by Nt∗ (z) = eD(z)·t for all z ∈ C with z ≤ 1. Proof: The definition, together with corollary 10.6, yields Nt∗ (z) =
∞ ∞ k t
n=0 k=0
k!
∆∗nk z n =
∞ k ∞ t
k=0
k!
∆∗nk z n
n=0
Since the transform of a k –fold convolution of a sequence equals the k th power of the transform of the sequence (see exercises), we obtain further Nt∗ (z) =
∞ k t
k=0
k!
(D(z))k = eD(z)·t
which is the statement. Let π denote the stationary probability vector of the phase process, satisfying πD = 0. If the initial phase distribution of a BMAP is π , then we say that the BMAP starts in phase equilibrium. Now we can state Nt ) of arrivals until time t, given Theorem 10.10 The expected number Eπ (N that the BMAP starts with initial phase distribution π, is determined by Nt ) = t · π Eπ (N
∞
k=1
k · Dk 1
Proof: The first moment can be derived from the z –transform via , ∞ , d tn n, Nt ) = π (D(z)) , 1 Eπ (N , dz n! n=0
=π
z=1
n ∞ n t
n=0
n!
h=1
Dh−1
∞
k=1
k · Dk Dn−h 1
Now the statement follows from πD = 0 and D1 = 0 which implies that the right–hand sum over h is zero except for n = h = 1.
194
AN INTRODUCTION TO QUEUEING THEORY
The term λ := π ∞ k=1 kDk 1 is called the mean arrival rate of the BMAP. For the special case of a PH renewal process, this term equals π(ηα)1 = π η. Furthermore the stationary phase distribution π is easily determined via corollary 7.2. Thus we obtain
Corollary 10.11 For a PH renewal process with parameters (α, T ) starting Nt ) of arrivals until time t is in phase equilibrium, the expected number Eπ (N given by Eπ (N Nt ) = t · πη with η = −T 1. The stationary phase distribution π is given by ∞ 1 π= αeT ·t dt −αT −1 1 0 Proof: The first statement is a specification of theorem 10.10. The expression for π is verified by ∞ 1 αeT ·t dt (T + ηα) −αT −1 1 0 ∞ ∞ 1 T ·t T ·t α e T dt + αe η dt α = −αT −1 1 0 0 1 = (α(−I) + α) = 0 −αT −1 1
πD =
with I denoting the identity matrix, and
∞
αeT ·t dt 1 = α
∞
eT ·t dt 1 = −αT −1 1
The above PH renewal process N is a delayed renewal process with initial delay X0 ∼ P H(π, T ) and renewal intervals Xn ∼ P H(α, T ) for n ∈ N. The elementary renewal theorem 6.12 then states that limt→∞ E(N Nt )/t = 1/E(X1 ). Thus we obtain another expression for the mean of a phase–type distributed random variable (cf. corollary 9.9). Corollary 10.12 For a P H(α, T ) distributed random variable X the expectation is given by E(X) = (π η)−1 .
195
Markovian Arrival Processes
Notes The first presentation of the PH renewal process has been given in Neuts [63]. The MAP in the present formulation has been introduced first in Lucantoni et al. [56] as a generalization of the PH renewal process and the Markov– modulated Poisson process. Its further generalization to the BMAP with batch arrivals has been introduced in Lucantoni [54]. An early algorithms for a computation of the transition probabilities can be found in Neuts and Li [67]. The calculus of matrix convolutions that leads to explicit expressions for the transition probabilities of BMAPs has been introduced in Baum [9] or Breuer [21]. The class of BMAPs is equivalent to the class of versatile Markovian point processes (or N–processes) introduced in Neuts [64]. However, this formulation is more complicated and does not yield as simple an anlysis of the respective queueing systems. For generalizations of BMAPs see Pacheco and Prabhu [68], Baum and Kalashnikov [11, 13], or Breuer [19, 21]. A result which is analogous to theorem 9.14 is that the class of all MAPs is dense within the class of all marked point processes (see Asmussen and Koole [6]). An extensive treatment on the history of the BMAP, along with many references, can be found in Lucantoni [55]. Statistical methods for fitting MMPP and BMAP models are given in Ryden [76] and Breuer [18].
Exercise 10.1 Prove theorem 10.4. Exercise 10.2 Prove equation (10.3) as well as ∞
∆∗nk z n = (D(z))k
n=0
for z ∈ C with z < 1. Exercise 10.3 Give a model (in terms of a PH renewal process) for the number of orders the plumber of exercise 6.4 receives. Exercise 10.4 Show that an IPP is uniquely determined by the first three moments of the inter–arrival time distribution. Exercise 10.5 In a telephone network data transmission via the package voice system works as follows. The language source is digitalized and divided into packages, which are to be transmitted. A language source switches between ”talk spurts” and ”silent periods”. Thus a model in terms of an IPP seems reasonable. Measurements yield a mean inter–arrival time of 3 ms for the packages. The
196
AN INTRODUCTION TO QUEUEING THEORY
squared coefficient of variation is 300. Further it is known that a silent period is about two times as long as a talk spurt. Adjust the IPP to these measurements. Exercise 10.6 Describe the BMAP/PH/k queue in terms of a Markov process with (k + 2)–dimensional state space.
Chapter 11 THE GI/PH/1 QUEUE
In section 1, we have analyzed one of the classical semi–Markovian queueing systems, the GI/M/1 queue. For practical applications, this model has the disadvantage that the assumption of exponential service times is often inappropriate for the actual service time distribution governing the system. More typical service times often are distributed like generalized Erlang or Cox distributions, or special distributions like the lognormal or Weibull type. The former are special cases of phase–type distributions, the latter can be approximated by them. Thus the wish to extend the results for the GI/M/1 queue to GI/PH/1 queues is understandable. It will turn out in the presentation of this chapter that the analysis of GI/PH/1 queues can be performed in a strikingly similar manner to the GI/M/1 analysis. This is one of the main reasons for the success of the phase–type concept in queueing theory. The GI/PH/1 queue is characterized by the following features. Arrivals are generated by a renewal process with inter–arrival times distributed by a distribution function H with 0 < E(H) < ∞. The service times are iid according to a P H(α, T ) distribution of order m ∈ N, with αm+1 = 0. There is one server, and the service discipline is FCFS. The waiting room capacity is infinite such that there are no users lost. In order to keep a complete description of the system state, it is not sufficient anymore to remember the number of users in the system only, but we need to keep track of the current phase of the service time distribution, too. Thus we Nt , Jt ) for all t ≥ 0, where examine the process Q = (Qt : t ≥ 0) with Qt = (N Nt and Jt denote the number of users in the system and the current phase of service at time t, respectively. If the system is empty, i.e. Nt = 0, there is no
198
AN INTRODUCTION TO QUEUEING THEORY
service and we do not need to keep track of a phase of service. In this case we set Jt = 0. Thus the state space of Q is E = {0, 0} ∪ N × {1, . . . , m}.
1.
The Embedded Markov Chain
As for the GI/M/1 queue we observe that at times of arrivals the conditions for a prognosis of the future of the system are less difficult, since we know that the time until the next arrival is distributed by F . This is due to the iid inter–arrival times and the independence of the arrival process from the rest of the system. Hence we can construct a Markov chain embedded at arrival instants. NTn −1, JTn ) for all n ∈ N. Define Tn as the time of the nth arrival and Xn := (N Since at times Tn there is always at least one user in the system (namely the one that has just arrived), the state space of X = (X Xn : n ∈ N) is N0 ×{1, . . . , m}. If we know that the phase of service currently is j , then we also know that the time until the next service completion will be distributed by a P H(ej , T ) distribution, with ej denoting the jth canonical row base vector. Since we further know that the time until the next arrival after Tn will be distributed by F (the inter–arrival time has just begun), the chain X is Markovian. Now we want to determine the transition matrix P˜ of X . Since the state space of X is two–dimensional, the structure of P˜ must become more complicated than for the analogue of the GI/M/1 queue. However, we can order the state space of X lexicographically as {(0, 1), . . . , (0, m), (1, 1), . . . , (1, m), (2, 1), . . .} such that the transition matrix P˜ will have a block structure. The first dimension of the state space shall be called the level of the process, while the second dimension is called the phase. The chain pr2 (X ), with pr2 denoting the projection on the second dimension, will be called the (embedded) phase process. The general structure of P˜ is determined by two considerations. First, between two arrival instants the number of users in the system can increase by at most one. Second, as long as the system is not empty, the change of the number of users between two arrival instants Tn and Tn+1 does not depend on the number of users in the system at time Tn . Thus we obtain the structure ⎛ ⎞ B0 A0 ⎜B1 A1 A0 ⎟ ⎜ ⎟ ˜ P = ⎜B2 A2 A1 A0 (11.1) ⎟ ⎝ ⎠ .. .. . . . . . . . . . . .
for the transition matrix P˜ , with the non–specified entries being zero matrices. We see that the matrix P˜ has a block Toeplitz structure with one upper diagonal and special boundary entries in the first column. In terms of levels, the
199
The GI/PH/1 Queue
matrix is skip–free to the right as in the GI/M/1 case. Because of the similarity to the GI/M/1 case, such a matrix is also called a GI/M/1 type matrix. Here, the (i, j)th entry Ak;ij of the matrix Ak indicates the probability that between two consecutive arrivals instants Tn and Tn+1 , k users are served and the phase of service changes from i at time Tn to j at time Tn+1 . The entries Bk;ij indicate the probabilities that between two consecutive arrivals instants Tn and Tn+1 , at least k + 1 users are served and the phase of service changes from i at time Tn to j at time Tn+1 .
In order to find expressions for the matrices Ak and Bk , we define the following family of matrices. For every t ≥ 0, k ∈ N0 , and i, j ∈ {1, . . . , m} let Pk;ij (t) denote the probability that during the interval [0, t] there are k service completions and the phase of service at time t is j given that the phase of service at time 0 has been i. Further define the respective m × m matrices Pk;ij (t))i,j≤m . Then we can write Pk (t) = (P ∞ ∞ Ak = Pk (t) dH(t) and Bk = Ai 0
i=k+1
for all k ∈ N0 . The matrices Pk (t) can be determined according to the expression given in corollary 10.6 by specifying ∆ = (T , η α, 0, 0, . . .), with η = −T 1. Since A := ∞ n=0 An is stochastic, we immediately obtain Bk = 1α −
k
Ai 1α
i=0
for all k ∈ N0 .
2.
Stationary Distribution at Arrival Instants
From now on we shall assume that the stability condition E(H) > −αT −1 1 for the embedded Markov chain X is satisfied. In the next section it is shown that then a stationary distribution for X does exist. In this section we want to show how this can be determined. Denote the stationary distribution for X by x = xP˜ and write x = (xn : n ∈ N0 ) = (xni : n ∈ N0 , 1 ≤ i ≤ m)
with xni being the stationary probability that the chain X is in state (n, i). The vectors xn contain the stationary probabilities of the chain X being in level n. For the GI/M/1 queue we could derive a geometric structure νn+1 = νn ξ for the stationary distribution ν of the embedded Markov chain. In the present
200
AN INTRODUCTION TO QUEUEING THEORY
case of a GI/PH/1 queue we will have a similar structure for the distribution x, namely the relation xn+1 = xn R where now the factor R is a matrix. To underline the analogy, such a distribution is called a matrix–geometric distribution and R is called rate matrix. We will first define the matrix R and then show that x indeed is matrix– geometric with rate matrix R. For all phases i, j ≤ m and levels k ≥ 0, define the taboo probabilities (cf. definition (8.11)) (n) k P k,i;k+1,j
:= P(X Xn = (k+1, j), pr1 (Xh ) = k ∀ 1 ≤ h < nX0 = (k, i))
that the chain X enters level k + 1 in phase j after n steps and does not enter level k before, given that it starts in level k and phase i. The structure of P˜ is self–similar in the sense that if we delete the first n (block) rows and columns of P˜ for any n ∈ N, we obtain the same matrix as if we deleted only the first row and column. This implies that the probabilities (n) k P k,i;k+1,j are independent of k ∈ N0 . Hence we can define rij :=
∞
(n) k P k,i;k+1,j
n=1
for all i, j ∈ {1, . . . , m}, independently of k ≥ 0. The value rij is the expected number of visits of the chain X to the state (k + 1, j) before returning to level k if X is started in state (k , i). Finally, we define the matrix R = (rij )i,j≤m and call it the rate matrix.
Theorem 11.1 The stationary distribution x = (xk : k ∈ N0 ) of X satisfies the relation xk+1 = xk R for all k ∈ N0 . Proof: Fix any level k ∈ N0 . By conditioning on the last time and phase of the last visit to level k we obtain the relation (n) Pk+1,j;k+1,j
=
(n) k P k+1,i;k+1,j
+
m n i=1 r =1
(r)
(n−r)
Pk+1,j;k,i · k P k,i;k+1,j
for all n ≥ 1.
If we add these equations for n = 1, . . . , N , divide both sides by N and then let N tend to infinity, the left–hand side tends to xk+1,j according to corollary
201
The GI/PH/1 Queue
(n) 2.28. Since the sum ∞ n=1 k P k+1,i;k+1,j is finite if X is positive recurrent, the first term on the right–hand side tends to zero. The second term equals n N m 1 (r) (n−r) lim Pk+1,j;k,i · k P k,i;k+1,j N →∞ N n=1 r =1
i=1
m N N −r 1 (r ) (n) Pk+1,j;k,i · k P k,i;k+1,j N →∞ N
= lim
i=1
=
m i=1
1 lim N →∞ N
r =1 N
n= 1
(r) Pk+1,j;k,i
r =1
· lim
N →∞
by corollary 2.28 and the definition of R.
N −r
(n) k P k,i;k+1,j
=
n=1
m i=1
xki · rij
The matrix R contains the expected number of visits to any level l + 1 ∈ N between two consecutive visits to level l. In case of positive recurrence this matrix is entry–wise finite by theorem 2.24. For the powers of R we obtain the following interpretation: Theorem 11.2 For any k ∈ N, the (i, j)th entry of the matrix Rk indicates the expected number of visits to the state (l + k , j) between two consecutive visits to level l ∈ N0 , given that the chain X starts in state (l, i). Proof: The statement holds for k = 1 by definition of R. Now we assume that it holds for some k ∈ N and want to show the induction step to k + 1. For n ≥ k + 1 the relation (n) l P l,i;l+k+1,j
=
m n
(r) l P l,i;l+k,h
· l+k P l+k,h;l+k+1,j
(r) l P l,i;l+k,h
· l P l,h;l+1,j
h=1 r =0
=
m n h=1 r =0
(n−r)
(n−r)
is obtained after conditioning on the time r and the phase h of the last visit to level l + k before visiting level l + k + 1. For n ≤ k both sides of the equation are zero, such that we can sum over all n ≥ 0. The left–hand side sums up to the desired expectation for the level k + 1. On the right–hand side we obtain m n ∞ h=1 n=0 r =0
(r) l P l,i;l+k,h
(n−r)
· l P l,h;l+1,j = =
m ∞
(r) l P l,i;l+k,h
h=1 r =0 m k Rih rhj h=1
∞
n=0
(n) l P l,h;l+1,j
202
AN INTRODUCTION TO QUEUEING THEORY
which completes the induction step. There is an interesting relation between the matrix R and its powers, which at the same time yields a method to compute R without needing to calculate the n–step taboo probability matrices l P (n) by which R is defined. This is given in Theorem 11.3 If X is positive recurrent, then the matrix R is the (entry–wise) minimal non–negative solution to the matrix equation ∞
M=
M n An
n=0
It can be obtaine d as the nlimit R = limk→∞ M (k) with M (0) := 0 and M (k + 1) := ∞ n=0 M (k) An for all k ∈ N0 . (1)
Proof: First we observe l P l,i;l+1,j = A0;ij . For n ≥ 2 we obtain (n)
l P l,i;l+1,j =
m ∞
(n−1) l P l,i;l+k,h
h=1 k=1
· Ak;hj
by conditioning on the state (l + k , h) from which the level l is entered for time n n. If we sum up these equations for all n, we obtain R = ∞ n=0 R An .
For the second statement, consider the sequence M = (M (k) : k ∈ N0 ). Clearly, M (1) ≥ M (0) and R ≥ M (0) entry–wise. The fact that M (k + 1) − M (k) = R − M (k) =
∞
(M (k)n − M (k − 1)n )An ≥ 0
n=0 ∞
(Rn − M (k − 1)n )An ≥ 0
n=0
yields by induction that the sequence M is entry–wise monotonically increasing and M (k) ≤ R for all k ∈ N. Hence there is a matrix M ∗ = limk→∞ M (k) with M ∗ ≤ R. Thus we can use the dominated convergence theorem to verify M ∗ = lim M (k) = lim k→∞
=
∞
n=0
(M ∗ )n An
k→∞
∞
n=0
M (k − 1)n An =
∞
n=0
lim M (k − 1)n An
k→∞
203
The GI/PH/1 Queue
such that M ∗ is indeed a solution to the matrix equation. Every other non–negative solution M ′ to the matrix equation must satisfy M ′ ≥ A0 = M (1). But M ′ ≥ M (k) implies ′
M =
∞
(M ′ )n An ≥ M (k)n An = M (k + 1)
n=0
and thus by induction M ′ ≥ M (k) for all k ∈ N and in the limit M ′ ≥ M ∗ . Hence M ∗ is minimal. It remains to show that R ≤ M ∗ . Define the matrices ! (n) (n) l P r := l P l,i;l+r,j i,j≤m
for all n, r ∈ N0 and remember that their definition is independent of the start (n) level l. The matrix l P r contains the (phase–dependent) probabilities that the level of the chain is raised by r after exactly n steps. Because of the structure (n) (11.1) it is clear that l P r = 0 for r > n. (r) (n) (1) Further define the matrices Ys := sn=0 l P r and set Ys := Ys . Then we (r) can write R = lims→∞ Ys . The matrix Ys contains the (phase–dependent) expectations of the number of visits to the level l + r within the course of s (r) steps beginning from taboo level l. Again the structure (11.1) yields Ys = 0 for r > s. (n) (n−1) Because of l P 1 = l−1 Ar we obtain r =0 l P r s−1 k s s−1 ∞ ∞ (n) (r) (k) (k) Ys = Ar = Ys−1 Ar lP 1 = l P r Ar = lP r n=1
k=0 r =0
r =0
r =0
k=0
for all s ∈ N. Conditioning on the time k of the last visit to level l + r − 1 yields n (k) (n−k) (n) lP r = l P r −1 l P 1 k=0
which implies (r)
Ys−1 =
n s−1
(k)
(n−k)
l P r−1 l P 1
n=0 k=0
≤
s−1
(k)
l P r−1
k=0
(r)
s−1
(n) lP 1
(r−1)
n=0
whence Ys−1 ≤ Ysr−1 for all r ≥ 1. Thus Ys satisfies the inequality Ys ≤
∞
n=0
Ysn−1 An
(1)
= Ys−1 Ys−1
204
AN INTRODUCTION TO QUEUEING THEORY
Clearly, the sequence (Y Ys : s ∈ N) is increasing and Y1 = A0 = M (1), while Y2 ≤ M (2). Now the above inequality yields Ys ≤ M (s) for all s ∈ N, which implies the desired bound R ≤ M ∗ .
Theorem 11.4 The stationary probability vector x0 of X is determined by x0 = x0 B[R] ∞ with B[R] = n=0 Rn Bn .
and
x0 (I − R)−1 1 = 1
Proof: The stationarity of x = xP˜ yields according to the structure given in (11.1) and theorem 11.1 x0 =
∞
xn Bn = x0
n=0
∞
Rn Bn
n=0
which proves the first equation. In order that x = (xk : k ∈ N0 ) be a probability distribution, we further need 1=
∞
k=0
x k 1 = x0
∞
k=0
Rk 1 = x0 (I − R)−1 1
which is the second equation. Since P˜ is irreducible, there is at most one stationary distribution of X . Since the two equations in the statement and the relation in theorem 11.1 yield a solution to x = xP˜ , the vector x0 is uniquely determined. After verifying that B[R] = 1α (as an exercise), we immediately obtain Corollary 11.5 The stationary probability vector x0 of X is explicitly given as x0 = (α(I − R)−1 1)−1 α
3.
Ergodicity of the Embedded Markov Chain
In the previous section we have derived the form of the stationary distribution in case of positive recurrence of the embedded Markov chain X . Now we want to derive the conditions for positive recurrence, also called the ergodicity conditions for X . First a remark is due regarding irreducibility of X . If αi = 0 for some phase 1 ≤ i ≤ m, then for all matrices Bk the ith column vanishes, and X is not
205
The GI/PH/1 Queue
irreducible. However, all statements concerning existence and uniqueness of a stationary distribution hold as if the chain X were irreducible. This is due to remark 2.26, which was to be proven as an exercise in chapter 2.
Since in case of positive recurrence the structure of the stationary distribution x is largely determined by R, it seems natural to search for some property of R to yield the ergodicity condition. This can be found in the second equation in theorem 11.4. Theorem 11.6 The embedded Markov chain X is positive recurrent if and only if (I − R) is invertible. ∞ n Proof: Define the vector v = n=0 R 1, which may have infinite entries. According to theorem 11.2 the value vi indicates the expected return time to level zero given that X0 = (0, i). By theorem 2.32 (with F being the states of the level zero), the chain X is positive recurrent if an d only if v is entry–wise n −1 finite. This is equivalent to convergence of the series ∞ n=0 R = (I − R) . Although the above stability condition is the first that comes into mind if we regard the structure of the stationary distribution x, it may be difficult to check this condition if there are eigenvalues of R with modulus close to one. Seen from a more general perspective, we would expect the queue to be stable if and only if the classical condition, namely that the mean service time be less than the mean inter–arrival time, holds. That this is indeed the case can be shown for the GI /P H/1 queue, too. However, to this aim we first need to translate the classical condition to an equivalent condition in terms of the system parameters. We have denoted the distribution function of the inter–arrival times by H and its mean by E(H). According to corollary 9.9, the mean service time is given by E(S) = −αT −1 1. Then the classical stability condition may be stated as ρ=
−αT −1 1 <1 E(H)
Now define the matrix A := ∞ n=0 An , which contains the transition probabilities for the phase process at times of arrivals, given that the server is busy. Clearly A is stochastic. Note further that A is irreducible, due to the phase– type service process without superfluous phases. Let π denote the stationary vector for A, satisfying πA = π. If we define further D := T + η α, then we can state Lemma 11.7 The vector π satisfies πD = 0.
206
AN INTRODUCTION TO QUEUEING THEORY
Proof: By definition of A and theorem 10.8 we obtain ∞ ∞ ∞ An = π Pn (t) dH(t) = π π=π =
n=0 ∞
π
∞ n t
n=0
n!
∞
eD·t dH (t)
n=0
Dn dH (t)
Clearly this equation holds if πD = 0. Since the matrix A is irreducible and therefore the vector π uniquely determined, the statement follows.
Theorem 11.8 The classical stability condition ρ < 1 is equivalent to the condition ∞ k · Ak 1 > 1 π k=1
Proof: The definition of the Ak yields ∞ ∞ ∞ π π k · Ak 1 = k · Pk (t) 1 dH(t) 0
k=1
k=1
Here the expression within the integral is the expected number of service completions in time t given that the service process is started in phase distribution π. Since the sequence of service completions under the regime of a busy server is a PH renewal process, corollary 10.11 yields ∞ ∞ k · Ak 1 = Eπ (N Nt ) dH (t) = π η · E(H) π 0
k=1
Now the expression for π in corollary 10.11 implies −1 ∞ T ·t −1 αe η dt = − αT −1 1 πη = − αT −1 1 0
Thus we obtain
π
∞
k=1
which completes the proof.
k · Ak 1 =
1 ρ
(11.2)
The above condition postulates that under the stationary phase regime the mean number of service completions between two arrivals is greater than one. It
207
The GI/PH/1 Queue
is as intuitive as the classical stability condition and can be verified almost immediately once the system parameters are given. Now we will show that this condition implies positive recurrence of the embedded Markov chain X . d denote by ¯ a = (¯ a1 , . . . , a ¯m ) the column We write A = ∞ n=0 An as usua l, an or vector of components a ¯i = j∈E ∞ nA f 1 ≤ i ≤ m. In order to n;ij n=0 apply the criteria of theorem 2.33 to the chain X we first construct a nonnegative solution v of ¯ − (1/ρ)1 (I − A) v = a
(11.3)
Lemma 11.9 The system (11.3) possesses solutions of the form v + r1 with r ∈ R, where v is any finite separate solution and {r1 : r ∈ R} represents the set of all solutions of the homogeneous system. In particular, it is always possible to find a solution v that is nonnegative. Proof: Since A is nonnegative and stochastic, A − I represents the generator of some Markov process and, consequently, has rank m − 1. The stationary vector of that process is π (since π A = π). An inhomogeneous system M v = d of m linear equations with m unknowns, whose characteristic matrix M is of rank k < m, possesses a solution if and only if the vector of the right–hand side is orthogonal to all solution vectors w = (w1 , . . . , wm ) of the adjoint homogeneous system wM = 0. In our case the rank is m − 1, and any solution of the adjoint system is some multiple of π. Checking the condition of orthogonality, we see that π (¯ a − (1/ρ)1) = π
∞
n=0
n An 1 −
1 =0 ρ
because of (11.2). Therefore, the system (11.3) possesses a finite solution v = (v1 , . . . , vm ). The general solution is the sum of a separate solution and a solution of the homogeneous system. Since, obviously, the homogeneous system has as solutions all multiples of 1 = (1, 1, . . . , 1)T , the general non– homogeneous solution is v + r · 1, for arbitrary r ∈ R.
Theorem 11.10 The embedded Markov chain X is positive recurrent if ρ < 1. Proof: Applying Lemma 11.9, let v = (v1 , . . . , vm ) be some nonnegative bounded solution of equation (11.3). Using this solution, define the finite function ) s + vj for s ∈ N, 1 ≤ j ≤ m f (s, j) = , (11.4) 0 for s = 0, 1 ≤ j ≤ m
208
AN INTRODUCTION TO QUEUEING THEORY
such that for r > 0, P˜r,i;s,j f (s, j) − f (r, i) = P˜r,i;s,j · (s − r) + (s,j)
= −r
m
Br;ij +
j=1
(s,j) m r
j=1 n=0
s≥1; j≤m
An;ij · (1 − n) +
P˜r,i;s,j vj − vi
m r
j=1 n=0
An;ij vj − vi
m ∞ m ∞ Since j=1 n=0 nAn;ij < ∞, the sums n=r nAn;ij tend to zero as j=1 r tends to infinity. Hence r
m j=1
Br;ij =
∞ m
j=1 n=r+1
rAn;ij → 0 as
r→∞
If ρ < 1, then equation (11.3) yields ⎛ ⎞ m ∞ 1 lim ⎝ P˜r,i;s,j f (s, j) − f (r, i)⎠ ≤ 1 − n An;ij + a ¯i − r →∞ ρ j=1 n=0
(s,j)
= 1−
1 < 0, ρ
implying that there exist an r0 ∈ N and an ε > 0, such that for ρ < 1 L(r, i) = P˜r,i;s,j · f (s, j) − f (r, i) < −ε for all r ≥ r0 , i ≤ m . (s,j)
Define a finite subset F ⊂ N0 × E of states as F = {(r, i) : r < r0 , i ≤ m} . (11.5) m Since for r = 0 the expression j=1 A0;ij (1 + xj ) is positive (bearing in mind that vj ≥ 0 for all j), this set F is not empty. Since L(r, i) ≤ −ε for (r, i) ∈ / F , and 0 ≤ f (s, j) < ∞ for all s ∈ N0 and 1 ≤ j ≤ m, the prerequisites of theorem 2.33 are satisfied, i. e. the chain is positive recurrent.
4.
Asymptotic Distribution of the System Process
If the stability condition ρ < 1 is satisfied, we have seen in the previous two sections how to derive the stationary distribution x of the embedded Markov chain at arrival instants. Now we want to use this in order to obtain an expression for the asymptotic distribution of the system process Q = (Qt : t ≥ 0). Here Qt = (n, j) states that there are n users in the system (including the
209
The GI/PH/1 Queue
server) and the phase of the service is j at time t. If there are no users in the system, there is no service either. This is denoted by Qt = (0, 0). To obtain the asymptotic distribution of Q is a simple matter if we conceive the system process as a semiregenerative process in the same way as we already did in the analysis of the GI/M/1 queue. If T = (T Tn : n ∈ N) denotes the sequence of arrival instants and X = (X Xn : n ∈ N) is defined as in section 1, then the independence of the arrival process from the rest of the system yields G(k,i),(n,j) (t) = P(T Tn+1 − Tn ≤ tX Xn = (k, i), Xn+1 = (n, j)) = H(t) independently of k , n ∈ N0 and i, j ≤ m. The standard assumption E(H) > 0 on the distribution function H implies that Tn → ∞ P–almost certainly as n → ∞. Hence (X , T ) is a Markov renewal chain and Q is semi–regenerative.
In order to employ theorem 7.15 for the calculation of the asymptotic distribution of the system process Q, we already have determined the stationary distribution ν = x of X in section 2. It remains to derive the vector m of the mean time between Markov renewal points as well as the function K(t) describing the behaviour of the system process between Markov renewal points. The vector m is obtained in a straightforward manner as T1 X0 = (n, i)) = E(H) mn,i = E(T
(11.6)
independently of n ∈ N0 and i ≤ m, since the arrival process does not depend on the state of the system. Thus the vector m is constant. The function K(t) T1 > t, Qt = (n, j)X0 = (k, i)). is given by the values K(k,i),(n,j) (t) = P(T Exploiting the independence of arrival process and service and abbreviating H c (t) := 1 − H(t), we obtain ⎧ c ⎪ Pk+1−n;ij (t), 1≤n≤k+1 ⎨H (t) · m ∞ c K(k,i),(n,j) (t) = H (t) · h=k+1 j=1 Ph;ij (t), (n, j) = (0, 0) ⎪ ⎩ 0, n>k+1 for all t > 0, k , n ∈ N0 , and i, j ≤ m.
Denote the asymptotic distribution of the system process by the block vector y = (yn : n ∈ N0 ). For n ∈ N the blocks yn = (yni : 1 ≤ i ≤ m) are defined by yni = limt→∞ P(Qt = (n, i)). The asymptotic probability of the system being idle is denoted by y0 = y00 = limt→∞ P(Qt = (0, 0)). Now theorem 7.15 yields Corollary 11.11 If the stability condition ρ < 1 holds, then the asymptotic distribution of the system process Q = (Qt : t ≥ 0) for the GI/PH/1 queue is
210
AN INTRODUCTION TO QUEUEING THEORY
given by y nj
xk ψ(k + 1 − n) ej , λ· ∞ k=n−1 ∞ = x λ· ∞ k=0 k h=k+1 ψ(h) 1,
n≥1 n=0
with the following notations. H denotes the inter–arrival time distribution, and H c (t) := 1 − H(t) its complement. λ := 1/E(H) denotes the asymptotic arrival rate. The vector x = xP˜ contains the stationary distribution of the embedded Markov chain X at arrival instants, and the matrices Pk (t) are given as in corollary 10.6 with ∆ = (T, η α, 0, 0, . . .). Finally we denoted ∞ H c (t)P Pk (t) dt ψ(k) := 0
for all k ∈ N0 . In the remainder of this section we shall find simpler expressions for y. Because of theorem 11.1, we first obtain y0 = λ ·
∞ k =0
xk
∞
h=k+1
= λ · x0 (I − R)−1 = λ · x0 (I − R)−1
ψ (h) 1 = λ · x0 ∞ h=1
∞ h−1
R k ψ (h) 1
h= 1 k = 0
(I − Rh )ψ(h) 1
∞
H c (t)(1 − P0 (t)1) dt −
∞
h=1 ∞ −1 h
= λ · x0 (I − R)−1 1 · E(H) − λ · x0 (I − R)
R ψ(h) 1
h=0
Corollary 11.5 yields x0 (I − R)−1 1 = 1. Denoting Ψ[R] := and using λ · E(H) = 1, we can write y0 = 1 − λ · x0 (I − R)−1 Ψ[R]1
Rh ψ(h) 1
∞
h=0 R
h ψ(h)
(11.7)
For n ∈ N the same arguments yield yn = λ ·
∞
k=n−1
xk ψ(k + 1 − n) = λ · x0 Rn−1 Ψ[R]
Lemma 11.12 The matrix Ψ[R] is given by Ψ[R] = (R − R 1α − I) T −1
(11.8)
211
The GI/PH/1 Queue
Proof: Differentiating equation (10.1) for the P H(α, T ) renewal process yields P0′ (t) = P0 (t) T
Pn′ (t) = Pn (t) T + Pn−1 (t) ηα (11.9) ∞ for all n ∈ N. From theorem 11.3 we know the relation R = n=0 Rn An . For every n ∈ N0 we obtain by partial integration ∞ ∞ An = Pn (t) dH(t) = − Pn (t) dH c (t) 0 0 ∞ = − Pn (t)H c (t)∞ + Pn′ (t)H c (t) dt t=0 and
= δn0 I + ψ(n) T + (1 − δn0 ) · ψ(n − 1) ηα
where δn0 denotes the Kronecker function. Multiplying by Rn and summing up over all n ∈ N0 yields R = I + Ψ[R] T + R Ψ[R] ηα
(11.10)
Multiplying by 1 we obtain (I − R)1 = (I − R) Ψ[R]η
By theorem 11.4, the matrix (I −R) is invertible in case of positive recurrence. Hence Ψ[R]η = 1, which yields after substitution in (11.10) Ψ[R] T = R − R 1α − I
The statement follows now by invertibility of T . Theorem 11.13 The asymptotic distribution y of Q is given by y0 = 1 − ρ
and yn = λ · x0 (Rn (I − 1α) − Rn−1 )T −1
for all n ∈ N. Proof: Substituting the expression of lemma 11.12 in equation (11.7) yields y0 = 1 − λ · x0 −(I − R)−1 R 1α − I T −1 1 = 1 − λ · (α(I − R)−1 1)−1 α(I − R)−1 R 1 + 1 · (−αT −1 1)
because of corollary 11.5. Writing 1 = α(I − R)−1 (I − R)1 we obtain y0 = 1 − λ · (−αT −1 1) = 1 − ρ
Regarding yn with n ∈ N, the statement follows immediately after substitution of the same expression for Ψ[R] into formula (11.8).
212
AN INTRODUCTION TO QUEUEING THEORY
Notes A classical treatment of the GI/PH/1 queue is given in Neuts [65], who presents a proof for the necessity of the stability condition, too. Different proofs for the ergodicity conditions can be found in Asmussen [5] as well as in Meyn and Tweedie [59].
Tweedie [83] has shown how to generalize the matrix–geometric solution for GI/M/1  type matrices towards operator–geometric solutions for GI/M/1  type matrices with a general phase space. Exercise 11.1 Verify that for the PH service time distribution being an exponential one, all results coincide with the results obtained for the GI/M/1 queue. Exercise 11.2 For corollary 11.5, show that B[R] = 1α. Exercise 11.3 Show that the mean number of arrivals during a busy period is given by α(I − R)−1 1. Exercise 11.4 Show that the stationary mean number of users in the system prior to arrivals is given by ¯a = x0 (I − R)−2 1 − 1 N
Exercise 11.5 Verify equations (11.9). Exercise 11.6 Show that the asymptotic mean number of users in the system is given by ¯ = ρN ¯a − λx0 (I − R)−1 T −1 1 N ¯a as defined in exercise 11.4. with N
Chapter 12 THE BMAP/G/1 QUEUE
Let (N , J ) denote a BMAP with characterizing matrices ∆ = (Dn : n ∈ N0 ), each matrix Dn being of dimension m ∈ N. This shall model the arrival stream into the queue. The distribution function of the service time shall be denoted by H and satisfy 0 < E(H) < ∞. The service discipline is FCFS. Let Q = (Qt : t ≥ 0) denote the system process comprising the phase of the arrival process. Thus, Qt = (n, i) means that there are n users in the system at time t and the arrival process has phase Jt = i. The state space of Q is E = N0 × {1, . . . , m}. As the analysis of the GI/PH/1 queue was similar to that of the GI/M/1 queue, we will find many similarities between the BMAP/G/1 and the M/G/1 queueing systems. To begin with, we will first construct an embedded Markov chain at the times of service completions. Define T0 := 0 and Tn as the time of the nth service completion. Write T = (T Tn : n ∈ N0 ). Let Xn := QTn for all n ∈ N0 and assume that at time zero there are no users in the system. The Tn are stopping times for Q and by definition Xn is a deterministic function of QTn . The assumption 0 < E(H) implies Tn → ∞ for n → ∞. At the time instances immediately after service completions we know that the current service (if there is one) has just begun, and we need only to remember the current system state in order to predict the system state immediately after the next service completion. This implies that X = (X Xn : n ∈ N0 ) is a Markov chain. The same property of the queue yields condition (7.5). Hence Q is a semi–regenerative process with embedded Markov renewal chain (X , T ). Note that this time (as opposed to the embedded chain for the M/G/1 queue) the Markov chain is two–dimensional with state space E = N0 × {1, . . . , m}.
214
1.
AN INTRODUCTION TO QUEUEING THEORY
The Embedded Markov Chain
Define the matrices An =
∞
Pn (t) dH(t)
(12.1)
and Bn =
n+ 1 ∞ k=1
D0 ·u
e
D k du
∞
Pn+1−k (t) dH(t)
(12.2)
for all n ∈ N0 , with Pn (t) denoting the transition probability matrices that the BMAP counts n arrivals in time t (see corollary 10.6). The matrix An contains the probabilities that within a service time n users have arrived. Hence we can describe some of the transition probabilities for the Markov chain X by P(X1 = (l + n, j)X0 = (l, i)) = An+1;ij independently of l ≥ 1 and for all n ≥ −1 and i, j ≤ m. The matrix Bn contains the probabilities that first a batch of 1 ≤ k ≤ n + 1 users arrives and then n+1−k additional users arrive within a service time. This situation occurs whenever a service completion leaves the queueing system empty. Therefore we can write P(X1 = (n, j)X0 = (0, i)) = Bn;ij for all n ≥ 0 and i, j ≤ m. In summary we obtain for the transition probability matrix of X the block structure ⎛ ⎞ B0 B1 B2 · · · ⎜A0 A1 A2 · · ·⎟ ⎜ ⎟ ⎜ 0 A0 A1 · · ·⎟ P =⎜ . ⎟ ⎜ ⎟ 0 A0 . . ⎠ ⎝0 .. . . . . . . . . . .
A matrix of this structure is said to be of M/G/1 type, which underlines the similarity to the embedded Markov chain of the M/G/1 queue. Again we will call the first dimension n of a state (n, i) the level, and the second dimension i the phase. With respect to the levels, the Markov chain X is called skip–free to the left, since in one transition the level can be reduced only by one.
Simplifying the expression (12.2) and using definition (12.1) yields the relation Bn =
−D0−1
n
Dk+1 An−k
(12.3)
k=0
between the sequences (An ) and (Bn ), which reduces the computation of the matrices Bn to a prior computation of the sequence (An ).
215
The BMAP/G/1 Queue
2.
The Matrix G
Define τn as the number of steps until the chain X reaches level n for the first time. Further define Gk (i, j) := P(ττn = k, Xk = (n, j)X0 = (n + 1, i)) for all k ≥ 1 and i, j ≤ m. The spatial homogeneity of P implies that this definition is independent of n ≥ 0. Define the matrices Gk of dimension m × m by their entries Gk (i, j) for i, j ≤ m, and G := ∞ k=1 Gk . Thus the entry G(i, j) denotes the probability that under the condition that we start in a level n + 1 ≥ 1 and in phase i, we reach the level n for the first time in state j. Theorem 12.1 If the Markov chain X is recurrent, then G is stochastic. Proof: If G is not stochastic, then there is a phase i such that m ∞
P(ττn = k, Xk = (n, j)X0 = (n + 1, i)) < 1
k=1 j=1
Because the transition matrix P is skip–free to the left, this means that the function fij as defined by (2.5) satisfies f(n+1,i),(n,j) < 1 for all n ∈ N0 and 1 ≤ j ≤ m. By definition of the matrices An and Bn , the Markov chain X is irreducible. Then X is recurrent by definition if fx,x = 1 for some state x ∈ E . According to equation (2.6), fx,x = 1 can only hold for a state x ∈ E if fx,y = 1 holds for all states x, y ∈ E. Hence it follows that X is transient if G is not stochastic. Theorem 12.2 The matrix G satisfies the fixed point equation G=
∞
An Gn
n=0 [r]
Proof: First we introduce the auxiliary matrices Gk with entries [r]
Gk (i, j) = P(ττn = k, Xk = (n, j)X0 = (n + r, i))
(12.4)
for all k , r ≥ 1 and i, j ≤ m. Again, the spatial homogeneity of P implies that [1] this definition is independent of n ≥ 0. By definition Gk = Gk for all k ≥ 1. [r] Because P is skip–free to the left, we have Gk = 0 for k < r. Summing up
216
AN INTRODUCTION TO QUEUEING THEORY
over the number l of steps until the chain X reaches the next lower level for the first time, we obtain k−1 [r] [r−1] Gk = Gl Gk−l (12.5) l=1
for all k, r ≥ 1. Further define G[r] = G[r] =
k−1 ∞
[r−1]
Gl Gk−l =
k=1 l=1
∞
[r] k=1 Gk
∞ l=1
Gl
∞
for all r ≥ 1. Now we obtain [r−1]
Gk−l = GG[r−1]
k=l+1
which implies G[r] = Gr because of G[1] = G. Summing up over the level reached by X after the first step we finally obtain G = A0 +
∞
An G[n] =
n=1
∞
An Gn
n=0
which was to be proven. Theorem 12.3 The matrix G can be computed by the recursion G1 = A0
and
Gk =
k−1
n=1
∗n An Gk−1
with G = (0, G1 , G2 , . . .) and the convolutional powers of G as defined on page 190.
Proof: The first equality follows from the definition of G1 . For the second one, a first passage argument yields Gk =
k−1
[n]
An Gk−1
n=1 [n]
[n]
with Gk as defined in (12.4). Thus it remains to show that Gk = Gk∗n for all k ≥ n ∈ N. This relation holds by definition for n = 1 and all k ≥ 1. For n + 1 the induction step follows from equation (12.5).
3.
Stationary Distribution at Service Completions
Using the matrix G from the previous section, we are now ready to derive a recursive scheme for the stationary probability vector x = xP of P . We write
217
The BMAP/G/1 Queue
x = (xn : n ∈ N0 ), with xn = (xni : 1 ≤ i ≤ m) containing the stationary probabilities for level n. Theorem 12.4 If X is positive recurrent, then the vectors xn satisfy the recursion n −1 −1 ¯n + xk A¯n+1−k I − A¯1 x n = x0 B k=1
for all n ≥ 1, with the definitions ¯ n := B
∞
Bk G
k−n
A¯n :=
and
k=n
∞
Ak Gk−n
k=n
for n ≥ 0.
Proof: For n ≥ 1 we consider the Markov chain X F embedded in X at times of visits to the set F = {(k, i) : 0 ≤ k ≤ n, i ≤ m} of states, which is equal to levels zero through n. By the definition of G[r] and due to the relation G[r] = Gr (see the proof of theorem 12.2), the transition probability matrix Pn of X F can be written as ⎛ ⎞ ¯n B0 B1 B2 · · · Bn−1 B ⎜A0 A1 A2 · · · An−1 A¯n ⎟ ⎜ ⎟ ⎜ 0 A0 A1 · · · An−2 A¯n−1 ⎟ ⎜ ⎟ Pn = ⎜ .. .. .. ⎟ .. .. .. ⎜ . . . . . . ⎟ ⎜ ⎟ ⎝ 0 · · · 0 A0 A1 A¯2 ⎠ 0 ··· 0 0 A0 A¯1 By theorem 2.29 we know that the vectors x0 , . . . , xn are proportional to the vectors y0 , . . . , yn with y = (y0 , . . . , yn ) satisfying y = yP Pn . Hence we obtain in particular for the nth column ¯n + xn = x0 B
n
xk A¯n+1−k
(12.6)
k=1
According to theorem 12.1 we know that G is stochastic, and thus A¯1 1 =
∞
k=1
Ak Gk−1 1 =
∞
k=1
Ak 1 = 1 − A0 1
Due to corollary 10.7 and definition (12.1), all row sums of the matrix A0 are strictly positive. This implies that all row sums of A¯1 are strictly less than one,
218
AN INTRODUCTION TO QUEUEING THEORY
and thus I − A¯1 is invertible by Gershgorin’s circle theorem (see corollary 15.11). Therefore, we can transform the relation (12.6) to n −1 −1 ¯n + xk A¯n+1−k I − A¯1 xn = x0 B k=1
which is the statement. With the above recursion it remains to determine the vector x0 in order to obtain the stationary distribution at service completions. A simple expression for this will be obtained as a by–product of the next section.
4.
Asymptotic Distribution of the System Process
By means of the stationary distribution x of the embedded Markov chain X at service completions we can determine the asymptotic distribution y of the queue’s system process via theorem 7.15. In order to apply this, we need to obtain the product xm, with m denoting the column vector with entries T1 X0 = (n, i)) mn,i = E(T
Theorem 12.5 The asymptotic mean time between two service completions is given by xm = E(H) − x0 D0−1 1 Proof: For n > 0 we have mn,i = E(H), since the service does not depend on the phase of the arrival process. In order to determine the values m0,i , define τ := min{t ≥ 0 : pr1 (Qt ) > 0) as the time until the first arrival. Since the arrival process is independent of the rest of the queue, equation (10.2) can be applied to yield E(τ X0 = (0, i)) = −ei D0−1 1, with ei denoting the ith row base vector. Hence we obtain m0,i = E(τ X0 = (0, i)) + E(H) = E(H) − ei D0−1 1
Now the product xm is given by ∞ m −1 xm = xni E(H) + x0i (E(H) − ei D0 1) = E(H) − x0 D0−1 1 i=1
n=1
which was to be proven.
219
The BMAP/G/1 Queue
In a stationary regime, we expect that the intensities of the flow into and out of a queueing system equal each other. The asymptotic mean arrival rate is completely determine d by the parameters of the BMAP and was derived in theorem ionary phase distribution. 10.10 as λ = π ∞ k=1 kDk 1, with π denoting the stat ∞ The latter is determined by πD = 0, with D = k=0 Dk denoting the generator of the phase process. The intensity of the flow out of the system can be measured in terms of the mean time between two service completions, since every user leaves the system immediately after its service is finished. Thus we would expect that in under a stationary regime λ = 1/xm holds. This shall be proven next in Theorem 12.6 The asymptotic mean time between service completions equals the inverse of the asymptotic mean arrival rate: E(H) − x0 D0−1 1 = λ−1
Proof: Since the arrival process is independent from the rest of the queue, λ · (E(H) − x0 D0−1 1) = λ · xm is the asymptotic mean number of arrivals between two service completions, according to theorem 12.5. We need to show λ · xm = 1. Using the stationary distribution x of the embedded Markov chain X at service completion times, we recognize the following representations: The number ∞ ∞ k Ak 1 xn M1 = n=1
k=1
indicates the mean number of arrivals between two service completions for the case that the prior service completion does not leave the queue empty. The number ∞ −1 kDk 1 M2 = −x0 D0 k=1
signifies the mean batch size of the first arrival after the prior service completion leaves the system empty. Finally, M3 = −x0 D0−1
∞
k=1
Dk
∞
k Ak 1
k=1
represents the mean number of arrivals during the following service time. Thus we can write M1 + M2 + M3 = λ · xm and it suffices to show that this sum equals one. To this aim we take a look at the defining equation x = xP . Analogously to the argument before equation (8.16) for the M/G/1 queue, this
220
AN INTRODUCTION TO QUEUEING THEORY
can be written as x1 A0 = x0 (I − B0 ) x2 A0 = x0 (I − B0 − B1 ) + x1 (I − A0 − A1 ) x3 A0 = x0 (I − B0 − B1 − B2 ) + x1 (I − A0 − A1 − A2 ) + x2 (I − A0 − A1 ) .. . Here the nth equation is equivalent to n−1 n n− l −1 Bk + xl A − Ak xn A0 = x0 B − k=0
k=0
l=1
+ x0 (I − B) + ∞
∞
n −1 l=1
xl (I − A)
with A = n=0 An and B = n=0 Bn . We first multiply each equation t, then we add up all equations.Employing the relations by 1 from the righ n−1 −1 ∞ n − B − kn=0 Bk = ∞ B a d A k k=n k=0 Ak = k=n Ak , we obtain ∞ ∞ ∞ ∞ ∞ xn A − xn k Ak+1 1 Ak 1 = x0 nBn 1 + n=1
Because of to
∞
k=1
k=1 k Ak+1
=
n=1
∞
n=1
k=1
∞ k=1 k Ak − k=1 Ak and A1 = 1 this simplifies
1 − x0 1 = x0
∞
nBn 1 + M1
(12.7)
n=1
Using Bn = −D0−1 n+1 k=1 Dk An+1−k (see equation (12.3)), the first term on the right is evaluated as x0
∞
n=1
nBn 1 = −x0 D0−1 = −x0 D0−1 = M3 −
∞ n+ 1 n Dk An+1−k 1
n=1 ∞
k=1
Dk
k=1
x0 D0−1
∞
n=k−1 ∞
k=1
((n + 1 − k ) + (k − 1))An+1−k 1
(k − 1)Dk
= M3 + M2 + x0 D0−1
∞
k=1
= M3 + M2 − x0 1
∞
n=0
Dk 1
An 1
221
The BMAP/G/1 Queue
where the last equality holds because of This and (12.7) yield the statement.
∞
k=1 Dk
= (D − D0 ) and D1 = 0.
Let yni := limt→∞ P(Qt = (n, i)) for n ∈ N0 and 1 ≤ i ≤ m denote the asymptotic probabilities of the system process Q. Further define the vectors yn := (yn1 , . . . , ynm ) for all n ∈ N0 and the sequence y = (yn : n ∈ N0 ). Define the m × m matrices K [kn] (t) by their entries [kn]
Kij (t) := P(T T1 > t, Qt = (n, j)X0 = (k, i)) for all t ≥ 0 and k , n ∈ N0 . Then the asymptotic distribution y of the system process can be expressed in terms of the stationary distribution x of the embedded Markov chain X via theorem 7.15. As a first result we obtain
Theorem 12.7 The asymptotic probability vector of an empty system is given by y0 = −λx0 D0−1 and has total mass y0 1 = 1 − ρ, with ρ = λ · E(H). Proof: For n = 0 the matrices K [kn] (t) are zero if k > 0, since during the time between service completions the number of users in the system cannot decrease. The remaining matrices K [00] (t) are given by K [00] (t) = P0 (t) = eD0 ·t for all t ≥ 0, according to corollary 10.7. Theorem 7.15 now yields ∞ 1 x0 y0 = eD0 ·t dt = λ · x0 (−D0−1 ) xm 0
which is the first statement. The second one follows from this representation of y0 and theorem 12.6. Now we will derive a simple expression for the vector x0 . To this aim we take a look at the Markov chain X 0 embedded in X at visits to the level zero. The state space of this chain is {(0, i) : 1 ≤ i ≤ m}, which is isomorphic to the phase space {1, . . . , m} of the BMAP. From theorem 2.29 we know that x0 is proportional to, i.e. a scalar multiplicative of, the stationary probability vector of X 0 . First we determine the transition probability matrix K for X 0 , which is of dimension m × m. From the definition of G[r] and the relation G[r] = Gr
222
AN INTRODUCTION TO QUEUEING THEORY
we see by a first passage argument and then by equation (12.3) that K=
∞
n=0
Bn Gn = −D0−1
= −D0−1 = −D0−1
∞
Dk+1
k=0
∞ k=0
∞
n ∞
Dk+1 An−k Gn
n=0 k=0
n=k
An−k Gn−k Gk = −D0−1
D k Gk − D 0
∞
Dk+1 Gk+1
k=0
= I − D0−1 D[G]
∞
k with D[G] := k=0 Dk G . In order to find an expression for the vector κ = κK, we first need the following representation of the matrix G:
Lemma 12.8 The matrix G can be expressed by ∞ eD[G]·t dH (t) G= 0
In particular, the invariant probability vector g = gG satisfies gD[G] = 0.
Proof: The matrix G contains the probabilities of phase transitions between a service completion that does not leave the system empty and the first consecutive service completion which leaves the system with one user less than at the beginning. During the time between these two service completions the queue is never empty, which means that this time interval is a finite sum of (randomly many) service times. Phase transitions depend on the arrival process only, since this is independent of the rest of the queue. Thus it does not matter for G which is the service discipline, as long as the time between the above mentioned service completions remains the same. The stated expression for G results if we regard the phase process under the following service discipline. Whenever a new user arrives, it is immediately admitted to the server. The current service is interrupted and the user in service goes to the head of the queue. As soon as a service is completed, the service of the user at the head of the queue is resumed, i.e. none of the work is lost. Thus the time that a user spends in the server still equals exactly its service time. The server is not idle between the above mentioned service completions and finally, since the arrival process is independent from the service, the number of arriving users does not change under the new service discipline. Under the new service discipline, the user that is in service at the beginning of the time interval concerning G will also be in service when this time interval
223
The BMAP/G/1 Queue
ends, since all users arriving later will be served earlier. If there are no arrivals during the service time of this user, then phase transitions are governed by the rate matrix D0 . If there is a first (batch) arrival, occuring with rate matrix Dn , then the phase upon reentering the same level again (when the first user resumes its service) will change according to the rate matrix Dn G[n] = Dn Gn . Thus the generator for the phase process, if we regard only the lowest level of ∞ n the first user in service, is given by D[G] = n=0 Dn G . Since the complete time that the first user spends in the server is exactly its service time, the expression for G follows.
The second statement gD[G] = 0 for the stationary probability vector g = gG follows immediatlely from the obtained representation for G. Remark 12.9 The service discipline that was involved in the above proof is called LCFS (last come first served) discipline with preemptive resume regulation. Theorem 12.10 The stationary probabilities that the chain X is in level zero can be expressed by 1−ρ gD0 x0 = − λ
and the asymptotic probability vector of an empty system is given by y0 = (1 − ρ) · g
Proof: The expression K = I − D0−1 D[G] along with lemma 12.8 yields that κ = c′ · (−gD0 ) with some constant c′ . Theorem 2.29 now states that a representation x0 = c · (−gD0 ) holds with some constant c. By theorem 12.7 this implies 1 − ρ = y0 1 = λ · c · gD0 D0−1 1 = λ · c and thus c = (1 − ρ)/λ. This proves the first statement. The second statement now is a consequence of theorem 12.7.
Theorem 12.11 The asymptotic probability vectors yn for n ≥ 1 are given by the recursion ∞ n (y0 Dk + λxk ) (1 − H(t))P Pn−k (t) dt yn = k=1
224
AN INTRODUCTION TO QUEUEING THEORY
Proof: An application of theorem 7.15, along with theorems 12.5 and 12.6, yields ∞ n xk K [kn] (t) dt (12.8) yn = λ 0
k=0
as between service completions the number of users in the system can only increase. For k = 0 and n ≥ 1 we obtain t n K [0n] (t) = eD0 ·u Dl · (1 − H(t − u)) · Pn−l (t − u) du 0
l=1
while for k, n > 0 we have K [kn] (t) = (1 − H(t)) · Pn−k (t) In both expressions the independence between arrival process and current service is used. Employing them in (12.8) yields yn = λ · x 0
n l=1
∞
t=0
t
u=0
eD0 ·u Dl · (1 − H(t − u)) · Pn−l (t − u) du dt +λ·
n k=1
xk
∞
(1 − H(t)) · Pn−k (t) dt
The integral in the first line equals ∞ ∞ eD0 ·u Dl (1 − H(t − u))P Pn−l (t − u) dt du u=0 t=u ∞ ∞ D0 ·u du Dl e (1 − H(t))P Pn−l (t) dt = u=0 t=0 ∞ = −D0−1 Dl (1 − H(t))P Pn−l (t) dt t=0
If we plug this back into the above expression for yn and use y0 = −λx0 D0−1 , we obtain the statement.
5.
Stability Conditions
we will show various stability As in the previous chapter on the GI/PH/1 queue conditions to be equivalent. Define A = ∞ n=0 An . Then A = (aij )i,j≤m is the transition matrix for the phase component of the embedded Markov chain X under the condition that the queue is not empty. More exactly, we have P(pr2 (X1 ) = jX0 = (n, i)) = aij
225
The BMAP/G/1 Queue
for all n ≥ 1. Denote the stationary probability vector of A by π = π A. Further denote the generator of the phase process J by D = ∞ n=0 Dn . Completely analogously to the proof of lemma 11.7 one can show (as an exercise) that the vector π satisfies πD = 0.
Theorem 12.12 Denote the mean servicetime by E(H) and the asymptotic mean arrival rate of the BMAP by λ = π ∞ n=1 nDn 1. Then ρ = λ · E(H) = π
∞
nAn 1
n=1
Proof: Simply using the definition of An yields ∞ ∞ ∞ π nAn 1 = π n Pn (t) dH(t)1 = n=1
n=1
∞
Eπ (N Nt ) dH (t)
where Eπ (N Nt ) is the expected number of arrivals during time t if the BMAP starts with a phase distribution π . By theorem 10.10 we have Eπ (N Nt ) = λ · t and hence ∞ ∞ nAn 1 = λ · t dH(t) = λ · E(H) π 0
n=1
which is the statement.
Theorem 12.13 If the stability condition ρ < 1 holds, then the embedded Markov chain X is positive recurrent. Proof: As in lemma 11.9 we can find a non–negative solution x to the equation system (I − A)x = ¯ a − ρ1 (12.9) ∞ with a ¯i := j∈E n=1 nAn;ij for i ∈ E. Define the function f (s, j) = s+xj for s ∈ N0 and 1 ≤ j ≤ m. Then for r > 0 we obtain
(s,j)
P˜(r,i),(s,j) f (s, j) − f (r, i) = =r−1+ =
m ∞
j=1 n=1
m ∞
j=1 n=0
m ∞
j=1 n=1
An;ij · (r − 1 + n + xj ) − r − xi
nAn;ij +
m ∞
j=1 n=0
An;ij xj − r − xi
ai − 1 = ρ − 1 < 0 nAn (i, j) + ρ − ¯
226
AN INTRODUCTION TO QUEUEING THEORY
For the exceptional set F = {(0, i) : 1 ≤ i ≤ m} we obtain
(s,j )
P˜(0,i),(s,j ) f (s, j ) =
m ∞
j =1 n=1
nBn;ij +
m ∞
Bn;ij xj
j =1 n=0
which is finite by assumption. Thus the conditions of theorem 2.33 are satisfied, which proves the statement.
Notes The first complete analysis of the BMAP/G/1 queue has appeared in a paper by Ramaswami [71]. In this paper the BMAP was used with its older, more complicated notation under the name N–process. A special case of the BMAP/G/1 queue, namely the MAP/G/1 queue without batch arrivals, has been analyzed in Lucantoni et al. [56] using the current notation. The recursion scheme for the stationary probability vectors at service completion times has been introduced by Ramaswami [72]. An outline of Ramaswami’s analysis using the new notations, along with some new results (namely lemma 12.8 and theorem 12.10), are presented in Lucantoni [54]. The use of a matrix convolutional calculus for the determination of the matrix G has been presented in Baum [9]. A general discussion of M/G/1 type matrices and their use in queueing theory is presented in Neuts [66], including necessary conditions for the stability of the queue. A variant of the MAP/G/1 queue with LCFS service discipline is analyzed in Breuer [20]. For a historical overview of the developments that led to the BMAP and matrix–analytical methods see Lucantoni [55]. A different proof of theorem 12.6 can be found in Ramaswami [71]. In Neuts [66] a computation of the matrix G is proposed via the fixed point equation of theorem 12.2. A more elaborate version of the proof for lemma 12.8 can be found in Lucantoni and Neuts [57], while the idea for this proof has been presented in an earlier form of notation by Machihara [58]. A more elementary proof is given in Lucantoni [54]. Another recursion scheme for the asymptotic distribution y is presented in Takine [82].
Exercise 12.1 Prove π D = 0 for the stationary distribution π = πA. Exercise 12.2 Show the existence of a solution x to equation (12.9). n of the stationary Exercise 12.3 Define the z –transforms X(z) := ∞ n=0 xn z n probability vector at service completions, as well as A(z) := ∞ n=0 An z , and
227
The BMAP/G/1 Queue
n B(z) := ∞ n=0 Bn z for z ≤ 1. (a) Show that B(z) = −z −1 D0−1 (D(z) − D0 )A(z) (b) Use the result above and x = xP to show that X(z)(z I − A(z)) = −x0 D0−1 D(z)A(z)
Exercise 12.4 Use exercise 10.2 to show that ∞
Pn (t)z n = eD(z)·t
n=0
Exercise 12.5 Show that D(z) is invertible for 0 ≤ z < 1. +∞ Exercise 12.6 Define ψ(n) := 0 (1 − H(t))P Pn (t)dt for all n ∈ N0 and ∞ n Ψ(z) := n=0 ψ(n)z . Show that Ψ(z) = (A(z) − I)D(z)−1
n Exercise 12.7 Define the z–transform Y (z) := ∞ n=0 yn z of the asymptotic probability vector. Show that λX (z) · (z − 1) · D(z)−1 , 0 ≤ z < 1 Y (z) = π, z=1 Hint: Start by transforming Y (z) − y0 and use exercise 12.6.
Chapter 13 DISCRETE TIME APPROACHES
1.
Discrete Phase–Type Distributions
Analogous to the definition of PH distributions in continuous time, we will define discrete PH distributions in terms of Markov chains with one absorbing state. Let X denote a Markov chain with finite state space E = {0, . . . , m} and a transition matrix structured as 1 0 P = η T
Denote the initial distribution of X by the row vector α ˜ = (α0 , α), where α is of dimension m. The structure of P shows that state 0 is absorbing. All other states shall be transient. Let Z = min{n ∈ N0 : Xn = 0} denote the time until absorption in state 0. Define pn := P(Z = n) for all n ∈ N0 . The distribution p = (pn : n ∈ N0 ) of Z is called a discrete phase–type distribution, or shortly discrete PH distribution. We also write Z ∼ P Hd (α, T ). The number m of transient states is called the order of p. A transient state is called phase.
An immediate first observation is η = 1 − T 1, with 1 denoting a column vector with all entries being one. Further the definition yields p0 = P(Z = 0) = α0 = 1 − α1
(13.1)
This explains the notation P Hd (α, T ). Knowledge of α and T is sufficient to determine α ˜ and η and hence completely specify the distribution of Z. Therefore we call the pair (α, T ) the characterization of a discrete PH distribution.
230
AN INTRODUCTION TO QUEUEING THEORY
Theorem 13.1 Let Z denote a random variable which has a discrete phase– type distribution with characterization (α, T ). Then P(Z = n) = αT n−1 η
and
P(Z ≤ n) = 1 − αT n 1
for all n ∈ N. Proof: The structure of P leads to the observation 1 0 n P = 1 − T n1 T n for n ∈ N0 , which can be verified by induction on n. Together with (13.1) this yields the second statement. The first one is now obtained as
P(Z = n) = P(Z ≤ n) − P(Z ≤ n − 1) = αT n−1 1 − αT n 1 = αT n−1 (1 − T 1)
which completes the proof because of η = 1 − T 1. By corollary 2.15 we know that invertibility of I − T is equivalent to the postulate that the states 1, . . . , m be transient. The same arguments as in the continuous case (see theorem 9.3) serve to show that Lemma 13.2 A P Hd (α, T ) distribution is non–defective if and only if the matrix I − T is invertible. Then the expected number Eij of visits to state j before absorption, given that the Markov chain X starts in state i, is Eij = (I − T )−1 ij . As already stated in the definition, we shall always assume that 1, . . . , m are transient states, i.e. that I − T is invertible. The following examples show the high versatility of the introduced class of distributions.
Example 13.3 Let p = (pn : n ∈ N) denote a geometric distribution with parameter q, i.e. pn = (1 − q)q n−1 for all n ∈ N. Then p has a discrete PH representation with order m = 1, α = 1, and T = q. The exit vector is given by η = 1 − q. Example 13.4 A generalization of the geometric distribution is the negative binomial distribution. For parameters N ∈ N, the number of successes sought, and q ∈]0, 1[, the probability of success, a distribution p is negative binomial q N (1 − q)n−N for all n ≥ N . The value pn is the probability if pn = N +n−1 n of observing n trials until the N th success. For the special case N = 1 we obtain the geometric distribution.
231
Discrete Time Approaches
The distribution p has a discrete PH representation with order m = N , initial phase distribution α = e1 = (1, 0, . . . , 0), and T given by the entries ⎧ ⎪ ⎨1 − q, i = j Tij = q, j =i+1≤N ⎪ ⎩ 0, else The exit vector is η = (0, . . . , 0, q)T .
Example 13.5 Any discrete distribution p with finite support, i.e. pn = 0 for n > m with some m ∈ N, has a discrete PH representation. We write p = (p0 , . . . , pm ). Then there are two possibilities for such a representation. ˜ = p, One is called the remaining time representation. Here we set α Ti,i−1 = 1 for 1 ≤ i ≤ m, and Tij = 0 otherwise. This implies an exit vector η = (1, 0, . . . , 0). The other is called the elapsed time representation. For this we set α0 = p0 , α = (1 − p0 , 0, . . . , 0) and 1 − pi /(1 − ki−1 =0 pk ), j = i + 1 ≤ m Tij = e ls e 0, This time we have an exit vector η = (η1 , . . . , ηm−1 , 1) with entries deter mined by ηi = pi /(1 − ki−1 =0 pk ). The z–transform of a discrete phase–type distribution p is given by p∗ (z) =
∞
n=0
pn z n = α0 +
∞
n=1
= α0 + zα(I − z T )−1 η
αT n−1 ηz n = α0 + z · α
∞
(z T )n−1 η
n=1
(13.2)
for z ≤ 1. This expression yields the factorial moments for a random variable Z ∼ P Hd (α, T ), namely E(Z · (Z − 1) · . . . · (Z − k + 1)) = k!α(I − T )−k T k−1 1
(13.3)
for all k ∈ N. This formula is obtained by differentiating (13.2) k times with respect to z and evaluating at z = 1. In particular, the mean time to absorption is given by (13.4) E(Z) = α(I − T )−1 1 Another expression for this will be derived in corollary 13.6.
232
2.
AN INTRODUCTION TO QUEUEING THEORY
BMAPs in Discrete Time
Like the discrete time version of phase–type distributions, we can define batch Markovian arrival processes in discrete time, too. Let Y = (N , J ) denote a Markov chain with state space E = N0 × {1, . . . , m}
where m ∈ N is some finite number. For a state (n, i) we call the first dimension n the level and the second dimension i the phase. Let 0 denote the matrix with all entries being zero. If the transition matrix of Y has a block structure ⎛ ⎞ D0 D 1 D 2 D 3 . . . . ⎟ ⎜ ⎜ 0 D0 D1 D2 . . ⎟ P =⎜ . ⎟ ⎜ ⎟ 0 D0 D1 . . ⎠ ⎝0 .. .. .. .. .. . . . . .
and D := ∞ n=0 Dn is irreducible, then Y is called a discrete batch Markovian arrival process or shortly discrete BMAP. The Markov chain determined by the transition matrix D is called the phase process of Y.
Like the continuous time analogue, we want to use discrete BMAPs as a model for arrival streams. Thus we always assume that D0 is strictly substochastic, i.e. there is an index n ∈ N with Dn = 0. Then Y is clearly transient and does not have a stationary distribution. The Toeplitz structure of P implies that the transition probabilities P(Y Y1 = (n + k, j)Y Y0 = (n, i)) = Dk (i, j) = P(Y Y1 = (k, j)Y Y0 = (0, i)) are homogeneous in the first dimension of the state space. Hence the n–step transition probabilities are determined by the values Pk;i,j (n) := P(Y Yn = (k, j)Y Y0 = (0, i)) Define the m × m matrices Pk (n) := (P Pk;i,j (n))i,j≤m and the sequences P (n) := (P Pk (n) : k ∈ N0 ) of matrices. By definition P (0) = (I, 0, 0, . . .)
with I denoting the m × m identity matrix. Define convolutions of matrix sequences as in section 4. Further write ∆ = (Dn : n ∈ N0 ). Then clearly P (1) = ∆, and we can show that P (n) = ∆∗n
233
Discrete Time Approaches
for all n ∈ N by the induction step Pk (n + 1) =
k
Pi (n)Dk−i =
i=0
k
∗(n+1)
∆∗i n Dk−i = ∆k
i=0
which holds for all k ∈ N0 . The z–transform of P (n) is given by ∞ n ∞ ∞ Pn∗ (z) = Pk (n)z k = ∆∗kn z k = Dk z k k=0
k=0
k=0
for all n ∈ N. Hence the expectation matrix of the number of arrivals within n time slots is , ∞ ∂ ∗ ,, kDk Pn (z), =n·D· E(P (n)) = ∂z z=1 k=1
Let π = π D denote the stationary distribution of the phase process. Then the expected number of arrivals within n time slots given that Y starts with phase distribution π is obtained as Nn ) = n · π Eπ (N
∞
kDk 1
(13.5)
k=1
for all n ∈ N. Consider now a discrete phase–type distribution with characterization (α, T ). As usual, define the exit vector by η := 1 − T 1. A special class of discrete BMAPs arises if we set D0 := T , D1 := ηα and Dn := 0 for n ≥ 2. This is called a discrete PH renewal process or shortly a P Hd renewal process. For the stationary phase distribution π = πD with D = T ηα, expression (13.5) Nn ) = n · π η for all n ∈ N. Now the same argument as for specifies to Eπ (N corollary 10.12 holds. The described BMAP is a renewal process (in contin˜ ) with initial delay X0 ∼ P Hd (π , T ) and renewal uous time, denoted by N intervals Xn ∼ P Hd (α, T ). The elementary renewal theorem 6.12 states that
˜⌊t⌋ ) ⌊t⌋ ˜t ) E(N E(N Eπ (N Nn ) 1 = lim = lim = n→∞ t→∞ t→∞ t ⌊t⌋ t n E(X1 ) lim
Thus we obtain another expression for the mean of a discrete phase–type distributed random variable (cf. corollary 13.6). Corollary 13.6 For a P Hd (α, T ) distributed random variable X the expectation is given by E(X) = (πη)−1 , where π = π(T + ηα) is the stationary phase distribution.
234
3.
AN INTRODUCTION TO QUEUEING THEORY
Blockwise Skip–Free Markov Chains
In chapters 11 and 12 we have analyzed Markov chains of a blockwise Hessenberg structure, i.e. they were blockwise skip–free in one direction. For each of them we have developed an own method of finding the stationary distribution. Both methods employed matrices of central importance for the formulation of the stationary distribution. In the former case it was an expectation matrix called R, in the latter case a stochastic matrix called G. For the special case that a Markov chain is blockwise skip–free in both directions, we can hope to combine both approaches and thus obtain more results. This shall be pursued in this section. We further will see that this kind of Markov chains can be used as the basic tool for analyzing queues in discrete time. An irreducible transition matrix structured as ⎛ B C ⎜D A1 A0 ⎜ ⎜ A2 A1 A0 P =⎜ ⎜ A2 A1 A0 ⎝ .. .. . .
⎞ ..
.
⎟ ⎟ ⎟ ⎟ ⎟ ⎠
with matrices B, C, D, and Ai having dimensions n × n, n × m, m × n, and m × m, respectively, is called blockwise skip–free. This matrix defines a Markov chain X with state space E = {(0, i) : 1 ≤ i ≤ n} ∪ {(n, j) : n ∈ N, 1 ≤ j ≤ m} with n, m ∈ N. The first dimension of a state is called level, the second phase. The special case n = m = 1 is called a skip–free Markov chain (cf. section 2 for the continuous time analogue). The matrix P satisfies the conditions of blockwise Hessenberg structure in both directions. Hence the approaches for analyzing the embedded Markov chains in chapters 11 and 12 apply both. The only difference to be considered are the matrices B, C , and D at the boundary.
As in section 2 we can define a rate matrix R which satisfies R = A0 + RA1 + R2 A2 according to theorem 11.3. Theorem 11.1 tells us that if there is a stationary distribution x = (xn : n ∈ N0 ) for X , then it satisfies the relation xn+1 = xn R
or
xn = x1 Rn−1
(13.6)
235
Discrete Time Approaches
for all n ∈ N. On the other hand we can define a matrix G as in section 2 by G = A2 + A1 G + A0 G2 due to theorem 12.2. According to theorem 12.1 we know that G is stochastic if X is recurrent.
Equation (13.6) reduces the problem of finding a stationary distribution x for P to the determination of x0 and x1 . To this aim, we consider the Markov chain X F restricted to the subset F = {(0, i) : 1 ≤ i ≤ n} ∪ {(1, j) : 1 ≤ j ≤ m} of the state space E. Because P is blockwise skip–free, states in level 0 do not communicate with states in F c = E \ F . Hence transitions from F to F c and back must go via level 1. Thus we arrive at a transition matrix B C F P = D U for X F , where only the lower right–hand entry remains to be determined. The matrix U contains all probabilities to go from level 1 back to level 1 in a finite number of steps without entering level 0.
Clearly the probabilities for one step are contained in A1 , whence we obtain U = A1 + U ′ . The respective probabilities for more than one step (which are contained in U ′ ) must consider visits to the set F c in all but the last step. The blockwise skip–free structure of P implies that the first step must go from level 1 to level 2, for which the transition probabilities are contained in A0 . Then we need the probabilities to go from level 2 back to level 1 in a finite number of steps. By definition these are contained in the matrix G (see section 2). Hence we obtain U = A1 + A0 G and thus have determined P F completely. Theorem 2.29 states that positive recurrence of X implies positive recurrence of X F . Hence P F admits a stationary distribution xF = (x0F , x1F ) as the solution of the linear equation system (x0F , x1F ) = (x0F B + x1F D, x0F C + x1F U ) Define c := x0F 1 + x1F (I − R)−1 1. Then theorem 2.29 yields that
x0 = c−1 x0F ,
x1 = c−1 x1F ,
xn+1 = x1 Rn
236
AN INTRODUCTION TO QUEUEING THEORY
for all n ∈ N is the stationary distribution of X . In fact, we can verify ∞
n=0
x n 1 = x0 1 + x1
∞
n=0
Rn 1 = c−1 (x0F 1 + xF1 (I − R)−1 1) = 1
and theorem 2.29 states that (x0 , x1 ) and (x0F , x1F ) differ by a constant multiple only. Define A := A0 + A1 + A2 . Since P is irreducible and stochastic, so is A, and thus there is a stationary distribution π = πA. By theorems 11.10 and 11.8 we know that X is positive recurrent if the condition πA1 1 + 2 · πA2 1 > 1 holds. Using the definition of A we obtain
1 = π A1 = π A0 1 + π A1 1 + π A2 1 which yields the equivalent condition π A0 1 < π A2 1
(13.7)
for positive recurrence of X .
4.
The PH/PH/1 Queue in Discrete Time
As an application we shall analyze the PH/PH/1 queue in discrete time. Inter– arrival times as well as service times are iid and have a discrete phase–type distribution, named A and B respectively. The former has characterization (α, T ) of order n, the latter (β , S) of order m. We set α0 = β0 = 0 in order to avoid batch arrivals and instantaneous services. Denote the exit vectors by η = 1 − T 1 and ζ = 1 − S1.
Note that by example 13.5, the discrete time GI/G/1 queue is a special case of the PH/PH/1 queue if inter–arrival and service time distributions have finite support. By example 13.3, the M/M/1 queue in discrete time as examined in section 6 is a special case, too. For any time index n ∈ N0 , define the random variables Nn as the number of users in the system, Kn as the phase for the inter–arrival time, and Jn as the phase for the service time. Then the system process Q = ((N Nn , Kn , Jn ) : n ∈ N0 ) is a Markov chain with state space E = {(0, k ) : 1 ≤ k ≤ n} ∪ {(n, k, j) : n ∈ N, 1 ≤ k ≤ n, 1 ≤ j ≤ m}
237
Discrete Time Approaches
and transition matrix ⎛
where
B C ⎜D A1 A0 ⎜ ⎜ A2 A1 A0 P =⎜ ⎜ A2 A1 A0 ⎝ .. .. . .
⎞ ..
.
⎟ ⎟ ⎟ ⎟ ⎟ ⎠
B = T, C = (ηα) ⊗ β, D =T ⊗ζ A0 = (ηα) ⊗ S, A1 = T ⊗ S + (ηα) ⊗ (ζβ), A2 = T ⊗ (ζβ) Here the composition ⊗ represents the Kronecker product, which is defined in the pretext of theorem 9.13. The matrices B , C , D, and Ai are of dimensions n×n, n×nm, nm×n, and nm×nm, respectively. We see that P is blockwise skip–free which allows us to use results from the preceding section. Define A := A0 + A1 + A2 and let π = π A denote the stationary distribution for A. Using exercices 13.4 and 13.5, we obtain A = (ηα) ⊗ S + T ⊗ S + (ηα) ⊗ (ζβ) + T ⊗ (ζβ) = (ηα + T ) ⊗ S + (ηα + T ) ⊗ (ζ β ) = (T + η α) ⊗ (S + ζβ)
(13.8) (13.9)
π = α∗ ⊗ β ∗
(13.10)
This yields
with α∗ = α∗ (T + ηα) and β ∗ = β ∗ (S + ζ β ). Condition (13.7) for positive recurrence of Q specifies to (α∗ ⊗ β ∗ ) (ηα ⊗ S) 1 < (α∗ ⊗ β ∗ ) (T ⊗ ζ β ) 1 ⇐⇒ α∗ ηα1 · β ∗ S1 < α∗ T 1 · β ∗ (ζ β )1 ⇐⇒ α∗ η · β ∗ (1 − ζ) < α∗ (1 − η) · β ∗ ζ ⇐⇒ α∗ η < β ∗ ζ
(13.11)
By corollary 13.6 this is equivalent to E(B) < E(A)
which is our usual condition that the mean service time is strictly smaller than the mean inter–arrival time.
238
AN INTRODUCTION TO QUEUEING THEORY
Notes Discrete PH distributions have been introduced in Neuts [62, 65]. For an early application and discrete time MAPs see Alfa and Neuts [4]. A text book presentation can be found in Latouche and Ramaswami [52]. Discrete phase–type distributions with infinitely many phases are introduced in Shi and Liu [79]. The analysis of the GI/G/1 queue in discrete time is taken from Alfa and Li [3] and Alfa [2]. An overview on further results is given in Alfa [1]. Exercise 13.1 Prove lemma 13.2. Exercise 13.2 Verify the remaining and elapsed time representations introduced in example 13.5. Exercise 13.3 Prove formula (13.3) for the factorial moments of a discrete phase–type distribution. Exercise 13.4 For matrices A, B, and C of appropriate dimensions, prove the distributive laws A ⊗ C + B ⊗ C = (A + B) ⊗ C A ⊗ B + A ⊗ C = A ⊗ (B + C) for the Kronecker product, and verify equalities (13.8) and (13.9). Exercise 13.5 For matrices A, B, C, and D of appropriate dimensions, prove the associative law (A ⊗ B)(C ⊗ D) = AC ⊗ BD
for the Kronecker product, and verify formula (13.10) and the equivalence (13.11). Exercise 13.6 Analogous to an interrupted Poisson process (IPP), we define an interrupted Bernoulli process. There are two phases (numbered 1 for ”on” and 0 for ”off ”). In every time slot there is a probability p to switch from phase 0 to phase 1 and a probability q to switch back. In phase 1 there is a probability r of observing one arrival in a time slot. Give an exact definition in terms of a transition matrix for a discrete MAP. Note the difference to the IPP due to the possibility of phase change and arrival occuring in the same time slot.
Chapter 14 SPATIAL MARKOVIAN ARRIVAL PROCESSES
With respect to queueing theory we have, for several times, pointed to the application area of telecommunication networks. In fact, during the last two decades the analysis of complex systems of that type has become the most significant issue in applied queueing theory. Modern communication facilities represent articles of daily use, and are outfit accessories of pedestrians, car drivers, pilots, and nearly all people who need the contact to other people or to data processing devices. Mobility and spatial distribution are characteristic features of these systems. The installation of mobile communication networks (that started in a technically useful form as early as in 19821 ) is accompanied in many cases by a partition of a geographic region into cells covering the whole area. Customers of such networks get active randomly in time, and are moving around in and across the cells, eventually stopping their activities (vanishing as network users) after having been serviced by the providing company.
Transferred into the language of queueing theory we are confronted thereby with a new type of arrival process and a new species of customers, namely processes that put their arriving elements (customers) onto certain locations, and customers who start moving immediately after appearing at a location. Arrival processes of that kind are characterized by a random behavior in time and space. In previous chapters we have stepped through various queueing models until reaching types ”beyond the exponential”, and we saw that Markovian arrival processes (MAPs) belong to the most versatile tools for describing the dynamics of modern computer networks (and related configurations). What we 1 The
Advanced Mobile Phone System (AMPS), developed by Bell Laboratories, USA.
240
AN INTRODUCTION TO QUEUEING THEORY
are now about to do is a generalization of these processes to spatial arrival processes.
1.
Arrivals in Space
The Markovian arrival processes (N Nt , Jt )t≥0 considered so far had state space N0 × E, where E = {1, . . . , m} represented the phase space, Nt a counting variable, and (J Jt )t≥0 a timehomogeneous Markov process. Nothing was said about ”where” an arrival occurs, or what kind of additional information we can assign to the ”customers” or ”jobs” that arrive according to a MAP. The properties of N0 that we needed for an adequate description of the counting variable Nt may be seen as to be the following: (i) We can measure (count) the ”jobs” that arrivals bring into the system (whatever the latter is), (ii) we can add sets of ”jobs” that arrived, i.e. the number of ”jobs” that several (possibly not subsequent) arrival events produce is the sum of all individual arrival sets, and
to the portions that arrivals (iii) (N Nt )t≥0 is an increment process with respect add to the system, i.e., for α ⊂ N0 with A = αi ∈α αi , and K ⊂ J, we have P((N Ns+t , Js+t ) ∈ A × K  Ns = n, Js = i) = P((N Ns+t , Js+t ) ∈ (A − n) × K  Ns = 0, Js = i).
This somewhat artificially looking description attains its meaning next when we are going to generalize the concept of a MAP by adding information to the arriving elements (e.g. jobs). In more general terms, namely, a MAP can be regarded as a twodimensional Markovian jump process (N Nt , Jt )t≥0 with state space U × E, where E represents the phase process, and U has the following properties: 1 There is a σ algebra U such that (U, U) is a measurable space with {u} ∈ U for any u ∈ U. 2 (U, +) forms a semigroup with neutral element o. 3 For A ⊂ U, K ⊂ J, and A − u = {v ∈ U : v + u ∈ A}, P((N Ns+t , Js+t ) ∈ A × K  Ns = u, Js = i) = Ns+t , Js+t ) ∈ (A − u) × K)  Ns = o, Js = i). P((N
Spatial Markovian Arrival Processes
241
In fact, any MAP can be regarded as a socalled Markovadditive jump process, being defined in general terms as follows. Let U denote a set with properties 1  3, and E ⊂ N0 . Definition 14.1 A twodimensional process (Y Yt , Jt )t≥0 on a state space U × E is called a Markovadditive jump process if (i) (Y Yt , Jt )t≥0 is a Markov process, and (ii) for s, t ≥ 0, the conditional distribution of (Y Ys+t − Ys , Js+t ), given (Y Ys , Js ), depends only on Js .
It is easy to see that, for any Markovadditive jump process (Y Yt , Jt )t≥0 , the Yt )t≥0 has (phase) component (J Jt )t≥0 forms a Markov jump process and (Y conditionally independent increments. That is, given the states of Jtν for 0 ≤ ν ≤ n, the random variables Yt1 − Y0 , Yt2 − Yt1 , . . . , Ytn − Ytn−1 are conditionally independent for known J0 , Jt1 , . . . , Jtn .
Let us now consider Markovian arrival processes in which an arrival event means the appearance of customers at specific locations, or simply the appearance of points in some space X. We may speak of localizable arrivals in this case, and of a spatial arrival process. The term ”spatial” requires some explanation. Being accustomed to think in terms of the Euclidian space, usually everybody takes for granted properties of the space X that have particular mathematical significance. Such properties are (among others) (i) X is a metric space with metric d : X × X → R0 . (ii) Any Cauchy sequence {xn } in X is convergent.2 (iii) X contains a countable dense subset. A space with these properties is called a Polish space. Since (ii) means completeness, and (iii) separability, a Polish space can be defined more precisely as a complete separable metric space (X, d). In such a space any compact subset is closed, and any isolated point constitutes a closed subset. This is the type of space we take as a basis, i.e. when speaking of localizable arrivals. Accordingly, when using the notion of a spatial arrival process we shall constantly refer to arrivals in a Polish space. 2A
sequence satisfying d(xn , xm ) → 0 as m, n → ∞.
242
AN INTRODUCTION TO QUEUEING THEORY
The appearance of (finitely many) points in X can mathematically be interpreted as the occurrence of some certain (finite) counting measure ν. This is due to the fact that counting measures are the primary ingredients of point fields. Let B(X) denote the Borel σ algebra of (X, d), and µ a locally finite measure on B(X), i.e. a measure with the property that for each x ∈ X there is some open vicinity U (x) such that µ(U ) < ∞. Assume that µ has the following regularity property: µ(A) = sup{µ(K) : K ⊂ A, K compact} for any A ∈ B(X). Then µ is called a Radon measure, and if the range of µ is N0 , it is called a (Radon) counting measure. Any counting measure defines what we may call a point field in X. We know that arrival events in a Markovian arrival process (MAP) occur randomly in time. In a similar way, when assuming that each arrival specifies a set of points (or, in case, a single point) in space, we should naturally propose that these points are located randomly in the space. A spatial MAP, hence, produces random point fields in a space X over time. What is the precise mathematical description of a random point field? Let V denote the family of all counting measures, and let, for each subset S ∈ B(X), Vn (S) be the set of all measures µ with µ(S) = n. The σ algebra V that is generated by the family % & M = Vn (S) : n ∈ N0 , S ∈ B(X)
(of sets of measures) defines V as a measurable space (V, V) of counting measures over the Polish space (X, d). The σalgebra V is rich enough to allow the distinction of single measures, i.e. every singleton {µ} in V is measurable.3 The answer to our above question is easy now: Given some probability space (Ω, A, P), a random point field is nothing else than a measurable mapping F : Ω → V.
Obviously, the family V of counting measures over (X, d) forms a semigroup with respect to addition, where the sum µ + ν of measures is defined as the measure (µ + ν)(S) = µ(S) + ν(S) for all S ∈ B(X). The neutral element o is the measure that assigns zero points to any subset S ∈ B(X). We introduce the following notation: Let A, B ∈ V ; then A − ν = {µ ∈ V : µ + ν ∈ A}, µ + B = {µ + ν ∈ V : ν ∈ B}, A − B = {µ ∈ V : µ + B ⊂ A}. 3 This
is due to the fact that a locally finite measure µ on (X, d) is determined already by its values µ({x}) on the singletons x in X.
Spatial Markovian Arrival Processes
243
From these properties it is easy to deduce that V can well be used as the state space of the counting variable of some Markovadditive jump process. As that it is an arrival process for measures. More precisely, we introduce what we call an SMAP for short. Definition 14.2 A homogeneous Markovadditive jump process (Y Yt , Jt )t≥0 with state space V × E , where (V, V) is a measurable space of counting measures over a Polish space (X, d), is called a spatial Markovian arrival process or SMAP.
Each jump in an SMAP (Y Yt , Jt )t≥0 is to be interpreted as the arrival of some point field in X (corresponding to a finite measure ν over X) together with some certain phase transition i → j (i, j ∈ E). Yt is the random variable describing the very point field that is created by superposition of all those locally finite counting measures that arrived under the SMAP up to time t. For A ⊂ V and K ⊂ J, the probabilities P(Y Yt ∈ A, Jt ∈ K  Y0 = o, J0 = i) =: pt (0, i; A × K) define what is usually called the transition kernel of the process. Accordingly, we call d P(Y Yt ∈ A, Jt ∈ K  Y0 = o, J0 = i) =: q(0, i; A × K) dt the transition rate kernel of the SMAP (here we propose A × K = {(o, i)}). Using this notation we define, for each subset S ∈ B(X), the subset specific transition kernels Pt (n, ij; S))i,j∈E = (pt (0, i; Vn (S) × {j}))i,j∈E Pt (n; S) = (P
(14.1)
as well as the subset specific transition rate kernels Dn (S) = (Dn;ij (S))i,j∈E = (q(0, i; Vn (S) × {j}))i,j∈E .
(14.2)
Now we are in the position to define a correlated family of subset specific spatial BMAPs by counting, in any fixed subset S ∈ B(X), the points that occur within S according to the arrivals under the SMAP (Y Yt , Jt )t≥0 . Since a batch Markovian arrival process, as a Markov process, is completely determined by its generator, it suffices to specify a generator G(S) for any measurable subset S of X. This is done by setting ⎞ ⎛ D0 (S) D1 (S) D2 (S) . . . ⎜ O D0 (S) D1 (S) . . . ⎟ ⎟ ⎜ G(S) = ⎜ O . (14.3) O D0 (S) . . . ⎟ ⎠ ⎝ .. .. .. . . . ...
244
AN INTRODUCTION TO QUEUEING THEORY
The assertion that G(S) is a generator matrix with ∞
n=0 j∈E
Dn;ij (S) = 0 ∀ i ∈ E
is justified by the following lemma. Lemma 14.3 For every S ∈ B(X), the sum ∞ n=0 Dn (S) = D forms the generator matrix of the phase process (J Jt )t≥0 of the SMAP (Y Yt , Jt )t≥0 , independently of S . Proof: Excluding transitions of the form (o, i) → (o, i) we have, for j = i, ∞
Dn;ij (S) =
n=0
∞
n=0
q((o, i), Vn (S) × {j})
= q((o, i),
/
Vn (S) × {j})
Dij (S)
n∈N0
= = On the other hand, for j = i, ∞
n=0
Dn;ii (S) = Dii (S) = − = −
and hence,
! / d p t; (o, i), Vn (S) × {j} dt n∈N0 ! d P Jt = j  J0 = i = Dij . dt
∞
n=0 Dn (S)
∞
j =i n=0
j =i
Dn;ij (S) = −
Dij = Dii ,
j =i
= D, independently from the choice of S ∈ X .
The BMAP (N Nt (S), Jt )t≥0 with generator matrix G(S) is called a spatial BMAP over the subset S ∈ B(X), or SBMAP over S for short. Notice, that a common BMAP as introduced in chapter 10 can be seen as an SMAP over a single point X = {x} with timehomogeneous phase process. If E = {1}, then (Y Yt )t≥0 is a spacetime Poisson process with general spatial distribution. Such Poisson processes have been considered by Serfozo [77] and Breuer [21].
245
Spatial Markovian Arrival Processes
2.
Properties of Spatial MAPs
We call an SMAP regular, if (n,j)=(0 ,i) Dn;ij (S) = −D0;ii (S) > 0, and stable if −D0;ii (S) < ∞ for any S ∈ B(X), i.e. an SMAP is stable if the total arrival rate connected with any phase transition is finite. We assume regularity and stability throughout. Let us ask for the phase depending probabilities Pt (k; S) that k customers have arrived until time epoch t in some subset S ∈ B(X). Since, for fixed S, we can proceed as in case of a common BMAP, we immediately obtain Pt (k; S) = e∗∆(S)·t
where
!
k
∆(S)∗kn = G(S)0n k
=
∞ n t
n=0
n!
∆(S)∗kn ,
for k ≥ 0.
As a consequence, the counting variables Nt (S) satisfy P(N Nt (S) = n, Jt = j  N0 (S) = 0, J0 = i) = Pt (n, ij; S).
(14.4) We also have Pt (0; S) = eD0 (S)·t as before, and Pt (n; S) = e∗∆(S)·t n . Written in block matrix form, Pt (S) reads ⎛ D (S)·t ∗∆(S)·t ∗∆(S)·t ⎞ ... e 0 e e 1 2 ⎜ O eD0 (S)·t e∗∆(S)·t 1 . . . ⎟ ⎜ ⎟ Pt (S) = ⎜ ⎟. D0 (S)·t . . O O e . ⎝ ⎠ .. .. .. .. . . . . ∞ Jt : t ≥ 0) is the Justified by our result n=0 Dn (S) = D, the phase process (J same for any SBMAP over S ∈ B(X) and plays the same role as in case of a common BMAP. Hence, the form of the transition matrix PtΦ of (J Jt : t ≥ 0) remains unchanged as PtΦ = eD·t .
Facing this and the above statements it is obvious that nearly all properties of a common BMAP reappear as those of an SMAP when considering only one fixed subset S ∈ B(X). There are two points, but, that have to be emphasized when dealing with an SMAP: 1 We have to determine also joint distributions of points in different subsets Sν , ν = 1, . . . , K, for any given family {S1 , . . . , SK } ⊂ B(X) in order to fully define a spatial arrival process (and to allow realistic applications of the theory).
246
AN INTRODUCTION TO QUEUEING THEORY
2 There is a need for recipies for defining the random point fields that occur according to arrivals under the SMAP. Addressing the first point, consider a family of measurable subsets S1 , . . . , SK in the Polish space X. The joint distribution of points in such a family that accumulated due to arrivals under the SMAP can be determined as follows. Let the sets S1 , . . . , SK ∈ B(X) be disjoint4 , and set S = (S1 , . . . , SK ), n = (n1 , . . . , nK ). We use the notation Vn (S) Pt (n, i, j; S) D(n, i, j; S) Pt (n; S) D(n; S) Pt (S)
= = = = = =
{ν ∈ V : ν(Sk ) = nk , 1 ≤ k ≤ K}, p(t; i, Vn (S) × {j}), q(i, Vn (S) × {j}), (P Pt (n, i, j; S))i,j∈E , (D(n, i, j; S))i,j∈E , {P Pt (n; S)}n∈NK , 0
∆(S) = {D(n; S)}n∈NK . 0
Then, due to conditional independence of increments, the ChapmanKomogorov equations hold exactly as in the case of a common BMAP, i.e. written in convolutional form, Pt+τ (S) = Pt (S) ∗ Pτ (S). By subtracting Pt (S) on both sides and forming the differential quotient, we obtain the ChapmanKolmogorov differential equations: d Pt (S) = ∆(S) ∗ Pt (S) . dt Similar to the case of onedimensional Markov processes as seen in chapter 10, the solution of these equations takes the (convolutional) exponential form: ∗∆(S) t
Pt (S) = e
,
Pt (n; S) =
∞ k t
k=0
k!
(∆∗k (S))n .
Thus, the expressions for joint distributions of customer populations in disjoint subsets formally resemble those of a onedimensional BMAP. The corresponding expressions for the SMAP with respect to one single subset S ∈ B(X) are obtained from the results for K = 1. Addressing now the second point, one possible method to specify the types of the random point fields occurring as arrivals under an SMAP is the following. 4 It
should be obvious that there is no loss of generality by that assumption, since intersections may be treated as separate subsets.
247
Spatial Markovian Arrival Processes
Start with some common BMAP that is given in form of its phase process (J Jt : t ≥ 0) and its rate matrices Dn = (Dn;ij )i,j∈E . Then define a family Φ = {φij : i, j ∈ E} of probability measures over the Polish space (X, d), such that, for any S ∈ B(X), φij (S) represents the probability that an arriving batch in coincidence with a phase transition from i to j is located in S. To be more concrete, let pi (n, j) denote the probability that the BMAP, upon changing its phase from i to j, creates a batch of size n ≥ 0. Then we define pi (n, j; S) = pi (n, j) φij (S) for all i, j ∈ E , n ≥ 1, ∞ pi (0, j; S) = pi (0, j) + pi (n, j; X \ S) for all j = i. n=1
In this notation pi (n, j; S) is the probability that a batch of size n is located in S in coincidence with a phase transfer from i to j . Let, as usual, Nt be the random number of jobs arrived until t according to the BMAP, and γi be the total instantaneous transition rate when the phase is i, i.e. γi =
∞
n=0
j∈E j= i
Dn;ij +
∞
Dn;ii ,
n=1
i ∈ E.
The BMAP (N Nt , Jt )t≥0 is completely described by its rate matrices, and so would be our spatial MAP if its rate matrices were given in turn. The latter, now, can be easily realized for each S ∈ B(X) by setting ∞ D0;ii (S) = −γi 1 − pi (n, i; X \ S) , n=1
D0;ij (S) = γi pi (0, j; S) for j = i, Dn;ij (S) = γi pi (n, j; S) for n ≥ 1.
These matrices define the generator of the SBMAP over S and thereby the process itself. The family Φ of probability measures φij over X determines where to locate a batch, and the size of any batch arriving under the BMAP specifies the number of points at that very location. This is for sure a somewhat restrictive specification of the random point fields (each by intuition may be seen as to be a superposition of points at one location), but since the locations themselves vary according to the measures φij the method works in practice. Another method may consist in assigning, to each pair (i, j) ∈ E × E some positive integrable fuction ξij : X → R+ , such that each S ∈ B(X) contains a
248
AN INTRODUCTION TO QUEUEING THEORY
random number N (S) of points with probability ϕij (S)n −ϕij (S) e , n!
where ϕij (S) =
ξij (x)dx.
S
This leads us to some simple type of a random Poisson field with mean ϕij (S) for any S ∈ B(X). The connection to SMAP arrivals is given by setting ϕij (S)n −ϕij (S) e for n ≥ 1, n! pi (0, j; S) = e−ϕij (S) for j = i, pi (0, i; S) = 0.
pi (n, j; S) =
Let the total transition rate γi out of some state (v , i) for an SMAP be given. Then, assuming E = {1, . . . , m}, Dn;ij (S) = γi pi (n, j; S) for (n, j) = (0, i) D0;ii (S) = −γi (m − e−ϕii (S) ),
where γi is some finite positive constant for every i ∈ E . Comments on the modelling of customer motion. It is easy to see that we can describe the movement of customers by time dependent mappings of the Polish space (X, d) into itself. A customer in a mobile communication system, for example, who is located at time t0 at a point x(t0 ) when requesting a call, may move from x(t0 ) to y = x(t1 ) during a time interval (t0 , t1 ]. That way, if he is active for, say, T time units, he follows some curve {x(s) : s ∈ [t0 , t0 + T ]} through the landscape and then vanishes from the system — from the point of view of the telecommunication provider — due to call completion. In our models the ”landscape” is part of the Polish space (X, d), and the curve relates the points x(t) to the user’s starting point x(t0 ) according to some rule Υt : x(t0 ) → x(t0 + t) = x(t) for 0 ≤ t ≤ T . If we know the parameters x(t0 ) (the arrival location), T (the service time duration), and Υt (the rule for the displacement after t time units) for each user, we can decide at any time whether or not there is an active user in the system at some arbitrary location y. The system would be a queueing system in space and time. For its analytical description a pecularity has to be taken into account: In reality, the point mappings Υt : x(t0 ) → x(t0 + t) are resembling random walks in most cases since human customers normally behave individually and the curves they follow are random in general, and completely different. One
249
Spatial Markovian Arrival Processes
way to cope with this problem is to prescribe probabilities for the displacement of customers with respect to their arrival locations and arrival times. A much more simple approach is based on the assumption of deterministic motion where the (Υt : t ≥ 0) form a given topological group of mappings. In fact, this restriction is not that serious as it may seem at a first glance. On the one side, in many practical situations one is faced with the task to model the impact of movements that take place along streets or railway lines, such that there are streams of uniformly moving individuals or cars or trains subject to the same deterministic law. On the other side, the superposition of several (finitely many) streams of that type may well mirror an average behaviour of customers in more complex configurations. Such superpositions, although causing additional analytical complexity, can be handled in principle without problems. Let us shortly indicate how to determine time dependent probabilities for the spatial distribution of customers (users of some facility, jobs, etc.) in a spacetime queueing system. We assume that there is a service process defined that reflects the treatment of the customers up to their disappearance out of the system. Let R = (Υt : X → X, t ≥ 0) be an abelian topological group with the topology O = {Υs : s ∈ O, O open in (X, d)}. Then the following holds.
1 Given any neighbourhood W of Υt ◦ Υs , there are neighbourhoods U and V such that U ◦ V ⊂ W . there is some neighbourhood U with 2 For any neighbourhood V of Υ−1 t Υ ⊂ . U −1 = {Υ−1 : ∈ U } V r r We write Υt+s for Υt ◦ Υs , and assume that any customer starts moving immediately after arriving at location x according to the law Υs (x) = x(s),
s ∈ (0, T ],
(14.5)
where T is the time he spends in the system. The set Υs [S] = {y = Υs (x) : x ∈ S},
s≥0
is called the displacement set of S for any S ∈ B(X). Similarly, the set Υ−s [S] = {x : Υs (x) ∈ S},
s≥0
is called the source set of S with respect to Υs [S]. Note that Υ−s [S] = (Υs )−1 [S] due to proposed group property. Given a spatial Markovian arrival process as mentioned above, we are able to compute the probability matrices Pt (S) describing the phase depending numbers of arrivals up to time t for any
250
AN INTRODUCTION TO QUEUEING THEORY
subset S ∈ B(X). A customer is called (S, t)resident if, after his arrival somewhere in X at a time u ≤ t, his service (that started at u) continues to go on beyond t, and his location at time t is in S ∈ B(X). The random number of (S, t)resident customers observed at time u ≤ t is denoted by Nu,t (S), such that Nt (S) = Nt,t (S) represents the number of all those customers who are located in S at time t. Assume that there is a possibility to determine the probabilities Nu,t (S) = r, Ju = j  N0,t (S) = 0, J0 = i) Qr;ij (u, t; S) = P(N
that define the distribution of the random variables Nt (S) in case that customers do not move.5 Then, if movements are allowed and happen according to the law (14.5), the corresponding distribution for Nt (S) is obtained by merely replacing S in Qr;ij (u, t; S) by its source set Υ−(t−u) [S] and performing the same computation.
Notes A first definition of a spatial batch Markovian arrival processes based on the construction of probability mass functions in the Euclidean space traces back to Baum [10]. Subsequent treatments and generalizations are due to Baum and Kalashnikov [11], and Breuer [21]. In [21] a type of spatial process has been investigated (among others) that is classified as a spacetime Poisson process with general spatial distribution. This type has been considered also by Serfozo in [77]. An important application area of spatial BMAPs and corresponding queueing models is the performance analysis of todays telecommunication systems. The handling of customer motion during service in such systems has been treated by Baum and Kalashnikov [12, 13], and Baum and Sztrik [14].
Exercise 14.1 Let the subset specific rate matrices of an SMAP be given by Dn;ij (S) = γi pi (n, j; S) for (n, j) = (0, i) ∞ D0;ii (S) = −γi 1 − pi (n, i; X \ S) , n=1
where pi (n, j; S) is determined as the probability for the event that an arrival under a common BMAP occurs in S together with a phase transition i → j , pi (n, j; S) being defined with means of a family Φ = {φij : i, j ∈ E} 5 Techniques
for the computation of the Qr;ij (u, t; S) are presented, for example, in [13].
251
Spatial Markovian Arrival Processes
of probability measures over the Polish space (X, d) as mentioned in the text above.
The particular arrival rates λi (S) into S must be dependent upon the choice of subset S ∈ B(X). The spatial BMAP that is generated with respect to the fixed chosen subset S can be expressed, for (n, j) = (0, i), by its rates λi (S) and routing probabilities πi (n, j; S) according to Dn;ij (S) = λi (S) · πi (n, j; S), where πi (n, j; S) is the probability that n customers arrive in S together with a phase transition from i to j. Show, that ∞ λi (S) = γi 1 − pi (n, i; X \ S , n=1
πi (n, j; S) =
p (n, j; S) ∞i 1 − n=1 pi (n, i; X \ S)
for (n, j) = (0, i).
Exercise 14.2 Consider the second version of an SMAP realization given in the text above, where each point field that occurs together with a phase transition i → j is a Poisson point field with mean ϕij . Show that, for any S ∈ B(X), ϕij (S) = E[N (S)], where N (S) is the random variable describing the number of points in S.
Chapter 15 APPENDIX
1.
Conditional Expectations and Probabilities
Let (Ω, A, P ) denote a probability space and (S, B) a measurable space. A random variable is a measurable mapping X : Ω → S, which means that X −1 (B) ∈ A for all B ∈ B. In other words, X is a random variable if and only if X −1 (B) ⊂ A. In stochastic models, a random variable usually gives information on a certain phenomenon, e.g. the number of users in a queue at some specific time. Consider any real–valued random variable X : (Ω, A) → (R, B), B denoting the Borel σ–algebra on R, which is integrable or non–negative. While the random variable X itself yields the full information, a rather small piece of information on X is given by its expectation X dP E(X) := Ω
The conditional expectation is a concept that yields a degree of information which lies between the full information X and its expectation E(X). To motivate the definition, we first observe that the distribution P X = P ◦X −1 of X is a measure on the sub–σ –algebra X −1 (B) of A, i.e. in order to compute dP P (X ∈ B) = P X (B) = X −1 (B)
we need to evaluate the measure P on sets A := X −1 (B) ∈ X −1 (B) ⊂ A
254
AN INTRODUCTION TO QUEUEING THEORY
On the other hand, the expectation E(X) is an evaluation of P on the set Ω = X −1 (S) only. Thus we can say that the expectation employs P only on the trivial σ–algebra {∅, Ω}, while X itself employs P on the σ –algebra X −1 (B) generated by X.
Now we take any sub–σ–algebra C ⊂ A. According to the Radon–Nikodym theorem there is a random variable X0 : Ω → S with X −1 (B) = C and XdP X 0 dP = (15.1) C
C
for all C ∈ C. This we call the conditional expectation of X under C and write E(X C ) := X0 A conditional expectation is P –almost certainly uniquely determined by (15.1). Typical special cases and examples are
Example 15.1 For C = {∅, Ω}, the conditional expectation equals the expectation, i.e. E(XC ) = E(X). For any σ –algebra C with X −1 (B) ⊂ C we obtain E(XC) = X. Example 15.2 Let I denote any index Yi : i ∈ I) a family of random 0 set and (Y Yi : i ∈ I), variables. For the σ–algebra C = σ( i∈I Yi−1 (B)) generated by (Y we write E(XY Yi : i ∈ I) := E(XC) By definition we obtain for a σ–algebra C ⊂ A, random variables X and Y , and real numbers α and β E(αX + β Y C) = αE(XC) + β E(Y C )
For σ–algebras C1 ⊂ C2 ⊂ A we obtain E(E(XC2 )C1 ) = E(E(XC1 )C2 ) = E(XC1 )
(15.2)
Let C1 and C2 denote sub–σ–algebras of A, C := σ (C1 ∪ C2 ), and X an integrable random variable. If σ(X −1 (B) ∪ C1 ) and C2 are independent, then E(XC) = E(XC1 )
If X and Y are integrable random variables and X −1 (B) ⊂ C, then E(XY C) = X · E(Y C )
(15.3)
255
Appendix
Conditional probabilities are special cases of conditional expectations. Define the indicator function of a measurable set A ∈ A by 1, x ∈ A 1A (x) := 0, x ∈ /A Such a function is a random variable, since c 1−1 A (B) = {∅, A, A , Ω} ⊂ A
with Ac := Ω \ A denoting the complement of the set A. Let C denote a sub–σ–algebra of A. The conditional expectation of 1A is called conditional probability of A. We write P (AC ) := E(1A C)
Immediate properties of conditional probabilities are P (∅C) = 0,
0 ≤ P (AC) ≤ 1,
P (ΩC ) = 1
= P (A1 C) ≤ P (A2 C) A1 ⊂ A2 =⇒
all of which hold P –almost certainly. For a sequence (An : n ∈ N) of disjoint measurable sets, i.e. An ∈ A for all n ∈ N and Ai ∩ Aj = ∅ for i = j, we obtain , ∞ ∞ , / , An , C = P (An C) P , n=1
n=1
P –almost certainly. Let X : (Ω, A) → (R, B) denote a non–negative or integrable random variable and Y : (Ω, A) → (Ω′ , A′ ) a random variable. Then there is a measurable function g : (Ω′ , A′ ) → (R, B) with E(XY ) = g ◦ Y
This is P Y –almost certainly determined by Y g dP = A′
X dP
Y −1 (A′ )
for all A′ ∈ A′ . Then we can define the conditional probability of X given Y = y as g(y). We write E(XY = y) := g(y) for all y ∈ Ω′ .
256
2.
AN INTRODUCTION TO QUEUEING THEORY
Extension Theorems
Throughout this book, our basic stochastic tools are either sequences of random variables (such as Markov chains or Markov renewal chains) or even uncountable families of random variables (such as Markov processes, renewal processes, or semi–regenerative processes). It is essential for our models that these random variables are dependent, and in fact we define them in terms of conditional probabilities, i.e. via their dependence structure. It is then an immediate question whether a probability measure P exists that satisfies all the postulates in the definition of a stochastic sequence or process. This question is vital as it concerns the very existence of the tools we are using.
2.1
Stochastic chains
Let (S, B) denote a measurable space, µ a probability measure on (S, B), and Pn , n ∈ N, stochastic kernels on (S, B). The latter means that for every n ∈ N, Pn : S × B → [0, 1] is a function that satisfies (K1) For every x ∈ S, Pn (x, .) is a probability measure on (S, B). (K2) For every A ∈ B, the function Pn (., A) is B–measurable.
Define S ∞ as the set of all sequences x = (xn : n ∈ N0 ) with xn ∈ S for all n ∈ N0 . A subset of S ∞ having the form Cn1 ,...,nk (A) = {x ∈ S ∞ : (xn1 , . . . , xnk ) ∈ A}
with k ∈ N, n1 < . . . < nk ∈ N0 , and A ∈ Bk , is called cylinder (with coordinates n1 , . . . , nk and base A). The set C of all cylinders in S ∞ forms an algebra of sets. Define B∞ := σ(C) as the minimal σ–algebra containing C . Now we can state the extension theorem for sequences of random variables, which is proven in Gikhman and Skorokhod [37], section II.4. Theorem 15.3 There is a probability measure P on (S ∞ , B ∞ ) satisfying P(C dµ(x0 ) C0,...,k (A0 × . . . × Ak )) = P1 (x0 , dx1 ) . . . A0 A1 Pk−1 (xk−2 , dxk−1 ) Pk (xk−1 , Ak ) (15.4) ... Ak−1
for all k ∈ N0 , A0 , . . . , Ak ∈ B. The measure P is uniquely determined by the system (15.4) of equations. The first part of the theorem above justifies our definitions of Markov chains and Markov renewal chains. The second part states in particular that a Markov chain is uniquely determined by its initial distribution and its transition matrix.
257
Appendix
Based on this result, we may define a stochastic chain with state space S as a sequence (X Xn : n ∈ N0 ) of S–valued random variables which are distributed according to a probability measure P on (S ∞ , B ∞ ).
2.2
Stochastic processes
Let S denote a Polish (i.e. a complete separable metric) space, and B the Borel σ–algebra on S. Define Ω as the set of all functions f : R+ 0 → S . In order to construct an appropriate σ–algebra on Ω, we again start from the cylinder sets Ct1 ,...,tk (A) = {f ∈ Ω : (f (t1 ), . . . , f (tk )) ∈ A}
k for k ∈ N, t1 < . . . < tk ∈ R+ 0 , and A ∈ B . Denote the set of all cylinders in Ω by C. Again, C forms an algebra of sets and we can define A := σ(C) as the minimal σ –algebra containing C .
Let M = {µt1 ,...,tk : k ∈ N, t1 , . . . , tk ∈ R+ 0 } denote a family of probability distributions with k (C1) For all k ∈ N, t1 , . . . , tk ∈ R+ 0 , and A ∈ B µt1 ,...,tk ,tk+1 (A × S) = µt1 ,...,tk (A) (C2) For all k ∈ N and permutations π : {1, . . . , k} → {1, . . . , k} µπ(t1 ,...,tk ) (π(A)) = µt1 ,...,tk (A)
Then the family M is called compatible. Remark 15.4 Condition (C1) ensures that the distributions are consistent with each other, while condition (C2) is merely notational. The following extension theorem by Kolmogorov is proven in Gikhman and Skorokhod [39], section 3.2. Theorem 15.5 Let {µt1 ,...,tk : k ∈ N, t1 , . . . , tk ∈ R+ 0 } denote a compatible family of probability measures. Then there is a probability measure P on (Ω, A) with P({f ∈ Ω : (f (t1 ), . . . , f (tk )) ∈ A}) = µt1 ,...,tk (A)
(15.5)
k for all k ∈ N, t1 , . . . , tk ∈ R+ 0 , and A ∈ B . The measure P is uniquely determined by the system (15.5) of equations.
Based on this, we define a stochastic process with Polish state space S as a family X = (X Xt : t ∈ R+ 0 ) of S–valued random variables which are distributed according to a probability measure P on (Ω, A). An element ω ∈ Ω
258
AN INTRODUCTION TO QUEUEING THEORY
is an arbitrary function ω : R+ 0 → S . It is also called a path of X. If we want to state that the support of P consists of a special class of functions (say right–continuous ones), then we say that X is a stochastic process with right– continuous paths. The above family M of probability measures is called the set of finite–dimensional marginal distributions for X. Due to theorem 15.5 a Markov process is uniquely defined by its initial distribution and the family of transition probabilities, since they determine all finite–dimensional marginal distributions. Further our constructions of Markov processes, renewal processes, and semi–Markov processes yield compatible sets of finite–dimensional marginal distributions, hence by theorem 15.5 a probability measure P for the respective process.
3.
Transforms
In several parts of the present book, it is essential to argue via transforms of distributions. The necessary background for these shall be presented shortly in this section. For discrete distributions on N0 we will introduce z–transforms, while for distributions on R+ 0 the Laplace–Stieltjes transform will be useful.
3 .1
z –transforms
Let X denote a N0 –valued random variable with distribution A = (an : n ∈ N0 ), i.e. P(X = n) = an for all n ∈ N0 . Then the power series A∗ (z) :=
∞
an z n
(15.6)
n=0
converges absolutely for z ∈ C with z ≤ 1 and is analytic in this region. We note that A∗ (z) = E(z X ). If A(z) is a given power series for a distribution (an : n ∈ N0 ), then the probabilities an can be derived as , , 1 dn an = A(z),, n n! dz z=0 for all n ∈ N0 . Thus the mapping between discrete distributions on N0 and the power series in (15.6) is bijective, and we may call A∗ (z) the (uniquely determined) z–transform of X (also: of the distribution A).
Example 15.6 For a Dirac distribution on k ∈ N0 with 1, n = k an = 0, n = k
259
Appendix
we obtain A∗ (z) = z k . Example 15.7 Let A denote the geometric distribution with some parameter p ∈]0, 1[, i.e. an = (1 − p)pn for all n ∈ N0 . The z–transform of A is given by A∗ (z) = (1 − p)
∞
pn z n =
n=0
1−p 1 − pz
for all z ≤ 1. A very useful feature is the behaviour of the z –transform with respect to the convolution of two distributions. Let A = (an : n ∈ N0 ) and B = (bn : n ∈ N0 ) denote two distributions on N0 . The convolution C = A ∗ B of A and B is defined as the distribution C = (cn : n ∈ N0 ) with cn =
n
ak bn−k
k=0
for all n ∈ N0 . For the z–transform of C we obtain ∗
C (z) =
∞
n=0
n
cn z =
n ∞
n
ak bn−k z =
n=0 k=0
= A∗ (z) · B ∗ (z)
∞
n=0
ak z
k
∞
bn−k z n−k
n=k
for all z ≤ 1.
This means that the z–transform of a convolution A ∗ B equals the product A∗ (z) · B ∗ (z) of the z–transform of A and B. In terms of random variables we have the following representation: Let X and Y denote two independent N0 –valued random variables. Then the z –transform of the sum X + Y equals the product of the z–transforms of X and Y , i.e. E z X+Y = E z X · E z Y for all z ≤ 1.
3.2
Laplace–Stieltjes transforms
Let X denote an R+ 0 –valued random variable with distribution function F . The Laplace–Stieltjes transform (LST) of X (or: of F ) is defined by ∞ e−st dF (t) = E e−sX F ∗ (s) := 0
260
AN INTRODUCTION TO QUEUEING THEORY
for all s ∈ C with Re(s) ≥ 0. The LST uniquely determines its underlying distribution.
Example 15.8 Let X be exponentially distributed with parameter λ, i.e. X has the distribution function F (t) = 1 −e−λt with Lebesgue density f (t) = λe−λt . Then ∞ λ ∗ F (s) = e−st λe−λt dt = s+λ 0
for Re(s) ≥ 0.
Example 15.9 For the Dirac distribution δx on x ∈ R+ 0 we obtain ∞ 0, t < x ∗ −st with F (t) = e dF (t) δx (s) = 1, t ≥ x 0 and hence δx∗ (s) = e−sx for Re(s) ≥ 0.
Like the z–transform, the LST is very useful for dealing with convolutions. Let X and Y denote two independent R+ 0 –valued random variables. Then the LST of the sum X + Y equals the product of the LSTs of X and Y , i.e. ! E e−s(X+Y ) = E e−sX · E e−sY
for all s ∈ C with Re(s) ≥ 0.
Notes For more on z–transforms see e.g. Juri [43], or the collection of results in Kleinrock [50], appendix I. For Laplace–Stieltjes transforms see chapter XIII in Feller [35] or again Kleinrock [50], appendix I.
4.
Gershgorin’s Circle Theorem
An important theorem to find bounds for the eigenvalues of a matrix has been developed by Gershgorin in 1938. For ease of reference it shall be presented in this section. Let A = (aij )i,j≤m denote a square matrix of dimension m with entries aij ∈ C. The following theorem is called Gershgorin’s circle theorem.
261
Appendix
Theorem 15.10 All eigenvalues of the matrix A lie in the union C := of the circles ⎧ ⎫ ⎨ ⎬ aik  Ci = z ∈ C : z − aii  ≤ ⎩ ⎭
0m
i=1 Ci
k=i
Proof: Let x(ν) denote an eigenvector to the eigenvalue λν of A, i.e. Ax(ν) = λν x(ν) . This implies m (ν) (ν) aik xk = λν xi (15.7) k=1
for all i ≤ m. Since an eigenvector is determined only up to a scalar multiplicative, we can assume without loss of generality that there is a component , , , (ν) , (ν) xi0 = max ,xj , = 1 1≤j≤m
of the vector x(ν) . Now (15.7) yields for i = i0 the relation (ν) (ν) ai0 ,k xk = (λν − ai0 ,i0 ) xi0 = λν − ai0 ,i0 k=i0
which implies by the triangle inequality , , , (ν) , λν − ai0 ,i0  ≤ ai0 ,k  · ,xk , ≤ ai0 ,k  k=i0
k=i0
Since every eigenvalue satisfies at least one such inequality, the proof is complete. Corollary 15.11 If A is diagonally dominated, i.e. if aik  aii  > k=i
holds for all 1 ≤ i ≤ m, then the matrix A is invertible.
Proof: The strict inequality of the assumption implies that aii = 0 for all i ≤ m. Applying theorem 15.10 yields a restriction λ ≥ aii  − aii − λ ≥ aii  − aik  > 0 k=i
for every eigenvalue λ of A. Therefore the matrix A has no eigenvalue zero and thus is invertible.
References
[1] A. S. Alfa. Discrete Time Queues and Matrix–analytic Methods. Top, 10(2):147–210, 2002. [2] A. S. Alfa. Combined Elapsed Time and Matrix–Analytic Method for the Discrete Time GI/G/1 and GIX /G/1 Systems. Queueing Systems, 45(1):5–25, 2003. [3] A. S. Alfa and W. Li. Matrixgeometric analysis of the discrete time GI/G/1 system. Stoch. Models, 17(4):541–554, 2001. [4] A. S. Alfa and M. F. Neuts. Modelling vehicular traffic using the discrete time Markovian arrival process. Transp. Sci., 29(2):109–117, 1995. [5] S. Asmussen. Applied Probability and Queues. New York etc.: Springer, 2003.
[6] S. Asmussen and G. Koole. Marked point processes as limits of Markovian arrival streams. J. Appl. Probab., 30(2):365–372, 1993. [7] S. Asmussen, O. Nerman, and M. Olsson. Fitting phasetype distributions via the EM algorithm. Scand. J. Stat., 23(4):419–441, 1996. [8] F. Baskett, K. M. Chandy, R. R. Muntz, and F. G. Palacios. Open, closed, and mixed networks of queues with different classes of customers. Journal of the ACM, 22:248– 260, 1975. [9] D. Baum. A B M AP G1analysis based on convolution calculus. J. Math. Sci., New York, 92(4):3990–4002, 1998.
[10] D. Baum. On markovian spatial arrival processes for the performance analysis of mobile communication networks. Technical Report 98–07, University of Trier, Subdept. of Computer Science, 1998. [11] D. Baum and V. Kalashnikov. Spatial generalization of BMAPs with finite state space. J. Math. Sci., New York, 105(6):2504–2514, 2001. [12] D. Baum and V. V. Kalashnikov. Stochastic models for communication networks with moving customers. Information Processes, 1:1–23, 2001.
264
AN INTRODUCTION TO QUEUEING THEORY
[13] D. Baum and V. Kalashnikov. Spatial No–Waiting Stations with Moving Customers. Queueing Systems, 46:231–247, 2004. [14] D. Baum and J. Sztrik. Customer motion in queueing models: The use of tangent vector fields. International Journal on Pure and Applied Mathematics, 2002. To appear. [15] G. Bolch, S. Greiner, H. de Meer, and K. S. Trivedi. Queueing networks and Markov chains. John Wiley & Sons, New York, Chichester, Weinheim, Brisbane, Singapore, Toronto, 1998. [16] L. Breiman. Probability. Philadelphia, PA: SIAM, 1968.
[17] L. Breuer. The Periodic BMAP/PH/c Queue. Queueing Systems, 38(1):67–76, 2001. [18] L. Breuer. An EM Algorithm for Batch Markovian Arrival Processes and its Comparison to a Simpler Estimation Procedure. Annals of Operations Research, 112:123–138, 2002. [19] L. Breuer. On Markov–Additive Jump Processes. Queueing Systems, 40(1):75–91, 2002. [20] L. Breuer. On the MAP/G/1 Queue with Lebesgue–dominated Service Time Distribution and LCFS Preemptive Repeat Service Discipline. Stochastic Models, 18(4):589–595, 2002. [21] L. Breuer. From Markov Jump Processes to Spatial Queues. Kluwer, Dordrecht (Netherlands), 2003.
[22] L. Breuer. Two Examples for Computationally Tractable Periodic Queues. International Journal of Simulation, 3(3–4):15–24, 2003. [23] L. Breuer, A. Dudin, V. Klimenok, and G. Tsarenkov. A Two–Phase BMAP/G/1/N → PH/1/M1 System with Blocking. Automation and Remote Control, 65(1):104–115, 2004.
[24] J. P. Buzen. Computational algorithms for closed queueing networks with exponential servers. Commun. ACM, 16:527–531, 1973. [25] E. C¸inlar. Introduction to stochastic processes. Englewood Cliffs, N. J.: PrenticeHall, 1975.
[26] K. M. Chandy, J. H. Howard, and D. F. Towsley. Product form and local balance in queueing networks. Journal of the ACM, 24:250–263, 1977. [27] K. Chung. Markov chains with stationary transition probabilities. SpringerVerlag, Berlin etc., 1960. [28] J. Cohen. The Single Server Queue. North–Holland, Amsterdam etc., 1969. [29] H. Daduna. Queueing networks with discrete time scale. Springer, Berlin, Heidelberg, New York, 2001.
[30] N. M. Van Dijk. Queueing Networks and Product Forms. John Wiley & Sons, Chichester, New York, Brisbane, Toronto, Singapore, 1993. [31] J. Doob. Stochastic processes. New York: Wiley, 1953.
References
265
´ pour la determination ´ [32] T. Engset. Emploi du calcul des probabilites du nombre de ´ ´ ephoniques ´ selecteurs dans les Bureaux Tel Centraux. Rev. gen. ´ elect., 9:138–140, 1921. [33] A. Erlang. Solution of Some Probability Problems of Significance for Automatic Telephone Exchanges. Electroteknikeren, 13:5–13, 1917. [34] W. Feller. An introduction to probability theory and its applications. Vol. I. New York etc.: John Wiley and Sons, 1950. [35] W. Feller. An introduction to probability theory and its applications. Vol. II. 2nd ed. New York etc.: John Wiley and Sons, 1971. [36] E. Gelenbe and G. Pujolle. Introduction to queueing networks. John Wiley & Sons, hichester, New York, Brisbane, Toronto, Singapore, 1987. [37] I. Gihman and A. Skorohod. The theory of stochastic processes I. Berlin etc.: Springer, 1974. [38] I. Gihman and A. Skorohod. The theory of stochastic processes II. Berlin etc.: SpringerVerlag, 1975. [39] I. Gikhman and A. Skorokhod. Introduction to the theory of random processes. Saunders, 1969. [40] W. Gordon and G. Newell. Closed queuing systems with exponential servers. Oper. Res., 15:254–265, 1967. [41] P. G. Harrison and N. M. Patel. Performance Modelling of Communication Networks and Computer Architectures. AddisonWesley, Reading, Massachusetts, 1993. [42] J. R. Jackson. Jobshoplike queueing systems. Management Science, 10:131–142, 1963. [43] E. Juri. Theory and Application of the z–Transform Method. Wiley, New York, 1964. [44] V. Kalashnikov. Topics on Regenerative Processes. CRC Press, 1994. [45] K. Kant. Introduction to computer system performance evaluation. McGrawHill, Inc., New York, London, 1992. [46] S. Karlin and H. M. Taylor. A first course in stochastic processes. 2nd ed. New York etc.: Academic Press, 1975. [47] S. Karlin and H. M. Taylor. A second course in stochastic processes. New York etc.: Academic Press, 1981. [48] F. Kelly. Reversibility and Stochastic Networks. Wiley, 1979. [49] D. Kendall. Stochastic Processes Occuring in the Theory of Queues and Their Analysis by the Method of the Embedded Markov Chain. Annals of Mathematical Statistics, 24:338–354, 1953. [50] L. Kleinrock. Queueing systems. Vol. I: Theory. New York etc.: John Wiley & Sons, 1975. [51] Y. Lam. A Note on the Optimal Replacement Problem. Adv. Appl. Prob., 20:479–482, 1988.
266
AN INTRODUCTION TO QUEUEING THEORY
[52] G. Latouche and V. Ramaswami. Introduction to matrix analytic methods in stochastic modeling. Philadelphia, PA: SIAM, 1999.
[53] J. Little. A Proof for the Queueing Formula L = λW . Operations Research, 9, 1961. [54] D. M. Lucantoni. New results on the single server queue with a batch Markovian arrival process. Commun. Stat., Stochastic Models, 7(1):1–46, 1991. [55] D. M. Lucantoni. The BMAP/G/1 Queue: A Tutorial. In L. Donatiello and R. Nelson, editor, Models and Techniques for Performance Evaluation of Computer and Communication Systems, pages 330–358. Springer, 1993. [56] D. M. Lucantoni, K. S. MeierHellstern, and M. F. Neuts. A singleserver queue with server vacations and a class of nonrenewal arrival processes. Adv. Appl. Probab., 22(3):676–705, 1990. [57] D. M. Lucantoni and M. F. Neuts. Simpler proofs of some properties of the fundamental period of the MAP/G/1 queue. J. Appl. Probab., 31(1):235–243, 1994. [58] F. Machihara. A New Approach to the Fundamental Period of a Queue with Phase–type Markov Renewal Arrivals. Stochastic Models, 6(3):551–560, 1990. [59] S. Meyn and R. Tweedie. Markov chains and stochastic stability. Berlin: SpringerVerlag, 1993. [60] I. Mitrani. Modelling of computer and communication systems. Cambridge University Press, Cambridge etc., 1987. [61] R. Nelson. Probability, stochastic processes, and queueing theory. New York, NY: SpringerVerlag, 1995.
[62] M. F. Neuts. Probability distributions of phase type. In Liber Amicorum Prof. Emeritus H. Florin, pages 173–206. Department of Mathematics, University of Louvain, Belgium, 1975. [63] M. F. Neuts. Markov chains with applications in queueing theory, which have a matrixgeometric invariant probability vector. Adv. Appl. Probab., 10:185–212, 1978. [64] M. F. Neuts. A versatile Markovian point process. J. Appl. Probab., 16:764–774, 1979. [65] M. F. Neuts. Matrix–Geometric Solutions in Stochastic Models. Johns Hopkins University Press, Baltimore, 1981. [66] M. F. Neuts. Structured stochastic matrices of M/G/1 type and their applications. New York etc.: Marcel Dekker, 1989. [67] M. F. Neuts and J.M. Li. An algorithm for the P (n, t) matrices of a continuous BMAP. In Matrixanalytic methods in stochastic models (Flint, MI), volume 183 of Lecture Notes in Pure and Appl. Math., pages 7–19. Dekker, New York, 1997. [68] A. Pacheco and N. Prabhu. Markovadditive processes of arrivals. In J. H. Dshalalow, editor, Advances in queueing, pages 167–194. CRC Press, Boca Raton, FL, 1995. [69] R. Pyke. Markov Renewal Processes: Definitions and Preliminary Properties. Annals of Mathematical Statistics, 32:1231–1242, 1961.
References
267
[70] R. Pyke. Markov Renewal Processes with Finitely Many States. Annals of Mathematical Statistics, 32:1243–1259, 1961. [71] V. Ramaswami. The N/G/1 queue and its detailed analysis. Adv. in Appl. Probab., 12(1):222–261, 1980.
[72] V. Ramaswami. A stable recursion for the steady state vector in Markov chains of M/G/1 type. Commun. Stat., Stochastic Models, 4(1):183–188, 1988. [73] M. Reiser and S. Lavenberg. Meanvalue analysis of closed multichain queuing networks. J. Assoc. Comput. Mach., 27:313–332, 1980. [74] S. Ross. Applied Probability Models with Optimization Applications. Holden–Day, San Francisco, 1970. [75] S. Ross. Stochastic Processes. John Wiley & Sons, New York etc., 1983.
[76] T. Ryden. An EM algorithm for estimation in Markovmodulated Poisson processes. Comput. Stat. Data Anal., 21(4):431–447, 1996. [77] R. Serfozo. Introduction to stochastic networks. SpringerVerlag, New York, 1999.
[78] D. Shi, J. Guo, and L. Liu. SPH–Distributions and the Rectangle–Iterative Algorithm. In S. R. Chakravarthy and A. S. Alfa, editors, Matrix–Analytic Methods in Stochastic Models, pages 207–224, New York etc., 1997. Marcel Dekker. [79] D. Shi and L. Liu. Markovian Models for Non–negative Random Variables. In A. S. Alfa and S. R. Chakravarthy, editors, Advances in Matrix Analytic Methods for Stochastic Models, pages 403–427. Notable Publications, 1998. [80] W. Smith. Regenerative Stochastic Processes. Proceedings Royal Society, Series A, 232:6–31, 1955. [81] W. Smith. Renewal Theory and Its Ramifications. Journal of the Royal Statistical Society, Series B, 20:243–302, 1958. [82] T. Takine. A new recursion for the queue length distribution in the stationary BMAP/G/1 queue. Stochastic Models, 16(2):335–341, 2000. [83] R. Tweedie. Operatorgeometric stationary distributions for Markov chains, with application to queueing models. Adv. Appl. Probab., 14:368–391, 1982.
This page intentionally left blank
Index
Absorbing, 14 Accessible, 13 Age, 122 Alternating renewal process, 144 Arrival process, 4, 153 Arrival rate, 52 Asymptotic distribution, 5 Backward process, 64 Balance equations, 45, 50 Batch arrivals, 186 Batch Markovian Arrival Process, 186 Bernoulli process, 10, 114 Birth–and–death process, 59 Blackwell’s Theorem, 119 Block Toeplitz structure, 196 Blockwise skip–free, 232 BMAP, 186 Chapman–Kolmogorov equations, 12, 40 Characterization, 227 Characterizing matrices, 186 Characterizing matrix sequence, 186 Characterizing matrix, 138 Closed network, 62 Closed, 14 Closure properties, 176 Communicate, 13 Communication class, 14 Compatible, 255 Conditional expectation, 252 Conditional memoryless property, 184 Conditional probability, 253 Convolution, 112 Convolutional exponential of a matrix sequence, 189 Convolutional power, 113 Convolutional powers of a matrix sequence, 188 Convolutions of matrix sequences, 188 Counting measure, 240 Counting process, 153
Cox distribution, 174 Cyclic closed network, 106 Cylinder, 254 Delay system, 54 Delay, 111 Delayed regenerative process, 143 Delayed renewal reward process, 132 Departure rate, 52 Detailed balance equation, 64 Directly Riemann integrable, 120 Discrete batch Markovian arrival process, 230 Discrete BMAP, 230 Discrete PH renewal process, 231 Discrete phase–type distribution, 227 Discrete random walk, 10 Doubly stochastic Poisson process, 187 Elapsed time representation, 229 Elementary Renewal Theorem, 117 Embedded Markov chain, 37 Embedded Markov renewal chain, 136 Engset distribution, 59 Environment process, 187 Ergodicity condition, 202 Erlang distribution, 172 Erlang’s delay formula, 56 Erlang’s loss formula, 57 Excess life, 122 Exit vector, 169 Expectation, 251 Failure rate, 106 Finite–dimensional marginal distributions, 44, 256 First return time, 139 First visit, 15 Forward process, 64 Foster’s criterion, 28 Generalized Erlang distribution, 172 Generator matrix, 40 Geometric process, 130 Gershgorin’s circle theorem, 258
270
AN INTRODUCTION TO QUEUEING THEORY
GI/M/1 queue, 145 GI/M/1 type matrix, 197 GI/PH/1 queue, 195 Global balance, 64 Holding time, 37 Homogeneous, 9, 136 Hyper–exponential distribution, 173 Hypo–exponential distribution, 172 Indicator function, 253 Infinitesimal transition rate, 40 Initial distribution, 11, 44, 169 Insensitivity property, 84 Intensity, 38, 145 Inter–arrival time, 4 Interrupted Bernoulli process, 236 Interrupted PH renewal process, 187 Invariant, 151 IPP, 187 Irreducible, 14, 44, 137 Kendall notation, 4 Kernel, 254 Key Renewal Theorem, 120 Kolmogorov forward and backward equations, 41 Kronecker product, 179 Kronecker sum, 179 Laplace–Stieltjes transform, 174, 257 Lattice, 119 Level, 196, 212, 230, 232 Load, 31, 51, 150 Loss system, 168 Lower Hessenberg matrix, 155 LST, 174 M/G/1 queue, 153 M/G/1 type, 212 M/G/k queue, 133 M/M/c/c+K queue, 167 Machine repair problem, 59 MAP, 185 Markov chain, 9 Markov process, 37 Markov property, 9, 39 Markov routing, 77 Markov–modulated Poisson process, 187 Markovadditive jump process, 239 Markovian Arrival Process, 185 Markovian queues, 49 Matrix convolution, 138 Matrix exponential function, 169 Matrix–geometric distribution, 198 Mean arrival rate, 192 Mean recurrence time, 140 Memoryless property, 29, 38 Minimal subinvariant measure, 151 Mixed network, 62 MMPP, 187 Moment, 171 N–process, 193
Non–defective, 170 Null recurrent, 21 Open network, 62 Order, 169, 227 Ordinary renewal process, 111 Path, 256 Period, 119 PH distribution, 169 PH renewal process, 183 Phase equilibrium, 191 Phase process, 190, 196, 230 Phase, 169, 196, 212, 227, 230, 232 Phase–type distribution, 169 Poisson process, 37–38 Polish space, 239 Pollaczek–Khinchin mean value formula, 164 Positive recurrent, 21, 44 Potential matrix, 17 Probability flux, 64 Product form (PF) networks, 63 Pure jump process, 37 Queue, 4 Queueing network, 61 Queueing system, 4 Radon measure, 240 Random point field, 240 Random variable, 251 Rate conservation law, 162 Rate matrix, 198 Rate of flow, 64 Rate, 114 Recurrent, 17, 44, 137 Reducible, 14 Regeneration cycle, 133 Regeneration property, 133 Regeneration time, 133 Regenerative process, 133 Regular, 46 Reliability theory, 59, 107 Remaining time representation, 229 Renewal equation, 115 Renewal function, 114 Renewal interval, 111 Renewal process, 111 Renewal reward process, 128 Renewal time, 111 Residual life time, 122 Reversed process, 64 Reversible, 66 Reward, 128 Routing matrix, 61 Routing probabilities, 61 Semi–Markov process, 136 Semi–regenerative process, 141 Separable networks, 63 Service discipline, 4 Service times, 4
271
INDEX Skip–free Markov chain, 232 Skip–free Markov process, 52 Skip–free to the left, 155, 212 Skip–free to the right, 147, 197 SMAP, 241 Spatial arrival process, 239 Spatial Markovian arrival process, 241 Stability condition, 32, 150, 156, 197 Stable, 243 State space, 9, 37 State transition graph, 41 State, 37 Station balance, 73 Stationary distribution, 18 Stationary increments, 125 Stationary measure, 18 Stationary renewal process, 125–126 Stationary, 18, 44 Stochastic chain, 9, 255 Stochastic flow, 45 Stochastic matrix, 11 Stochastic process, 255 Stopping time, 12, 133 Strong Markov property, 12 Sub–stochastic distribution functions, 137
Subinvariant, 151 Superfluous, 174 Superposition, 47, 188 System capacity, 4 System process, 5 Taboo probabilities, 151, 198 Tandem queue, 106 Time until absorption, 169 Total number of visits, 16 Total reward, 128 Transient distributions, 138 Transient, 17, 44, 137 Transition matrix, 9 Transition probabilities, 39 Transition probability matrix, 40 Transition probability, 9 Transitions with arrivals, 184 Transitions without arrivals, 184 Upper Hessenberg matrix, 147 Versatile Markovian point process, 193 Version, 11, 44 Waiting time paradox, 127 Wald’s Lemma, 117 Z–transform, 256