87
Synchronization and Linearity An Algebra for Discrete Event Systems Francois Louis Baccell Institut National de Recherche en lriormatique et Automatique (INRIA), Sophia Antipolis, France Guy Cohen frole des Mines de Paris, Fontainebleau, France Geert Jan Olsder Delf University of Technology, The Netherlands Jean-Pierre Quadrat Institut National de Recherche en Informtique et Automatique (INRIA), Rocquencourt, France JOHN WILEY & SONS Chichester . New York . Brisbane . Toronto . Singapore

Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

Synchronizationand Linearity

An Algebra for Discrete Event Systems

Francois Louis BaccellInstitut National de Recherche en lriormatique et Automatique

(INRIA), Sophia Antipolis, France

Guy Cohenfrole des Mines de Paris, Fontainebleau, France

Geert Jan Olsder

Delf University of Technology, The Netherlands

Jean-Pierre QuadratInstitut National de Recherche en Informtique et Automatique(INRIA), Rocquencourt, France

JOHN WILEY & SONSChichester . New York . Brisbane . Toronto . Singapore

Page 2: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

Copyright (Ç 1992 by John Wiley & Sons Ltd,

Baffns Lane, Chichester

West Sussex P019 IUD, Englandc:,-

..:r.'\f)

~'",All rights reserved,

No part of this book may be reproduced by any means,or transmitted, or translated into a machine languagewithout the written permission of the publisher,

t"",;"'"

Other Wiley Editorial Offces

Îr:,

~.¡Y)

John Wiley & Sons, Inc" 605 Third Avenue,

New York, NY 10158-0012, USA~J"--

Jacaranda Wiley Ltd, G,P,o. Box 859, Brisbane,Queensland 4001, Austraia

(jC)

~l

To

ourJohn Wiley & Sons (Canada) Ltd, 22 Worcester Road,Rexdale, Ontario M9W ILl, Canada

John Wiley & Sons (SEA) Pte Ltd, 37 Jalan Pemimpin #05-04,Block B, Union Industrial Building, Singapore 2057

\"~, families

Library of Congress Cataloging-in-Publicaton Dat

Synchronization and linearity : an algebra for discrete event systemsI Francois Louis Baccelli , , , (et aL.l,

p, em,

Includes bibliographical references and index,

ISBN 0 471 93609 X1. System analysis, 2, Discrete-time systems, 3, Algebra,

i. Baccelli, F. (François), 1954

1'7,6,S953 1992oo3-dc20 92-542CIP

Brish Library Catoguing in Publicaton Data

A catalogue record for this book is available from the British Library

ISBN 0 471 93609 X

Produced from camera-ready copy supplied by the authorsPrinted and bound in Great Britain by Biddies Ltd, Guildford, Surrey

Page 3: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

1

Contents

Preface xv

I Discrete Event Systems and Petri Nets 11 Introduction and Motivation 3

1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous Examples 81.2.1 Planning"" 91.2.2 Communication, 131.2.3 Production.,.. 151.2.4 Queuing System with Finite Capacity 181.2.5 Parallel Computation , , , , . . , , . 191.2.6 Traffic,...",."....", 221.2.7 Continuous System Subject to Flow Bounds and Mixing 25

1.3 Issues and Problems in Performance Evaluation 271.4 Notes",."",..,.""....""""", 33

2 Graph Theory and Petri Nets 352.1 Introduction..", 352.2 Directed Graphs , , , , , 352.3 Graphs and Matrices .. 38

2,3.1 Composition of Matrices and Graphs 412.3.2 Maximum Cycle Mean , . , . 462,3.3 The Cayley-Hamilton Theorem 49

2.4 Petri Nets , . . , , , , , , , , , , , , 542.4.1 Definition"""",., 542.4.2 Subclasses and Properties of Petri Nets, 59

2,5 Timed Event Graphs .."""" 632.5.1 Simple Examples , , , , , . . , . , , . 642.5.2 The Basic Autonomous Equation, , , . 692,5.3 Constructiveness of the Evolution Equations 782.5.4 Stimdard Autonomous Equations 822.5.5 The Nonautonomous Case , 842.5,6 Construction of the Marking 872,5,7 Stochastic Event Graphs " 88

Page 4: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

vIl SYNCHRONIZATION AND LINEARITY

2.6 Modeling Issues , , , , , , , , , ,2.6.1 Multigraphs".,,'"2.6.2 Places with Finite Capacity

2.6.3 Synthesis of Event Graphs from Interacting Resources ,

2.7 Notes

ri Algebra

Max-Plus Algebra3.1 Introduction

3.1. Definitions

3.1.2 Notation,.

3,1.3 The min Operation in the Max-Plus Algebra

3.2 Matrices in IRmax "'.",,'.,,,

3.2.1 Linear and Affne Scalar Functions, , ,

3.2.2 Structures.""".""""3,2.3 Systems of Linear Equations in (IRmax)n

3,2.4 Spectral Theory of Matrces

3.2.5 ApplicatiOn to Event Graphs ,

3.3 Scalar Functions in IRmax ' , , . , , ,3.3.1 Polynomial Functions P (IRmax)

3.3,2 Rational Functions , , , , , ,3.3.3 Algebraic Equations, . , , , ,

3.4 Symmetrization of the Max-Plus Algebra.

3.4.1 The Algebraic Structure §

3.4.2 Linear Balances

3.5 Linear Systems in § , , , . , . , ,3.5.1 Determinant",.""3,5.2 Solving Systems of Linear Balances by the Cramer Rule

3.6 Polynomials with Coefficients in § , , , . . ,3.6.1 Some Polynomial Functions ",.,

3.6.2 Factorization of Polynomial Functions

3.7 Asymptotic Behavior of Ak , , , , , , , , , ,3.7,1 Critical Graph of a Matrix A , , , , ,

3.7.2 Eigenspace Associated with the Maximum Eigenvalue,

3.7.3 Spectral Projector , , , , ,3,7.4 Convergence of Ak with k

3.7.5 Cyclic Matrices

3.8 Notes

89 489

90

90

98

101

103

103

103

105

105

106

107

108

110

113

116

118

118

126

129

131

131

133

135

136

137

140

140

142

145

145

147

'149

150

153

154

"

CONTENTS

Dioids4.1 Introduction."".",.,4.2 Basic Definitions and Examples .

4.2.1 Axiomatics , ,4.2.2 Some Examples , , . , ,4.2.3 Subdioids.,.",.,4.2.4 Homomorphisms, Isomorphisms and Congruences

4.3 Lattice Properties of Dioids , , . . , . ,4.3.1 Basic Notions in Lattice Theory , . .

4.3.2 Order Structure of Dioids , , , , , , .

4.3.3 Complete Dioids, Archimedian Dioids

4.3.4 Lower Bound . . . , , , ,4.3.5 Distributive Dioids . , , ,

4.4 Isotone Mappings and Residuation

4.4.1 Isotony and Continuity of Mappings

4.4.2 EI~ments of Residuation Theory , ,

4.4.3 Closure Mappings , , , , , , , , . ,

4.4.4 Residuation of Addition and Multiplication

4.5 Fixed-Point Equations, Closure of Mappings and Best Approxi-

mation . , , , , . , , , , , , , , . , ,

4.5.1 General Fixed-Point Equations

4,5.2 The Case I1(x) = a,x 1\ b , ,4.5.3 The Case I1(x) = ax EB b , . ,4.5.4 Some Problems of Best Approximation

4.6 Matrix Dioids , , . , , , , . , , . , , , , , . ,4.6.1 From' Scalars' to Matrices , , . . , , ,4.6.2 Residuation of Matrices and Invertibility

4,7 Dioids of Polynomials and Power Series , , , ,

4.7.1 Definitions and Properties of Formal Polynomials and

Power Series "'.,.,'..,.,,,4.7.2 Subtraction and Division of Power Series

4.7.3 Polynomial Matrices ."".""

4,8 Rational Closure and Rational Representations ,

4.8.1 Rational Closure and Rational Calculus

4.8,2 Rational Representations . , , , , , . ,

4.8.3 Yet Other Rational Representations, , ,

4.8.4 Rational Representations in Commutative Dioids

4.9 Notes4.9.1 Dioids and Related Structures,

4,9.2 Related Results. . , , , . . , ,

ix

155

155

156

156

157

158

159

160

160

163

164

166

167

169

169

174

180

181

187

187

191

192

194

197

197

198

200

200204

204206

206208

210

212214214215

Page 5: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

x SYNCHRONIZATION AND LINEARITY

III Deterministic System Theory 2175 Two-Dimensional Domain Description of Event Graphs 219

5.1 Introduction,.",."".."....""" 2195.2 A Comparison Between Counter and Dater Descriptions, 221

5.3 Daters and their Embedding in Nonmonotonic Functions 2255.3.1 A Dioid of Nondecreasing Mappings , , , , , , . 225

5.3.2 'l-Transforms of Daters and Representation by Power Se-

ries in '1 ' , , , , , . , . . , . . , , . , , , , , , , 2285.4 Moving to the Two-Dimensional Description. , . . , , . . 234

5.4.1 The LZmax Algebra through Another Shift Operator. 2345.4.2 The ryl;h, 8~ Algebra . . , . . , , , 2365.4.3 Algebra of Information about Events . 2425.4.4 ryl;b, 8~ Equations for Event Graphs 243

5.5 Counters,.""""....., 2495.5.1 A First Derivation of Counters . , 2495,5.2 Counters Derived from Daters , , 2505.5.3 Alternative Definition of Counters 2525.5.4 Dynamic Equations of Counters 252

5.6 Backward Equations, , , . , . , , , , 2545.6.1 ryl;h, 8~ Backward Equations . 2545.6.2 Backward Equations for Daters , 255

5.7 Rationality, Realizability and Periodicity 2585,7.1 Preliminaries . 2585.7.2 Definitions " 2595,7.3 Main Theorem 2605.7.4 On the Coding of Rational Elements 2615.7.5 Realizations by '1- and 8-Transforms 264

5.8 Frequency Response of Event Graphs '" 2655.8.1 Numerical Functions Associated with Elements of lBh, 8~ 266

5.8.2 Specialization to ryl;h, 8~ ' , , , , , , . . , 2685.8.3 Eigenfunctions of Rational Transfer Functions 269

5,9 Notes""."."""""""", 2736 Max-Plus Linear System Theory 2756.1 Introduction,." 2756.2 System Algebra . , , , , , , 275

6,2,1 Definitions .,." 2756.2.2 Some Elem~ntary Systems 277

6.3 Impulse Responses of Linear Systems 2806.3.1 The Algebra of Impulse Responses , 2806.3,2 Shift-Invariant Systems , , , , , , , 2826.3.3 Systems with Nondecreasing Impulse Response 283

6.4 Transfer Functions. , , . , . , , , , , , , , , , , . , , 284

""

CONTENTS xi

6.4,1 Evaluation Homomorphism , , . , . . , , , . ,6.4.2 Closed Concave Impulse Responses and Inputs

6.4.3 Closed Convex Inputs. , . , , , , , , , , , ,

6.5 Rational Systems , , , , . . . . . . . . , . . . . , .6.5.1 Polynomial, Rational and Algebraic Systems,

6.5.2 Examples of Polynomial Systems. , . .6.5.3 Characterization of Rational Systems, ,

6.5.4 Minimal Representation and Realization

6.6 Correlations and Feedback Stabilization

6.6.1 Sojourn Time and Correlations

6.6.2 Stability and Stabilization ,6.6.3 Loop Shaping

6.7 Notes",."."

284286288290290292292296298299302305306

iv Stochastic Systems 307

7 Ergodic Theory of Event Graphs

7,1 Introduction,."""7,2 A Simple Example in llmax '

7.2.1 The Event Graph , ,7.2.2 Statistical Assumptions

7.2.3 Statement of the Eigenvalue Problem,

7.2.4 Relation with Event Graph , , , , , ,7.2.5 Uniqueness and Coupling , , , . . . .

7.2,6 First-Order and Second-Order Theorems

7.3 First-Order Theorems , , . . , . . , . . , .7.3.1 Notation and Statistical Assumptions,

7.3,2 Examples in llmax . , , , , , . , , , .

7.3.3 Maximal Lyapunov Exponent in llmax

7.3.4 The Strongly Connected Case, , . , .7.3.5 General Graph, , , , , , , , , , , , ,7.3.6 First-Order Theorems in Other Dioids

7.4 Second-Order Theorems; Nonautonomous Case

7.4.1 Notation and Assumptions , , , , , , ,7.4.2 Ratio Equation in a General Dioid . . ,

7.4.3 Stationary Solution of the Ratio Equation

7.4.4 Specialization to llmax ' . , , . . , . . , ,

7.4.5 Multiplicative Ergodic Theorems in llmax

7.5 Second-Order Theorems; Autonomous Case

7.5.1 Ratio Equation """""""7.5,2 Backward Process, , . , . . , , . , , . .7.5.3 From Stationary Ratios to Random Eigenpairs

7,5.4 Finiteness and Coupling in llmax; Positive Case

309309310310311313317319321323323324325327328333333333334335337351353353354356357

Page 6: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

Xll SYNCHRONIZATION AND LINEARITY

7.5.5 Finiteness and Coupling in ~max; Strongly Connected Case 366

7.5.6 Finiteness and Coupling in ~max; General Case 3687.5.7 Multiplicative Ergodic Theorems in ~max 370

7.6 Stationary Marking of Stochastic Event Graphs 3707.7 Appendix on Ergodic Theorems 3737.8 Notes,.,.",..,...."".." 375

8 Computational Issues in Stochastic Event Graphs 3778.1 Introduction"".,.",..", 3778.2 Monotonicity Properties. , , . , . , . . , , , 378

8.2.1 Notation for Stochastic Ordering , , , 3788.2.2 Monotonicity Table for Stochastic Event Graphs , 378

8.2.3 Properties of Daters , . , , 3798.2.4 Properties of Counters " 3838.2.5 Properties of Cycle Times 3888.2.6 Comparison of Ratios , , . 390

8,3 Event Graphs and Branching Processes . 3938,3.1 Statistical Assumptions , , , , . 3938.3.2 Statistical Properties ."". 3938.3.3 Simple Bounds on Cycle Times 3948.3.4 General Case . , 3998.4 Markovian Analysis , , , , . 4048.4.1 Markov Property , . 4048.4.2 Discrete Distributions 4058.4.3 Continuous Distribution Functions 413

8.5 Appendix".."",., 4178.5.1 Stochastic Comparison 4178.52 Markov Chains 4198.6 Notes""".,. 419V Postface 421l) Related Topics and Open Ends 423

9.1 Introduction,...:""."",.,.""""" 4239.2 About Realization Theory. , , , , . , , , , , . , , , , , , . ., 423

9.2.1 The Exponential as a Tool; Another View on Cayley-

Hamilton ..."'..,.""".,,, 4239.2.2 Rational Transfer Functions and ARMA Models 4269.2.3 Realization Theory . , , , , , 4279.2.4 More on Minimal Realizations , , , 429

9.3 Control of Discrete Event Systems . , . , , 4319.4 Brownian and Diffusion Decision Processes 433

9.4.1 Inf-Convolutions of Quadratic Forms, 434

"!

CONTENTS

9.4.2 Dynamic Programming , , , , , , , , , , , , , ,9.4.3 Fenchel and Cramer Transforms , , , , , , , . ,9.4.4 Law of Large Numbers in Dynamic Programming

9.4.5 Central Limit Theorem in Dynamic Programming

9.4.6 The Brownian Decision Process '" , ,

9.4.7 Diffusion Decision Process , , , . , , . ,

9.5 Evolution Equations of General Timed Petri Nets

9.5.1 FIFO Timed Petri Nets . , , . . ,9.5.2 Evolution Equations, . , . , , . . , ,9.5.3 Evolution Equations for Switching . ,

9.5.4 Integration of the Recursive Equations

9.6 Min-Max Systems, , . , . . , , , . , , , , ,9.6.1 General Timed Petri Nets and Descriptor Systems

9.6.2 Existence of Periodic Behavior . . , . , ,

9.6.3 Numerical Procedures for the Eigenvalue,

9.6.4 Stochastic Min-Max Systems , , ,

9.7 About Cycle Times in General Petri Nets,

Q.8 Notes"",.""",."."

Bibliography

Notation

Index

xiii

434436437438438440443443444449450452453455457460461464

465

475

479

Page 7: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

"

Preface

The mathematical theory developed in this book finds its initial motivation in themodeling and the analysis of the time behavior of a class of dynamic systems nowoften referred to as 'discrete event (dynamic) systems' (DEDS). This class essentiallycontains man-made systems that consist of a finite number of resources (processorsor memories, communication channels, machines) shared by several users (jobs,packets, manufactured objects) which all contribute to the achievement of somecommon goal (a parallel computation, the end-to-end transmission of a set of packets,the assembly of a product in an automated manufacturing line). The coordinationof the user access to these resources requires complex control mechanisms whichusually make it impossible to describe the dynamic behavior of such systems in termsof differential equations, as in physical phenomena. The dynamics of such systemscan in fact be described using the two (Petri net like) paradigms of 'synchronization'and 'concurrency'. Synchronization requires the availability of several resources orusers at the same time, whereas concurrency appears for instance when, at a certaintime, some user must choose among several resources. The following example onlycontains the synchronization aspect which is the main topic of this book.

Consider a railway station. A deparing train must wait for certain incoming

trains so as to allow passengers to change, which reflects the synchronization feature.Consider a network of such stations where the traveling times between stations areknown. The variables of interest are the arrval and departure times, assuming thattrains leave as soon as possible. The deparure time of a train is related to themaximum of the arrival times of the trains conditioning this deparure. Hence themax operation is the basic operator through which variables interact. The arivaltime at a station is the sum of the deparure time from the previous station and thetraveling time. There is no concurrency since it has tacitly been assumed that eachtrain has been assigned a fixed route,

The thesis developed here is that there exists an algebra in which DEDS thatdo not involve concurrency can naturally be modeled as linear systems. A linearmodel is a set of equations in which variables can be added together and in whichvariables can also be multiplied by coeffcients which are a part of the data of

the modeL. The train example showed that the max is the essential operation thatcaptures the synchronization phenomenon by operating on arrival times to computedeparure times, Therefore the basic idea is to treat the max as the 'addition' of thealgebra (hence this max wil be written E8 to suggest 'addition'). The same exampleindicates that we also need conventional addition to transform variables from oneend of an arc of the network to the other end (the addition of the traveling time, thedata, to the departure time). This is why + wil be treated as multiplication in this

Page 8: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

~vi SYNCHRONIZATION AND LINEARITY PREFACE XVll

ilgebra (and it wil be denoted 0). The operations EB and 0 wil play their own'oles and in other examples they are not necessarily confined to operate as max andt, respectively.

The basic mathematical feature of EB is that it is idempotent: x EB x = x. In

Jractice, it may be the max or the min of numbers, depending on the nature of theiariables which are handled (either the times at which events occur, or the numbers of~vents during given intervals). But the main feature is again idempotency of addition.lhe role of 0 is generally played by conventional addition, but the important thing ishat it behaves well with respect to addition (e.g. that it distributes with respect to EB),lhe algebraic structure outlined is known under the name of 'dioid', among otheriames. It has connections with standard linear algebra with which it shares many:ombinatorial properties (associativity and commutativity of addition, etc.), but also~ith lattice-ordered semigroup theory for, speaking of an idempotent addition is:quivalent to speaking of the 'least upper bound' in lattices.

Conventional system theory studies networks of integrators or 'adders' connectedn series, parallel and feedback. Similarly, queuing theory or Petri net theory buildip complex systems from elementar objects (namely, queues, or transitions and)laces). The theory proposed here studies complex systems which are made up of:lementary systems interacting through a basic operation, called synchronization, \ocated at the nodes of a network.

The mathematical contributions of the book can be viewed as the first stepsaward the development of a theory of linear systems on dioids. Both deterministicind stochastic systems are considered. Classical concepts of system theory such asstate space' recursive equations, input-output (transfer) functions, feedback loops,:tc. are introduced. Overall, this theory offers a unifying framework for systems invhich the basic 'engine' of dynamics is synchronization, when these systems areonsidered from the point of view of performance evaluation. In other words, dioid.lgebra appears to be the right tool to handle synchronization in a linear manner,vhereas this phenomenon seems to be very nonlinear, or even nonsmooth, 'throughhe glasses' of conventional algebraic tools. Moreover, this theory may be a goodtarting point to encompass other basic features of discrete event systems such asoncurrency, but at the price of considering systems which are nonlinear even in thisiew framework. Some perspectives are opened in this respect in the last chapter.

Although the initial motivation was essentially found in the study of discretevent systems, it turns out that this theory may be appropriate for other purposesJO. This happens frequently with mathematical theories which often go beyond theirriitial scope, as long as other objects can be found with the same basic features.n this particular case the common feature may be expressed by saying that theriput-output relation has the form of an inf- (or a sup-) convolution. In the sameiay, the scope of conventional system theory is the study of input-output relatlonsihich are convolutions. In Chapter 1 it is suggested that this theory is also relevantJr some systems which either are continuous or do not involve synchronization.:ystems which mix fluids in certain proportions and which involve flow constraintsall in the former category. Recursive 'optimization processes', of which dynamic

programming is the most immediate example, fall in the latter category. All thesesystems involve max (or min) and + as the basic operations. Another situationwhere dioid algebra naturally shows up is the asymptotic behavior of exponential

functions, In mathematical terms, the conventional operations + and x over positivenumbers, say, are transformed into max and +, respectively, by the mapping: x f-lims-;+oo exp(sx). This is relevant, for example, in the theory of large deviations,

and, coming back to conventional system theory, when outlining Bode diagrams bytheir asymptotes.

There are numerous concurrent approaches for constructing a mathematicalframework for discrete event systems. An important dichotomy arises dependingon whether the framework is intended to assess the logical behavior of the systemor its temporal behavior., Among the first class, we would quote theoretical com-puter science languages like CSP or CCS and recent system-theoretic extensionsof automata theory (114). The algebraic approach that is proposed here is clearlyof the latter type, which makes it comparable with such formalisms as timed (orstochastic) Petri nets (i), generalized semi-Markov processes (63) and in a sensequeuing network theory. Another approach, that emphasizes computational aspects,is known as Perturbation Analysis (70).

A natural question of interest concerns the scope of the methodology that wedevelop here, Most DEDS involve concurrency at an early stage of their design.However, it is often necessary to handle this concurrency by choosing certain priorityrules (by specifying routing and/or scheduling, etc.), in order to completely specifytheir behavior. The theory developed in this book may then be used to evaluate theconsequences of these choices in terms of performance. If the delimitation of theclass of queuing systems that admit a max-plus representation is not an easy taskwithin the framework of queuing theory, the problem becomes almost transparentwithin the setting of Petri networks. developed in Chapter 2: stochastic event graphscoincide with the class of discrete event systems that have a representation as a max-plus linear system in a random medium (i.e, the matrices of the linear system arerandom); any topological violation of the event graph structure, be it a competitionlike in multi server queues, or a superimposition like in certain Jackson networks,results in a min-type nonlinearity (see Chapter 9). Although it is beyond the scope ofthe book to review the list of queuing systems that are stochastic event graphs, severalexamples of such systems are provided ranging from manufacturing models (e.g.assembly/disassembly queues, also called fork-join queues, jobshop and flowshopmodels, production lines, etc.) to communication and computer science models(communication blocking, wave front arrays, etc.)

Another important issue is that of the design gains offered by this approach. Themost important structural results are probably those pertaining to the existence ofperiodic and stationary regimes. Within the deterministic setting, we would quotethe interpretation of the pair (cycle time, periodic regime) in teris of eigenpairstogether with the polynomial algorithms that can be used to compute them. More-over, because bottlenecks of the systems are explicitly revealed (through the notionof critical circuits), this approach provides an efficient way not only to evaluate the

Page 9: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

iii SYNCHRONIZATION AND LINEARITY

formance but also to assess certain design choices made at earlier stages. In: stochastic case, this approach first yields new characterizations of throughput or~le times as Lyapunov exponents associated with the matrices of the underlyingear system, whereas the steady-state regime receives a natural characterizationterms of 'stochastic eigenvalues' in max-plus algebra, very much in the flavorOseledeç's multiplicative ergodic theorems. Thanks to this, queuing theory andied Petri nets find some sort of (linear) garden where several known results con-ning small dimensional systems can be derived from a few classical theorems (orire precisely from the max-plus counterpart of classical theorems).The theory of DEDS came into existence only at the beginning of the 1980s,

.ugh it is fair to say that max-plus algebra is older, see (49), (130), (67). The fieldDEDS is in full development and this book presents in a coherent fashion theults obtained so far by this algebraic approach. The book can be used as a text-)k, but it also presents the current state of the theory. Short historical notes andier remarks are given in the note sections at the end of most chapters. The bookmId be of interest to (applied) mathematicians, operations researchers, electrical~ineers, computer scientists, probabilists, statisticians, management scientists andgeneral to those with a professional interest in parallel and distributed processing,nufacturing, etc. An undergraduate degree in mathematics should be suffcientfollow the flow of thought (though some pars go beyond this level). Introduc-y courses in algebra, probability theory and linear system theory form an ideal:kground. For algebra, I61) for instance provides suitable background material;

probability theory this role is for instance played by (20), and for linear systemory it is (72) or the more recent (122).The hear of the book consists of four main pars, each of which consists of two

ipters, Par I (Chapters I and 2) provides a natural motivation for DEDS, it isroted to a general introduction and relationships with graph theory and Petri nets.1 II (Chaptel1s 3 and 4) is devoted to the underlying algebras. Once the reader hasie through this par, he will also appreciate the more abstract approach presentedPars II and IV. Par II (Chapters 5 and 6) deals with deterministic system theory,

ere the systems are mostly DEDS, but continuous max-plus linear systems alsodiscussed in Chapter 6. Part IV (Chapters 7 and 8) deals with stochastic DEDS.

iny interplays of comparable results between the deterministic and the stochasticmework are shown. There is a fifth par, consisting of one chapter (Chapter 9),ich deals with related areas and some open problems. The notation introduced in1s I and II is used throughout the other parts.The idea of writing this book took form during the summer of 1989, during

ich the third author (GJO) spent a mini-sabbatical at the second author's (GC's)titue. The other two authors (FB and JPQ) joined in the fall of 1989, Duringprocess of writing, correcting, cutting, pasting, etc., the authors met frequently,stly in Fontainebleau, the latter being situated close to the center of gravity

the authors' own home towns. We acknowledge the working conditions andiport of our home institutions that made this project possible. The Systems andntrol Theory Network in the Netherlands is acknowledged for providing some

ii

II,I,j

PREFACE xix

ii'

financial support for the necessar travels. Mr, J, Schonewile of Delft Universityof Technology is acknowledged for preparing many of the figures using AdobeIlustrator. Mr. G. Ouanounou of INRIA-Rocquencourt deserves also many thanksfor his help in producing the final manuscript using the high-resolution equipmentof this Institute. The contents of the book have been improved by remarks ofP. Bougerol of the University of Paris VI, and of A. Jean-Marie and Z, Liu ofINRIA-Sophia Antipolis who were all involved in the proofreading of some parts ofthe manuscript. The authors are grateful to them. The second (GC) and fourth (JPQ)authors wish to acknowledge the permanent interaction with the other past or presentmembers of the so-called Max Plus working group at INRIA-Rocquencourt. Amongthem, M. Viot and S. Gaubert deserve special mention. Moreover, S. Gaubert helpedus to check some examples included in this book, thanks to his handy computersoftware MAX manipulating the ryl;b, 8~ algebra. Finally, the publisher, in theperson of Ms. Helen Ramsey, is also to be thanked, specifically because of hertolerant view with respect to deadlines,

We would like to stress that the material covered in this book has been and isstil in fast evolution. Owing to our different backgrounds, it became clear to usthat many different cultures within mathematics exist with regard to style, notation,etc. We did our best to come up with one, uniform style throughout the book.Chances are, however, that, when the reader notices a higher density of Theorems,Definitions, etc., GC and/or JPQ were the primary authors of the correspondingpartsl. As a last remark, the third author can always be consulted on the problemof coping with three French co-authors.

François Baccelli, Sophia AntipolisGuy Cohen, FontainebleauGeert Jan Olsder, DelftJean-Pierre Quadrat, Rocquencourt

June 1992

i GC: I do not agree, FB is more prone to that than any of us!

Page 10: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

u ~. r: (' ~ CD ~ CD

~tr

CD

~q

CD

~~.

::~

Z~

l-en

CD

~~ r:

r: ~ CD 3 r: § 0.

Page 11: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

CHAPTER 1

Introduction and Motivation

1.1 PRELIMINARY REMARKS AND SOME NOTATION

Probably the most well-known equation in the theory of difference equations is

x(t+l) = Ax(t) , t=0,1,2,.... (1.)The vector x E ~n represents the 'state' of an underlying model and this stateevolves in time according to this equation; x(t) denotes the state at time t. Thesymbol A represents a given n x n matrix, If an initial condition

X(O) = Xo (1.2 )

is given, then the whole future evolution of (1.1) is determined.Implicit in the text above is that (1.1) is a vector equation, Written out in scalar

equations it becomes

n

Xi(t + 1) = L Aijxj(t), i = 1,..., n; t = 0,1,.... (1.3)j=1

The symbol Xi denotes the i-th component of the vector x; the elements Aij are theentries of the square matrix A. If Aij,i,j = 1,.."n, and Xj(t),j = 1,...,n, are

given, then Xj(t + 1),j = 1,..., n, can be calculated according to (1.3).

The only operations used in (1.) are multiplication (Aij x Xj(t)) and addition(the L symbol). Most of this book can be considered as a study of formulæ of theform (1.1), in which the operations are changed. Suppose that the two operationsin (1.3) are changed in the following way: addition becomes maximization andmultiplication becomes addition. Then (1.3) becomes

xi(k+l) = max(Ail+Xi(k),Ai2+xi(k),...,Ain+Xn(k))= maxj(Aij +xj(k)), i = 1,...,n ,

If the initial condition (1.2) also holds for (1.4), then the time evolution of (1.4)is completely determined again. Of course the time evolutions of (1.3) and (1.4)wil be different in general. Equation (1.4), as it stands, is a nonlinear differenceequation. As an example take n = 2, such that A is a 2 x 2 matrix. Suppose

(1.4)

A=(~ ~) ( 1.5)

Page 12: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

SYNCHRONIZATION AND LINEARITYINTRODUCTION AND MOTIVATION

5j that the initial condition is

Xo = ( ¿ ) ,( 1.6) \J 7 0.~.~e time evolution of (1.1) becomes

X(O) = ( ¿ ), x(l) = ( ; ), x(2) = ( î~ ), x(3) = ( ~~i ) ,...

Figure 1.1: Network corresponding to Equation (1.5)L the time evolution of (1.4) becomes

(0) = ( ¿ ), x(l) = ( ~ ), x(2) = ( ~l ), x(3) = ( ~~ ),.... (1.7)

activity cannot start within the next 3 time units. Similarly, the time between twosubsequent activities of node 2 is at least 4 time units. Node 1 sends its results tonode 2 and once an activity starts in node 1, it takes 2 time units before the resultof this activity reaches node 2. Similarly it takes 7 time units after the initiation ofan activity of node 2 for the result of that activity to reach node 1. Suppose that anactivity refers to some production. The production time of node 1 could for instancebe 1 time unit; after that, node 1 needs 2 time units for recovery (lubrication say)and the traveling time of the result (the final product) from node 1 to node 2 is1 time unit. Thus the number Au = 3 is made up of a production time 1 and arecovery time 2 and the number A21 = 2 is made up of the same production time1 and a traveling time 1. Similarly, if the production time at node 2 is 4, then thisnode does not need any time for recovery (because An = 4), and the traveling timefrom node 2 to node 1 is 3 (because Al2 = 7 = 4 + 3).

If we now look at the sequence (1.7) again, the interpretation of the vectorsx( k) is different from the initial one. The argument k is no longer a time instantbut a counter which states how many times the various nodes have been active.At time 14, node 1 has been active twice (more precisely, node 1 has started twoactivities, respectively at times 7 and 11). At the same time 14, node 2 has beenactive three times (it stared activities at times 4, 9 and 13). The counting of theactivities is such that it coincides with the argument of the x vector. The initialcondition is henceforth considered to be the zeroth activity.

In Figure 1.1 there was an arc from any node to any other node. In manynetworks referring to more practical situations, this wil not be the case. If there isno arc from node j to node i, then node i does not need any result from node j.Therefore node j does not have a direct influence on the behavior of node i. Insuch a situation it is useful to consider the entry Aij to be equal to -00. In (1.4)the term -00 + Xj (k) does not influence Xi (k + 1) as long as Xj (k) is finite. Thenumber -00 wil occur frequently in what follows and wil be indicated by c.

For reasons which wil become clear later on, Equation (1.4) wil be written as

We are used to thinking of the argument t in x(t) as time; at time t the state is). With respect to (1.4) we wil introduce a different meaning for this argument.)rder to emphasize this different meaning, the argument t has been replaced by~or this new meaning we need to think of a network, which consists of a numberiodes and some arcs connecting these nodes, The network corresponding to) has n nodes; one for each component Xi. Entry Aij corresponds to the arc11 node j to node i. In terms of graph theory such a network is called a directed

ih ('directed' because the individual arcs between the nodes are one-way arrows).refore the arcs corresponding to Aij and Aji, if both exist, are considered to be~rent.rhe nodes in the network can perform certain activities; each node has its ownI of activity. Such activities take a finite time, called the activity time, to be per-ied. These activity times may be different for different nodes. It is assumed thatctivity at a certain node can only start when all preceding ('directly upstream'):s have finished their activities and sent the results of these activities along theto the current node. Thus, the arc corresponding to Aij can be interpreted asutput channel for node j and simultaneously as an input channel for node i.)ose that this node i stars its activity as soon as all preceding nodes have sentresults (the rather neutral word 'results' is used, it could equally have been

:ages, ingredients or products, etc.) to node i, then (1.4) describes when theities take place. The interpretation of the quantities used is:

Xi (k) is the earliest epoch at which node i becomes active for the k-th time;

Aij is the sum of the activity time of node j and the traveling time from

node j to node i (the rather neutral expression 'traveling time' is used insteadof, for instance, 'transportation time' or 'communication time').

Pact that we write Aij rather than Aji for a quantity connected to the arc from.j to node i has to do with matrix equations which wil be written in the classicalwith column vectors, as will be seen later on. For the example given above,etwork has two nodes and four arcs, as given in Figure 1.1. The interpretatione number 3 in this figure is that if node 1 has started an activity, the next

xi(k+ 1) = EfAij 0xj(k)j

i=l,...,n,

or in vector notation,

x(k + 1) = A 0 x(k) , (1.8)The symbol Eej c(j) refers to the maximum of the elements c(j) with respect to

Page 13: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

SYNCHRONIZATION AND LINEARITY INTRODUCTION AND MOTIVATION 7

ppropriate j, and 0 (pronounced 'o-times') refers to addition. Later on the101 EB (pronounced 'o-plus') wil also be used; a EB b refers to the maximum ofcalars a and b. If the initial condition for (1.8) is x(O) = xo, then

where it is understood that multiplication has priority over addition. Usually, how-ever, (1.0) is written as

x(l) = A0xo ,x(2) = A 0 x(l) = A 0 (A 0 xo) = (A 0 A) 0 Xo = A2 0 Xo

x(k + 1) = Ax(k) EB Bu(k) , 1.

y(k) = Gx(k) , r (1.2)

If it is clear where the '0'-symbols are used, they are sometimes omitted,as shown in (1.12). This practice is exactly the same one as with respectto the more common multiplication ' x ' or ' . ' symbol in conventionalalgebra. In the same vein, in conventional algebra 1 x x is the same as lx,which is usually written as x. Within the context of the 0 and EB symbols,

00 x is exactly the same as x. The symbol c is the neutral element withrespect to maximization; its numerical value equals -00. Similarly, thesymbol e denotes the neutral element with respect to addition; it assumesthe numerical value 0, Also note that 1 0 x is different from x.

11 be shown in Chapter 3 that indeed A 0 (A 0 xo) = (A 0 A) 0 xo. For the

iple given above it is easy to check this by hand. Instead of A 0 A we simply: A2. We obtain

x(3) = A 0 x(2) = A 0 (A2 0 xo) = (A 0 A2) 0 Xo = A3 0 Xo ,

in general

x(k) = (A 0 A 0...0 AJ 0 Xo = Ak 0 Xo~

k times

A2 _ ( max(3 + 3,7 + 2) max(3 + 7, 7 + 4) ) _ ( 9- max(2 + 3,4 + 2) max(2 + 7,4 + 4) - 6

11 )9 '

If one wants to think in terms of a network again, then u( k) is a vector indicatingwhen certain resources become available for the k-th time. Subsequently it takesBij time units before the j -th resource reaches node í of the network. The vectory(k) refers to the epoch at which the final products of the network are delivered tothe outside world.

Take for example

matrices A2, A3".., can be calculated directly. Let us consider the A-matrix.5) again, then

~neral

(A2)ij = EBAil 0 AZj = mlx(Aii + Aij)Z

(1.9) x(k + 1)(; ~) x(k) EB ( ~ ) u(k) , 1

= (3 c )x(k) . f(1.3)

\n extension of (1.8) is y(k)

x(k+l) = (A0x(k))EB(B0u(k)), 1.y(k) = G0x(k), J (1.0) The corresponding network is shown in Figure 1.2. Because B II = c ( = -(0), the

xi(k + 1)

Yi(k)

max(Ail + Xi (k),..., Ain + xn(k),Bi¡ + U¡ (k),.." Bim + um(k)) ,

max(Gil + xi(k)".., Gin + xn(k))

í=l"..,n,í=l,...,p

. u(k)

~~a;.~.. y(k)

symbol EB in this formula refers to componentwise maximization. The m-Jr u is called the input to the system; the p-vector y is the output of the system.components of u refer to nodes which have no predecessors. Similarly, theponents of y refer to nodes with no successors. The components of x now referitemal nodes, i.e. to nodes which have both successors and predecessors. Theices B = t Bij 1 and G = t Gij 1 have sizes n x m and p x n, respectively. Thetional way of writing (1.10) would be

.etimes (1.0) is written as Figure 1.2: Network with input and output

x(k + 1)

y(k)A0x(k)EBB0u(k)G0x(k) , , 1

(1.11) input u( k) only goes to node 2. If one were to replace B by (2 1)' for instance,

where the prime denotes transposition, then each input would 'spread' itself over

Page 14: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

SYNCHRONIZATION AND LINEARITY INTRODUCTION AND MOTIVATION 9

wo nodes. In this example from epoch u(k) on, it takes 2 time units for thet to reach node 1 and 1 time unit to reach node 2, In many practical situationsiput will enter the network through one node. That is why, as in this example,one B-entry per column is different from c. Similar remarks can be made with~ct to the output. Suppose that we have (1.6) as an initial condition and that

section. To solve these problems, the theory must first be developed and that willbe done in the next chapters. Although some of the examples deal with equationswith the look of (1.8), the operations used wil again be different. The mathematicalexpressions are the same for many applications. The underlying algebra, however,differs. The emphasis of this book is on these algebras and their relationships.

u(O) = 1, u(l) = 7, u(2) = 13, u(3) = 19 ,..., 1.2.1 Planning

it easily follows that Planning is one of the traditional fields in which the max-operation plays a crucialrole. In fact, many problems in planning areas are more naturally formulated withthe min-operation than with the max-operation, However, one can easily switch fromminimization to maximization and vice versa. Two applications wil be consideredin this subsection; the first one is the shortest path problem, the second one is ascheduling problem. Solutions to such problems have been known for some time,but here the emphasis is on the notation introduced in § 1.1 and on some analysispertaining to this notation.

;(0) = ( ¿ ), x(1) = ( ~ ), x(2) = ( i; ), x(3) = ( ~~ ) ,...,

y(O) = 4, y(l) = 10, y(2) = 14, y(3) = 19 ,....'fe stared this section with the difference equation (1.), which is a first-orderr vector difference equation. It is well known that a higher order linear scalarrence equation

z(k + 1) = aiz(k) + a2z(k - 1) + '.. + anz(k - n + 1) (1.4)1.2 ,1.1 Shortest Path

, (1.5)

CQnsider a network of n cities; these cities are the nodes in a network. Betweensome cities there are road connections; the distance between city j and city i is

indicated by Aij. A road corresponds to an arc in the network, If there is no roadfrom j to i, then we set Aij = c. In this example c = +00; nonexisting roads

get assigned a value +00 rather than -00. The reason is that we wil deal withminimization rather than maximization. Owing to the possibility of one-way traffic,it is allowed that Aij i- Aji. Matrix A is definedas A = (Aij).

The entry Aij denotes the distance between j and i if only one link is allowed.Sometimes it may be more advantageous to go from j to i via k, This wil be the

case if Aik + Akj ~ Aij, The shortest distance from j to i using exactly two linksis

be written in the form of Equation (1.1), If we introduce the vector (z(k),- 1),..., z(k - n + 1))', then (1.4) can be written as

z(k + 1)

z(k)

( a¡ a2 . . . . .. an i

1 0 ... '.. 0o

o ... 0 1 0

z(k)z(k - 1)

z(k-n+2) z(k-n+l)equation has exactly the form of (1.1). If we change the operations in (1.14)

ie standard way, addition becomes maximization and multiplication becomes:ion; then the numerical evaluation of (1.14) becomes

min (Aik + Akj) , (1.7)k=l,...,n

When we use the shorthand symbol EE for the minimum operation, then (1.17)becomes

z(k + 1) = max(a¡ + z(k), a2 + z(k - 1),..., an + z(k - n + 1)) ( 1.6) EB Ak 18 Akj ,k

Note that EB has been used for both the maximum and the minimum operation.It should be clear from the context which is meant. The symbol EE wil be usedsimilarly. The reason for not distinguishing between these two operations is that(~ U t -00 ), max, +) and (~U t +00 L min, +) are isomorphic algebraic structures.Chapters 3 and 4 wil deal with such structures, It is only when the operations maxand min appear in the same formula that this convention would lead to ambiguity.This situation wil occur in Chapter 9 and different symbols for the two operationswill be used there, Expression (1.7) is the ij-th entry of A2:

(A2)ij = EBAik 18 Akjk

equation can also be written as a first-order linear vector difference equation,ict this equation is almost Equation (1.15), which must now be evaluated with)perations maximization and addition. The only difference is that the 1 's andn (1.15) must be replaced bye's and c's, respectively.

MISCELLANEOUS EXAMPLES

is section, seven examples from different application areas are presented, with aial emphasis on the modeling process, The examples can be read independently.shown that all problems formulated lead to equations of the kind (1.8), (1.10),lated ones. Solutions to the problems which are formulated are not given in this

Page 15: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

SYNCHRONIZATION AND LINEARITYINTRODUCTION AND MOTIVATION

11

te that the expression A2 can have different meanings also. In (1.9) the max-~ration was used whereas the min-operation is used here.If one is interested in the shortest path from j to i using one or two links, thenlength of the shortest path becomes

but it cannot be seen from this equation that the operations to be used are mini-mization and addition. The principle of dynamic programming can be recognizedin (1.9), The following fonuula gives exactly the same results as (1.9):

(A EB A2)ij

Xij ( k) = min (Ail + Xlj (k - 1)), i, j = 1, .. . , n ,l=l"..,n

ve continue, and if one, two or three links are allowed, then the length of thertest path from j to i becomes

The difference between this fonuula and (1.9) is that one uses the principle offorward dynamic programming and the other one uses backward dynamic program-ming.

(A EB A2 EB A3)ij ,1.2 .1.2 Scheduling

~re A3 = A2 0 A, and so on for more than three links. We want to find thertest path whereby any number of links is allowed. It is easily seen that a roadnection consisting of more than n - 1 links can never be optimaL. If it weremal, the traveler would visit one city at least twice. The road from this citytself fonus a part of the total road connection and is called a circuit. Since itacitly) assumed that all distances are nonnegative, this circuit adds to the totalince and can hence be disregarded. The conclusion is that the length of thetest path from j to i is given by

Consider a project which consists of various tasks. Some of these tasks cannotbe started before some others have been finished. The dependence of these taskscan be given in a directed graph in which each node coincides with a task (or,equivalently, with an activity). As an example, consider the graph of Figure 1.3.There are six nodes, numbered 1,.,.,6. Node 1 represents the initial activity and

A + ~ A EB A 2 EB ' . , EB An EB A n+ I EB ' . , (1.8)

~.4./ ;"' i \~1~ ~~-0~.i 6.

3

(A EB A2 EB ' , , EB An-1 )ij

ivalently one can use the following infinite series for the shortest path (the tenusk 2' n do not contribute to the sum):

matrix A +, sometimes referred to as the shortest path matrix, also shows up in;cheduling problem that we define below shortly.IJote that (A+)ii refers to a path which first leaves node i and then comes back, If one wants to include the possibility of staying at a node, then the shortestmatrix should be defined as e EB A +, where e denotes the identity matrix of the

~ size as A. An identity matrix in this set-up has zeros on the diagonal and ther entries have the value +00. In general, e is a unit matrix of appropriate size,~he shortest path problem can also be fonuulated according to a differencetion of the fonu (1.8). To that end, consider an n x n matrix X: the ij-th entry. refers to a connection from city j to city i, Xij (k) is the minimum length with~ct to all roads from j to i with k links. Then it is not difficult to see that this)r satisfies the equation

Figure 1.3: Ordering of activities in a project

Xij(k) = min (Xil(k- 1) + A/j), i,j = 1,..., n ,l=l,,,.,n (1.9)

node 6 represents the final activity, It is assumed that the activities, except the finalone, take a certain time to be perfonued. In addition, there may be traveling times.The fact that the final activity has a zero cost is not a restriction. If it were tohave a nonzero cost, a fictitious node 7 could be added to node 6. Node 7 wouldrepresent the final activity. The arcs between the nodes in Figure 1.3 denote theprecedence constraints. For instance, node 4 cannot star before nodes 2 and 5 havefinished their activities. The number Aij associated with the arc from node j tonode i denotes the minimum time that should elapse between the beginning of anactivity at node j and the beginning of an activity at node i,

By means of the principle of dynamic programming it is not diffcult to calculatethe critical path in the graph, Critical here refers to 'slowest'. The total duration ofthe overall project cannot be smaller than the summation of all numbers Aij alongthe critical path.

Another way of finding the time at which the activity at node i can start at theearliest, which wil be denoted Xi, is the following. Suppose activity 1 can start at

tally this equation can be written as

X(k)=X(k-l)A=X(k-l)0A,

Page 16: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

12 SYNCHRONIZATION AND LINEARITY INTRODUCTION AND MOTIVATION 13

epoch u at the earliest. This quantity u is an input variable which must be givenfrom the outside. Hence Xl = u, For the other x;'s we can write

although it was concluded that Ak, k ? n, does not contribute to the sum, With theconventional matrix calculus in mind one might be tempted to write for (1,22):

Xi = max (Aij + Xj) ,J=I,..,,6

(eEBAEBA2EBoo,) = (e8A)-1 , (1.23 )

X = Ax EB Bu , (1.20)

wherec c c c c c e5 c C E C C c

A= I 3 c c c c c B= cc 2 c c 5 c , cc 1 4 c c c cc c 8 2 4 c c

Of course, we have not defined the inverse of a matrix within the current setting andso (1.23) is an empty statement. It is also strange to have a 'minus' sign 8 in (1.23)and it is not known how to interpret this sign in the context of the max-operationat the left-hand side of the equation, It should be the reverse operation of EB, If wedare to continue along these shaky lines, one could write the solution of (1.20) as

(e8A)x=Bu=?x=(e8A)-IBu,

If there is no arc from node i to j, then Aij gets assigned the value c (= -00), If

X = (Xi,,,, , X6)' and A = (Aij), then we can compactly write

Note that e in B equals 0 in this context. Here we recognize the form of (1.11),although in (1.20) time does not playa role; X in the left-hand side equals the xin the right-hand side. Hence (1.20) is an implicit equation for the vector x, Letus see what we obtain by repeated substitution of the complete right-hand side of(1.20) into x of this same right-hand side. After one substitution:

x = A2x EB ABu EB BuA2x EB (A EB e)Bu ,

Quite often one'can guide one's intuition by considering formal expressions of thekind (1.23). One tries to find formal analogies in the notation using conventionalanalysis, In Chapter 3 it wil be shown that an inverse as in (1.23) does not exist ingeneral and therefore we get 'stuck' with the series expansion.

There is a dual way to analyze the critical path of Figure 1.3, Instead of startingat the initial node 1, one could start at the final node 6 and then work backward intime, This latter approach is useful when a target time for the completion of the

project has been set. The question then is: what is the latest moment at which eachnode has to start its activity in such a way that the target time can stil be fulfilled?If we call the starting times Xi again, then it is not difficult to see that

x = Anx EB (An-i EB An-2 EB '" EB A EB e)Bu

Xi =min (min ((Â)ij +xj) , (Ê)i +uJ, i=l,...,6,

wherec 5 3 c c c c

c c c 2 1 c c

A= I c c c c 4 8 B= cc c c c c 2 cc c c 5 c 4 c

c c c c c c e

and after n substitutions:

In the formulæ above, e refers to the identity matrix; zeros on the diagonaland c's elsewhere, The symbol e will be used as the identity element forall spaces that wil be encountered in this book. Similarly, c wil be usedto denote the zero element of any space to be encountered. It is easily seen that  is equal to the transpose of A in (1.20); X6 has been chosen

as the completion time of the project. In matrix form, we can writeSince the entries of An denote the weights of paths with length n in the correspondinggraph and A does not have paJhs of length greater than 4, we get An = -00 forn ?: 5. Therefore the solution x in the current example becomes

X=(Â8X)I\(Ê8U) ,

x = (A4 EB A3 EB A2 EB A EB e)Bu , (1.21 )where 8 is a new matrix multiplication using min as addition of scalars and + asmultiplication, whereas 1\ is the min of vectors, componentwise, This topic of targettimes will be addressed in §5.6,

for which we can writex = (eEBA+)Bu ,

where A+ was defined in (1.8).In (1.21), we made use of the series

1.2.2 Communication

A * ~ e EB A EB . , . EB An EB A n+ i EB ' ,. , (1.22 )

This subsection focuses on the Viterbi algorithm, It can conveniently be describedby a formula of the form (1.1). The operations to be used this time are maximizationand multiplication.

Page 17: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

14 SYNCHRONIZATION AND LINEARITY

The stochastic process of interest in this section, v(k), k :: 0, is a time homo-geneous Markov chain with state space t 1,2, . . . , n J-, defined on some probabilityspace (D, IF, lI), The Markov property means that

lI Lv(k + 1) = ik+l I v(O) = io".., v(k) = ik) = lI Lv(k + 1) = ik+l i v(k) = ik) ,

where lI L 911 Ð) denotes the conditional probability of the event 9l given the event

Ð and 9l and Ð are in IF, Let Mij denote the transition probability! from state j toi. The initial distribution of the Markov chain wil be denoted p.

The process v = (v(O),..., v(K)) is assumed to be observed with some noise.

This means that there exists a sequence of t 1,2, . . . ,n )-valued random variables

z(k), k = 0"", K, called the observation, and such that Nidi ~ II¡z(k) = ik i

v(k) = jkJ does not depend on k and such that the joint law of (v, z), wherez = (z(O)".., z(K)), is given by the relation

II¡v = j, z = iJ = (n NidkMjdk-) Niojopjo ,k=l

(1.24 )

where i = (io,... ,i¡d and j = (jo,... ,jK).Given such a sequence z of observations, the question to be answered is to find

the sequence j for which the probability lI LV = j I z) is maximaL. This problem isa highly simplified version of a text recognition problem. A machine reads hand-written text, symbol after symbol, but makes mistakes (the observation errors). Theunderlying model of the text is such that after having read a symbol, the probabilityof the occurrence of the next one is known. More precisely, the sequence of symbolsis assumed to be produced by a Markov chain,

We want to compute the quantity

Xh-(K) = . max lI (v = j, z = iJJo,...,)1(-1

( 1.25)

This quantity is also a function of i, but this dependence wil not be made explicit.The argument that achieves the maximum in the right-hand side of (1.25) is the mostlikely text up to the (K -1)-st symbol for the observation i; similarly, the argument

jK which maximizes xjg(K) is the most likely K-th symbol given that the first Kobservations are i. From (1.24), we obtain

"max (n (NiijiMjdk_l) NiOjOPjO)JOi...,JK-I k=!

max ((Ni¡ci¡,Mjjcij,_I) xjg_I(K -1))J1\-1

Xj¡.(K)

with initial condition Xjo(O) = Niojopjo' The reader wil recognize the above al-gorithm as a simple version of (forward) dynamic programming, If Nii,jkMjdi_1 isdenoted Ajdi_,' then the general formula is

xm(k) = max (Amexe(k - 1)), m = 1,..., nt=l,...,n ( 1.26)

'Classically, in Markov chains, !vIij would rather be denoted Mji'

i

I:

1i

i,"

I!

I

(\i

I

:11'

I'ii'

I,"

INTRODUCTION AND MOTIVATION 15

Table 1.1: Processing times~M! 1 5

M2 3 2 3

M3 4 3

This formula is similar to (1.) if addition is replaced by maximization and multi-plication remains multiplication.

The Viterbi algorithm maximizes II¡v, zJ as given in (1.24), If we take the

logarithm of (1.24), and multiply the result by -1, (1.26) becomes

-In(xm(k))= min L-ln(Ame)-ln(xp(k-l))), m=I"..,nP=!,u"n

,I

fl

'i

,/'I

II\

The form of this equation exactly matches (1.9). Thus the Viterbi algorithm isidentical to an algorithm which determines the shortest path in a network, Actually,it is this latter algorithm-minimizing - In(II¡v i zJ)-which is quite often referredto as the Viterbi algorithm, rather than the one expressed by (1.26),

1.2.3 Production

Consider a manufacturing system consisting of three machines, It is supposed toproduce three kinds of parts according to a certain product mix. The routes tobe followed by each part and each machine are depicted in Figure 1.4 in whichMi, i = 1,2,3, are the machines and Pi, i = 1,2,3, are the pars. Processing

~~ . ~I I ~P3

Figure 1.4: Routing of parts along machines

times are given in Table 1.1. Note that this manufacturing system has a flow-shopstructure, i,e. all parts follow the same sequence on the machines (although theymay skip some) and every machine is visited at most once by each part. We assumethat there are no set-up times on machines when they switch from one part type toanother, Parts are carried on a limited number of pallets (or, equivalently, productcarriers). For reasons of simplicity it is assumed that

1. only one pallet is available for each part type;

Page 18: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

16 SYNCHRONIZATION AND LINEARITY INTRODUCTION AND MOTIVATION 17

2. the final product mix is balanced in the sense that it can be obtained bymeans of a periodic input of parts, here chosen to be Pi, P2, H;

3, there are no set-up times or traveling times;

4, the sequencing of part types on the machines is known and it is (P2, P3)on Mi, (Pi, P2, P3) on M2 and (Pi,P2) on M3.

v~ 1"'M2 ~I3

U3 .M3 --16

Y4

The last point mentioned is not for reasons of simplicity, If any machine were tostart working on the part which arrived first instead of waiting for the appropriatepart, the modeling would be different. Manufacturing systems in which machinesstart working on the first arriving part (if it has finished its current activity) wilbe dealt with in Chapter 9, We can draw a graph in which each node correspondsto a combination of a machine and a part. Since Mi works on 2 parts, M2 on3 and M3 on 2, this graph has seven nodes, The arcs between the nodes expressthe precedence constraints between operations due to the sequencing of operationson the machines. To each node i in Figure 1.5 corresponds a number Xî which

denotes the earliest epoch at which the node can start its activity. In order to be ableto calculate these quantities, the epochs at which the machines and parts (togethercalled the resources) are available must be given. This is done by means of a six-dimensional input vector u (six since there are six resources: three machines andthree pars). There is an output vector also; the components of the six-dimensionalvector y denote the epochs at which the parts are ready and the machines have

finished their jobs (for one cycle). The model becomes

P2

1usU¡--.r

- 14- . --1~s

P3

1 U6.. -- Yi

12.. -- Y2

1~6

Figure 1.5: The ordering of activities in the flexible manufacturing system

/ '\ /',-~i ~ ~ '.

/ ' " 1" ) · - ~~ '. '- --..-----1'~

"-~i.: ): --¡,,----'- i; ).-~~ -------f---- \,/~

,-~. ' ,----'( \ I ) · - ',,--~::_---- \,~'~- - - _..

x = Ax E9 Bu ; ( 1.27)

y=Cx, (1.28)

in which the matrices are

E E E E E E E e E E E e E

E E E E E E E E E E E eE E E E E E E E e E e E E

A= I 1 E 3 E E E E , B= E E E E E E

E 5 E 2 E E E E E E E E E

E E 3 E E E E E E e E E E

E E E 2 E 4 E E E E E E E

E 5 E E E E E

E E E E 3 E E

C= I E E E E E E 3E E E E E 4 E

E E E E E E 3E E E E 3 E E

Equation (1,27) is an implicit equation in x which can be solved as we did in thesubsection on Planning;

x = A' Bu ,

Figure 1.6: Production system with feedback arcs

Now we add feedback arcs to Figure 1.5 as illustrated in Figure 1.6, In this graphthe feedback arcs are indicated by dotted lines. The meaning of these feedback arcsis the following. After a machine has finished a sequence of products, it starts withthe next sequence. If the pallet on which product Pî was mounted is at the end,the finished product is removed and the empty pallet immediately goes back to thestarting point to pick up a new part Pî, If it is assumed that the feedback arcs havezero cost, then u(k) = y(k - 1), where u(k) is the k-th input cycle and y(k) the

k-th output. Thus we can write

y(k) Cx(k) CA' Bu(k)CA' By(k - 1) (1.29)

The transition matrix from y(k - 1) to y(k) can be calculated (it can be done byhand, but a simple computer program does the job also):

6 E E E 6 5

9 8 E 8 9 8

M ~ CA' B = I 6 10 7 10 6 E

E 7 4 7 E E

6 10 7 10 6 E

9 8 E 8 9 8

Page 19: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

18 SYNCHRONIZATION AND LINEARITY INTRODUCTION AND MOTIVATION 19

This matrix M determines the speed with which the manufacturing system can work,We wil return to this issue in § 1.3

is an implicit equation in x(k +1) which can be solved again, as done before, Theresult is

1.2.4 Queuing System with Finite Capacity x(k + 1) = (A2(k + 1, k + 1))* (Ai(k + 1, k)x(k) EB Bu(k + 1)) ,

where (A2(k + 1, k + 1))* equalsLet us consider four servers, Si, iI, ... ,4, in series (see Figure 1.7). Each

~~0~0~0~~~F-ire 1.7: Queuing system with four servers

( e

Ti(k + 1)

Ti(k + 1)T2(k + 1)

Ti (k + 1)T2(k + 1)T3(k + 1)

E

eT2 (k + 1)

T2 (k + 1) T3 (k + 1)

E

E

eT3(k + 1) n

customer is to be served by Si, S2, S3 and S4, and specifically in this order, It takesTi(k) time units for Si to serve customer k (k = 1,2". ,), Customer k arrves atepoch u(k) into the buffer associated with Si. If this buffer is empty and Si isidle, then this customer is served directly by SI. Between the servers there are nobuffers, The consequence is that if Si, i = 1,2,3, has finished serving customer k,but Si+ 1 is still busy serving customer k - 1, then Si cannot start serving the newcustomer k + 1. He must wait. To complete the description of the queuing system,it is assumed that the traveling times between the servers are zero. Let Xi (k) denotethe beginning of the service of customer k by server Si' Before Si can start servingcustomer k + 1, the following three conditions must be fulfilled:

. Si must have finished serving customer k;

. SHI must be idle (for i = 4 this condition is an empty one);

. Si-l must have finished serving customer k + 1 (for i = 1 this condition is anempty one and must be related to the arrval of customer k + 1 in the queuingsystem),

It is not difficult to see that the vector X, consisting of the four x-components,satisfies

The customers who arrive in the queuing system and cannot directly be servedby Si, wait in the buffer associated with Si. If one is interested in the buffercontents, i,e. the number of waiting customers, at a certain moment, one should usea counter (of customers) at the entry of the buffer and one at the exit of the buffer.The difference of the two counters yields the buffer contents, but this operationis nonlinear in the max-plus algebra framework. In § 1.2.6 we wil return to the'counter' -description of discrete event systems. The counters just mentioned arenondecreasing with time, whereas the buffer contents itself is fluctuating as a functionof time.

The design of buffer sizes is a basic problem in manufacturing systems, If thebuffer contents tends to go to 00, one speaks of an unstable system. Of course, anunstable system is an example of a badly designed system, In the current example,buffering between the servers was not allowed. Finite buffers can also be modeledwithin the max-plus algebra context as shown in the next subsection and moregenerally in §2,6.2. Another useful parameter is the utilization factor of a server, Itis defined by the 'busy time' divided by the total time elapsed.

Note that we did not make any assumptions on the service time Ti(k), If oneis faced with unpredictable breakdowns (and subsequently a repair time) of theservers, then the service times might be modeled stochastically, For a deterministicand invariant ('customer invariant' system, the serving times do not, by definition,depend on the particular customer.

( T'(k;+ I)

E E

D x(H I)x(k + 1)

E E

T2(k + 1) E

c T3(k + 1)

(1.0)

( T,(k)

e E

: ) x(k) ff (: ) u(H 1)

EB E T2 ( k ) eE E T3 ( k )

E E E T4(k) E

x(k + 1) = A2(k + 1, k + l)x(k + 1) EB Ai(k + 1, k)x(k) EB Bu(k + 1) ,

1.2.5 Parallel Computation

The application of this subsection belongs to the field of VLSI array processors(VLSI stands for 'Very Large Scale Integration'). The theory of discrete eventsprovides a method for analyzing the pedormances of so-called systolic and wavefrontarray processors, In both processors, the individual processing nodes are connectedtogether in a nearest neighbor fashion to form a regular lattice. In the application tobe described, all individual processing nodes pedorm the same basic operation.

The difference between systolic and wavefront array processors is the following.In a systolic array processor, the individual processors, i.e. the nodes of the network,operate synchronously and the only clock required is a simple global clock, The

wavefront array processor does not operate synchronously, although the requiredprocessing function and network configuration are exactly the same as for the systolic

We wil not discuss issues related to initial conditions here, For those questions, thereader is referred to Chapters 2 and 7. Equation (1.30), which we write formally as

Page 20: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

20 SYNCHRONIZATION AND LINEARITY

processor. The operation of each individual processor in the wavefront case iscontrolled locally. It depends on the necessary input data available and on theoutput of the previous cycle having been delivered to the appropriate (i.e. directlydownstream) nodes, For this reason a wavefront array processor is also called adata-driven net.

We wil consider a network in which the execution times of the nodes (the indi-vidual processors) depend on the input data, In the case of a simple multiplication,the difference in execution time is a consequence of whether at least one of theoperands is a zero or a one. We assume that if one of the operands is a zero or aone, the multiplication becomes trivial and, more importantly, faster. Data drivennetworks are at least as fast as systolic networks since in the latter case the periodof the synchronization clock must be large enough to include the slowest local cycleor largest execution time,

B21

Bii 1

""AI2,Aii 0°__e -

H'A"~l~O

r

B22

Bl2 100

... --

l~o

"i~Figure 1.8: The network which multiplies two matrices

...,Ai,j+I,Aij

Bi+i,m

1Bim r¡lVAi,j-I'"

.1 fH:

". Ai,j+1 1BI+1

,m

/7 r¡+AijBlm

.1. :~"'A'J+"Ifi-i,m

Figure 1.9: Input and output of individual node, before and after one actiyity

Consider the network shown in Figure 1.8, In this network four nodes areconnected, Each of these nodes has an input/output behavior as given in Figure 1.9,The purpose of this network is to multiply two matrices A and B; A has size 2 x n

!

INTRODUCTION AND MOTIVATION 21

and B has size n x 2, The number n is large (:?:? 2), but otherwise arbitrary. Theentries of the rows of A are fed into the network as indicated in Figure 1.8; theyenter the two nodes on the left. Similarly, the entries of B enter the two top nodes.Each node wil start its activity as soon as each of the input channels contains adata item, provided it has finished its previous activity and sent the output of thatprevious activity downstream. Note that in the initial situation-see Figure 1.8-notall channels contain data, Only node 1 can start its activity immediately, Also notethat initially all loops contain the number zero.

The activities will stop when all entries of A and B have been processed, Theneach of the four nodes contains an entry of the product AB. Thus for instance, node2 contains (AB) 12, It is assumed that each node has a local memory at each of itsinput channels which functions as a buffer and in which at most one data item canbe stored if necessary, Such a necessity arises when the upstream node has finishedan activity and wants to send the result downstream while the downstream node isstill busy with an activity. If the buffer is empty, the output of the upstream node cantemporarily be stored in this buffer and the upstream node can start a new activity(provided the input channels contain data), If the upstream node cannot send out itsdata because one or more of the downstream buffers are full, then it cannot star anew activity (it is 'blocked),

Since it is assumed that each node starts its activities as soon as possible, thenetwork of nodes can be referred to as a wavefront array processor, 'The executiontime of a node is either Ti or T2 units of time, It is Ti if at least one of the inputitems, from the left and from above (Aij and Bij), is a zero or a one, Then theproduct to be performed becomes a trivial one, The execution time is T2 if neitherinput contains a zero or a one,

It is assumed that the entry Aij of A equals zero or one with probability p,° :: p :: 1, and that Aij is neither zero nor one with probability 1 - p. The entriesof B are assumed to be neither zero nor one (or, if such a number would occur, itwil not be detected and exploited),

If xi(k) is the epoch at which node i becomes active for the k-th time, then itfollows from the description above that

xi(k+l)=ai(k)xi(k)E9X2(k-l)E9x3(k-l), 1x2(k + 1) = ai (k)X2(k) E9 ai (k + l)xi (k + 1) E9 x4(k - 1) ,x3(k + 1) = a2(k)x3(k) E9 ai (k + l)xi (k + 1) E9 x4(k - 1) ,X4 (k + 1) = a2 ( k ) X4 ( k) E9 a 1 (k + 1) X2 (k + 1)

E9 a2(k + l)x3(k + 1) ,

(1.1)

In these equations, the coeffcients ai (k) are either Ti (if the entry is either a zeroor a one) or T2 (otherwise); ai (k + 1) have the same meaning with respect to thenext entry, Systems of this type will be considered in Chapter 7.

There is a correlation among the coefficients of (1.31) during different time steps,By replacing x2(k) and x3(k) by x2(k + 1) and x3(k + 1), respectively, x4(k) by

Page 21: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

22 SYNCHRONIZATION AND LINEARITY INTRODUCTION AND MOTIVATION 23

x4(k + 2) and a2(k) by a2(k + 1), we obtain

x¡(k+l) = a¡(k)x¡(k) EEx2(k) EEx3(k) , )x2(k + 1) = ai (k - l)x2(k) EE ai (k)x¡ (k) EE x4(k) ,

x3(k + 1) = a2(k)x3(k) EE a¡ (k)x¡ (k) EE x4(k) ,

x4(k + 1) = a2(k - l)x4(k) EE a¡(k - l)x2(k) EE a2(k)x3(k) ,

(1.32)

consists of two inner circles, along which the trains run in opposite direction, and ofthree outer circles. The trains on these outer circles deliver and pick up passengersat local stations, These local stations have not been indicated in Figure 1.10 sincethey do not play any role in the problem to be formulated,

There are nine railway tracks. Track BiBj denotes the direct railway connectionfrom station Bi to station Bj; track BiBi denotes the outer circle connected to stationBi, Initially, a train runs along each of these nine tracks, At each station the trainsmust wait for the trains arriving from the other directions (except for the trainscoming from the direction the current train is heading for) in order to allow fortransfers, Another assumption to be satisfied is that trains on the same circle cannotbypass one another. If Xi (k) denotes the k-th departure time of the train in direction i(see Figure 1.0) then these departure times are described by x(k + 1) = Ai Q9x(k),where Ai is the 9 x 9 matrix

The correlation between some of the ai-coeffcients still exists. The standard proce-dure to avoid problems connected to this correlation is to augment the state vector x.Two new state variables are introduced: x5(k + 1) = ai (k) and x6(k + 1) = a2(k),Equation (1.32) can now be written as

Xi (k + 1) = ai (k)xi (k) EE x2(k) EE x3(k) ,

x2(k + 1) = x5(k)X2(k) EE ai(k)xi(k) EE x4(k) ,

x3(k + 1) = a2(k)x3(k) EE ai(k)x¡(k) EE x4(k) ,

x4(k + 1) = x6(k)X4(k) EE x5(k)X2(k) EE a2(k)x3(k) ,

x5(k + 1) = a¡(k) ,x6(k + 1) = a2(k) ,

(1.3 ) e E 831 E E E 81¡ E E

8¡2 e E E E E E 822 E

E 823 e E E E E E 833

E E E e 821 E 811 E E

A¡I

E E E E e 832 E 822 E

E E E 8¡3 E e E E 833

E E 831 E 821 E 8¡1 E E

8¡2 E E E E 832 E 822 E

E 823 E 813 E E E E 833

The correlation in time of the coeffcients ai has disappeared at the expense of alarger state vector. Also note that Equation (1.33) has terms xj(k) Q9 xi(k), whichcause the equation to become nonlinear (actually, bilinear). For our purposes ofcalculating the performance of the array processor, this does not constitute basicdifficulties, as will be seen in Chapter 8, Equation (1.32) is non-Markovian andlinear, whereas (1.33) is Markovian and nonlinear,

An entry 8ij refers to the traveling time on track BiSj. These quantities include

transfer times at the stations. The diagonal entries e prevent trains from bypassingone another on the same track at a station, The routing of the trains was according

. to Figure 1.10; trains on the two inner circles stay on these inner circles and keepthe same direction; trains on the outer circles remain there. Other routings ofthe trains are possible; two such different routings are given in Figures 1.11 and1.12, If xi(k) denotes the k-th departure time from the same station as given in

Figure 1.10, then the departure times are described again by a model of the formx(k + 1) = A Q9 x(k). The A-matrix corresponding to Figure 1.11 is indicated byA2 and the A -matrix corresponding to Figure 1.12 by A3. If we define matrices Fiof size 3 x 3 in the following way:

1.2.6 Traffc

F¡ =

(EEE) (EE E E , F2 = 812E E E E

: ), F4=833

E

E

823

83¡ )E ,E

( 811

F3 = :E

822

E u,821

E

E + )Figure 1.10: The railway system, routing no, 1 then the matrices Ai, A2 and A3 can be compactly written as

In a metropolitan area there are three railway stations, Bi, B2, and B3, which areconnected by a railway system as indicated in Figure 1.10. The railway system

A, ~ (e EE F2

FiF2

Fie EE F4

F4 ~ ), A, ~ (

e EE F2

F2F2

F4e EE F4

F4

F3 )F3 ,F3

Page 22: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

24 SYNCHRONIZATION AND LINEARITY

Figure 1.11: Routing no, 2 Figure 1.12: Routing no, 3

( e EB Fi Fi

A3 = Fi eFz F4

It is seen that for different routing schemes, different models are obtained. Ingeneral, depending on the numerical values of 8ij, the time evolutions of these threemodels wil be different. One needs a criterion for deciding which of the routingschemes is preferable. .

Depending on the application, it may be more realistic to introduce stochastic8wquantities. Suppose for instance that there is a swing bridge in the railway trackfrom 83 to 81 (only in this track; there is no bridge in the track from 81 to 83). Eachtime a train runs from 83 to 81 there is a probability p, 0 :: p :: 1, that the trainwill be delayed, i,e. 831 becomes larger. Thus the matrices Ai become k-dependent;Ai (k). The system has become stochastic, In this situation one may also have apreference for one of the three routings, or for another one.

The last par of the discussion of this example wil be devoted to the deterministicmodel of routing no, 1 again, However, to avoid some mathematical subtleties whichare not essential at this stage, we assume that there is at least a difference of T timeunits between two subsequent departures of trains in the directions i to 6 (T )- e).Consequently, the equations. are now x(k + 1) = Âi 0 x(k), where Âi equals the

previous Ai except for the first six diagonal entries that are replaced by T (insteadof e earlier), and the last three diagonal entries 8ii that are replaced by 8ii EB T

respectively,We then introduce a quantity Xi(t) which is related to xi(k). The argument t of

Xi(t) refers to the actual clock time and Xi(t) itself refers to the number of trainsdeparures in the direction i which have occurred up to (and including) time t, Thequantity Xi can henceforth only assume the values 0, 1,2, . ,.. At an arbitrary timet, the number of trains which left in the direction 1 can exceed at most by one:

F3 )

~3 '

· the same number of trains T units of time earlier;

"

INTRODUCTION AND MOTIVATION 25

. the number of trains that left in the direction 3 83 i time units earlier (recallthat initially a train was already traveling on each track);

. the number of trains that left in the direction 7 8 II time units earlier.

Therefore, We have

Xi(t) = min (Xi(t - T) + 1,X3(t - 831) + 1,X7(t - 811) + 1)

For Xi one similarly obtains

Xi(t) = min (Xi(t - 811) + 1,Xi(t - T) + 1,X8(t - 81) + 1) ,

etc, If all quantities 8ij and T are equal to 1, then one can compactly write

X(t)=A0X(t-1) ,where X(t) = (XI(t),"',X9(t))', and where the matrix A is derived from Ai by

replacing all entries equal to c by +00 and the other entries by 1, This equation mustbe read in the min-plus algebra setting. In case we want something more generalthan 8ij and T equal to 1, we will consider the situation when all these quantitiesare integer multiples of a positive constant gc; then gc can be interpreted as the timeunit along which the evolution will be expressed, One then obtains

X(t) = Ai 0 X(t - 1) EB Ai 0 X(t - 2) EB'" EB At 0 X(t -l) (1.4 )

for some finite L. The latter equation (in the min-plus algebra) and x(k + 1) =Âi 0 x(k) (in the max-plus algebra) describe the same system. Equation (1.34) is

referred to as the counter description and the other one as the dater description.. The word 'dater' must be understood as 'timer', but since the word 'time' and itsdeclinations are already used in various ways in this book, we will stick to the word'dater'. The awareness of these two different descriptions for the same problem hasfar-reaching consequences as wil be shown in Chapter 50

The reader should contemplate that the stochastic problem (in which some ofthe 8ij are random) is more difficult to handle in the counter description, since thedelays in (1,34) become stochastic (see §8.2.4),

1.2.7 Continuous System Subject to Flow Bounds and Mixing

So far, the examples have been related to the realm of discrete event systems, anddynamic equations have been obtained under the form of recursive equations in-volving max (or min) and +-operations, We close this section by showing that acontinuous-time system may naturally lead to essentially the same type of equa-tions whenever some flow limitation and mixing phenomena are involved, Had weadopted the point of view of conventional system theory, the model of such a systemin terms of differential equations would have exhibited very complex nonlinearities.With the following approach, we wil see that this system is 'linear' in a precisemathematical sense (see Chapter 6), An analogous discrete event model will bediscussed in Example 2.48.

Page 23: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

26 SYNCHRONIZATION AND LINEARITY

~Figure 1.13: A continuous system

In Figure 1.13, a fluid is poured through a long pipe into a first reservoir (emptyat time t = 0). The input u(t) denotes the cumulated flow at the inlet of the pipe upto time t (hence u(t) is a nondecreasing time function and u(t) = 0 for t :: 0). It isassumed that it takes a delay of 2 units of time (say, 2 seconds) for the fluid to travelthrough the pipe, From the first reservoir, the fluid drops into a second reservoirthrough an aperture which limits the instantaneous flow to a maximum value of,say, 0,5 liter per second. The volume of fluid at time t in this second reservoir isdenoted y(t), and it is assumed that y(O) = 3 liters,

Let us establish dynamic equations for such a system relating the output y to theinput U. Because of the flow limitation into the second reservoir, we have:

Vt, Vs2:0, y(t+s)::y(t)+O,5s, (1.35)

On the other hand, since there is a delay of 2 seconds caused by the pipe, y(t)should be compared with u(t - 2), and because there is a stock of 3 liters in thesecond reservoir at t = 0, we have:

Vt, y(t):: u(t - 2) + 3 ( 1.6)

It follows that

Vt y(t) :: y(t - s) + O,5s

~ u(t-2-s)+3+0,5s,Vs 2: 0

hence,

Vt , y(t) ~ influ(t - 2 - s) + 3 + O,5sjs~O

inf¡u(t - T) + 3 + O,5(T - 2)jT~2 (1.7)

Letdef f 3

h(t) = 1.3 + O,5(t - 2)if t :: 2;

otherwise, (1.38)

.~

INTRODUCTION AND MOTIVATION 27

and considerVt , y(t) ~ inqu(t - T) + h(T)J '

TEJl (1.9)

Indeed, in (1.39), the range of T may be limited to T 2: 2 since, for T ~ 2, h(T)remains equàl to 3 whereas U(t-T) 2: u(t-2) (remember that u(.) is nondecreasing).Therefore, comparing (1.9) with (1.7), it is clear that y(t) :: y(t), Vt.

Moreover, choosing T = 2 at the right-hand side of (1.39), we see that y satisfies(1.6), In addition, since for all s and all tJ 2: 0, h(s + tJ) :: h(s) + O,5tJ, then

Vt, VB 2: 0 y(t + tJ) inf ¡u(t + tJ - T) + h(T)jTEJl

inf ¡u(t - s) + h(s + tJ)jsEJl

~ inf ¡u(t - s) + h(s)J + O.5tJsEJl

y(t) + O,5tJ ,

Thus, y satisfies (1.5),Finally, we have proved that y is the maximum solution of (1.35)-(1.36). It can

also be checked that (1.9) yields y( t) = 3, Vt :: 2, Therefore, y is the solution

which wil be physically realized if we assume that, subject to (1.7)-(1.9), the

fluid flows as fast as possible. This output trajectory is related to the input history uby an 'inf-convolution' (see Equation (1.39)), In order to make this inf-convolutionmore visible, the inf-operator should be viewed as an 'integration' (which is nothingelse than the EB-operator ranging over the real numbers). If moreover + in (1.39)is replaced by 0 one obtains the appearance of the conventional convolution. Thesame kind of input-output relationship (indeed, a 'sup-convolution' in that context)

. can be obtained from the recursive equations (1.12) by developing the recursionfrom any initial condition.

As a final remark, observe that if we have two systems similar to the one shownin Figure 1.13, one producing a red fluid and the other producing a white fluid, andif we want to produce a pink fluid by mixing them in equal proportions, then thenew output is related to the two inputs by essentially the same type of equations.More specifically, let Yr(t) and Yw(t) be the quantities of red and white fluids thathave been produced in the two downstream reservoirs up to time t (including theinitial reserves). Suppose that the two taps at their outlets are opened so that thesame (very large) outflow of red and white liquids can be obtained unless one of thetwo reservoirs is empty, in which case the two taps are closed immediately. Then,min(Yr(t), yw(t)) is directly related to the quantity yp(t) of pink fluid produced upto time t. Therefore, this mixing operation does not introduce new mathematical

operators,

1.3 ISSUES AND PROBLEMS IN PERFORMANCE EVALUATION

In the previous sections we dealt with equations of the form x(k + 1) = Ax(k),or more generally x(k + 1) = A(k)x(k) EB B(k)u(k), In the applications threedifferent interpretations in terms of the operations were given: maximization and

Page 24: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

28 SYNCHRONIZATION AND LINEARITY

addition, minimization and addition and lastly, maximization and multiplication. Inthis section only the first interpretation wil be considered (we will say that thesystem under consideration is in the max-plus algebra framework). Before that abrief introduction to the solution of the conventional equation 0,1) is needed.

Assume that the initial vector (1.2) equals an eigenvector of A; the correspondingeigenvalue is denoted by À. The solution of (1,1) can be written as

x(t) = Àtxo , t=O,l,..., (1.40)

More generally, if the initial vector can be written as a linear combination of the setof linearly independent eigenvectors,

Xo = ¿CjVj ,

j(1.41 )

where Vj is the j-th eigenvector with corresponding eigenvalue Àj, the Cj are coef-ficients, then

x(t) = ¿ CjÀ~Vj ,

jIf the matrix A is diagonalizable, then the set of linearly independent eigenvectorsspans lRn, and any initial condition Xo can be expressed as in (1.41). If A is not

diagonalizable, then one must work with generalized eigenvectors and the formulawhich expresses x(t) in terms of eigenvalues and Xo is slightly more complicated,

This complication does not occur in the max-plus algebra context and therefore wilnot be dealt with explicitly.

In Chapter 3 it wil be shown that under quite general conditions an eigenvalue

(À) and corresponding eigenvector (v) also exist in the max-plus algebra context fora square matrix (A). The definition is

A0v=À0vTo exclude degenerate cases, it is assumed that not all components of v are identicalto c, For example,

(; ~) ( ;,5 ) = 4,5 ( ;,5 ) ,

Thus it is seen that the matrix A of (1.5) has an eigenvalue 4,5. Equation (1.40) isalso valid in the current setting. If Xo is an eigenvector of A, with correspondingeigenvalue À, then the solution of the difference equation (1.8) can be written as

x(k) = Àkxo (=Àk0xo), k=O,l,.... (1.42 )

The numerical evaluation of Àk in this formula equals kÀ in conventional analysis.The eigenvalue À can be interpreted as the cycle time (defined as the inverse ofthe throughput) of the underlying system; each node of the corresponding networkbecomes active every À units of time, since it follows straightforwardly from (1.42).

,

INTRODUCTION AND MOTIVATION 29

Also, the relative order in which the nodes become active for the k-th time, asexpressed by the components x;(k), is exactly the same as the relative order in whichthe nodes become active for the (k + l)-st time, More precisely, Equation 0.42)yields

xl(k+1)-xj(k+1)=xl(k)-xj(k), j,l=l,...,n,Thus the solution 0.42) exhibits a kind of periodicity. Procedures exist for thecalculation of eigenvalues and eigenvectors; an efficient one is the procedure knownas Kar's algorithm for which the reader is referred to Chapter 2. More discus-

sion about related issues can be found in Chapter 3. Under suitable conditions theeigenvalue turns out to be unique (which differs from the situation in conventionalanalysis). It can be shown for instance that A of (1.5) has only one eigenvalue,

Similarly, the matrix M of § 1.2,3 also has a unique eigenvalue:

6 c c c 6 5 e e9 8 c 8 9 8 3 3

6 10 7 10 6 c 3,5= 9,5

3,5c 7 4 7 c c 0,5 0,56 10 7 10 6 c 3,5 3,59 8 c 8 9 8 3 3

It follows that the eigenvalue equals 9,5, which means in more practical terms thatthe manufacturing system 'delivers' an item (a product or a machine) at all of itsoutput channels every 9,5 units of time. The eigenvector of this example is alsounique, apart from adding the same constant to all components. If v is an eigenvector,then CV, where C is a scalar, also is an eigenvector, since it follows directly from the

definition of eigenvalue, It is possible that several eigenvectors can be associatedwith the only eigenvalue of a matrix, i.e, eigenvectors may not be identical up toan additional constant.

Suppose that we deal with the system characterized by the matrix of (1.5); thenit is known from earlier that the 'cycle time' is 9/2 units of time. The throughputis defined as the inverse of the cycle time and equals 2/9. If we had the choiceof reducing one arbitrary entry of A by 2, which entry should we choose such thatthe cycle time becomes as small as possible? To put it differently, if a piece ofequipment were available which reduces the traveling time at any connection by 2,where should this piece of equipment be placed? By trial and error it is found thateither Aii or Aii should be reduced by 2; in both cases the new cycle time becomes4, If one reduces Aii or An by this amount instead of Aii or Aii, then the cycletime remains 9/2. The consequences of the four potential ways of reduction areexpressed by

(~ ~) ( ;,5 ) = 4,5 ( ;.5 ); (

(~~)(~)=4(~); ()(~)=4(~);

; i) ( ;,5 ) = 4,5 ( ;,5 ) ,

3 52 4

To answer the question of which 'transportation line' to speed up for more generalnetworks, application of the trial and error method as used above would become very

Page 25: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

30 SYNCHRONIZATION AND LINEARITY

laborious. Fortunately more elegant and more efficient methods exist. For those oneneeds the notion of a critical circuit, which is elaborated upon in Chapters 2 and3. Without defining such a circuit in this section formally let us mention that, inFigure 1.1, this critical circuit consists of the arcs determined by Al2 and A2!' Notethat (Al2 + A21)/2 = .À = 9/2, and this equality is not a coincidence.

Stochastic extensions are possible. Towards that end, consider

x(k + 1) = A(k)x(k) ,

where the matrix A now depends on k in a stochastic way. Assume that x E ~2and that for each k the matrix A is one of the following two matrices:

(~ ~), (~ ~),Both matrices occur with probability 1/2 and there is no correlation in time, Asuitable definition of cycle time turns out to be

lim IE L Xi (k + 1) - Xi (k) J 'k-.oo

where IE denotes mathematical expectation, Application of the theory presented inChapters 7 and 8 shows that this cycle time is independent of i and is equal to 13/3.

Conventional linear systems with inputs and outputs are of the form (1.10),although (1. 10) itself has the max-plus algebra interpretation. This equation is arepresentation of a linear system in the time domain, Its representation in the' z-domain equals

Y(z) = C(zI - A)-I BU(z) ,where Y(z) and U(z) are defined by

00 00

U(z) = L u(i)z-i ,i=O

Y(z) = L y(i)z-i ,i=O

where it is tacitly assumed that the system was at rest for t :: 0, The matrix

H(z) ~ C(zI - A)-I B is called the transfer matrix of the system, Here I refersto the identity matrix in conventional algebra, The notion of transfer matrix isespecially useful when subsystems are combined to build larger systems, by meansof parallel, series and feedback connections.

In the max-plus algebra context, the z-transform also exists (see (72)), but herewe wil rather refer to the )'-transform where )' operates as Z-i, For instance, the)'-transform of u is defined as

00

Uh)=EBu(i)0)'i,i=O

and Yh) and Xh) are defined likewise, Multiplication of (1.2) by )'k yields

)'-lx(k+lhk+1 A0x(khkfBB0u(khk, ì.y(khk = C 0 x(khk , J (1.43 )

,

INTRODUCTION AND MOTIVATION 31

If these equations are summed with respect to k = 0, 1, .', , then we obtain

)'-1 Xh)Yh)

= A0Xh)fBB0Uh)fB)'-lxO, ì.= C0Xh) , J (1.44 )

The first of these equations can be solved by first multiplying (max-plus ,algebra),equivalently adding (conventional) the left- and right-hand sides by )' and thenrepeatedly substituting the right-hand side for Xh) within this right-hand side,This results in

Xh) = hA)*hBUh) fB xo) ,

Thus we obtain Y h) = H h) U h), provided that Xo = c, and where the transfermatrix H h) is defined by

Hh) = C 0 hA)* 0)' 0 B = )'CB fB )'2CAB fB )'3CA2 B fB.., , ( 1.45)

The transfer matrix is defined by means of an infinite series and the convergencedepends on the value of)'. If the series is convergent for)' = )", then it is alsoconvergent for all )"s which are smaller than )", If the series does not converge, itstill has a meaning as a formal series,

Exactly as in conventional system theory, the product of two transfer matrices(in which it is tacitly assumed that the sizes of these matrices are such that themultiplication is possible), is a new transfer matrix which refers to a system whichconsists of the original systems connected in series, In the same way, the sum oftwo transfer matrices refers to two systems put in paralleL. This section will beconcluded by an example of such a parallel connection,

We are given two systems. The first one is given in (1.13), and is characterizedby the 1 x 1 transfer matrix

Hi = q fB 11)'2 fB 14)'3 fB 20)'4 fB 24)'5 fB 29)'6 fB '" ,

It is easily shown that this series converges for)' :: -4,5; the number 4.5 corre-sponds to the eigenvalue of A. The second system is given by

x(k+ I) ~ (: l n x(k) ff ( n u(k)

y(k) = (1 1 4 )x(k) ,and its transfer matrix is

H2 = 4)' fB 12)'2 fB 15)'3 fB 18'/ fB 23)'5 fB 26)'6 fB ' , ,

The transfer matrix of the two systems put in parallel has size 1 x 1 again (one cantalk about a transfer function) and is obtained as

Hpar = Hi fB H2 = 4)' fB 12)'2 fB 15)'3 fB 20)'4 fB 24)'5 fB 29"l fB ' ., , ( 1.46)

Page 26: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

32 SYNCHRONIZATION AND LINEARITY

.,r- 1- 7-

;t ,0 ir,/ ,::~"":

,. f' ': :'

r- ' ::(" i ::CV i ,',''.'.

':':

" ", ,

0\ l /,,':,:t" I,~ :',,,. :I::: :

, ,'~4

., ," ,

, "" " r

., ,

- 8

., ,., ,:' i.," ,

:'

:'"7-,: .:,ir ,: , ,

""'' tr:' ir- r:", ,.o "r r- r-(\ (\ 0\ C"

(\ C"

-2

Figure 1.14: The transfer function Hpa, as a function of Î

Hpar

6

4

2

o

-2

-4

-6

..

INTRODUCTION AND MOTIVATION 33

A transfer function can easily be visualized, If Hh) is a scalar function, i,e, thesystem has one input and one output, then it is a continuous and piecewise linearfunction. As an example, the transfer function of the parallel connection consideredabove is pictured in Figure 1,14,

Above it was shown how to derive the transfer matrix of a system if the represen-tation of the system in the 'time domain' is given, This time domain representationis characterized by the matrices A, Band C, Now one could pose the opposite ques-tion: How can we obtain a time domain representation, or equivalently, how can wefind A, Band C if the transfer matrix is given? A partial answer to this questionis given in (103). For the example above, one would like to obtain a time domainrepresentation of the two systems put in parallel staring from (1.46). This avenuewil not be pursued now, Instead, one can always obtain such a representation byconnecting the underlying networks of the two original systems in the appropriate('parallel') way and then derive the state equations directly. In this way one getsfor the above example,

x(k+l)~ U74E

E

E

E

E

e

E

E

E

1

6 n x(k) ff ( n u(k)E

y(k) = (3 E 4 )x(k)

1.4 NOTES

A few times, reference has been made to (linear) system theory, Classic texts are (8 i), (32)or (72), A few examples could be phrased in terms of dynamic programming, There aremany elementary texts which explain the theory of dynamic programming, A more advancedtext is (18), Systems in the context of max-plus algebra were probably first described in (49),though most theory in this book is algebraically rather than system oriented, It was in (39)where the relation between system theory and max algebra was clearly shown, The shortestpath problem is a standard example in dynamic programming texts, The Viterbi algorithmwas found in (59), The example on production was presented in (38), the examples of parallelcomputation and traffc can be found in (97), Other simple examples can be found in (101).A max-plus modeling of the Dutch intercity railway net is given in (27), An application tochemical batch processing is given in (107) A good introductory text to design methods ofprocessors for parallel computation is (79), The relation between eigenvalue and cycle timewas developed in (39). Stochastic extensions were given in (104), The connection betweentransfer matrices and state equations in the max-plus algebra context was investigated in

(103); see also §9,2,3,

Page 27: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

,

CHAPTER 2

Graph Theory and Petri Nets

2.1 INTRODUCTION

An overview of various results in the theories of graphs and Petri nets wil be given.Several properties of DEDS can be expressed in terms of graph-theoretic notionssuch as strong connectedness and critical circuits,

A rich relationship exists between graphs and matrices, about which many bookshave been written. Here, we wil emphasize some of these relationships betweendirected graphs and matrices, together with their consequences if such matrices andgraphs are composed to build larger ones. The way to construct such compositionsis by means of parallel and series connections,

Petri nets, which describe DEDS pictorially, can be viewed as bipartite graphs.An essential feature of Petri nets, not present in conventional graphs, is that theyare dynamic systems. Tokens are used to reflect this dynamic behavior.

There is an equivalence between DEDS without concurrency and a subclass ofPetri nets called 'event graphs', For any timed event graph, we wil show howto obtain a mathematical model in terms of recurrence equations, In the properalgebraic framework, these equations are linear and the model offers a strong analogywith conventional linear dynamic systems.

In the last part of this chapter, starting from the point of view of resourcesinvolved in DEDS, we propose a methodolgy to go from the specifications of aconcrete system to its modeling by event graphs.

2.2 DIRECTED GRAPHS

A directed graph G is defined as a pair (V, '£), where lV is a set of elements callednodes and where '£ is a set the elements of which are ordered (not necessarilydifferent) pairs of nodes, called arcs, The possibility of several arcs between twonodes exists (one then speaks about a multigraph); in this chapter, however, wealmost exclusively deal with directed graphs in which there is at most one (i,e, zeroor one) arc between any two nodes, One distinguishes graphs and directed graphs,The difference between the two is that in a graph the elements of '£ are not orderedwhile they are in a directed graph. Instead of nodes and arcs, one also speaks

about vertices and edges, respectively, The origin of the symbols lV and '£ in thedefinition of a (directed) graph is due to the first letters of the latter two names,Instead of directed graph one often uses the shorter word 'digraph', or even 'graph'

Page 28: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

36 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 37

if it is clear from the context that digraph is meant. In this chapter we will almostexclusively deal with digraphs (hence also called graphs),

Denote the number of nodes by n, and number the individual nodes 1,2",., n.

If (i, j) E 'E, then i is called the initial node or the origin of the arc (i, j), and j thefinal node or the destination of the arc (i,j), Graphically, the nodes are represented

by points, and the arc (i,j) is represented by an 'arrow' from i to j,We now give a list of concepts of graph theory which will be used later on.

Predecessor, successor. If in a graph (i, j) E 'E, then i is called a predecessor of jand j is called a successor of i. The set of all predecessors of j is indicatedby 7r(j) and the set of all successors of i is indicated by (J(i), A predecessoris also called an upstream node and a successor is also called a downstreamnode.

(ii,iz,.."ip) such that between each pair of successive nodes either thearc (i j , i j+ i) or the arc (i j + i , i j) exis ts, If one disregards the directions of thearcs in the definition of a path, one obtains a chain.

Strongly connected graph. A graph is called strongly connected if for any twodifferent nodes i and j there exists a path from i to j. Equivalently, i E (J* (j)for all i, j E V, with i =I j. Note that, according to this definition, an isolatednode, with or without a loop, is a strongly connected graph,

Bipartite graph. If the set of nodes V of a graph G can be partitioned into two

disjoint subsets Vi and Vz such that every arc of G connects an element ofVi with one of Vz or the other way around, then G is called bipartite.

In §2,3, it wil be useful to introduce the notion of an 'empty circuit' thelength of which is equal to 0 by definition. An empty circuit contains noarcs, The circuit (i) is an empty circuit which should not be confused withthe loop (i, i) of length 1 (the latter makes sense only if there exists an arcfrom node i to itself). Empty circuits are not included in the set R of paths.

Source, sink. If 7r( i) = 0, then node i is called a source; if d i) = 0 then i is

called a sink. Depending on the application, a source, respectively sink, isalso called an input( -node), respectively an output( -node) of the graph.

Path, circuit, loop, length. A path p is a sequence of nodes (i I, iz, , . . , ip), p )- 1,such that ij E 7r(ij+I), j = 1"" ,p - 1. Node ii is the initial node and

ip is the final one of this path, Equivalently, one also says that a path is asequence of arcs which connects a sequence of nodes, An elementary path isa path in which no node appears more than once, When the initial and thefinal nodes coincide, one speaks of a circuit. A circuit (i I, iz, . , . , ip = i i)is an elementary circuit if the path (i I, iz, , , . , ip-I) is elementary. A loop isa circuit (i, i), that is, a circuit composed of a single node which is initialand finaL. This definition assumes that i E 7r( i), that is, there does exist anarc from i to i, The length of a path or a circuit is equal to the sum of the

lengths of the arcs of which it is composed, the lengths of the arcs being 1unless otherwise specified. With this convention, the length of a loop is 1.The length of path p is denoted IPli, The subscript 'l here refers to the word'length' (later on, another subscript 'w' wil appear for a different concept),The set of all paths and circuits in a graph is denoted R, A digraph is said tobe acyclic if R contains no circuits,

To exemplify the various concepts introduced, consider the graph presented in Fig-ure 2.1, It is a digraph since the arcs are indeed directed, The graph has seven

nodes. Node 3 is a predecessor of node 6; 3 E 7r(6). Similarly, 6 E (J(3). Thesequence of nodes 1, 3, 6, 4, 3, 2 is a nonelementary path. The arc (1,1) is a

loop and the sequence of nodes 3, 6, 4, 3 is an elementary circuit of length 3. Thesequence of nodes 2, 3, 6 is a chain, It should be clear that the graph of Figure 2,1is connected.

Definition 2.1 (Equivalence relation'1) Let i, j E V be two nodes of a graph,

We say that i'1j, if either i = j or there exist paths from i to j and from j to i,

Then V is split up into equivalence classes Vi, . . . , Vq, with respect to the relation'1. Note that if node i belongs to Ve, then Ve = (J* (i) n 7r* (i), To each equivalenceclass Ve corresponds a subgraph Ge = (Ve, 'Ee), where 'Ee is the restriction of'E toVe, which is strongly connected,

Descendant, ascendant. The set of descendants (J+ (i) of node i consists of allnodes j such that a path exists from i to j, Similarly the set of ascendants

7r+ (i) of node i is the set of all nodes j such that a path exists from j to i. Onehas, e,g" 7r+ (i) = 7r( i) U 7r( 7r( i)) U. ... The mapping i f- 7r* (i) = t if U 7r+ (i)is the transitive closure of 7r; the mapping i f- (J* (i) = t if U (J+ (i) is thetransitive closure of (J.

Definition 2.2 (Maximal strongly connected subgraphs-m.s.c.s.) The sub graphs

Gi = (Vi, 'E) corresponding to the equivalence classes determined by '1 are themaximal strongly connected subgraphs of G,

Notation 2.3

Subgraph. Given a graph G = (V, 'E), a graph GI = (VI, 'E/) is said to be asubgraph of G if VI c V and if 'EI consists of the set of arcs of G whichhave their origins and destinations in V I,

. The subset of nodes of the m.s.c,s. containing node i (and possibly reduced

to i) is denoted ¡iJ.

. The subset of nodes UjE7C'(i)¡jj is denoted l~ ij,Chain, connected graph. A graph is called connected if for all pairs of nodes i

and j there exists a chain joining i and j, A chain is a sequence of nodes . The symbol ¡ 0( iJ represents the subset of nodes ¡~ ij \ ¡ij, .

Page 29: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

38 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 39

~.72. 'f51~'.6C.~î/4

.

i

G = (V, 'E) and associate an element Aij E C with each arc (j, i) E 'E: thenG is called a weighted graph. The quantity Aij is called the weight of arc (j, i).Note that the second subscript of Aij refers to the initial (and not the final) node.The reason is that, in the algebraic context, we will work with column vectors (andnot with row vectors) later on, In addition, we wil also consider compositions ofmatrices and the resulting consequences for the corresponding graphs.

The alphabet C contains a special symbol E. the properties of which wil be givenin §2.3.i.

Definition 2.7 (Transition graph) If an n x m matrix A = (A;j) with entries inC is given, the transition graph of A is a weighted, bipartite graph with n + mnodes, labeled 1,.." m, m + 1,.. . ,m + n, such that each row of A corresponds

to one of the nodes 1"." m; each column of A corresponds to one of the nodes

m + 1,.,., m + n, An arc from j to n + i, 1 :: i :: m, 1 :: j :: n, is introducedwith weight A;j if Aij -I E.,

.Figure 2.1: A digraph Figure 2.2: The reduced graph

The graph of Figure 2.1 has two m.s.c,s. 's, namely the subgraphs consisting of thenodes 1, 3, 6,4 and 2, 5, 7, respectively. If one 'lumps' the nodes of each m.s.c.s,into a single node, one obtains the so-called reduced graph.

As an example, consider the matrix

3 E. E. 7 E E E

E. E 2 E. E E. 1

e E E 2 E E E

A= I E E E E. E 5 E I, (2,1 )E 4 E. E E. 8 64 E 1 E E E E

E E E. E e E E

Definition 2.4 (Reduced graph) The reduced graph of G is the graph with nodes

V ~ -(,...,qf (one node per m,s,c,s,), and with arcs 'E, where (i,j) E 'E if

(k,l) E 'Efor some node k of Vi and some node L of Vj,

Figure 2.2 shows the reduced graph of the graph in Figure 2,1,

Notation 2.5 A node i of the reduced graph corresponds to a collection of nodes ofthe original graph. Let x be a vector the entries of which are associated with nodesof the original graph. If we want to refer to the subvector associated with the nodesof m.s,c.s. i, we wil use the notation Xli)' Similarly, for a matrix A, A(i)(j) is theblock extracted from A by keeping the rows associated with the nodes of m,s.c.s, iand the columns associated with the nodes of m.s.c.s, j, If node £ of the originalgraph belongs to m.s.c.s. i, the notation xlt) is equivalent to x(i)' Similarly, x( -ci),respectively X(::i), is equivalent to X¡-ct), respectively xl::)' _

Its transition graph is depicted in Figure 2.3.

1.

.92.3. . 10

Lemma 2.6 The reduced graph is acyclic,4. . 11

Proof If there is a path from k E Vi to L E Vj, then there is no path from any nodeof Vj to any node of Vi (otherwise, k and L would be in the same m.s.c.s.), _ 5. . 12

Denote the existence of a path from one subgraph Gi to another one Gj by thebinary relation ~/; Gi~1 Gj' Then these subgraphs Gi,.." Gq, together with therelation ~I form a parially ordered set, see Chapter 4 and also (85).

6. . 13

7. . 14

2.3 GRAPHS AND MATRICES Figure 2.3: The transition graph of A

In this section we consider matrices with entries belonging to an abstract alphabetC in which some algebraic operations wil be defined in §2.3.1, Some relationshipsbetween these matrices and 'weighted graphs' will be introduced, Consider a graph

Definition 2.8 (Precedence graph) The precedence graph of a square n x n matrixA with entries in C is a weighted digraph with n nodes and an arc (j, i) if A;j -I E,

Page 30: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

40 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 41

in which case the weight of this arc receives the numerical value of Aj' Theprecedence graph is denoted G(A),

It is not difficult to see that any weighted digraph G = ('l, 'E) is the precedencegraph of an appropriately defined square matrix, The weight Aij of the arc fromnode j to node i defines the ij-th entry of a matrix A. If an arc does not exist,the corresponding entry of A is set to c. The matrix A thus defined has G as itsprecedence graph.

The transition graph of a square n x n matrix, which has 2n nodes, can betransformed into a precedence graph of n nodes. Towards that end, one combinesthe nodes i and n + i of the transition graph into one single node for the precedencegraph, i = 1,.." n, As an example, Figure 2.4 gives the precedence graph of the

the number of nodes of the graph, The entry Gij is equal to 1 if j E 7T(i) and to °otherwise,

Note that if G = G(A), then Gij'support' of A).

1 if and only if Aij -I c (G describes the

3

C~

2.3.1 Composition of Matrices and Graphs

We now study two kinds of compositions of matrices, and the relation betweenthe transition graph of these compositions and the original transition graphs, Thesecompositions are, respectively, the parallel composition, denoted EE, and the seriescomposition, denoted 0, These compositions wil be defined by means of the corre-sponding composition operations of elements in the alphabet C, for which the samesymbols EE and 0 wil be used. The operation EE is usually referred to as 'addition'or 'sum', and the operation 0 as 'multiplication' or 'product', The alphabet C

includes two special elements c and e with specific properties to be defined in thefollowing set of axioms:

Associativity of addition:

'Va, b, c E C, (a EE b) EE c = a EE (b EB c) ,

Figure 2.4: The precedence graph of A

matrix A defined in (2.1). One directly recognizes the relation of this graph withthe transition graph in Figure 2,3. The latter graph has been 'folded' so as to obtainthe precedence graph.

It may be convenient to consider that entries Aij equal to c define dummy arcs(which are not drawn) in the associated precedence or transition graph, Later, a pathincluding a dummy arc will be called a dummy path, Dummy paths are not includedin the set R of paths (which were taken into account in Definition 2,1; thereforethese dummy paths are not involved in the definition of m.s.c,s. 's). The interest ofthe notion of dummy arcs is that these arcs may be considered as being of the samelength as arcs associated with entries Aij -I c (generally this length is 1); hence arcsof the same length can be associated with all entries of a matrix.

Commutativity of addition:

'Va,b E C aEBb=bEBa,

Associativity of multiplication:

'Va,b,c EC (a 0 b) 0 c = a 0 (b 0 c)

Right and left distributivity of multiplication over addition:

Notation 2.9 The number of m.s.c.s.'s of G(A) is denoted NA. .'Va,b,cEC, (aEBb)0c=(a0c)EB(b0c),

'Va, b, c E C, c 0 (a EB b) = (c 0 a) EB (c 0 b)

For later reference, the following definitions are given.

Definition 2.10 (Incidence matrix) The incidence matrix F =( Fij) of a graph

G = ('l, 'E) is a matrix the number of columns of which equals the number ofarcs and the number of rows of which equals the number of nodes of the graph,The entries of F can take the values 0, 1 or -1. If i = (i, j) E 'E, i -I j, thenFil = 1, Fji = -1 and the other entries of column L are 0, If L = (i, i) E,,'E, thenFil = 0,

Existence of a zero element:

:3c E C: 'Va E C, a EB c = a ,

Absorbing zero element:

'Va E C, a 0 c = c ,

Existence of an identity element:

Definition 2.11 (Adjacency matrix) The adjacency matrix G = (Gij) of a graphG = ('l, 'E) is a matrix the numbers of rows and columns of which are equal to :3e E C: 'Va E C, a 0 e = e 0 a = a .

Page 31: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

42 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 43

In Chapter 3 other related axioms wil be discussed in detaiL. There the notion ofa semifeld wil be introduced and its relation to axioms of this type wil be madeclear.

The parallel composition EB of matrices is defined for matrices of the same sizeby the following rule: if A = (Aij) and B = (Bij) have the same size, then

(A EB B)ij = Aij EB Bij ,

weighted graph as the product Ail',ip_i 0 ' , , 0 A;2,i1 of weights of arcs composingthis path (observe the order). This weight is denoted lplw, where the subscript wrefers to the word 'weight'. Note that a dummy path always has a weight E thanksto the absorbing property of E in products. Then, each term of the sum in (2.2)can be interpreted as the weight of some parallel path of length 2 from node j tonode i, characterized by the intermediate node k it passes through (see Figure 2.5).The previous rule pertaining to the weights of parallel compositions of arcs is thusextended to parallel paths, Since E is the zero element for addition, dummy pathsdo not contribute to (nonzero) weights in parallel compositions.

For the series composition of matrices, we have (A 0 B) 0 C = A 0 (B 0 C).This associativity property of matrix multiplication is a direct consequence of theaxioms given above, namely the associativity of 0 and the right and left distributivityof 0 over EB, It is easily seen that these right and left distributivities also hold formatrices of appropriate sizes.

The notion (AP)ji'P = 1,2,..., where A is square, is defined by (AP)ji =(A 0 AP-l )ji' Observe that this involves the enumeration and the sums of weightsof all paths of length P with initial node i and final node j, This definition makessense for both the transition graph of A, concatenated p times, and the precedencegraph of A. We get

A transition graph can of course be associated with the matrix C = A EB B. Thistransition graph has the same set of nodes as the transition graph of A (and thereforeof B) and there exists a (nondummy) arc from node j to node i if and only if atleast one of the transition graphs of A and B has a (nondummy) arc from j to i.This is a consequence of the axiom Aij EB E = Aij, In general, this arc receives theweight Aij EB Bij. It may be viewed as the arc resulting from the merging of twoparallel arcs (if both Aij and Bij are different from E), The symbol E is called thezero element of the operation EB. Two other axioms are that EB is associative andcommutative and they have obvious consequences for the parallel composition oftransition graphs.

The series composition 0 of matrices A and B is defined only when the numberof columns of A equals the number of rows of B (say, A is m x nand B is n x p)

by the following rule:

(A 0 B)ij = EBAik 0 Bkj ,k=l

A transition graph can be associated with the matrix C = A 0 B of size m x p,With the help of Figure 2,5, we explain how this graph is obtained. First, the

(2.2)

(AP) - ff A. 0 A . 0 .. . 0 A 'Ji - \: 1'p,ip_1 ip_l ,ip_2 21,iO(pi Ipli=p;io=i;il'=Jl

n

B A

Because we removed the intermediate nodes in the graph of Figure 2.5 in orderto obtain the transition graph of C = A 0 B, and similarly when one considersthe transition graph of a matrix C equal to AP, the information that weights of thegraph of C have been obtained as weights of paths of length larger than 1 (namely2 and p, respectively) has been lost. In order to keep track of this information, onemay introduce the notion of length of a transition graph. This length is an integernumber associated with the transition graph and hence also with all its individualarcs, including dummy arcs, and finally with the matrix associated with this graph.These considerations explain why the lengths of arcs may be taken greater than 1and why dummy arcs may also have a nonzero length. .

We now consider the transition graph corresponding to matrices AD where A isan n x n matrix. In the same way as AP, for p 2: 1, describes the weights of paths oflength p, AD should describe the weights of paths of length 0, that is, empty circuits(i) corresponding to 'no transition at all. Pictorially, the corresponding transition

graph of such matrices has the special form depicted in Figure 2.6a in which inputand output nodes are not distinguishable, This transition graph must not be confusedeither with that of the 'zero matrix' (with all entries equal to E) or with that of the'identity matrix' (with diagonal entries equal to e and all off-diagonal entries equalto E). The transition graph of the zero matrix is depicted in Figure 2.6b: all its arcsare dummy with length 1, The transition graph of the identity matrix is depicted inFigure 2,6c: weights are indicated in the figure and the length is 1 for all dummyand nondummy arcs, The length associated with all entries of AD is 0, that is, theseries composition of the transition graph of AD with any other bipartite graph donot modify the lengths of paths. In the same way, we would like the weights not

.' .p nodes n nodes m nodes

.,/."" .l~.k ~:

. ._e

Figure 2.5: The series composition of two transition matrices

transition graphs of matrices B and A are concatenated, The graph so obtained isnot a transition graph since.it has n intermediate nodes in addition of its p inputnodes and its m output nodes, These intermediate nodes are removed, an¡i an arc

from node j to node i exists in the transition graph of C if and only if there exists atleast one (nondummy) path from node j to node i in the concatenated graph shownin Figure 2,5, This arc receives the weight indicated by Equation (2.2). In order tointerpret this formula, let us first define the weight of a path p = (i 1, . . . , ip) in a

Page 32: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

44 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 45

,,.', ', I, ',.', ', ', ',!~

i--------------~, . . ', ', ', I, . . ,, I, I:. . :

. e ~. Definition 2.13 (Irreducibilty) The (square) matr-ix A is called irreducible if nopermutation matrix P exists such that the matrix A, defined by

. e ~.Ã = pi AP

. e ~.has an upper triangular block structure,

(a) (b) (c)

Figure 2.6: The transition graphs of A 0, E: and e

The reader should be aware of the fact that this definition is invariant with respect tothe algebra used. Premultiplication of A by pi and postmultiplication by P simplyrefers to a renumbering of the nodes of the corresponding graph. Hence renumberingof the nodes of the same graph leads to different A-matrices. In an upper triangularblock structure, diagonal blocks with non-c entries are allowed, If one also wantsthe diagonal blocks to have c-entries only, one should speak about a strictly uppertriangular block structure,

Theorem 2.14 A necessary and suffcient condition for the square matrix A to beirreducible is that its precedence graph be strongly connected,

to be modified in that operation: this requires that the entries of AD be the sameas those of the identity matrix e. But again the respective lengths and transition

graphs of AD and e are different (see Figure 2,6a-c), Also, dummy loops (i, i) ofthe transition graph of the zero matrix should not be confused with empty circuits(i) (see Figure 2.6a-b) even if it is difficult to distinguish them with the help ofprecedence, rather than transition, graphs.

In Chapter 1 we already met several examples of EE and Q9 operations which

satisfy the axioms just stated. A particular example is that C equals JR e = 0,c = -00, EE equals maximization and Q9 equals addition, Note that the max-

operation is idempotent, i,e. a EE a = a, but this property is not (yet) assumed as anaxiom,

min(5,3 + 6) i: min(5, 3) + min(5, 6)

Proof Suppose that A is such that by an appropriate renumbering of the nodes,Ã has an upper triangular block structure. Call the diagonal blocks Af"." A~. IfA~ has size nq x nq, then there are no paths from any of the (renumbered) nodes

1, . , , , n - nq, to any of the nodes n - nq + 1, , . . , n. Hence this graph is not stronglyconnected.

On the other hand, if the graph is not strongly connected, determine its m,s,c,s,'s

Gi, i = 1"." q. These subgraphs form a partially ordered set. Number the indi-vidual nodes of V in such a way that if Gi'R.' Gj, then the nodes of Vi have lowerindices than those of Vj ('11 was defined in §2.2). With this numbering of thenodes, the corresponding matrix A wil be upper block triangular, .

Remark 2.12 An example of operations which do not satisfy some of the axiomsis one where EE is addition and Q9 is minimization. The axioms of distributivity arenot satisfied. Indeed,

As a consequence, associativity of multiplication with respect to matrices does nothold, If for instance,

A=(~ ;), B=(i;), C=(

4 22 5 ) ,

Definition 2.15 (Aperiodicity) The irreducible square matrix A is aperiodic if thereexists an integer N such that for all n 2' N and for all i, j, (An )ij i: c,

Theorem 2.16 An irreducible matrix A such that Ajj i: c for all j is aperiodic.

(: ~) == (AB)C i: A(BC) = (: :).

Proof From Theorem 2.14, the irreducibility assumption implies that for all i, j,there exists n such that (An)ij i: c. This together with the assumption Ajj i: c inturn implies that (Am)ij i: E: for all m 2' n, The assertion of the theorem followsimmediately from this since the number of nodes is finite, .

then

A practical interpretation of a system with these operations is in terms of the calcu-lation of the capacity of a network in which the arcs are pipes through which thereis a continuous flow. The capacity of a pipe is assumed to be proportional to thediameter of this pipe. Then it is easily seen that the capacity of two pipes in parallelequals the sum of the two capacities. Similarly, the capacity of two pipes in seriesequals the minimum of their capacities. The reader should contemplate the physicalconsequences of the lack of associativity. .

Definition 2.17 A digraph is called a tree if there exists a single node such thatthere is a unique path from this node to any other node,

In order to determine whether A is irreducible, one can calculate A + (see (1.18)).Matrix A is irreducible if and only if all entries of A + are different from c. Thisalgorithm for determining whether A is irreducible can be simplified by consideringonly Boolean variables, Replace A by the adjacency matrix G of its precedencegraph (see Definition 2.11), except that 0 and 1 are replaced by c and e, respectively,

Page 33: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

46 SYNCHRONIZATION AND LINEARITY~¥ 4 ~_72 ) _ ~12 4 i81~)_6

3C.~f2~-4

Figure 2.7: Weighted digraph consisting of two m,s,c,s,'s

in the present context. Then A is irreducible if and only if all entries of G+ areidentical to e, As an example, consider the matrix given in (2.1). The matrix G+becomes

e E e e E e E

e e e e e e ee E e e E e E

e E e e E e E I, (2,3)e e e e e e ee E e e E e E

e e e e e e e

Hence A is not irreducible. In fact it follows directly from (2.3) that the nodes1,3,4 and 6 form a m.s.c.s., as do the nodes 2,5 and 7. If one rearanges the nodesand arcs of Figure 2.4, one obtains Figure 2.7, in which the weights of the arcs havebeen indicated, and the two m.s,c,s.'s are clearly visible. Figure 2,7 is identical toFigure 2.1 apar from the fact that weights are given,

2.3.2 Maximum Cycle Mean

In this subsection the maximum cycle mean will be defined and some of its propertieswil be derived. The maximum cycle mean has a clear relation with eigenvalues ofmatrices within the context of the max algebra and with periodic regimes of systemsdescribed by linear equations, also within the same context. These relationships willbe described in §3,

Let G = (V, '£) be a weighted digraph with n nodes, The weights are real

numbers here and are given by means of the n x n matrix A. As discussed before,the numerical value of Aij equals the weight of the arc from node j to node i. If no

such arc exists, then Aij = E. ~t is known from Chapter 1 that the entry (i, j) of Ak =

A Q9' . . Q9 A, considered within the algebraic structure ilmax ~ (il U t -(0)- max, +),

denotes the maximum weight with respect to all paths of length k which go fromnode j to node i. If no such path exists, then (Ak)ij = E, Within this algebraic

structure, E gets assigned the numerical value -00 and e = O. In this subsection wewill confine ourselves to the algebraic structure ilmax.

i

Ii

'i

I

/

i

l\

(I

GRAPH THEORY AND PETRI NETS 47

Definition 2.18 (Cycle mean) The mean weight of a path is defined as the sum ofthe weights of the individual arcs of this path, divided by the length of this path, If

the path is denoted p, then the mean weight equals Iplw/IPli, If such a path is acircuit one talks about the mean weight of the circuit, or simply the cycle mean,

We are interested in the maximum of these cycle means, where the maximum is takenover all circuits in the graph (empty circuits are not considered here). Consider ann x n matrix A with corresponding precedence graph G = (V, '£). The maximumweight of all circuits of length j which pass through node i of G can be writtenas (Aj)ii' The maximum of these maximum weights over all nodes is E9~=1 (Aj)iiwhich can be written trace(Aj), The average weight is obtained by dividing thisnumber by j in the conventional sense, but this can be written (trace(Aj)) ifj in themax-plus algebra notation. Finally, we have to take the maximum with respect tothe length j, It is not necessary to consider lengths larger than the number n ofnodes since it is enough to limit ourselves to elementary circuits. It follows that aformula for the maximum cycle mean À in the max-plus algebra notation is

i

tit

I

~

j

!

n

À = EB(trace(Aj))lfjj=l

The following theorem provides an expression, due to R, Karp, for this maximumvalue. All circuits with a cycle mean equal to the maximum cycle mean are calledcritical circuits. Karp's theorem does not give the critical circuit(s),

Theorem 2.19 (Karp's theorem) Given is an n x n matrix A with correspondingprecedence graph G = (V, '£), The maximum cycle mean is given by

À = max miní=l,"'in k=O,"'in-1

(An)ij - (Ak)ij

n- kVj , (2.4)

In this equation, An and Ak are to be evaluated in ilmax; the other operations areconventional ones,

Proof Note that the index j in (2.4) is arbitrary (it wil be shown in this proof thatone can take any jEt 1, , , . , n:i). The resulting value of À is independent of j,

Without loss of generality, we may assume that G is strongly connected. If itwere not, we would consider each of its m,s,c.s. 's-since G is assumed to be finite,there are only a finite number of such m.s,c.s, 's-and determine the maximum cyclemean of each of them and then take the maximum one,

We first assume that the maximum cycle mean is 0, Then it must be shown that

max mini=l,..,n k=O,.."n-l

(An)ij - (Ak)ij = 0 ,n- k

~

Since À = 0 there exists a circuit of weight 0 and there exists no circuit withpositive weight. Because there are no circuits (or loops) with positive weight, there

Page 34: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

48 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 49

is a maximum weight of all paths from node j to node i which is equal to

kdef '" A

Xi) = max 6 ii,ii_i ,1=1

2.3.3 The Cayley-Hamilton'Theorem

subject to io = j, ik = i ,The Cayley-Hamilton theorem states that, in conventional algebra, a square matrixsatisfies its own characteristic equation. In mathematical terms, let A be an n x nmatrix and let

where the maximum is taken with respect to all paths and all k. Since for k 2 nthe path would contain a circuit and since all circuits have nonpositive weight, wecan restrict ourselves to k .: n. Therefore we get

Xij = max (Ak)ijk=O,.."n-l

( ) def d (I A) n n- I 0PA X = et x - = x + CiX + ' , , + Cr-ix + Crx , (2,6)

where I is the identity matrix, be its characteristic polynomiaL. The term xO in thepolynomial equals 1. Then PA(A) = 0, where 0 is the zero matrix, The coeffcientsCi, i = 1,.,., n, in (2,6) satisfy

Also, (An)ij :: Xij, and hence

(An)ij - Xij = min (An)ij - (Ak)ij :: 0k=O,.."n- I

( Aii,ii

ck = (-1) k L det :il-(i2-(..,-(il- A, ,

ikiii

Ai"i¡- )

Ai:,il '(2,7)

Equivalently,

mink=O"..,n- I

(An)ij - (Ak)ij :: 0 ,n- k (2,5)

The reason for studying the Cayley-Hamilton theorem is the following. In con-ventional system theory, this theorem is used for the manipulation of different system

'descriptions and for analyzing such properties as controllability (see (72)). In thecontext of discrete event systems, a utilization of this theorem wil be shown in§9,2,2.

In this section it wil be shown that a Cayley-Hamilton theorem also exists inan algebraic structure defined by a set C of elements supplied with two operationsdenoted EB and 18 which obey some of the axioms given in §2.3,1, namely

. associativity of addition,

. commutativity of addition,

. associativity of multiplication,

. both right and left distributivity of multiplication over addition,

Equality in (2,5) wil only hold if (An )ij = Xij. It wil be shown that indeed anindex i exists such that this is true, Let ( be a circuit of weight 0 and let L be a nodeof (. Let Plj be a path from j to L with corresponding maximum weight IPlj IW = Xlj.Now this path is extended by appending to it a number of repetitions of ( such thatthe total length of this extended path, denoted Pe, becomes greater than or equal ton. This is again a path of maximum weight from j to l. Now consider the pathconsisting of the first n arcs of Pe; its initial node is j and denote its final node l'.Of course l E (. Since any subpath of any path of maximum weight is of maximumweight itself, the path from j to l is of maximum weight. Therefore (An)llj = Xl'j'Now choose i = l and we get

r (An).. - (Ak)"Ji~~~n L k=i~~~-i ~ _ k 'J = 0 ,

. existence of an identity element,

provided we also have

Commutativity of multiplication:

This completes the par of the proof with À = O.

Now consider an arbitrar finite À. A constant C is now subtracted from each

weight Aij. Then clearly À wil be reduced by c. Since (Ak)ij is reduced by kc, weget that

(An)ij - (Ak)ij

n- kis reduced by c, for all i, j and k, and hence

'ia, bEe, a 18 b = b 18 a ,

max mini=I,,,.,n k=O,...,n-1

(An)ij - (Ak)ij

n- k

Note that the existence of a zero element (and its absorbing property) is not requiredin this subsection.

A partial permutation of t 1 , . , . , n J is a bijection ç of a subset of t 1 , , , , , n Jonto itself. The domain of ç is denoted by dom ( ç) and its cardinality is denoted I ç ii,A partial permutation ç for which lçli = n is called a complete permutation. Thecompletion ç of a partial permutation ç is defined byis also reduced by c. Hence both sides of (2.4) are affected equally when all weights

Aij are reduced by the same amount. Now choose this amount such that À becomeso and then we are back in the previous situation where À = 0, . Ç(i) = \ ç(i)

if i E dom(ç) ,if i E ti,... , n J \ dom( ç)

Page 35: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

50 SYNCHRONIZATION AND LINEARITY 51GRAPH THEORY AND PETRI NETS

The signature * of a partial permutation ç, denoted sgn* (ç), is defined bylçlw 0 Iplw is the series composition, with multiplicities taken into account, of allthe Alk for which (k, l) is an arc of the graph associated with (ç, p), .

Let p be the path connecting the nodes io, ii,. .. , iq, in this order, There is asmallest integer v ?: 0 such that either iu = iv for some u ~ v, or iv E dom(ç).If such a v did not exist, then p must have ¡pi i + 1 distinct nodes (because thereare no u and v with iv = iu)' But then there are at least lçli + IPli + 1 = n + 1distinct nodes (because ç and p do not have any node in common), which is acontradiction, Furthermore, it is easily seen that this smallest integer v cannot haveboth properties. Hence either iu = iv for some u ~ v or iv E dom( ç), An exampleof the first property is given in Figure 2.8 and an example of the second property isgiven in Figure 2.9. The dashed arcs refer to the set '£ç and the solid arcs refer tothe set '£p' In Figure 2,8, v equals 3, and in Figure 2.9, v equals 1 (i.e. i 1 = 2).

sgn*(ç) = sgn(Ç)(-l)lçli ,

where sgn(Ç), sometimes also written as (-1 )Ç, denotes the conventional signatureof the permutation ç, see (61)

Every (partial) permutation has a unique representation as a set of disjoint cir-cuits. For example, the permutation

(123456)4 6 3 5 1 2

has the circuit representation

t(1,4,5),(3),(2,6)J, ~. 3l' ', 'I I, '\ ', ...6

~ .

3.~.21~.5-4

.1

T ." ,,2

iiIII

With the graph-theoretic interpretation of permutations in mind, these disjoint circuitscorrespond to m.s.c.s. 'so The unique partial permutation of cardinality 0 has theempty set as its circuit representation, If ç is a partial permutation with cardinalityk consisting of a single circuit, then sgn* = (-1 )k-I (_l)k = -1. It easily follows

that for any partial permutation ç, sgn* = (-1 y, where r is the number of circuitsappearing in the circuit representation of ç,

Given an n x n matrix A = (Aij), the weight of ç is defined by

,I, '" '. '

6..

. - - - - - - - -. .4 5Figure 2.9: Example of a graph with

the second propertyFigure 2.8: Example of a graph with

the first property

Consider the situation with the first property such as pictured in Figure 2.8. Wehave iu = iv for some u and v, The circuit passing through iu is removed from

p and adjoined as a new circuit to ç. The new path from io to iq is denoted p'and the new, longer, partial permutation is denoted ç'. The mapping r¡ji is definedas r¡ji (ç, p) = (ç', p'). Application of the mapping 7131 to Figure 2.8 is given inFigure 2.10, Since the number of circuits of ç' and of ç differ by one, we have

lçlw = Q9 Aç(i),iiEdom(ç)

The weight of the parial permutation with cardinality 0 equals e, in accordance withthe theory presented in §2.3.1. Let 1 :: i, j :: n and let T/i be the set of all pairs( ç, p) where ç is a partial permutation and where p is a path from i (the initial node)to j (the final node) in such a way that

~. 3l' \, II I, ', ', ...6

~ .

3..1/i24 ) -5

~ -',~ 2

.1

lçli + Ipli = n, sgn*(ç) = 1 , ,,,I

,'" . '

6The set TJi is defined identically except for the fact that the condition sgn* (ç) = 1is replaced by sgn* (ç) = -1.

Lemma 2.20 For each pair (j, i), with 1 :: i, j :: n, there is a bijection r¡ji : Tjt --T;i in such a way that r¡ji(Ç,P) = (ç',p') implies lçlw 01plw = lç'lw 01P'lw'

... -4

.5

Figure 2.11: 7)31 applied to Figure 2,9Figure 2.10: 7)31 applied to Figure 2,8

sgn* (ç') = -sgn* (ç) and therefore r¡ji maps T/i into Tji and vice versa,

Consider next the situation with the second property such as pictured in Fig-ure 2.9. The mapping r¡ji(Ç,P) = (ç',p') is obtained by removing the circuit con-taining iv from ç and adjoining it to p, Application of 7131 to Figure 2.9 is given

in Figure 2,11. Also in this situation, the numbers of circuits of ç' and of ç differby one, and again we have sgn* (ç') = -sgn* (ç) which results in the fact that r¡jimaps Tjt into Tji and vice versa. In both situations lçlw 01plw = lç'lw 01P'lw, since

nothing has changed in the graph of (ç, p). It is in the derivation of this equality

Proof Each pair (ç, p) E Tjt U Tji is represented by a directed graph with nodes

t 1, , . , , n J. The set of arcs consists of two classes of arcs:

'£ç = Hi,ç(i)) liE dom(çn, 'Ep = t(,k) I (l,k) is an arc of PJ',

This graph wil, in general, contain multiple arcs, since p may traverse the same arcmore than once, or the same arc may appear in both 'Eç and 'Ep' The expression

Page 36: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

52 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 53

that the associativity and commutativity of multiplication, and the existence of anidentity element, have been used. What remains to be shown is that the mappingT)ji is surjective. For this reason consider the iteration T)ji0T)ji. It easily follows thatthis mapping is the identity on Tjt U Tji, which is only possible if T)ji is surjective..

Let us give an example, For the 3 x 3 matrix A = (Ai)), the characteristic equationis p~(x) = PÃ(x), where

p~(X)

PÃ(x)

X3 EB (AiiA22 EB AiiA33 EB A22A33)X EB AI3A22A31

EB A12A21A33 EB AiiA32A23 ,

(Aii EB A22 EB A33)X2 EB (A12A21 EB AI3A3! EB A23A32)XEB AiiA22A33 EB A12A23A31 EB A21AI3A32 ,Definition 2.21 (Characteristic equation) The characteristic equation is given by

p~(X) = PÃ(x) , (2,8)where, as usual, the 0-symbols have been omitted, If we consider

n ( ( ))p~(x) = EB EB Q9 Aç(i),i xn-k,

k=O lçli=k,sgn'(ç)=1 iEdom(ç)

( 1 2 3)A= 4 1 c

e 5 3

where

in the algebraic structure ~max, then the characteristic equation becomes

n ( ( ))PÃ(x) = EB EB Q9 Aç(i),i xn-k,

k=O lçli=k,sgn'(ç)=-I iEdom(ç)

x3 EB 4x EB 9 = 3x2 EB 6x EB 12 ,and

which can be simplified to

x3 = 3x2 EB 6x EB 12 ,

It is easily verified that this characteristic equation, if considered the conventionalalgebra, coincides with the equation obtained by setting the characteristic polynomial(2.6) equal to zero. The crucial feature of (2.8) is that there are no terms with 'neg-ative' coefficients (in contrast with the conventional characteristic equation, whichcan have negative coefficients), Since the inverse of EB does not exist, the terms in(2.8) cannot freely be moved from one side to the other side of the equation.

since the omitted terms are dominated by the corresponding terms at the other sideof the equality. A simple calculation shows that if one substitutes A in the latterequation, one obtains an identity indeed:

Theorem 2.22 (The Cayley-Hamilton theorem) Thefollowing identity holds true:( 12 11 9) (9 11 9) ,( 710 12 10 = 8 9 10 EB 1012 11 12 12 11 9 6

8 9) (12 c c)7 c EB c 12 c ,11 9 c c 12

p~(A) = pÃ(A) ,This section wil be concluded with some remarks on minimal polynomial equa-

tions. The Cayley-Hamilton theorem shows that there exists at least one polynomialequation satisfied by a given n x n matrix A, This polynomial equation is .ofdegree n, For example, if A is the 3 x 3 identity matrix, thenProof For k = 0, . . , , n,

(An-k)ji EB Iplw '¡Pli = n-k

initia node of p equals ifinal node of p equals j

P ~ ( X) = X3 EB X , P Ã ( X) = X2 EB e ,

It follows that

and A satisfies the equation A3 EB A = A2 EB e, There may exist equations of lowerdegree also satisfied by A. With the previous A, we also have A = e and X = e isa polynomial equation of degree 1 also satisfied by the identity matrix, A slightlyless trivial example is obtained for

P~(A)ji = EB lçlw 01plw

(Ç,p)ETj'

PÃ(A)ji = EB lçlw 01plw

(Ç,p)ETj;

(c 1 E)A= 1 c c ,eel

Owing to Lemma 2,20, these two sums are identicaL. It is in these two equalities thatthe associativity and commutativity of addition, the distributivity and the existenceof an identity element have been used. .

The characteristic equation is

x3 EB 3 = 1 x2 EB 2x ,

Page 37: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

54 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 55

It is easily seen that A satisfies both x3 = 2x and 3 = ix2, These equationshave been obtained by a 'paritioning' of the characteristic equation; 'adding' thesepartitioned equations, one obtains the characteristic equation again. In this case,3 = 1x2 is of degree 2. We may call a polynomial equation of least degree satisfiedby a matrix, with the additional requirement that the coefficient of the highest powerbe equal to e, a minimal polynomial equation of this matrix. This is the counterparof the notion of the minimal polynomial in conventional algebra and it is knownthat this minimal polynomial is a divisor of the characteristic polynomial (61). Inthe present situation, it is not clear whether the minimal polynomial equation of amatrix is unique and how to extend the idea of division of polynomials to polynomialequations. In Chapter 3, a more detailed discussion on polynomials is given.

with a finite number of nodes (the set 'V) which are partitioned into the disjoint setsP and Q; 'E consists of pairs of the form (pi, qj) and (qj,Pi), with Pi E P andqj E Q; the initial marking l- is a IP I-vector of nonnegative integers,

Notation 2.24 If Pi E 7r(qj) (or equivalently (pi, qj) E 'E), then Pi is an upstreamplace for qj. Downstream places are defined likewise. The following additionalnotation wil also be used when we have to play with indices: if Pi E 7r( %), wewrite i E 7ra(j),i = 1,oo.,IPI,j = 1,oo"IQI; similarly, if qj E 7r(Pi), we write

j E 7rP(i), with an analogous meaning for (7P or (7a. .

2.4 PETRI NETS

Roughly speaking, places represent conditions and transitions represent events. Atransition (i.e, an event) has a certain number of input and output places representingthe pre-conditions and the post-conditions of the event, respectively. The presenceof a token in a place is interpreted as the condition associated with that place beingfulfilled, In another interpretation, l-i tokens are put into a place to indicate thatl-i data items or resources are available. If a token represents data, then a typicalexample of a transition is a computation step for which these data are needed as aninput. In Figure 2.13, the Petri net of the production example in § 1.2.3 is given.

2.4.1 Definition

Petri nets are directed bipartite graphs. They are named after CA. Petri, see (96).The set of nodes 'V is partitioned into two disjoint subsets P and Q. The elementsof P are called places and those of Q are called transitions. Places wil be denotedPi, i = 1, 00 . , IP I, and transitions, qj, j = 1,. 00 , I QI. The directed arcs go from aplace to a transition or vice versa. Since a Petri net is bipartite, there are no arcsfrom place to place or from transition to transition, In the graphical representationof Petri nets, places are drawn as circles and transitions as bars (the orientation ofthese bars can be anything). An example of a Petri net is given in Figure 2.12.

l l~ O~T0(°7.J ;

()O~ ,U~0\ (0

Figure 2.13: Petri net of the manufacturing system of §1.i,3

Figure 2.12: A Petri net with sources and sinksThe tokens in this figure are located in such a way that machine Mi stars workingon product P2 and M2 on Pi, Note that Mi cannot work on P3 in Figure 2.13.

Within the classical Petri-net setting, the marking of the Petri net is identifiedwith the state. Changes occur according to the following rules:In order to complete the formal definition of a Petri net, an initial marking must

be introduced. The initial marking assigns a nonnegative integer l-i to each placePi, It is said that Pi is marked with l-i initial tokens. Pictorially, l-i dots (the tokens)are placed in the circle representing place Pi. The components l-i form the vectorl-, called the initial marking of the Petri net.

Definition 2.23 A Petri net is a pair (G, l-), where G = ('E, 'V) is a bipartite graph

. A transition is said to be enabled if each upstream place contains at least one

token.

. A firing of an enabled transition removes one token from each of its upstreamplaces and adds one token to each of its downstream places.

Page 38: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

56 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 57

Remark 2.25 The enabling rule given above is not the most general one, Sometimesinteger valued 'weights' are attached to arcs. A transition is enabled if the upstreamplace contains at least the number of tokens given by the weight of the connectingarc. Similarly, after the firing of a transition, a downstream place receives the numberof tokens given by the weight of the connecting arc, Instead of talking about such'weights', one sometimes talks about multi-arcs; the weight equals the number ofarcs between a transition and a place or between a place and a transition. In termsof 'modeling power', see (96) and (108) for a definition, this generalization is notmore powerful than the rules which will be used here. The word 'weight' of an arcwill be used in a different sense later on. .

8 0\1To

G 0\ 1

lo

ol

¡ ~o 0

ol

¡ \8 G

Figure 2.15: And-convergence before

and after firingFigure 2.16: And-divergence before

and after firing

For qj to be enabled, we need that

f-i :: 1, V Pi E 7r ( qj) ,

i f-i - 1

Jii = f-i + 1

f-i

if Pi E 7r(qj) ,if Pi E a- qj) ,

otherwise.

place, In the same vein, an or-convergence refers to two or more arcs entering oneplace, and an or-divergence refers to two or more arcs originating from one place.

A transition without predecessor(s) is called a source transition or simply asource; it is enabled by the outside world, Similarly, a transition which does nothave successor(s.), is called a sink (or sink transition). Sink transitions deliver tokensto the outside world, In Figure 2,12 there are two transitions which are sources andthere is one transition which is a sink. If there are no sources in the network, asin Figure 2,17, then we talk about an autonomous network, It is assumed that onlytransitions can be sources or sinks. This is no loss of generality, since one can

always add a transition upstream or downstream of a place if necessary. A sourcetransition is an input of the network, a sink transition is an output of the network.

The structure of a place Pi having two or more output transitions, as shown inFigure 2.18, is referred to as a conflict, since the transitions are competing for the

If the enabled transition a; fires, then a new marking Ji is obtained with

In case both Pi E 7r(qj) and Pi E !J(qj) for the same place Pi, then Jii = f-i'In Figure 2,13, once Mi has completed its work on P2 and M2 its work on Pi,

then Figure 2,14 is obtained. The next transitions that are now enabled are described

5~O(l.~ 01 ~I) ì1,0 3 5 qQ 30

j'-- 3 ,-q, O. eüß I ,"0~1) 02 q;)30 0 ~i, ~ 4 20 3

(1~04 ç 0",q6 ... ~I- ~03~ q~

l lo 0-- !O~TLAO~ /~O~¡'.

U~0\ (

o o

_L'/iJ"LFigure 2.14: The tokens after the firing of ai and a3

by the combinations (M¡, P3), (M2, P2) and (M3, Pi). Note that in generalthe totalamount of tokens in the net is not left invariant by the firing of a transition, althoughthis does not happen in Figure 2.13. If we have a 'join' -type transition (Figure 2.15),which is called an and-convergence, or a 'fork'-type transition (Figure 2.16), calledan and-divergence, then clearly the number of tokens changes after a firing has taken

Figure 2.17: An autonomous Petri netFigure 2.18: Part of a Petri net

with a conflict

token in the place. The transitions concerned will be said to be rivals. There are nogeneral rules as to which transition should fire first. One says that a Petri net withsuch an or-divergence exhibits nondeterminism. Depending on the application, onecan also talk about a choice (between the transitions) or a decision,

Page 39: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

58 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 59

(1,1,1,1)

(1,1,0,2)

1

(1,1,1,1)

/ ~(1,1,0,2) (1,1,2,0)

1 1

(1,1,1,1)/' ~(1,1,2,0)

1

(1,1,1,1)

/ ~(1,1,0,2) (1,1,2,0)

1 1

Note that G does not uniquely define a Petri net since, if Gii = 0, a path includingexactly one place around the transition ai is also possible. A circuit consisting ofone transition and one place is called a loop in the context of Petri nets. If eachplace in the Petri net had only one upstream and one downstream transition, then theincidence matrix G would reduce to the well-known incidence matrix F introducedin Definition 2.10 by identifying each place p with the unique arc from n(p) to CJ(p).

Transition aj is enabled if and only if a marking J. is given such that

J. 2: (Gin)' ej ,

where ej = (0"..,0, 1,0, . . . ,0)', with the 1 being the j-th component. If thistransition fires, then the next marking ¡¡ is given by

¡¡ = J. + G' ej ,

A destination marking Ti is reachable from J. if a firing sequence eji, , . . , ejd existssuch that

d

Ti = J. + G' L eji '

1=1

Hence a necessary condition for Ti to be reachable from J. is that an n-vector x ofnonnegative integers exists such that

The firing of an enabled transition wil change the distribution of tokens. Asequence of firings wil result in a sequence of markings. A marking Ti is said tobe reachable from a marking J. if there exists a sequence of enabled firings thattransforms J. into Ti.

Definition 2.26 (Reachabilty tree) The reachability tree of a Petri net (G, J.) isa tree with nodes in f:IPI which is obtained as follows: the initial marking J. is anode of this tree; for each a enabled in J., the marking Ti obtained by firing a is anew node of the reachability tree; arcs connect nodes which are reachable from oneanother in one step; this process is applied recursively from each such Ti,

Definition 2.27 (Reach abilty graph) The reachability graph is obtained from the

reachability tree by merging all nodes corresponding to the same marking into asingle node,

Take as an example the Petri net depicted in Figure 2.19. The initial marking

0~n~P3 .\n

p, ~z. p, q, f0P'0/ G' x = Ti - J. . (2.9)

/~The existence of such a vector x is not a sufficient condition; for a counterexamplesee for instance (108). The vector x does not reflect the order in which the firingstake place. In the next subsection a necessar and suffcient condition for reachabilitywill be given for a subclass of Petri nets. An integer solution x to (2,9), with itscomponents not necessarily nonnegative, exists if and only if Ti'y = J.'y, for anyy that satisfies Gy = 0, The necessity of this statement easily follows if one takesthe inner products of the left- and right-hand sides of (2,9) with respect to y. Thesuffciency is easily shown if one assumes that x does not exist, i.e. rank¡Gj. ~rank¡G, Ti - J.J-the notation ¡G, Ti - J.l refers to the matrix consisting of G and theextra column Ti - J.. Then a vector y exists with y' G' = 0 and y' (Ti - J.) -I 0, whichis a contradiction.

Figure 2.19: A Petri net with corresponding reachability graph and reachability tree

is (1, 1, 1, 1). Both transitions are enabled, If ai fires first, the next marking is(1,1,0,2). If a2 fires instead, the marking becomes (1,1,2,0). From (1,1,0,2),only the initial marking can be reached immediately by firing a2; starting from(1, 1,2,0), only ai can fire, which also leads to the initial marking, Thus it hasbeenshown that there are three different markings in the reachability graph of (1, 1, 1, 1),

2.4.2 Subclasses and Properties of Petri Nets

Definition 2.28 For a Petri net with n transitions and m places, the incidence

matrix G = (Gij) is an n x m matrix of integers -1, 0 and + 1, The entry Gij isdefined by

Gi"j" = Gout - änij ij'

In this subsection we introduce some subclasses of Petri nets and analyze their basicproperties. Not all of these properties are used later on; this subsection is alsomeant to give some background information on distinct features of Petri nets. Theemphasis will be on event graphs.

Definition 2.29 (Event graph) A Petri net is called an event graph if each placehas exactly one upstream and one downstream transition,

where G'lt = 1 (0) if there is an (no) arc from ai to Pj and G\j = 1 (0) if there isan (no) arc from Pj to ai, Matrices Gout and Gin are defined as Gout = (G'lt) andGin = (G\j), respectively,

Definition 2.30 (State machine) A Petri net is called a state machine if each tran-sition has exactly one upstream and one downstream place,

Page 40: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

60 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 61

Event graphs have neither or-divergences nor or-convergences. In event graphs eachplace together with its incoming and outgoing arcs can be interpreted as an arc itself,connecting the upstream and downstream transition, directly.

In the literature, event graphs are sometimes also referred to as marked graphsor as decision free Petri nets. Figure 2,20 shows both a state machine which is not

I O~I/~C\i-.ao~o)O~I

(Jf

Cg~

A Petri net is deadlocked if its reachability tree has a marking where a transition,or a set of transitions, can never fire whatever the firing sequences of the othertransitions. For a live Petri net, whatever the finite initial sequence of firings, fromthat point onwards, any arbitrary transition can be fired an infinite number of times.

An example of a live net is a state machine the underlying graph of which isstrongly connected and the initial marking of which has at least one token.

Definition 2.33 (Consistent net) A Petri net is called consistent (weakly consistent)if there exists a firing sequence, characterized by the x-vector with positive (non-negative) integers as components, such that G'x = 0, where G is the incidencematrix,

Figure 2.20: A state machine and an event graph

In a consistent Petri net we can choose a finite sequence of firings such that repeatingthis sequence results in a periodic behavior,

Definition 2.34 (Synchronous net) A consistent net is called synchronous if theonly solutions x of G'x = 0 are of the form x = k(l, 1"..,1)',

Definition 2.35 (Strictly conservative net) A Petri net with initial marking /- is

called strictly conservative if for all reachable markings V, we have LPiEP Vi =

Lp;EP/-i'

Definition 2.36 (Conservative net) A Petri net with initial marking /- is called con-servative if positive integers Ci exist such that, for all reachable markings V, we have

LPiEP CiVi = Lp;EP Ci/-i'

an event graph and an event graph which is not a state machine, An event graphdoes not allow and cannot model conflicts; a token in a place can be consumed byonly one predetermined transition, In an event graph several places can precedea given transition, It is said that event graphs can model synchronization, Statemachines do not admit synchronization; however, they do allow competition, Thenumber of tokens in an autonomous state machine never changes (Petri nets in whichthe number of tokens remains constant are called strictly conservative; a discussionfollows later),

It can be shown (108) that state machines are equivalent to the finite state ma-chines or automata in theoretical computer science. Each automaton can be rephrasedas a state machine Petri net. This shows that Petri nets have more modeling powerthan automata.

Basic definitions and properties of Petri nets are now given.

Theorem 2.37 The number of tokens in any circuit of an event graph is constant,

Proof If a transition is part òf a circuit, then exactly one of its incoming arcs andone of its outgoing arcs belong to the circuit. The firing of the transition removesone token from the upstream place connected to the incoming arc (it may removetokens from other places as well, but they do not belong to the circuit) and it addsone token to the downstream place connected to the outgoing arc (it may add tokensto other downstream places as well, but they do not belong to the circuit). .

Concerning (practical) applications, it is important to know whether one deals witha bounded or safe Petri net, since one is then sure that there wil be no overflowsin the buffers or registers, no matter what the firing sequence wil be,

An event graph is not necessariIy strictly conservative, Consider an and-convergence, where two circuits merge. The firing of this transition removes onetoken from each of the upstream places and adds one token to the only downstreamplace, At an and-divergence, where two circuits split up, the firing of the transitionremoves one token from the only upstream place and adds one token to each of thedownstream places,

Theorem 2.38 An autonomous event graph is live if and only if every circuit con-tains at least one token with respect to the initial marking,

Definition 2.31 (Bounded and safe nets) A Petri net, with initial marking /-, issaid to be k-bounded if the number of tokens in each place does not exceed a finitenumber k for any marking reachable from /-, Instead of I-bounded (k = 1) Petrinets, one speaks of safe Petri nets,

Definition 2.32 (Live net) A Petri net is said to be live for the initial marking /-if for each marking v reachable from /- and for each transition q, there exists amarking 0 which is reachable from v and such that q is enabled on 0, A Petri netwhich is not live is called deadlocked,

Proof

Only if part: If there are no tokens in a circuit of the initial marking of an eventgraph, then this circuit will remain free of tokens and thus all transitions alongthis circuit never fire,

Page 41: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

62 SYNCHRONIZATION AND LINEARITYGRAPH THEORY AND PETRI NETS 63

If part: If a transition is never enabled by any firing sequence, then by backtrackingtoken-free places, one can find a token-free circuit. Indeed, if in an event grapha transition never fires, there is at least one upstream transition that never firesalso (this statement cannot be made for general Petri nets). This backtrackingis only possible if each place has a transition as predecessor and each transitionhas at least one place as predecessor, This holds for autonomous event graphs.Thus the theorem has been proved. .

Theorem 2.39 For a connected event graph, with initial marking /-, a firing se-quence can lead back to /- if and only if it fires every transition an equal numberof times,

Theorem 2.41 In a live event graph Ti is reachable from /- if and only if Tily = /-ly,for any y that satisfies Gy = 0,

This last theorem sharpens the result mentioned at the end of §2.4.1, where thecondition Til y = /-' Y was only a necessary condition.

2.5 TIMED EVENT GRAPHS

Proof In a connected event graph all transitions are either and-divergences, and-convergences or they are simple, i.e. they have one upstream place as well as

one downstream place. These categories may overlap one another. If an and-divergence is enabled and it fires, then the number of tokens in all downstreamplaces is increased by one. In order to dispose of these extra tokens, the downstreamtransitions in each of these places must fire also (in fact, they must fire as manytimes as the originally enabled transition fired in order to keep the number of tokensof the places in between constant). If an and-convergence wants to fire, then theupstream transitions of its upstream places must fire first in order that the numberof tokens of the places in between do not change. Lastly, if a transition is simpleand it can fire, both the unique downstream transition and upstream transition mustfire the same number of times in order that the number of tokens in the places inbetween do not change. The reasoning above only fails for loops. Since loops areconnected to the event graph also and since a firing of a transition in a loop does notchange the number of tokens in the place in the loop, these loops can be disregardedin the above reasoning. .

The original theory of Petri nets deals with the ordering of events, and questions

pertaining to when events take place are not addressed. However, for questions

related to performance evaluation (how fast can a network produce?) it is necessaryto introduce time. This can be done in two basic ways by associating durations witheither transition firings or with the sojourn of tokens in places.

Durations associated with firing times can be used to represent production timesin a manufacturing environment, where transitions represent machines, the length ofa code in a computer science setting, etc. We adopt the following definition.

Definition 2.42 (Firing time) The firing time of a transition is the time that elapsesbetween the starting and the completion of the firing of the transition,

We also adopt the additional convention that the tokens to be consumed by a transi-tion remain in the preceding places during the firing time; they are called reservedtokens.

Durations associated with places can be used to represent transportation or com-municaaon time, When a transition produces a token into a place, this token cannotimmediately contribute to the enabling of the downstream transitions; it must firstspend some holding time in that place, which actually represents the time it takes totransport this token from the initial transition to the place,

Definition 2.43 (Holding time) The holding time of a place is the time a token mustspend in the place before contributing to the enabling of the downstream transitions,

Observe that there is a basic asymmetry between both types of durations: firingtimes represent the actual time it takes to fire a transition, while holding times can beviewed as the minimal time tokens have to spend in places (indeed it is not becausea specific token has completed its holding time in a place that it can immediatelybe consumed by some transition; it may be that no transition capable of consumingthis token is enabled at this time). In practical situations, both types of durations

may be present. However, as we shall see later on, if one deals with event graphs,one can disregard durations associated with transitions without loss of generality.

Roughly speaking, a Petri net is said to be timed if such durations are givenas new data associated with the network, A basic dichotomy arises depending onwhether these durations are constant or variable, Throughout the book, only thedependence on the index of the firing (the firing of transition q of index k is thek-th to be initiated), or on the index of the token (the token of P of index k is thek-th token of P to contribute enabling u(p)) will be considered. The other possibledependences, like for instance the dependence on time, or on some possibly changingenvironment, will not be addressed,

This theorem states that the equation GI x = 0 has only one positive independentsolution x = (k,..., k)'. An immediate consequence is that every connected event

graph is synchronous.

Theorem 2.40 Consider an autonomous live event graph, It is safe if and only ifthe total number of tokens in each circuit equals one,

Proof The if part of the proof is straightforward. Now consider the only if part.Assume that the graph is saf~ and that the total number of tokens in a circuit (k,indicated by /-( (k), is not necessarily one. Consider all circuits ((i, (2, . .. , (m)passing through a place Pi and its upstream transition tj. Bring as many tokens aspossible to each of the upstream places of tj and subsequently fire tjas many timesas possible. It can be seen that the maximum number of tokens that can be broughtin Pi is bounded from above by minr/-((i), /-((2),..., /-((mn. In particular, if this

minimum equals one, then this maximum number of tokens is less than or'equal toone. Since the event graph is live, tj can be enabled, and therefore this maximumequals one. .The following theorem is stated in (95).

Page 42: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

64 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 65

The timing of a Petri net wil be said to be variable if the firing times ofa transition depend on the index of the firing or if the holding times oftokens in a place depend on the index of the token. The timing is constantotherwise,

simple examples with constant timing before addressing the general case. The issueof the initial condition wil not be addressed in these simple examples either (see§2.5.2.l). The general rule (to which we will return in the next subsection) is thattransitions start firing as soon as they are enabled.

In the constant case, the first, the k-th and (k + 1 )-st firings of transition a take thesame amount of time; this common firing time may however depend on a (see theexamples below).

Example 2.45 (An autonomous timed event graph) The first example deals withthe manufacturing system of §1.2,3, as depicted in Figure 1.5. The related Petrinet, given in Figure 2,13, is the starting point for discussing the way the evolutionequations are derived. The timing under consideration is limited to constant holdingtimes on places, which are indicated in the figure. The firing times are all assumedto be O. We have the following evolution equations:

Remark 2.44 With our definitions, nothing prevents a transition from having severalongoing firings (indeed, a transition does not have to wait for the completion of anongoing firing in order to initiate a new firing). If one wants to prevent sucha phenomenon, one may add an extra place associated with this transition. Thisextra place should have the transition under consideration as unique predecessor

and successor, and one token in the initial marking, as indicated in Figure 2.21.The addition of this loop models a mechanism that wil be called a recycling of

ln-l~TUl

or

OPi

6p, Q,-lla¡-l ~ ¿ 8l l to P2 TUl OP2

l

Xl (k + 1) = 5X2(k) EE 3X7(k) ,

x2(k + 1) = lXi(k + 1) EE 3xs(k) ,

x3(k + 1) = 3xs(k) EE 4X6(k) ,

x4(k + 1) = lXI (k + 1) EE 3X3(k + 1) ,

xs(k + 1) = 5X2(k + 1) EE 2X4(k + 1) ,

x6(k + 1) = 3X3(k + 1) EE 3X7(k) ,

x7(k + 1) = 2X4(k + 1) EE 4X6(k + 1)

Figure 2.21: Recycling of a transition

In order to get this set of equations, one must first observe that owing to our assump-tion that holding times are constant, overtaking of tokens in places is not possible:the k-th token to enter a place wil be the k-th token to leave that place (at leastif the initial marking in that place is 0). If one uses this observation, the equationfor X6 (for instance) is obtained as follows: a6 is enabled for the (k + 1)-st time atthe latest of the two epochs when the (k + l)-st token to enter the place betweena3 aad a6 completes its holding time there, and when the k-th token to enter theplace between a7 and a6 completes its holding time. The difference between the

arguments k and k + 1 comes from the fact that the place between a7 and a6 has onetoken in the initial marking. If one now uses the definition of holding times, it iseasily seen that the first of these two epochs is x3(k + 1) + 3, while the second oneis X7 (k) + 3, which concludes the proof. There are clearly some further problems tobe addressed regarding the initial condition, but let us forget them for the moment.In matrix form this equation can be written as

the transition. Owing to this mechanism, the firings of the transition are properlyserialized in the sense that its (k + 1 )-st firing can only start after the completion ofthe k-th firing. .

In the rest of this chapter, unless otherwise specified, EE will be maximizationand 0 addition, so that c: = -,00 and e = O. We will also use the symbol f to denotesubtraction.

x(k + 1) = Aox(k + 1) EE A1x(k) , (2,10)

where

c: c: c: c: c: c: c: c: 5 c: c: c: c: 3

c: c: c: c: c: c: c: c: c: c: 3 c: c:

c: c: c: c: c: c: c: c: c: c: c: 3 4 c:

Ao = I 1 c: 3 c: c: c: c: , Ai = c: c: c: c: c: c: c:

c: 5 c: 2 c: c: c: c: c: c: c: c: c: c:

c: c: 3 c: c: c: c: c: c: c: c: c: c: 3

c: c: c: 2 c: 4 c: c: c: c: c: c: c: c:

The equation is written in a more convenient way as

x(k + 1) = Ax(k) , (2,11 )

2.5.1 Simple Examples

The global aim of the present section is to derive evolution equations for the vari-ables Xi (k), i = 1,..., I QI, k :: 0, not counting the sources and sinks, àhd whereXi (k) is defined as the epoch at which transition ai stars firing for the k-th time.Both constant and variable timings will be considered, For general Petri nets, suchequations are difficult to derive. This problem wil only be addressed in Chapter 9.For the moment, we shall confine ourselves to event graphs. We star with some

Page 43: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

66 SYNCHRONIZATION AND LINEARITY

where A = AÔA¡ (see (1.22)), or, written out,

e 5 e e e e 3

e 6 e e 3 e 4e e e e 3 4 e

A= I e 6 e e 6 7 4e 11 e e 8 9 9e e e e 6 7 3e 8 e e 10 11 7

.

GRAPH THEORY AND PETRI NETS 67

u¡- - Uzl l10 Ö 85Xl ~l 4 ". Xz

TvA87.J/03 O~.2 () 4Ub200

\ ( y

Remark 2.46 Both equations (2.11) and (1.29) describe the evolution of the firingtimes, the first equation with respect to the state X, the second one with respect tothe output y. Using the notation of §1.2.3, one can check that

Figure 2.22: Petri net of Example 2.47

y(k + 1) = Cx(k + 1) = CAx(k) Co = (e e 2), C¡ = (e e e)

If one uses Aô' this system can be written asand that

y(k + 1) = My(k) = MCx(k) ,where A is defined above, and where CA equals MC, . x(k + 1)

( :

4 e) (e e7 e x(k)EE e elIe ee

n u(H 1) ff (: n u(k)

n x(k - 1)Conversely,it-is-easy to derive a Petri net from (2,11); such a net has 7 transitions

(the dimension of the state vector) and 22 places (the number of entries in A whichare not equal to e). Each of these places has a token in the initial marking. Theholding time associated with the place connecting transition j to transition i is givenby the appropriate Aij entry. Thus at least two different Petri nets exist whichboth yield the same set of evolution equations. In this sense these Petri nets areequivalent.

in (:

y(k) (e e 2)x(k)EE(e e e)x(k-1),

Example 2.47 (A nonautonomous timed event graph) The staring point forthe next example is Figure 2.22, which coincides with Figure 2,12 with an initialmarking added, The timing is again limited to places. The evolution equations aregiven by

This equation can be put into standard form by augmenting the state space: if onedefines

x(k + 1) = Aox(k + 1) EE A¡x(k) EE Azx(k - 1) EE Bou(k + 1) EE Biu(k)

y(k) = Cox(k) EE Cix(k - 1) ,

where

AF( e e3 e3 4

e) (e 4 e) (e e e)e , Ai = e e e , Az = e e e ,e e e e e e 2"

ßF 0 n, B, ~ (: n

Page 44: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

68 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 69

and substitutions, one obtains:

C=( E E E e 2 E E E) ,Further simplifications are possible in this equation. Since Xl is not observable (see(72)) and since it does not influence the dynamics of X2 or X3 either, it can bediscarded from the state, as can U¡. Thus a five-dimensional state vector suffices.Equation (2.12) is stil not in the standard form since the argument of u is k + 1instead of k. If one insists on the 'precise' standard form, it can be shown that

(2.12) and

y(t) 3u(t - 2) EB 4x(t - 2)

3u(t - 2) EB 4u(t - 4) EB 5x(t - 4)

EB h(T)U(t - T)1::T9+2T even

x(k + 1)

y(k)

Ãx(k) EB ÃBu(k)Cx(k) EB CBu(k) (2,13) where h is the function defined by (1.38). Observe that the min-summation can be

limited to t + 2 because u(-l) = u(-2) = '" = x(-l) = x(-2) = .,. = e and

the coefficient of x(t) is larger than that of u(t). Indeed, for the same reason, themin-summation can be extended to T .( +00, and also to -00 .( T because h( T)remains equal to 3 for values of T below 2, whereas u(t - T) is nonincreasing withT. Finally, one obtains that

are identical in the sense that their ')-transforms (see Chapter 1) are identicaL. Thisis left as an exercise to the reader. The latter equation does have the standard form,though there is a direct throughput term (the input u(k) has a direct influence onthe output y(k)). .Example 2.48 (Discrete analogue of the system of §1.2.7) The purpose of thisexample is to play again with the 'counter' description already alluded to in Chap-ter 1, and to show that discrete event systems may obey similar equations as somecontinuous systems, up to the problem of 'quantization', Figure 2.23 (left -hand side)represents a simple event graph: the three transitions are labelled u, x and y, holding

y(t) = EB h(T)U(t - T) ,-x-(r-(+oo

U -': ': ':,: ':: ";,,:'., :~::'i:i'-'

l " " "20:::'::::,::_:,::,,::,::,,:,:, ,

l r;",:"'~"':"':-'" "':':"x l~.ii. . .O~""""" , ',' '2

i'" .,""'' 0,":'::':;:"_y ..,: ': ': ': ': ': '; ':' :; ,: ': :. :, " , '

which compares with (1.39), except that now T ranges in 2:Z instead of JRThe right-hand side of Figure 2.23 suggests the correspondence of continuous

elements (extracted from Figure 1.13) with their discrete counterpars,Recallng the mixing operation explained in the last paragraph of §1.2,7, we

see that the discrete analogous operation consists here in 'synchronizing' two eventgraphs similar to that of Figure 2.23 by a join at their output transition y, .

2.5.2 The Basic Autonomous Equation

The event graphs of this section are assumed to be autonomous. The nonautonomouscase wil be considered in §2,5.5, We now turn to the derivation of a set of evolutionequations for event graphs with variable timing, under the general assumptions that

Figure 2.23: An event graph and its continuous analogue . the transitions start firing as soon as they are enabled;

times of places are indicated by numbers (firing times are all zero) and an initialmarking is shown. With each transition, e.g. x, is associated a function of time thaving the same name, e.g. t f- x(t), with the following meaning: x(t) representsthe number of firings of transition x up to time t, and it is assumed that x(t) = efor t .( O. The following equations are obtained in the min-plus algebra:

. the tokens of a place star enabling the transitions downstream as soon as theyhave completed their holding times.

x(t) = 1x(t - 2) EB u(t - 2) ; y(t) = 3x(t) ,

The problems that arise with variable timing are slightly more complex than inthe preceding examples. The main reason for this lies in the fact that tokens canthen overtake one another when traversing places or transitions. As we wil see inChapter 9, this precludes a simple ordering of events to hold, and event graphs withovertaking lose the nice linearity property emphasized in the preceding examples.The discussion wil hence be limited to the case of event graphs with First In FirstOut (FIFO) places and transitions, where the ordering of events preserves linearity.

where the delays in time originate from the holding times and where the coeffi-cients are connected with the initial number of tokens in the places. By successive

Page 45: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

70 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 71

2.5.2,1 Initial ConditionIn view of the interpretation of holding times as communication or transportationtimes, this definition just means that the transportation or communication mediumis overtake free. For instance; a place with constant holding times is FIFO,We start with a first discussion of the initial condition which is here understood as

a set of initial delays attached to the tokens of the initial marking in a way thatgeneralizes what is often done in queuing theory. This topic wil be revisited in§5.4.4.1 and §5.4.4.2, and further considered from a system-theoretic point of viewin §5.4.4.3,

Assume that one starts looking at the system evolution at time t = 0, and that thepiecewise constant function Ni(t) describing the evolution of the number of tokenspresent in Pi, i = i,..., ¡Pi, at time t E JP, is right continuous. Let Ni(O) = J.i,

where J.i denotes the initial marking in place Pi,The general idea behind the initial condition is as follows: the Ni(O) ( = J.i)

tokens visible at time t = 0 in Pi are assumed to have entered Pi before time 0;

at time 0, each token is completing its holding time or it is being consumed bythe transition (namely it is a reserved token), or it is ready to be consumed. Wecan equivalently define the initial condition through the entrance times of the initialtokens, or through the vector of JP-valued lag times, where

Definition 2.52 (FIFO transition) A transition qj is FIFO if the k-th firing of qjto start is also the k-th to complete,

The interpretation is that tokens cannot overtake one another because of the firingmechanism, namely the tokens produced by the (k + 1) -st firing of qj to be initiatedcannot enter the places of 0'( qj) earlier than those of the k-th firing, For instance,a transition with constant firing times is always FIFO. If a transition is recycled, its(k + 1) -st firing cannot start before the completion of the k-th one, so that a recycledtransition is necessarily FIFO, regardless of the firing times,

Definition 2.53 (FIFO event graph) An event graph is FIFO if all its places andtransitions are FIFO,

Definition 2.49 (Lag time) The lag time of a token of the initial marking of Pi isthe epoch when this token starts contributing to enabling O'(Pi),

However, these lag times should be compatible with the general rules that transi-tions fire as soon as they are enabled and that tokens start enabling the transitiondownstream as soon as they have completed their holding times, For instance

A typical example of a FIFO timed event graph is that of a system with constantholding times and recycled transitions with possibly variable firing times, An eventgraph with constant holding and firing times is always FIFO, even if its transitionsare not recycled, Since the FIFO property is essential in order to establish theevolution equations of the present section, it is important to keep in mind that:

. if the lag time of an initial token exceeds its holding time, this token cannot

have entered the place before time 0;

The classes of timed event graphs considered throughout the book are thosewith

. if the lag times (which are possibly negative) are such that one of the transitions

completes firing and consumes tokens of the initial marking before t = 0, thesetokens cannot be part of the marking seen at time 0 since they must have leftbefore time O.

1. constant firing and holding times;

2. constant holding times and variable firing times, provided all transi-tions are recycled,

Definition 2.50 (Weakly compatible initial condition) The initial condition of atimed event graph consists of an initial marking and a vector of lag times, Thisinitial condition is weakly compatible if

2.5.2.3 Numbering of Events

The following way of numbering the tokens that traverse a place and the firings ofa transition wil be adopted,

I, the lag time of each initial token does not exceed its holding time;

2, the first epoch when a transition completes firing is nonnegative,

By convention, the k-th token, k ~ 1, of place Pi is the k-th token tocontribute enabling O'(Pi) during the evolution of the event graph, includingthe tokens of the initial marking, The k-th firing, k ~ 1, of transition qi isthe k-th firing of qi to be initiated, including the firings that consume initialtokens.2.5.2.2 FIFO Places am! Transitions

A basic assumption that wil be made throughout the chapter is that both places andtransitions are First In First Out (FIFO) channels.

Definition 2.51 (FIFO place) A place Pi is FIFO if the k-th token to enter thisplace is also the k-th which becomes available in this place,

It may happen that two tokens in Pi contribute enabling O'(Pi) at the same epoch, orthat two firings of a transition are initiated at the same time (when the transition isnot recycled). In this case, some ordering of these simultaneous events is chosen,keeping in mind that it should be compatible with the FIFO assumptions,

Page 46: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

72 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 73

2.5.2.4 Dynamics

In what follows, the sequences of holding tim~s ai (k), i = 1,. , . , IP I, k E LZ, and offiring times ßj(k), j = 1,..., IQI, k E LZ, are assumed to be given nonnegative and

finite real numbers. Initially, only the restriction of these sequences to k 2' 1 wilbe needed. However, we assume that these sequences can be continued to k :: 0.Such a continuation is clear in the case of a constant timing, and we wil see in duetime how to define the continuation in more general circumstances (see §2.5.7).

We are now in a position to define the dynamics of the event graph more formally,

. The k-th token of place Pi incurs the holding time ai(k).

2.5.2 .5 Evolution Equations

Definition 2.57 (State variables, daters) The state variable xj(k), j = 1, .." IQI,

k 2' 1, of the event graph is the epoch when transition % starts firing for the k-thtime, with the convention that for all qi, xi(k) = 00 if qi fires less than k times,

These state variables wil be called daters,

These state variables are continued to negative values of k by the relation xj(k) = c,

for all k :: 0, LetM= max P,i'

i=l,.."IPI(2,14 )

. Once the k-th firing of transition qj is enabled, the time for qj to complete itsk-th firing is the firing time ßj (k). When this firing is completed, the reservedtoken is removed from each of the places of 7r( %), and each place of u( qj)receives one token.

In what follows, we wil adopt the convention that the EE-sum over an empty set isc. Define the IQI x IQI matrices A(k, k), A(k, k - 1),.", A(k, k - M), by

Aji(k, k - m) ~ ( EB ai(k)) Ç? ßi(k - m) , (2.15)t iE7fq(j) I7fP(i)=I,ILi=m rWe now state a few basic properties of the numbering in a FIFO event graph with

a weakly compatible initial condition. For i such that P,i 2' 1, denote Wi (1) ::w;(2) :: , , , :: Wi(P,i) E JR, the lag times of the initial tokens of place Pi ordered ina nondecreasing way.

and the IQI-dimensional vector v(k), k = 1",., M, by

Lemma 2.54 If the initial condition is weakly compatible and if the timed eventgraph is FIFO, then for all k such that 1 :: k :: P,i and P,i 2' 1, the initial tokenwith lag time Wi (k) is also the k-th token of place Pi (that is the k-th token to enable(J(Pi)),

vj(k) ~ EB wi(k)tiE7fq(j)IILi2kJ

(2.16)

Theorem 2.58 For a timed event graph with recycled transitions, the state vectorx(k) = (xj(k)) satisfies the evolution equations:

Proof If this last property does not hold for some place Pi. then a token whichdoes not belong to the initial marking of Pi. and which hence enters Pi after time° (the initial condition is weakly compatible), contributes to enabling (J(Pi) beforeone of the tokens of the initial marking does. Since the tokens of the initial markingenter Pi before time ° (the initial condition is weakly compatible), this contradictsthe assumption that Pi is FIFO. .

x(k) = A(k, k)x(k) EE A(k, k - l)x(k - 1) EE ... EE A(k, k - M)x(k - M) ,

k = M + 1, M + 2, .. , , (2.17)with the initial conditions

x(k) = A(k, k)x(k) EE '" EE A(k, k - M)x(k - M) EE v(k)

k = 1,2,...,M , (2.18)

Lemma 2.55 The firing of % that consumes the k-th token of Pi (for all Pi E 7r(qj))is the k-th firing of qi'

( ) defwhere Xj k = c for all k :: 0,

Proof Owing to the numbeDng convention, the set of k-th tokens of Pi E 7r( %)enables qj before the set of (k + 1 )-st tokens. .

Proof We first prove that the variables x j (k), j = 1, . . . , I QI, satisfy the evolutionequations:

Lemma 2.56 The completion of the k-thfiring of qj' k 2' 1, produces the (k+P,i)-thtoken of pi,for all Pi E (J(qj)'

Xj(k) = EB (ai(k) Ç? ß7fP(i)(k - P,i) Ç? X7fP(i)(k - P,i))tiE7f'l(j)lbILi r

EE

( EB Wi(k)), k=I,2,...,t iE7f'¡(j) Ik:SIL;j

(2.19)-,".,

Proof The FIFO assumptions on transitions imply that the completion of the k-thfiring of qj produces the k-th token to enter the places that follow Pi. The propertyfollows immediately from the FIFO assumption on places and from Lemma 2.54.. The k-th firing, k 2' 1, of transition qj starts as soon as, for all i E 7rQ(j), the

k-th token of Pi contributes to enabling qj. In view Of Lemmas 2.55 and 2.56, for

Page 47: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

'I ,j

ii, I!, lI ,:

,.

, ii I', ,

I,.. i

i

I

'..i

i!I

i

i!I

i

I

'I

74 GRAPH THEORY AND PETRI NETS 75SYNCHRONIZATION AND LINEARITY

k ? J.i, this k-th token is produced by the (k - J.i)-th firing of transition 7r(Pi),so that the epoch when this token contributes enabling o-Pi) is O;i(k) (9 ß7r1'(i)(k-J.i) (9 X7rP(i)(k - J.i). For k :: J.i, this event takes place at time wi(k), in view ofLemma 2.54, which completes the proof of (2.19).

We now use associativity and commutativity of E9, together with our conventionon E9-sums over empty sets, to rewrite xj(k), k ? M, as

80;21 (k) 0;14 (k) 0;42 (k)

qi ~8~I~O q4I~. q2 ~I~31(k) q3 0;43(k"0

C;(~ 8 ~I--O c;,,~8 8M IQI

EBEB EB O;i(k) (9 ßi(k - m) (9 xi(k - m)m=O 1=1 tiE7r'l(j)17rp(i)=I, !'¡=m)

The distributivity of (9 with respect to E9 implies in turn Figure 2.24: Event graph of Example 2.60

M IQI ( )xj(k) = ~ ~ tiE7r'l(j)17r~=1, !'¡=m) O;i(k) (9 ßi(k - m) (9 xi(k - m)

Under the assumtion that the event graph is FIFO, the matrices and vectors involvedin the evolution equations are

which completes the proof of (2.17), in view of the definition of A.The proof of (2.18) follows the same lines (using the continuation of the functionsxj(k) to E for k :: 0). . C' £') CU(k) ££ a"(k))

A(k k) = E E E E A(k k _ 1) = O;21(k) E E E, E E E E" E EE E 'E O;dk) 0;43(k) E E E E O;44(k)

A(k, k - 2) ~ ( a'~(k)

E E

D'E E

E E

E E

Remark 2.59 Owing to the dynamics, the first transition to complete its firing isnecessarily within the set of transitions qj having at least one token in the initialmarking of Pi for all Pi E 7r( qj). Since the set of tokens with the smallest lag times isthe first to be consumed, the second weak compatibility condition in Definition 2.50can be translated into the requirement that

ßj(1) (9 vj(l) :: e ,and(2.20)

( wii(l) E9 WI4(1) )

v(l) = W21(1)w31(1) ,w44(l)

v(2) ~ ( ""~(2) )for all j such that J.i :: 1 \j Pi E 7r( qj), which can be seen as a first set of linear

constraints on the lag times in view of (2.16). Similarly, the first weak compatibilityrelation is translated into the following additional set of linear constraints:

Wi ( k) :: O;i ( k ), i = 1,. . . , I pi, 1:: k :: J.i . The constraints (2.21) and (2.20) are translated into the bounds wlj (k) :: O;Zj (k),and wii(1) E9 wI4(1) :: e, W21(1) :: e, w31(1) :: e. .

(2.21 )

For instance, if Wi (k) = O;i (k) for all i = 1,..., IP I, 1 :: k :: J.i, then the initial

condition is weakly compatible, provided the condition wi(l) :: wi(2) :: ... ::Wi (J.i) is satisfied. . 2.5.2.6 Simplifcations

Example 2.60 Consider the timed event graph of Figure 2.24. The firing timesare assumed to be equal to e. The place connecting qj to qz is denoted Plj. Theholding times in this place are denoted O;lj (k), and the lag times of the initial tokensWZj (k). In order to have a FIFO event graph, places should be overtake free. Thiswill always be true for Pll and P22, regardless of the holding time sequences in

these places (since there is always at most one token each of these places). Asimple sufficient condition ensuring that the other places are overtake free is that theassociated holding time seauences are non decreasing in k (for instance constant).

Firing Times The evolution equations (2.19) are unchanged if one sets all the firingtimes equal to e and if O;i (k) receives the value O;i (k) (9 ß7rP(i) (k - J.i). Thus, one canalways modify the holding times in order to get an 'equivalent' event graph withfiring times of duration e, where equivalence means that the epochs when transitionsfire are the same in both systems.

It may be assumed without loss of generality that the firing times are equalto e = O.

Page 48: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

76 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 77

Observe that under this assumption the state variable x j (k) is also the epoch whentransition qj completes its k-th firing. Graphically, this is exemplified in Figure 2.2S.If a firing time were assigned to a transition within an event graph, then this timecan always be assigned to (i.e. added to) the holding times of all the upstreamplaces. Consider Figure 2.2Sa, in which the transition has a firing time of S time

units. The holding times of the places are 3, 4 and 6 as indicated in this figure.Figure 2.2Sb shows assignment of the firing time to the places. The firing of thetransition in Figure 2.2Sb, which is instantaneous, corresponds to the completion ofthe firing of the transition in Figure 2.2Sa. Another, similar, solution is providedin Figure 2.2Sc, where the holding time has been assigned to all the downstreamplaces. The firing of the transition in this figure corresponds to the initiation of thefiring of the transition in Figure 2.2Sa.

A different solution is provided in Figure 2.2Sd. In this figure, both the beginningand completion of the firing are now explicitly represented. In Figure 2.2Se, theholding time at the transitions is also 0, but in contrast to the previous solutions

the transitions cannot fire twice (or more times) within S time units. The transitionscannot be engaged in (partly) parallel activities.

In what follows, we shall therefore often assume that the firing times are zero.The practical implication of this mathematical simplification is clear in the constantfiring and holding time case. In the variable case, one should however always keepin mind that the only meaningful initial situation is that of variable firing times (onrecycled transitions) and constant holding times.

Initial Condition The end of this subsection is devoted to a discussion of theinitial condition. It is shown that Equation (2.18), defining the initial condition, canbe further simplified whenever the lag times satisfy certain additional and naturalconstraints.

For all i such that l1i ? 0, denote by Yi (k), k :: 0, the entrance time function

associated with place Pi. defined by the relation

30 04~S

l06

30 04~ol

011

30 04\/-TOs!

T

06(d)

80 09iLo

l06

(a) (b) (c)

Figure 2.25: Firing times set to e

Yi(k - l1i) ~ t :i (k)fÜ'i (k) if 1 :: k :: l1i

if k ? l1i ,

where we recall that f denotes conventional subtraction.

The initial condition is said to be compatible if it is wealky compatible and iffor any pair of places Pi and Pj which follow the same transition, the entrance timesYi(k) and Yj(k) coincide provided k:: min(l1i,l1j).

Definition 2.61 (Compatible initial condition) The initial condition is compatibleif it is weakly compatible and if there exist functions Zj (k), j = 1, . . . , I QI, k :: 0,such that30 04

0\/OC! OS

~i6(e)

Yi(k) = zrrJ'(i)(k), Vi, k such that - l1i + 1 :: k :: 0 . (2.23)

This condition is quite natural, should the initial condition result from a past evolu-tion of the event graph: for instance, the last tokens of the initial marking to entertwo places Pi and Pi' that follow the same transition qj, have then been produced atthe same time Zj(O) by a firing of qj.

Let def ()Mj = max l1i .iEaq(j) .

Observe that the function Zj (k) is only defined through (2.23) for - Mj .c k :: 0,

provided Mj :: 1. For other values of k, or if Mj = 0, we take zj(k) = E.Instead of the former continuation of x(k) to k :: 0 (which consisted in taking

xj(k) = E for k :: 0), we now take

Xj(k) = zj(k), Vk:: 0, j = 1,..., IQI . (2.24 )

Corollary 2.62 For a FIFO timed event graph with a compatible initial condition,the state vector x(k) = (xj(k)) satisfies the evolution equations:

x(k) = A(k,k)x(k)E9A(k,k-l)x(k-.1)E9...E9A(k,k-M)x(k-M),k = 1,2, . . . , (2.2S)provided the continuation of x(k) to negative values of k is the one defined by

(2.24).

Proof By successively using (2.22) and (2.23), one gets

EB wi(k)tiErr"Ullk::!,,f

EB Ü'i(k) (9 Yi(k - l1i)tiErrqU)lk::!';1

EB Ü'i(k) (9 zrrJ'(i)(k - l1i)tiErrqUllk::!';1

for all k = 1,2, . . . , so that one can rewrite (2.19) as

(2.26)

(2.22)

Xj(k)= EB (XrrJ'(i)(k-l1i) (9Ü'i(k)) , k=1,2,...,t iErr"Un

when using the continuation of x proposed in (2.24). Equation (2.2S) follows im-mediately from (2.26). ·

Page 49: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

78 SYNCHRONIZATION AND LINEARITY

Remark 2.63 A simple example of compatible initial condition is obtained whenchoosing wi(k) = ai(k) for all 1 :: k :: f.i. Practically speaking, this means that

all the initial tokens enter at time O. This corresponds to the continuation

x j ( k) = t e ~f - Mj .c k :: 0E if k .c M.- J. (2.27)

Example 2.64 (Example 2.60 continued) If the initial condition is compatible, let

Zi (0) def

zl(-l) def

Z4(0) def

wii(l)faii(l) = w21(I)fa21(1) = W31 (2)fa31 (2)

W31(I)fa31(1) ,

wI4(1)fai4(1) = w44(1)fa44(1)

Define

( zi(;1) )

x(-I) = .E

E( Zi (0) )

x(O) = EE 'Z4(0)

It is easily checked thatv(2) = A(2, O)x(O)

and thatv(l) = A(I, O)x(O) E9 A(I, -1)x( -1)

Thus

x(k) = A(k, k)x(k) E9 A(k, k - l)x(k- 1) E9 A(k, k - 2)x(k - 2), k = 1,2,....

2.5.3 Constructiveness of the Evolution Equations

The first natural question concerning Equation (2.17) is: is it implicit or constructive?The main result of this section establishes that the evolution equations (2.17) arenot implicit and that they allow one to recursively define the value of xj(k) for allj = 1,..., IQI, and k ~ 1, provided the event graph under consideration is live.

Lemma 2.65 The event graph is live if and only if there exists a permutation Pof the coordinates for which the matrix p' A(k, k)P is strictly lower triangular forall k.

Proof If the matrix p' A(k, k)P is strictly lower triangular for some permutation P,then there is no circuit with 0 initial marking, in view of the definition of A( k, k) (see(2.15)). Conversely, if the event graph is live, the matrix A( k, k) has no circuit, and

.

.

I

ii

(i:

'i

I,

11

I

GRAPH THEORY AND PETRI NETS 79

there exists a permutation of the coordinates that makes A strictly lower triangular.The proof is then concluded from Theorem 2.38. .

Observe that the fact that P does not depend on k comes from the fact that thesupport of A(k, k) does not depend on k (by 'the support' of matrix A we mean thematrix S with the same dimension as A defined by Sij = lAij#c).

If the matrix P' A(k, k)P is strictly lower triangular, An(k, k) = E for n ~ IQI,and the matrix

A*(k, k) ~f e E9 A(k, k) E9 A2(k, k) E9 ...

is finite. Let

A(k, k - l) ~ A*(k, k)A(k, k -l) kE71, l=I,...,M, (2.28)

and

¡i

0),

v(k) ~ A*(k, k)v(k) k E 7l ,

iI

!

with vj(k) ~ E for k :: 0 or k )- M.):y\

Th'tOrem 2.66 If the event graph is live, the evolution equations (2.17) and (2.18)can be rewritten as

i

ii

Ii

x(k) = A(k, k - l)x(k - 1) E9... E9 A(k, k - M)x(k - M) E9 v(k)

k = 1,2, ..., (2.29)

( ) defwhere Xj k = E, for all k :: o.

Proof From (2.17) and (2.18), we obtain by induction on n that

x(k) = An+l(k,k)x(k)

E9 (~Am(k,k)) (p,A(k,k-l)X(k-l)E9V(k)), k= 1,2,....

Equation (2.29) follows from the last relation by letting n go to 00. .Remark 2.67 If the initial condition is compatible and if one now takes the con-tinuation of x(k) for k :: 0, as defined in (2.24), the same type of arguments showsthat (2.25) becomes

11

x(k)=EBA(k,k-l)x(k-l), k=I,2,....1=1

.Corollary 2.68 If the event graph is live and if the holding times and the lag timesare all finite, so are the state variables xj(k), j = 1,..., IQI, k ~ 1.

Page 50: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

80 SYNCHRONIZATION AND LINEARITY

.Proof The proof is by induction based on (2.29).

GRAPH THEORY AND PETRI NETS 81

1. take the same set of transitions as in the original event graph;

2. for each path of S (j , j, l), L ;: 1, in the original event graph, create a placeconnecting j' to j with L tokens and with the weight of the path as holdingti~. .Remark 2.69 The matrix A(k, k -l), L ;: 1, has a simple graph-theoretic interpre-

tation. Let S (j, j, l) be the set of paths in the graph G of the event graph, of lengthat least 2, with initial transition qj', with final transition qj, and such that the firsttwo transitions are connected by a place with initial marking equal to l, while theother transitions are connected by places with 0 initial marking. It is easily checked,using the results of §2.4, that Ajji(k, k -l) is defined by the relation

Ajj'(k, k -l) = EBtP=(j1 ,ii ,j2,i..,i/i-1 ,j'I)ES(j,j,llJ n=i

ç8~al4

q¡ 8 q41~4za~1~43a~~~~ (ci) \;0 ~q,

h-i

Q9adk) , (2.30)

with the usual convention if the set S (j', j, l) is empty. The entry Ajj' (k, k - l) ishence simply the longest path in S (j', j, l). .

Example 2.70 (Example 2.60 continued) We have

( e E

E eA*(k,k) = E EE adk)

E

E

ea43 ( k )

so that

( aii(k) E E

azi(k) E EE E E

a4z(k)azl(k) E E

A(k,k -1) =

A(k, k - 2) =

( EE

adk)a43 (k )a3i (k)

E EE EE EE E

and

D'

8~al4

qi 8 q4G:i~t,a~il~9~\\~ i ~i \~~iø øFigure 2.26: Ilustration of Remarks 2.71 and 2.72

Remark 2.72 (Equivalent event graph with reduced state space) The dimensionof the state space can be reduced using the following observation: the transitionsfollowed by places all having a 0 initial marking, or equivalently the transitions qjsuch that the entries of the j-th column of A(k, k - I) are E, are not present inthe right-hand side of (2.29). Let Q' be the set of transitions followed by at leastone place with a positive initial marking. One can take as reduced state variablesxj(k),j E Q', k ;: 1. The remaining variables are obtained from them via (2.29)..

aI4(k)E

E

aM ( k ) )

D Example 2.73 (Example 2.60 continued) Here we have Q' = rqi, q4Ì. With thesenew state variables, the evolution equations are reduced to

( aii(k) aI4(k)) (xi(k-l))a4z(k)aZI (k) aM(k) x4(k - 1)

E9( E E)(xl(k-2))E9(VI(k))a43(k)a31(k) E x4(k - 2) v4(k).

The event graph corresponding to these equations is depicted in Figure 2.26, right-hand side. It is obtained from the derived graph by deleting the transitions that donot belong to Q'.

The other state variables are obtained from the reduced state variables by therelation

( xi(k) )X4 ( k )

( wii(I)E9wI4(1) ) (E)_( ) wzi(l) _( ) Evl= w31(1) ,v2= W31(2) .

WZi (1 )a42 (i) E9 W3i (1 )a43 (1 ) E9 wM(I) W31 (2)a43 (2)

.Remark 2.71 (Equivalent event graph with positive initial marking) With theevolution equation (2.29), one can associate a derived event graph with the sameset of transitions as the initial event graph, and where the initial marking is suchthat f.i ? 0 for all places Pi. This event graph is equivalent to the initial one in thesense that corresponding transitions fire at the-same times. The derived event graphassociated with the event graph of Example 2.60 is given in Figure 2.26, left-handside. This derived event graph can be defined from the original one by the followingtransformation rules:

( xz(k) )X3 ( k ) ( az i (k ) E) ( X I (k - 1) )E E . x4(k - 1)

E9 ( E E ) ( X I (k - 2) ) E9 ( Vz ( k) )a31 (k) E x4(k - 2) v3(k).

Page 51: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

82 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 83

The variables (Xz (k), X3 (k)) are output variables in the derived event graph. Equiv-alently, transitions az and a3 are sinks of the derived event graph. ·

Equation (2.31) wil be referred to as the standard form of the evolution equationsof an autonomous timed event graph satisfying (2.29).

2.5.4 Standard Autonomous Equations

The data of this section is a live event graph satisfying the evolution equations

(2.29), with the reduction of the state space mentioned in Remark 2.72. We wilassume that the transitions of Q' are numbered 1,..., IQ'I, which introduces noloss of generality.

It may be desirable to replace the initial recurrence (2.29), which is of orderM, by an equivalent recurrence of order 1. This is done by using the standardtechnique which consists in extending the state vector. As a new state vector, take t5)the (IQ'I x M)-dimensional vector

Remark 2.75 In the paricular case of a compatible initial condition, these equationsread

x(k+l)=Ã(k)x(k), k=1,2,..., (2.32)

provided the continuation of xj(k) for k ~ 0, is that of Equation (2.24). When-

ever the entrance times of the tokens of the initial marking are all equal to e (seeRemark 2.63), it is easily checked from (2.27) that in this case

_ f e if 0 ~ L -( MjxIIQ'I+j(O) = L c for L ?: Mj , (2.33)

( x(k)

x k-lx(k)~ ( )x(k + 1 - M) )

for L = 0, . . . , M - 1; j = 1,. . . , 1 Q' I. .Example 2.76 (Example 2.60 continued) Here we have

A(k+l,k) A(k+l,k-l) .. . .. . A(k+l,k+l-M)e c ... c c

Ã(k) = I c e c

e c c

c .. . c e c

( xi(k) )

x(k) = x4(k)xi(k-l)x4(k - 1) (VI(k+l))

ii(k) = V4(kt 1) ,Let Ã(k), k E ::, be the (IQ'I x M) x (IQ'I x M) matrix defined by the relation

and

( al1(k+l)

A(k) = adk + 1)tZ1(k + 1)al4(k + 1)

a44(k + 1)ce

ca43(k + l)a31(k + 1)

cc D

where e and c denote the IQ'I x IQ'I identity and zero matrices, respectively, andlet v(k) be the (IQ'I x M)-dimensional vector

In the special case mentioned at the end of the preceding remark, we have x(O) =(e, e, e, c)'. .

( v(k + 1) )

v(k) "" ;

x(k+l)=Ã(k)x(k)E9v(k), k=I,2,.... (2.31 )

Remark 2.77 (Equivalent net with at most one token in the initial marking)One can associate a timed event graph with the evolution equations (2.31). Theinteresting property of this event graph is that its initial marking is such that M = 1(more precisely, each J.i in this event graph is 1).

In view of Corollary 2.74, one can hence state that for any timed event graph,one can construct another 'equivalent' event graph with initial marking equal to1 everywhere. The equivalence means here that one can find a bijective mappingfrom the set of transitions of the initial event graph to a subset of the transitions ofthe second one, such that two corresponding transitions fire at the same time. Inparticular, any observation of these transitions wil be identicaL.

For instance, in the case of a compatible initial condition, this event graph canbe obtained from the original one by first transforming it into an event graph withpositive initial marking (as it was done in Remark 2.71), and by then applying thefollowing transformation rules:

where c represents here the I Q' I-dimensional zero vector.Adopting the convention that xj(k) and vj(k) are equal to c for k ~ 0, it should

be clear that Equation (2.31) in the following corollary is a mere rewriting of theevolution equations (2.29).

Corollary 2.74 The extended state space vector x(k) satisfies the (M x IQ'I)-dimensional recurrence relation of order 1

Page 52: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

84 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 85

1. for each transition aj of Q' in the original event graph, create M transitions

ajl, L = 0,..., M - 1;

2. for each ajl, L = 0,..., M - 2, create a place that connects ajl to ai,l+I, with

o holding times. Put one token in its initial marking, with initial lag timezj(-l);

3. for each place connecting ai E Q' to aj, and with 1+1 initial tokens, ~ 0, in

the original system, create a place with one token with initial lag time Zi( -I),

and with the same holding times sequence as the original place. This newplace has ail as input transition, and ajO as output transition.

In what follows, all input sequences wil be assumed to be weakly compatible. Asin the autonomous case, the initial condition is said to be weakly compatible if inaddition .

. the entrance times of the tokens of the initial marking are nonpositive;

. the firings which consume tokens of the initial marking complete at nonneg-ative epochs (the assumption that the input sequences are weakly compatiblemay contribute ensuring that this holds).

For Example 2.60, the corresponding event graph is given in Figure 2.27. Thebehavior of alO in this graph is the same as that of ai in Figure 2.24. The sameproperty holds for a40 and a4 respectively. .

The definition of compatibilty is the same as in the autonomous case. For instance,if the lag times of a nonautonomous event graph are compatible, one can continuethe input sequence ~uj(kn (with j E I) to a nondecreasing sequence ~Uj(knkEæ.,

with Uj(O) :: 0, such that for all Pi E u(aj) with Pi ;: 1,

wi(k) = ai(k) (9 Uj(k - Pi), 'tk: 1 :: k :: Pi (2.34 )

G)~'"''''''''''''.'''--''''''' .........al4 ":Z4(0):a42a21 ....;..~"~ ~0 --'" 0 / . q"1~8/ r~'0~1-8~1

(;IJ ,.':.r :.....::...; la~ .../ø...../i.(~!~ :.Z:.(~.~!.: \8.........

2.5.5.1 Basic Nonautonomous Equations

The derivation of the evolution equations is based on the same type of assumptionsas in the autonomous case, namely the event graph is FIFO and the initial conditionis weakly compatible.

Define the IQI x II I matrices B(k, k),..., B(k, k - M) by

Bji(k, k - m) ~f EBí iE1fQ(j)I1fP(i)=I,tL;=m J

ai(k) , (2.35)

Figure 2.27: Ilustration of Remark 2.77and the I I I-dimensional vector u(k) = (Ui (k), ... , ulII (k)), k = 1,2,.... Using thesame arguments as in Theorem 2.58, we get the following result.

Theorem 2.80 Under the foregoing assumptions, the state vector x(k)(xl(k),...,xIQI(k))' satisfies the evolution equations:

2.5.5 The Nonautonomous Case

This subsection focuses on FIFO timed event graphs with external inputs. The firingtimes can be taken equal to 0, without loss of generality.

To the framework of the preceding sections, we add a new class of transitionscalled input transitions. This set of transitions will be denoted I.

x(k) = A(k, k)x(k) E9 ... E9 A(k, k - M)x(k - M) E9 B(k, k)u(k)E9...E9B(k,k-M)u(k-M)E9v(k), k= 1,2,..., (2.36)

Definition 2.78 (Input transition) An input transition consists of a source transi-tion and of a nondecreasing real valued sequence, called the input sequence.

where xj(k) ~ E: and uj(k) = E: for all k :: 0; vj(k) is defined as in (2.16) for1 :: k :: M and it is equal to E: otherwise.

If the initial lag times and the input sequences are both compatible, this equationcan be simplified by using the same arguments as in Corollary 2.62, which leads tothe equationThe input sequence associated with transition aj E I wil be denoted Uj (k), k ;: 1;

the interpretation of this sequence is that Uj (k), k ;: 1, gives the epoch when ajfires for the k-th time, due to some external trigger action. The input sequences areassumed to be given.

x(k) = A(k, k)x(k) E9 ... E9 A(k, k - M)x(k - M) E9 B(k, k)u(k)E9...E9B(k,k-M)u(k-M) , k= 1,2,..., (2.37)

Definition 2.79 (Weakly compatible input sequence) The input seauence uj(k),k E ::, is weakly compatible if Uj (1) ;: O.

where the continuations that are taken for x(k) and u(k), k :: 0, are now those

defined in Corollary 2.62 and Equation 2.34, respectively.

Page 53: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

i.l VV.lUL ivuvvv,: VVL; VVU.l ,:ay Uiai UK:; UUUa.ULUUUlJIUU~ t:Vt:L11 gn1Vll is lIve II rne

associated autonomous event graph (namely the one associated with the equationx(k) = A(k, k)x(k) E9... E9 A(k, k - M)x(k - M)) is live. Let

B(k, k - l) ct A*(k, k)B(k, k - m), k E 7l l=O,...,M

At:iianl. ~.O.. rurraiiy, me auionomous equanon ~L.l /) can alSO be seen as thatof a nonautonomous event graph with a set of input transitions I = .¡ q; , q~, . ..1of the same cardinality as the set Q', with input sequence vector v(k), and withB(k, k) = e, B(k, k -l) = E for L = 1,..., M (the input transition qj is connected

to the internal transition qj by a single place with 0 initial marking).However, the requirement that an input sequence should be nondecreasing con-

tradicts our foregoing assumption on v(k) (with our definitions, vj(k) eventuallybecomes E for k large, as it can be seen from (2.16)). However, when using the factthat the sequences x j (k) are nondecreasing, it is easy to check that one can take theinput sequence Uj (k) defined by the function

The following theorem is proved like Theorem 2.66.

Theorem 2.81 If the event graph is live, the evolution equations (2.36) can berewritten as

x(k) = A(k, k - I)x(k - 1) E9 ... E9 A(k, k - M)x(k - M)E9 B(k, k)u(k) E9... E9B(k, k - M)u(k - M) E9 v(k) ,k = 1,2,...,

~(2.38)

Uj(k) ct r vj(k)

L vj(Mj)

if 1 .: k .: Mjif k ?: Mj ,

with the same simplifcation as in Corollary 2.62, provided the initial lag times andthe input sequences are compatible.

instead of v(k), without altering the values of x(k).This representation of an autonomous event graph as a nonautonomous one,

where all initial lag times can be taken equal to E, is exemplified on the event graphof Example 2.60 in Figure 2.28. .

The graph theoretic interpretation of Bjj(k, k - l) is again the longest path in

5 (j', j, l) (see Remark 2.69).uz(k) = wzi(L), k?: 1

2.5.5.2 Standard Nonautonomous Equations

Define the (M x I i I) -dimensional vector

( u(k+I) )

u(k) ct U(:k) ,

u(k + 2 - M)

08qi~8-=I~O q4

ó?1~e~:~o~l-it \.8~ r"0~1 r\.8~

and the (I I I x M) x (IQ'I x M) matrix

E )

Ui (k) = wI4(1) EE Wli (1)

k?: 1

U3 (1) = W31 ( 1 )u3(k) = w31(2) , k?: 2

u4(k) = W44(I)

k?: 1

( B(k+I,k+I) B(k+I,k)

_ E EB(k) = . .. .. .E EB(k + i, k + 2 - M)

EFigure 2.28: Ilustration of Remark 2.83

Corollary 2.82 (Standard nonautonomous equation) The extended state spacevector x (k) satisfies the (M x I Q' I) -dimensional recurrence of order 1:

2.5.6 Construction of the Marking

x(k + 1) = Ã(k)x(k) E9 B(k)u(k) E9 v(k), k = 1,2,..., (2.39)

This subsection is concerned with the construction of the marking from the statevariables. We wil limit ourselves to the construction of the marking at certainepochs for which their expression is quite simple. However, the forrulæ that areobtained are nonlinear in the max-plus algebra. We wil therefore return to classicalalgebra, at least in this subsection. For the sake of simplicity, it is assumed thatthe initial condition is compatible. Pick some place Pi in P, and let qj = 7r(Pi),

with the same simplifcation as in Corollary 2.62, provided the initial lag times andthe input sequences are compatible.

Page 54: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

88 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 89

ai = U(Pi). Let Ni(t) be the number of tokens in place Pi at time t, t 2: 0, with theconvention that this piecewise constant function is right-continuous.

Let

random variables. For instance, all these variables could be exponentially distributed,with a parameter that depends on L or i, namely

Ni-(k)

Nt(k)

def Ni (x7rP(i)(k)) ,

def Ni (xap(i)(k)) ,k2:1

k2:1(2.40)

(2.41 )

Il¡al(k) :: xl = t ~ - exp(aix) if x 2: 0 ;otherwise, (2.44 )

and

Owing to our definitions, Ni- (k) is the number of tokens in Pi just after the k-thtoken entrance into Pi after t = 0, while Nt (k) is the number of tokens Pi just afterthe deparure of the k-th token to leave Pi after t = O.

Il¡ß.(k) :: xl = f 1 - exp(bix) if x 2:? ; (2.45)i 1. 0 otherwise,where aj ? 0 and bj ? O. Another particular case arses when all the sequences are

constant and deterministic, and the case with constant timing is thus a special (anddegenerate) case of the i.i.d. situation.

Lemma 2.84 Under the foregoing assumptions,

Ni-(k)k+¡.i

L 1txl(h);oXj(k)J, k = 1,2,...,h=!

2.6 MODELING ISSUES

(2.42) In this section some issues related to the modeling of Petri nets wil be describedbriefly.00

Nt(k)L 1 tXI(k):;xj(h)J

h=k+!-¡.i

k = 1,2, .... (2.43)2.6.1 Multigraphs

Proof The tokens present in Pi at time (just after) xj(k) are those that arvedinto Pi no later than x j (k) and which are still in Pi at time x j (k). The tokens thatarrived no later than xj(k) are those with index h with respect to this place, with1 :: h:: k+J.i. Among these tokens, those which satisfy the relation x¡(h) ? xj(k)

are stil in Pi at time xj(k). Similarly, the only tokens that can be present in place

Pi just after time x¡(k) are those with index h ? k with respect to Pi. The token ofindex h with respect to Pi is the token produced by transition j at time xj(h - J.i)

(where the continuation of xj(k) to k :: 0 is the one defined in §2.5.2.6). Amongthese tokens, those which entered Pi no later than time x¡(k) are in Pi at time x¡(k)..

Multigraphs are graphs in which more than one arc between two nodes is allowed.The fact that in this chapter no such multigraphs have been considered is twofold.

The first reason is that the modeling power of Petri nets with multiple arcs andPetri nets with single arcs is the same (108). This 'modeling power' is definedin terms of 'reachability', as discussed in §2.4.1. Petri nets with multiple arcscan straightforwardly be represented by Petri nets with single arcs, as shown inFigure 2.29. Note, however, that in the second of these figures a conflict situation

2.5.7 Stochastic Event Graphs

Definition 2.85 (Stochastic event graph) A timed event graph is a stochastic eventgraph if the holding times, the firing times and the lag times are all random variablesdefined on a common probability space.

IT Ó\O~ 1. 0~/l.oo~li

oi\.6 6~

Figure 2.29: The change of multiple arcs into single arcsDifferent levels of generality can be considered. The most general situation thatwill be considered in Chapters 7 and 8 is the case when the sequences t ai (k n kEZ,i = 1,..., IPI, and tßj(k)ÌkEZ, j = 1,..., IQI, are jointly stationary and ergodic

sequences of nonnegative and integrable random variables defined on a commonprobability space (D, JF, Il). Similarly, the lag times wi(k - J.¡), 1 :: k :: J.i, are

assumed to be finite and integrable random vàriables defined on (D, JF, Il).More specific situations wil also be considered, like for instance the case when

the sequences ta¡(k)"hEN, l = 1,... ,IPI, and tßi(k)"hEN, i = 1,..., IQI, are

mutually independent sequences of independent and identically distributed (i.i.d.)

has arisen. In order that this single arc representation of the originally multiple arc

from place to transition behaves in the same way as this multiple arc, it is necessarythat the two rival transitions receive tokens alternately.

The second reason is that it is not at all clear how to obtain equations for timedPetri nets in which there are multiple arcs. Observe that such nets are not eventgraphs, as is directly seen from Figure 2.29. . It seems that some transitions fire in thelong run twice as often as some other transitions; the 2k-th enabling of such a 'fast'transition is caused by the k-th firing (approximately) of such a 'slow' transition.

Page 55: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

I ,

i'

90 SYNCHRONIZATION AND LINEARITY GRAPH THEORY AND PETRI NETS 91

2.6.2 Places with Finite Capacity

For the rule for enabling transitions it has tacitly been assumed that each place canaccommodate an unlimited number of tokens. For the modeling of many physicalsystems it is natural to consider an upper limit for the number of tokens that eachplace can hold. Such a Petri net is referred to as a finite capacity net. In such anet, each place has an associated capacity Ki, being the maximum number of tokensthat Pi can hold at any time. For a transition in a finite capacity net to be enabled,there is the additional condition that the number of tokens in each Pi E 0- (qj) cannotexceed its capacity after the firing of qj.

In the discussion to come we confine ourselves to event graphs, although theextension to Petri nets is quite straightforward, see (96). Suppose that place Pi hasa capacity constraint Ki, then the finite capacity net will be 'remodeled' as anotherevent graph, without capacity constraints. If 7f(Pi) n o-(Pi) i- 0, then there is a loop.The number of tokens in a loop before and after the firing is the same and hencethe capacity constraint is never violated (provided the initial number of tokens wasadmissible). Assume now that 7f(Pi) n a-Pi) = 0. Add another place Pi' to the net.This new place wil have J.i' = Ki - J.i tokens. Add an arc from o-(Pi) to Pi' and anarc from Pi' to 7f(Pi). The number of tokens in this new circuit is constant accordingto Theorem 2.37. The liveness of the event graph is not influenced by the additionof such a new circuit, see Theorem 2.38. An example is provided in Figure 2.30where Ki = 3. It is easily verified that this newly constructed Petri net, without

of appraisal with respect to future uses of the modeL. Models may be equivalentin some respects but they may differ in the physical insights they provide. Theseobservations are classical in conventional. system theory: it is well known thatdifferent state space realizations, even with different dimensions, may yield thesame input-output behavior, but some of these realizations may capture a physicalmeaning of the state variables whereas others may not.

To be more specific, a clear identification of what corresponds to 'resources'in an abstract Petri net model may not be crucial if available resources are givenonce and for all and if the problem only consists in evaluating the performance of aspecified system, but it may become a fundamental issue when resource quantitiesenter the decision variables, e.g. in optimal resource sizing at the design stage. It hasalready been noticed that, in an event graph, although the number of tokens in eachcircuit is invariant during the evolution of the system, this is not generally the caseof the total number of tokens in the system, even if the graph is strongly connectedand autonomous. In this case, it is unclear how tokens and physical resources arerelated to each other.

Figure 2.31 shows the simplest example of this type for which there are onlytwo distinct situations for the distribution of tokens, the total number of tokensbeing either one or two. Indeed, if we redraw this event graph as in Figure 2.32,it becomes possible to interpret the two tokens as two resources circulating in the

system sometimes alone (case (a)) and sometimes jointly (case (b)). The problemwith the former model of Figure 2.31 is that, when they stay together (case (b)),the two resources are represented by a single token. Obviously, these two modelsare equivalent if one is only interested in the number of transition firings withina certain time (assuming that some holding times have been defined properly incorresponding places), but the difference becomes relevant if one is wiling to play

with individual resource quantities in order to 'optimize' the design.As long as modeling is an art, what is described hereafter should be considered as

a set of practical guidelines-rather than as a rigorous theory-which should help intrying to construct models which capture as much physical meaning as possible. Thedynamic systems we have in mind are supposed to involve the combined evolution.of several interacting resources designed to achieve some specific overall task orservice. Our approach is in three stages:

Ki = 3

Pi-1-8-1-P;

Ce~-1- 8-1-Pi

r(\ r(\000000\JJ \JJ(a) (b)

~Figure 2.30: Node with and without a capacity constraint

capacity constraints, behaves in exactly the same way in terms of possible firingsequences as the original finite capacity net. In this sense the nets are 'equivalent'.

Figure 2.31: Merging two resources

2.6.3 Synthesis of Event Graphs from Interacting Resources

This aim of this subsection is to show how, staring from the physical understandingof 'resources', and some assumptions, one can build up event graphs in a somewhatsystematic way. This approach leads to a subclass of event graphs (essentiallyrestricted by the kind of initial marking they can receive) for which the issue ofinitial conditions is transparent.

2.6.3.1 General Observations

The exercise of modeling is more an art than an activity which obeys rigid andprecise rules. For example, the degree of details retained in a model is a matter

nf\ (jf\00000000\JU \JU(a) (b)

Figure 2.32: An alternative model

Page 56: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

92SYNCHRONIZATION AND LINEARITY

1. we first describe the evolution of each type of resource individually;

2. then we describe the mechanism of interaction between resources;

3. finally, we discuss the problem of initialization.

GRAPH THEORY AND PETRI NETS 93

2.6.3.2 State Evolution of Individual Resources

The word 'resource' should be understood in the broadest sense: a machine, a tool,a part, a channel, a transportation link, a position in a storage or in a buffer, etc. areall resources. Of Course, in practice, it is worthwhile modeling a resource explicitlyas long as it is a 'scarce' resource, that is a resource the limited availability of whichmay have some influence on the evolution of the system at some time. The capacityof a buffer may be large enough for the buffer to behave as if it were infinite. Again,it is a matter of feeling to decide whether an explicit model of the finite capacity isa priori needed or not.

The evolution of each resource in the system is modeled by a sequence of'stages'. What is considered a 'stage' is a matter of jUdgment since several consec-utive stages may be aggregated into a single stage. For example, considering theevolution of a part in a workshop, traveling to the next machine and then waitingfor the temperature to be cool enough before entering this next machine may beconsidered a single stage. We assume that

· the nature and the order of the stages experienced by each type of resource

are known in advance;

· for a given resource, every stage is preceded (followed)-if it is not the first(last) stage-by a single other stage.

Consequently, for a given type of resource, if we draw a graph such that nodes(drawn as places in a Petri net) represent stages, and arcs indicate precedence of theupstream stages Over the downstream stages, then this graph is a path (i.e. it hasneither circuits nor branches) and it reflects the total order of stages.

Obviously, in a workshop, this assumes that a 'deterministic scheduling' of op-erations has been defined a priori. For example, a machine is supposed to work ona specified sequence of parts in a specified order, each operation being representedby a particular stage. If the stage 'idle' is possible between two such operations (i.e.the machine may deliver the part it holds without receiving its next Par-hence itstays alone for a while), then additional stages should be introduced in between.Notice that

· the stage 'idle' is not represented by a unique node, but that a node of thistype is introduced if necessary between any two sUccessive operations;

· a machine may be idle, while stil holding the par it was working on, becausethere is no storage available downstream, and the next operation of this ma-chine cannot be undertaken before the downstream machine can absorb thepresent part. In this case, it is not necessary to introduce an additional stage,that is, the stage 'working' and the stage 'waiting for downstream delivery'need not be distinguished.

For a part, it is also assumed that the sequence of machines visited is specified inadvance, but notice that storages visited should be considered as an operation of thesame type as machines visited. Therefore, a storage position, if it is common toseveral types of parts, must know in advance the order in which it will be visitedby these different parts, which is certainly a restrictive constraint in the modelingphase, but this is the price to pay for remaining eventually in the class of eventgraphs.

Finally, the evolution of a resource is simply a path (in other words, this evolutionis represented by a serial automaton). For convenience, each arc wil be 'cut' by abar resembling a transition, which will serve later on for synchronization purposes.Each stage receives a sequence of holding times representing minimal times spentin this stage by the successive resources. For example, waiting in a storage shouldinvolve a minimal time equal to O. At any time, the present stage of a given resourceis represented by a token marking the corresponding place. Transitions representchanges of stages and they are instantaneous.

Resources may enter the system and leave it after a while (nonreusable re-sources) or they may revisit the same stages indefinitely because they are 'recycled'(reusable resources). For example, raw materials come in a workshop and leaveafter a transformation, whereas machines may indefinitely resume their work on thesame repetitive sequences of parts. Sometimes, nonreusable resources are tightly as-sociated with reusable resources so that it is only important to model these reusableresources: for example, parts may be fixed on pallets that are recycled after theparts leave the workshop. For reusable resources, we introduce an additional stagecalled the 'recycling stage', and we put an arc from the last stage (of an elementarysequence) to this recycling stage and another arc from the recycling stage to thefirst stage. Hence we obtain a circuit. Physically, the recycling stage might rep-resent a certain 'reconditioning' operation (possibly involving other resources too),

and therefore it might receive a nonzero holding time (transportation time, set-uptime, etc.). However, it wil be preferable to suppose that the recycling stage of anyresource corresponds to an abstract operation which involves only this resource, andwhich is immediate (holding time 0). The positioning of this recycling stage withrespect to the true reconditioning operation (before or after it) is left to the appraisalof the user in each specific situation. Indeed, each stage along the circuit of thereusable resource where this resource stands alone may be a candidate to play therole of the recycling stage, a remark which should be kept in mind when we speakof canonical initialization later on (this is related to the issue of the point at whichone starts a periodic behavior).

2.6.3.3 Synchronization Mechanism

Any elementary operation may involve only one particular type of resource, or itmay also involve several different resources. For example, a part waiting in a storageinvolves both the part and the storage position (whereas an idle machine involvesonly this machine). It should be realized that, so far, the same physical operation,as long as it involves n different resources simultaneously, has been represented byn different places.

Page 57: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

ITI' !I 'I

94 SYNCHRONIZATION AND LINEARITYGRAPH THEORY AND PETRI NETS 95

If two stages belonging to two distinct resource paths (or circuits) correspond tothe same operation, we must express that these stages are entered and left simulta-neously by the two resources (moreover, the holding times of these stages shouldbe the same). This may be achieved by putting two synchronization circuits, oneconnecting the 'beginning' transitions, the other connecting the 'end' transitions, asindicated in Figure 2.33. In order to comply with the standard event graph repre-sentation, we have put new places-represented here in grey color--ver the arcs of

these circuits. However, these grey places do not represent 'stages' as other placesdo. They are never marked with tokens and they have holding times equal to O.Then, it is realized that these circuits involving no tokens and having a total hold-ing time equal to 0 express simultaneity of events, that is entering or leaving theconsidered stage by anyone of the two resources precedes the same type of eventachieved by the other resource and vice versa.

i

l( \l1\0) 1..,:,,.",.,'

o ..........0

lr°)ti\/**.,.) i: it.) :

"""''''

I,

I,, ,

vÝ/\o 0\/ii, ,, ,Remark 2.86 What we have just done here is nonstandard from the point of view ofPetri net theory, although it is mathematically correct for the purpose of expressingsimultaneity. Indeed, having a live Petri net which includes circuits with no tokensseems to contradict Theorem 2.38. More specifically, every transition having a 'greyplace' upstream (which wil never receive tokens) wil never fire if we stick to thegeneral rule about how transition firings are enabled. We propose the following(tricky) adaptation of this rule to get out of this contradiction: 'in a timed Petri net,a transition may "borrow" tokens to enable its own

firing during a duration of 0 timeunits, that is, provided that it can "return" the same amount of tokens immediately'.This condition is satisfied for transitions preceded and followed by (the same numberof) 'grey places' since tokens may be 'borrowed' in upstream 'grey places' only atthe epoch of firing (since those tokens are then immediately available-holdingtime 0), and, for the same reason, tokens produced in downstream 'grey places'can immediately be 'returned' after firing (they are immediately available whenproduced).

Mathematically, consider the pair of transitions at the left-hand side of Fig-ure 2.33 and let X¡ (k) and Xz (k) denote their respective daters (see Definition 2.57).The 'grey circuit' translates into the following two inequalities:

,,,,

, ,\,

Figure 2.33: Synchronization mechanism Figure 2.34: Alternative representation

of synchronization

The second solution involves the introduction of fake transitions Xl¡ and x~upstream the real transitions to be synchronized. This mechanism is explained byFigure 2.35 with the equations proving that the firing times of Xl and Xz (denotedafter the name of the transitions) are equal.

-----~I ~O ~I------x~~o~x¡x~/O~xz

-----~I ~O ~I------

I I 1X¡ = x¡ E9 Xz =? Xl = XzI ff iXz = X ¡ \J Xz

x¡(k) 2: xz(k) and xz(k) 2: x¡(k) ,Figure 2.35: Another synchronization mechanism

Notice that the holding times of two synchronized stages, which were equal byconstruction, can now be different--.g. one of the two may be taken to be O-sinceonly the greater holding time is important. All the above considerations extend to

the case of n, rather than 2, resources simultaneously. It is realized that, with thisapproach, every transition has as many output arcs as it has input arcs. A problemarises with resources which are physically merged into a single product (assembly)or split up into two or more products (disassembly). That is, the end nodes of aresource path do not correspond to inlet or outlet nodes of the system. There is achoice of considering that a cluster of two resources that enter the system separately.is stil made of two resources traveling together (which amounts to doubling all arcsand places after the assembly operation) or to accept that the number of output arcs

which imply equality: this is exactly what we want and everything is consistent.On the contrary, the reader should think of what happens if one of the holding

times put on 'grey places' is strictly positive and there are stil no tokens in theinitial marking of these places. .To avoid this discussion, two alternative solutions can be adopted. The first one

consists in merging the simultaneous transitions as shown by Figure 2.34, whichremoves the synchronization circuits and the 'grey places'. We then come up witha representation similar to that of Figure 2.32. A further step towards simplificationwould be to merge the places and arcs in between so as to arive at a representationsimilar to that of Figure 2.3 i, but then the resource interpretation would be obscured.

Page 58: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

in r-"l1

~ ! :

96 SYNCHRONIZATION AND LINEARITYGRAPH THEORY AND PETRI NETS

reachability from the canonical initial condition can be stated for all places includedbetween any pair of synchronized (Figure 2.33) or merged (Figure 2.34) transitions.Say there are n such places, then the same number of tokens must mark all theseplaces, say p tokens per place, and there must exist p n-tuples of tokens (with onetoken per place) with the same difference between their holding times and their lagtimes. This assumption that there must exist exactly the same number p of tokensin each of the n places makes this notion of an 'initial condition reachable from thecanonical initial condition' even more restrictive than the notion of a 'compatibleinitial condition' of Definition 2.61.

For example, if we return to the graph of Figure 2.32, with the interpretationof two reusable resources, position (a) corresponds to the canonical initial condi-tion, position (b) is another acceptable initial marking. Suppose now that we addan additional exemplary of the resource represented by the left-hand circuit. Fig-ure 2.36a represents an initial marking which we can interpret, but Figure 2.36bdoes not, although it is perfectly correct from the abstract point of view of eventgraphs. Moreover, it may be noted that the graph of Figure 2.36b is not reducible

97at some transition (representing the beginning of an assembly operation) be less thanthe number of input arcs (which means that a new type of resource starts its life atthat point of the system). Dual considerations apply to the problem of disassembly.

2.6.3.4 Initialization

As already indicated, during the evolution of the system the present stage of eachresource wil be marked on the graph by a token in a certain place along the pathor the circuit of that resource. Two resources of the same type, e.g. two machinesperforming exactly the same sequence of operations, may use the same path orcircuit as long as they never need to be distinguished. For example, a storagewith n positions, and which is dedicated to a single type of stored resource, wilbe represented by a circuit with two stages, 'occupied' and 'available' (the onlydistinguishable stages of a single position), and with n tokens the distribution ofwhich in the circuit indicates how many positions are available at any time. For astorage accommodating several types of resources, we refer the reader to the exampleat the end of this section.

Epochs at which resources move from one stage to the next one wil be givenby the dater attached to the transition in between. We now define a canonicalinitial condition. For reusable resources, it corresponds to all tokens put at thecorresponding recycling stages. As discussed earlier, these recycling stages aresupposed to involve a single type of resource each, and a holding time equal to 0(therefore, it is irrelevant to know when the tokens had been put there). For anynonreusable resource, since it passes through the system, we first complete its pathby adding an inlet transition (upstream from the first place) and an outlet transition(downstream from the last place) so as to attach the epochs of inputs and outputsto these transitions (unless one of these transitions is already represented becausethe resource paricipates in an assembly operation, or because it is issued from adisassembly operation). The canonical initial condition for nonreusable resourcescorresponds to their paths being empty: all tokens must be introduced at the inlettransitions after the origin of time. Observe that the canonical initial condition iscompatible in the sense of Definition 2.61.

From this given canonical initial condition, and given a sequence of epochs at allinput transitions at which tokens are introduced into the system (see Definition 2.78),tokens wil evolve within the system (whereas other tokens wil

leave) accordingto the general rules of timed event graphs, and they wil reach some positions atsome other given epoch. Obviously, all situations thus obtained, which we may call'reachable conditions', are also acceptable 'initial conditions' by changing the originof time to the present time. Such a candidate to play the role of an initial conditionobviously fulfills some constraints (see hereafter), and it is not defined only by thepositions of tokens (called the 'initial marking'): the time already spent by eachtoken of the initial marking in this position before the (new) origin of time is alsopar of the definition of the 'initial condition' (at least for places where the holdingtime is nonzero). Alternatively, the first epoch at which each token of the initialmarking may be consumed must be given: this corresponds to the notion of lag timeintroduced in Definition 2.49. Necessary, but maybe not suffcient, requirements of

(Jf\000 0

\JU(a)

(Jf\000 0

\JU(b)

Figure 2.36: Two plus one resources

to something similar to Figure 2.31.

2.6.3.5 An Example

We consider two types of parts, say . and Q, which can wait in separate buffersof large capacities before being heated individually by a furnace. The furnace dealswith parts. and Q alternately. The parts can then wait in a stove having the roomfor three parts; each one of either type, the purpose being to maintain the temperatureof the pars until they are assembled in pairs (., Q) by a machine. Finally, parsleave the workshop. A part must stay in the furnace if it cannot enter the stove.In the same way, parts can leave the stove in pairs (., Q) only when the assemblymachine can handle them.

Figure 2.37 represents the stage sequences of parts. and Q as vertical paths on

the left-hand and right-hand sides, respectively. In the middle, from top to bottom,the three circuits represent the stage sequences of the furnace, of the stove and of.the machine. Each stage is labeled by a letter and Table 2.1 gives the interpretationof these stages together with their holding times.

Page 59: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

98 SYNCHRONIZATION AND LINEARITY

Table 2.1: An example: stage interpretation

Stage label Stage interpretation Holding timeA Par . waits in buffer 0B Part . stays in furnace (xiC Par . waits in stove 0D Par . is assembled with par Q

(X2E Part Q waits in buffer 0F Part Q stays in furnace (X)G Par Q waits in stove 0H Part Q is assembled with part . (X2I Furnace waits for par of type . 0J Furnace holds par of type . (xiK Furnace waits for par of type Q 0L Furnace holds part of type Q (X) .M One position in stove waits for par of type . 0N One position in stove holds part of type . 00 One position in stove waits for par of type Q 0P One position in stove holds par of type Q 0Q Machine assembles a pair (., Q) (X2R Machine waits for a pair (., Q) 0

The transitions which are synchronized are connected by a dotted line. The

initial marking assumes that the furnace stars with a par . and that two positionsout of the three in the stove accept a par . first.

Figure 2.38 shows the reduced event graph obtained by merging the synchro-

nized transitions and the stages representing the same operation. However, we keepmultiple labels when appropriate so that the order of multiplicity of places betweensynchronized transitions is stil apparent. Single labels on places in circuits indicatepossible recycling stages. Observe that, for any transition, the total number of labelsof places upstream balances the total number of labels of places downstream. In-deed, the Petr net of Figure 2.37 (with transitions connected by dotted lines mergedtogether) is strictly conservative (Definition 2.35) whereas that of Figure 2.38 isconservative (Definition 2.36) with weights (used in that definition) indicated by thenumber of labels.

2.7 NOTES

Graph theory is a standard course in many mathematical curricula. The terminology varies,however. Here we followed the terminology as used in (67) as much as possible. Karp'salgorithm, the subject of §2.3.2, was first published in (73). Since the 1970s, a lot of attentionhas been paid to the theory of Petri nets. This theory has the potential of being suitable as anexcellent modeling aid in many fields of application. Its modeling power is larger than the one

l

GRAPH THEORY AND PETRI NETS 99

ò -: - - - - - - - - - - - - - - - - - - - - - - - - - - - - ~ Ó

~.;...... .;fv1 ~......; ¿i-- ~J\j--iOc ON M 9 00 PO GOi---l----- ---f1-- -------l- tOD Q 0 0R HO:L - - - - - - - - - - - - -u - - - - - - - - - - - - - -l

~ TOA EO\~I K?-/BIO 00 OFL

r~~J(it.t1M9 CNO OGP 00

~\.;C/DHQ 0 0 R~

Figure 2.37: Expanded model Figure 2.38: Reduced model

of automata. If one were to allow inhibitor arcs, see (I), then the modeling power is the sameas that of Turing machines. A 'system theory' including maximization, addition as well asnegation (which is what an inhibitor arc represents), has not yet been developed. An excellentoverview of the theory of Petri nets is given in (96), where also many other references canbe found. The section on timed Petri nets, however, is rather brief in (96). Some material oncycle times can be found in (47) and (115), which is also discussed in Chapter 9. A good,though somewhat dated, introduction to Petri nets is (108). Other sources which contain alot of material on Petri nets are (30) and (29). For a recent discussion on modeling powerrelated to Petri nets, see (82). Section 2.5 on equations for timed Petri nets is mainly basedon (39) for the constant timing case and on (11) for the general case. Equivalence of systemsrepresented by different graphs is also discussed in (84). This reference, however, deals withsystolic systems, in which there is a fixed clock frequency. Some of the results obtained therealso seem plausible within the timed event graph setting. Relationships between graphs andbinary dynamic systems are described in (25).

In (92) a novel scheme, called kanban, is described and analyzed for the coordination oftokens in an event graph. The essence is that the introduction of a new circuit with enoughtokens regulates the 'speed' of the original event graph and it controls the number of tokensin various places.

For a recent development in continuous Petri nets, where the the number of tokens is realrather than integer valued, see (53) and (99). In the latter reference some results given in

Chapter 3 for 'discrete' Petri nets are directly extended to continuous ones.

Page 60: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

- ..

~ ~ (J (D r: ~ ~

~ ~ .. ..

Page 61: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

1

CHAPTER 3i;t:i

Max-Plus Algebra

3.1 INTRODUCTION

In this chapter we systematically revisit the classical algebraic structures used inconventional calculus and we substitute the idempotent semifield lRmax (the set ofreal numbers endowed with the operations max and plus) for the field of scalars.The purpose is to provide the mathematical tools needed to study linear dynamicalsystems in (lRmax)n.

This chapter is divided in three main pars. In the first part we study linearsystems of equations and polynomial functions in lRmax. In the second par weconsider a more advanced topic which can be skipped in a first reading. Thistopic is the problem of the linear closure of lRmax and its consequences for solvingsystems of linear and polynomial equations (the linear closure is the extension ofa set in such a way that any nondegenerated linear equation has one and only onesolution). The third par is concerned with a max-plus extension of the Perron-

Frobenius theory. It gives conditions under which event graphs reach a periodicbehavior and it characterizes their periodicities. It can be seen as a more advancedtopic of the spectral theory of max-plus matrices given in the first part of this chapter.

We first introduce the algebraic structure lRmax and we study its basic properties.

3.1.1 Definitions

Definition 3.1 (Semifield) A semifeld '1 is a set endowed with two operations E9

and 0 such that:

. the operation E9 is associative, commutative and has a zero element c;

. the operation 0 defines a group on 2( ~ '1 \ t E J' it is distributive withrespect to E9 and its identity element e satisfies E 0 e = e 0 E = E.

We say that the semifeld is

. idempotent if the first operation is idempotent, that is, if a E9 a = a, Va E '1;

. commutative if the group is commutative.

Theorem 3.2 The zero element E of an idempotent semifeld is absorbing for thesecond operation, that is E 0 a = a 0 E = E, Va E '1.

Page 62: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

Proof We have that 3.1.2 Notation

MAX-PLUS ALGEBRA

First of all, to emphasize the analogy with conventional calculus, max has beendenoted E9 , and + has been denoted 0. We also introduce the symbol 1 for theconventional - (the inverse operation of + which plays the role of multiplication,that is, the 'division'). Hence alb means a-b. Another notation for alb is thetwo-dimensional display notation

a..b

We wil omit the sign 0 if this does not lead to confusion. To prevent mistakes,we use c and e for the 'zero' and the 'one', that is, the neutral elements of E9 and0, respectively, namely -00 and O. To get the reader acquainted with this newnotation, we propose the following table.

104 SYNCHRONIZATION AND LINEARITY

c=ce=c(cEge)=c2E9c=c2,

and then,

Va E 2(, c = ce = ca-1a = c(a-i E9 c)a = ca-1a E9 c2a = c2a = ca .

.Definition 3.3 (The algebraic structure Jlmax) The symbol Jlmax denotes the setJl u i -oo:¡ with max and + as the two binary operations E9 and 0, respectively.

We call this structure the max-plus algebra. Sometimes this is also called an orderedgroup. We remark that the natural order on Jlmax may be defined using the E9operation

Jlmax notation

2 E9 3

lE92E93E94E95203=5

2 E9 c

c=c02(-1)03

e0332 = 23 = 3 0 3 = 2 0 2 0 2

e = e2 = 2°

(203)1(2 E9 3)

(2 E9 3)3 = 23 E9 33

61eel3N8Ni

a :: b if a E9 b = b .

Definition 3.4 (The algebraic structure i"max) The set Jl U i -oo:¡ u i +oo:¡ en-dowed with the operations max and + as E9 and 0 and with the convention that(-00) + 00 = -00 is denoted i"max. The element +00 is denoted T.

Theorem 3.5 The algebraic structure Jlmax is an idempotent commutative semifeld.

The proof is straightforward. If we compare the properties of E9 and 0 with thoseof + and x, we see that:

. we have lost the symmetry of addition (for a given a, an element b does notexist such that max(b, a) = -00 whenever a #- -(0);

Conventional notationmax(2,3)

max(1,2,3,4,5)2+ 3

max(2, -00)

-00 + 2

-1 +30+ 3

3x2=2x3=3+3=2+2+2Ox2=2xO

(2 + 3) - max(2, 3)

3 x max(2, 3) = max(3 x 2,3 x 3)6 - 0

0-38/215/5

105

3

5

5

2-00

23

6o296

-343

. we have gained the idempotency of addition;There is no distinction, hence there are risks of confusion, between the

two systems of notation as far as the power operation is concerned. As ageneral rule, a formula is written in one system of notation. Therefore if,in a formula, an operator of the max-plus algebra appears explicitly, thenusually all the operators of this formula are max-plus operators.

. there are no zero divisors in Jlmax (a E9 b = -00 '* a = -00 or b = -(0).

If we try to make some algebraic calculations in this structure, we soon realize thatidempotency is as useful as the existence of a symmetric element in the simplificationof formulæ. For example, the analogue of the binomial formula 3.1.3 The min Operation in the Max-Plus Algebra

I(a + b)n = ( ~ ) an + ( 7 ) an-1b +... + ( ) abn- i + ( ~ ) bn

It is possible to derive the min operation from the two operations 0 and E9 asfollows:

nn - 1

is nmax(a,b) = max(na,nb), which is much simpler. On the other hand, we now

face the difficulty that the max operation is no longer cancellative, e.g. max( a, b) = bdoes not imply that a = -00.

min(a, b) = . ab b' .a E9

Let us now prove the classical properties of the min by pure rational calculations inthe max-plus algebra.

Page 63: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

106 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 107

. - min(a, b) = max(-a, -b):

e aE9b e e~ = .- = c- E9 r-ab ab b a.-a E9 b

. - max(a, b) = min( -a, -b):

3.2.1 Linear and Affine Scalar Functions

Definition 3.6 (Linear function) The function j : lRmax -- lRmax is linear if it sat-isfies

j ( c) = c 0 j ( e ), i; c E lRmax .

ee .-b.- = ~ =aE9b aE9b.-

ab

e er- 0 c-a b,, e er- E9 c-a b

Thus any linear function is of the form y = j(c) = a 0 c, where a = j(e). The

graph of such a function consists of a straight line with slope equal to one and whichintersects the y-axis at a (see Figure 3.1).

Definition 3.7 (Affine function) Thefunction j: lRmax -- lRmax,j(c) = acE9b,a ElRmax, b E lRmax is called affne.

. min(a,min(b,c)) = min(min(a,b),c):

bca .-

b E9 c~a E9 .-

b E9 c

and the symmetry of the formula with respect to a, band c proves the result;

Observe that, as usual, b = j (E) and a = limc-+oo j (c) f c, but here the limit isreached for a finite value of x (see Figure 3.2).

abc

ab E9 ac E9 bc

! i,~

Ji

iij'I,:;:

:~

II!""

;

II

Iiiiil

. max(c, min(a, b)) = min(max(c, a), max(c, b)):

f c E9 ~ = ( c E9 a) ( c E9 b) , ì. ç; f ,ca E9 cb E9 ab, = (c E9 a) ( c E9 b) , ì.ì. aE9b (cE9a)E9(cE9b)f ì. aE9b aE9bE9c f

ç; Hca E9 cb E9 ab)(a E9 b E9 c) = (c E9 a)(c E9 b)(a E9 b)) .To check the last identity, we consider the expressions in both sides as poly-nomials in c and we first remark that the coefficient of c2, namely a E9 b, is thesamein both sides. The coefficient of co, namely ab(aE9b), also is the same inboth sides. Now, considering the coefficient of c, it is equal to (a E9 b)2 E9 ab inthe left -hand side, and to (a E9 b? in the right -hand side: these two expressionsare clearly always equal.

. min(c, max(a, b)) = max(min(c, a), min(c, b)):

f c( a E9 b) ca cb ì. f a E9 b a b ì.lCE9aE9b' = ~ E9 ~f ç; lCE9aE9b' = ~ E9 ~f

a

o o

Figure 3.1: A linear function Figure 3.2: An affne function

In the primary school, the first algebraic problem that we have to solve is to findthe solution of a scalar affine equation.

Definition 3.8 (Affine equation) The general scalar affne equation is

ax E9 b = a' x E9 b' . (3.1 )

The latter identity is amenable to the same verification as earlier.Indeed, since E9 has no inverse, Equation (3.1) cannot be reduced to the usual formax E9 b = E, which motivates the definition above.

3.2 MATRICES IN JRmax Theorem 3.9 The solution of the general scalar affne equation is obtained as fol-lows:

In this section we are mainly concerned with systems of linear equations. There aretwo kinds of linear systems in lRmax for which we are able to compute solutions:x = Ax E9 b and Ax = b (the general system being Ax E9 b = ex E9 d). We alsostudy the spectral theory of matrices. There exist good notions of eigenvalue andeigenvector but there is often only one eigenvalue: this occurs when the precedencegraph associated with the matrix is strongly connected (see Theorem 2.14).

· if((a' .c a) and (b.c b')) or ((a.c a') and (b'.c b)) (3.2)

hold true, then the solution is unique and it is given by x = (b E9 b')f (a E9 a')..

. if a =I a', b =J b', and (3.2) does not hold, no solutions exist in lRmax"

Page 64: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

108 SYNCHRONIZATION AND LINEARITY

. if a = a' and b f= b', the solution is non unique and all solutions are given by

x ~ (b E9 b')fa;

. if a f= a' and b = b', the solution is nonunique and all solutions are given by

x:: bf(a E9 a');

. if a = a' and b = b', all x E JR are solutions.

The proof is straightforward from the geometric interpretation of affine equations asdepicted in Figure 3.3.

JRmax

o

Figure 3.3: An affne equation

In practice, it is better to simplify (3.1) before solving it. For example, if a? a'and b' ? b, then ax E9 b = a' x E9 b' ~ ax = b'. Let us give all different kinds of

simplified equations that may come up.

Definition 3.10 (Canonical form of an affine equation) An affne equation is incanonical form if it is in one of the simplifed forms:

. ax = b;

. ax E9 b = e;

. ax E9 b = ax;

. ax E9 b = b.

3.2.2 Structures

..1'

iii

Ii

The moduloid structure is a kind of module structure which, in turn, is a kind ofvector space, that is, a set of vectors with an internal operation and an external

operation defined over an idempotent semi field.

Definition 3.11 (Moduloid) A moduloid:: over an idempotent semifeld '1 (withoperations E9 and 0, zero element e and identity element e) is a set endowed with

. an internal operation also denoted E9 with a zero element also denoted e;

MAX-PLUS ALGEBRA 109

. an external operation defined on '1 x :: with values in :: indicated by the

simple juxtaposition of the scalar and vector symbols;

which satisfies the following properties:

. E9 is associative, commutative;

. a(x E9 y) = ax E9 ay;

· (aE9ß)x= axE9ßx;

. a(ßx) = (aß)x;

. ex = x;

. eX = e;

for all a, ß E '1 and all x, y E ::.

We will only be concerned with some special cases of such a structure.

Example 3.12 (JRmax)n is a moduloid over JRmax. Its zero element is (e,..., e)'. .

I

i

Other examples of moduloids wil be presented later on.

Definition 3.13 (Idempotent algebra) A moduloid with an additional internal op-eration also denoted 0 is called an idempotent algebra if 0 is associative, if it hasan identity element also denoted e, and if it is distributive with respect to E9.

This idempotent algebra is the main structure in which the forthcoming system theoryis going to be developed.

Example 3.14 Let (JRma~)nxn be the set of n x n matrices with coeffcients in JRmaxendowed with the following two internal operations:

. the componentwise addition denoted E9;

. the matrix multiplication already used in Chapters 1 and 2 denoted 0:

n

(A 0 B)ij = EB Aik 0 Bkjk=!

and the external operation:

. 'Va E JRmax, 'VA E (JRmax)nxn, aA = (aA;j).

The set (JRmax)nxn is an idempotent algebra with

. the zero matrix, again denoted e, which has all its entries equal to e;

. the identity matrix, again denoted e, which has the diagonal entries equal to

e and the other entries equal to e. .

Page 65: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

110 SYNCHRONIZATION AND LINEARITY

3.2.3 Systems of Linear Equations in (lRmax)n

In this subsection we are mainly interested in systems of linear equations. To definesuch systems, we use matrix notation. A linear mapping (JRmax)n -- (I!lmax)n will berepresented by a matrix as it was done in the previous chapters. With the max-plusalgebra, the general system of equations is

Ax E9 b= Cx E9 d ,

where A and C are n x n matrices and band d are n-vectors. This system can beput in canonical form in the same way as we have done in the scalar case.

Definition 3.15 (Canonical form of a system of affine equations) The systemAx E9 b = Cx E9 d is said to be in canonical form if A, C, b, and d satisfy

. Cij = C if Aij / Cij, and Aij = C if Aij ~ Cij;

. di = C if bi / dù and bi = C if bi ~ di.

Example 3.16 Consider the system

(~ ;) ( ~~ ) E9 ( ~ ) = ( 1 ) ( ~~ ) E9 ( ; ) ,

which can be simplified as follows:

(~ ;) ( ~~ ) E9 ( ~ ) = (1 ~) ( ~~ ) E9 ( ~ ) ,

which implies

2Xi E9 I = 4x i 1. * 4x i = I x i E9 3 * 4x i = 3 * X I = -1 * Xi = 1 .2Xi = IXi E9 3 f

This system has a solution. In general, a linear system may or may not have asolution. Moreover, even if a solution exists, it may be nonunique. .

There are two classes of linear systems for which we have a satisfactory theory,namely,

. x = Ax E9 b;I./"!

. Ax = b.

Let us study the former case first.

I

,I'i

Ii

'i

II

i:(

I

I

'()

I

!i

i

MAX-PLUS ALGEBRA 111

3.2 .3.1 Solution of x = Ax EB b

Theorem 3.17 If there are only circuits of nonpositive weight in G(A), there is asolution to x = Ax E9 b which is given by x = A*b. Moreover, if the circuit weightsare negative, the solution is unique.

The reader should recall the definition of A * as given by (1.22).

Proof If A * b does exist, it is a solution; as a matter of fact,

A(A*b) E9 b = (e E9 AA*)b = A*b .

Existence of A*b. The meaning of (A*)ij is the maximum weight of all paths ofany length from j to i. Thus, a necessar and sufficient condition for theexistence of (A *)ij is that no strongly connected components of G (A) have acircuit with positive weight. Otherwise, there would exist a path from j to iof arbitrarily large weight for all j and i belonging to the strongly connectedcomponent which includes the circuit of positive weight (by traversing thiscircuit a sufficient number of times).

Uniqueness of the solution. Suppose that x is a solution of x = Ax E9 b. Then xsatisfies

x b E9 Ab E9 A2x ,

b E9 Ab E9 ... E9 Ak-Ib E9 Akx (3.3)x

and thus x 2' A * b. Moreover, if all the circuits of the graph have negativeweights, then Ak -- c when k -- 00. Indeed, the entries of Ak are theweights of the paths of length k which necessarily traverse some circuits of Aa number of times going to 00 with k, but the weights of these circuits are allnegative. Using this property in Equation (3.3) for k large enough, we obtainthat x = A*b. .

Remark 3.18 If the maximum circuit weight is zero, a solution does exist, but thereis no uniqueness anymore. For example, the equation x = x E9 b admits the solutionx = a*b = b but all x / b are solutions too. .

Example 3.19 Consider the two-dimensional equation

( -1x = -3 )XE9(~).

2-1

Then,

b = ( ~ ), Ab = ( 1 ), A2b = ( i ), A3b = ( ~ ), A4b = ( ; ) . .. .

Thus,

x= (~) E9 (1 ) E9 (~) E9 (;) E9... = (~).

This is the unique solution. .

Page 66: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

112 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 113

Theorem 3.20 If G(A) has no circuit with positive weight, then

A*=eE9AE9...E9An-l,

Example 3.22 Let us compute the greatest subsolution of the following equality:

where n is the dimension of matrix A. (~ ;) ( ~~ ) = ( ~ ) .

According to the preceding considerations, let us first computeProof All the paths of length greater than or equal to n are necessarily made upof a circuit and of a path with length strictly less than n. Therefore, because theweights of circuits are nonpositive by assumption, we have

(efb)A=(-6 -7)(~ ;)=(-3 -2).

\1m ?: n A m ~ e E9 . . . E9 A n- I Then the greatest subsolution is (xi, X2) = (3,2); indeed,

. (~ ;)(~)=(;)~(~).Returning to Example 3.19, we remark that A2b, A3b,... are less than b E9 Ab. It is easily verified that the second inequality would not be satisfied if we increase

Xl and/or X2. Therefore, the first inequality cannot be reduced to an equality. .

3.2.3.2 Solution of Ax = b

The second class of linear systems for which we can obtain a general result consistsof the systems Ax = b. However, we must first consider the problem in m:max ratherthan in Llmax, and second, we must somewhat weaken the notion of 'solution'. Asubsolution of Ax = b is an x which satisfies Ax ~ b, where the order relation on

the vectors can also be defined by x ~ y if x E9 y = y.

Theorem 3.21 Given an n x n matrix A and an n-vector b with entries in m:max,the greatest subsolution of Ax = b exists and is given by

-Xj = max( -bi + Aij)i

3.2.4 Spectral Theory of Matrices

Given a matrix A with entries in Llmax, we consider the problem of existence ofeigenvalues and eigenvectors, that is, the existence of (nonzero) À and x such that

Ax = Àx . (3.4)

The main result is as follows.

Theorem 3.23 If A is irreducible, or equivalently if G(A) is strongly connected,there exists one and only one eigenvalue (but possibly several eigenvectors). Thiseigenvalue is equal to the maximum cycle mean of the graph (see § 2.3.2):

For reasons that wil become apparent in §4.4.4 and §4.6.2, the vector form of thisformula can be written efx = (efb)A.

Proof We have that

, 1(lw/I = mtx ~ '

where ( ranges over the set of circuits of G(A).

(Ax';b) ~ iEjA,jXj';b" Vi)

Ç? tXj ~ bi - Aij, \li,j)Ç? ~ Xj ~ min (bi - Aij) , \lj l

Ç? ~-x. /max(-b.+A-) \I)"lJ -. i iJ' .i

Proof

Existence of x and À. Consider matrix B = AfÀ ~ (efÀ)A, where À =max( lelw/leli. The maximum circuit weight of G(B) is e. Hence B*and B+ = BB* exist. Matrix B+ has some columns with diagonal en-tries equal to e. To prove this claim, pick a node k of a circuit ç such thatç E argmax( 1(lw/leli. The maximum weight of paths from k to k is e. There-fore we have e = Btk. Let B.k denote the k-th column of B. Then, since,generally speaking, B+ = BB* and B* = e E9 B+ (e the identity matrix), forthat k,

Bt = B.'k =; BB'k = B.t = B.*k =; AB'k = ÀB'k .

Hence x = B'k = Bt is an eigenvector of A corresponding to the eigenvalueÀ. The set of nodes of G(A) corresponding to nonzero entries of x is calledthe support of x.

~ Conversely, it can be checked similarly that the vector x defined by -Xj

maXi ( -bi + Aij) , \I j, is a subsolution. Therefore, it is the greatest one. .

As a consequence, in order to attempt to solve the system Ax = b, we may firstcompute its greatest sub solution and then check by inspection whether it satisfiesthe equality.

Page 67: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

114 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 115

Graph interpretation of À. If À satisfies Equation (3.4), there exists a nonzero

component of x, say Xii. Then we have (Ax )ii = ÀXi¡ and there exists anindex i2 such that Ai¡izXii = ÀXil. Hence Xiz t= c and Aiiz t= c. We canrepeat this argument and obtain a sequence r ij Ì such that Aij_i ij Xij = ÀXij_l'Xij t= c and Aij_iij t= c. At some stage we must reach an index ii alreadyencountered in the sequence since the number of nodes is finite. Therefore, weobtain a circuit ß = (ii,im,...,ii+i,ii). By multiplication along this circuit,

we obtain

The two eigenvectors are obviously not 'proportional'. .Example 3.26 (A not irreducible)

. The following example is a trivial counterexample to the uniqueness of theeigenvalue when G(A) is not connected:

(~ ~)(:)=1(:), (~ ~)(:)=2(:).A A A \m-l+liiii+! ii+1ii+2'" imi1xil+! Xil+2 ... XimXil = /\ XiiXil+1 ... XZm .. In the following example G(A) is connected but not strongly connected. Nev-

ertheless there is only one eigenvalue:Since Xij t= c for all ij, we may simplify the equation above which shows thatÀm-I+l is the weight of the circuit of length m - L + 1, or, otherwise stated,À is the average weight of circuit ß. Observe that this part of the proof didnot use the irreducibility assumption.

If A is irreducible, all the components of x are different from c. Suppose thatthe support of x does not cover the whole graph. Then, there are arcs goingfrom the support of x to other nodes because the graph G(A) has only onestrongly connected component. Therefore, the support of Ax is larger thanthe support of x, which contradicts Equation (3.4).

Uniqueness in the irreducible case. Consider any circuit "f = (ii,...,ip,ii) such

that its nodes belong to the support of x (here any node of G(A)). We have

(~ :)(:)=1(:),but

(~ :)(~)=À(~)has no solutions because the second equation implies À = e, and then the firstequation has no solutions for the unknown a.

. In the following example G(A) is connected but not strongly connected andthere are two eigenvalues:

Aizii Xii :: ÀXiz , Aipip_IXip_1 :: ÀXip' Ai¡ipXip:: ÀXi¡ .

(: ~)(:)=e(:), (: ~)(~)=1(~).Hence, by the same argument as in the paragraph on the graph interpretationof À, we see that À is greater than the average weight of "f. Therefore À is

the maximum cycle mean and thus it is unique. . .It is important to understand the role of the support of x in the previous proof. IfG(A) is not strongly connected, the support of x is not necessarly the whole set ofnodes and, in general, there is no unique eigenvalue (see Example 3.26 below).

More generally, consider the block triangular matrix

F=(~ ~),Remark 3.24 The par of the proof on the graph interpretation of À indeed showedthat, for a general matrix A, any eigenvalue is equal to some cycle mean. Thereforethe maximum cycle mean is equal to the maximum eigenvalue of the matrix. .

where G(A) and G(C) are strongly connected, and G(C) is downstream of G(A).Let ÀA and Àc, be the eigenvalues of blocks A and C, respectively, and let XA andXc be the corresponding eigenvectors. Observe that (c xc) i is an eigenvector

of F for the eigenvalue Àc. In addition, if ÀA :; Àc, the expression (CfÀA)* is

well-defined. The vectorExample 3.25 (Nonunique eigenvector) With the only assumption of Theorem 3.23on irreducibility, the uniqueness of the eigenvector is not guaranteed as is shown bythe following example:

(~ ~) ( _~ ) = ( ~ ) = 1 ( _~ ) ,( (CfÀA)*(~fÀA)XA )

( ~

e ),( -1e)=(~)=l( -1e ).

is an eigenvector of F for the eigenvalue ÀA. In conclusion, F has two eigenvaluesif the upstream m.s.c.s. is 'slower' than the downstream one. Clearly this kind ofresult can be generalized to a decomposition into an arbitrary number of blocks.This generalization wil not be considered here (see (62)).

and

Page 68: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

116 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 117

3.2.5 Application to Event Graphs

Consider an autonomous event graph with n transitions, that is, an event graphwithout sources, with constant holding times and zero firing times. In §2.5.2 wesaw that it can be modeled by

M

x(k) = EBA(i)x(k - i) ,i=O

(3.5)

is given, the arc between a pair of successive nodes (a, b) is selected by the argumenti À (a, b) of the maXi which is implicit in the expression of (B ()\) ha. If this i À (a, b)is not iinique, it does not matter which one is selected since any choice leads tothe same weight. Therefore, the set of circuits of G (B (À)) is a subset of the setof circuits of the original graph (a circuit of the original graph can be specified bya given sequence of nodes and by a mapping (a, b) f- i(a, b) in order to specifyone of the possible parallel arcs between nodes a and b). The set of circuits ofG (B (À)) is thus changing with À. However, for any given value of À, if we areonly interested in the maximum circuit weight of G(B(À)) (or in the maximumcycle mean, assuming that the length of a circuit is defined as the number of arcs inG(B(À)), the maximum can be taken over the whole set of circuits of the originalgraph (this set is independent of À). Indeed, the additional circuits thus considereddo not contribute to the maximum since they correspond to choices of i(a, b) whichare not optimal. .

where the A(i) are n x n matrices with entries in Ilmax. We assume that the event

graph (in which transitions are viewed as the nodes and places as the arcs) is stronglyconnected. In §2.5.4, it was shown that an equation in the standard form

x(k + 1) = Ax(k) (3.6)

can also describe the same physical system. A new event graph (with a differentnumber of transitions in general) can be associated with (3.6). In this new eventgraph, each place has exactly one token in the initial marking. Therefore, in thisgraph, the length of a circuit or path can either be defined as the total number ofarcs, or as the total number of tokens in the initial marking along this circuit or path.

We refer the reader to the transformations explained in §2.5.2 to §2.5.4 to seethat some transitions in the two graphs can be identified to each other and that thecircuits are in one-to-one correspondence. Since the original event graph is assumedto be strongly connected, the new event graph can also be assumed to be stronglyconnected, provided unnecessary transitions (not involved in circuits) be canceled.Then A is irreducible. Hence there exists a unique eigenvalue À, and at least oneeigenvector x. By staring the recurrence in (3.6) with the initial value x(O) = X,we obtain that x(k) = Àkx for all k in n Therefore, a token leaves each transition

every À units of time, or, otherwise stated, the throughput of each transition is 1 I À.It was shown that À can be evaluated as the maximum cycle mean of G (A), that

is, as the maximum ratio 'weight divided by length' over all the circuits of G (A).The purpose of the following theorem is to show that À can also be evaluated as thesame maximum ratio over the circuits of the original graph, provided the length of anarc be understood as the number of tokens in the initial marking of the correspondingplace (the weight is stil defined as the holding time).

Let us return to (3.5). The graph G(A(i)) describes the subgraph of the originalgraph obtained by retaining only the arcs corresponding to places marked withi tokens. Since A( i) is an n x n matrix, all original nodes are retained in this

subgraph which is however not necessarily connected. Consider the following n x nmatrix:

Theorem 3.28 We assume that

1. G(B(e)) is strongly connected;

2. G(A(O)) has circuits of negative weight only;

3. there exists at least one circuit of G (B (À)) containing one token.

Then, there exist a vector x and a unique scalar À satisfying x = B(À)x. The graphinterpretation of À is

\ 1(lw/\ = mlx -i ,

where ( ranges over the set of circuits of the original event graph and 1(11 denotes

the number of tokens in circuit (.

(3.7)

Proof To solve the equation x = B(À)x, we must find À and x such that eis an eigenvalue of the matrix B(À). The graph G(B(e)) being strongly con-nected, G(B(À)) is also strongly connected for any real value of À and thereforeB(À) admits a unique eigenvalue A(À). Owing to the graph interpretation of A(À),A(À) = max( 1(lw/l(I" where ( ranges over the set of circuits of G(B(À)). How-ever, Remark 3.27 showed that we can as well consider that ( ranges over the setof circuits of the original graph. Hence, in conventional notation, we have

A(À) mlx (i~ii L (B(À))ba)

(a,b)E(

max (_ili L max ((A(i)ha - i x À))( ( I iE(l,...,M)

(a,b)E(

max (-I 11 max L ((A(i(a, b))ba - i(a, b) x À)) .( ( I ,(a,b) (a,b)E(

(3.8)

M

B(À) ~ EB À-iA(i) ,i=O

where À is any real number.

Remark 3.27 For a given value of À, a circuit of B(À) can be defined by a sequenceof nodes (in which the last node equals the first). Indeed, once this sequence of nodes

Page 69: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

118 SYNCHRONIZATION AND LINEARITY

If we assume that there exists a À such that A(À) = e = 0, then, for any circuit ( ofthe original graph, and thus for any mapping i(.,.) which completes the specificationof the circuit, we have

À? ¿(a,b)E((A(i(a, b)))ba- ¿(a,b)E( i(a, b) ,

and the equality is obtained for some circuit (. This justifies the interpretation (3.7)of À.

Let us now prove that A(À) = e has a unique solution. Because of (3.8), andsince, according to Remark 3.27, the mappings i(.,.) can be viewed as ranging ina set independent of À, A(.) is the upper hull of a collection of affine functions (ofÀ). Each affine function has a nonpositive slope which, in absolute value, equals thenumber of tokens in a circuit divided by the number of arcs in the circuit. Therefore,A is a nonincreasing function of À. Moreover, due to the third assumption of thetheorem, there is at least one strictly negative slope. Hence lim.x__-oo A(À) = +00.On the other hand, owing to the second assumption, and since the affine functionswith zero slope stem necessarly from the circuits of A(O), lim.x__+oo A(À) ~ O.

Finally A is a convex nonincreasing function which decreases from +00 to a strictlynegative value, and thus its graph crosses the x-axis at a single point. .

It is easy to see that if we star the recurrence (3.5) with x(O) = x, x(I)À 0 x,...,x(M) = Àlv 0 x, then x(k) = Àk 0 x for all k. Hence I/À is thethroughput of the system at the periodic regime. At the end of this chapter, we wilgive conditions under which this regime is asymptotically reached, and conditionsunder which it is reached after a finite time, whatever the initial condition is.

3.3 SCALAR FUNCTIONS IN IRmax

In this section we discuss nonlinear real-valued functions of one real varable, con-sidered as mappings from Jæmax into Jæmax. We classify them in polynomial, rationaland algebraic functions in the max-plus algebra sense.

3.3.1 Polynomial Functions P (IRmax)

Polynomial functions are a subset of piecewise linear functions (in the conventionalsense) for which we have the analogue of the fundamental theorem of algebra. Thisset is not isomorphic to the set of formal polynomials of Jæmax, that is, the set offinite sequences endowed with a product which is the sup-convolution of sequences.

3.3.1.1 Formal Polynomials and Polynomial Functions

Definition 3.29 (Formal polynomials) We consider the set of finite real sequencesof any length

p=(p(k),...,p(i)...p(n)), k,i,nEN, p(i)EJæmax.

MAX-PLUS ALGEBRA 119

If the extreme values k and n are such that p( k) and p( n) are diferent from E:, then

val(p) ~f k is called the valuation of p, and deg(p) ~ n is called the degree of p.This set is endowed with the following two internal operations:

. componentwise addition E9;

. sup-convolution 0 of sequences, that is,

(p 0 q)() ~ EB p( i)q(j) ,

i+j=lval(p)$iSdeg(p)val(q)$j$deg(q)

and with the following external operation involving scalars in Jæmax:

. multiplication of all the elements of the sequence p by the same scalar ofJæmax,

We thus define Jæmax b J which is called the set of formal polynomials.

Note that if the polynomial 'l is defined by

k =re ifk=I;'l() 1. E: otherwise,

then any polynomial of Jæmax bJ can be written as p = EB~=k p(ihl.

Let us give a list of definitions related to the notion of formal polynomials.

Definition 3.30

Polynomial functions: associated with a formal polynomial p, we define the poly-nomial function by

p: Jæmax -- Jæmax, c f- p(c) = p(k)ck E9 ... E9 p(n)cn

The set of polynomial functions is denoted P (Jæmax).

Support: the support supp(p) is the set of indices of the nonzero elements of p,that is, supp(p) = ti I k:: i:: n,p(i) .¡ E:f.

Monomial: a formal polynomial reduced to a sequence of one element is called amonomiall.

Head monomial: the monomial of highest degree one can extract from a polynomialp, that is p(nhn, is called the head monomiaL.

Tail monomial: the monomial of lowest degree out of p, that is, p(khk, is calledthe tail monomiaL.

i We do not to make the distinction between formal monomials and monomial functions because, .

unlike polynomials-see Remark 3.34 below-a formal monomial is in one-to-one correspondence withits associated function.

Page 70: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

120 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 121

p( i) =j c, Vi: k :: i :: n

Full Support: we say that a formal polynomial has a full support if

The following two theorems are obvious.

Theorem 3.31 The set offormal polynomials ~maxbJ is an idempotent algebra.

Remark 3.32 Because we can identify scalars with monomials of degree 0, thisidempotent algebra can be viewed as the idempotent semiring obtained by consid-ering the two internal operations only, since the external multiplication by a scalaris amenable to the internal multiplication by a monomiaL. .

Figure 3.4: The graph of y = (-1)2 EE Ie EE 2 Figure 3.5: The graph of y = (e EE 1)2

Theorem 3.33 The set of polynomial functions P (IRmax) endowed with the two in-ternal operations:

. pointwise addition denoted E9, that is, (pE9 q)(e) ~ p(e) E9 q(e);

. pointwise multiplication denoted 0, that is, (p0 q)(e) ~ p(e) 0 q(e) ,

Unlike in conventional algebra, the evaluation homomorphism is not a one-to-onecorrespondence, as shown in Remark 3.34. Morè precisely, it is surjective but notinjective. This is why it is important to distinguish between formal objects and theirassociated numerical functions.

. (bj)(e) ~ b 0 p(e),

Remark 3.36 The mapping r is in fact closely related to the Fenchel transform(58). In convexity theory (119), with a numerical function f over a Hilbert spaceV, the Fenchel transform re associates a numerical function re(J) over the dual

Hilbert space V' as follows:

and the external operation over ~max X P(~max), namely,

is an idempotent algebra. VeEV', ¡re(J)J(e)=sup((e,z)-f(z)),zEV

The same remark as above applies to this idempotent algebra too.Polynomial functions are convex piecewise linear integer-sloped non decreasing

functions (see Figure 3.4). Indeed the monomial p(i)d is nothing but the conven-tional affine function ie + p(i). Owing to the meaning of addition of monomials,polynomial functions are thus upper hulls of such affine functions.

where (-.) denotes the duality product over V' x V. If we consider the formal

polynomial p as a function from I\ into ~max, p : I f- p(l) (the domain of whichcan be extended to the whole I\ by setting p( I) = c if I .: val(p) or I ? deg(p)),

then,

p(e) = max(le + p(l)) = re( -p)(e) .lEN (3.9)

Remark 3.34 There is no one-to-one correspondence between formal polynomialsand polynomial functions. For example,

.Ve, e2 E9 2 = (e E9 1)2 = e2 E9 Ie E9 2

Before studying the properties of r and the equivalence relation it induces in~max b J, let us first give some terminology related to convexity that we wil use lateron.

The monomial Ie is dominated by e2 E9 2. In other words, Ie does not contribute tothe graph of e2 E9leE9 2 (see Figure 3.5), and thus, two different formal polynomialsare associated with the same function. .

Definition 3.37

The following lemma should be obvious.

Lemma 3.35 (Evaluation homomorphism) Consider the mapping r : ~maxbJ --P(~max),P f- p. Then, r is a homomorphism between the algebraic structures

defined in Theorems 3.31 and 3.33. 1t will be referred to as the evaluation homo-morphism.

Convex set in a disconnected domain: we say that a subset FeE = I\ x ~ is

convex if,for all J. E ¡O, lJ andfor all x, y E F for which J.X + (1- J.)y E E,it follows that J.X + (1 - J.)y E F.

Hypograph and epigraph of a real function f : X --~: these are the sets de-fined respectively by

hypo(J) ~ t(x, y) I x E X, Y E ~, Y :: f(xn ,

Page 71: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

122 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 123

epi(f) ~ Hx, y) I x E X, Y E JR, y 2' j(xn This shows that p~ belongs to the same equivalence class as p and that it isgreater than any such p, hence it is the maximum element in this equivalenceclass.Convex (concave) mapping: a function j : X -- JR is convex (respectively con-

cave) if its epigraph (respectively its hypograph) is convex.

Extremal point of a convex set F: it is a point which is not a convex combinationof two other distinct points of F.

On the other hand, combining (3.11) with (3.9), we get

Theorem 3.38 Consider the equivalence relation

p~(l) = min (max (me + p(m)) -ie)cEJæm.. mEN

Vp,q E JRmaxbJ, p'l q ~ p= q~ q E r-1 (P)

1. With a given p E JRmax b J, we associate two other elements of JRmax b J denoted

p~ and pt such that, for alll E 1',

By choosing particular value m = l, it is shown that p~ 2' p. Since r is a

homomorphism, it preserves the order, and thus ;l 2' p. But, if we combine

(3.9) (written for p~) with (3.11), we get

p~(l ~ max(¡.p(i) + (1 - ¡.)p(j))O$li::1i.jEN

subject to L = ¡.i + (1 - ¡.)j(3.10)

;l(e) = max (le + min (p(e/) -lei))IE 1' c' EJæm..

p~(l ~ min (p(e) -le)cElÆmax

(3.11 )

By picking the paricular value ¿ = e, it is shown that p~ :: p. Hence, we

have proved that ;l = p and that p~ 2' p. Therefore p~ is the maximum

element in the equivalence class of p. Since the maximum element is unique

(see § 4.3.1), it follows that p~ = pt

From (3.11), it is apparent that p~ is concave as the lower hull of a family ofaffine functions. Hence, since it is greater than p, it is greater than its concaveupper hull, but (3.10) shows that indeed it coincides with this hull.

Then p~ = p~ (denoted simply p") and p" belongs to the same equivalenceclass as p of which it is the maximum element. The mapping ll- p"(l) is theconcave upper hull of ll- p(l). Hence hypo (p") is convex.

2. Let now pO E JRmaxbJ be obtained from p by canceling the monomial~ of p

which do not correspond to extremal points of hypo (p"). Then pO belongs to

the same equivalence class as p of which it is the minimum element.

3. Two members p and q of the same equivalence class have the same degreeand valuation. Moreover p" = q" and pD = qO.

2. It is now clear that the equivalence class of p can be characterized by p",

or equivalently by its hypograph which is a convex set. Since a convex setis fully characterized by the collection of its extreme points, this collectionis another characterization of the class. Since pO has precisely been definedfrom this collection of extreme points, it is clearly an element of the sameclass and the minimum one (dropping any further monomial would changethe collection of extreme points and thus the equivalence class).

3. In particular, the head and tail monomials of a given p correspond to membersof the collection of extreme points. Therefore, all elements of an equivalenceclass have the same degree and valuation. .

Proof

1. Using (3.10) with the paricular values ¡. = 1, hence L = i, we first provethat p~ 2' p for the pointwise conventional order (which is also the naturalorder associated with the addition in JRmaxbj). Combining (3.9) (written for

p~) with (3.10), we obtain

~(e) max(le+ max. (¡.P(i)+(I-¡.)P(j)))i O:S¡.:SL, i,JEN

subject to L = ¡.i + (1 - ¡.)j

max (¡.max (ie + p(i)) + (1- ¡.) max (Je + p(j)))O:S¡.:S i i Jmax (¡.p(e) + (1 - ¡.)p(e))

O:S¡.:S i

p( c) .

Definition 3.39 (Canonical forms of polynomial functions) According to the pre-vious theorem, we may call p" and L the concavified polynomial and the skeletonof p, respectively.

. The skeleton pO is also called the minimum canonical form of the polynomialfunction p;

. the concavifed polynomial p" is also called the maximum canonical form ofp.

Page 72: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

124 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 125

Figure 3.6 ilustrates these notions. It should be clear that necessarily p~ has full

support.

Example 3.40 For p = "12 E9 "I E9 2, we have pD = "12 E9 2. For p = "13 E9 3, we have

p~ = "13 E9 1"12 E9 2"1 E9 3. .. P

pD

~maxo p~

Lemma 3.41 A formal polynomial p of valuation k and degree n is a maximalcanonical form of a polynomial function p, that is, p = p~, if and only if p has fullsupport (hence p(l) i= E, for L = k, . . . , nY, and

p(n -1), 2: ?\n - ~)" 2:...:;, ~(k) .,' (3.12)

Comer ofmultiplicity 2

N o ~max

Figure 3.6: The functions p, p~ and p'Figure 3.7: Comer of a

polynomial function

Proof The fact that a maximal canonical form must have full support has beenestablished earlier and this ensures that the 'ratios' in (3.12) are well defined. Inthe proof of Theorem 3.38 it has also been shown that p~ is the concave upper hullof the function L f- p(l) (concavity in the sense of Definition 3.37). Conversely,

if p is concave, it is equal to its own concave upper hull, and thus p = p~. Now,(3.12) simply expresses that the slopes of the lines defined by the successive pairsof points ((l - l,p(l- 1)), (l,p(l))) are decreasing with l, which is obviously a

necessary and suffcient condition for p to be concave. .

3. Any polynomial function p can be factored as

p(C) = p(n)

( ~(C E9 Ci)) ,

where the Ci are the zero and/or nonzero corners of the polynomial functionp repeated with their order of multiplicity. These corners are obtained byEquation (3.13) using the maximum canonical form.

I

3.3 .1.2 Factorization of Polynomials

Let us now show that polynomial functions and concave formal polynomials can befactored into a product of linear factors.

Definition 3.42 (Corners, multiplicity) The nonzero corners of a polynomial func-

tion p are the abscissæ of the extremal points of the epigraph of p. Since p is convex,at such a corner, the (integer) slope increases by some integer which is called themultiplicity of the corner. A corner is called multiple if the multiplicity is largerthan one.

The zero corner exists if the least slope appearing in the graph of p is nonzero:the multiplicity of this zero corner is then equal to that (integer) slope.

Figure 3.7 shows a nonzero comer of multiplicity 2.

Theorem 3.43 (Fundamental theorem of algebra)

1. Any formal polynomial of the form p = p(n) Q9~=1 (r E9 Ci) (where some Ci

may be equal to E) satisfies p = p~.

2. Conversely, if a formal polynomial p = p(k)rk E9p(k + l)rk+1 E9... E9p(n)rnis such that p = p~, then it has full support, the numbers Ci E ~max defined by

c-~fp(n-i)fp(n-i+l) for 1 "5i"5ri-k ,. (3.13)i 1. E for n - k ~ i "5 n ,

are such that

Proof

1. Let p = Q9~1 p(n)(r E9 Ci) and assume without loss of generality that theCi have been numbered in such a way that (3.14) holds. We consider thenontrivial case p( n) i= E. By direct calculation, it can be seen that p( n - k) =

p(n)lJk, where IJk is the k-th symmetric product of the comers Ci, that is,

n

IJI = EB Ci ,i=1

1J2 = EB CiCj ,....

ilj=1

Owing to our assumption on the ordering of the Ci, it is clear that IJk

Q9~=1 Cj. Therefore,

Pn-k IJk Pn-k+1.- = ~ = Ck "5 Ck- i .-Pn-k+1 IJk-1 Pn-k+2

CI 2: C2 2: . . . 2: Cn ,

and p can be factored as p = p(n) (Q9~=i (r E9 Ci)).(3.14)

Thus p = p~ by Lemma 3.41.

2. If p = p~, the Ci can be defined by (3.13) unambiguously and then (3.14)

follows from Lemma 3.41. The fact that p can be factored as indicated ischecked as previously by direct calculation.

3. From the preceding considerations, provided that we represent p with the helpof its maximum canonical form, the factored form can be obtained if we definethe Ci with Equation (3.13). To complete the proof, it must be shown that any

Page 73: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

126 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 127

such Ci is a comer in the sense of Definition 3.42 and that, if a Ci appears kitimes, then the slope jumps by ki at Ci. To see this, rewrite the factored formin conventional notation, which yields

n

y =c2E92c E93

jJ(C) = Lmax(c,ci)i=1 m.max

Each elementary term C E9 Ci has a graph represented in Figure 3.2 with a

slope discontinuity equal to one at c.. If a c. appears ki times, the term

ki x max( c, c.) causes a slope discontinuity equal to ki. All other terms withCj i= c. do not cause any slope discontinuity at c.. .

Example 3.44 The formal polynomial ,,? E9 31' E9 2 is a maximum canonical formbecause Cl = 3fe = 3 ?: C2 = 2f3 = -1, and therefore it can be factored into( l' E9 3) (1' E9 ( -1)). The formal polynomial (1'2 E9 2) ~ = 1'2 E9 1 l' E9 2 can be factoredinto b E9 1)2. .

o

3.3.2 Rational FunctionsFigure 3.8: Graph of

y = (c2 EB 2c EB 3)l(lc2 EB 4c EB 5)

In this subsection we study rational functions in the m.max algebra. These functions

are continuous, piecewise linear, integer-sloped functions. We give the multiplicativeform of such functions, which completely defines the points where the slope changes.Moreover, we show that the Euclidean division and the decomposition into simpleelements is not always possible.

m.max

o

Figure 3.9: Root and pole comers

3.3.2.2 Euclidean Division

In general, a polynomia~ cannot be expressed as bqE9 r with deg(T) .( deg(b) forsome given polynomial b as shown by Example 3.47. Nevertheless, sometimes wecan obtain such a decomposition, as shown by Example 3.48.

Example 3.47 The equation c2 E9 e = q( C E9 1) E9 r has no solutions. Indeed, qmust be of degree i and r of degree 0; thus q = q(1h E9q(O), r = r(O), withq(O), q(1), r(O) E m.max. By identifying the coeffcients of degree 2 in both sides,we must have q(1) = e. Now, since the maximal canonical form in the left-handside is c2 E9 C E9 e, by considerIng the coefficient of degree i in the right-hand side,

we must have q(O) E9lq(I):: e, which contradicts q(l) = e. .

3.3.2.1 Definitions

Definition 3.45 Given p(O),... ,p(n), q(O),..., q(m) E m.max, p(n) and q(m) i= c,

the rational function T, associated with these coeffcients, is given by

r : m.max -4 m.max , C f- r(c) = ,p(O) E9... E9 p(n)cn

q(O) E9 ... E9 q(m)cm'Such a function is equal to the difference of two polynomial functions (see Fig-

ure 3.8): hence it is stil continuous, piecewise linear, integer-sloped, but it is neitherconvex nor increasing anymore.

Definition 3.46 The corners of the numerator are called zero comers or root cor-ners, and the corners of the denominator are called pole comers.

Using the fundamental theorem of algebra, we can write any rational function r as

Example 3.48 For p( c) = c2 E9 3 and b = c E9 I, we have

c2 E9 3 = (c E9 1)2 E9 3 = (c E9 1)(c E9 1.) E9 3

~( ) _ Q9~=1 (c E9 Ci) ,r c -a'tOm ( d.)''Oj=1 C E9 J

where the zero and pole comers are possibly repeated with their order of multiplicity.At a zero comer of multiplicity ki, the change of slope is ki (unless this zero comercoincides with some pole comer). At a pole comer of multiplicity ij, the change ofslope is -ij (see Figure 3.9).

.As in conventional algebra, this issue of the Euclidean division leads to solving

a triangular system of linear equations. However, in m.max, the diffculty dwells inthe fact that a triangular system of linear equations with nonzero diagonal elementsmay have no solutions.

Example 3.49 The system (Xi = 1, Xi E9 X2 = e) has no solutions in JJmax. .

Page 74: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

l' ~128 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 129

II 3.3.2.3 Decomposition of a Rational Function into Simple Elements

Definition 3.50 A proper rational function rl(j is a rational function which satisfiesdeg(f) ~ deg((j).

In general, it is not possible to express a rational function PI(j as s E9 rig, wherefI(j is proper and s is a polynomial function. Nevertheless, given a proper rationalfunction, we may attempt to decompose it into simple elements.

Definition 3.51 A proper rational function r is decomposable into simple elementsif it can be written as

n K¡r = EB EB aikl(e E9 e;)k ,

i=l k=l

IRmax

1 -11 IRmax

Ii,I

,t,

Ii

-2

where the aik are constants.

Such a decomposition is not always possible.

Example 3.52 We first consider a rational function for which the decompositioninto simple elements is possible:

eE91 eEge 1 e 1, - , E9 ' - c- E9

(eEge)2 - '(eEge)2 '(eEge)2 - eEge (eEge)2

The rational function (e E9 e)1 (e E9 1)2, however, cannot be decomposed. Indeed, ifsuch a decomposition exists, we would have

eEge a b, = ,. E9

(eE91)2 eE91 (eE91)2Then a(e E9 1) E9 b = e E9 e, hence a = e, and also a1 E9 b = 1 E9 b = e, which isimpossible. .

The graph of a proper rational function which can be decomposed into simpleelements is necessarly nonincreasing because it is the upper hull of non increasingfunctions. But a rational function with the degree of the numerator lower than thedegree of the denominator is not always nonincreasing: this depends on the relativeordering of its pole and zero comers.

Figure 3.10: Graph of y = 2(c EE e)l(c EE 1)2 Figure 3.11: Graph of y = el(c2 EE c)

Theorem 3.55 A proper rational function has a simple element decomposition ifand only if it has general root corners and special pole corners which are at theintersection of a zero-sloped line and a negative-integer-sloped line (Figure 3.12).

Proof If r is decomposable, it can be written as r = EB ri with

K;

ri(e) = EB aikl(e E9 ei)k

k=l

Reducing the right-hand side to a common denominator (e E9 ei)K;, we obtain ri =p(e E9 e;)I(e E9 e;)K;, where p is a polynomial function of degree Ki - 1. Thepolynomial function p is characterized by the fact that the abscissæ of its comersare greater than e;. Therefore ri(e) is constant on the left-hand side of e;, has a polecomer of order Ki at e;, and a root comer on the right-hand side of ei. Conversely,a function having this shape can easily be realized by an ri. The proof is completedby considering the fact thatr is the supremum of a finite number of such ri. .

Example 3.53 The function y = 2( e E9 e)1 (e E9 1)2 is proper but not monotonic (seeFigure 3.10). .3.3.3 Algebraic Equations

Definition 3.56 (Polynomial equation) Given two polynomial functions p and (j ofdegree nand m, respectively, the equality p(e) = (j(e) is called a polynomialequation. Solutions to this equation are called roots. The degree of the polynomialequation is the integer max(n, m).

Some polynomial equations have roots, some do not. For example, en = a hasthe root e = \f, that is, e = ajn in conventional algebra. On the other hand, the

equation p( e) = c has no roots when p is a general polynomial of degree n ;: 1.

However, being nonincreasing is a necessary but not a sufficient condition to bedecomposable into simple elements as shown by the following example.

Example 3.54 The function r(e) = el(e2 E9 e), the graph of which is displayed inFigure 3.11, cannot be decomposed into simple elements. Indeed,

t~ a b J t a E9 br(e) = .- E9 c- =? ta(e E9 e) E9 be = e:¡ =?e eEge awhich is impossible in IRmax.

- : J'

.3.3.3.1 Canonical Form of an Equation

Before studying equations, it is useful to write them in their simplest foTI. An ~qua-

tion p( e) = q( e) can generally be simplified even if it is in the form pb ( e) = qb (e).

Page 75: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

I:'

130 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 131

Indeed, if two monomials p'(k)'l and q'(k)-l of the same degree appear simulta-

neously, and if p'(k) ~ a'(k), we can further simplify the equation by canceling the

monomial p' (k hk.

Now we give a characterization of the situation where the polynomial equationof degree n has exactly n roots.

Theorem 3.61 Suppose that n is even (the case when n is odd is similar). Let

Example 3.57 The equation c2E93cE92 = 3c2E92cEge can be reduced to 3cE92 = 3c2(see Figure 3.13). . p(c) = p(O) E9 p(2)c2 E9... E9 p(2k)C2k ,

q(c) = p(l)c E9 p(3)c3 E9 ... E9 p(2k - l)c2k-i ,

and suppose that p( c) = q( c) is a nondegenerated equation in canonical form, then

G; ~ p( i-I )fp( i), i = I,.. . , n, are the n roots of the equation.

JRmax

o

Proof No comer of pffq is multiple. Hence each one is obtained as the intersectionof two monomials of consecutive degrees. Therefore, these monomials belong todifferent sides of the equation. Thus the comesponding comers are roots of theequation.

Conversely if the equation has n roots, pffq has n comers which therefore aredistinct. But each of these comers is a root, hence these comers are characterized bythe intersection of two monomial functions of consecutive degrees, the monomialsbeing in different sides of the equation. .

o 3.4 SYMMETRIZATION OF THE MAX-PLUS ALGEBRA

Figure 3.12: A rational functiondecomposable into simple elements

Figure 3.13: Equation

c2 EB 3c EB 2 = 3c2 EB 2c EB e

We have seen that the theory of linear system of equations in the max-plus algebrais not satisfactory at all, not even in the scalar case. We now extend lImax to a largerset § for which lImax can be viewed as the positive par. The construction is similarto the construction of ;Z as an extension of l' in conventional algebra, but we cannotavoid some complications coming from the idempotency of the max operator. Withthis new set, we can generalize the notion of an equation that we call a balance.Then all nondegenerated scalar linear balances have a unique solution. Thus a linearclosure of lImax has been achieved.

Definition 3.58 If there exist two identical monomials on both sides of the equation,we say that the equation is degenerated. The nondegenerated equation p( c) = q( c)is in minimal canonical form if (p E9 q)' = p E9 q.

In the case of a degenerated equation, there is a segment of solutions.

3.4.1 The Algebraic Structure §

3.3.3.2 Solving Polynomial Equations

T~orem 3.59 Any root of the nondegenerated equation p(c) = íic) is a corner ofpE9 q.

Proof Let us take the canonical form of the equation. Any root of p( c) = q( c) isthe solution of p(k)ck = q(i)d for some different k and L and thus it is a comer ofpffq because the equation is in minimal canonical form. .

A natural approach to our problem is to embed the max-plus algebra into a structurein which every nontrivial scalar linear equation has at least one solution. In particularwe would like to have a solution to the equation a E9 x = c, that is, we would liketo find a symmetric element to a. But this not possible, as shown by the followingtheorem.

Theorem 3.62 Every idempotent group is reduced to the zero element.

:111 The converse of this theorem is not true, i.e. a comer is not always a root of theequation p(c) = q(c).

Proof Assume that the group (G, E9) is idempotent with zero element c. Let b bethe symmetric element of a E G. Then

Example 3.60 The polynomial equation 3c E9 2 = 3c2 has the comer c = -I whichis not a root (3(-1) E9 2 = 2, 3(-1? = I). .

a = a E9 c = a E9 (a E9 b) = (a E9 a) E9 b = a E9 b = c

.

Page 76: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

~ I !

I:

ii"I

a;.1...'1.i,i;

ii11I:

132 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 133

"iii

Nevertheless we can adapt the idea of the construction of z: from Y: to build a'balancing' element rather than a symmetric one. This is the purpose of the followingsubsections.

We distinguish three kinds of equivalence classes:

3.4.1.1 The Algebra of Pairs

Let us consider the set of pairs JR~ax endowed with the natural idempotent semi fieldstructure:

(t, -(0) = Ht,x") I x" ~ t) ,( - 00, t) = H x', t) I x' ~ t 1 ,(t, t) = Ht, tH ,

called positive elements;called negative elements;called balanced elements.

(x', x") E9 (y', y") = (x' E9 y', x" E9 y") ,

(x', x") 0 (y', y") = (x'y' E9 X"y", x'y" E9 x"y') ,

with (c, c) as the zero element and (e, c) as the identity element.Let x = (x', x") and define the minus sign as 8x = (x", x'), the absolute value

of x as Ixl = x' E9 x" and the balance operator as x" = x 8 x = (lxi, Ixl). Clearly,these operators have the following properties:

By associating (t, -(0) with t E JRmax, we can identify JRmax with the semi field ofpositive or zero classes denoted §E!. The set of negative or zero classes (of the form8x for x E §E!) will be denoted §8. This set is not stable by multiplication andthus it is not a semifield. The set of balanced classes (of the form x") is denoted§"; it is also isomorphic to JRmax. This yields the decomposition

§ = §E! U §8 U §" .(3.15)

1. a" = (8a)";

The element c is the only element common to §E! and §8 and §". This decompositionof § should be compared with z: = Y:+ U Y:-. . This notation allows us to write 382instead of (3, -(0) E9 (-00,2). We thus have 382 = (3,2) = (3, -(0) = 3. Moregenerally, calculations in § can be summarized as follows:

2. aU = a";

3. ab" = (ab)";

4. 8(8a) = a;

5. 8(a E9 b) = (8a) E9 (8b);

6.8(a0b)=(8a)0b.

a8b=a,b 8 a = 8aa 8 a = a" .

if a ? bif a ? b (3.16)

These properties allow us to write a E9 (8b) = a 8 b as usuaL.

Because of its importance, we introduce the notation §v for the set §E! U §8 and§: = §v \ t c 1. The elements of §v are called signed elements. They are either

positive, negative or zero.

Theorem 3.65 The set §: = § \ §" is the .set of all i~vertible elements of §.

It is fundamental to notice that \7 is not transitive and thus is not an equivalencerelation. For instance, consider (e, I) \7 (I, I), (I, I) \7 (I, e), but (e, I) W (I, e)! Since\7 cannot be an equivalence relation, it is not possible to define the quotient structureof JR~ax by means of \7 (unlike in conventional algebra in which Y:2/ \7 c: Z:).However, we can introduce the equivalence relation 'R on JR~ax closely related tothe balance relation, namely,

Proof The obvious identity t 0 ( - t) = (8t) 0 ( 8 - t) = e for t E JRmax \ t c 1 implies

that every nonzero element of §v is i_nvertible. Moreover, the absorbing propertiesof the balance operator show that §v is absorbing for the product. Thus, x"y'¡ efor all y E § since e fl §".. .

SRemark 3.66 Thus, in §, with each element a E §v, we can associate an element8a such that b = a 8 a E §" but in general b'¡ c. This is the main difference withthe usual symmetrization. Here the whole set §" plays the role of the usual zeroelement. .

3.4 .1.2 Quotient Structure

Definition 3.63 (Balance relation) Let x = (x', x") and y = (y', y"). We say thatx balances y (which is denoted x \7 yr if x' E9 y" = x" E9 y'.

3.4.2 Linear Balances

f x' E9 y" = x" E9 y'(x', x")'R(y', y") ~ 1. (x', x") = (y',y")

if x' .¡ x", y' .¡ y"otherwise.

Before solving general linear balances, we need to understand the meaning of thegeneralization of equations in JRmax by balances in §. This can be done by studyingthe properties of balances.

Theorem 3.67 The relation \7 satisfies the following properties:

1. a \7 a;

It is easy to check that 'R is compatible with the addition and multiplication of JR~ax'

the balance relation \7, and the 8, I . I and" operators.

Definition 3.64 The symmetrized algebra JR~axl'R of JRmax is called §.

Page 77: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

11"1

134 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 135

Ii

,'i!

2. a \7 b ~ b \7 a;

3. a \7 b ~ a 8 b \7 E:;

4. t a \7 b, e \7 d¡ =? a E9 e \7 b E9 d;

5. a \7 b =? ae \7 be.

Proof From the properties of balances it follows that ax E9 b \7 E: ~ x \7 8 a-I b. Thenusing the reduction property and the fact that 8a - i b E §v, we obtain x = 8a - i b. .

Remark 3.70 If b (j §v, we lose the uniqueness of signed solutions. Every x suchthat laxl ~ Ibl (i.e. Ixl ~ la-1bl) is a solution of the balance (3.17). If a (j §v, weagain lose uniqueness. Assume b E §v (otherwise, the balance holds for all valuesof x), then every x such that laxl ~ Ibl is a solution. .

iiil

Iii

"iIII

I

!

Proof Let us prove Property 5. Obviously, a \7 b ~ a 8 b E §- and, since §- isabsorbing, (a 8 b)e = ae 8 be E §-, i.e. ae \7 be. . Remark 3.71 We can describe all the solutions of (3.17). For all t E lRmax, we

obviously have at- \7 E:. Adding this balance to ax E9 b \7 E:, where x is the uniquesigned solution, we obtain a(x E9 t-) E9 b \7 E:. Thus,

Although \7 is not transitive, when some varables are signed, we can manipulatebalances in the same way as we manipulate equations. Xt = x E9 t- (3.18)

Theorem 3.68

1. Weak substitution If x \7 a, ex \7 b and x E §v, we have ea \7 b.

2. Weak transitivity If a \7 x, x \7 b and x E §v, we have a \7 b.

3. Reduction of balances If x \7 y and x, y E §v, we have x = y.

is a solution of (3.17). If t ~ lxi, then Xt = t- is balanced. Conversely, it can be

checked that every solution of (3.17) may be written as in (3.18). Finally the uniquesigned solution x is also the least solution. .

Remark 3.72 Nontrivial linear balances (with data in §v) always have solutions in§; this is why § may be considered as a linear closure of lRmax. .

Proof 3.5 LINEAR SYSTEMS IN §

1. We have either x E §Ef or x E §8. Assume for instance that x E §Ef, that is,x = (x', E:). With the usual notation, x' E9 a" = a' and e' x' E9 b" = e" x' E9 b'.Adding e' a" E9 e" a" to the last equality, we get

e'x' E9 e'a" E9 e"a" E9 b" = e"x' E9 e'a" E9 e"a" E9 b' ,

It is straightforward to extend balances to the vector case. Theorems 3.67 and 3.68stil hold when a, b, x, y and e are matrices with appropriate dimensions, providedwe replace 'belongs to §v, by 'every entry belongs to §v'. Therefore, we say thata vector or a matrix is signed if all its entries are signed.

We now consider a solution x E lRmax of the equation

which yields, by using x' E9 a" = a',Ax E9 b = Cx E9 d . (3.19)

e' a' E9 e"a" E9 b" = e" a' E9 e' a" E9 b' , Then the definition of the balance relation implies that

that is, ea \7 b.(A 8 C)x E9 (b 8 d) \7 E: . (3.20)

2. This a consequence of the weak substitution for e = e. Conversely, assuming that x is a positive solution of (3.20), we obtain

3. This point is trivial but is important in order to derive equalities from balances.. Ax E9 b \7 Cx E9 d ,

The introduction of these new notions is justified by the fact that any linear balance(which is not degenerated) has one and only one solution in §v.

Theorem 3.69 Let a E §~ and b E §v, then x = 8a - i b is the unique solution ofthe balance

with Ax E9 band Cx E9 dE §Ef. Using Theorem 3.68, we obtain

Ax E9 b = Cx E9 d

ax E9 b \7 E: , (3.17)

Therefore we have the following theorem.

Theorem 3.73 The set of solutions of the general system of linear equations (3.19)in lRmax and the set of positive solutions of the associated linear balance (3.20) in

§ coincide.which belongs to §v.

Page 78: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

,,"1

I136 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 137

Hence, studying Equation (3.19) is reduced to solving linear balances in §. A direct consequence is that some classical proofs lead to classical identities in thisnew setting. Sometimes weak substitution limits the scope of this approach.

Theorem 3.76 For an n x n matrix A with entries in §, we have

Cramer formula: AA~ \lIAle, and if IAI is signed, then the diagonal of AA~ issigned;

recursive computation of the determinant:

Remark 3.74 The case when a solution x of (3.20) has some negative and somepositive entries is also of interest. We write x = x+ e x- with x+, x- E (§EB)n.Partitioning the columns of A and e according to the sign of the entries of x,we obtain A = A+ E9 A-, e = e+ E9 e-, so that Ax = A+x+ e A-x- andex = e+x+ e e-x-. We can thus claim the existence of a solution in lRmax to thenew problem

A+x+ E9 e-x- E9 b = A-x- E9 e+x+ E9 d .

The solution of nondegenerated problems is not unique, but the set of solutionsforms a single class of lR~ax (for the equivalence relation ~). .

IAI = I (~ a~n) I = IFlann e H F~G

Before dealing with general systems, we need to extend the determinant machineryto the §-context. We define the signature of a permutation u by

for a partition of matrix A where ann is a scalar;

Cayley-Hamilton theorem: p being the characteristic polynomial of matrix A, i.e.

p(À) ~ IA e Àel, we have p(A) \l c.

Ii!I

1.,..1'"

i'ii

I:

I

I

3.5.1 Determinant

t e if u is even;s n u =g () ee otherwise.

Then the determinant of an n x n matrix A = (Aj) is given (as usual) by

Remark 3.77 We define the positive determinant of a matrix A, denoted I A I +, bythe sum of terms Q9i Ai(1(i) where the sum is limited to even permutations, and anegative determinant, denoted IAI-, by the same sum limited to odd permutations.The matrix of positive cofactors is defined by

n (A~+) = f IAjil+'J llAjil-if i + j is even,if i + j is odd,

EB sgn( u) Q9 Ai(1(i) ,(1 i=1 where Aji denotes the matrix derived from A by deleting row j and column i. Thematrix of negative cofactors A~- is defined similarly. With this notation, Theo-rem 3.76 can be rewritten as follows:and is denoted either IAI or det(A). The transpose of the matrix of cofactors is

denoted A~ ((A~)ij ~ cofji(A)). The classical properties of the determinant are stiltrue.

AA~+ E9IAI-e = AA~- E9IAI+e .

Theorem 3.75 The determinant has the following properties:

linearity:

I(U¡,...,ÀUiE9¡.Vi'...'un)1 =ÀI(u¡,.. ,Ui,.. ,un)IE9¡.I(ui,.. ,Vi,.. ,un)1

This formula does not use the e sign and is valid in any semiring. The symmetrizedalgebra appears to be a natural way of handling such identities (and giving proofsin an algebraic way). .3.5.2 Solving Systems of Linear Balances by the Cramer Rule

I,

n

IAI = EB aikcofik(A)k=l

In this subsection we study solutions of systems of linear equations with entries in§. We only consider the solutions belonging to (§v)n, that is, we only considersigned solutions. Indeed, in a more general setting we cannot hope to have a resultof uniqueness; see Remark 3.70. We can now state the fundamental result for theexistence and uniqueness of signed solutions of linear systems.

Theorem 3.78 (Cramer system) Let A be an n x n matrix with entries in §, IAI E§~, bE §n and A~b E (§v)n. Then, in §v there exists a unique solution of

antisymmetry:I(U(1(I)'...' U(1(n))I = sgn(u)l(ui,..., un)1

and consequently

l(u¡,...,V,...,V,...,un)1 \l c

expansion with respect to a row:

Ax \l b , (3.21)

and it satisfiesx \l A~b¡IAI . (3.22)transposition: IAI = lA/I.

Page 79: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

II

i

138 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 139

Proof By right-multiplying the identity AAQ V IAle by IAI-lb, we see that x isa solution. Let us now prove uniqueness. The proof is by induction on the sizeof the matrix. It is based on Gauss elimination in which we manage the balancesusing weak substitution. Let us prove (3.22) for the last row, i.e. IAlxn V (AQb)nDeveloping IAI with respect to the last column, IAI = EB~=1 akncofkn(A), we see

that at least one term is invertible, say alncof1n(A). We now parition A, b and xin such a way that the scalar aln becomes a block:

corresponds to the balance

( ~

812° ) ( ~~ ) V ( ; ) . (3.26)

Its determinant is D = 4.

A=(~ acn)' b=(~), x=(~).D1 = i (; ~~) i = 8, D2 = i (~ ;

AQb = ( g~ ) = ( ~ ) E (§V? .

The system is invertible and has a unique solution. Thus (xi = DdD = 8 - 4 =4, X2 = D2fD = 7 -4 = 3) is the unique positive solution in § of the balance (3.26).Hence it is the unique solution in JPmax of Equation (3.25). .

)1 = 7 ,

Then Ax V b can be written as

il!,:1

HX E9 alnXn V bi , (3.23),

FX E9 GXn VB. (3.24)Since IFI = (8e)n+lcofin(A) is invertible, we can apply the induction hypothesisto (3.24). This implies thati-Ij

Xn V (AQb)nfIAI .

X V 1F1-1 FQ(B 8 Gxn) .

Using the weak substitution property, we can replace X E (§V)n-I in Equation (3.23)to obtain

1F1-1 H FQ(B 8 Gxn) E9 ainXn V bi ,

that is,xn(lFlaln 8 HFQG) VlFlbl 8 HFQB

Here we recognize the developments of IAI and (AQb)n, therefore

Since the same reasoning can be applied to the entries of x other than n, thisconcludes the proof. . Figure 3.14: A (2,2) linear system of equations

Remark 3.79 Let us write Di for the determinant of the matrix obtained by replacingthe i-th column of A by the column vector b; then Di = (AQb); Assume thatD ~ IAI is invertible, then Equation (3.22) is equivalent to

Xi V D-1 Di, Vi.

If AQb E (§v)n, then by using the reduction of balances (see Theorem 3.68), weobtain

Xi = D-1Di

which is exactly the classical Cramer formula. .

Example 3.81 In the two-dimensional case the condition AQb E (§v)n has a veryclear geometric interpretation (see Figure 3.14) as the intersection öf straight lines in§. First we can choose an exponential scaling of the Xl and X2 axes. The exponentialmaps §EB to JP+ and §8 to JP-, if we identify §8 with in + JP U t -00 1. We do

not represent the balance axis in this representation. Therefore the straight lineaX2 E9 bxi E9 eVE: is a broken line (in the usual sense) composed of four segments:

. two of them are symmetric with respect of the origin; they correspond to thecontribution ofax2 EE bxi to the balance (they belong to the conventional lineaX2 + bxi = 0);

( ~

-42 ) 0 ( ~~ ) E9 ( _ ~ ) = (

-1 1E: 2 ) 0 ( ~~ ) E9 ( ; ) ,

. the horizontal segment corresponds to the contribution ofax2 E9 c to the bal-ance;

Example 3.80 The JPmax equation

(3.25). the vertical segment corresponds to the contribution of bXI E9 c to the balance.

Page 80: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

rii

.11

ii

¡;

II

í

I

I!

L

!).'.ii

'ii;

"

II;i.i.lI

I:

:/1111'

I:;

140 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA

Then it is easy to see that two such lines have one and only one point of intersection,or there exists a complete segment of solutions. This latter case is called singularand is not further considered here. .

141

To get a better understanding of polynomial functions on § we study someparicular cases. Let us start by plotting the graphs of polynomial functions ofdegree one, two and three (see Figure 3.15). We must study the graphs over each

Remark 3.82 The invertibility of IAI is not a necessary condition for the existenceof a signed solution to the system Ax \7 b for some value of b. Let us consider

§$

(e e E)A= e e E

e e E§8

E §~ !§8

Because IAI = E, the matrix A is not invertible. Let t E §v be such that Ibzl :: It i

for all i, and let x = (t 8t E)'. Then Ax \7 b. But in this case, the signedsolution is not unique. .y = axE9b

1§8

y = ax2E9 bxE9c

I §8

§~ 1§8 §$

i

Iy = ax3 E9bx2E9cxE9dI / I §8

Figure 3.15: Polynomial functions of degree one, two and three

of the three components §$ , §8 and §". The value of the function itself, however,is an element of § which also belongs to one of these components. Therefore theplot is quite complicated. In order to simplify the study, only the plot over §v isconsidered. Moreover we will use the exponential system of coordinates that wehave discussed in the previous section. Figure 3.15 shows the points of discontinuityof the three component functions. These discontinuities always appear at abscissæwhich are symmetric with respect to comer abscissæ. At these discontinuities thepolynomial functions take balanced values (in the graph, we see sign changes). Theycorrespond to what we call 'roots' of polynomial functions. If a polynomial is ofdegree n, it has in general n comers and n points in §v where the polynomialfunction takes balanced values.

Let us study the polynomial functions of degree two in more detaiL. We consider

p(c) = p(O) E9 p(l)c E9 p(2)c2, p(i) E §v, i = 0, 1,2 .

The polynomial function 1P1 E P(lRmax) is defined as p(c) = Ip(O)1 E9 Ip(I)lc E9Ip( 2) 1 c2. We wil later prove, but it should be clear, that if c is a root of p, then I clis a comer of Ip I. Owing to Theorem 3.43, 1P1 can be factored into the product oftwo linear polynomials. We have the following four possibilities:

1. If Ip(l)fp(2)1 )- Ip(O)fp(1)I, then 1P1 has two distinct comers Ci = Ip(l)fp(2)1and C2 = Ip(O)fp(l)I. It can be checked that p = p(2)(c E9 p(l)fp(2))(c E9

p(O)fp(I)) and that this factorization is unique. In addition, the moduli of theroots are Ci and C2.

Remark 3.83 As already noticed, in (65) for example, determinants have a naturalinterpretation in terms of assignment problems. So the Cramer calculations have thesame complexity as n + 1 assignment problems, which can be solved using flowalgorithms. .3.6 POLYNOMIALS WITH COEFFICIENTS IN §

We have built the linear closure § of lRmax. Therefore any linear equation in § hasin general a solution in this set. The purpose of this section is to show that § isalmost algebraically closed, that is, any 'closed' polynomial equation of degree nin § has n solutions. The term 'closed' refers to the fact that the class of formalpolynomials having the same polynomial function defined on § is not always closed(in a topological sense, that wil be made precise later). We will see that § isalgebraically closed only for the subset of 'closed' polynomial equations. Moreover,we wil see that any polynomial function can be transformed into a closed functionby modifying it in a finite number of points.

3.6.1 Some Polynomial Functions

We can generalize the notions of formal polynomials and of polynomial functions

to the set §. We restrict our study to polynomial functions in P(§V) ~ r (§VbD,where §v bJ denotes the class of formal polynomials with coefficients in §v andr is the straightforward extension of the evaluation homomorphism introduced inLemma 3.35. We wil see that such functions assume values in §v when theirargument ranges in §v, except perhaps at a finite number of points. For the moregeneral class of polynomial functions with coefficients in §, denoted P(§), it mayhappen that the function takes a balanced value on a continuous set of points of§v (in which case we say that we have a balanced facet). Because we are mainly

interested in the analogy with conventional polynomials, we .do not deal with thislatter situation.

2. If Ip(l)fp(2)1 = Ip(O)fp(I)I, then IP1 has a comer Ci = Ip(0)fp(2)li/2 of

multiplicity Z and the roots of p = p(2)(c E9 p(l)fp(2))(c E9 p(O)fp(1)) havemodulus Cl.

3. If Ip(l)fp(2)1 ~ Ip(O)fp(I)1 and p(2)p(0) E §$, then 1P1 has a comer Ci =Ip(0)fp(2)11/2 of multiplicity 2 and p cannot be factored. Indeed at c¡ and8CI, P has signed values. We have p = p(2) (¿ E9 p(0)fp(2)).

Page 81: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

Ii:

II

¡Ii142 SYNCHRONIZATION AND LINEARITY

'i

I

'i

i

I!

4. If Ip(1)fp(2)1 .: Ip(O)fp(l)1 andp(2)p(0) E §8, then the polynomiallPi has acomer CI = Ip(0)fp(2)llj2 of multiplicity 2. We have p= p(2)(cE9cl)(c8cl)and thus p has been factored.

This discussion suggests that if the comers of IPI (now a polynomial function ofdegree n) are distinct, then there are n roots; but if IPI has multiple comers, thenwe are not guaranteed to have a factorization in linear factors. We now study thesituation in more detaiL.

3.6.2 Factorization of Polynomial Functions

We can consider formal polynomials §bJ and polynomial functions P(§) with co-effcients in § as we have done for polynomials with coefficients in ~max. Theydefine algebras. The following mapping from P (§) into P (~max)

il';,.

~~I."it. p = p(k)'"l E9... E9 p(n)'n f- Ipl = Ip(k)I'l E9... E9 Ip(n)h'n

is a surjective morphism.

ii

Ii

il

ilq;II!

ili

'I'

1\

Ii"!

Definition 3.84 (Root) The root of a polynomial function pEP (§) is an elementc E §v such that p(c) \l E.

Remark 3.85 It should be clear that the computation of the linear factors of apolynomial yields its roots. Indeed we have

Q9(c 8 cz) \l E Ç: c 8 Cz \l E

i.J:¡:.¡ii

'I'.: I!!ii'I';

Le~ma 3.86 If, for a polynomial p E P(§V), c is a root of p(c), then Icl is a cornerof Ipl.

Proof If c is a root, then p(c) is balanced and hence Ip(c) I = Ip(lcl)1 is a quan-

tity which is achieved by two distinct monomials of p since, by assumption, thecoefficients of p belong to §v. Thus lei is a comer of ¡pl. .

For the same reason as in the ~max case, the mapping

1" : §bJ -7 P (§), p f- P ,

is not injective. In order to study the set valued-inverse mapping 1"-1, we introducethe notion of a closed polynomial function.

Definition 3.87 (Closed polynomial function) We say that the polynomial functionp E P(§V) is closed if 1" -I (p) admits a maximum element denoted pU E P(§). Thiselement is called the maximum representative of p. .

.

:1

(i

'Ji,

~\

)1:1

\

i

Ii

i

IJ

~

l

MAX-PLUS ALGEBRA 143

Example 3.88 The polynomial function c2 8 e is closed because it has the samegraph as c2 E9 e. c 8 e. The polynomial function c2 E9 e is not closed because itsgraph is different from that of any polynomial Pa = c2 E9 ac E9 e with a E t e, 8e, e.:¡although it is the same for all a .: e. .

The notion of closed polynomial function is relevant because the inverse of theevaluation homomorphism is simple for this class, and because this class is exactlythe set of polynomial functions which can be factored into linear factors.

Theorem 3.89 A polynomial function p E P(§V) can be factored in linear factorsif and only if it is closed. .ProofAny polynomial which can be factored is closed. Let us suppose that the degreeof p is n, its valuation 0, and the coefficient of its head monomial is e (the proofcan be generalized to avoid these assumptions). Let us suppose that the degree of pis n, its valuation 0, and the coefficient of its head monomial is e (the proof can beadapted to the general case). Let Ci, i = i,..., n, denote the roots of p numberedaccording to the decreasing order of their modulus. If the Ci are all distinct, we have

i

1i

\

I

( z ). def n-zwith mz = Q9Cj c .

)=1

n

p(c) = EBmzz=o

Becausemz ? mj, Vj? i, Vc: Ci+1 .: c .: Ci ,

we cannot increase the coefficient of a monomial without changing the graph of pand therefore it is closed. The situation is more complicated when there is amultipleroot because then at least three monomials take the same value in modulus at thisroot. To understand what happens at such a multiple root, let us consider the casewhenphas only the roots e or 8e, that is, p(c) = (cEge)n-m(c8e)m. The expansionof this polynomial gives five kinds of polynomials:

. cn E9 cn-I E9 . . . E9 e ;

. cn 8 cn-I E9 cn-2 . . . E9 e

. cn 8 cn-I E9 cn-2 . . . 8 e

. cn E9 e.cn-I E9 e.cn-2... E9 e

. cn E9 e.cn-I E9 e.cn-2 . . . 8 e

By inspection, we verify that we cannot increase any coeffcient of these polynomialswithout changing their graphs. Therefore, they are closed.

We remark that some polynomials considered in this enumeration do not belongto P(§V). For example, it is the case of (c 8 e)2(c E9 e). Some other polynomials

Page 82: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

144 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 145

have their coeffcients in §. and do not seem to belong to the class that we studyhere, but they have. other representatives in P(§V). For example, we have

(cee)(cEge)=c2Ege.cee=c2ee.

. pb :: r-i(p) :: p~;

. pb,p~ E r-i(p);

. Ipbl = Iplb;

. Ip~1 = Ipl~.

Any closed polynomial can be factored. If p is closed, let p denote its maximumrepresentative. Its coefficients Ci = p( n - i)fp( n - i + 1) are nonincreasing with iin modulus. Indeed, if that were not the case, there would exist i and k such thatICi-kl :; ICi+il :; ICiI. Then it would be possible to increase Pn-i while preservingthe inequalities ICi-kl :; ICi+ii :; ICil. Because this operation would not change thegraph of p, we would have contradicted the maximality of p.

Now, if the ICi i are strictly decreasing with i, we directly verify by expansionthatp(c) = ~i(cE9Ci). If the Ci are simply nonincreasing, we wil only examine theparicular case when the Ci have their modulus equal to e. There are four subcases:

1. p(e) WE and p(ee) WE;

2. p(e) WE and p(ee) \7 E;

3. p(e) \7 E and p(ee) WE;

4. p(e) \7 E and p(ee) \7 E.

Proof The proof follows from the epimorphism property of p f- Ipl, from thecorresponding result in lRmax, and from the previous result on closed polynomialfunctions. .

I:

IF

ii.1.:......::

i¡i

¡i

Example 3.93 For p = c2 E9 lc E9 e we have pb = p~ = "(2 E9 1"( E9 e. Forp = c2 E9 ( -1)c E9 e we have pb = "(2 E9 e, but p~ does not exist in this case. .

3.7 ASYMPTOTIC BEHAVIOR OF Ak

The first case can appear only if n is even and

p(c)=cnE9cn-2E9...Ege,

In this section we prove a max-plus algebra analogue of the Perron-Frobenius the-orem, that is, we study the asymptotic behavior of the mapping k f- Ak, where Ais an n x n matrix with entries in lRmax. We can restrict ourselves to the case when

G (A) contains at least a circuit since, otherwise, A is nilpotent, that is, A k = E fork suffciently large.

We suppose that the maximum cycle mean is equal to e. If this is not the case,the matrix A is normalized by dividing all its entries by the maximum cycle mean),. Then the behavior of the general recurrent equation is easily derived from the

formula Ak = ),k()'-IA)k. Therefore, in this section all circuits have nonpositiveweights and some do have a weight equal to e = 0 which is also the maximumcycle mean. We recall that, in this situation, e is the maximum eigenvalue of A (seeRemark 3.24).

which contradicts the fact the Ci are nonincreasing. The other cases correspond to afactorization studied in the first par of the proof. .

Corollary 3.90 A suffcient condition for p E P(§V) to be closed is that íP has

distinct corners.

i

lI ~ i!¡

!'

.1".,

Example 3.91

. ¿i E9 e is always positive and therefore cannot be factored;

. ¿i E9 c E9 e is closed and can be factored into (c E9 e?;

. (- e e)(- E9 e)2 = (- E9 e)(- e e? = "(3 E9 e."(2 E9 e."( E9 e is a maximumrepresentative of a closed polynomial;

. "(3 E9 e."(2 E9 e"( E9 e is not a maximum representative of a closed polynomiaL..

3.7.1 Critical Graph of a Matrix A

1

\

Ii

Definition 3.94 For an n x n normalized matrix A, the following notions are defined:

Critical circuit: a circuit ( of the precedence graph G (A) is called critical if it hasmaximum weight, that is, 1(lw = e.

Critical graph: the critical graph GC(A) consists of those nodes and arcs of G(A)which belong to a critical circuit of G(A). Its nodes constitute the set 'Vc.

In the following theorem the form of the inverse function of r, which is a

set-valued mapping, is made precise.

Theorem 3.92 The set r-1 (p), with p E P(§V), admits the minimum elementpb E §vbJ and the maximum element p~ E §bJ which satisfy

Saturation graph: given an eigenvector Y associated with the eigenvalue e, the

saturation graph S(A,y) consists of those nodes and arcs of G(A) such thatAjYj = Yi for some i and j with Yi, Yj f= E.

Cyclicity of a graph: the cyclicity of a m.s.c.s. is the gcd (greatest common divisor)

of the lengths of all its circuits. The cyclicity c( G) of a graph G is the lcm(least common multiple) of the cyclicities of all its m.s.c.s.'s.

Page 83: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

II

I

i

146 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 147

A ~ ( -¡

e-2-1

e

e C)e e

-1 e .e e

Theorem 3.98 For each node in a saturation graph, there exists a circuit upstreamin this graph. The circuits of any saturation graph belong to GC(A).

Example 3.95 Consider the matrix

. Its precedence graph G (A) has three critical circuits l:i 1, 13, 4l, r 4l.

. Its critical graph is the precedence graph of the matrix

(e e e C)

c= e e e e .eeeee e e e

Proof Indeed, if i is one of its nodes, there exists another node j, upstream withrespect to i, such that Yi = AjYj; Yi, Yj .¡ c. The same reasoning shows that thereexists another node upstream with respect to j, etc. Because the number of nodes of5 (A, y) is finite, the path (i, j, . . .) obtained by this construction contains a circuit.A circuit (io, i¡,..., ik, io) of a saturation graph S(A, y) satisfies

Yii = AilioYio , ... , . Yio = AioikYh .

The multiplication of all these equalities shows that the weight of the circuit(i,i¡,...,ik,i)ise. .. Matrix A has the eigenvector (e -1 - 2 - 2 ) i associated with the

eigenvalue e. The corresponding saturation graph is the precedence graphof the matrix

Example 3.99 In Example 3.95, node 2 has the critical circuit (indeed a loop) r!lupstream. .( e eee)

s= -i e e e .e -i e ee e e e

3.7.2 Eigenspace Associated with the Maximum Eigenvalue

. The cyclicity of the critical graph is 1. Indeed, the critical graph has two

m.s.c.s.'s with nodes rll and 13,41, respectively. The second one has twocritical circuits, r 4l and 13, 41, of length 1 and 2, respectively. The cyclicityof the first m.s.c.s. is 1, the cyclicity of the second m.s.c.s. is gcd(I,2) = 1.Therefore the cyclicity of GC(A) is lcm(l, 1) = 1. .

In this subsection we describe the set of eigenvectors of matrix A associated withthe eigenvalue e. Clearly, this set is a moduloid. We characterize a nonredundantset of generators of this moduloid as a subset of the columns of A + .

Here the word 'eigenvector' must be understood as 'eigenvector associatedwith the eigenvalue e'. We wil use the notation Afj for (AP)ij and A;j for

(A+)ij.

Let us give now some simple results about these graphs which will be useful inthe following subsections.

Theorem 3.96 Every circuit of GC(A) is criticaL.

Theorem 3.100 If Y is an eigenvector of A, it is also an eigenvector of A +. It isthe linear combination of the columns A1, i E 'Vc. More precisely,

Proof If this were not the case, we could find a circuit (, composed of subpaths(i of critical circuits 'Yi, with a weight different from e. If this circuit had a weightgreater than e, it would contradict the assumption that the maximum circuit weightof G(A) is e. If the weight of ( were less than e, the circuit (' composed of the

union of the complements of (i in 'Yi would be a circuit of weight greater than e andthis would also be a contradiction. .

y=ffyA+'l i .iiE'I'

(3.27)

Proof The first par of the theorem is triviaL. Let us prove Formula (3.27). Considertwo nodes i and j in the same m.s.c.s. of the saturation graph S(A, y). There existsa path (i, i¡, . . . , ik, j) which satisfies

Corollary 3.97 Given a pair of nodes (i,j) in GC(A), all paths connecting i to jin GC(A) have the same weight.

Proof If there exists a path p from i to j in GC(A), it can be completed by a pathpi from j to i also in GC(A) to form a critical circuit. If there exists another pathpI! from i to j in GC(A), the concatenations of p and p' on the one hand, and of pI!

and p' on the other hand, form two critical circuits with the same weight. Hence pand pI! must have the same weight. .

Yii = Ai1iYi , ... , Yj = AjikYik .

Therefore, Yj = WYi with

w=A ...A-.~A+'Jik zi i - JZ'and we have

Ai;Yj = Ai;wYi :s Ai;Aj;Yi :s A~Yi' Vi. (3.28)

Page 84: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

~

I

!

148 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 149

We could have chosen i in a circuit of the saturation graph according to Theo-rem 3.98. This i wil be called i(j) in the following. We have

Yz = EB AGYjjES(A,y)

.c EB A~(j)Yi(j)jES(A,y)

.c EBA~Yi' VtiE'l'

(by definition of S (A, y)

to the decomposition of any permutation into circular permutations, det B = eO.

Since Q9k Bkk = e, there must exist another permutation ç such that Q9k Bkç(k) = e.Stated differently, there must exist a critical circuit connecting some m.s.c.s.'s ofGC(A) and this yields a contradiction. .

(by (3.28)) Example 3.102 If we return to Example 3.95, matrix A+ is equal to

where the last inequality stems from the fact that i(j), belonging to a circuit of asaturation graph, belongs also to 'lc by Theorem 3.98. The reverse inequality isderived immediately from the fact that Y is ai eigenvector of A +. .

( e ecc)

-1 -1 c c-2 -1 e e .-2 -1 e. e

Nodes 1, 3, 4 belong to GC(A) which has two m.s.c.s.'s, namely PÌ and -(3,4Ì.Columns 1 and 3 are independent eigenvectors. Column 4 is equal to column 3. .

Theorem 3.101 Given a matrix A with maximum circuit weight e, any eigenvectorassociated with the eigenvalue e is obtained by a linear combination of NÅ columnsof A+, where NÅ denotes the number of m.s.c.s.'s of GC(A). More precisely wehave

3.7.3 Spectral Projector

In this subsection we build the spectral projector on the eigenspace (invariant mod-uloid) associated with the eigenvalue e.

1. the columns A1, iE'l c, are eigenvectors..

2. if nodes i and j belong to the same m.s.c.s. of GC(A) , then A1 and Aj are'proportional' ..

Definition 3.103 (Spectral projector) A matrix Q satisfying AQ = QA = Q2 iscalled a spectral projector of A associated with the eigenvalue e.

Theorem 3.104 The matrices3. no A1 can be expressed as a linear combination of columns Aj which only

makes use of nodes j belonging to m.s.c.s.'s of GC(A) distinct from liJ. Q. ~ A+A+i .z i. i E 'lc , (3.29)

Proof The first statement has already been proved in Theorem 3.23. Consider nowthe second statement: since A+ A+ :: A+ and AtAj; = e, if nodes i and j belongto the same m.s.c.s. of GC(A), hence to the same critical circuit by Theorem 3.96,we have

Ai+At. .c Az+ = Ai+A~A+ .c Ai+A+' VLj ji - i i ij ji - j ji , , ,

are spectral projectors of A.

which shows that

Proof The properties AQi = QiA = Qi follow from the fact that the columnsA1, i E 'lc, are eigenvectors of A (from which we deduce by transposition that therows of A+ such that A~ = e are left eigenvectors). Let us prove that Qf = Qi,that is,

Az+A+' = Ai+, Vl.j ji i A+A+ = ffA+A+kAk+A+ ..i i. '\.z i i i.k

This relation is true because A~ = e implies EBk AtAt; = e. .,o,!,

Ii.I;IjlI',i

il

I

Ii

This result, together with (3.27), show that NÅ columns of A + are suffcient togenerate all eigenvectors.

The third statement of the theorem claims that we cannot further reduce thisnumber of columns. Otherwise, one column of A +, say i, could be expressed as alinear combination of other columns of A+ selected in other m.s.c.s.'s of GC(A). LetK denote the set of columns involved in this linear combination. Then, constructa matrix B as follows. Let J = K U -(iÌ. Matrix B is obtained from A+ by

deleting all rows and columns with indices out of J. By construction, Bkk = e, Vk,and the weights of all circuits of G(B) are less than or equal to e. The linearcombination of the columns of A + is preserved when restricting this combinationto matrix B. Owing to the multilinearty and antisymmetry of the determinant, and

Theorem 3.105 The matrix Q ~ EBiE'l' Qi, where the matrices Qi are defined by(3.29), is a spectral projector.

Proof The only nontrivial fact to prove is that Q2 = Q. This relation wil be provedif we prove that QiQj :: Qi E9 Qj. This last inequality is true because it means thatthe greatest weight of the paths connecting a pair of nodes and traversing i and j isless than the maximum weight of the paths connecting the same pair of nodes andtraversing either i or j. .

Page 85: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

150 SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA 151

Example 3.106 Continuing with Example 3.95, we obtain two elementar spectralprojectors:

Qi =

(e) ( e e c C)-1 ( ) = -1 -1 c c-2 e e c c -2 -2 c c '-2 -2 -2 c c

(C) ( C C C C)C (-2 -1 e e) = C C C C ,e -2 -1 e ee -2 -1 e ~

¡ilC¡'(A) (the m.s.c.s. of GC(A) to which i belongs). Therefore, because the maximumweight of the circuits is e, any maximum-weight path from i to j of length q greaterthan M(i) + p is composed of a critical circuit of length q - p traversing i and amaximum-weight path from i to j (of any length). Therefore A)i = At for all qgreater than p + M(i) and this holds for all i in GC(A). Since At = e, we alsohave Aa = A+:A+:J' J' ii.

Consider now another node L which does not belong to GC(A). Let i be a node in

GC(A), let q be large enough and let p :: n be such that Af¡ = At (such a p existsbecause circuits have weights less than e, hence the lengths of maximum-weightpaths between any two nodes do not need to exceed n). We have

Aa¡ / Aa:-P APi = A+:A+¡J - J" J'"

Ii

II

II1

I.

~

ill!!~ H

"

Ii!I

Q2 =

i..

( ,e C

D-1 -1 C

Q = Q i E9 Q2 = -1-2 e-2 -1 e

.3.7.4 Convergence of A k with k

where the inequality is a consequence of the matrix product in JRmax whereas the

equality arises from the previous part of the proof and from the property of p. Ifwe have a strict inequality, it means that the paths with maximum weight from jto L do not traverse i, and since this is true for any i in GC(A), these paths do nottraverse GC(A). On the other hand, for q large enough, they must traverse somecircuits which therefore have a stnctly negative weight. When q increases, thesepaths have weights arbitrarily close to c. Finally, this situation is possible only ifthere is no node of GC(A) located downstream of L in G(A). In this case At = c

for all i in GC(A) and thereforeI

i

In this subsection we give a necessary and suffcient condition for the convergenceof the powers of matnx A. To achieve this goal, we equip JRmax with the topology:

when n -- +00,

Xn -- X ~ IXn - xle ~ I exp(xn) - exp(x)I --0 .

lim Aa¡ = c = ff A+:A+a--HOQ J Q7 J' il

iE'I'

By collecting all the above results, we have proved thatThe purpose of this topology is to simplify the study of the convergence towardsc. Indeed, because exp(c) = e, limn IXn - cle = 0 and limn Ix~ - cle = 0 imply

that limn IXn - x~le = O. This property, which is not true with respect to the

usual absolute value in JR, is useful for the asymptotic cyclicity notion that we wilintroduce later on. We first recall the following result on the diophantine linearequation (see (33)).

Lemma 3.107 For all p and n which are coprime and for all q ;: (p - l)(n - 1),

there exist two integers a(q) and b(q) such that q = a(q)p + b(q)n.

lim AJa¡ = ff AtAt, \lj, l E G(A)q~oo \liE'I'

Conversely, suppose that the above limit property holds true and that at thesame time the cyclicity of GC(A) is stnctly greater than 1. Let us consider a nodei E GC(A) (hence At = e). We have

exp(A~xd) = exp( e) = exp(A~(d+l) + r¡ ,

Theorem 3.108 A necessary and suffcient condition to have limk--H'o Ak = Q isthat the cyclicitysee Definition 3.94-f each m.s.c.s. of GC(A) is equal to 1.

where r¡ can be arbitrarily small because of the assumed limit. But A~(d+i = Afifor 0 :: p :: n (again because circuits have nonpositive weights). Therefore, A~(d+1can assume values out of a finite set. From the relation above, it should be clearthat A~xd+1 = e. This means that there exists a circuit of length k x d + 1. But thegcd of kd and k x d + 1 is 1, which is a contradiction. .

Proof Let us prove the sufficient condition first. Consider a node i in GC(A). Forany other node j, there exists a path from i to j of maximum weight (possibly equalto c). If there happens to be more than one such path, we take the one with theleast length and call this length p( i, j) which is less than n - 1 if A is an n x nmatnx. If the maximum weight is c, we consider that the length is equal to 1.By Lemma 3.107 and the assumption on cyclicity, there exists some integer M(i)such that, for all m greater than M(i), there exists a cntical circuit of length m in

Theorem 3.109 Suppose that G(A) is strongly connected. Then there exists K suchthat

\lk ;: K, Ak = Q ,

if and only if the cyclicity of each m.s.c.s. of GC(A) is equal to 1.

Page 86: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

,, ,

i

~

Ii

I!

.ir

11,1

;11

I!!

152 153SYNCHRONIZATION AND LINEARITY MAX-PLUS ALGEBRA

Proof The proof is similar to the previous one. The only difference lies in thesecond part of the 'if' par. Under the assumption that G(A) is strongly connected,a path of maximum weight from L to j with length large enough necessarly crossesGC(A). Therefore, for q large enough we have

3.7.5 Cyclic Matrices

In this subsection we use the previous theorem to describe the general behavior ofthe successive powers of matrix A which turns out to be essentially cyclic.

Aai = A+.A+iJ J'" Definition 3.111

where i belongs to GC(A).Cyclicity of a matrix: a matrix A is said to be cyclic if there exist d and M such

that Vm ~ M, Am+d = Am. The least such d is called the cyclicity of matrixA and A is said to be d-cyclic.

Asymptotic cyclicity: a matrix A is said to be asymptotically cyclic if there ex-ists d such that, for all TJ / 0, there exists M such that, for all m ~ M,SUPij I(Am+d)ij - (Am)ijle :: TJ. The least such d is called the asymptotic

cycl(city of matrix A and A is said to be d-asymptotically cyclic.

.Example 3.110

. Using Example 3.95 once more, we have

A' ~ (D

Theorem 3.112' Any matrix is asymptotically cyclic. The asymptotic cyclicity d ofmatrix A is equal to the cyclicity P of GC(A). Moreover if G(A) and G(AP) areconnected, the matrix is p-cyclic.

e c-1 c-2 e-1 e

e-1-2

c

A3 = A4= . . . =

( e e c C)

-1 -1 c c-2 -1 e e .-2 -1 e e

Proof This result is already proved in the case p = 1. For any matrix A, if weconsider B = AP, then the asympotic cyclicity p' of B is equal to 1. Indeed, thenodes of the critical graph of B are a subset of GC(A), and around each such nodethere exists a loop. The necessar and sufficient conditions of convergence of thepowers of a matrix can be applied to B (see Theorems 3.108 and 3.109). Theyshow the convergence (possibly in a finite number of stages) of Bk = Akxp to thespectral projector Q associated with B. Because any m can be written h + k x p,Am = Ah+kxp = AhBk converges to AhQ when k goes to infinity. This is equivalentto saying that matrix A is d-asymptotically-cyclic (or d-cyclic in the case of finiteconvergence), with d :: p.

Let us prove that the asymptotic cyclicity d of matrix A is greater than or equalto p (hence it is equal to p). The proof when the matrix is not only asymptoticallycyclic but cyclic is similar. Consider a node of the m.s.c.s. L = ¡iJGC(A) of GC(A)

and let Pi denote its cyclicity. By definition of d, we have

Therefore An, n ~ 3, is equal to Qi E9 Q2 given in Example 3.106.

. In the previous example the periodic regime is reached after a finite number ofsteps. This is true for the submatrx associated with the nodes of the criticalgraph but it is not true in general for the complete matrix. To show this, takethe example

A = (-1 c)c e .. In the previous example there is an entry which goes to c. When all entries

converge to a finite number, the periodic regime can be reached also, but thetime needed may be arbitrarily long. Consider the matrix (AkXPI) ( ) (Akxpi+d)

exp ii = exp e = exp ii + TJ ,

A = ( -~-~ ). \

for TJ arbitrarly small and for k large enough. Therefore A~xpi = A7tp1+d and thereis a circuit of length d in the m.s.c.s. L of GC(A). Therefore Pi divides d. But thisis true for all m.s.c.s.'s of GC(A) and therefore d is divided by the km of all the Piwhich is p. .The matrix Ak converges to the matrix

( -~ e) Example 3.113 The matrix-1

if TJ is a small positive number. But we have to wait for.a power of order 1 fTJto reach the. asymptote. . ( -1 E c)A= c c e

c e c

Page 87: Synchronization and Linearity1 Contents Preface xv I Discrete Event Systems and Petri Nets 1 1 Introduction and Motivation 3 1.1 Preliminar Remarks and Some Notation , 31.2 Miscellaneous

ili': .

i

I

/

1111:'i

154 SYNCHRONIZATION AND LINEARITY

has cyclicity 2. Indeed,

C2n

c

:), ( -(2n+ I)

c

nCHAPTER 4

A2n = : e A2n+! = C C

C c e

DioidsI.3.8 NOTES

The max-plus algebra is a special case of a more general structure which is called a dioidstrcture. This is the topic of the next chapter. Nevertheless the max-plus algebra, and the

algebras of vector objects built up on it, are important examples of dioids for this bookbecause they are perfectly tailored to describe synchronization mechanisms. They were alsoused to compute paths of maximum length in a graph in operations research. This is whythey are sometimes called 'path algebra' (67).

Linear systems of equations in the max-plus algebra were systematically studied in (49).Some other very interesting references on this topic are (67), (130). In these references theGauss elimination algorithm can be found. It was not discussed here. Linear dependence

has been studied in (49), (65), (93), (126) and (62). Several points of view exist but none ofthem is completely satisfactory. Moreover the geometry of linear manifolds in the max-plusalgebra is not well understood (on this aspect; see (126)).

The only paper that we know on a systematic study of polynomial and rational functionsin the max-plus algebra is (51). In this paper one can find some results on rational functionsnot detailed in this book.

The symmetrization of the max-plus algebra was discussed earlier in (109) and (110).The presentation given here is based on these references. This symmetrization is more deeplystudied in (62). The reference (65) has been an important source of ideas even though

symmetrization has been avoided in this paper. The proof of the Cramer formula is mainlydue to S. Gaubert and M. Aldan. Relevant references are (118), (124), (93).

The attempt made here to discuss polynomials in § is new. It could give a new insight intothe eigenvalue problem. Because of the lack of space this discussion has not been continuedhere.

The section on the max-plus Perron-Frobenius theorem is a new version of the report(37). The proof is mainly due to M. Viol. Some other relevant references are (64), (49),(127).

4.1 INTRODUCTION

In previous chapters, the set lR U t -00)- (respectively lR U t +00)-) endowed with themax (respectively the min) operation as addition and the usual addition as multipli-cation has appeared as a suitable algebraic structure for obtaining 'linear' modelsof some discrete event systems. In Chapter 5 it wil be shown that another slightlymore complex structure is also appropriate for the same class of systems.

All these algebraic structures share some common features that wil be studiedin the present chapter. However, there is yet no universal name nor a definite setof axioms everybody agrees upon in this general field. We refer the reader to thenotes at the end of this chapter where some related works are briefly discussed.Here we adopt the following point of view: we introduce a first 'minimal' set ofaxioms according to what seems to be the intersection of axioms generally retained

in the works alluded to above, and also according to what seems to be appropriatefor the linear system theory we are going to develop in Chapter 5. Staring fromthis minimal set of axioms, we derive some basic results. To obtain further resultswe may need to introduce some additional assumptions or properties, which we doonly when necessar: it is then clear where this added structure is really needed.

We use the word 'dioid as the generic name for the algebraic structure studiedin this chapter. The linguistic roots of this name and its introduction in the literatureare discussed in the notes section.

Dioids are structures that lie somewhere between conventional linear algebraand semIlattices endowed with an internal operation generally called multiplication.With the former, it shares combinatorial properties such as associativity and com-mutativity of addition, associativity of multiplication, distributivity of multiplicationwith respect to addition, and of course the existence of zero and identity elements.

With the latter, it shares the features of an ordered structure (adding is then simplytaking the upper bound) endowed with another 'compatible' operation. Thereforeone may expect that the results of linear algebra which depend only on combina-torial properties wil generalize to dioids. A typical case is the Cayley-Hamiltontheorem. On the other hand, since neither addition nor multiplication are invertiblein general dioids (in this respect the max-plus algebra is special since the structureassociated with + is a group), one appeals to the classical theory of residuation inlattice structures to provide alternative notions of inversion of the basic operationsand of other order-preserving mappings. This yields a way to 'solve' some equationsin a certain sense related to the order structure even if there is no solution in a more