Measurement of Fairness in Process Models Using
Entropy and Stochastic Petri Nets
Martin Ibl
Institute of System Engineering and Informatics, University of Pardubice, Pardubice, Czech Republic
Keywords: Fairness, Stochastic Petri Nets, Entropy, Behavioural Analysis, Process Measure.
Abstract: Measurements of various properties of the process models in the last few years become relatively widely
explored area. These are properties such as uncertainty, complexity, readability or cohesion of process
models. Quantification of these properties can provide better insight in term of, for instance, user-
friendliness, predictability, clarity, etc. of the process model. The aim of this work is to design a method for
quantification of fairness in the process models which are modelled using stochastic Petri nets. The method
is based on mapping the set of all reachable markings of Petri net into Markov chain and then quantification
of entropy from stationary probabilities of the individual places (all places or a specific subset). The
resulting value of fairness is from the interval <0, 1>.
1 INTRODUCTION
There are a number of modelling languages that are
used to describe business processes. Individual
modelling languages differ from each other mainly
in notation, modelling ability (power), mathematical
foundation, etc. In recent years a several metrics
began to disseminate that measure specific
characteristics in the models, which were developed
by specific modelling languages. These properties
are for instance uncertainty (Jung et al., 2011, Ibl,
2013), complexity (Lassen and van der Aalst, 2009)
or cohesion (Reijers and Vanderfeesten, 2004). The
measurement of these properties can be used for
evaluation of variety assumptions, which are relative
to the model and outline more detailed information
about their structure and behaviour. The evaluation
of these properties can provide useful information
during analysis of, for instance, user-friendliness,
understandability, usability, maintainability and
other (González et al., 2010).
In this work is proposed a procedure for the
analysis and evaluation of fairness in the models
created using stochastic Petri nets. Quantification of
fairness in process models can implies a number of
factors such as the overload of nodes, bottleneck,
starvation, etc. Increasing of fairness in the process
model can lead to more effective static and dynamic
characteristics of the modelled system / process.
Petri nets (Petri, 1962) are an appropriate tool for
modelling processes, which are characterized by a
non-determinism, synchronization, parallelism and
concurrency. Stochastic Petri nets (Molloy, 1982)
extends the classic Petri nets with the possibility to
allocate exponential distribution to each transition,
which allows to refine the behaviour of the modelled
system and also to execute various performance
analysis.
According to ("Fairness", 2011), the concept of
fairness is defined as: „The quality of treating people
equally or in a way that is right or reasonable”.
When analysing reactive and concurrent systems
(Völzer and Varacca, 2012), this term is understood
more generally and formally, for instance, fairness
does not need to be in connection with people, but
any abstract entities (machinery, departments,
communication channels, etc.). The term “treating”
specifies any process, which is in association with
these entities. From this perspective, it is then
possible to divide these entities into those for which
is the process defined (e.g., packets in the process of
network communication) and those, which provide
the process (e.g., switches and communication
channels in the process of network communication).
On the fairness can thus be regarded as a
prerequisite (predicate), which is related to the
system / process. The classic view of fairness in
reactive and concurrent systems is associated with a
number of (usually infinite) occurrences of some
115
Ibl M..
Measurement of Fairness in Process Models Using Entropy and Stochastic Petri Nets.
DOI: 10.5220/0005098301150120
In Proceedings of the 9th International Conference on Software Paradigm Trends (ICSOFT-PT-2014), pages 115-120
ISBN: 978-989-758-037-6
Copyright
c
2014 SCITEPRESS (Science and Technology Publications, Lda.)
specific events (e.g., thread A is waiting to enter the
critical section) in an infinite sequence of events
(execution), which can occur in a given system
(Baier and Katoen, 2008).
One of the most widespread theories of fairness
is linked to the issue of formal specification and
verification. In this area, the concept of fairness is
regarded as a temporal property, which, along with
safety and liveness represents the behavioural
properties that are verified on the system / model (e.
g., model checking) (Baier and Katoen, 2008).
Another area, which deals with the notion of
fairness, is the queuing theory (Larson, 1987, Palm,
1953). In this area was always preferred the
examination of performance characteristics such as
throughput, response time, queue length, etc. In the
last decade, however, the fairness has begun to be
more important. According to (Raz et al., 2004), the
fairness in the queuing theory is divided into fairness
with regard to the order (time of arrival), time of
service and operational deployment.
The above described “classic” view of farness is
associated with the entities whose progress
(concurrency) is modelled (e.g., processes in an
operating system, customers in a supermarket, users
of a website, material in the manufacture, etc.). The
second way to look at fairness is associated with the
entities that provide the process (e.g., machinery,
employees, processors, servers, etc.). In this work
presented view of fairness is associated with this
second way. Fairness in this context is understood as
the uniformity of the workload of specific entities
that provide the process. Fairness as defined in the
area of scheduling, formal verification or Petri nets
is usually a categorization. This means that the
assumption is verified and the result is only to
determine whether a system / model meets this
assumption or not (True or False). The approach
presented in this work allows quantifying fairness in
terms of uniformity of workload, i.e. what specific
proportion of time each entity has against other
entities (portion of time each state of system occurs
against all states.
The aim of this work is to define a method that
allows quantifying the fairness of stochastic Petri net
models. This objective is achieved using the
concepts of information theory (Shannon´s entropy
(Shannon, 1948)) and stochastic processes (Markov
chains).
2 STOCHATIC PETRI NETS
The following is the definition of stochastic Petri
nets (Molloy, 1982) and few basic concepts that
will be needed in the following . A solid
introduction to stochastic Petri nets can be found in
(Marsan, 1990).
Definition 2.1: Stochastic Petri net is a 5-tuple,
,,,,,
where:

,
,
,
,…,
– a finite set of
places,

,
,
,…,
– a finite set of
transitions,
places and transitions are
mutually disjoint sets,
 – a set of
edges, defined as a subset of the set of all
possible connections,
Λ:
– an exponentially distributed
firing rate of transitions,
W:F N
1
– a weight function, defines the
multiplicity of edges,
C:P N_1 – capacities of places,,
:→
– an initial marking.
Definition 2.2: Marking of Stochastic Petri net
Let ,,,,,
 is a stochastic
Petri net. Map:
, is called marking of
Petri net SPN.
Marking represents the state of the network after
execution a specific number of steps, i.e. the firing a
specific number of enabled transitions. If a transition
is enabled (or not) depends on the net structure and
the actual marking.
Definition 2.3: Pre-set, Post-set
Let ,,,,,
 is a stochastic
Petri net. Pre-sets and post-sets are defined as:
|,∈ – the set of input
transitions of ,
|,∈ – the set of input places
of,
|,∈ – the set of output
transitions of,
|,∈ – the set of output
places of.
Definition 2.4: Enabled transition
Let ,,,,,
 is a stochastic
Petri net. Transition  is called enabled with
markingMM‐enabled,if
∀
:

,
∀
:


,
ICSOFT-PT2014-9thInternationalConferenceonSoftwareParadigmTrends
116
Definition 2.5: Next marking
Let ,,,,,
 is a stochastic
Petri net and is its marking. If a transition ∈ is
enabled at marking, then by its execution is
obtained next marking´, which is defined as
follows:
∀:´

,
,
\

,
,
\

,

,
,
∩

The situation that the transition changes the
marking to´, is usually expressed as
´.
Definition 2.6: Sequence of transitions,
reachability
Let ,,,,,
 is a stochastic
Petri net. Sequence of transitions is the sequence
of enabled transition that lead from marking to
another marking´. This situation is denoted
as
´. A marking for which there is a sequence
of transitions from the initial marking is called
reachable marking.
Definition 2.7: The set of all reachable marking
Let ,,,,,
 is a stochastic
Petri net and is its marking. The set of all possible
markings reachable from initial marking
in a
Petri net  is denoted by ,
or
simply
.



⋯
|
|




⋯
|
|

⋮⋮



⋯
|
|

Definition 2.8: Boundedness
Let ,,,,,
 is a stochastic
Petri net. Place ∈ is called -bounded if:
∃
:∀
:
Place ∈ is called bounded, if it is k-bounded
for some
. If every place in PN is bounded,
then this net is called bounded Petri net.
Definition 2.9: Live marking, live net
Let ,,,,,
 is a stochastic
Petri net. Marking ∈
is live, if ∀
exist some marking
∈
such that transition
is
-enabled. If ∀
is live, then  is
live.
3 PROBABILITY OF MARKINGS
AND MARKOV CHAINS
The set of all reachable markings can be expressed
in terms of Markov chains (Molloy, 1982). For the
purposes of defining the stationary probability of
each marking ∈
is important to define the
transition rate matrix.
Definition 3.1: Transition rate matrix
Let ,,,,,
 is a Petri net
and
its reachability set. Transition matrix Q
of Petri net SPN is defined as:
:

→R
Where values are made according following rule
and the matrix form right stochastic matrix:
,

,
∈:∈∧
∧


,
,
|
|


Definition 3.2: Stationary probabilities
Let ,,,,,
 is a Petri net
and is its transition rate matrix. Stationary
distribution vector is defined as normalized left
null space of transition matrix:


1
Vector then represents the probability of each
 marking:

Pr
Pr
Pr
|
|
Definition 3.3: Long term probability of
marking ∈
is defined as a corresponding
element of vector:
Pr
The probability of marking M can be seen as a
joint probability of markings of individual places:

Pr

,

,…,

When calculating the stationary probabilities it is
appropriate to check whether the model fulfil the
liveness property, since each dead marking of Petri
net corresponds to absorb state in terms of Markov
chains. Each absorption state can always occur, i.e.
its probability equal 1 and thus all live markings
have probability equal 0. This would lead to a fully
deterministic model without any uncertainty.
MeasurementofFairnessinProcessModelsUsingEntropyandStochasticPetriNets
117
4 ENTROPY AND FAIRNESS
Entropy (Shannon, 1948) can measure the
amount of disorder, which is associated with a
random variable.
Definition 4.1: Entropy

log


0∙log
0
≡0
where represents the system (random variable)
and
its states (the specific values of a random
variable).
Definition 4.2: Maximum entropy
The maximum entropy of the system, which
can be in different states can be expressed as
follows:

log
Definition 4.3: Stationary probability of places
Let ,,,,,
is a stochastic
Petri net and is the vector of the stationary
probabilities (of all reachable markings). Stationary
probability vector of individual places
is defined
as:

∗
∗


Pr
Pr
Pr
where represents a matrix of all reachable
markings. In the case that the specific place in a
specific marking comprising more than one token,
than the partial probability is multiplied by the
number of tokens in that place.
Definition 4.4: Entropy of places
Let ,,,,,
is a stochastic
Petri net and
its stationary probability vector of
places. Entropy of places in  is defined as:


log
||

The same relationship can be used to quantify
the entropy of certain subset of places. Let
⊂,
then the entropy of this subset is defined as:

log
|
|

Definition 4.5: Fairness of stochastic Petri net
Let ,,,,,
is a stochastic
Petri net and

entropy of its places.
Fairness of  is defined as:





and similarly for
⊂:




The value of fairness is then located in the
interval <0,1>, where 0 represents a fully unfair
situation and 1 absolutely fair situation. Higher
value fairness indicates the higher uniformity of
stationary probability of places and vice versa.
5 EXAMPLE OF SIMPLE MODEL
As a simple example, consider a stochastic Petri net,
which is composed of 5 places and 5 transitions, see
Figure 1. The model contains some typical elements
that are abundant in classic process models. These
elements are for instance sequence (transition T
2
),
AND-split (transition T
1
), XOR (transition T
4
and
T
5
) and cycle (transition T
5
). For more information
on the mapping of these (and other) elements into
Petri net can be found in (Jung et al., 2011).
Figure 1: Stochastic Petri net example.
The set of all reachable markings
of the
Petri net contains five markings:

10000
01010
01100
00101
00011
When considering the exponential distribution
Λ
,
,
,
,
, the corresponding state
space graph (Markov chain) is shown in Figure 2.
This state space corresponds to Markov chain,
which generates for Λ28,5,1,42,142 the
following transition rate matrix:

2828000
0475420
0143042
00055
142 0 0 1 143
ICSOFT-PT2014-9thInternationalConferenceonSoftwareParadigmTrends
118
Figure 2: State space / Markov Chain.
The solution of this matrix is a vector of
stationary probabilities:

0.145
0.086
0.010
0.731
0.029
The stationary probability of places can therefore
be quantified as follows:
Pr

∗


10000
01100
00110
01001
00011
0.145
0.086
0.010
0.731
0.029

0.144
0.817
0.096
0.38
0.759
0.078
0.440
0.052
0.021
0.409
It is then possible to quantify the fairness of the
presented example:





0.078log
0.0780.440log
0.440
0.052log
0.0520.021log
0.021
0.409log
0.409/log
5
1.673
2.3219
0.721
This result can be loosely interpreted as the fact
that fairness of sample stochastic Petri net reaches
72.1%, which can be classified as a higher degree of
fairness. The resulting value is associated with the
distribution of the stationary probability of places
Pr
– the places P
2
and P
5
have a significantly
higher stationary probability than other places.
6 DISCUSSION
Fairness is an important property that is placed on
the modelled system. Verification of fairness is
associated with a number of specific disciplines such
as queuing (Avi-itzhak et al., 2008, Raz et al., 2004),
distributed programming (Alpern and Schneider,
1985, Apt et al., 1988) or networking (flow fairness)
(Kelly, 1997, Jaffe, 1981). In the most cases, the
verification of the fairness is associated with the
choice of a suitable predicate whose validity is
verified on the model. Another way to verify the
fairness is its measurement (preferably as the value
from the fixed interval, e.g. (Raz et al., 2004)).
These approaches are based on the assessment of
fairness for entities that are subjects in the process
(users, documents, packets, etc.). In Petri nets are
these entities represented as tokens (which are
located in different states – places). This paper
presents an approach for measuring fairness in
stochastic Petri nets using the Shannon entropy and
Markov chains. This approach presents the
measurement of fairness for entities that provide a
specific state of token (place). The value of fairness
is influenced by a number of different factors that
are associated with network structure (number and
distribution of elements such as OR, XOR, AND
and LOOP), the values of Λ and initial marking
(number and distribution of tokens).
Advantages of this Approach
The universal method for evaluation of
fairness in concurrent and reactive systems.
The only requirement is the need for
modelling the system using stochastic Petri
nets.
Flexible measuring of fairness among
different subsets of places (from one
particular place to the whole network).
The possibility of simulation of the network
with various parameters (e.g., number of
tokens in an initial marking, firing rate, etc.) a
monitor the progress of fairness, i.e. the
possibility of finding local optima around a
specific operation point (initial values of
model parameters).
Disadvantages of this Approach
Basic shortcomings of Petri nets in general,
i.e. state space explosion, restrictions based
on the definition, etc.
MeasurementofFairnessinProcessModelsUsingEntropyandStochasticPetriNets
119
The need to specify amongst which places the
fairness will be measured and what the
resulting value of fairness represents.
7 CONCLUSION AND FUTURE
WORK
Measuring of fairness in the process model can be a
good indicator for overload detection of different
nodes in the model (bottleneck, overwork, etc.)
In this paper has been defined method for
calculating the fairness of any process model, which
can be modelled by stochastic Petri net. Defined
method can be applied to a specific sublet of places,
as well as the whole Petri net.
The actual fairness quantification is based on the
measurement of entropy from steady-state
probabilities of all places (or a specific subset of
places). On the prime example is presented the
calculation of the fairness.
The future research will be focused on defining
this method using coloured Petri nets, which allow
diversification of tokens. This allows measurement
of fairness for entities that provide process (states)
as well as entities that are subjects in the process
(tokens).
ACKNOWLEDGEMENTS
This work was supported by the project
No. CZ.1.07/2.2.00/28.032 Innovation and support
of doctoral study program (INDOP), financed from
EU and Czech Republic funds.
REFERENCES
"Fairness", 2011. Oxford Advanced American Dictionary
for learners of English
Alpern, B., Schneider, F. B., 1985. Defining liveness.
Information Processing Letters, 21, 181-185.
Apt, K., Francez, N., Katz, S., 1988. Appraising fairness
in languages for distributed programming. Distributed
Computing, 2, 226-241.
Avi-Itzhak, B., Levy, H., Raz, D., 2008. Quantifying
fairness in queuing systems: Principles, approaches,
and applicability. Probab. Eng. Inf. Sci., 22, 495-517.
Baier, C., Katoen, J.-P., 2008. Principles of model
checking, Cambridge, Mass., The MIT Press.
González, L. S., Rubio, F. G., González, F. R., Velthuis,
M. P., 2010. Measurement in business processes: a
systematic review. Business Process Management
Journal, 16, 114 - 134.
Ibl, M., 2013. Uncertainty Measure of Process Models
using Entropy and Petri Nets. ICSOFT 2013 -
Proceedings of the 8th International Joint Conference
on Software Technologies, 2013. Setubal: Institute for
Systems and Technologies of Information, Control and
Communication (INSTICC), 542-547.
Jaffe, J., 1981. Bottleneck Flow Control. Communications,
IEEE Transactions on, 29, 954-962.
Jung, J.-Y., Chin, C.-H., Cardoso, J., 2011. An entropy-
based uncertainty measure of process models.
Information Processing Letters, 111, 135-141.
Kelly, F., 1997. Charging and rate control for elastic
traffic. European Transactions on
Telecommunications, 8, 33-37.
Larson, R. C., 1987. PERSPECTIVES ON QUEUES -
SOCIAL-JUSTICE AND THE PSYCHOLOGY OF
QUEUING. Operations Research, 35, 895-905.
Lassen, K. B., Van Der Aalst, W. M. P., 2009. Complexity
metrics for Workflow nets. Information and Software
Technology, 51, 610-626.
Marsan, M. A., 1990. Stochastic Petri nets: an elementary
introduction. In: GRZEGORZ, R. (ed.) Advances in
Petri nets 1989. Springer-Verlag New York, Inc.
Molloy, M. K., 1982. Performance Analysis Using
Stochastic Petri Nets. Computers, IEEE Transactions
on, C-31, 913-917.
Palm, C., 1953. Methods of Judging the Annoyance
Caused By Congestions. TELE (English ed.), 1-20.
Petri, C. A., 1962. Kommunikation mit Automaten.
Bonn:
Institut für Instrumentelle Mathematik, Schriften des
IIM Nr. 2.
Raz, D., Levy, H., Avi-Itzhak, B., 2004. A resource-
allocation queueing fairness measure. SIGMETRICS
Perform. Eval. Rev., 32, 130-141.
Reijers, H. A., Vanderfeesten, I. T. P., 2004. Cohesion and
Coupling Metrics for Workflow Process Design. In:
DESEL, J., PERNICI, B. & WESKE, M. (eds.)
Business Process Management. Springer Berlin
Heidelberg.
Shannon, C. E., 1948. A mathematical theory of
communication. Bell System Technical Journal, 27,
379-423.
Völzer, H., Varacca, D., 2012. Defining Fairness in
Reactive and Concurrent Systems. Journal of the
ACM, 59, 13-13:37.
ICSOFT-PT2014-9thInternationalConferenceonSoftwareParadigmTrends
120