Bause Kritzinger SPN Book Screen
Bause Kritzinger SPN Book Screen
net/publication/258705139
CITATIONS READS
182 4,495
2 authors:
All content following this page was uploaded by Falko Bause on 04 June 2014.
Falko Bause
Informatik IV
Universität Dortmund
D-44221 DORTMUND
Germany
e-mail: bause@ls4.cs.uni-dortmund.de
Pieter S Kritzinger
Data Network Architectures Laboratory
Department of Computer Science
University of Cape Town
Private Bag, RONDEBOSCH
7700 South Africa
e-mail: psk@cs.uct.ac.za
Preface
Any developer of discrete event systems knows that the most important quality of
the final system is that it be functionally correct by exhibiting certain functional,
or qualitative properties decided upon as being important. Once assured that the
system behaves correctly, it is also important that it is efficient in that its running
cost is minimal or that it executes in optimum time or whatever performance
measure is chosen. While functional correctness is taken for granted, the latter
quantitative properties will often decide the success, or otherwise, of the system.
Ideally the developer must be able to specify, design and implement his system
and test it for both functional correctness and performance using only one for-
malism. No such formalism exists as yet. In recent years the graphical version
of the Specification and Description Language (SDL) has become very popular
for the specification, design and partial implementation of discrete systems. The
ability to test for functional correctness of systems specified in SDL is, however,
limited to time consuming simulative executions of the specification and perfor-
mance analysis is not directly possible. Petri nets, although graphical in format
are somewhat tedious for specifying large complex systems but, on the other
hand were developed exactly to test discrete, distributed systems for functional
correctness. With a Petri net specification one can test, e.g., for deadlock, live-
ness and boundedness of the specified system. Petri nets in their various formats,
have been studied extensively since first proposed by Carl Adam Petri in 1962
[133] and several algorithms exist to determine the functional properties of nets.
Another paradigm which is aimed at testing for functional correctness is that of
process algebras or calculi for communicating systems.
The major drawback of Petri nets, as originally proposed and process algebras
(amongst others) is that quantitative analyses are not catered for. As a conse-
quence, the developer who needs to know about these properties in his system
has to devise a different model of the system which, apart from the overhead con-
cerned provides no guarantee of consistency across the different models. Because
of the latter, computer scientists during the last decade added time, in various
forms, to ordinary Petri nets to create Stochastic Petri nets (SPNs) and General-
ized Stochastic Petri nets (GSPNs) for performance modelling and a great deal
of theory has developed around Stochastic Petri nets as these are generically
known.
Another aspect which also contributed significantly to the development of Stochas-
tic Petri nets is the fact that their performance analysis is based upon Markov the-
ory. Since the description of a Markov process is cumbersome, abstract models
have been devised for their specification. Of these, queueing networks (QNs) was
originally the most popular, especially since the analysis of a large class of QNs
(product-form QNs) can be done very efficiently. QNs cannot, however, describe
system behaviours like blocking and forking and with the growing importance
of distributed systems this inability to describe synchronisation naturally turned
the focus to Petri nets as well.
6 PREFACE
Stochastic Petri nets are therefore a natural development from the original Petri
nets because of
• the advantage of their graphical format for system design and specification
• the possibility and existing rich theory for functional analysis with Petri
nets
• the facility to describe synchronisation, and
• the natural way in which time can be added to determine quantitative prop-
erties of the specified system.
The disappointing thing about Stochastic Petri nets is that the integration of time
changes the behaviour of the Petri net significantly. So properties proven for the
Petri net might not hold for the corresponding time-augmented Petri net. E.g., a
live Petri net might become deadlocked or a non-live Petri net might become live.
We will see that the analysis techniques developed for Petri nets are not always
applicable to SPNs. But there are ways around this, as we shall see in this book.
Also, using Stochastic Petri nets to specify the sharing of resources controlled by
specific scheduling strategies is very cumbersome. So the pendulum has swung
back, in a sense, that we introduce certain concepts from queueing theory when
presenting Queueing Petri nets (QPNs) which offer the benefits of both worlds,
Petri nets and Queueing networks.
This book itself arose out of a desire by the authors to collect all one needs to
understand Stochastic Petri net theory in one volume. It is in three parts. The
first part is on stochastic theory leading to introductory queueing theory and
simple queues. In Part I we emphasise Markovian theory, because where general
queueing theory fails, Markovian analysis can often still be useful.
Part II is about Petri nets, starting with ordinary Petri nets and ending with
Coloured Petri nets. Ordinary and Coloured Petri nets do not involve time and
were developed to test the functionality of concurrent systems. In this part of
the book we give an overview of the most important analysis techniques paying
particular attention to the validation of those properties which are essential for
Stochastic Petri nets.
Our emphasis in Part III is on those Stochastic Petri net models which can be
analysed by Markovian techniques. The intention of this book is not to give an
overview of several or all Stochastic Petri net models appearing in the litera-
ture, but to stress a combined view of functional and performance analysis in the
context of some Stochastic Petri net models.
We hope that by reading this book, the reader will become as excited as we are
about the subject of Stochastic Petri nets and the many unsolved problems arising
from the increasing demands for correctness and performance when specifying
discrete event systems.
Falko Bause and Pieter Kritzinger
Dortmund, Germany
Cape Town, South Africa
1995.
7
Contents
Preface 5
Contents 9
I STOCHASTIC THEORY 11
1 Random Variables 13
1.1 Probability Theory Refresher . . . . . . . . . . . . . . . . . 13
1.2 Discrete Random Variables . . . . . . . . . . . . . . . . . . 16
1.3 Continuous Random Variables . . . . . . . . . . . . . . . . 18
1.4 Moments of a Random Variable . . . . . . . . . . . . . . . 19
1.5 Joint Distributions of Random Variables . . . . . . . . . . . 20
1.6 Stochastic Processes . . . . . . . . . . . . . . . . . . . . . 21
2 Markov Processes 23
2.1 Discrete Time Markov Chains . . . . . . . . . . . . . . . . 25
2.1.1 Steady State Distribution . . . . . . . . . . . . . . . . . 31
2.1.2 Absorbing Chains and Transient Behaviour . . . . . . . 35
2.2 Semi-Markov Processes . . . . . . . . . . . . . . . . . . . 40
2.2.1 Formal Model of a Semi-Markov Process . . . . . . . . 41
2.2.2 Interval Transition Probabilities . . . . . . . . . . . . . 42
2.2.3 Steady State Behaviour . . . . . . . . . . . . . . . . . . 44
2.3 Continuous Time Markov Chains . . . . . . . . . . . . . . 46
2.3.1 Steady State Distribution . . . . . . . . . . . . . . . . . 51
2.4 Embedded Markov Chains . . . . . . . . . . . . . . . . . . 53
4 Further Reading 72
10 Contents
II PETRI NETS 75
5 Place-Transition Nets 77
5.1 Structure of Place-Transition Nets . . . . . . . . . . . . . . 81
5.2 Dynamic Behaviour of Place-Transition Nets . . . . . . . . 84
5.3 Properties of Place-Transition Nets . . . . . . . . . . . . . 86
5.4 Analysis of Place-Transition Nets . . . . . . . . . . . . . . 90
5.4.1 Analysis of the Reachability Set . . . . . . . . . . . . . 90
5.4.2 Invariant Analysis . . . . . . . . . . . . . . . . . . . . 95
5.4.3 Analysis of Net Classes . . . . . . . . . . . . . . . . . 101
Analysis of State Machines . . . . . . . . . . . . . . . . 101
Analysis of Marked Graphs . . . . . . . . . . . . . . . 102
Analysis of EFC-nets . . . . . . . . . . . . . . . . . . . 105
5.4.4 Reduction and Synthesis Analysis . . . . . . . . . . . . 110
5.5 Further Remarks on Petri Nets . . . . . . . . . . . . . . . . 112
Bibliography 193
Index 209
Part I
STOCHASTIC THEORY
13
1 Random Variables
Much of the world around us is not very deterministic although it may not be
apparent at first glance. Consider a computer, for instance, which given the same
input values, will always give the same output. While a computer program is
processing incoming data however, it is often not possible to predict from one
moment to the next
Think of the node of a computer network to understand this. Although the set of
messages which may arrive at the node is finite and known, we cannot tell for
certain from instant to instant which messages will arrive from where. Moreover,
the network software is likely to be using the same processor(s) at the node as
the operating system. When the process executing the network software will be
interrupted and by which process cannot be said for certain. All of which makes
it impossible to tell for certain what will happen next. We say the process just
described is stochastic.
The term stochastic has an exact mathematical meaning and there is a vast theory
developed to predict the behaviour of stochastic processes. This part of the book
gives only a basic introduction to that theory. Goodman [86] provides a more
thorough introduction to the subject while an extensive treatment can be found
in Howard [90].
then the two events are said to be mutually exclusive or disjoint. This leads to
the concept of mutually exclusive exhaustive events {A1 ,A2 , . . . ,An } which are
events such that
Ai Aj = Ai ∩ Aj = ∅ for all i 6= j
A1 ∪ A2 ∪ . . . ∪ An = S (1.1)
P [AB]
P [A|B] :=
P [B]
whenever P [B] 6= 0.
The statistical independence of events can be defined as follows. Two events A
and B are said to be statistically independent iff
For three statistically independent events A, B, C each pair of events must satisfy
Eq. (1.2) as well as
and so on for n events requiring the n-fold factoring of the probability expres-
sion as well as the (n − 1)-fold factorings all the way down to all the pairwise
factorings. Moreover, for two independent events A and B
P [A|B] = P [A]
which merely states that the knowledge of the occurrence of an event B does not
affect the probability of the occurrence of the independent event A in any way
and vice-versa.
We also need to know the theorem of total probability for our basic understanding
of probability theory.
The last equation suggests that to find the probability of some complex event B,
one simplifies the event by conditioning it on some event Ai in such a way that
computing the probability of event B given event Ai is less complex and then to
multiply by the probability of the conditional event Ai to yield the joint proba-
bility P [Ai B]. Having done this for a set of mutually exclusive exhaustive events
{Ai } we may then sum these probabilities to find the probability of the event B.
If we need to simplify the analysis even further, we may condition event B on
more than one event and then uncondition each of these events by multiplying
by the probability of the appropriate condition and then sum all possible forms
of all conditions.
The final bit of probability theory that we are certain to come across in our study
of stochastic systems is Bayes’ theorem.
Theorem 1.2 Bayes’ theorem. Let {Ai } be a set of mutually exclusive and ex-
haustive events. Then
P [B|Ai ]P [Ai ]
P [Ai |B] = Pn (1.3)
j=1 P [B|Aj ]P [Aj ]
Exercise 1.1 If there are n people present in a room, what is the probability
that at least two of them have the same birthday? How large may n be for this
probability to be less than 0.5?
We call a variable random and denote it χ if we cannot tell for certain what its
value will be. Examples of such random variables are the temperature outside on
any particular day, the number of customers in a supermarket checkout line or
the number of messages arriving at a network node.
A random variable is said to be discrete if the set of possible values of χ is
countable (but not necessarily finite). Since we do not know for certain what
value it will have, we say that it will have value x with a probability pχ (x). That
is
pχ (x) = P [χ = x]. (1.4)
In this formula, x can be any real number and 0 ≤ pχ (x) ≤ 1 for all values of x.
pχ (x) is called the probability mass function of χ.
Suppose that χ can take on the values x1 ,x2 ,x3 ,x4 or x5 with probability p1 ,p2 ,p3 ,p4
and p5 respectively. Clearly,
5
X
pi = 1
i=1
Another way of describing a random variable χ which takes values from an or-
dered set is to give a formula for the probability that it will take on values of
xi which are less than or equal to some value a. This leads to the following
important definition.
1.2 Discrete Random Variables 17
Fχ (x) = P [χ ≤ x]
Again, it should be evident that the values of the function Fχ are between 0 and
1. Using Fχ we can calculate
{χ ≤ b} = {χ ≤ a} ∪ {a < χ ≤ b}
so that
Fχ (b) = Fχ (a) + P [a < χ ≤ b]
and the equation in (1.6) follows.
Exercise 1.3 If the probabilities of a male or female offspring are both 0.5, find
the probability of a family of five children being all male.
Exercise 1.5 An Ethernet local network has k stations always ready to transmit.
A station transmits successfully if no other station attempts to transmit at the
same time as itself. If each station attempts to transmit with probability p, what
is the probability that some station will be successful?
18 1 Random Variables
Fχ (a) = P [χ ≤ a]
The function fχ (x) is called the probability density function of the random vari-
able χ. Again, because we are concerned with probabilities, we must have the
condition
Z ∞
fχ (x)dx = 1 (1.8)
−∞
Also, analogous to Eq. (1.6) we can calculate the probability that a random vari-
able χ lies in the interval (a,b) from
Z b
P [a < χ < b] = fχ (x)dx (1.9)
a
The density function fχ (x) does not have to be continuous, but the distribution
function Fχ (x) is automatically continuous. This implies
P [χ = x] = 0 (1.10)
The constant λ is called the parameter of the distribution and the function is
undefined for x < 0.
The corresponding cumulative distribution function is easily calculated to be
Z a
F χ(a) = λe−λx dx = 1 − e−λa (1.13)
0
for a ≥ 0, and F (a) = 0 if a < 0. Note also that lima→∞ F (a) = 1 as it should
be, since it is certain that 0 ≤ x < ∞.
Exercise 1.6 Find the probabilities that a random variable having an exponen-
tial distribution with parameter λ = 10 assumes a value between 0 and 3, a
value greater than 5, and a value between 9 and 13.
Exercise 1.7 The life expectancy of a certain kind of lightbulb is a random vari-
able with an exponential distribution and a mean life of 100 hours. Find the
probability that the lightbulb will exceed its expected lifetime.
In most cases we are not interested in the specific distribution function of a ran-
dom variable, but only in some characteristic values, the moments. The mean or
average value of a real positive random variable χ(t) is used very often and it is
more frequently referred to as the expectation of that variable. We write E[χ] or
χ for that value and it is defined by
Z ∞
E[χ] = tfχ (t)dt
0
Note that we integrate only over the interval t ∈ [0,∞) since the independent
variable will always be time in our discussions.
We will see later on that we will need to know the expectation of the power of
a random variable as well. The expected value of the nth power of a random
variable is referred to as its nth moment. Thus the more general nth moment (the
mean is just the first moment) is given by
Z ∞
n
E[χ ] = tn fχ (t)dt
0
The second central moment is used very often and is referred to as the variance,
usually denoted by σχ2 and defined as before by
20 1 Random Variables
σχ2 = (χ − χ)2
= χ2 − (χ)2
The square root σχ of the variance is referred to as the standard deviation. The
ratio of the standard deviation to the mean of a random variable is called the
coefficient of variation denoted by
σχ
Cχ =
χ
Exercise 1.8 Referring to Ex. 1.5 (page 17), compute the mean number of colli-
sions to be expected by any one of the k stations before a successful transmission.
Exercise 1.9 Compute the mean and coefficient of variation of a random vari-
able which is exponentially distributed with parameter λ.
Use the symbol Rn to denote the set of all n-tuples of real numbers. Let χ1 ,χ2 , . . . ,χn
be random variables. These random variables are said to have a joint discrete
distribution if there exists a nonnegative function p(x1 ,x2 , . . . ,xn ) of n real vari-
ables that has the value 0 except at a countable set of points in Rn , such that
for all points (x1 ,x2 , . . . ,xn ) in Rn . Obviously we must have that
X
p(x) = 1
x∈Rn
Similarly we say that the collection χ1 ,χ2 , . . . ,χn of random variables has a
joint continuous distribution if there exists a nonnegative integrable function
f (x1 ,x2 , . . . ,xn ) of n real variables that satisfies
Z a1 Z an
P [χ1 ≤ a1 , . . . ,χn ≤ an ] = ... f (x1 ,x2 , . . . ,xn )dx1 . . . dxn
−∞ −∞
for all choices of upper limits a1 , . . . ,an . The function f is called the joint prob-
ability density function of the random variables χ1 ,χ2 , . . . ,χn and as in the
discrete case, we must have
Z ∞ Z ∞
... f (x1 ,x2 , . . . ,xn )dx1 . . . dxn = 1
−∞ −∞
1.6 Stochastic Processes 21
If we know the joint distribution f of χ1 ,χ2 , . . . ,χn , we can obtain the distribu-
tion of any one, say χm , of the random variables by simply integrating over all
values of the remaining random variables. That is, fm (x) =
Z ∞ Z ∞
... f (x1 , . . . ,xm−1 ,x,xm+1 , . . . ,xn )dx1 . . . dxm−1 dxm+1 . . . dxn
−∞ −∞
is the probability density function of χm . The same holds true for the discrete
case where we would sum, rather than integrate, over all possible values of the
other variables.
Definition 1.5 If the values x = (x1 ,x2 , . . .) in the state space of χ(t) are finite
or countable, then we have a discrete-state process, also called a chain. The state
space for a chain is usually the set of integers {0,1,2, . . .}. If the permitted values
in the state space may range over a finite or infinite continuous interval, then
we say that we have a continuous-state process. The theory of continuous-state
stochastic processes is not easy and we will only be considering discrete-state
processes in this book.
Definition 1.6 If the times t = (t1 ,t2 , . . . ,tn ) at which we observe the value of
χ(t) are finite or countable, then we say that we have a discrete-time process;
if these times may, however, occur anywhere within a set of finite intervals or
an infinite interval of time, then we say that we have a continuous-time process.
When time is discrete we write χn rather than χ(t) and refer to a stochastic
sequence rather than a stochastic process.
22 1 Random Variables
Definition 1.7 Consider the joint distribution function (refer Sec. 1.5) of all the
random variables X = {χ(t1 ),χ(t2 ), . . .} given by
for all x = (x1 ,x2 , . . . ,xn ), t = (t1 ,t2 , . . . ,tn ) and all n. Then the nature of
FX (x; t) is the third quantity which determines the class of a stochastic process.
In this book we will consider only the class of stochastic processes known as
Markov processes.
23
2 Markov Processes
In the case of a homogeneous Markov process, the particular instant tn in Eq. (2.2)
does not matter either so that the future of the process is completely determined
by the knowledge of the present state. In other words,
In fact, worse than that, an important implication is that the distribution of the
sojourn time in any state must be memoryless. Our surfer does not know how
long he has been at this beach! If you think about it, if the future evolution de-
pends on the present state only, it cannot depend on the amount of time spend in
the current state either.
When time is continuous, there is only one probability distribution fχ (y) of the
time y spent in a state which satisfies the property
P [χ ≥ y + s|χ ≥ s] = P [χ ≥ y]
In other words, the sojourn times in a Continuous Time Markov Chain (CTMC)
have an exponential probability distribution function. We will prove this fact in
Sec. 2.3 on page 46. Not surprisingly, we will meet the exponential distribution
many times in our discussions.
Similarly, for a Discrete Time Markov Chain (DTMC), the sojourn time η in a
state must be a geometrically distributed random variable (cf. Eq. (1.5))
Note that when a process has an interarrival time distribution given by Fη (n) it
is said to be a Bernoulli arrival process. Moreover, let η = nδ for n an integer
and δ the basic unit of time. Then the mean time is given by
∞
X δ
δ kpη (k) = (2.6)
k=1
(1 − q)
Exercise 2.1 The weather bureau in an European country decided to improve its
record for weather prediction. This is made a little easier by the fact there are
never two sunny days in a row. If it is a sunny day however, the next day is just
as likely to be rainy as it is likely to be just grey and dull. If it is not a sunny day,
there is an even chance that the weather will be the same the next day. If there is
a change from a rainy or dull day, there is only a 50 percent chance that the next
day will be sunny.
1. Is the stochastic process we have just described Markovian?
In this section we concern ourselves with the case where the time spent in a
Markov state has a discrete distribution whence we have a Discrete Time Markov
Chain (DTMC).
for n ∈ N.
The expression on the right-hand side of this equation is the one-step transition
probability of the process and it denotes the probability that the process goes
from state xn to state xn+1 when the time (or index) parameter is increased from
n to n + 1. That is, using the indices for notating the states,
The more general form of the sth step transition probabilities is given by
which gives the probability that the system will be in state j at step s, given that
it was in state i at step n where s ≥ n.
Note that the probabilities pij (n,s) must satisfy the following requirements:
The probability of going from state i to state j is the probability of somehow get-
ting from i at time n to some intermediate state k at some time r and from there
to state j. The events {χr = k|χn = i} and {χs = j|χr = k} are independent,
so that using this and the fact that from the Markov property,
for all m ∈ N. From the Markov property we can establish the following recur-
sive equation for calculating pij (m)
X
pij (m) = pik (m − 1)pkj (1), m = 2,3, . . . (2.9)
k
We can write Eq. (2.9) in matrix form by defining matrix P = [pij ], where
pij := pij (1), so that
where
P (0) = I
P (1) = P (0) P = IP
P (2) = P (1) P = P 2
P (3) = P (2) P = P 3
and in general
This equation enables us to compute the m-step transition probabilities from the
one-step transition probabilities.
(m)
Next we consider a very important quantity, the probability πj of finding our
DTMC in state j at the mth step:
(m)
πj = P [χm = j] (2.12)
for the m-th step transition probability where we have assumed, without loss of
generality, that we entered state i at time 0, then multiplying both sides of this
(0)
equation by πi = P [χ0 = i] (cf. definition in Eq. (2.12)), summing over all
states and applying theorem of Total Probability (cf. page 14), we obtain
X (m) X
P [χ0 = i]pij = P [χ0 = i]P [χm = j|χ0 = i]
i i
X (0) (m)
πi pij = P [χm = j]
i
(m)
= πj
or, alternatively
(m) X (0) (m)
πj = πi pij (2.13)
i
That is, the state probabilities at time m can be determined by multiplying the
multistep transition probabilities by the probability of starting in each of the
states and summing over all states.
The row vector formed by the state probabilities at time m is called the state
probability vector Π(m) . That is,
(m) (m) (m)
Π(m) = (π0 ,π1 ,π2 , . . .)
With this definition, Eq. (2.13) can be written in matrix form as follows
1
IPANEMA
1
2
CLIFTON
Example 2.1 Consider the simple discrete time MC in Fig.2.1 which illustrates
the behaviour of our surfer. This diagramme is also called the state transition
diagramme of the DTMC. Every instant a unit of time elapses the surfer decides
to do something. When at the Clifton, he decides to go to Waikiki with probability
1
2 or may decide to go to Ipanema with the same probability (our surfer happens
to be very affluent). When in Ipanema he may in fact decide to stay there with
probability 12 at the end of a time period. With our beaches numbered as shown,
we have
0 0.5 0.5
P = 0.3 0 0.7
0.2 0.3 0.5
Assume that our surfer starts off at Clifton (beach 1). In other words the initial
distribution is Π(0) = (1,0,0). From Clifton he can go to Ipanema or Waikiki
with equal probability, i.e.,
0 0.5 0.5
As we will see later, the vector Π(m) of state probabilities tends to a limit for
m → ∞. Even more, one can show that for specific DTMCs the effect of Π(0) on
the vector Π(m) completely vanishes. For our surfer that means, e.g., even if we
do not know at which beach he started the probability of finding him at a specific
beach after a long time is nearly constant. This phenomenon does not hold for
all DTMCs. Consider, e.g., the DTMC of Fig. 2.2. If the process starts in state 0
it stays there forever. But starting in state 3 there is a chance that the process gets
absorbed in state 5. Clearly, the probability Π(m) is not independent of the initial
2.1 Discrete Time Markov Chains 29
p
2 3
q p
0 p q 1
1 5
q
p
1 4
q
distribution. This effect or to be more precise the absence of such effects can
be verified by investigating the structure of the state transition diagramme. E.g.,
from state 0 or 5 of the DTMC given in Fig. 2.2 no other state can be reached,
thus intuitively explaining the described effect.
Next we consider a classification of Markov states based on the structure of the
state transition diagramme.
Consider states i,j ∈ S. If there is a path from i to j, i.e., there exists an integer
n (which may depend on i and j) such that
then we write i * j.
Two states i and j are said to communicate, written i j, if there is a path from
state i to state j and vice versa.
Let C[i] = {j|i j; j ∈ S},∀i ∈ S. We call C[i] the class of state i.
Example 2.2 Consider the simple MC in Fig. 2.2. In that figure, C[0] = {0},C[5] =
{5},C[1] = {1,2,3,4}.
An irreducible MC clearly has only one class of states, i.e. C[i] = C[j] ∀i,j ∈ S.
The MC of Fig. 2.2 is reducible since 0 1 is for instance not true.
Let C denote any class of state and C be the set of Markov states not in the class
C.
Since the latter implies pij = 0 for i 6= j, an absorbing state does not communi-
cate with any other state.
The MC of Fig. 2.2 has two absorbing states, 0 and 5.
Definition 2.5 A class C is said to be transient if there is a path out of C. That
is, if ∃i ∈ C and k ∈ C such that pik > 0. The individual states in a transient
class are themselves said to be transient.
States 1, 2, 3 and 4 in the MC of Fig. 2.2 are all transient.
Definition 2.6 A MC is said to be absorbing if every state in it is either absorbing
or transient.
Finally we define an ergodic class.
Definition 2.7 A class C is said to be ergodic if every path which starts in C
remains in C. That is
X
pij = 1, ∀i ∈ C
j∈C
∞
X (m)
fj = fj
m=1
We now classify the states j of a MC depending on the value fj of the state. Not
surprisingly, if fj = 1 we say the state is said to be recurrent; if a return is not
certain, that is fj < 1, then state j is said to be transient. Furthermore, if our
MC can return to state j only at steps η,2η,3η, . . ., where η ≥ 2 is the largest
such integer, then state j is said to be periodic with period η. If such an integer
number η does not exist, then the state j is said to be aperiodic.
(m)
Knowing the probability fj of returning to state j in m steps, we can now
define another interesting quantity, the mean recurrence time Mj of state j.
∞
X (m)
Mj = mfj (2.15)
m=1
The mean recurrence time is thus the average number of steps needed to return
to state j for the first time after leaving it.
We can further describe a state j to be recurrent null if Mj = ∞, whereas it
is recurrent nonnull if Mj < ∞. Note that an irreducible MC can only have
recurrent null states if the number of states is infinite.
With all this in mind, we can now state the following important result[108] with-
out proof:
2.1 Discrete Time Markov Chains 31
Theorem 2.1 The states of an irreducible DTMC are all of the same type; thus
they can be either
• all transient,
• all recurrent nonnull, or
• all recurrent null.
Moreover, if periodic, then all states have the same period η.
Exercise 2.2 Assume that we don’t know for certain where our surfer has started.
An oracle tells us that he might have started at Clifton with a chance of 19%, at
Waikiki with 26% and at Ipanema, the beach he likes most, with a chance of 55%.
What is our vector π (0) now? Calculate π (1) , π (2) , π (3) .
The most interesting DTMCs for performance evaluation are those whose state
(m)
probability distribution πj does not change when m → ∞ or to put it dif-
ferently, a probability distribution πj defined on the DTMC states j is said to
(m)
be stationary (or have reached a steady state distribution) if πj = πj when
(0)
πj = πj , that is, once a distribution πj has been attained, it does not change in
the future (with m).
We are after the steady state probability distribution {πj } of being in state j at
some arbitrary point in the future. Clearly, if we know this, we can say a great
deal about the system modelled by the MC. When the DTMC is irreducible,
aperiodic and homogeneous the following theorem [108] helps us out.
In this case the quantities πj are uniquely determined through the following
equations
X
πi = 1 (2.17)
i
X
πi pij = πj (2.18)
i
1 1
2 3
1
0.75 0.25
1 1
2 3 4 5
1 1
Clearly the limit Π = limm→∞ Π(m) does not exist. Similarly the MC must be
irreducible for a unique solution to exist as the following example illustrates.
Example 2.4 Consider the reducible MC illustrated in Fig.2.4 and let Π(0) =
(1,0,0,0,0). Then
0 0 0.75 0.25 0
0 0 1 0 0
(1) (0)
Π =Π 0 1 0 0 0 = (0,0,0.75,0.25,0)
0 0 0 0 1
0 0 0 1 0
Example 2.5 Using Eq. (2.21) we can write the following set of linear equations:
34 2 Markov Processes
1−p
1 2
1
p 1−q
3
q
Exercise 2.3 Consider the stochastic process described in Exercise 2.1. Let C,R
and D represent a sunny, rainy and dull day respectively and in this way define a
new stochastic process with 9 states. Determine the new transition probabilities.
Consider this process to be a discrete time MC and find the probability of two
dull days following upon one another.
Exercise 2.4 Consider the homogeneous MC illustrated in Fig. 2.5.
1. Give the probability matrix P for the chain.
2. Under what conditions will the chain be irreducible and aperiodic, if at all?
3. Solve for the steady state probability vector Π.
4. What is the mean recurrence time of state 3?
5. For what values of p and q will π1 = π2 = π3 ?
2.1 Discrete Time Markov Chains 35
When using MCs to model real systems it is often very useful to know the num-
ber of steps (or, equivalently, the time) spent in the transient states before reach-
ing an absorbing state. Think of executing a multi-layer network protocol: The
time spent by processes executing the protocol in one layer (transient states)
before going to the the next layer (absorbing state) is one example of such an
application. The absorbing MC illustrated in Fig. 2.6 consisting of a set St of nt
transient states and a set Sa of na absorbing states, illustrates what we have in
mind.
1 1
2 2
nt na
St Sa
We begin our analysis by numbering the states in the MC such that the na ab-
sorbing states occur first and writing the transition probability matrix P as
I 0
P = (2.23)
R Q
Once in an absorbing state the process remains there, so I is the identity matrix
with all elements pii = 1, 1 ≤ i ≤ na . R is an nt × na matrix describing
the movement from the transient to the absorbing states, and Q is a nt × nt
36 2 Markov Processes
matrix describing the movement amongst transient states. Since it is not possible
to move from the absorbing to the transient states 0 is the na × nt zero matrix.
Since the formula for matrix multiplication also applies to matrices written in
block form, we can calculate the powers of P in terms of the matrices R and Q:
2 I 0
P =
R + QR Q2
and
3 I 0
P =
R + QR + Q2 R Q3
or in general
I 0
Pn =
N n R Qn
where N n = I + Q + Q2 + . . . + Qn−1 = ni=1 Qi−1 .
P
We can now state the following fundamental result for an absorbing MC:
We will not prove the theorem (for a proof see [86]) but, from Eq. (2.14) above
and the knowledge that for a transient state the steady state probability πj = 0,
the first part of the result is easy to accept intuitively.
Write
N = [nij ] = (I − Q)−1
For absorbing chains, the only interesting starting states are the transient ones.
Assume that we start with an initial state i ∈ St . For each state j ∈ St , define
the random variable υij to be the number of visits to state j before an absorbing
state is reached. Define υij = 1 when i = j.
We know from Th. 2.2 that υij < ∞ for any transient state j, and that υij has
finite expectation. Assuming these properties we can now prove the following
theorem:
E[υij ] = nij
Proof. Suppose that we move from starting state i to state k in the first step. If k
is an absorbing state, we can never get to state j. If k is a transient state, we are
in the same situation as before with starting state k instead. Using the Markov
property,
X
E[υij ] = δij + qik E[υkj ]
k∈St
The term δij is the Kronecker delta function with value 1 if i = j and 0 otherwise
and it counts the initial visit to state j in case the starting state is j. Denote by M
the matrix whose i,j-entry is E[υij ] for all i,j ∈ St . Then the last equation can
obviously be written
M = I + QM
so that M = (I − Q)−1 = N . t
u
Referring to Fig. 2.6, starting off in some state i ∈ St , the total number of steps
(transitions) before reaching an absorbing state is clearly the sum of times we
visit every state in St before absorption. Denote this random variable by υi and
its expected value E[υi ] by τi .
Theorem 2.5
X
τi = nij i ∈ St (2.24)
j∈St
and τi < ∞.
Proof. Since the expectation of the sum is the sum of the expectations the latter
result follows from the previous theorem. t
u
~τ = N e> (2.25)
Theorem 2.6 Let τ be the mean time before absorption of a DTMC with tran-
sient state set St = {1,2, . . . ,nt } and initial probability distribution ~r = (r1 ,r2 , . . . ,rnt ).
Then
τ = ~r N e> (2.26)
38 2 Markov Processes
Furthermore, define σi2 as the variance of the time υi before absorption starting
in state i ∈ St and σ~2 = (σi2 , . . . ,σn2 t ) as the vector of the variance of these
times. Let τ~2 = (E[v12 ], . . . ,E[vn2 t ]). Then it can be shown (cf. [103], page 49)
that
Theorem 2.7
which reduces to
by substituting for N Q and N e> from Eq. (2.26). The result follows. t
u
In theory we therefore have the formulas in Eqs. (2.26) and (2.27) to compute
the mean and variance respectively for the time before absorption. In practice,
computing the matrix N = (I − Q)−1 for a MC with a large state space is
no mean task. Courtois and Semal[56] fortunately have devised a method of
computing τ and σ 2 from P. We next describe their technique without proving
the results. Proofs can be found in [103].
To start off, we define the augmented transition probability matrix
!
Q (I − Q)e>
(2.29)
~r 0
2.1 Discrete Time Markov Chains 39
Note that (I − Q)e> is the vector of transition probabilities from the states in St
to a new state say, a ∈ Sa , and ~r and Q are the same as before.
The clever idea is that, assuming irreducibility and aperiodicity, the Markov pro-
cess defined by the matrix in Eq. (2.29), has the same behaviour as a new pro-
cess with the state a designated as an absorbing state provided one assumes that
whenever the latter chain reaches the absorbing state a, it is restarted with the
initial vector ~r and this is done infinitely many times. The new, absorbing MC is
described by the matrix
!
Q (I − Q)e>
(2.30)
0 1
Again, the ergodic behaviour of the process described by Eq. (2.29) describes the
behaviour of the absorbing chain of Eq. (2.30) over an infinite number of runs,
each started with the initial distribution vector ~r.
where πa is the last component of the steady state distribution of the DTMC
described by the matrix !
Q (I − Q)e>
~r 0
The proof of this theorem can be found in [56]. Intuitively, 1/πa is the mean
time between two visits to the last state a of the Markov process described by the
matrix in Eq. (2.29) (cf. Th. 2.2) and each time the system is in this last state, one
further step is needed to restart the absorbing chain with the initial distribution ~r.
A similar result exists for the variance σ 2 of the time before absorption.
Theorem 2.9 If σ 2 is the variance of the time before absorption of the chain
!
Q (I − Q)e>
0 1
σ 2 = 2τ τ 0 − τ − τ 2
40 2 Markov Processes
In our discussions thus far the Markov process had the property that a transition
was made at every time instant. That transition may well return the process to
the same state, but a transition occurred nevertheless.
We now turn our attention to a more general class of processes where the time
between transitions may be several unit time intervals, and where this time can
depend on the particular transition being made. This process is no longer strictly
Markovian, however, it retains enough of the Markovian properties to deserve
the name semi-Markov process[90].
2.2 Semi-Markov Processes 41
One distribution sij (m) we are familiar with is the geometric distribution
(1 − a)am−1 , m = 1,2,3, . . .
We assume that the mean of the sojourn time is finite and that the sojourn times
are at least one time unit in duration, i.e.,
sij (0) = 0
that is, all sojourn times are exactly one time unit in length.
We next define the waiting time τi with expected value τi as the time spent in state
i, i = 1,2, . . . ,N irrespective of the successor state and we define the probability
mass function of this waiting time as
3
Some authors refer to this time as the “holding time”.
42 2 Markov Processes
N
X
P [τi = m] = pij sij (m)
j=1
N
X
τi = pij τij
j=1
That is, the probability that the system will spend m time units in state i if we do
not know its successor state, is the probability that it will spend m time units in
state i if its successor state is j, multiplied by by the probability that its successor
state will indeed be j and summed over all possible successor states.
As in the DTMC case, we next set out to compute the n−step transition proba-
bilities, which we denote φij (n), for the semi-Markov case. That is, how can a
process that started by entering state i at time 0 be in state j at time n?
One way this can happen is for i and j to be the same state and for the pro-
cess never to have left state i throughout the period (0,n). This requires that the
process makes its first transition, to any other state, only after time n. That is
where
1, if i = j,
δij =
0, otherwise
Let W (n) = {δij 1 − nm=0 N j=1 pij sij (m) } be the matrix of these ele-
P P
ments.
Every other way to get from state i to j in the interval (0,n) would mean the
process made its first transition from state i to some other state k at a time m,
and then by a succession of such transitions to state j at time n. Note that we
have to consider all intermediate times m, 0 < m ≤ n and intermediate states
k ∈ S, S the Markov state space. In other words
n X
X N
pik P [τik = m]φkj (n − m) (2.32)
m=0 k=1
n X
X N
pik sik (m)φkj (n − m) (2.33)
m=0 k=1
and
n
X
Φ(n) = W (n) + (P ◦ S(m))Φ(n − m) n = 0,1,2, . . . (2.34)
m=0
Φ(n) is called the interval transition probability matrix for the semi-Markov pro-
cess in the interval (0,n) and clearly
Φ(0) = I
Eq. (2.34) provides a convenient recursive basis for computing Φ(n) for any
semi-Markov process. The quantities P and S(m) come directly from the defi-
nition of the process.
Example 2.6 Consider again our typical surfer of Fig. 2.1 on page 28, but let
us now give the example a semi-Markovian flavour. The nature of the surfer now
dictates that the length of time he will stay on a particular beach will depend on
both which beach he is on and where he intends to go next. The (sojourn) time
τij is thus the length of time spent surfing on beach i with the intention of going
to beach j (where j = i is certainly possible). The lifeguards on each beach
have been keeping record of our surfer and have come up with the following
probability mass functions describing the surfer’s behaviour:
m−1 m−1 m−1
1 2 1 3 1 2
s11 (m) = s12 (m) = s13 (m) =
3 3 4 4 3 3
m−1 m−1 m−1
1 1 1 7 2 3
s21 (m) = s22 (m) = s23 (m) =
2 2 8 8 5 5
m−1 m−1 m−1
1 3 1 2 1 1
s31 (m) = s23 (m) = s33 (m) =
4 4 3 3 2 2
for m = 1,2,3, . . .
44 2 Markov Processes
Solution. Consider the general geometric distribution function (cf. Sec. 1.2)
p(n) = (1 − a)a(n−1) . The first moment or mean n can be calculated in the fol-
lowing way:
∞
X
n= n(1 − a)a(n−1)
n=0
P d d P
Using the property that da = da we write
∞
X d n
n = (1 − a) a
n=0
da
d 1
= (1 − a)
da 1 − a
1
=
1−a
so that the first moment τ ij in the example is given by
τ 11 = 3; τ 12 = 4; τ 13 = 3;
τ 21 = 2; τ 22 = 8; τ 23 = 2.5;
τ 31 = 4; τ 32 = 3; τ 33 = 2;
Clearly beach 2 (Waikiki) is the most popular with our surfer, since he spends 8
units of time on the average surfing there and then immediately returning to it.
The mean time he spends on that beach, irrespective of where he might go next
is given by
Exercise 2.7 In Ex. 2.6, compute the mean time the surfer spends on Ipanema,
assuming that he has arrived there from anywhere else but Waikiki.
We now set out to find the limiting behaviour of the interval transition prob-
abilities over long intervals. It is important to note that the MC structure of a
semi-Markov process is the same as that of its embedded Markov process. There-
fore the interval transition probabilities of a semi-Markov process can exhibit a
unique limiting behaviour only within the chain of the embedded Markov pro-
cess.
We begin by defining a limiting interval transition probability matrix Φ for our
process by
2.2 Semi-Markov Processes 45
Φ = lim Φ(n)
n→∞
with elements φij . However, in steady state, the limiting interval transition prob-
abilities φij do not depend on the starting state i and we therefore write φij = φj .
Define a vector ϕ = (φ0 ,φ1 , . . . ,φN ) as the vector of probabilities φj that the
semi-Markov process is in state j as time n → ∞ and let Π = {π0 ,π1 , . . . ,πN }
be the steady state probability vector of the equivalent embedded MC [cf. Eq. (2.21)].
One can prove (see e.g., Howard[90]) that
πj τ j
φj = PN (2.35)
i=1 πi τ i
or
1
ϕ = ΠM
τ
where we have written
N
X
τ= πj τ j
j=1
Exercise 2.8 A car rental company has determined that when a car is rented in
Town 1 there is a 0.8 probability that it will be returned to the same town and
a 0.2 probability that it will be returned to Town 2. When rented in Town 2,
there is a 0.7 probability that the car will be returned to Town 2, otherwise it
is returned to Town 1. From its records, the company determined that the rental
period probability mass functions are:
m−1 m−1
1 2 1 5
s11 (m) = s12 (m) = m = 1,2,3, . . .
3 3 6 6
m−1 m−1
1 3 1 11
s21 (m) = s22 (m) = m = 1,2,3, . . .
4 4 12 12
In Sec. 2.1 we described how our surfer had to decide at regular, equal intervals
of time whether to leave or whether to stay on the beach where he is. If we now
allow him to decide at an arbitrary time which beach to go to next, we have the
continuous-time version of that example.
The Continuous Time Markov Chain (CTMC) version of the Markov property,
Eq. (2.1), is given by
for any sequence t0 ,t1 , . . . ,tn such that t0 < t1 < . . . < tn and xk ∈ S where S
is the (discrete) state space of the process.
The right-hand side of the above equation is the transition probability of the
CTMC and we write
to identify the probability that the process will be in state xj at time s, given that
it is in state xi at time t ≤ s. Since we are still considering discrete state Markov
processes (chains) we will continue to use i ∈ N rather than xi to denote a state
of our Markov processes.
Note that we need to define
1, if i = j
pij (t,t) = (2.37)
0, otherwise
2.3 Continuous Time Markov Chains 47
to establish the fact that the process may not leave immediately to another state.
We already mentioned in Sec. 2 on page 24 that the time a Markov process
spends in any state has to be memoryless. In the case of a DTMC this means that
the chain must have geometrically distributed state sojourn times while a CTMC
must have exponentially distributed sojourn times. This is such an important
property that we include a proof from Kleinrock[108] of it here. The proof is
also instructive in itself.
Let yi be a random variable which describes the time spent in state i. The Markov
property specifies that we may not remember how long we have been in state i
which means that the remaining sojourn time in i may only depend upon i. As-
sume that this remaining time t has distribution h(t). Then our Markov property
insists that
where the last step follows from the fact that the event yi > s + t implies that
yi > s. Rewriting the last equation we obtain
for all s,t ≥ 0. All that remains is to show that the only continuous distribution
function which satisfies Eq. (2.39) is the negative exponential distribution. Write
fi (t) for the corresponding density function. Then we can write
d d
P [yi > t] = (1 − P [yi ≤ t])
dt dt
= −fi (t) (2.40)
Using the latter result and differentiating Eq. (2.39) with respect to s we obtain
dP [yi > s + t]
= −fi (s)P [yi > t]
ds
48 2 Markov Processes
Dividing both sides by P [yi > t] and setting s = 0 we obtain the differential
equation
dP [yi > t]
= −fi (0)ds
P [yi > t]
which by using (2.40) gives the following density function
fi (t) = fi (0)e−fi (0)t
for all t ≥ 0. Setting λ = fi (0) we are back to fi (x) = λe−λx which we had
before in Eq. (2.4) on page 24. 2
In other words, if a stochastic process has the Markovian property, the time spent
in a state will have a negative exponential distribution. This may seem rather
restrictive since many real systems do not have exponential time distributions.
In 1955 Cox [57] showed however, that a random variable χ whose distribution
Fχ (x) has a rational Laplace transform can be represented as a series-parallel
network of stages as illustrated in Fig. 2.7 where the time distribution of each
stage has a different negative exponential distribution. In that diagramme stage
j, j = 2, . . . ,k follows stage j − 1 with probability αj or does not follow with
probability 1 − αj .
The first and second moments of this distribution are given by [102]
k i
X X 1
E[χ] = δi
i=1 j=1
µj
2
k i i
X X 1 X 1
E[χ2 ] = δi +
µ2 µ
i=1 j=1 j j=1 j
where
i−1
Y
δi = (1 − αi ) αj
j=1
α1 α2
µ1 µ2 ... µk
1 − α1 1 − α2 1 − αk−1
...
If we now encode the stage number in which the process finds itself in the state
descriptor of our stochastic process, it is clear that the process will again be
Markovian.
2.3 Continuous Time Markov Chains 49
In fact one can approximate almost any distribution as closely as one wishes. The
drawback is that the size of the corresponding state space increases by a factor
k.
The obvious goal of CTMC analysis is to find the probability that the process
will be in state i at a given time t or alternatively, its steady state distribution.
In the continuous time case the solution is different from that for discrete time
in Th. 2.2, although the arguments are analogous. Let us now find that solution.
First of all define the following time-dependent transition probability
where the process is in state j at time t given that it was in state i at time s; s ≤ t.
Using the same arguments as in Sec. 2.1 on page 25 that the process must pass
at some intermediate time u through some intermediate state k in order to get
from state i to state j we can arrive at the Chapman-Kolmogorov equation for
continuous-time MCs:
X
pij (s,t) = pik (s,u)pkj (u,t) (2.41)
k
H(t,t) = I
pij (s,t + ∆t) − pij (s,t) X pkj (t,t + ∆t) − pkj (t,t)
= pik (s,t)
∆t k
∆t
since pij (s,t) = k pik (s,t)pkj (t,t). ∆t → 0 yields the following alternate form
P
∂H(s,t)
= H(s,t)Q(t), s≤t (2.42)
∂t
where we have written the matrix Q(t) for
H(t,t + ∆t) − I
Q(t) = lim
∆t→0 ∆t
whose elements are defined as follows
pii (t,t + ∆t) − 1
qii (t) = lim
∆t→0 ∆t
pij (t,t + ∆t)
qij (t) = lim , i 6= j
∆t→0 ∆t
The intuitive interpretation of the quantities qii (t) and qij (t) is that when our
process is in state i at time t, then the probability that a transition occurs to any
state other than i is given by −qii (t)∆t + o(∆t). Thus, −qii (t) is the rate at
which the process leaves state i and similarly the probability of a transition to
state j in time interval ∆t is qij (t)∆t + o(∆t) or rate qij (t). Since we know that
P
j pij (s,t) = 1 it follows that
X
qij (t) = 0, ∀ i (2.43)
j
Using the same arguments as above we could also derive the backward Chapman-
Kolmogorov equations
∂H(s,t)
= −Q(s)H(s,t), s≤t
∂s
Note that in terms of the individual matrix elements we can write the forward
Chapman-Kolmogorov equations as
∂pij (s,t) X
= qjj (t)pij (s,t) + qkj (t)pik (s,t) (2.44)
∂t k6=j
∂pij (s,t) X
= −qii (s)pij (s,t) − qik (s)pkj (s,t) (2.45)
∂s k6=i
From these equations we can solve for H(s,t), but what we really need to know
is the probability πj (t) that the Markov process will be in state j at time t. Define
the vector of state probabilities
If we are given the initial state distribution Π(0) then we can solve for the time-
dependent state probabilities in a way similar to that in Sec. 2.1.1 from
Π(t) = Π(0)H(0,t)
Differentiating both sides of the last equation we obtain after applying Eq. (2.42)
dΠ(t) dH(0,t)
= Π(0)
dt dt
= Π(0)H(0,t)Q(t)
= Π(t)Q(t) (2.46)
Note the similarity between Eqs. (2.44) and (2.47). The former equation de-
scribes the probability that the process is in state j at time t given that it was
in state i at time s.
We now know that we can solve for the time-dependent probability distributions
Π(t) from Eq. (2.47). The explicit solution of this system of differential equa-
tions is given by
Rt
Q(u)du
Π(t) = Π(0)e 0
which is difficult to solve in most interesting cases and numerical methods have
to be used. As in the case of the DTMC we therefore fall back on the steady state
distribution when t → ∞ while remembering that there may indeed be cases
where the time-dependent solution is very useful.
Before concluding this section we would like to note that concepts such as
reducibility, transient and absorbing states and chains which we discussed for
DTMCs apply to CTMCs as well and we will not repeat those discussions here.
Consider the case where our CTMC is homogeneous. If so, we can drop the
dependence on time and adopt the following notation
dpij (t) X
= qjj pij (t) + qkj pik (t) (2.48)
dt k6=j
and
dpij (t) X
− = −qii pij (t) − qik pkj (t)
dt k6=i
or for the state probabilities themselves
dπj (t) X
= qjj πj (t) + qkj πk (t) (2.49)
dt k6=j
When our CTMC chain is irreducible, homogeneous and all states are recurrent
nonnull, it can be shown (cf. [108]) that the following limit exists and is inde-
pendent of the initial state distribution. That is,
lim πj (t) = πj
t→∞
The vector Π = (π0 ,π1 ,π2 , . . .) is the steady state probability distribution we are
after. As was the case for a DTMC, the MC is said to be ergodic.
This limiting distribution is given uniquely by the solution of the following sys-
tem of linear equations
X
− qjj πj + qkj πk = 0 (2.50)
k6=j
X
πj = 1
j
where the latter equation again follows from the rules for probability conserva-
tion. In matrix form Eq. (2.50) may be expressed as
ΠQ = 0 (2.51)
This latter equation is the CTMC equivalent of the very important Eq. (2.21) on
page 32 for the DTMC case. In the latter case P was the matrix of transition
probabilities, whereas the so-called infinitesimal generator Q is a matrix of
transition rates.
Eq. (2.50) are also known as the global balance equations of the MC. If in
addition the following property holds, namely
qij πi = qji πj ∀i,j (2.52)
then the MC is said to satisfy local balance and the solution to Eq. (2.52) is also
a solution to Eq. (2.50). Note that the reverse is not necessarily true.
Exercise 2.9 A computing center has only one technician and 3 computers. Each
computer randomly breaks down at an exponential rate of twice a day, and the
technician fixes them at an exponential rate of 3 computers per day. Whenever
all three computers are broken, the users help the technician and 4 computers
are fixed per day. Answer the following:
1. On the average how many computers are out of order?
2. At what mean rate are the computers breaking down?
2.4 Embedded Markov Chains 53
can be calculated as a function of the transition rates qij . In the case of a CTMC
the sojourn times τij ; i,j = 1,2, . . . ,N (cf. page 48) are all exponentially dis-
tributed with parameter qij .
That is,
The probability pij is the same as the probability that τij is the smallest of the
sojourn times τik , k 6= i. Denote this greatest lower bound by τglb . Then
[
P [τglb ≤ x] = P [ {τik ≤ x}]
k6=i
k6=j
\
= 1 − P[ {τik > x}]
k6=i
k6=j
P
− k6=i qik x
or Fτglb (x) = 1 − e k6=j
from Eq. (2.54). The corresponding density function fτglb (x) is thus
P
X − k6=i qik x
fτglb (x) = − qik e k6=j
k6=i
k6=j
However,
X
−qii = qik
k6=i
X
or − (qii + qij ) = − qik
k6=i
k6=j
so that
It follows that
54 2 Markov Processes
Z ∞
pij = fτglb (x)P [τij ≤ x]dx
0
Z ∞
= − (1 − e−qij x )(qii + qij )e(qii +qij )x dx
0
qij
=
−qii
The steady state probabilities π are then computed in a manner similar to that
described in Sec. 2.2.
This completes our discussion of discrete-state Markov processes.
Exercise 2.10 Consider the car rental exercise of Ex. 2.8 except that now you are
given that cars with destination Town 2 are rented at the average rate of 2 per
day in Town 1 and 14 per day in Town 2. Cars destined for Town 1 are rented at
the average rate of 6 per day in Town 2 and 8 per day in Town 1. Again calculate
the percentage of the time a car spends in Town 2?
55
With the basic theory of stochastic processes behind us we can now proceed to
apply that theory to model the performance of systems. Think about a typical
computer system, be it a multiprocessor, a computer network or a database sys-
tem. In all cases we have entities (processes, packets, transactions) requiring ser-
vice from some resource or set of resources (central processors, nodal processor,
file server). In doing so, these entities usually have to wait their turn before be-
ing served in some order. Even humans are regrettably only too familiar with the
world we have just described: it is known as queueing and a vast body of theory
known as queueing theory has developed around the subject over the years.
What then is the link between queueing theory and stochastic processes? As you
know from experience it is not always possible to predict the length of the waiting
line at the post office or bank. We know that the length of that line is a stochastic
process as is, for instance, the number of packets in the input buffer at a network
node at any time. It would thus make sense to have an understanding of basic
queueing theory in our study of performance modelling.
We focus our attention on the general queueing system illustrated in Fig. 3.1. In
queueing theory terminology the entities requiring service are called customers
and they are said to wait in a waiting line to be served by one or more servers
using some scheduling strategy such as First-Come-First-Served (FCFS). The
queue may have a finite capacity while the customers in turn may come from a
finite population.
In order to describe and analyse a queue we tag each customer with a subscript
n and denote the customer itself by Cn . So Cn is the nth customer to enter the
(queueing) system. As suggested already, we define the random process N (t) as
Another stochastic process is the unfinished work U (t) that exists in the system
at time t. When U (t) > 0, then the system is said to be busy, and when U (t) = 0
arrivals departures
WAITING LINE
QUEUE
sn
wn xn xn+1 xn+2
SERVER
time
Cn Cn+1 Cn+2
WAITING
τn τn+1 τn+2
LINE
time
tn+1 tn+2
Cn Cn+1 Cn+2
it is said to be idle. These stochastic variables are displayed in the time sequence
diagramme in Fig. 3.2 where a customer Cn ,Cn+1 , . . . arrives at the queue, waits
for a time wn before proceeding to the server as soon as the previous customer
Cn−1 ,Cn , . . . has completed his service (FCFS service) and eventually leaves
after a service time of duration xn .
More formally then, we define the arrival time of customer Cn to the queueing
system as the instant
and define the time between the arrivals of Cn−1 and Cn (the interarrival time)
as
We assume moreover that the interarrival times are drawn from a continuous
distribution A(t), so that
P [tn ≤ t] = A(t)
Note that the average arrival rate is given by λ. Similarly, we define the service
time for Cn as
P [xn ≤ x] = B(x)
for the average service time which are also quantities we will come across very
frequently.
The sequences {tn } and {xn } are the independent variables of the queueing
system. The quantity of most interest to us is the waiting time which we define
as
The total time spent in the system by Cn , which we will call the queueing time1
is thus given by
Thus we have defined the interarrival time, the waiting time, the service time and
the queueing time for our customer Cn . Before concluding this section we would
like to introduce a very convenient shorthand notation that is in common use for
describing a queue. The reader will suspect already that the mathematical notion
of a queue is described by the arrival distribution A(t) and the service distribution
B(x). Other determining attributes are the number m of servers and the system
capacity K, the total number of customers, including those in service, the queue
can accommodate. Another attribute is the scheduling strategy at the server while
it may also be necessary to specify the size of the customer population if this is
not infinite.
The shorthand way of describing the abovementioned attributes of a queue, known
as Kendall’s notation, is to write A/B/m/K/Z/Sched to identify the arrival pro-
cess/service process/number of servers/ maximum capacity/user population/scheduling
strategy of a queue. In the description of the arrival or service process the fol-
lowing conventions are used:
1
In this book, the terms “waiting time” and “queueing time” will refer to the time waiting in line
and the total time spent waiting in line and being served respectively. The meaning of these is
not consistent throughout the queueing theory literature and the wise reader will make sure he
knows which meaning the particular author uses.
58 3 General Queueing Systems
G: general distribution
M: exponential distribution
D: deterministic distribution
Exercise 3.1 Think of any freeway in your city. Can that be considered as a
queueing system? What would the customers be? And the server(s)?
Exercise 3.2 Give the shorthand notation for a queue with fixed interarrival
times and a 4-phase Coxian type service time distribution where the capacity
of the queue is K.
Most of us would suspect that the faster customers arrive at a queue and the
heavier their service requirements, the longer they will spend in the queueing
system. This is indeed the case and the rule which describes this relationship
is known as Little’s Law (or theorem). A theoretical proof of this law can be
found in the original work of Little [115] and several other papers [68, 100, 170,
180]. We will use operational (i.e., “how it works”) arguments to derive the same
result.
Suppose we observe the queueing process described by Fig. 3.2 for an interval
of time (0,t), at the beginning of which there are no customers and count the
number a(t) of customers which arrive during this time. That is
Simultaneously we count the number d(t) of departures during the same interval.
Thus
A typical behaviour for each of these two functions is illustrated in Fig. 3.3.
The number N (t) of customers in the system at time t is then clearly
13
12
11 N (t)
Number of
10 Customers
9 a(t)
8
7
6
5
4 d(t)
3
2
1
TIME t
The area from 0 to time t between the curves a(t) and d(t) in Fig. 3.3 is the
integral over time of the quantity N (t) and obviously represents the time spent
by all the customers in the system (measured in units of customer-seconds) up
to point t. Denote this area by I(t). Moreover let λt be defined as the average
arrival rate of customers during the interval (0,t); that is,
a(t)
λt :=
t
If we define Tt as the average queueing time (remember, waiting time plus ser-
vice time) per customer during the interval (0,t), then clearly
I(t)
Tt =
a(t)
Finally define Nt as the average number of customers in the system during the
interval (0,t), which can obviously be computed from
I(t)
Nt =
t
a(t) I(t)
=
t a(t)
= λt Tt
60 3 General Queueing Systems
1
..
.
Central Computer
A very useful class of Markov chain is the birth-death process. Birth-death pro-
cesses may be either discrete- or continuous-time processes in which the defin-
ing condition is that state transitions take place between state k and its nearest
neighbours k − 1,k and k + 1 only. In fact, as the name indicates, the birth-death
process is appropriate for modelling changes in the size of a population. When
the population is of size k we will say that the system is in state k. Moreover
a transition from state k to k + 1 will signify a “birth” within the population,
whereas a transition from k to k − 1 will denote a “death” in the population.2
Although the time parameter may be discrete as well (as the state space) for
the birth-death process, the continuous-time case is much more interesting and
the one we will analyse. We begin by introducing the notion of a birth rate λk ,
which describes the rate at which births occur when the population is of size k,
and similarly we define a death rate µk which is the rate at which deaths occur
when the population is of size k. Note that these rates depend only on k and are
independent of time so that our Markov chain is thus homogeneous. In terms of
our notation in the previous chapter, we have
λk , if j = k + 1
µk , if j = k − 1
qkj =
−(λ k + µk ), if j = k
0, otherwise
Note that the fact that qkk = −(λk + µk ) above, follows directly from Eq. (2.43)
on page 50. Note the assumptions that λk > 0 for all k, that µ0 = 0 (no deaths
are possible in a population of size 0), and that µk > 0 for all k > 0.
Using the notation developed in the previous chapter we can write the infinitesi-
mal generator Q for the general homogeneous birth-death process as
−λ0 λ0 0 0 0
µ1 −(λ1 + µ1 ) λ1 0 0
0 µ2 −(λ2 + µ2 ) λ2 0
Q=
0 0 µ3 −(λ3 + µ3 ) λ3 ...
..
.
Note that the sum of all elements in each row of the matrix Q is zero as it al-
ways will be. Compare this with the sum of all row elements of the transition
probability matrix P in Sec. 2.1 which will always be 1.
The state probabilities πk (t), k = 0,1, . . . at time t can thus be found by solving
the set of differential equations equivalent to Eq. (2.47)
2
The astute reader will already suspect that this process resembles a queue where a “birth”
signifies an arrival to and a “death” a departure from the queue. That this is indeed the case for
a queue with very specific interarrival time and service time distributions (the M/M/1 queue)
will be discussed at the end of this chapter.
62 3 General Queueing Systems
λ0 λ1 λ2 λk−1 λk λk+1
µ1 µ2 µ3 µk µk+1 µk+2
dπk (t)
= −(λk + µk )πk (t) + λk−1 πk−1 (t) + µk+1 πk+1 (t),k ≥ 1 (3.3)
dt
dπ0 (t)
= −λ0 π0 (t) + µ1 π1 (t) (3.4)
dt
These equations can be solved for the general transient case, but that is not easy.
Instead, we consider the steady state probabilities πk , k = 0,1, . . .. In that case
the above equations are a particular case of Eq. (2.51) and can be written
Eqs. (3.5) and (3.6) are known as the global balance equations. Before pro-
ceeding to solve these equations we digress to Fig. 3.5 which illustrates the state
transition diagramme of the birth-death process. Concentrating on state k we ob-
serve that one may enter it only from the state k − 1 or from the state k + 1 and
similarly one leaves state k only to enter state k − 1 or state k + 1. From that
diagramme it is clear why we refer to the process we described as the nearest-
neighbour, birth-death process.
The clever thing is to note that we can obtain Eqs. (3.5) – (3.6) directly from the
state transition diagramme in Fig. 3.5 by equating the rates of flow into and out
of each state k, k = 0,1, . . . Indeed, the flow into state k comes from state k − 1
(with probability πk−1 ) at rate λk−1 , and from state k + 1 at rate µk+1 . The total
flow into state k is the sum of the rates weighted by the probabilities of the origin
states, or
The flow out of state k is the product of the probability of state k and the sum of
the rates out of state k. That is,
Using the fact that under steady state conditions the flow out of state k equals the
flow into state k and Eqs. (3.5) – (3.6) follow. We can solve the latter equations
from the fact that
λ0
π1 = π0
µ1
3.3 Poisson Process 63
X k−1
Y λj
<∞
k6=0 j=0
µj+1
and we call the latter the condition of ergodicity (i.e., that a steady state solution
exists) for the birth-death process.
Exercise 3.4 Consider a birth-death system with the following birth and death
coefficients
λk = (k + 2)λ k = 0,1,2, . . .
µk = kµ k = 1,2,3, . . .
We mentioned in the last section that to find the transient solution for Eqs. (3.3) –
(3.4) is not very easy in general. In fact, more than that, the birth-death process in
the general case is not all that interesting either. A special case which is, however,
of central importance in queueing theory, is that for a pure birth process in which
we assume that µk = 0 for all k. Moreover, to simplify the problem even further,
we will assume that λk = λ for all k = 0,1,2, . . . Substituting this into Eqs. (3.3)
– (3.4) we have
64 3 General Queueing Systems
dπk (t)
= −λπk (t) + λπk−1 (t), k≥1 (3.9)
dt
dπ0 (t)
= −λπ0 (t) (3.10)
dt
Assuming that the process starts out from state 0 at time t = 0, or
1, k = 0
πk (0) =
6 0
0, k =
π0 (t) = e−λt
π1 (t) = λte−λt
(λt)k −λt
πk (t) = e ; k ≥ 0,t ≥ 0 (3.11)
k!
The latter is the well-known Poisson distribution which is central to our stud-
ies of queueing theory. Eq. (3.11) gives the probability of k arrivals (births) in
the interval (0,t) when the average arrival rate is λ. The Poisson process is im-
portant because it resembles or models many real-life processes very well. So,
for instance, it was observed that the number of telephone calls arriving from
subscribers at a central exchange is modelled very well by the Poisson process.
The same is true for packets arriving at a node in a packet switching computer
network.
There is another equally important reason, however, why the Poisson process is
so popular: Consider the random variable t̃ which represents the time between the
arrivals of a process which has a Poisson arrival distribution. As we did before,
we denote the probability distribution and probability density functions of these
times by A(t) and a(t) respectively. From the definition a(t)∆t + o(∆t) is the
probability that the next arrival occurs at least t and at most (t + ∆t) seconds
after the event of the last arrival. Furthermore,
A(t) = P [t̃ ≤ t]
= 1 − P [t̃ > t]
But P [t̃ > t] is the probability that there was no arrival in the interval (0,t), that
is π0 (t) for the Poisson distribution. Therefore, we have
3.4 M/M/1 Queue 65
A(t) = 1 − π0 (t)
and so from Eq. (3.11) we obtain, for the Poisson distribution, that the interarrival
time distribution is described by
A(t) = 1 − e−λt , t ≥ 0
Exercise 3.5 Let X be the time interval required to observe k Poisson arrivals.
Consider the two events: exactly k − 1 arrivals occur in the interval (0,t − ∆t)
and the event that exactly one arrival occurs in the interval (t − ∆t,t). By letting
∆t → 0 show that
λ(λx)k−1 −λx
fX (x) = e x≥0
(k − 1)!
The last special case of Eqs. (3.3) – (3.4) we will consider is a birth-death process
in which all the birth rates are the same and equal to λ for k ≥ 0 and all death
coefficients are equal to µ for k ≥ 1. This birth-death process with constant
coefficients is the simplest model of a queue, namely the well-known M/M/1
queue. The arrival process we know now from the previous section is Poisson
with exponential interarrival times. The service time distribution we define to be
exponential as well, or
B(x) = 1 − e−µx , x ≥ 0
πk = (1 − ρ)ρk (3.12)
since
∞
!−1
X
k
π0 = 1+ ρ
k=1
= 1−ρ (3.13)
66 3 General Queueing Systems
where we obviously require 0 ≤ ρ < 1 for this solution to exist (cf. condition
of ergodicity on page 63). The ratio ρ is known as the utilisation of the system.
Note for instance that π0 or the probability that the system will be idle is given
by
π0 = 1 − ρ
or, conversely the probability that the system will be busy is given by ρ so that
“utilisation” seems an appropriate name for this quantity.
Another important measure of any queueing system is the average number N of
customers in the system. Since we know πk we can now easily compute that
quantity from
∞
X
N = kπk
k=0
∞
X
= (1 − ρ) kρk (3.14)
k=0
There is a very useful trick one uses to evaluate Eq. (3.14), namely the fact that
for an absolutely convergent series of functions, the derivative of the sum of
terms is the sum of the derivative of the individual terms. Applying this trick we
obtain from Eq. (3.14)
∞
X ∂
N = (1 − ρ)ρ ρk
k=0
∂ρ
∞
∂ X
= (1 − ρ)ρ ρk
∂ρ k=0
∂ 1
= (1 − ρ)ρ
∂ρ 1 − ρ
ρ
=
1−ρ
Applying Little’s law, Eq. (3.2), we can write for T the average time in the M/M/1
queueing system
N
T =
λ
1
=
µ−λ
15 .
...
...
..
..
...
14 ..
...
...
....
13 ..
....
..
.
...
...
12 ...
...
....
.
..
11 ..
...
....
..
10 ...
..
..
...
.
..
9 ..
..
...
.
...
8 ...
RESPONSE ...
....
...
TIME, T 7 ...
...
....
..
..
...
6 ..
...
.
..
..
5 ...
...
...
...
..
4 .
...
...
...
..
3 .....
....
......
.....
.....
......
2 ..
........
.........
.
...
..
..........
.............
..
..................
.
1 .
.........................
.........................................
.................................................................
..
...
...
...
...
.
0
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
UTILISATION, ρ
Figure 3.6 Delay time as a function of utilisation in an M/M/1 queue.
The behaviour illustrated in Fig. 3.6 drawn for µ = 2.0, is rather dramatic. As
ρ → 1 the average delay T → ∞. This type of behaviour with respect to ρ as it
approaches 1 is characteristic of almost any queueing system one encounters. It
is also the explanation of why many a computer system manager has lost his job:
The system works well with increasing load in that response times increase only
slowly until, all of a sudden, the knee in Fig. 3.6 is reached and response times
become unacceptably long almost overnight!
Exercise 3.6 Consider an M/M/1 queue where there is no room for waiting cus-
tomers. We can define this as a birth-death process with coefficients
λ, k = 0 µ, k = 1
λk = µk =
6 0
0, k = 6 1
0, k =
1. Give the differential equations for πk (t) (k = 0,1).
2. Solve these equations in terms of π0 and π1 .
Exercise 3.7 At an automatic carwash there is room for only C waiting cars.
Dirty cars arrive at the rate of 6 per hour and are washed at an exponential rate
of 3 per hour. If there are more than two cars waiting the chances are 50 percent
that the arriving car will try to find another carwash.
68 3 General Queueing Systems
3. If a car wash costs ECU10, what is the income of the carwash per hour?
..
.
λ λ λ λ λ λ
µ 2µ 3µ mµ mµ mµ
From Fig. 3.8 we can easily set up the global balance equations:
µπ1 = λπ0
(i + 1)µπ(i+1) + λπ(i−1) = (λ + iµ)πi , i < m
mµπ(i+1) + λπ(i−1) = (λ + mµ)πi , i ≥ m
So that
k k
π0 λ m
k! , k<m
mµ
πk = k m
π0 λ
m
, k≥m
mµ m!
3.6 Queues with Processor Sharing Scheduling Strategy 69
with
m−1
!−1
X (mρ)k (mρ)m 1
π0 = +
k=0
k! m! 1 − ρ
λ
where ρ = mµ . Solving we obtain for the average number N of customers in the
system
∞
X (mρ)m π0
N= kπk = mρ + ρ
k=0
m! (1 − ρ)2
Exercise 3.8 Show that the average time in an M/M/m system is less than in m,
M/M/1 queues.
Exercise 3.9 Consider the freeway mentioned in Ex. 3.1. Assume that cars have
an interarrival rate of 3 per second and that the 4 lane freeway can accommodate
6 cars passing a particular point per second.
1. What is the utilisation of the freeway?
2. Assuming the same arrival rate, determine what happens if one of the lanes
is suddenly closed.
yet all are served simultaneously with the same rate µ. Thus µk = kµ for an IS
queue. As for the PS scheduling strategy there is no waiting time in the queue and
each customer is merely delayed for a random length of time with distribution
that of the service time. An Infinite Server can also be viewed as a queue with
an infinite number of servers so that a free server can be dedicated to each newly
arriving customer. An example of such a queue is, e.g., a terminal pool.
Queues with the PS and IS service disciplines belong to a larger family of queues
know as being of the BCMP-type[15]. Queueing networks using these servers
can be analysed very efficiently, since the steady state probability distribution of
the entire network can be represented by a (possibly normalised) product of the
steady state probability distributions of the queues considered in isolation. Such
queueing networks are also known as having product-form.
Up to this point in our discussions the stochastic behaviour of all our customers
was identical and independent. There are practical situations however where we
may want to distinguish between different classes of customers[102]. This may
be the case because different classes of customers may have different service re-
quirements or because the server may wish to give different priorities to different
classes of customers or both. In this last section on queueing we will investigate
priority service.
When one has priority service it is obviously necessary to define exactly what the
priority rules for the different classes of customers are. One may decide for in-
stance that an arriving priority customer will pre-empt a lower priority customer
in service. In the latter case it is then necessary to make a distinction between
the case where the service of the lower priority customer is resumed where it had
left off on pre-emption, or whether the service will be repeated from scratch.
Example 3.1 Consider an M/M/1 queue with two classes of customers whose
service follow a negative exponential distribution with parameters µ1 and µ2 ,
and with arrival rates λ1 and λ2 respectively. We assume the n1 customers of
class 1 have priority and that the n2 customers of class 2, whose service is in-
terrupted, will resume their service. Resuming service or restarting the service
is equivalent in this case, however, since the service times are exponentially dis-
tributed (the memoryless property, cf., page 24).
Since it is clear that priority customers are not affected by customers of class 2,
we have
λ1
π1 (n1 ) = ρn1 1 (1 − ρ1 ) with ρ1 =
µ1
Write π(n1 ,n2 ) for the steady state probability distribution of the number of class
1 and class 2 customers in the system. In this case the global balance equations
are
It is not easy to solve these balance equations and we will not describe how to
do so. Instead we simply quote the results (see, e.g., [77]). The mean number N1
and N2 of class 1 and 2 customers, respectively, are given by
ρ1
N1 =
1 − ρ1
ρ2 + N 1 ρ2
N2 =
1 − ρ 1 − ρ2
Exercise 3.10 Explain how one can solve a queue using semi-Markov analysis?
Exercise 3.11
(a) Consider a queue with K different classes of customers arriving. The arrival
process for each customer class i,i = 1, . . . ,K is specified by a Poisson
process with parameter λi . The service distribution of customers of class i
is Coxian with mean value µ1i .
Calculate the steady state probability distribution of the number of cus-
tomers in the system. I.e., compute P [(n1 , . . . ,nK )], the steady state prob-
ability that ni customers of class i (i = 1, . . . ,K) are in the queue. Assume
a queue with a PS service scheduling strategy.
(b) Consider the same queue as in part (a), but now with an Infinite Server strat-
egy. Determine P [(n1 , . . . ,nK )] again. Also compute the mean number of
customers in the queue.
72
4 Further Reading
There is a huge selection of books on the subjects of with stochastic theory and
especially Markov processes and queueing theory. The following subjective se-
lection of books is thus not an exhaustive list. With the basics already covered in
this book, the reader can choose the books with the style and notation (s)he likes.
E.g., an introduction to stochastic processes is given in [53] and an old, but still
excellent introduction to the theory of single queues can be found in the book by
Leonard Kleinrock [108]. Results on priority queues is given in [92]. All these
references also discuss queues with general arrival and service time distributions.
In this book we only touched on the theory of queues and focused on models
where single customers arrive at and leave a queue. Queues with batch (or bulk)
arrival and service rates are found in [49].
The analysis of networks of queues is also a vast subject, in particular the so-
called product-form networks, which can be analysed very efficiently. The first
product form networks were analysed by Jackson [91] in 1957 and Gordon/Newell
[87] in 1967. Before that the output process of a single queue, for example the
M/M/m queue described above, was found to have the identical Poisson de-
parture process as the input process. In other words, the inter-departure times
are exponentially distributed with the same parameter λ as the input Poisson
process.[48, 102, 151].
Similar results hold for all M/M-queues with work-conserving1 scheduling dis-
ciplines which are independent of the service time requirements [102]. A feed-
forward network of such queues is easy to analyse since the output process is
Poisson with the same parameter as the input process. Each queue can be con-
sidered in isolation and the steady-state distribution of the overall network is
given by the product of the steady-state distributions of each individual queue.
Unfortunately the above is not true for a network of queues with feedback since
the output process is no longer Poisson, as successive inter-departure times are no
longer identically distributed because of the (partial) dependencies of the input
and output processes. In open queueing networks one can show that the output
from the network is still Poisson, but that in closed networks none of the flows
between queues is Poisson [102].
Surprisingly, one can nevertheless solve such networks of queues by analysing
each queue in isolation. In a seminal paper published in 1975 by F. Baskett, K.
M. Chandy, R. R. Muntz and F. G. Palacios, established a product form solution
for queueing networks, called BCMP-networks, which have a mixture of four
different type of stations [15]. Based on the product-form property very efficient
1
A scheduling discipline is work-conserving when no overhead or loss of work is incurred by
scheduling.
73
PETRI NETS
77
5 Place-Transition Nets
Petri nets were invented in 1962 by Carl Adam Petri [133] and are a formalism
for the description of concurrency and synchronisation inherent in modern dis-
tributed systems. Since first described by Petri, many variations of his original
nets have been defined such as Coloured Petri nets, which we shall discuss in
Ch. 6. In this chapter we shall define Place-Transition nets, also referred to as
“ordinary” Petri nets. Throughout this book we shall use the term “Petri nets” to
refer to any type of net which is derived from that originally defined by Petri.
Apart from modelling and formally analysing modern distributed systems, Petri
nets also provide a convenient graphical representation of the system being mod-
elled. The graphical representation of a Place-Transition net comprises the fol-
lowing components:
tokens, drawn by black dots. Tokens represent the specific value of the condition
or object, e.g., the value of a program variable.
Place-Transition nets are bipartite graphs, i.e. we may only connect a place to a
transition or vice versa, but we must not connect two places or transitions. This
also would not make sense, if we keep the interpretation of the components of a
Place-Transition net in mind.
Consider Fig. 5.1. p1 is a place marked with one token and is connected to tran-
sition t1 . Because of the direction of the arc connecting p1 and t1 we will call
p1 an input place of t1 and t1 accordingly an output transition of p1 . Places and
transitions might have several input/output elements. E.g., place p2 has three in-
put transitions: t1 , t3 , t5 , while t4 has two output places: p4 and p5 . The latter is
marked with two tokens.
p6 and t7 are not interconnected to any other element. Such elements will be
called isolated places or transitions respectively. As expected, isolated elements
of a Place-Transition net do not influence the rest of the net and therefore we can
neglect them. Until now we have only described the static structure of a Petri net.
Its dynamic behaviour or the modification of the condition/object values, can be
expressed via the following rules:
78 5 Place-Transition Nets
t1
p1
p4
t3
p2 t5
t4
p5
p3 t2
t6
p6 t7
Enabling of a transition:
A transition is enabled if all its input places are marked at least with one to-
ken. For example transitions t1 and t4 in the Place-Transition net of Fig. 5.1
are enabled.
t1
p1
p4
t3
p2 t5
t4
p5
p3 t2
t6
p6 t7
Sender:
while true do
begin
prepare message
send message to receiver via channel1
read acknowledgement of receiver on channel2
interpret acknowledgement
end
Receiver:
while true do
begin
read message from sender on channel1
interpret message
prepare acknowledgement
send acknowledgement to sender via channel2
end
Given this description of our system, we have to prove that it will operate as
intended. Particularly, this means that neither sender nor receiver send a mes-
sage/acknowledgement via the corresponding channel before a previous mes-
sage/acknowledgement has been read by the communication partner.
How can a Place-Transition net help us to prove that our system is correct? All
the above statements describe activities of the sender and receiver. Activities can
be modelled by transitions. So with each statement we associate a transition as
follows:
80 5 Place-Transition Nets
Sender:
while true do
begin
t1 prepare message
t2 send message to receiver via channel1
t3 read acknowledgement of receiver on channel2
t4 interpret acknowledgement
end
Receiver:
while true do
begin
t5 read message from sender on channel1
t6 interpret message
t7 prepare acknowledgement
t8 send acknowledgement to sender via channel2
end
Which objects do these transitions modify? There are several objects involved,
e.g., the message, the acknowledgement, the state of a channel, the states of
sender and receiver. Since we are not concerned with the content of the mes-
sages, we will neglect such information, thus, e.g., the internal state of a chan-
nel is given by the number of messages/acknowledgements currently present.
The Place-Transition net illustrated in Fig. 5.3 represents our system, where the
places p1 to p8 represent the internal state of sender and receiver respectively.
p9 represents the channel from sender to receiver and p10 the channel in reverse
direction. Using this Place-Transition net model, we can get a better insight into
the functionality of our system.
So far we presented an informal introduction of Petri nets. In the following sec-
tions we will introduce Place-Transition nets formally.
1. Name the input and output places of t5 , t6 , t7 and the input and output
transitions of p3 , p4 , p5 , p6 .
5. Count the number of all tokens in the net before and after firing of t4 . This
illustrates, that a transition does not merely move tokens around, but really
changes the value of objects by destroying and creating tokens.
5.1 Structure of Place-Transition Nets 81
p1
p5
t1 t5
p2 p6
p9
t6
t2
p3 p7
t3
t7
p4 p8
p10
t4
t8
Exercise 5.2 Play the token game for the Place-Transition net of Fig. 5.3 by
putting tokens onto the places and “move” them around according to the en-
abling and firing rules given before. Is our implementation correct?
2 p2
3
p1
t1
t3
t5
t2
2
p4
2
t4 p3
t6
• P ∩ T = ∅,
Example 5.1 The formal definition of the Place-Transition net depicted in Fig. 5.4
is given as follows:
P N = (P,T,I − ,I + ,M0 ) where
• I − (p1 ,t1 ) = 2, I − (p2 ,t2 ) = 1, I − (p2 ,t3 ) = 1, I − (p3 ,t4 ) = 2, I − (p4 ,t5 ) =
1, I − (p4 ,t6 ) = 1. All other values of function I − are zero.
• I + (p2 ,t1 ) = 3, I + (p4 ,t2 ) = 1, I + (p3 ,t3 ) = 2, I + (p4 ,t4 ) = 1, I + (p1 ,t5 ) =
1, I + (p4 ,t6 ) = 1. All other values of function I + are zero.
1 if p = p1
• M0 (p) = 2 if p = p2 ∀p ∈ P.
0 otherwise
The input and output elements of a place and a transition can be defined formally
as follows.
The sets •p, • t and p • ,t• are also respectively referred to as the preset and
postset of the place p and transition t respectively.
For the Place-Transition net of Fig. 5.4 we get, e.g., •p1 = {t5 },
p2 • = {t2 ,t3 }, • {t2 ,t3 } = {p2 },{p2 ,t2 ,p4 }• = {t2 ,t3 ,t5 ,t6 ,p4 }.
A Place-Transition net can also be viewed as a usual directed graph and a flow
relation defined as follows:
(a) (x,x) ∈ F ∗
(b) (x,y) ∈ F =⇒ (x,y) ∈ F ∗
(c) (x,y) ∈ F ∗ and (y,z) ∈ F ∗ =⇒ (x,z) ∈ F ∗
For the Place-Transition net of Fig. 5.4 the following, e.g., holds:
Exercise 5.3 Give the formal definition of the Place-Transition net given in Fig. 5.1.
Exercise 5.4 Determine the following quantities for the Place-Transition net of
Fig. 5.1.
2. •{t1 ,t2 ,t3 }, •{t1 ,t2 ,t6 }, •{t1 ,t2 ,t7 }, •{t1 ,t2 ,t4 }, •{p2 ,p3 },
{p2 ,p3 }•, {p2 ,p3 ,p5 }•, {p2 ,p6 }•, {t2 ,t3 }•, {t4 ,t3 }•, •{t1 ,p2 }.
3. •T , T •, •P , P •, •(T ∪ P ), (T ∪ P )•.
Exercise 5.5 Prove that the Place-Transition nets of Fig. 5.1 and 5.4 are strongly
or weakly connected.
In the last section we defined the structure of a Place-Transition net. The dynamic
behaviour is determined by enabling and firing of transitions as given as follows.
The initial marking is the starting point of the dynamic behaviour of the Place-
Transition net and is therefore singled out and denoted M0 . Since transitions are
only enabled if their input places are marked with at least as many tokens as
specified by the backward incidence function (cf. Def. 5.4(3)), we are especially
interested in marked (sub)sets of places.
The expression M 0 (p) = M (p) − I − (p,t) + I + (p,t) in Def. 5.4(4) corresponds
to our intuitive understanding of the firing process. If transition t fires, it destroys
I − (p,t) tokens at place p and creates additional I + (p,t) tokens on p. Note that the
place p is the same in both expressions I − (p,t) and I + (p,t). In most cases one
of these expressions is 0, but there might exist some cases in which a transition
can destroy and create tokens at the same place. For instance, if transition t6 in
Fig. 5.4 fires at some marking in which it is enabled, the number of tokens on
place p4 remains unchanged. Such connection structures are called self-loops.
Exercise 5.6 Use the Place-Transition net in Fig 5.4 for the following exercises.
1. Determine all sets of places marked at M0 .
2. Prove or disprove:
M0 [t1 > ,M0 [t2 > ,M0 [t4 > ,M0 [t6 > ,M0 [t2 t5 t3 t4 > ,
M0 [t3 t4 t5 t1 > ,M0 [ε >.
• M0 [t2 > M ,
• M0 [t3 t4 > M ,
• M0 [t2 t5 t1 > M ,
• M0 [t2 t6 t6 t6 t5 t1 > M ,
• M0 [ε > M .
86 5 Place-Transition Nets
4. Prove or disprove:
M0 M0
M M
M0
M0
I1 I2
I0
t2
t1 p3 p4
p2
t4
t1 p3
p2
p1 t3 t4
t2 p4
Figure 5.7 Further Place-Transition net not being live and bounded
From this reachability set it is easy to derive that the Place-Transition net is
bounded and in fact safe (M (p) ≤ 1,∀p ∈ P,M ∈ R(P N )) and that M is a
home state ∀M ∈ R(P N ). Furthermore the Place-Transition net is live.
Liveness and boundedness impose a restriction on the structure of a Place-Transition
net. Suppose transition t1 of the Place-Transition net in Fig. 5.1 fires emptying
place p1 . Since place p1 has no input transitions it will remain empty in all fur-
ther reachable markings, implying that t1 is not live. In the same Place-Transition
net, transition t6 has no input places. Thus it is always enabled, so that no upper
bound for the number of tokens can be found for place p5 . This example shows
that if the Petri net has source (or sink) elements, it can not be both live and
bounded. The reader should convince himself that also sink elements prevent
live- and boundedness.
5.3 Properties of Place-Transition Nets 89
Figures 5.6 and 5.7 illustrate that liveness and boundedness can not hold both
even in weakly, but not strongly, connected Place-Transition nets. Considering
Fig. 5.6 we can find two strongly connected subnets which are connected via the
arc from t1 to p3 . If we assume that the left subnet is live, then the right subnet is
obviously not bounded. On the other hand, if we assume that the right subnet is
bounded, the left subnet can not be live. So in summary the net of Fig. 5.6 can not
be both live and bounded for any initial marking. The same can be concluded for
the Place-Transition net of Fig. 5.7 following similar arguments. As the reader
might expect the following holds.
• PN is bounded.
• PN is live.
2. Consider the Place-Transition net in Fig. 5.4 and change the arc weight of
the arc leading from t1 to p2 to 2, i.e. define I + (p2 ,t1 ) = 2.
Prove or disprove the following conjectures:
• PN is bounded.
• PN is live.
• M0 is a home state of PN.
Exercise 5.8
• Disprove:
PN strongly connected =⇒ PN is live and bounded.
90 5 Place-Transition Nets
The reachability set of a Petri net, cf. Ex. 5.3 on page 87, is often drawn as a tree,
where the nodes of the tree are markings of the Place-Transition net. Two nodes
M and M 0 are connected with an directed arc iff M [t > M 0 for some t ∈ T .
This arc is also labelled with t ∈ T .
The reachability tree can be generated starting with the initial marking of the
Place-Transition net and adding directly reachable markings as leaves. Next we
proceed with these new markings and determine their directly reachable mark-
ings. These markings now become the new leaves of the already generated part
of the reachability tree etc. If we reach a marking previously explored we need
not continue building the tree any further at that node.
Example 5.4 The reachability tree of the net in Fig. 5.8 is shown in Fig. 5.9.
t1 p2 t3
p1
t2 p3 t4
(1,0,0)
t1 t2
(0,1,0) (0,0,1)
t3 t4
(1,0,0) (1,0,0)
t3 t4
(1,0,0)
t1 t2
(0,1,0) (0,0,1)
t1
p1 2
p2
t2
t4
p2
t2
t3
p1
t5
p3
t1
p4
The reason for setting x0 (p) = ω is that x0 can be reached from y by a firing
sequence σ ∈ T ∗ , i.e. y[σ > x0 . Because x0 ≥ y x0 [σ > also holds, leading to a
marking x00 with x0 [σ > x00 where x00 (p) > x0 (p) > y(p). This shows that place
p is unbounded, which justifies the use of ω. The coverability tree coincides with
the “normal” reachability tree if the net is bounded.
Example 5.5 The coverability tree of the Place-Transition net of Fig. 5.12 is
given in Fig. 5.13. Note that the algorithm does not necessarily lead to a unique
coverability tree for a given Place-Transition net, because of the arbitrary choice
of x ∈ X.
5.4 Analysis of Place-Transition Nets 93
(1,0,0,0)
t1 t2
(0,0,1,1) (0,1,0,0)
t3 t5 t4
t4
(1,0,0,ω )
t1 t2
(0,0,1,ω ) (0,1,0,ω )
t5 t3
(1,0,0,ω ) (0,1,0,ω )
t4
(1,0,0,ω )
The coverability tree can be used for the analysis of Place-Transition nets. The
following theorem is obviously true.
Theorem 5.2 PN is bounded iff no node in its coverability tree contains the sym-
bol ω.
In the case of bounded Place-Transition nets, liveness can also be checked by
investigating the coverability tree. The idea is to transform the coverability tree
into the corresponding coverability graph, similar to the transformation of the
reachability tree into a reachability graph.
Theorem 5.3 Let PN be bounded. PN is live iff all transitions appear as a label
in all terminal strongly connected components of the coverability graph.
A strongly connected component is terminal if no arcs leave that component. In
terms of Markov chains such a subset of markings (states) is called closed (cf.
Def. 2.4).
Definition 5.7 R̃ ⊆ R(P N ) is a terminal strongly connected component of
R(P N,M0 ) iff ∀M ∈ R̃,M 0 ∈ R(P N ) :
(M →∗ M 0 =⇒ M 0 →∗ M and M 0 ∈ R̃).
94 5 Place-Transition Nets
p1 t1 p2 t2
3 2
(1,0)
t1
p1 t1 p2 t2 (1,ω)
3
t1 t2
(1,ω) (1,ω)
Note that, checking the existence of home states is also straightforward for bounded
nets.
Exercise 5.10
1. Use algorithm 5.1 to determine the coverability tree of the Place-Transition
nets of Fig. 5.1 and 5.4.
2. Determine the coverability trees of the Place-Transition nets given in Fig. 5.16
([16]).
5.4 Analysis of Place-Transition Nets 95
t1
p1 p2
10
1010 tokens t2
2 2 2 2
t1 p1 t2 t1 p1 t2
Figure 5.16 Two Place-Transition nets with the same coverability tree
Exercise 5.11 Show that theorem 5.3 does not hold for unbounded nets?
Enabling and firing of a transition can now be expressed in terms of these inci-
dence matrices. A transition ti ∈ T is enabled in a marking M , iff M ≥ C − ei ,
1 ,0, . . . ,0)T .
where ei is the i-th unit vector (0, . . . ,0, |{z}
i
If an enabled transition ti ∈ T fires in marking M the successor marking M 0 is
given by
96 5 Place-Transition Nets
s t
p1 p4
t1 t3
n
p2 n p5
p3 n
t2 t4
M 0 = M + Cei (5.1)
Eq. (5.1) states that the firing process can be described by adding the vector
Cei to the given marking M yielding the successor marking M 0 . Cei is the i-th
column of the incidence matrix C specifying the influence of transition ti ∈ T
on its input and output places. Since markings can be calculated in that way by
the addition of vectors, Place-Transition nets can be viewed as vector addition
systems with the restriction that only enabled transitions may fire.
Consider σ = tk1 . . . tkj ,j ∈ N0 a firing sequence with
M0 [tk1 > . . . Mj−1 [tkj > Mj . Marking Mj can be calculated as follows. For
each reachable marking the following equation holds:
Mi = Mi−1 + Ceki , i = 1, . . . ,j
Substituting the right hand side of the equation for i = r into the equation for
i = r + 1 yields
j
X
Mj = M0 + C eki
i=1
−1 +1 0 0
+1 −1 0 0
C= −1 +1 −n +n
0 0 −1 +1
0 0 +1 −1
At the initial marking t1 is enabled and the resultant marking after firing t1 is
given by
s −1 s−1
1
0 1 1
0
M 0 = M0 + C
= n + −1 = n−1
0
t 0 t
0
0 0 0
Theorem 5.5
∀M ∈ R(P N,M0 ) : ∃f ∈ Nm
0 : M = M0 + Cf (5.2)
For verifying invariant properties of all reachable markings we can exploit Th. 5.5
as follows. If v ∈ Zn is2 multiplied with equation 5.2 we get
M (p1 ) + M (p2 ) = s
M (p4 ) + M (p5 ) = t
M (p2 ) + M (p3 ) + nM (p5 ) = n,∀M ∈ R(P N ).
The first two equations simply express that the number of readers and writers is
constant. The last equation allows the following conclusions:
∀M ∈ R(P N ) we have
a) M (p2 ) ≥ 1 =⇒ M (p5 ) = 0
b) M (p5 ) ≥ 1 =⇒ M (p2 ) = 0
c) M (p5 ) ≤ 1
P-invariants are sometimes called S-invariants, because some authors denote the
set of places by S after the German word “Stellen” (≡ “Places”).
P-invariants can be employed for checking the boundedness property.
Definition 5.10 PN is covered by positive P-invariants iff
∀pi ∈ P : ∃ P-invariant v ∈ Zn with v ≥ 0 and vi > 0.
Theorem 5.8 PN is covered by positive P-invariants =⇒ PN is bounded.
Proof. PN is covered by positive P-invariants =⇒ ∃ P-invariant v ∈ Nn0 : vi >
0,∀i ∈ {1, . . . ,n}. With v T M = v T M0 = const.,∀M ∈ R(P N,M0 ), we get
vi M (pi ) ≤ v T M0 ,∀pi ∈ P , since M (p) ≥ 0,∀M ∈ R(P N,M0 ).
T
vi > 0 yields M (pi ) ≤ v vM i
0
,∀pi ∈ P proving that the net is bounded. t
u
If the net is not covered by positive P-invariants, but there are some positive
P-invariants, then at least these covered places are bounded.
Corollary 5.1 If there exists a P-invariant v ∈ Zn : v ≥ 0,vi > 0 then pi is
bounded, i.e. ∃k ∈ N : ∀M ∈ R(P N,M0 ) : M (pi ) ≤ k.
Proof. The proof follows that of Th. 5.8. t
u
Exercise 5.12 Determine the incidence matrices of the Place-Transition net given
in Fig. 5.4.
From these prove if M0 ≥ C − e1 and M0 ≥ C − e2 holds. What exactly does that
mean?
Calculate: M1 = M0 + Ce2 and M2 = M1 + Ce5
The analysis of net classes has been a topic for Petri net researchers since the
0 70s. In this section we give an overview on the most important results, paying
Fig. 5.19 provides a description of these different classes of nets. For these net
classes the following relations hold (cf. Fig. 5.18):
Marked Graphs ⊂ FC-nets, State Machines ⊂ FC-nets ⊂ EFC-nets ⊂ ESPL-nets
and FC-nets ⊂ SPL-nets ⊂ ESPL-nets.
We first of all investigate State Machines, which can be analysed very easily.
All transitions of a State Machine have at most one input and one output place.
Since we are interested in live and bounded nets, Th. 5.1 tells us that we only
have to consider strongly connected State Machines. Fig. 5.20 depicts such a
State Machine.
If a State Machine is strongly connected every transition has exactly one input
and one output place. A token in a strongly connected State Machine can be
“moved” from one place to every other place of the net, since this token directly
“enables” all output transitions of the place it is currently located. This observa-
tion yields the following characterisation of liveness.
Theorem 5.10 (Liveness in State Machines [38]) Let PN be a State Machine
with | • t| = |t • | = 1,∀t ∈ T .
PN is live iff PN is strongly connected and M0 6= 0.
3
|x| denotes the number of elements in the set x.
102 5 Place-Transition Nets
ESPL
EFC
FC
SPL
MG SM
The former argument for liveness also implies, that a token can always return to
a place it started from. So we can always reach the initial marking.
Th. 5.12 directly implies that all reachable markings of a live and bounded State
Machine are home states.
We have seen that State Machines are very easy to analyse. Let us investigate the
next net class.
State
Machines
Marked
Graphs
FC−nets
EFC−nets
SPL−nets
ESPL−nets
t1 p2 t3
p1
t2 p3 t4
p1 p3 p5 p7
t5
t1 t2 t3
t4
p2 p4 p6
A simple cycle is a cycle where each element appears once, except for the first
and last element. The Marked Graph of Fig. 5.21, e.g., contains amongst others
the following simple cycles:
p1 ,t1 ,p2 ,t2 ,p1 and p5 ,t3 ,p6 ,t4 ,p7 ,t5 ,p5 .
The following result should now be no surprise for us.
5.4 Analysis of Place-Transition Nets 105
Similar to our discussion concerning State Machines Fig. 5.21 shows that M0 is
a home state. After firing of every transition M0 is reached again. In fact Marked
Graphs unveil the same property as State Machines, i.e.
Theorem 5.15 (Home states in Marked Graphs [125]) If PN is a live and bounded
Marked Graph then M0 is a home state.
So far we have seen that the two net classes, State Machines and Marked Graphs,
are very simple to analyse. In the next subsection we draw attention to EFC-nets,
since they are a superset of FC-nets and we can establish some useful analysis
techniques for this “extended” class directly.
Analysis of EFC-nets
t0
Figure 5.22 Possible connections between transitions and their input places in EFC-
nets
t1 p2
t3
p1
t2 p3
Definition 5.16
1. P 0 ⊆ P,P 0 6= ∅ is a deadlock4 iff •P 0 ⊆ P 0 •.
2. P 0 ⊆ P,P 0 6= ∅ is a trap iff P 0 • ⊆ •P 0 .
If a deadlock empties, this subset will remain empty. On the other hand once a
trap is marked, it will remain marked.
Consider the FC-net in Fig. 5.23, which has the deadlocks {p1 ,p2 },
{p1 ,p3 } and {p1 ,p2 ,p3 }, which is also the only trap of the net. At the initial
marking all deadlocks are marked. Firing t1 now empties the deadlock {p1 ,p3 }
and thus this deadlock will remain empty. Since {p1 ,p3 } is empty all transitions
in {p1 ,p3 }• are not enabled and are therefore not live. An analogous argument
holds for the deadlock {p1 ,p2 } if t2 fires first at the initial marking.
A natural idea is to avoid such situations by ensuring that a deadlock can never
be emptied. This is, e.g., the case if the deadlock contains a marked trap, because
a trap remains marked in all further reachable markings. For EFC-nets this idea
yields a characterising condition for liveness:
Theorem 5.16 (Liveness in EFC-nets [34, 38]) An EFC-net is live iff every dead-
lock contains a marked trap at M0 .
Proof.
We will only prove sufficiency.
Assume the EFC-net is not live.
Then ∃t ∈ T : M ∈ R(P N,M0 ) : ∀M 0 ∈ R(P N,M ) : ¬M 0 [t >, i.e. we
can find a transition t and a marking M , such that t is not enabled in all further
reachable markings. The salient property of EFC-nets is now that there must be
a fixed place which is and remains empty, i.e.
4
Other authors refer to deadlocks as siphons or tubes.
5.4 Analysis of Place-Transition Nets 107
1. P N 0 is a subnet of P N iff
P 0 ⊆ P,T 0 ⊆ T and
I 0− (p,t) = I − (p,t),I 0+ (p,t) = I + (p,t), ∀p ∈ P 0 ,t ∈ T 0 , and
M00 (p) = M0 (p),∀p ∈ P .
Definition 5.18
1. P N 0 = (P 0 ,T 0 ,I 0− ,I 0+ ,M00 ) is a P-component5 of
P N = (P,T,I − ,I + ,M0 ) iff P N 0 is a subnet of P N generated by P 0 ⊆ P
and ∀t0 ∈ T 0 : | • t0 ∩ P 0 | ≤ 1 and |t0 • ∩P 0 | ≤ 1, where the •-notation is
with respect to P N 0 .
Figure 5.24 Live and bounded Place-Transition net with no home states
Research efforts to determine the existence of home states for EFC-nets have
only been undertaken in the recent past. Some authors conjectured that all bounded
and live Place-Transition nets have home states, e.g. [124]. This conjecture was
proven to be false in 1984, where E. Best and K. Voss [39] published a bounded
and live ESPL-net without any home states (cf. Fig. 5.24). Since 1989 it is known
that the above-mentioned conjecture holds for EFC-nets.
Theorem 5.18 (Home states in EFC-nets [36, 178]) If PN is a live and bounded
EFC-net then its reachability set contains home states.
Furthermore we can characterise all home states of a live and bounded EFC-net
as follows.
Th. 5.20 is important for analysing Stochastic Petri nets, discussed in Ch. 8, by
means of simulating the net. Once each transition has fired, all further reached
markings are recurrent. These are exactly the states (markings) we are inter-
ested in when analysing the steady state behaviour of the associated Markov
process (cf. Ch. 8). Hence EFC-nets are a convenient class of Place-Transition
nets, because there are characterising conditions for boundedness and liveness
and furthermore the existence of home states is guaranteed for bounded and live
EFC-nets.
For Place-Transition nets with more complex structures such theorems are not
known up to now. E.g. it is known that the dt-property is sufficient for ensuring
liveness in ESPL-nets, but not necessary (see [38]).
Another analysis technique which has evolved in the last decade to analyse also
more complex Place-Transition nets efficiently is the subject of the next section.
Exercise 5.15 Prove the relations between the net classes as given in Fig. 5.18.
Exercise 5.16 Let Q1 ,Q2 ⊆ P . Prove the following conjectures:
1. Q1 ,Q2 are deadlocks =⇒ Q1 ∪ Q2 is a deadlock.
2. Q1 ,Q2 are traps =⇒ Q1 ∪ Q2 is a trap.
Exercise 5.17 Prove or disprove:
1. If P N = (P,T,I − ,I + ,M0 ) is a live EFC-net then
P N = (P,T,I − ,I + ,M ) is live ∀M ≥ M0 .
2. If P N = (P,T,I − ,I + ,M0 ) is a live Place-Transition net then P N =
(P,T,I − ,I + ,M ) is live ∀M ≥ M0 .
Exercise 5.18 Show that the Place-Transition net of Fig. 5.24 is bounded and
live, but has no home states.
Exercise 5.19 Prove or disprove:
1. If PN is a live and bounded EFC-net then M0 is a home state.
2. Let PN be a live and bounded Place-Transition net. Then
M is a home state =⇒ M marks all traps of PN.
Exercise 5.20 Prove that if PN is a live and bounded Marked Graph or a live
and bounded State Machine then M0 marks all traps of PN.
6
#(σ,t) denotes the number of occurrences of t ∈ T in σ ∈ T ∗ .
110 5 Place-Transition Nets
p1 t p2
p0
Reduction analysis deals with the reduction of the Place-Transition net by re-
placing subnets of the net by less complex subnets such that several properties
remain invariant. Since the reduced Place-Transition net is less complex than the
original net, once sufficiently reduced, the analysis can be performed, e.g., on
the coverability/reachability tree of the reduced Place-Transition net. A simple
example of a reduction is shown in Fig. 5.25.
This particular reduction rule specifies that if two empty places (p1 ,p2 ) and one
transition (t) with | • p1 | = |p1 • | = | • p2 | = |p2 • | = | • t| = |t • | = 1 and
p1 • 3 t ∈ •p2 are given, these three elements may be reduced to one empty place
p0 with •p0 = •p1 and p0 • = p2 •. It is obvious that properties like boundedness
and liveness are not affected by this reduction (transformation) of the net.
Several authors have independently developed several sets of such reduction
rules, e.g. [31, 32, 62, 125, 163]. We only describe one example of a typical
reduction rule. The interested reader is referred to the literature.
This transformation from [31] removes redundant places by removing arcs from
transitions to the place. If all arcs are removed then the place can be removed
from the Place-Transition net. A place is redundant “when its marking is al-
ways sufficient for allowing firings of transitions connected to it” [31]. This is
expressed by the following definition.
Definition 5.19
Let P N = (P,T,I − ,I + ,M0 ) be a Place-Transition net. A place p ∈ P is re-
dundant iff there exists a subset Q ⊆ P \ {p} (possibly empty) and a weighting
function V : Q ∪ {p} 7→ N such that the following conditions hold:
t1
p1
t2 p3
p2
t3
i.e. firing of a transition removes less or equal tokens on p than from the
places in Q with respect to the weight function.
3. ∀t ∈ T : ∃ct ∈ N0 :
V (p)(I + − I − )(p,t) − q∈Q V (q)(I + − I − )(q,t) = ct ,
P
i.e. with respect to the weight function there are a greater or equal number
of tokens placed onto p than on the places of Q after firing of t.
After having identified the redundant place the transformation can be performed
by removing all edges in •p and p•. For every transition, t ∈ T , an edge with
weight ct is added from t to p. If all the weights ct are zero then the place p
is isolated and can be removed. Simplification of redundant places preserves
properties like boundedness, liveness and the existence of home states (cf. [31]).
Example 5.8 Figure 5.26 shows a portion of a Petri net with a redundant place
p3 . Figure 5.27 shows the same portion of the Place-Transition net after the
transformation has been performed. In this example we have Q = {p1 ,p2 }; V (p) =
1,∀p ∈ Q ∪ {p3 }; b = 0; ct = 0,∀t ∈ T, and the place p3 has been removed.
t1
p1
t2
p2
t3
Figure 5.27 Portion of the Place-Transition net after removing the redundant place
Reduction and synthesis techniques are analysis techniques which have not been
examined systematically in the literature. Several sets of rules have been pub-
lished, but it is, e.g., not known how powerful all these published rules are.
E.g. are all life and bounded simple-nets completely reducible to an atomic net
(P N = ({p},{t},I − ,I + ,M0 ) where I − (p,t) = I + (p,t) = 1 and M0 (p) > 0)?
Only for FC-nets this and similar questions have been considered, see e.g. [69,
70, 72]. Furthermore the effort of testing the application conditions is not always
considered in the literature. In [62] the computational complexity of several re-
duction and synthesis rules is examined.
This introduction covers only a part of current Petri net theory. We have con-
centrated on those properties of a Petri net which are also significant for the
performance analysis of the corresponding Stochastic Petri net.
Other properties which are of interest are e.g.
1. fairness, i.e.
∀t ∈ T : ∃kt ∈ N : ∀t0 ∈ T,∀σ ∈ T ∗ : M0 [σ >: #(σ,t0 ) − #(σ,t) ≤ kt ,
where #(σ,t) denotes the number of occurrences of t ∈ T in σ ∈ T ∗ .
Fairness means that each transition will eventually fire and can not be ex-
cluded from firing. The sender/receiver system given in Fig. 5.3 is fair,
whereas the Place-Transition net in Fig. 5.8 is not fair, since t2 is not in-
cluded in the infinite firing sequence (t1 t3 )+ .
5.5 Further Remarks on Petri Nets 113
Exercise 5.21 (cf. [146]) This exercise is dedicated to some real life problems in
modelling computer systems. It concerns the ’mutual exclusion’ problem, which
occurs if several parallel processes are sharing common resources. If one pro-
cess is, e.g., changing the internal state of a resource (consider writing a file),
then for all other processes access has to be denied, in order to keep the state of
the resource consistent.
A very common solution is to restrict simultaneous access to a resource by mod-
ifying the source code of each process and insert special lines of code.
E.g. a control variable is introduced, which represents the access status of a re-
source (free or occupied) and each process has to check this control variable
before using the resource. The section of code where the resource is used is re-
ferred to as the “critical section”. The crux of all such solutions is the atomicity
or non-atomicity of certain statements. In this exercise we will denote atomic
statements (operations) in pointed brackets, e.g. <x := y; >.
In the following, four algorithms are presented in pseudo-code, and you are
asked to prove or disprove the correctness of these algorithms using Petri nets.
114 5 Place-Transition Nets
For simplicity we only look at two processes P0 and P1 in the first three algo-
rithms and assume that the presented part of the code of each process is executed
infinitely often.
1. Algorithm:
Control variables:
var flag : array [0..1] of boolean;
turn : 0..1;
Initial value of turn is 0 and all flags are false
<flag[i] := true;>
while <flag[j]> do /* j = i + 1 mod 2 */
if <turn = j> then
begin
<flag[i] := false;>
while <turn = j> do <nothing> enddo;
<flag[i] := true; >
endif;
enddo;
critical section;
<turn := j>;
<flag[i] := false;>
2. Algorithm:
Control variables:
var flag : array [0..1] of boolean;
turn : 0..1;
Initial value of turn is 0 and all flags are false
<flag[i] := true;>
while <turn 6= i> do
while <flag[j]> do <nothing> enddo; /* j = i + 1 mod 2 */
<turn := i;>
enddo;
critical section;
<flag[i] := false;>
3. Algorithm:
This algorithm uses a binary semaphore sem. P(sem) decreases the value
5.5 Further Remarks on Petri Nets 115
4. Algorithm:
In this problem we have 5 processes P0 , . . . ,P4 sharing common resources.
The restriction we have is that if process Pi is in its critical section, then
(Pi−1 mod 5) and (Pi+1 mod 5) are both not able to be or to enter their
own critical section.
This algorithm uses an array of binary semaphores given by
Control variables:
var sem[0..4] : binary semaphore;
Initial value of all semaphores is 1
You may have noticed that the graphical representation of Petri nets becomes
fairly complex if we try to model real life problems. The main reason is that we
only have one type of token. In our mutual exclusion example (see Exercise 5.21,
page 113) we had to represent each process by a separate subnet, although their
respective behaviour is identical. Furthermore we had to represent all values of a
variable by different places.
In this chapter we introduce Coloured Petri nets (CPNs) in which a type called
the colour is attached to a token. CPNs were first defined by K. Jensen (cf. [93]).
There are several other Petri net models which distinguishes between individual
tokens, e.g. [79, 99, 148], but since Queueing Petri nets (QPNs) [18], discussed
in Ch. 10, are based upon CPNs, we need to know only about the latter.
Fig 6.1 illustrates a part of a CPN in which place p1 is marked by a token of
colour a and p2 is marked by two tokens, one of colour b and one of colour c.
How can we describe the firing of transition t? E.g., we may require transition t
to be enabled in the marking shown and that it destroys the tokens a and b and
creates a token of colour d on p3 . Another possible behaviour of t may be that it
destroys tokens a and c and creates a token of colour e on p3 . These two different
ways in which t might fire are referred to as the different modes in which t fires.
In CPNs these modes of a transition are also described by colours, but now at-
tached to the transition. Let us denote the set consisting of all these colours by
C(t). So we say, e.g., that transition t fires with respect to colour x (characteris-
ing a certain “firing mode” of t) or with respect to colour y. With that in mind the
incidence functions of a CPN can be defined similar to the incidence functions
of a Place-Transition net (see Def. 5.1 on page 81). E.g., if transition t fires with
respect to colour x, tokens a and b will be destroyed and one token of colour d
will be created on p3 .
Before defining CPNs formally we need to know about multi-sets. Informally a
p1 a
t
p3
b
p2 c
a
a c
b b d
b d
multi-set is the same as a set, except that individual elements may occur more
than once and for this reason they are sometimes also called bags. For instance
if we have a set {a,b,c} and add element b to the set we still have only the set
{a,b,c}. However, if we added b to the multi-set {a,b,c} we have the new multi-
set {a,b,b,c} with two occurrences of the element b.
Refer to Fig. 6.2. The definition of the multi-set m in that figure is given by
if s ∈ {a,d}
2,
m(s) = 3, if s = b
1, if s = c
We denote the set of all finite multi-sets over S by SM S and define addition of
multi-sets and multiplication with ordinary numbers as follows:
Definition 6.2 ∀m1 ,m2 ∈ SM S and r ∈ R 1 define
(m1 + m2 )(s) := m1 (s) + m2 (s)
(rm1 )(s) := rm1 (s)
Now, remember that the incidence functions of a Place-Transition net reflect the
connection between places and transitions. That is, I − (p,t) describes the number
of tokens which are destroyed on place p in case of t fires. The corresponding
backward incidence function of a CPN is now an element of
I − (p,t) ∈ [C(t) 7→ C(p)M S ].
The forward incidence function I + (p,t) is obviously defined similarly.
Let us return to our example. Since t can fire in two different modes, the colour
set should consist of (at least) two elements, e.g. C(t) = {x,y}. The (backward)
incidence function I − (p1 ,t) ∈ [C(t) 7→ C(p1 )M S ] is given by I − (p1 ,t)(x) =
{a}, which is a multi-set, and I − (p1 ,t)(x)(a) = 1 denotes the number of ele-
ments of colour a in that multi-set.
We define a CPN formally as follows:
1
R denotes the set of real numbers.
118 6 Coloured Petri Nets
• P ∩ T = ∅,
The preset and postset of a transition and place, respectively, of a CPN are de-
fined analogous to that for Place-Transition nets on page 83:
Definition 6.4
The preset •(p,c) of p ∈ P and c ∈ C(p) is
•(p,c) := {(t,c0 )|t ∈ T,c0 ∈ C(t) : I + (p,t)(c0 )(c) 6= 0}.
The preset •(t,c0 ) of t ∈ T and c0 ∈ C(t) is
•(t,c0 ) := {(p,c)|p ∈ P,c ∈ C(p) : I − (p,t)(c0 )(c) 6= 0}.
The postset (p,c)• of p ∈ P and c ∈ C(p) is
(p,c)• := {(t,c0 )|t ∈ T,c0 ∈ C(t) : I − (p,t)(c0 )(c) 6= 0}.
The postset (t,c0 )• of t ∈ T and c0 ∈ C(t) is
(t,c0 )• := {(p,c)|p ∈ P,c ∈ C(p) : I + (p,t)(c0 )(c) 6= 0}.
Next we can define the behaviour of a CPN, again very much the same way as
for Place-Transition nets.
Not surprisingly the various properties we defined for Place-Transition nets can
also be defined for CPNs where we now denote the reachability set by R(CP N ) :=
R(CP N,M0 ) := {M |M0 →∗ M } where →∗ is the reflexive and transitive clo-
sure of →.
(D• ⊆ •D).
D is marked at a marking M iff ∃(p,c) ∈ D : M (p)(c) > 0.
p1 p5
t1 t4
p2 p6
t2 t5
bus free
t3 t6
Example 6.1 Consider a dual processor system where each processor accesses
a common bus, but not simultaneously. Fig. 6.3 illustrates a Place-Transition net
model of the system. Places p1 ,p2 ,p3 represent the states of the first processor
while places p5 ,p6 ,p7 represent the states of the second one.
However, since the processors are identical, an obvious idea (now that we know
about CPNs) is to represent each of the two processors by a different colour
token. A CPN model of the same system is illustrated in Fig. 6.4. The formal
definition is given by CP N = (P,T,C,I − ,I + ,M0 ) where
c1
p1 c2
t1
p2
t2
p3 bus access
p4
bus free
t3
Figure 6.4 Coloured Petri net model of the same dual multiprocessor system
Now that we know about the structure, behaviour and properties of CPNs, we
next would like to know how to analyse them. Fortunately, every CPN can be
unfolded uniquely into a Place-Transition net so that all the concepts relating to
CPNs are consistent with those of Place-Transition nets.
A CPN=(P,T,C,I − ,I + ,M0 ) is unfolded into a Place-Transition net in the follow-
ing way:
1. ∀ p ∈ P,c ∈ C(p) create a place (p,c) of the Place-Transition net.
2. ∀ t ∈ T,c0 ∈ C(t) create a transition (t,c0 ) of the Place-Transition net.
121
p1 I − (p1 ,t)
t
p3
I + (p3 ,t)
p2 I − (p2 ,t)
It should be obvious that while the unfolding of a CPN yields a unique ordinary
Petri net the converse is not true. Folding (as it is termed) of a Place-Transition
net can be done in more than one way.
Example 6.2 As an example, the unfolded net of Fig 6.4 is displayed in Fig. 6.3.
It should thus be clear that Coloured Petri nets are only a means of simplifying
the graphical representation of a Petri net model of a complex system. We can
analyse such models by unfolding the CPN and performing the analysis on the
unfolded net.
Coloured Petri nets have undergone several revisions. Jensen[96, 97] uses ex-
pressions to specify the incidence functions and markings, but for invariant anal-
ysis a function representation as presented here is used. The expression represen-
tation is based on the meta language ML [122]. In the same book Jensen also
introduces guards which can be attached to the transitions of a CPN. A guard
determines a boolean value and the corresponding transition is only enabled if
this value is true.
For simplicity and to avoid confusion, we will describe the “older” graphical
representation presented by Jensen in [93, 94] and only touch on the graphical
representation of CPNs using ML constructs and not go into the formal details.
Fig. 6.5 illustrates a part of a CPN where the incidence functions
I − (p,t),I + (p,t) ∈ [C(t) 7→ C(p)M S ] are represented as “arc weights”. If we
can find mnemonics for these functions, this idea of representing a CPN graphi-
cally will be sufficient for a human reader. This is the original idea presented by
Jensen in [93].
122 6 Coloured Petri Nets
a
p1 x+y
b c t
p3
2x + y
p2 b
x
a
Later, concepts of Predicate/Transition nets [79] were adopted for the graphical
representation of CPNs. In order to understand this we need to remember the
usual concept of binding all or a subset of all free variables in an expression
to values. Consider some variables x,y and z and an expression involving these
variables, e.g. 2x+y −z. If we bound these variables to values i,j,k respectively,
then the given expression evaluates to 2i + j − k. In most cases the incidence
function of a CPN can now be written using an expression. Consider e.g. the
CPN of Fig. 6.6, where we have attached an expression to each arc remembering
that the x and y are variables on a multi-set.
Thus the expression x + y states that in case transition t fires, a token of kind x
and a token of kind y is destroyed on p1 . To determine whether a transition t is
enabled and the result of it firing, the free variables of all expressions attached to
the input and output arcs of t must be bound to some values in order to evaluate
the expression. An arc expression must evaluate to a multi-set over the colour
set of the corresponding place. Thus possible evaluations of the arc expression
x + y are a + a,a + b,a + c,a + d etc. with C(p1 ) = {a,b,c,d}. Clearly, for all
arc expressions adjacent to a transition we have to bind identical variables to the
same value. E.g., if we bound the variable x to a and y to b, this implies that the
arc expressions x + y, x and 2x + y evaluate to a + b, a and 2a + b respectively.
After the evaluation of all arc expressions of a transition, enabling and firing of
that transition is similar to that of Place-Transition nets. E.g., if the arc expres-
sions x + y and x evaluate to a + b and a respectively, then t is enabled at a
marking M iff there is at least one token of colour a and at least one token of
colour b in the marking of p1 and at least one token of colour a in the marking
of p2 . This is the case in Fig 6.6 and if t fires it destroys the tokens a and b on
p1 as well as the token a on p2 and creates 2 tokens of colour a and one token of
colour b on p3 as prescribed by the arc expression 2x + y.
If we bound x to c and y to b, then t is not enabled since there is no token of
colour c in the marking of p2 depicted in Fig. 6.6.
If, depending on the binding, we want a transition to behave in more than one
way, we can describe this by employing syntactical constructs of programming
languages. Jensen in [96, 97] uses the programming language ML for this and
we offer the CPN in Fig. 6.7 as an example.
123
a
p1 x+y
b c t
p3
if (x = a)
b then if (y = b) then 2r + s
p2 x
a else empty
else 2s
Figure 6.7 CPN with code rather than functional description of the incidence functions
In [96] the reader will find a formal definition of CPNs and its graphical rep-
resentation which differs somewhat from that described above. In the following
we will use the definition of a CPN given in this chapter and use the concepts
concerning the graphical representation only to draw CPNs compactly.
a
p1 x
b t
r p3
if (x = a)
c then s
p2 if (x = a)
d else empty
then c
else d
Exercise 6.1 Fold the following sets of places and transitions of the Petri net in
Fig. 5.3, page 81:
{p9 ,p10 } and {pi ,pi+4 },{ti ,ti+4 },i ∈ {0, . . . ,4}.
Exercise 6.2
1. Give the formal definition (see Def. 6.3) of the CPN displayed in Fig. 6.8.
124 6 Coloured Petri Nets
7 Further Reading
Further introductions on Petri nets are given in [132, 149, 150] and short intro-
ductory papers are [125, 130].
A common extension of Petri nets found in the literature is to impose priorities
on transitions and/or to introduce so-called inhibitor arcs. If two transitions of
different priority are enabled in the sense of ordinary Petri nets then only the
higher priority transition may fire. An inhibitor arc connects a place p to a transi-
tion and imposes an additional constraint on the enabling of that transition. The
transition is now enabled iff the enabling rule of ordinary Petri nets concerning
the usual arcs between places and that transition is satisfied and if place p is not
marked. In [132] these extensions are discussed, amongst others. Petri nets with
inhibitor arcs or priorities have the power of Turing machines and thus several
problems, e.g. reachability problem or determining liveness, become undecid-
able. This is the reason why most Petri net researchers do not consider these
extensions, although they might be necessary to model real life problems.
The analysis of net classes, especially of (Extended) Free Choice nets, is the
subject of [34, 36, 37, 38, 39, 60, 175] and several results are summarised in
[38, 125]. Analysis of Marked Graphs is considered in [78]. This class of nets
is also called “Synchronisationsgraphen” or T-graphs. Another name for State
Machines is S-graphs. (Extended) Simple nets, also called Asymmetric Choice
nets, are dealt with in [38].
A further net class with similar properties like EFC-nets are investigated in [173,
174]. This class is called Equal Conflict nets (EC-nets) and allows multiple arc
weights. Its definition is:
∀t,t0 ∈ T : (•t ∩ •t0 6= ∅ =⇒ I − (p,t) = I − (p,t0 ),∀p ∈ P ).
Reduction and synthesis analysis can be found in several papers. The following
papers are concerning reduction and synthesis analysis of Petri nets: [31, 32, 70,
80, 101, 126, 168, 171, 172, 176, 182].
A study on different efficient methods for the analysis of the reachability set
(symmetry method, stubborn set method, symbolic model checking, incomplete
reachability analysis) can be found in [145]. Progress has been made in the anal-
ysis of the reachability set exploiting dynamic priorities[21], structural informa-
tion for a Kronecker based representation of the state space (e.g. [106] (see also
page 175)) or Binary Decision Diagrams (e.g. [123]).
Further Petri net models introducing the concept of individual tokens are de-
scribed in [79, 99, 148]. The invariant analysis of CPNs was first discussed in
[93]. The latest version of CPNs is defined in [96, 97, 98] and it is shown how a
functional representation can be used for calculating the invariants of this CPN
version. A coloured version of the reduction rules of [31, 32] are defined in [88].
CPNs with an infinite number of colours also have the power of Turing machines
126 7 Further Reading
[131].
An international conference with the title “Application and Theory of Petri Nets”
started in 1980 and is held annually, e.g. [95, 3, 177, 58, 40, 12, 59, 64, 128, 54,
71]. Further publications on Petri nets can be found in “Advances in Petri Nets”
(Lecture Notes in Computer Science, Springer-Verlag, e.g. [44, 45, 153, 154,
155, 156, 157, 158, 159, 160, 161, 162, 41, 1, 67]).
The German “Gesellschaft für Informatik (GI)” has a “Special Interest Group
on Petri Nets and Related System Models”, which publishes a Petri net
newsletter to its members half-yearly. For membership contact Gesellschaft
für Informatik, email: gs@gi-ev.de (yearly costs: ≈ EUR 10 ) or visit
the URLs http://www.gi-ev.deand http://www.informatik.
uni-hamburg.de/TGI/GI-Fachgruppe0.0.1/resp. There is also a
Petri net mailing group (see http://www.informatik.uni-hamburg.
de/TGI/PetriNets/mailing-lists/). Additional information on
Petri nets can be accessed via URL http://www.informatik.
uni-hamburg.de/TGI/PetriNets/.
First proposals have been published defining a standard for high-level
Petri nets (High-level Petri Nets - Concepts, Definitions and Graphical No-
tation) within the International Organization for Standardisation (ISO). For
more information see http://www.informatik.uni-hamburg.de/
TGI/PetriNets/standardisation/.
Part III
TIME-AUGMENTED PETRI
NETS
129
Petri nets involve no notion of time, since it is not defined at what point in time
a transition will fire. Analysing the performance of a system with a Petri net
is thus not possible. Petri nets can only be used for qualitative analysis, i.e., to
analyse the functional or qualitative behaviour of a system. For performance or
quantitative analysis the temporal (time) behaviour of the system has to be part
of the Petri net description.
Since the early 70’s several suggestions on incorporating time into Petri nets have
been published. In general, there are two possible ways to do this:
These time-augmented Petri nets, TPPN as well as TTPN models, can be clas-
sified further depending upon whether the times mentioned are deterministic or
stochastic. In the first case the class of such Petri nets is called “Timed Petri
Nets” and in the latter they are called “Stochastic Petri Nets”.1
A further classification depending upon the firing policy of transitions (resam-
pling, age memory, enabling memory) can be found in [4, 5], but this classifica-
tion is not relevant for exponentially distributed firing delays.
1
Unfortunately the name of this class coincides with the name of a member of the class: Molloy’s
SPNs [124].
130
The continuous-time Stochastic Petri net (M.K. Molloy [124], S. Natkin [127])
SP N = (P N,Λ) is formed from the Place-Transition net P N = (P,T,I − ,I + ,M0 )
by adding the set Λ = (λ1 , . . . ,λm ) to the definition. λi is the, possibly mark-
ing dependent, transition rate of transition ti . I.e., the firing time is exponentially
distributed and the distribution of the random variable χi of the firing time of
transition ti is given by
Fχi (x) = 1 − e−λi x
A typical example of a Stochastic Petri net (SPN) is illustrated in Fig. 8.1 (cf.
[124]).
In the SPN in the figure, transition t1 is enabled at M0 = (1,0,0,0,0). The time
elapsed until t1 fires is exponentially distributed with rate λ1 , i.e. the average
time for t1 to fire is λ11 . Once t1 has fired, using the firing rule of Place-Transition
nets, we obtain marking M1 = (0,1,1,0,0). At M1 , t2 and t3 are concurrently
enabled. That is, one of these two transitions will fire next after a certain time has
elapsed. If transition t2 fires first, the SPN changes to marking M2 = (0,0,1,1,0)
and if t3 fires before t2 , we get the marking M3 = (0,1,0,0,1). The next marking
thus depends on which transition “wins the race”. The probability that t2 fires
first is given by:
p1
t1
p2 p3
t4 t2 t3
p4 p5
t5
and similarly,
λ3
P {t3 fires first at M1 } = .
λ2 + λ3
This shows that the probability of changing from marking M1 to some other
marking is independent of the time spent in M1 !
The sojourn time in M1 is given by the minimum of the independent, exponen-
tially distributed firing times of both transitions, namely:
λ2 1 λ2 1
= 1 = λ2
(λ2 + λ3 ) E[min(χ2 ,χ3 )] (λ2 + λ3 ) (λ2 +λ3 )
(1,0,0,0,0)
t1
(0,1,1,0,0)
t4 t2 t3
t5
(0,0,1,1,0) (0,1,0,0,1)
t2
t3 t4
(0,0,0,1,1)
(1,0,0,0,0)
λ1
(0,1,1,0,0)
λ4 λ2 λ3
λ5
(0,0,1,1,0) (0,1,0,0,1)
λ2
λ3 λ4
(0,0,0,1,1)
The square matrix Q = (qij ) of order s = |R(P N )| is the matrix Q in Sec. 2.3.
As before, the steady state distribution π of the MC is obtained by solving the
linear equations
s
X
πQ = 0; πj = 1
i=1
From the vector π = (π1 ,π2 , . . . ,πs ) we can then compute the following perfor-
mance measures:
Mean number of tokens: Let B(pi ,n) be the subset of R(P N ) for which the
number of tokens in a place pi is n, i.e. B(pi ,n) = {M ∈ R(P N )|M (pi ) = n}.
Then the average number of tokens in place pi is given by:
∞
X
mi = (nP [B(pi ,n)]).
n=1
Example 8.1 Consider the Stochastic Petri net shown in Fig.8.1. That SPN dis-
plays sequential operation (t5 ,t1 ), parallel operation (t2 ,t3 ), forking (t1 ), join-
ing (t5 ), and conflict (t4 ,t5 ). Assume mean firing rates λ1 = 2, λ2 = 1, λ3 = 1,
λ4 = 3, and λ5 = 2. Starting with an initial marking of one token in place p1
and no tokens in the remaining places, the reachability set has five markings or
equivalently, there are five states in the Markov chain.
Solving the Markov chain we obtain the following steady-state marking proba-
bilities:
5
P [M1 ] = P [(1,0,0,0,0)] =
43
8
P [M2 ] = P [(0,1,1,0,0)] =
43
2
P [M3 ] = P [(0,0,1,1,0)] =
43
23
P [M4 ] = P [(0,1,0,0,1)] =
43
5
P [M5 ] = P [(0,0,0,1,1)] =
43
Using the marking probabilities and the number of tokens in each place in a
particular marking we can deduce the steady state probabilities of their being µi
tokens at place pi . This is known as the token probability density function.
135
38 5
P [µ1 = 0] = 43 P [µ1 = 1] = 43
12 31
P [µ2 = 0] = 43 P [µ2 = 1] = 43
33 10
P [µ3 = 0] = 43 P [µ3 = 1] = 43
36 7
P [µ4 = 0] = 43 P [µ4 = 1] = 43
15 28
P [µ5 = 0] = 43 P [µ5 = 1] = 43
The most important aspect of SPNs is that the reachability graph of the underly-
ing Place-Transition net and the Markov chain are isomorphic. In other words,
the number of states/markings and the connection structure of both graphs are the
same. The Markov chain describes the “reachability graph” of the SPN. There-
fore all properties of the underlying Place-Transition net also hold for the SPN
and vice versa. For that reason qualitative (functional) analysis of an SPN can be
done by applying the algorithms and techniques for Place-Transition nets.
Although SPNs embrace these important features, they also exhibit significant
problems, which led to their modification to Generalized Stochastic Petri nets
(GSPNs). Before we introduce GSPNs we first point out the difficulties of SPNs.
Consider the SPN in Fig. 8.4 with firing rates Λ = (1.0,1.0,1.0,µ,µ,µ). The
corresponding Markov chain is shown in Fig. 8.5.
t3 t1 t6
p2 p1 p3 p4
t2 t4 t5
We now want to analyse this continuous-time Markov chain for different values
of µ. The infinitesimal generator Q of the MC is given by
136 8 Stochastic Petri Nets
M1 = (1,0,0,0)
µ 1.0
1.0 1.0
M3 = (0,0,1,0) M2 = (0,1,0,0)
µ µ
M4 = (0,0,0,1)
πQ = 0 (8.1)
yielding the steady-state distribution π = (P [M1 ],P [M2 ],P [M3 ],P [M4 ]).
A simple iterative method (power method) to solve Eq. (8.1) is:
where π k is the approximate steady state distribution in the k-th step of the iter-
ation and a is a factor such that the sum of absolute values of all rows is less or
equal to 1.
For our example we choose a := 1.001 1
(max{2,2µ})−1 . In general a good choice
is1
1 |R(P N )|
a := (maxi=1 {|qii |})−1
1.001
Table 8.1 shows the number of iterations needed for several values of µ and
the corresponding result for π starting with the vector (0.25,0.25,0.25,0.25).
The iteration stops once kπ n+1 − π n k < where kxk := ni=1 |xi | for x =
P
(x1 , . . . ,xn ) without taking the convergence speed into account for simplicity.
π iteration −πiexact
The relative error is given here by max4i=1 (100% × | i |).
π exact
i
1
For more information on the numerical analysis of Markov chains see [169].
137
Table 8.1 shows that for increasing µ the number of iterations also increases im-
plying increased CPU-time to obtain the steady-state distribution π. Furthermore
the iteration becomes unstable for large values of µ, yielding incorrect results
µ µ 1 1
for π. Note that the solution for π is ( 2µ+2 , 2µ+2 , 2µ+2 , 2µ+2 ) and thus π tends to
( 12 , 12 ,0,0), if µ tends to infinity.
If µ = ∞ markings M3 and M4 will be left immediately by the Markov process
in Fig. 8.5. So the only significant markings for the steady-state distribution are
M1 and M2 . With this in mind we can reduce the Markov chain to that in Fig. 8.6
before determining the steady-state distribution. Solving this reduced Markov
chain iteratively will not lead to complications. Note that the size of the MC is
now smaller than the original one.
The last example illustrates that if the firing rates of transitions differ in orders of
magnitude, problems in the quantitative analysis of SPNs might occur. For this
reason SPNs were extended to the so-called Generalized Stochastic Petri nets
(GSPNs).
M1 = (1,0,0,0)
1.0
1.0
M2 = (0,1,0,0)
Exercise 8.1
138 8 Stochastic Petri Nets
(a) mj ,∀j ∈ {1, . . . ,5}, i.e. the average number of tokens on all places at
steady state.
(b) rj ,∀j ∈ {1, . . . ,5}, i.e. the probability of firings of all transitions.
Producer Consumer
t1 t4
t3 t6
t2 t5
Legend:
timed transition
immediate transition
Note that if T2 = ∅ then the definition of a GSPN coincides with the definition
of an SPN, i.e. SPNs ⊂ GSPNs.
Example 9.1 The definition of the GSPN which models the Producer-Consumer
system is as follows: GSP N = (P N,T1 ,T2 ,W ) where
How do we analyse a GSPN? Note that a GSPN does not directly describe a
continuous-time Markov process, since immediate transitions fire in zero time.
So the sojourn time in markings which enable immediate transitions is no longer
exponentially distributed. Such markings we will call vanishing, because if a
random observer looks at the stochastic process of a GSPN, he will never observe
such states, although the stochastic process sometimes visits them.
On the other hand, markings which enable timed transitions only will be ob-
served, since the stochastic process sojourns in such markings for an exponen-
tially distributed length of time. So these markings are not left immediately.
Therefore we will call them tangible. In the following we will refer to a marking
also as a state.
Throughout this section we will assume that the GSPN has a finite reachability
set. In order to analyse a GSPN we analyse the embedded Markov chain of the
corresponding stochastic process (cf. Sec. 2.2.3). Note that from the definition
of GSPNs we know that the probability of changing from one marking to an-
other is independent of the time spent in a marking. Thus a GSPN describes a
semi-Markov process. Imagine that the firing of transitions take place at points
d0 ,d1 , . . . ,dn , . . . in time. If a timed transition fires at, say, dk then dk+1 −dk > 0,
since timed transitions constitute tangible states in which the process sojourns for
a certain time interval. If an immediate transition is responsible for a state change
at time dk in the corresponding stochastic process, then we have dk = dk+1 .
So we can think of our stochastic process as a discrete-time Markov chain where
some points coincide in time. To specify this embedded, discrete-time Markov
chain, we have to determine the transition probability from marking or state Mk
to Mr . These probabilities are given by
142 9 Generalized Stochastic Petri Nets
P
i:ti ∈{t∈T |Mk [t>Mr }∩ENT (Mk ) wi
P [Mk → Mr ] = P (9.1)
j:tj ∈ENT (Mk ) wj
where
and T̂ denotes the set of tangible states and V̂ the set of vanishing states, T̂ ∩
V̂ = ∅. C describes the transition probabilities between vanishing states and F
specifies the probabilities between tangible states.
The steady state distribution π̃ of the embedded Markov chain, provided it exists,
is given as usual by
X
π̃P = π̃ and π̃i = 1 (9.3)
Mi ∈T̂ ∪V̂
From this steady state distribution we can calculate the steady state distribution π
of the original stochastic process by weighting the probability π̃j with the portion
of time the process spends in marking Mj .
Obviously πj is 0 if Mj is a vanishing marking. For tangible markings πj can be
calculated as follows:
vsj := π̃π̃sj determines the mean number of visits (cf. Eq. (2.20) on page 32) to
state Ms between two consecutive visits to state Mj . Since ( k:tk ∈ENT (Ms ) wk )−1
P
is the mean time the process will spend in state Ms , the mean time between two
consecutive visits to Mj (mean cycle time) is given by:
1 X
wk )−1
X
π̃s × (
π̃j
Ms ∈T̂ k:t k ∈ENT (Ms )
t4
p2 M0 = (1,0,0)
t4 t5
t1 t1 t2
p1 t3
t2 p3 M1 = (0,1,0) M2 = (0,0,1)
t3
t5
wk )−1
X
(
k:tk ∈ENT (Mj )
Example 9.2 Consider the GSPN displayed in Fig. 9.2 and define w1 = w2 = 1
and w3 = w4 = w5 = 3. The only vanishing marking is the initial marking M0 .
Matrix P is given by
1 1
0 2 2
C D
P = = 1 0 0
E F 1 1
2 2 0
P
and solving the global balance equations π̃P = π̃; i π̃i = 1 yields π̃ =
( 49 , 39 , 29 ). Thus the mean cycle time for tangible marking M1 is 1× 13 + 32 × 3+3
1
=
4 3 1 1 2
9 and for marking M2 this is 2 × 3 + 1 × 6 = 3 . So the steady state distribution
is given by
1 1
3 1
π0 = 0, π1 = 34 = , π2 = 62 = .
9
4 3
4
144 9 Generalized Stochastic Petri Nets
The main task in the calculation of the steady state distribution described above,
is to solve (9.3). The complexity of this calculation is determined by the number
of reachable markings, including the vanishing markings. From the description
of immediate transitions we know that the steady state probability of being in a
vanishing state is defined to be zero.
We can eliminate vanishing markings from the embedded Markov chain before
calculating the steady state distribution in a way similar to that in the example
of the SPN in Ch. 8, where the reachability set was reduced to two markings for
µ → ∞. This will lead to a reduction of the number of global balance equations
and a more efficient analysis.
To obtain a reduction of the state space we have to determine the transition prob-
abilities between tangible states. On leaving a tangible state Mi , the process
might visit one or more vanishing states, Mr ∈ V̂ before finally reaching a tan-
gible marking, say Mj . Thus the reduced embedded Markov chain is specified
by transition matrix P 0 :
P 0 := [p0ij ], p0ij := fij + eir P [Mr −→∗ Mj ],
X
(9.5)
Mr ∈V̂
This yields
∞
h
P [Mr −→∗ Mj ] =
X
P [Mr −→ Mj ].
h=1
From our discussions on Markov chains we know that, given the matrix P char-
acterising the single step probabilities between all states, the h-step probabilities
are given by P h . From (9.2) we know that the single step probabilities out of van-
ishing states are described by matrices C and D. Thus the h-step probabilities
h
P [Mr −→ Mj ] are given by C h−1 × D.
Note that D specifies the single step probabilities between vanishing and tangible
h
states, and that Mj is a tangible state. So the probability P [Mr −→ Mj ] is simply
given by the corresponding element of matrix C h−1 × D, namely (C h−1 × D)rj .
Referring to Eq. (9.5) we can now write matrix P 0 as follows
∞ ∞
P0 = F + E ×
X X
C h × D provided C h exists. (9.6)
h=0 h=0
9.1 Quantitative Analysis of GSPNs 145
The steady state distribution π̃ of the reduced embedded Markov chain is given
by
π̃ = π̃ × P 0 ;
X
π̃s = 1, (9.7)
Ms ∈T̂
if a unique solution for π̃ exists. The steady state distribution π of the Markovian
process is given by Eq. (9.4) for tangible markings.
A prerequisite for the existence of P 0 is the existence of ∞ h
P
h=0 C . How can we
characterise the existence of this limit?
P|V̂ |
Define ui := 1 − j=1 cij . ui > 0 if the sum in row i of matrix C is less
then 1 and ui = 0 if it is 1. With that we can separate the set of vanishing states
into two subsets J0 := {Mi |ui = 0} and J1 := {Mi |ui > 0}. If the stochastic
process is in a state Mi ∈ J0 , it can only transit to another vanishing state, being
in a state Mj ∈ J1 there is a positive probability to reach a tangible state. The
existence of the limit in Eq. (9.6) can be analysed by inspecting the structure of
the reachability set with respect to vanishing states. If the process can always
reach tangible states, then this limit exists.
The reader should refer to Sec. 2.1.2 on absorbing Markov chains and transient
behaviour where the matrix Q of transition probabilities between transient states
correspond to matrix C of the transition probabilities between vanishing states
in this section. First we define:
Example 9.3 Consider the GSPN of Fig. 9.3 with wi = i. The reachability set
comprises the following markings:
M0 = (1,1,1,0,1),M1 = (0,0,2,1,0),M2 = (0,1,2,0,0),
M3 = (1,0,1,1,1),M4 = (2,1,0,0,2),M5 = (2,0,0,1,2),
M6 = (0,0,2,0,1),M7 = (1,0,1,0,2),M8 = (2,0,0,0,3)
and the corresponding reachability graph is shown in Fig. 9.4.
The markings M0 ,M1 ,M2 ,M3 ,M4 ,M5 are vanishing and the markings M6 ,M7 ,M8
are tangible. The matrix P of the embedded Markov chain is
146 9 Generalized Stochastic Petri Nets
p1 p2
t1 t2
p3 p4 t4
t3
t5
p5
M0
t1 t2
t3 M6 M3 t4
t5
M1 t4 t3
t2 M2 M7
t5
M8
t1 t3
t4 M5
M4 t2
2 1
0 0 0 3 0 0 3 0 0
0 0 0 0 0 0 1 0 0
0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0
C D 2 1
P = = 0 0 0 0 0 3 0 3 0
E F
0 0 0 0 0 0 0 0 1
4 5
0 0 9 0 0 0 0 9 0
4 5
9 0 0 0 0 0 0 0 9
0 0 0 0 1 0 0 0 0
Since matrix
9.1 Quantitative Analysis of GSPNs 147
2
1 0 0 3 0 0
0 1 0 0 0 0
−1
0 1 1 0 0 0
(I − C) =
0 0 0 1 0 0
2
0 0 0 0 1 3
0 0 0 0 0 1
we get
4 5
9 9 0
0 −1 4 8 5
P = F + E × (I − C) × D = 27
27 9
1 2
0 3 3
Solving
8
π̃P 0
X
= π̃ and π̃i = 1
i=6
1
yields π̃6 = 11 ,π̃7 = 15 25
44 ,π̃8 = 44 . Thus the mean number of visits is
4 4
v66 = 1,v67 = 15 ,v68 = 25 ,v76 = 15 3 25 5
4 ,v77 = 1,v78 = 5 ,v86 = 4 ,v87 = 3 ,v88 =
1.
The sojourn time ts (Mi ) for tangible marking Mi is given by
ts (M6 ) = ts (M7 ) = (4 + 5)−1 = 19 ,ts (M8 ) = 14 .
301
Let X̂ = π̃6 × ts (M6 ) + π̃7 × ts (M7 ) + π̃8 × ts (M8 ) = 1584 ,
then we get the following mean cycle times tc (Mi ) for tangible marking Mi :
tc (M6 ) = π̃16 X̂ = 301 1 301 1 301
144 ,tc (M7 ) = π̃7 X̂ = 540 ,tc (M8 ) = π̃8 X̂ = 900 ,
which gives the steady state distribution for tangible states:
π6 = ttsc (M
(M6 )
6)
16
= 301 , 60
π7 = 301 , 225
π8 = 301 .
The steady state distribution π of the GSPN can be employed for the calculation
of performance figures as shown in Ch. 8. Only the throughput at an immediate
transitions has to be calculated differently, since immediate transitions are only
enabled in vanishing states.
Let r = (ri ) be a vector, which determines for a vanishing state Mi the rate at
which the state is entered and left immediately at steady state. Since we know the
steady state distribution π of tangible states, we can calculate r as follows. Let
Ẽ be the matrix specifying the rates for a specific state change leaving a tangible
state Mi and entering a vanishing state Mj , i.e.
X
Ẽ = (ẽij ), ẽij = wk ; Mi ∈ T̂ ,Mj ∈ V̂
k:tk ∈{t∈T |Mi [t>Mj }∩ENT (Mi )
Then
r = π × Ẽ × (I − C)−1
The throughput at an immediate transition tj ∈ T2 is then given by
148 9 Generalized Stochastic Petri Nets
X wj
dj = ri P
k:tk ∈ENT (Mi ) wk
Mi ∈ENj ∩V̂
Example 9.4 For the GSPN of Fig. 9.3 (cf. Ex. 9.3) we have
0 0 4 0 0 0
Ẽ = 4 0 0 0 0 0
0 0 0 0 4 0
and thus
1
r = π × Ẽ × (I − C)−1 = (240,64,64,160,900,600)
301
The throughputs at transition t1 and t2 are now
240 1 900 1 380
d1 = × + × =
301 3 301 3 301
240 2 64 900 2 824
d2 = × + ×1+ × =
301 3 301 301 3 301
The throughput at the timed transition t5 can be calculated as for SPNs which
yields
380
d5 = (π6 + π7 ) × 5 =
301
and the throughput at transition t4 is λ4 = 4, since it is enabled in all tangible
markings.
In the previous section we saw that qualitative properties, like the existence of
home states, are essential preconditions for the existence of a steady state distri-
bution of the stochastic process represented by the GSPN.
For the qualitative analysis of a GSPN we want to exploit the underlying Place-
Transition net of the GSPN and use the algorithms presented in Sec. 5.4.
Our interest is therefore in the combined qualitative and quantitative analysis il-
lustrated in Fig. 9.5. First of all, while neglecting time, certain qualitative aspects,
such as boundedness and liveness of the Place-Transition net are fully analysed.
Then, if the Place-Transition net satisfies all the required qualitative properties,
it may be worthwhile to do a quantitative analysis. For this procedure to apply,
all qualitative features of the Place-Transition net have to remain valid after the
introduction of time. Unfortunately, this is not always the case.
Incorporating time, particularly introducing a priority relation on transitions,
changes the properties of the Place-Transition net significantly [17, 19, 20]. In
this section we investigate this further.
9.2 Qualitative Analysis of GSPNs 149
?
qualitative analysis
?
- +
?
quantitative analysis
In other words, a transition is enabled iff the usual enabling rule for Place-Tran-
sition nets holds and if there exists another enabled immediate transition t0 , then
t must also be an immediate transition, since otherwise the firing of t0 would
have priority over the firing of t. Or to put it differently, t ∈ T of a GSPN is
enabled at M iff t ∈ ENT (M ), with ENT (M ) defined on page 140.
With respect to the enabling rule in GSPNs, all definitions concerning the dy-
namic behaviour of GSPNs are similar to those concerning Place-Transition
nets (cf. Def. 5.4 and 5.5). We will use subscripts P N and GSP N to distin-
guish between the same notions for the underlying Place-Transition net, e.g.
M [t >P N ,M [t >GSP N ,M [σ >P N , M →∗GSP N M 0 or R(GSP N,M0 )
etc.
We first of all investigate timeless traps in the context of the state space of a
GSPN. A timeless trap means that the GSPN can reach a marking whence only
immediate transitions can fire in the future.
t7
t4 t8
t1
t3 t6
t2 t5
where |σ| denotes the length of σ. Since T is a finite set, the existence of a time-
less trap implies that some immediate transitions fire infinitely often. Fig. 9.6
depicts an example of a timeless trap which is caused by the firings of the imme-
diate transitions t7 and t8 . Note that this definition of a timeless trap corresponds
directly with that for a trap of the matrix C in Def. 9.2. Timeless traps are avoided
by the following condition.
Proof.: Assume there is a timeless trap and let T̃ be the set of immediate tran-
sitions which fire infinitely often. Let P̃ be the set of places which
are either
an input place for T̃ or an output place, but not both, i.e. P̃ = •T̃ \ T̃ • ∪
T̃ • \ • T̃ . If T̃ 6= ∅ we have P̃ 6= ∅ since otherwise, •T̃ = T̃ • contradicting
condition NoTT. There are two cases to consider
1. ∃ p ∈ •T̃ \ T̃ •.
Since p 6∈ T̃ • not all transitions of T̃ can fire infinitely often, contradicting
our assumption.
3
NoTT stands for No Timeless Trap.
9.2 Qualitative Analysis of GSPNs 151
2. ∃ p ∈ T̃ • \ • T̃ .
Since p 6∈ •T̃ and all t ∈ T̃ fire infinitely often, the GSPN has an infinite
reachability set, since the number of tokens on p is not bounded, which is
again a contradiction. t
u
where C is the matrix given on page 142. Remember that C h describes the h-step
transition probabilities between vanishing states. From the proof of Th. 9.2 we
know that the number of firings of immediate transitions is always bounded. The
theorem essentially tells us that when condition NoTT applies, the number of
steps between vanishing states do not exceed limit h0 . This implies that there are
no loops between vanishing states in the state space of the GSPN. This property
is particularly important when eliminating vanishing states while generating the
state space. It is only necessary to multiply the probabilities along every path,
starting at a particular tangible state Mi and leading to a particular tangible state
Mj , and sum all these path probabilities to determine the single step probability
between these two tangible states.
Condition NoTT can be verified very easily with the algorithm in Fig. 9.8.
Incorporating time also changes other properties of a Place-Transition net. E.g.
an unbounded Place-Transition net may yield a bounded GSPN (see Fig. 9.9).
Fortunately the reverse does not present a similar problem.
TH := T2
while •TH 6= TH • do
begin
PH := (•TH \ TH •) ∪ (TH • \ • TH )
∀t ∈ TH do
if (•t ∩ PH ) ∪ (t • ∩ PH ) 6= ∅
then TH := TH \ {t}
end
if TH = ∅
then Condition NoTT is satisfied
else Condition NoTT is not satisfied
p1 p2
t∗
M0 M0
t∗ t∗
are marked simultaneously. The reachability graphs of PN and GSPN are shown
in Fig. 9.11.
Fig. 9.12, on the other hand, depicts a live GSPN with a non-live underlying Petri
net. After firing t2 and t3 the Place-Transition net is dead, but the firing sequence
t2 t3 can not occur in the GSPN, since the firing of t1 has priority on the firing of
t2 . The only conclusion we can establish for a GSPN whose underlying Place-
Transition net is live is the following:
Lemma 9.1 Let GSPN be a Generalized Stochastic Petri net whose underly-
ing Place-Transition net is live. Then ∀M ∈ R(GSP N,M0 ) : ∃t ∈ T :
M [t >GSP N .
Proof. Since the enabling rule of GSPNs is a restriction of the enabling rule of
Place-Transition nets, we know R(GSP N,M0 ) ⊆ R(P N,M0 ). Liveness of the
underlying Place-Transition net implies that ∀M ∈ R(GSP N,M0 ) : ∃t ∈ T :
M [t >. If t ∈ T2 then also M [t >GSP N holds and our proof is complete. If
t ∈ T1 then ¬M [t >GSP N will only hold if there is an immediate transition
which prevents the enabling of t, i.e. ∃t0 ∈ T2 : M [t0 >GSP N so that t0 is
enabled at M according to the enabling rules of GSPNs. t
u
So in such GSPNs there is always some enabled transition, although there might
be no live transition (see Fig. 9.13). Lemma 9.1 only implies that total deadlocks
cannot occur.
Furthermore, although the PN contains home states, this may not be true for the
GSPN as shown in Fig. 9.14. The reachability graph of the GSPN, see Fig. 9.15,
now contains two terminal strongly connected components (cf. Def. 5.7 and
Th. 5.4 on page 94).
All these examples illustrate that the analysis procedure in Fig. 9.5 has to be
modified or possibly completely changed to usefully combine qualitative and
quantitative analysis. What possibilities do we have to cope with this basic prob-
lem? One way is to modify existing Petri net algorithms to render them suitable
for the analysis of time-augmented nets. This may not be so useful, as Petri net
theory and existing software tools could then no longer be used directly. Further-
more, all future research results in the Petri net area would have to be adapted to
time-augmented Petri nets.
154 9 Generalized Stochastic Petri Nets
t1 t3
t2
t1 t2
p1
p2
p5 p8
p3
t3 t4
p6 p9
p4
t5 t6
p7 p10
t3 t4 t3 t4
t1 t2 t1 t2
t5 t6
t2 t1 t2 t1
M0 M0
t2 t5 t6 t5 t6
t1
t6 t5
t4 t3 t4 t3
t1 t2 t1 t2
t6 t5
t6 t5
Since EFC-nets have the structures shown in Fig. 5.22 on page 105, it seems
obvious to insist that conflicts may only occur between transitions of the same
kind. When this condition, which we shall call EQUAL-Conflict, holds for an
EFC-GSPN, all positive properties of the underlying PN remain valid.
156 9 Generalized Stochastic Petri Nets
?
qualitative analysis
?
?
additional restrictions - +
?
quantitative analysis
We will show that this condition ensures the absence of timeless traps and that
liveness and the existence of home states extend to the GSPN.
Theorem 9.5 ([17, 19, 20]) If we are given an EFC-GSPN whose underlying
Place-Transition net is live and bounded, the following holds:
Proof. Since the proof of part 3 is lengthy we will only prove the first two parts.
Proof of part 1: Assume the GSPN has a timeless trap, i.e.
∃M ∈ R(GSP N,M0 ) :
∀k ∈ N : ∃σ ∈ T ∗ ,|σ| ≥ k such that M [σ >GSP N and
∀σ̃ ∈ T ∗ : M [σ̃ >GSP N =⇒ σ̃ ∈ T2∗ .
Since PN is bounded Th. 9.4 ensures boundedness of the GSPN. Thus R(GSP N,M0 )
is finite and there exists a terminal strongly connected component (cf. Def. 5.7)
CM ⊆ R(GSP N,M ). Define T̃ := {t ∈ T |∃M 0 ∈ CM : M 0 [t >GSP N } and
P̃ := •T̃ .
9.2 Qualitative Analysis of GSPNs 157
T̃ ,P̃ T \ T̃ ,P \ P̃
ti tj
a: 6 3
pr j
pk j j pl
>
b: tr
6
Thus our assumption is not valid, which completes the proof of part 1.
Proof of part 2:
Note that in part 3 of Th. 9.5, because of the EFC-net structure, boundedness and
liveness of the Place-Transition net implies the existence of home states for the
Place-Transition net as well. [19, 20] shows that Th. 9.5 also holds for EC-nets
(cf. page 125) and extends the results to general net structures and multiple levels
of priorities for immediate transitions.
The difficulties with the qualitative analysis of GSPNs apply to nearly any kind of
time-augmented Petri net. This is an intrinsic problem which cannot be avoided.
Since immediate transitions have priority over timed transitions, GSPNs are
equivalent to Turing machines and thus several properties, such as liveness, are
undecidable for general GSPNs (cf. [132]).
There are yet further disadvantages concerning the modelling of systems using
GSPNs.
GSPNs, like Place-Transition nets, do not distinguish between individual to-
kens so that the graphical representation very soon becomes complex. Defining
a coloured version of GSPNs (Coloured GSPNs, CGSPNs) can be done eas-
ily by folding places and transitions of the same kind. The firing rates or firing
weights are then associated with the specific colour of a transition. Analysis of
such a CGSPN can, e.g., be done by unfolding the net and analysing the GSPN
as usual.
colour 2
t1 p1
t2
p2
colour 1
p3 t3
A more severe disadvantage of GSPNs is the difficulties which arise if one mod-
els queues, which we discussed in Ch. 3. Modelling scheduling strategies is par-
ticularly difficult.
Fig 9.18 illustrates this point. The GSPN models a queue which serves two
colours of tokens according to the pre-empt resume priority strategy (cf. Sec. 3.8).
A newly arriving token with higher priority (colour 1) pre-empts the service of
the token being served at that moment. The pre-empted token will continue his
task, at the point of interruption, after completion of service of all tokens with
higher priority. Transition t1 is enabled if pre-emption is to occur. Firing of t1
pre-empts tokens of colour 2. The markings of p1 and p2 keep track of this event.
This is the reason why the service of a token of colour 1 is modelled by two
timed transitions, t2 and t3 , with identical parameters. Note that this model of a
pre-emptive priority scheduling strategy with resumption is only correct if expo-
nentially distributed service times are assumed. Other service time distributions
require more complex models.
Also simple scheduling strategies, like FCFS, might not be easy to represent
using plain GSPN elements. Consider a queue where 2 colours of tokens arrive
according to exponential distributed interarrival times and whose service times
are exponentially distributed. If the scheduling strategy is FCFS, i.e. our system
is an M/M/1-FCFS queue, we have to encode the colour of the token in each
position of the queue. Assume that an upper bound for the number of tokens in
the queue is given, e.g. 3, then the GSPN in Fig. 9.19 would model the queue
accurately.
Transitions t1 and t2 model the arrival of a token of either colour and transitions
t3 and t4 model the service of the token in front of the queue. The places pi1
and pi2 represent position i of the queue and the place pi0 ensures that this posi-
tion is occupied by at most one token. Since entering a position is modelled by
160 9 Generalized Stochastic Petri Nets
t2 t4 colour b
p32 p22 p12
Exercise 9.1
1. Consider a GSPN with a finite reachability set. Convince yourself that for
such a GSPN the existence of home states is necessary and sufficient for
the existence of the steady state distribution, provided there are no timeless
traps.
Exercise 9.2 Give the formal counterparts of Def. 5.4 and 5.5 for GSPNs.
Exercise 9.3
• Apply the algorithm given in Fig. 9.8 to the GSPN of Fig. 9.6.
• Prove that the GSPN given in Fig. 9.7 does not have a timeless trap.
Exercise 9.4
p1
t1
t3
t2 p2
2. Prove the statements in the text concerning liveness of the GSPNs in Fig. 9.10
and 9.12.
Exercise 9.5 Show that the GSPN of Fig. 9.14 has no home states and that for
the underlying Place-Transition net home states do exist.
Exercise 9.7
1. Design a GSPN model for a queue which serves 3 colours of tokens accord-
ing to a 2-stage Coxian distribution and the scheduling strategy depicted in
Fig. 9.18.
Queueing Petri Nets (QPNs; F. Bause, H. Beilner, P. Kemper [18, 22, 29]) try
to eliminate the problem of representing scheduling strategies by integrating the
concept of queues (cf. Ch. 3) into a coloured version of GSPNs (CGSPNs). This
is done by partioning the set of places into two subsets: queueing places and
ordinary places.
A queueing place (cf. Fig. 10.1) consists of two components: the queue and a
depository for tokens which have completed their service at this queue. Tokens,
when fired onto a queueing place by any of its input transitions, are inserted
into the queue according to the scheduling strategy of the queue. Tokens in a
queue are not available for the transitions. After completion of its service, the
token is placed onto the depository. Tokens on this depository are available to
all output transitions of the queueing place. An enabled timed transition will fire
after an exponentially distributed time delay and an immediate transition fires
immediately as in GSPNs.
Since we are now no longer forced to describe scheduling strategies with only
GSPN elements, the description of systems is simplified. Since the arrival pro-
cess is determined by the firings of the input transitions of a queueing place, we
will omit its specification in the Kendall notation of a queue (cf. Sec. 3).
Example 10.1 Consider the FCFS queue with 2 colours of tokens as described
in Sec. 9.3 (see also Fig. 9.19). Using queueing places we have no problem to
describe a model even for an unlimited number of tokens. Fig. 10.2 shows the
corresponding QPN employing the shorthand notation for queueing places as
given in Fig. 10.1.
The definition of a QPN is as follows:
Definition 10.1 A Queueing Petri net (QPN) is a triple
QP N = (CGSP N,P1 ,P2 ) where
queue depository
t1 a
-/M/1-FCFS
t2 b
x x
a
p1 -/C/1-FCFS
x x x
a -/C/1-PS x
p2
x x x x x x x
-/C/1-IS x
-/C/1-FCFS
Figure 10.3 QPN model of a central server system with memory constraints
Note that if P1 = ∅ the QPN describes a CGSPN so that the following relation-
ship holds: CGSPNs ⊂ QPNs.
Example 10.2 Fig. 10.3 shows an example of a central server system with mem-
ory constraints. Place p2 represents several terminals, where users start jobs
after a certain thinking time. These jobs request service at the CPU (represented
by the -/C/1-PS queue where C stands for a Coxian distribution) and two I/O
systems (represented by the -/C/1-FCFS queues). To enter the subsystem (CPU
+ I/O systems) each job has to allocate a certain amount of memory. For sim-
plicity the memory size needed by each job is assumed to be the same, which is
represented by a token of colour a on place p1 .
164 10 Queueing Petri Nets
Since we have introduced queueing places, which consist of queues and depos-
itories, a marking M of a QPN consists of two parts M = (n,m) where n
specifies the state of all queues and m is the marking of the underlying CGSPN.
For a queueing place p ∈ P1 , m(p) denotes the marking of the depository. The
initial marking M0 of the QPN is given by M0 = (O,m0 ), where O is the state
describing that all queues are empty and m0 is the initial marking of the CGSPN.
Similar to GSPNs the firing of immediate transitions has priority over the firing
of timed transitions and the service of tokens in queues. Thus, as in GSPNs, the
reachability set of a QPN comprises vanishing and tangible states. If at least one
immediate transition is enabled, M is a vanishing state and tangible otherwise.
Thus
where m[(t,c) > denotes the usual enabling in CPNs (cf. Def. 6.5). ENT (M ) is
the set of enabled transitions at a marking M with respect to a colour c ∈ C(t),
keeping the priority of immediate transitions in mind.
QPNs can be analysed like GSPNs by calculating the steady state distribution of
the reduced embedded Markov chain. For the remaining discussion we consider
only QPNs with finite reachability sets. To simplify notation let us assume that all
queues of the QPN are of type -/M/1-PS and that the first |P1 | places are queueing
places. The service rate of a colour-c token in the queue of a queueing place p
is defined as µ(p,c). A possible state descriptor for such a queue is a function
n(p) : C(p) 7→ N0 where n(p)(c) denotes the number of colour-c tokens in the
queue.
State transitions occur due to the arrival or the service of tokens. With respect to
a service of a colour c ∈ C(p) token the state n(p) changes to
n(p)(c̃) − 1
0 if c̃ = c
n (p)(c̃) =
n(p)(c̃) otherwise
The corresponding rate is given by
n(p)(c)
r(n(p)(c)) = P µ(p,c)
c0 ∈C(p) n(p)(c0 )
1
Recall that each token is served with P n(p)(c0 )
of the server’s capacity
c0 ∈C(p)
and that n(p)(c) colour-c tokens are in the queue. If the queue is empty, i.e.
P 0
c0 ∈C(p) n(p)(c ) = 0, we define r(n(p)(c)) = 0.
The possible state transitions of the QPN can be described in the following way.
Let M = (n,m) be a marking of the QPN. A directly reachable marking M 0 =
(n0 ,m0 ) is defined as follows. If n(p)(c) > 0 for some p ∈ P1 ,c ∈ C(p) then M 0
with respect to a service in place p according to colour c is given by
10.1 Quantitative Analysis of QPNs 165
if p̃ 6= p or c̃ 6= c
0 n(p̃)(c̃)
n (p̃)(c̃) = (10.1)
n(p̃)(c̃) − 1 otherwise
if p̃ 6= p or c̃ 6= c
m(p̃)(c̃)
m0 (p̃)(c̃) = (10.2)
m(p̃)(c̃) + 1 otherwise
and we denote this case by M [(p,c) >QP N M 0 . Eq. (10.1) says that a token of
colour c has left the queue in p and Eq. (10.2) tells us that this token is now on
the depository of p. If (t,c0 ) ∈ ENT (M ), then M 0 is given by
This means, tokens fired onto a queueing place are inserted into the queue (cf.
Eq. (10.3)); the tokens at the depository are removed and ordinary places are
marked according to the usual firing rule of CPNs (cf. Eq. (10.4)). We will denote
this case by M [(t,c0 ) >QP N M 0 .
To specify the transition probabilities of the QPN’s embedded Markov chain1
we now have to take also the service rates into consideration. For a marking
M = (n,m) define
X X
Z(M ) = r (n(p)(c))
p∈P1 c∈C(p)
which is the sum of all rates out of M due to services in all queueing places of
P1 . Furthermore define
With that the transition probability between marking Mk and Mr are defined as
P [Mk → Mr ] =
1
Note that this technique of using the embedded Markov chain is only applicable if the transition
probabilities out of a marking (state) are independent of the time spend in that state (semi-
Markov process). This imposes a restriction on the allowed queues of the QPN.
166 10 Queueing Petri Nets
X
wi (c)
(ti ,c)∈ENT (M ):Mk [(ti ,c)>QP N Mr
if T (M ) ⊆ T2
wj (c0 )
X
(tj ,c0 )∈ENT (Mk )
X
wi (c)
(ti ,c)∈ENXT (M ):Mk [(ti ,c)>QP N Mr
if T (M ) ⊆ T1
wj (c0 ) + Z(Mk )
(tj ,c0 )∈ENT (Mk )
if T (M ) ∩ T2 = ∅
X r(n(p)(c))
and
wj (c0 ) + Z(Mk )
Mk [(p,c) >QP N Mr
(tj ,c0 )∈ENT (Mk )
0 otherwise
(10.5)
The first expression in Eq. (10.5) is the probability that an enabled immediate
transition fires. The second and the third expressions are, respectively, the prob-
abilities that a timed transition fires and that a service completion in a queueing
place occurs. The probabilities in the latter cases (cf. page 131) are given by the
rate causing the state transition divided by the sum of all rates leading out of that
marking.
Having determined the probabilities P [Mk → Mr ] we can proceed as in the
GSPN case by defining the matrices C,D,E and F (cf. Eq. (9.2) on page 142)
and solving the global balance equations of the reduced embedded Markov chain
π̃ = π̃ × P 0 ;
X
π̃s = 1.
Ms ∈T̂
where P 0 is given by Eq. (9.6) and T̂ is the set of tangible states (cf. page 142).
Again we see that a steady state distribution of the QPN exists iff there is no
timeless trap and the reachability set of the QPN has home states.
Given the steady state distribution π̃ of the reduced embedded Markov chain,
the mean number of visits to marking Ms between two consecutive visits of
marking Mj is vsj = π̃π̃sj . Thus the mean cycle time tc (Mj ), i.e. the mean time
between two consecutive visits of Mj , is given by
1 X
wk (c) + Z(Ms ))−1
X
tc (Mj ) = π̃s (
π̃j (t
Ms ∈T̂ k ,c)∈ENT (Ms )
t1
x x
p1 a
p2
b
-/M/1-PS
x x
t2
M0
M1 M2
M6 M7
M3 M4
Since matrix
1 1
1 2 2 0 0
0 1 0 0 0
−1
(I − C) = 0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
we get
2 3
0 5 5 0
2 3
0 0
P 0 = F + E × (I − C)−1 × D = 5 5
3 2
0 0
5 5
3 2
0 5 5 0
Solving
8
0
X
π̃P = π̃ and π̃i = 1
i=5
yields π̃5 = π̃6 = π̃7 = π̃8 = 41 . Thus vkj = 1,∀j,k ∈ {5,6,7,8}. The sojourn
time for tangible markings is given by ts (M5 ) = ( 21 × 3 + 12 × 2)−1 = 52
and ts (Mj ) = (3 + 2)−1 = 51 ,∀j ∈ {6,7,8}. With that the cycle time is given
by tc (Mj ) = 1,∀j ∈ {5,6,7,8}, which yields the steady state distribution for
tangible states: π5 = 25 and πj = 51 ,∀j ∈ {6,7,8}.
10.2 Qualitative Analysis of QPNs 169
According to this enabling rule all definitions for Place-Transition nets can be
defined similarly for QPNs. A timeless trap is now defined as follows:
As in GSPNs timeless traps cannot occur if condition NoTT (cf. Def. 9.5) holds
for QPNs. For QPNs we are able to establish a generalised version of this con-
dition: If an immediate transition has at least one queueing place as an input
place, this transition cannot contribute to a timeless trap, since tokens fired onto
a queueing place are only available to the output transitions after being served.
To serve a token in a queueing place the QPN has to be in a tangible state. Since
we are now dealing with Coloured Petri nets all colours of a transition have to be
considered, because they characterise the different “firing modes” of a transition.
For the •-notation of these sets, see Def. 6.4 on page 118. Condition NoTT en-
sures the absence of timeless traps for QPNs with finite reachability sets and the
proof is similar to the one given for Th. 9.2.
Obviously Th. 9.3 also holds in this context and condition NoTT can be verified
by a similar algorithm as given in Fig. 9.8. We start initially with TH := (T2 )C \
(P1 )C • and use the •-notation according to Def. 6.4.
Assuming that tokens are not created in queues, which holds for all queues we
have learned about so far, we get the following result directly:
The converse is, as in the case of GSPNs, not true, which is shown by Fig. 9.9.
For the derivation of further results, especially on liveness and existence of
home states, we restrict ourselves to QPNs which have an EFC-net structure.
Remember that we have established several useful results for this class of PNs in
Sec. 5.4.3.
(t,a)
(p,a)
t
a x
p
b
(t,b)
(p,b)
x
If you think of the unfolded Petri net of the CPN underlying the QPN, this con-
dition describes the same condition as that in Def 9.7 and it is again of particular
importance for EFC-nets.
Definition 10.6 A QPN is an EFC-QPN iff its underlying unfolded CPN consists
of EFC-nets.
Theorem 10.3 Given an EFC-QPN whose underlying CPN is live and bounded,
then
Condition EQUAL-Conflict =⇒ QPN has no timeless traps.
Proof. Although the proof is similar to the proof of Th. 9.5 we will go more into
the details; just to show how the unfolding of a net can be used for this purpose.
Assume the QPN has a timeless trap, i.e. ∃M ∈ R(QP N,M0 ) :
∀k ∈ N : ∃σ ∈ TC∗ : |σ| ≥ k, such that M [σ >QP N and
∀σ̃ ∈ TC∗ : M [σ̃ >QP N =⇒ σ̃ ∈ (T2 )∗C .
Since T is a finite set, there is at least one element (t̂,ĉ) whose number of occur-
rences in σ is not bounded.
Since the CPN is bounded, Th. 10.2 ensures boundedness of the QPN implying
the finiteness of R(QP N,M0 ). Thus there exists a terminal strongly connected
subset CM ⊆ R(QP N,M ). Define
T̃ := {(t,c)|∃M 0 ∈ CM : M 0 [(t,c) >QP N }. The assumption implies T̃ ⊆
(T2 )C and since CPN is live and bounded, the corresponding unfolded net con-
sists of strongly connected Place-Transition nets. Let us consider the correspond-
ing Place-Transition net which comprises (t̂,ĉ). Because of (∗) there is at least
one transition in the net, which does not contribute to the timeless trap and thus
is not a member of T̃ . Define P̃ := •T̃ , then one of the following two cases holds
with respect to the Place-Transition net being considered:
1. ∃(pr ,cr ) ∈ P̃ :
(pr ,cr )• ⊇ {(ti ,ci ),(tj ,cj )} and (ti ,ci ) ∈ T̃ ,(tj ,cj ) ∈ TC \ T̃ .
The assumption of a timeless trap yields ti ∈ T2 . Thus if M 0 [(ti ,ci ) >QP N
for some marking M 0 ∈ CM , the EFC-net structure and condition EQUAL-
Conflict imply M 0 [(tj ,cj ) >QP N contradicting (tj ,cj ) 6∈ T̃ .
172 10 Queueing Petri Nets
t1
x x
p1 a
p2
b
-/M/1-LCFSPR x
x
t2
2. ∃(tr ,cr ) ∈ T̃ :
(tr ,cr )• ⊇ {(pk ,ck ),(pl ,cl )} and (pk ,ck ) ∈ P̃ ,(pl ,cl ) ∈ PC \ P̃ .
Since (tr ,cr ) ∈ T̃ ,tr fires infinitely often with respect to cr ∈ C(tr ). Since
(pl ,cl ) 6∈ P̃ = •T̃ , the place pl is not bounded with respect to colour
cl ∈ C(pl ), contradicting the boundedness of the QPN. t
u
Considering the theorems we have established for EFC-GSPNs one would also
expect that condition EQUAL-Conflict is sufficient for liveness in the QPN case.
Unfortunately this is not the case, since it might now be possible that the schedul-
ing strategy prevents tokens from being served. Fig. 10.7 shows an example of
this. A token being served at the queueing place p1 immediately returns to this
place and preempts the token in service. Thus the token of colour a or the token
of colour b will never complete its service. If at least one token of each colour
of the queueing place has the opportunity of being served in every state of the
queue, such situations cannot occur. This gives rise to the following definition.
Definition 10.7 A QPN satisfies condition EQUAL-Service iff ∀p ∈ P1 : the ser-
vice time distribution of the queue in p is Coxian and if |C(p)| > 1 then the
scheduling strategy is PS or IS.
If |C(p)| = 1 we can choose an arbitrary scheduling strategy. We only have to
demand that the server stays never idle while there are customers present, which
is one of the main features of so-called work conserving scheduling strategies
[102]. Note that all scheduling strategies we have looked at in Ch. 3 satisfy this
requirement.
Condition EQUAL-Service states that the queue can be analysed by means of
Markovian techniques, since the service time is exponentially distributed in each
stage of service of a token and that for queues serving several colours of tokens
all tokens are served simultaneously.2 With that we can exploit Th. 9.5 to estab-
lish the following:
2
[18] gives a general definition of condition EQUAL-Service also comprising further scheduling
strategies.
10.2 Qualitative Analysis of QPNs 173
···
(t1 ,c) (t2 ,c)
Proof. Since for each queueing place p the service distribution is Coxian and
in case of |C(p)| > 1 the scheduling strategy is PS or IS, each queue can be
unfolded and the service of each token colour can be represented by the GSPN
subnet shown in Fig. 10.8. (t̃i ,c) represents the exponential service time distri-
bution for a token in stage i of its service, (tˆi ,c) represents entering stage (i + 1)
of service and (ti ,c) the completion of service. Note that the rates and the firing
weights of the transitions (t̃i ,c),(tˆi ,c),(ti ,c) are now possibly marking depen-
dent. The resultant GSPN satisfies condition EQUAL-Conflict and the statement
of this theorem follows from Th. 9.5. t
u
If condition EQUAL-Service does not hold, we have already seen that live-
ness does not extend from the CPN to the QPN, even for simple net structures.
Fig. 10.7 also shows that home states might not exist. But even if the QPN is
live, condition EQUAL-Service is essential for preserving the existence of home
states. Fig 10.9 shows a further example of a QPN with no home states. The
queues in the queueing places p2 and p5 serve arriving tokens according to the
FCFS scheduling strategy and the service times are exponentially distributed. If
transition t1 (t3 ) is enabled in the QPN, the token on the input place p1 (p4 ) is
“transferred” to place p2 (p5 ) and a token of the complementary colour is created
on place p3 (p6 ). Transitions t2 and t4 “merge” tokens of the same colour. Serv-
ing tokens according to the FCFS rule yields two strongly connected subsets in
the reachability set of the QPN, such that home states do not exist. These subsets
are characterised by the sequence of tokens in both queues: either “a” ahead of
“b” or “b” ahead of “a”.
174 10 Queueing Petri Nets
-/M/1-FCFS
x x
t1 t2
p2
x x x
if (x = a)
then b p3
else a
a p1
b p4
-/M/1-FCFS
x x
x x
p5
t4 t3
x if (x = a)
then b
p6 else a
As we have seen, introducing time into Place-Transition nets might change the
behaviour and thus the properties of the net significantly. Most of the results pre-
sented in Sec. 9.2 and 10.2 only hold for nets with a restricted structure. Most
nets in practice unveil a more complex net structure and thus only some proper-
ties, like boundedness or P-invariants of the Place-Transition net, extend to the
time-augmented net. Nevertheless, a qualitative analysis of the Place-Transition
net is often useful to gain insight into the behaviour of the net. Since it is often
desirable that the “functioning” of the net does not depend on specific timing
constraints, like e.g. in mutual exclusion problems, such an analysis should be
performed first. Unfortunately, determining essential properties for a quantita-
tive analysis, must often only be done by inspecting the reachability set of the
time-augmented net.
Even if the time-augmented Petri net satisfies all positive qualitative properties
for a quantitative analysis, determining a solution of the global balance equations
becomes intractable for large nets. Hence several authors (cf. [13, 25, 26, 43,
65, 89, 111, 179]) have investigated time-augmented Petri nets with product-
10.3 Some Remarks on Quantitative Analysis 175
Exercise 10.1 Calculate the steady state distribution of the central server model
of Fig. 10.3. Assume that all rates and firing weights are 2.0.
Exercise 10.2 Determine the reachability sets of the QPN of Fig. 10.9 and its
underlying CPN.
176
11 Further Reading
Introductory papers on Stochastic Petri nets are, for example, those by Ajmone-
Marsan [2] and Pagnoni [129].
In this introduction we have only discussed some of the most important time-
augmented Petri net models, which can be analysed using Markovian analy-
sis techniques. There are several other models integrating timing aspects into
Petri nets. We will briefly describe some of them using the classification of time-
augmented Petri nets given on page 129:
Preselection models:
Timed Petri Nets:
• One of the first models considering Petri nets and “time”
was developed by C. Ramchandani [144]. The constant fir-
ing time, i.e. the time delay between enabling and firing,
of a transition ti ∈ T is characterised by a real variable
zi ∈ R+ . If transitions are in conflict the one to reserve to-
kens first is chosen randomly. It might be possible that after
a transition has reserved tokens it becomes enabled again.
Thus a transition might be enabled simultaneously to itself.
In [143] marked graph structures of this TTPN model are
investigated and, similar to [144], the minimum cycle time
177
Since 1985 an international workshop on Timed and Stochastic Petri nets is held
biennial. The title of the first workshop in 1985 was “Timed Petri Nets” [134],
which afterwards changed to “Petri Nets and Performance Models” [135, 136,
137, 138, 139, 140, 141, 142]. Some publications on Timed and Stochastic Petri
Nets can also be found in the annual international conference “Application and
Theory of Petri Nets” and in the “Advances in Petri Nets”.
Further information on QPNs can be accessed via WWW using URL http:
//ls4-www.informatik.uni-dortmund.de/QPN/
Tool support is available for several Stochastic Petri net formalisms (e.g. GSPNs
[50, 51], DSPNs [83, 85, 184, 183, 112, 114, 113], QPNs [27, 30]), see also
[73, 74]. A list on Petri net tools can be accessed via WWW using URL http:
//www.informatik.uni-hamburg.de/TGI/PetriNets/tools.
A proposal has been published defining a common interface description also for
Stochastic Petri nets [28, 47], thus exhibiting the possibility to exchange model
descriptions between different sets of tools.
179
12 Application Examples
s
j
?
J
j j simulation
J
^
... s
j
runs
? ? ?
@
j j
R
@ ?
LATEX1
n
? ?
j collect j
? ?
LATEX2
? ?
j print j
? ?
print
corresponding timed queueing places of the QPN. Places Pi ,i = 1,2,3, model the
three workstations and place P5 the printer. The most interesting queueing place
is P 3, where n3 simulation runs and afterwards a collector job compete with a
LATEX job (LATEX1 or LATEX2) for service at the CPU. Note that this QPN models
an absorbing Markov chain (cf. Sect. 2.1.2) and the mean time until absorption
reflects the mean time until both results have been printed.
The Distributed Queue Dual Bus (DQDB) protocol has been proposed as the
subnetwork for the IEEE 802.6 MAN for the interconnection of Local Area Net-
works, servers, workstations and other devices. The basis of a DQDB network
is a pair of unidirectional buses as illustrated in Fig. 12.3. Nodes are connected
to both buses by a logical OR-writing tap and a reading tap. The Head Station
(frame generator) continuously generates frames. Each frame is subdivided into
slots of equal size and each slot in turn has several fields. The End Station (slave
frame generator) terminates the forward bus and removes all incoming frames
and generates slots at the same transmission rate and of the same sort on the
other bus.
Data to be transmitted, is split up into segments of fixed size fitting on a slot’s
information field. Each slot can be allocated either to isochronous traffic (called
12.2 Node of a DQDB network 181
1‘sim S 1‘LATEX1 L
x x
n3 ‘x
n1 ‘x x
n2 ‘x
x x x x
R-bus
-
6 6 6
? ? ?
Head/End Node Node Node Head/End
... ...
Node 1 i N Node
6 6 6
? ? ?
D-bus
FCFS with
blocking
FCFS with
R bus depart blocking T4 P3
noreq R D bus arrive
T
req req seg seg tok F -/Cox/1-FCFS
NR req S
RQC P1 1‘tok
Arrivals
if y = seg x x
seg
then 1‘tok
else empty
x
if x = req
FCFS with [x=free]
y T3
then 1‘req blocking
else empty T2
RS
P2
T1
if y = req
then 1‘tok
else empty x
x case y of
if x = req seg => 1‘busy
then 1‘req
req => 1‘free
else empty T if x = free
then k‘tok
-/Cox/1-FCFS else empty
P4 F
NR k‘tok
R bus arrive D bus depart
DQDB network.
Fig. 12.5 presents a QPN model for an arbitrary node of a DQDB network. The
definition of the colour sets and the initial marking is located near the corre-
sponding places. E.g. place P 4 has colour set T and will initially contain k to-
kens of type tok. The guard of a transition is given in brackets. E.g. transition
T 2 is enabled if the free variable x is bound to free ([x = free]).
The R- and D-bus are represented by immediate transitions T 1 and T 2,T 3 resp.
Since DQDB mainly deals with two queues: the local queue at each node and the
distributed queue consisting of all first segments at all non-empty local queues,
these queues are modelled explicitly. Part of the distributed queue is modeled by
the immediate queueing place P 2. The state of this queue reveals the information
that node has about the actual distributed queue due to arriving requests on the
184 12 Application Examples
R-bus. Note that e.g. ’Node 1’ does not have any information on the state of
the distributed queue, because it does not know of segments to be transmitted
at other nodes. The basic idea of the QPN model is to represent the value of
the request counter by inserting each request into the FCFS queue at place P 2.
This queue might also contain one segment (the first of the local queue) at most,
which is ensured by place P 3. All other segments have to wait in the immediate
queueing place P 1, whose queue also obeys an FCFS scheduling strategy with
blocking. Place P 4 is complementary to P 2 thus ensuring that the number of
tokens in P 2 will never exceed k = ’maximum value of request counter’ + 1
(first segment of the local queue). Service of the queue is performed by firing of
immediate transition T 2, if an empty slot on the D-bus arrives at this node. In
case of serving a segment at P 2 the formerly empty slot is marked busy. If P 2 is
empty (implying P 4 contains k tokens of type tok) or a busy slot (token of type
busy) arrives, T 3 fires immediately.
Several models of such nodes can be interconnected by immediate transitions to
constitute the R- and D-bus yielding a model of the whole DQDB network.
185
kp(1 − p)k−1
• p ≤ 0.5 for n ≤ 22
Solution to Ex. 1.2 In this case there are two mutually exclusive hypotheses:
G1 “The student knows the correct answer”, and
G2 “The student is guessing”
with probabilities P {G1 } = p and P {G2 } = 1 − p. We observed, event E,
that the student had the answer wrong. The conditional probabilities of E,
given the hypotheses, are
1
P {E|G1 } = 0 P {E|G2 } = 1 −
m
According to the Theorem of Total Probability,
1
P {E} = (1 − )(1 − p).
m
Using Bayes Theorem we get the answer
P {E|G2 }P {G2 }
P {G2 |E} =
P {E|G1 }P {G1 } + P {E|G2 }P {G2 }
= 1
which is to be expected.
Solution to Ex. 2.1
• The stochastic process changes state every day and since we know
that two sunny days never follow one another the transition probabil-
ities are not strictly state independent. Assuming that the process is
Markovian is thus an approximation only.
186 13 Solutions to Selected Exercises
• If we let S,R and D represent a sunny, rainy and dull day respectively,
then we can define a new stochastic process by considering the states
SS,SR,SD etc. which would represent the weather on two consecu-
tive days. We need to determine new transition probabilities as well.
A Markovian process will approximate this new process more closely
than in the previous case.
Solution to Ex. 2.5 Draw the process as a discrete time Markov chain with 4
states of which state 0 is one absorbing state (the other is clearly C). Then
0 p
Q=
q 0
and
q 0
R=
0 p
N= 1−pq 1−pq
q 1
1−pq 1−pq
and the steady state probability matrix NR. From the latter the probability
of starting in state 1 and ending in state 0 is given by
q
n10 = .
1 − pq
1+p
1 − pq
Solution to Ex. 2.9 There are 1.62 computers broken on the average and they
8 6 3
break down at a mean rate of 2.76 (= 2 × 21 + 4 × 21 + 6 × 21 ) per day.
πk = (k + 1)ρk π0
= (k + 1)ρk (1 − ρ)2
2ρ
N =
1−ρ
Solution to Ex. 3.11 Introducing a speed vector ci , which describes the speed of
the server when i customers are present, allows one to write the solution to
both parts (a) and (b) using one formula:
K
n! Y ρni i
P [(n1 , . . . ,nK )] = P [(0, . . . ,0)] Qn ( ) (13.1)
i=1 ci i=1 ni !
where
λi
ρi =
µi
K
X
ρ = ρi (< 1, ergodicity condition)
i=1
XK
n = ni
i=1
∞
ρj
)−1
X
P [(0, . . . ,0)] = ( Qj
j=0 i=1 ci
i=1
ni !
t2
p5
p1 p2
t1 t4 p4
p3
t3
Solution to Ex. 5.11 The coverability tree is not sufficient to determine liveness.
Fig. 5.16 displays two Petri nets which have the same coverability tree. The
Petri net displayed on the left side is not live (e.g. M0 [t1 t2 > M 0 yields a
marking M 0 in which no transition is enabled) whereas the Petri net on the
right side is live.
Solution to Ex. 5.14 The safe Place-Transition net of Fig. 13.1 is not covered by
positive P-invariant, since there is no positive P-invariant covering place p5 .
Solution to Ex. 5.21 The first and the third algorithm are correct implementa-
tions. The fourth algorithm is an incorrect solution for the famous dining
189
philosopher problem. The system might reach a deadlock state, e.g. if all in-
volved processes perform their “P(sem[i])”-operation simultaneously. The
second algorithm is also incorrect, since both processes might enter the crit-
ical region simultaneously. One can see that as follows:
Statements of process P0 Statements of process P1
flag[1] := true;
turn = 0 =⇒ enter while loop
flag[0] = false
=⇒ skip inner while loop
flag[0] := true;
turn = 0
=⇒ enter critical region
turn := 1;
turn = 1 =⇒ skip while loop
enter critical region
Solution to Ex. 9.6 All conjectures do not hold, since we have the following
counterexamples:
Solution to Ex. 9.8 This simple unbounded GSPN is quite interesting, since the
corresponding Markov process has no steady state distribution irrespective
of the values of λ and µ.
190 13 Solutions to Selected Exercises
λ λ λ λ λ λ λ λ λ λ
µ µ µ µ µ µ µ µ µ µ
The most important step proving this is in finding an appropriate state rep-
resentation for the infinite Markov chain. Since transition t3 is immedi-
ate, we have that whenever M (p1 ) > 0, M (p2 ) = 0 holds and similarly
M (p2 ) > 0 implies M (p1 ) = 0. Thus M (p1 ) − M (p2 ) is a sufficient state
descriptor and the potentially two dimensional Markov chain of the GSPN
can be represented in one dimension as shown in Fig. 13.3.
The global balance equations are given by
which rewrites as
The reader should note that all conclusions hold (and thus no steady state
distribution exists) irrespective of the values of λ and µ!
The unbounded GSPN of Fig. 9.20 can, e.g., be used to describe the core
transshipping activities in logistic nodes (cf.[24]). Vehicles arrive at a rate
of λ delivering a unit to the store (p1 ) of the logistic node, whereas vehicles
wanting to load a unit are arriving at a rate of µ and have to wait (p2 ) when
their demands cannot be satisfied because of an empty storage. The time for
loading and unloading etc. is neglected in the model.
In [23] this effect is described in more detail and it is also shown that a
simulation of such a system runs the immanent danger of leaving this effect
uncovered and assuming a stationary process.
1
Pn
Note that in i=−n ( µλ )i . . . we have n terms with a factor of α1 := µλ and similarly n terms
with the reciprocal factor α2 := µλ . Thus α1 ≥ 1 or α2 ≥ 1 holds irrespective of the values of
λ and µ.
192 13 Solutions to Selected Exercises
193
Bibliography
[1] G.A. Agha, F. De Cindio, and G. Rozenberg, editors. Concurrent Object-
Oriented Programming and Petri Nets, Advances in Petri Nets 2001, vol-
ume 2001. Lecture Notes in Computer Science, Springer-Verlag, 2001.
[2] M. Ajmone-Marsan. Stochastic Petri nets: An elementary introduction. In
Advances in Petri Nets, pages 1–29. Lecture Notes in Computer Science,
Vol. 424, Springer-Verlag, 1989.
[3] M. Ajmone-Marsan, editor. Proceedings of the 14th International Con-
ference on Application and Theory of Petri Nets, Chicago (USA), volume
691. Lecture Notes in Computer Science, Springer-Verlag, June 1993.
[4] M. Ajmone-Marsan, G. Balbo, A. Bobbio, G. Chiola, G. Conte, and
A. Cumani. On Petri nets with stochastic timing. In Proceedings of the
International Workshop on Timed Petri Nets, Torino, pages 80–87, 1985.
[5] M. Ajmone-Marsan, G. Balbo, A. Bobbio, G. Chiola, and A. Cumani. The
effect of execution policies in the semantics and analysis of Stochastic
Petri nets. IEEE Transactions on Software Engineering, 15(7):832–846,
1989.
[6] M. Ajmone-Marsan, G. Balbo, and G. Conte. Performance Models of Mul-
tiprocessor Systems. MIT Press Series in Computer Science, 1986.
[7] M. Ajmone-Marsan, G. Balbo, G. Conte, S. Donatelli, and G. Franceschi-
nis. Modelling with Generalized Stochastic Petri Nets. Wiley Series in
Parallel Computing. John Wiley and Sons, 1995.
[8] M. Ajmone-Marsan and G. Chiola. On Petri nets with deterministic and
exponential transition firing times. In Proceedings of the 7th European
Workshop on Application and Theory of Petri Nets, Oxford, pages 151–
165, 1986.
[9] M. Ajmone-Marsan and G. Chiola. On Petri nets with deterministic and
exponentially distributed firing times. In G. Rozenberg, editor, Concur-
rency and Nets. Advances in Petri Nets, pages 132–145. Springer-Verlag,
1987.
[10] M. Ajmone-Marsan and G. Chiola. Improving the efficiency of the anal-
ysis of DSPN models. In Proceedings of the 9th European Workshop on
Application and Theory of Petri Nets, Venice, pages 183–201, 1988.
[11] M. Ajmone-Marsan, G. Conte, and G. Balbo. A class of Generalised
Stochastic Petri Nets for the performance evaluation of multiprocessor sys-
tems. ACM Transactions on Computer Systems, 2:93–122, 1984.
194 13 Bibliography
[13] G. Balbo, S.C. Bruell, and M. Sereno. Arrival theorems for product-form
stochastic Petri nets. In SIGMETRICS, pages 87–97, May 1994.
[18] F. Bause. Queueing Petri nets: a formalism for the combined qualita-
tive and quantitative analysis of systems. In Proceedings of the 5th In-
ternational Workshop on Petri Nets and Performance Models, Toulouse
(France), pages 14–23. IEEE, October 1993.
[19] F. Bause. Petri nets and priorities. Technical Report 564, Fachbereich
Informatik der Universität Dortmund (Germany), 1995.
[20] F. Bause. On the Analysis of Petri Nets with Static Priorities. Acta Infor-
matica, 33(7):669–685, 1996.
[26] F. Bause and P. Buchholz. Queueing Petri nets with product form solution.
Performance Evaluation, 32(4):265–299, 1998.
[27] F. Bause, P. Buchholz, and P. Kemper. QPN-Tool for the specification and
analysis of hierarchically combined Queueing Petri Nets. In H. Beilner
and F. Bause, editors, Quantitative Evaluation of Computing and Com-
munication Systems, volume LNCS 977, pages 224–238. Springer-Verlag,
Berlin, 1995.
[28] F. Bause and H. Beilner (eds.). Performance tools - model interchange for-
mats. Technical Report 581, Fachbereich Informatik der Universität Dort-
mund (Germany); also presented at the Joint International Conference on
“Modelling Techniques and Tools for Computer Performance Evaluation”
and “Measuring, Modelling and Evaluating Computing and Communica-
tion Systems”, Sept. 1995, Heidelberg (Germany), 1995.
[29] F. Bause and P. Kemper. Queueing Petri nets. In Proceedings of the 3rd
Fachtagung Entwurf komplexer Automatisierungssysteme, Braunschweig.
Technische Universität Braunschweig, May 1993.
[30] F. Bause and P. Kemper. QPN-Tool for the qualitative and quantitative
analysis of Queueing Petri Nets. In G. Haring and G. Kotsis, editors, Proc.
of the 7th International Conference on Computer Performance Evaluation,
Modelling Techniques and Tools, Vienna (Austria), LNCS 794, pages 321–
334. Springer-Verlag, Berlin, 1994.
[34] E. Best. Structure theory of Petri nets: The free choice hiatus. In Advances
in Petri Nets, Part I, pages 168–205. Springer-Verlag, 1986.
[35] E. Best and J. Desel. Partial order behaviour and structure of Petri nets.
Technical Report 373, Arbeitspapiere der GMD, Gesellschaft für Mathe-
matik und Datenverarbeitung, Sankt Augustin, Germany, 1989.
[36] E. Best, J. Desel, and J. Esparza. Traps characterize home states in free
choice systems. Theoretical Computer Science, 101:161–176, 1992.
[37] E. Best and M.W. Shields. Some equivalence results for free choice nets
and simple nets on the periodicity of live free choice nets. In Proceedings
of the 8th Colloquium on Trees and Algebra and Programming, pages 141–
154. Lecture Notes in Computer Science, 159, 1983.
[38] E. Best and P.S. Thiagarajan. Some classes of live and safe Petri nets. In
Advances in Petri Nets, pages 71–94. Springer-Verlag, 1987.
[39] E. Best and K. Voss. Free choice systems have home states. Acta Infor-
matica, 21:89–100, 1984.
[45] W. Brauer, W. Reisig, and G. Rozenberg, editors. Petri Nets: Central Mod-
els and Their Properties. Advances in Petri Nets 1986, Part I, volume 254.
Lecture Notes in Computer Science, Springer-Verlag, 1987.
[47] P. Buchholz and P. Kemper. APNNed – a net editor and debugger within
the APNN toolbox. In J. Desel, P. Kemper, E. Kindler, and A. Oberweis,
editors, Forschungsbericht: 5. Workshop Algorithmen und Werkzeuge für
Petrinetze. Universität Dortmund, Fachbereich Informatik, 1998.
[48] P.J. Burke. The output of a queueing system. Operations Research, 4:699–
704, 1956.
[49] M.L. Chaudhry and J.G.C. Templeton. A First Course in Bulk Queues.
John Wiley and Sons, 1983.
[50] G. Chiola. A graphical Petri net tool for performance analysis. In Proceed-
ings of the 8th European Workshop on Application and Theory of Petri
Nets, Zaragoza (Spain), pages 317–331, 1987.
[52] G. Ciardo and A. S. Miner. A data structure for the efficient kronecker so-
lution of GSPNs. In Proc. 8th Int. Workshop on Petri Net and Performance
Models (PNPM’99), 8-10 October 1999, Zaragoza (Spain), pages 22–31,
1999.
[54] J.-M. Colom and M. Koutny, editors. Proceedings of the 22nd Inter-
national Conference on Application and Theory of Petri Nets, Newcas-
tle upon Tyne (UK), volume 2075. Lecture Notes in Computer Science,
Springer-Verlag, June 2001.
[55] J.E. Coolahan and N. Roussopoulos. A timed Petri net methodology for
specifying real-time system requirements. In Proceedings of the Interna-
tional Workshop on Timed Petri Nets, Turino, pages 24–31, 1985.
[56] P.J. Courtois and P. Semal. Bounds for transient characteristics of large
or infinite Markov chains. In W.J. Stewart, editor, Numerical Solutions of
Markov Chains, pages 413–434. Marcel Dekker, Inc., 1990.
[57] D.R. Cox. A use of complex probabilities in the theory of complex pro-
cesses. Proc. Cambridge Phil. Soc., 51:313–319, 1955.
[60] J. Desel and J. Esparza. Free Choice Petri Nets. Cambridge University
Press, 1995.
[61] M. Diaz. Petri net based models in the specification and verification of pro-
tocols. In G. Rozenberg, editor, Petri Nets: Applications and Relationship
to Other Models of Concurrency. Advances in Petri Nets. Proceedings of
an Advanced Course, Bad Honnef, pages 135–170. Lecture Notes in Com-
puter Science, Vol. 255, Springer-Verlag, 1986.
[65] S. Donatelli and M. Sereno. On the product form solution for stochastic
Petri nets. In Proceedings of the 13th International Conference on Appli-
cation and Theory of Petri Nets, Sheffield (UK), pages 154–172, 1992.
[66] J.B. Dugan. Extended Stochastic Petri Nets: Applications and Analysis.
PhD thesis, Department of Electrical Engineering, Duke University, 1984.
[69] J. Esparza. Synthesis rules for Petri nets, and how they lead to new re-
sults. In J.C.M. Baeten and J.W. Klop, editors, Proceedings of CON-
CUR’90: Theories of Concurrency: Unification and Extension, pages 183–
198. Springer-Verlag, Berlin, 1990.
[70] J. Esparza. Reduction and synthesis of live and bounded free choice nets.
Technical report, Hildesheimer Informatikberichte, Institut für Informatik,
Universität Hildesheim, 1991.
199
[72] J. Esparza and M. Silva. Top-down synthesis of live and bounded free
choice nets. In Proceedings of the 1tth International Conference on the
Application and Theory of Petri Nets, Paris, pages 63–83, 1990.
[73] F. Feldbrugge. Petri Net Tool Overview 1989, chapter in [157], pages 151–
178. Lecture Notes in Computer Science, Springer-Verlag, 1990.
[74] F. Feldbrugge. Petri Net Tool Overview 1992, chapter in [161], pages 169–
209. Lecture Notes in Computer Science, Springer-Verlag, 1993.
[79] H.J. Genrich and K. Lautenbach. System modelling with high level Petri
nets. Theoretical Computer Science, pages 109–136, 1981.
[81] R. German. New results for the analysis of deterministic and stochastic
Petri nets. In Proc. IEEE International Performance and Dependability
Symposium, Erlangen (Germany), pages 114–123, 1995.
[99] K. Jensen and G. Rozenberg, editors. High-level Petri Nets. Theory and
Application. Springer-Verlag, 1991.
[100] J.W. Jewell. A simple proof of L = λW . Operations Research, 15:1109–
1116, 1967.
[101] R. Johnsonbaugh and T. Murata. Additional methods for reduction and
expansion of marked graphs. IEEE Transactions on Circuit and Systems,
28(10):1009–1014, 1981.
[102] K. Kant. Introduction to Computer System Performance Evaluation.
McGraw-Hill, Inc., 1992.
[103] J.G. Kemeny and J.L. Snell. Finite Markov Chains. Springer-Verlag, New
York, 1960.
[104] P. Kemper. Linear time algorithm to find a minimal deadlock in a strongly
connected free-choice net. In M. Ajmone-Marsan, editor, Proceedings
of the 14th International Conference on Application and Theory of Petri
Nets. Springer-Verlag, Berlin, 1993.
[105] P. Kemper. Numerical analysis of superposed GSPNs. IEEE Transactions
on Software Engineering, 22(9):615–628, September 1996.
[106] P. Kemper. Reachability analysis based on structured representations. In
Lecture Notes in Computer Science; Proc. 17th International Conference
in Application and Theory of Petri Nets (ICATPN’96), Osaka, Japan, vol-
ume 1091, pages 269–288. Springer-Verlag, June 1996.
[107] P. Kemper and F. Bause. An efficient polynomial-time algorithm to decide
liveness and boundedness of free choice nets. In K. Jensen, editor, Pro-
ceedings of the 13th International Conference on Application and Theory
of Petri Nets, volume LNCS 616, pages 263–278. Springer-Verlag, Berlin,
1992.
[108] L. Kleinrock. Queueing Systems. Volume 1: Theory. John Wiley and Sons,
1975.
[109] R. Kosaraju. Decidability of reachability in vector addition systems. In
Proceedings of the 14th Annual ACM Symposium on Theory of Computing,
pages 267–280, 1982.
[110] R. Lal and U.N. Bhat. Reduced systems in Markov chains and their appli-
cations in queueing theory. Queueing Systems, 2:147–172, 1987.
[111] A.A. Lazar and T.G. Robertazzi. Markovian Petri net protocols with prod-
uct form solution. Performance Evaluation, 12:67–77, 1991.
[112] C. Lindemann. DSPNexpress: a software package for the efficient solution
deterministic and stochastic Petri nets. Performance Evaluation, 1995.
202 13 Bibliography
[116] K. Marshall and R. Wolff. Customer average and time average - queue
lengths and waiting times. J. of Appl. Probability, 8:535–542, 1971.
[117] J. Martinez and M. Silva. A simple and fast algorithm to obtain all in-
variants of a generalized Petri net. In Application and Theory of Petri
Nets, Selected Papers from the First and Second European Workshop on
Application and Theory of Petri Nets. Informatik-Fachberichte, No. 52,
Springer-Verlag, 1981.
[118] E.W. Mayr. An algorithm for the general Petri net reachability problem.
In Proc. of the 13th Annual ACM Symp. on Theory of Computing, pages
238–246, 1981.
[119] E.W. Mayr. An algorithm for the general Petri net reachability problem.
SIAM, Journal Comput., 13(3):441–460, August 1984.
[122] R. Milner, R. Harper, and M. Tofte. The definition of standard ML. MIT
Press, 1990.
[123] A.S. Miner and G. Ciardo. Efficient reachability set generation and storage
using decision diagrams. In Proc. of the 20th Int. Conf. on Application
and Theory of Petri Nets 1999, Williamsburg, VA (USA). Lecture Notes in
Computer Science Vol. 1639, pages 6–25, 1999.
[126] T. Murata and J.Y. Koh. Reduction and expansion of live and safe marked
graphs. IEEE Transactions on Circuit and Systems, 27(1):68–71, 1980.
[130] J.L. Peterson. Petri nets. ACM Computing Surveys, 9:242–252, September
1977.
[132] J.L. Peterson. Petri Nets and the Modelling of Systems. MIT Press Series
in Computer Science, 1981.
[133] C.A. Petri. Kommunikation mit Automaten. PhD thesis, Universität Bonn,
1962.
[135] Proceedings of the 2nd International Workshop on Petri Nets and Perfor-
mance Models, Madison (USA). IEEE Computer Society Press, 1987.
[136] Proceedings of the 3rd International Workshop on Petri Nets and Perfor-
mance Models, Kyoto (Japan). IEEE Computer Society Press, 1989.
[137] Proceedings of the 4th International Workshop on Petri Nets and Per-
formance Models, Melbourne (Australia). IEEE Computer Society Press,
1991.
[138] Proceedings of the 5th International Workshop on Petri Nets and Perfor-
mance Models, Toulouse (France). IEEE Computer Society Press, 1993.
[139] Proceedings of the 6th International Workshop on Petri Nets and Perfor-
mance Models, Durham (USA). IEEE Computer Society Press, 1995.
[140] Proceedings of the 7th International Workshop on Petri Nets and Perfor-
mance Models, Saint Malo (France). IEEE Computer Society Press, 1997.
[141] Proceedings of the 8th International Workshop on Petri Nets and Perfor-
mance Models, Zaragoza (Spain). IEEE Computer Society Press, 1999.
204 13 Bibliography
[142] Proceedings of the 9th International Workshop on Petri Nets and Perfor-
mance Models, Aachen (Germany). IEEE Computer Society Press, 2001.
[147] R.R. Razouk and C.V. Phelps. Performance analysis using Petri nets. In
Proceedings of the IFIP WG 6.1 4th International Workshop on Proto-
col, Specification, Testing, and Verification, pages 561–576, Skytop Lodge
(USA), 1984.
[148] W. Reisig. Petri nets with individual tokens. In Applications and Theory of
Petri Nets. Selected Papers from the 3rd European Workshop on Applica-
tions and Theory of Petri Nets, Varenna (Italy). Informatik-Fachberichte,
No. 66, Springer-Verlag, 1982.
[151] T.G. Robertazzi. Computer Networks and Systems: Queueing Theory and
Performance Evaluation. Springer, 1990.
[153] G. Rozenberg, editor. Advances in Petri Nets 1984, volume 188. Lecture
Notes in Computer Science, Springer-Verlag, 1985.
[154] G. Rozenberg, editor. Advances in Petri Nets 1985, volume 222. Lecture
Notes in Computer Science, Springer-Verlag, 1986.
[155] G. Rozenberg, editor. Advances in Petri Nets 1987, volume 266. Lecture
Notes in Computer Science, Springer-Verlag, 1987.
[156] G. Rozenberg, editor. Advances in Petri Nets 1988, volume 340. Lecture
Notes in Computer Science, Springer-Verlag, 1988.
205
[157] G. Rozenberg, editor. Advances in Petri Nets 1989, volume 424. Lecture
Notes in Computer Science, Springer-Verlag, 1990.
[158] G. Rozenberg, editor. Advances in Petri Nets 1990, volume 483. Lecture
Notes in Computer Science, Springer-Verlag, 1991.
[159] G. Rozenberg, editor. Advances in Petri Nets 1991, volume 524. Lecture
Notes in Computer Science, Springer-Verlag, 1991.
[160] G. Rozenberg, editor. Advances in Petri Nets 1992, volume 609. Lecture
Notes in Computer Science, Springer-Verlag, 1992.
[161] G. Rozenberg, editor. Advances in Petri Nets 1993, volume 674. Lecture
Notes in Computer Science, Springer-Verlag, 1993.
[162] G. Rozenberg, editor. Advances in Petri Nets 1998, volume 1499. Lecture
Notes in Computer Science, Springer-Verlag, 1998.
[163] V.M. Savi and X. Xie. Liveness and boundedness analysis for Petri nets
with event graph modules. In Proceedings of the 13th International Con-
ference on Application and Theory of Petri Nets, pages 328–347. Springer-
Verlag, 1992.
[164] M. Sereno and G. Balbo. Computational algorithms for product form solu-
tion stochastic Petri nets. In Proceedings of the 5th International Workshop
on Petri Nets and Performance Models, Toulouse (France), pages 98–107.
IEEE Computer Society Press, Oct. 1993.
[165] M. Sereno and G. Balbo. Mean value analysis of stochastic petri nets.
Performance Evaluation, 29(1):35–62, 1997.
[173] E. Teruel and M. Silva. Liveness and home states in equal conflict systems.
In Proceedings of the 14th International Conference on Application and
Theory of Petri Nets, Chicago (USA), pages 415–432, 1993.
[175] P.S. Thiagarajan and K. Voss. In praise of free choice nets. In Advances in
Petri Nets, pages 438–454. Springer-Verlag, 1984.
[178] W. Vogler. Live and bounded free choice nets have home states. In
Petri Net Newsletters, pages 18–21. Special Interest Group On Petri Nets
and Related System Models, Gesellschaft für Informatik (GI), Germany, 4
1989.
[179] I.Y. Wang and T.G. Robertazzi. Service stage Petri net models with prod-
uct form. Queueing Systems, 7:355–374, 1990.
[181] C.Y. Wong, T.S. Dillon, and K.E. Forward. Timed place Petri nets with
stochastic representation of place time. In Proceedings of the International
Workshop on Timed Petri Nets, Turino, pages 96–103, 1985.
[182] S.S. Yau and C.R. Chou. Control flow analysis of distributed comput-
ing system software using structured Petri net models. In Proceedings
of the Workshop on Future Trends of Distributed Systems in the 1990s,
HongKong, pages 174–183, 9 1988.
207
[185] W.M. Zuberek. Timed Petri nets and preliminary performance evaluation.
In Proceedings IEEE 7th Annual Symposium on Computer Architecture,
pages 89–96, 1980.
[186] W.M. Zuberek. Performance evaluation using extended Petri nets. In Pro-
ceedings of the International Workshop on Timed Petri Nets, Turino, pages
272–278, 1985.
208 13 Bibliography
Index 209
Index
ENT (M ), 139, 164 — MVA, 73
PC , 169 BCMP-type queues, 70
SM S , 117 BCMP-type queues, 72
TC , 169 Bernoulli distribution, 24
#, 112 Bernoulli random variable, 16
ω, 91 Binomial random variable, 16
nth central moment, 19 birth-death process, 61
nth moment, 19 boundedness, 87, 89
N, 23, 97 — in EFC-nets, 107
N0 , 23 — in GSPNs, 151
R, 117 — in marked graphs, 105
R+ , 140 — in QPNs, 170
Z, 97 — in state machines, 102
bulk arrival, 72
absorbing bulk service, 72
— chain, 35
— state, 29 central server model, 163
addition of multi-sets, 117 CGSPN, 158, 163
Advances in Petri Nets, 126 chain, 21
age memory, 129 Chapman-Kolmogorov equation, 26, 49, 50
algorithm for condition NoTT, 152 closure
analysis procedure for time-augmented Petri — reflexive and transitive, 83
nets, 149 coefficient of variation, 20
aperiodic state, 30 colour
Application and Theory of Petri Nets, 126 — multi-set, 116
application examples, 179 — of a token, 116
arc, 77 — of a transition, 116
— counter-alternate, 177 colour function, 118
— probabilistic, 177 Coloured GSPN, 158, 163
arrival rate, 57 Coloured Petri net, 116, 118
arrival theorem, 73 — colour function, 118
asymmetric choice net, 125 — expression representation, 121
atomic net, 112 — graphical representation, 121
atomicity of statements, 113 — meta language ML, 121
average value, 19 — Turing machine power of, 125
— with infinite number of colours, 125
backward incidence function, 82 combined qualitative and quantitative anal-
backward incidence matrix, 95 ysis, 148
bag, 117 complexity
— multi-set, 117 — of reachability problem, 113
batch arrival, 72 condition
batch service, 72 — EQUAL-Conflict, 156
Bayes’s theorem, 15 — EQUAL-Service, 172
BCMP network, 72 — NoTT, 150
— arrival theorem, 73 — NoTT for QPNs, 169
— convolution algorithm, 73 — of ergodicity, 63
210 Index