Ordinary Petri Net Matrices

. This work presents some ideas and theory on representing ordinary Petri nets using matrices and builds on previous work in [11],[12]. The three main types of matrices used for Petri net representation are the input, output and incidence matrices. The motivation for this work is that matrices can provide an alternative way to describe Petri nets from the conventional graphical representation. As is indicated several properties can be inferred, observed and derived from the matrices. Some definitions and examples are used.


Introduction
Petri nets [1]- [4] are expressive graphical and mathematical formalisms that share a dual identity. These are useful for modelling concurrency in asynchronous, distributed, parallel, deterministic and other configurations. Petri nets have been used extensively for modelling and representing discrete interactive and concurrent behaviour. Their application can be extended to systems with mobile connectivity and configurations.
The structure of Petri nets in graphical terms is that these are bi-partite diagrams. To simplify a bit, the topographical structure of Petri nets is that these are composed of structured nodes and edges. In simple terms a Petri net is a digraph.
Petri nets look visually similar to other diagrammatic notations like UML 2 activity diagrams and flowcharts. However they are intrinsically different. There exists some form of equivalence between Petri nets and other graphical notational structures. There is a lack of knowledge how to combine Petri nets with other formalisms and structures. This is a possible challenge where to find a common basis. Combining other structures and notations could be quite useful for creating other methods or approaches for software and system modelling especially in the near future [13]- [14].
A fundamental feature of Petri nets is that the structure of the net remains unaltered when the net is executed. It is only the token count in the various places of the net that changes [6]- [10].
Petri nets can be represented using equations, state equations or other notations. One possible way of representing Petri nets is using matrices. The matrices can be used to construct more concise forms of Petri nets. It is possible to represent well formed and well behaved basic Petri nets. Several basic analysis methods rely on the principle that the Petri net has a given solution and is restricted, i.e. it has a limited state space.
The properties are normally derived from the transition or place invariants that can cover parts or all of the net. Boundedness, safeness, liveness, reversibility, home states, coverability, reachability are main properties that allow for simple verification. These properties related to Petri net execution and structure are obtainable from the incidence matrix in conjunction with the marking vector and other values.
Matrices are useful for representing the static structure of ordinary Petri nets. But the execution of the net requires additional representation. Matrices are useful to represent that part of Petri nets that does not require changes. If higher order net structures are used then the properties pertaining to the higher order net cannot be represented using matrices, it is only the structural outline that is easily depicted.
The most common matrices that are usable for Petri net representation are the incidence matrix and input and output matrices. The input and output matrices can depict certain details that are not visible in the incidence matrix.
M at r i x r ep r esen t at i on can b e ext en d ed t o r ep r esen t i n g t h e m ar k i n g gr ap h an d execu t i on al cy cl es.
The input flow, output flow matrices and the incidence matrix have special properties that can be used for different forms of analysis.

Motivation
Petri nets are very interesting graphical and mathematical formalisms. A lot of literature has been written about their formalisation and representation using complex notations. Sometimes the most fundamental principles are overlooked. From the static representation of the net structure, the behaviour of the net can be inferred. Ordinary Petri nets can offer nontrivial modeling solutions for diverse problem classes. Unfortunately the more complex the net the more difficult it becomes to predict its dynamic behaviour. However, there are still some basic properties of the Petri net are valid for analysis.
The main reason for this paper it to explain the importance of Petri net representation using matrices. This key property of Petri nets is very often ignored or underrated. Matrices have interesting mathematical properties that can be used for further analysis. Matrices can be used to find alternative combinations and configurations. The matrices can be used to prove that two nets are similar or dissimilar. The one property of a Petri net that is simple to construct include the inflow and outflow matrices of the net. The principle of the incidence matrix which is derived from the input and output matrices is analogous to the construction of adjacency matrices for directed graphs.
The matrices for Petri nets can be constructed for very large nets. Obviously the matrices allow for simpler and more compacted representation. Certain fundamental properties can be understood just by glancing at these matrices.

Some Basic Definitions and Properties
These definitions and properties are based from previous work presented in [11] and [12].

Petri Net Definition
An ordinary Petri net is defined as bi-partite digraph, with two vertice types. A Petri net is a four tuple set, PN = (P,T,F,W). P is a finite non empty set of places P= {p1,p2,p3,…,pn}. T is a finite non empty net of transitions T= {t1,t2,t3,…,tn}. F is a finite non empty set of flows from a place to a transition and vice-versa, given as . Normally (PxT) represents the input arcs also denoted as I and (TxP) represent the output arcs denoted as O.
W is a weight function or marking value for the tokens at a place p, given as } ,..., Places and transitions are disjoint i.e. φ = ∪ T P and φ = ∪ P T . Nodes are not isolated. The Petri net can have an initial marking this is normally given as Mo.

Ordinary Nets vs Non-Ordinary
. This implies that all arcs weights are defined as having a multiplicity or value of 1. This fundamental property can be directly observed from the input flow matrix and the output flow matrix. If there are no entries > 1 in both matrices then the Petri net is If there is an entry or value > 1 then it is defined as a non-ordinary net.

Node Properties
A node in an ordinary Petri net refers to either a place or a transition, y is a node iff y T P ∪ ∈ . The input set or pre set of a transition t implies the set of all input places to t. This can be written as The output set or post set of t is the set of all output places from t. This can be written as The nodes of Petri nets are of two types. Either place or transition type. This restricts the structure of the net.

Petri net execution using Matrices and Vectors
Transition firing in the ordinary Petri net is given as M 1 = M 0 + Cf . M 0 is the initial marking vector and f is the firing vector, i.e. which transition is to fire. M 1 is the new resultant marking. The initial marking vector M 0 represents the initial state of the net. C is the incidence matrix.

Input Flow, Output Flow and Incidence Matrices
A simple way to represent the structure of Petri nets using mathematical notations is to use input/output matrices.
Unless the physical structure of the Petri net is altered these matrices should remain fixed or unchanged. Structural information of the net is captured or encoded in the input and output matrices. The input matrices captures all the place inputs to all the transitions whilst the output matrices captures all the outputs from the transitions to places.
The incidence matrix can be constructed from the input and output matrices. The input /output matrices are constructible for almost every type of net independently whether it is live or not. I.e. the tokens are not considered at all. Firing the net has no effect on the incidence matrix.
The incidence matrix contains structural information about a Petri net, i.e. the connections from places to transitions and vice-versa, along with all the number of transitions are represented in the incidence matrix.
The incidence matrix can be created for a Petri net independently if the net is live or not or if there are other issues.

Input Flow, Output Flow and Incidence Matrices Definitions
The I ij matrix is a matrix that contains the complete set of input flows from places to transitions. It can be given as ) ) , ( : . The values are non-negative. The O ij matrix is the complete set of output flows from transitions to places. I.e. ) ) , Again these values are non-negative.
The incidence matrix C ij also denoted simply as C is composed of the difference between the output flow matrix O ij and the input flow matrix I i thus C ij = O ij -I ij . The incidence matrix representation can also be written To have the complete picture of the Petri net, the input flow matrix and the output flow matrix have to be examined together. This is because in the final incidence matrix C ij it is possible to end up with flows that cancel each other out. E.g. if input and output flows cancel each other out, then in the incidence matrix there would be a zero value that would not indicate anything of use.
The address of the element in the matrix are determined by the values i,j. where i represents the row number, i.e. the place row and j represents the column, i.e. the transition column.
The idea of the input, output and incidence matrix is given below. Letter values are used for the arc weights.

Problem Definition
Matrices can be used to represent ordinary Petri nets and infer several properties related to structure and behavior.

Dimensions of the Matrices
The matrix dimensions represent the size of the Petri net and vice-versa. E.g. a Petri net having 20 places and 24 transitions would be represented via a 20x24 matrices irrespectively of the connections in the net structure (the input and output arcs do not in any way affect the size of the matrix). Similar properties related to the matrix dimensions hold for the input and output matrices.
The dimensions of the matrices can be used to compare the properties of two or more Petri nets. E.g. if the dimensions of the incidence matrices for two Petri nets are 10x20 and 10x7. This implies that both Petri nets have the same number of places only. If there are two incidence matrices 7x10 and 5x10 this implies that both Petri nets have 10 transitions and varying amount of places. The corresponding incidence matrix for fig. 1 is given below:

Petri net example and its Matrices
If the arc weights have a value of one the 3x2 incidence matrix depicted below is constructed.
It is evident that (f-e) cancel each other out so the input and output matrices can carry more structural information about the net than the incidence matrix.

Square Matrices
This is a special case of the incidence matrix or input/ output matrix. This is only possible when the number of places and the number of transitions of the Petri net are equal. For this to be possible the Petri net must be constructed keeping these principles in mind. However there are instances where these properties could result automatically.

Parallel Rows of the Incidence Matrix
The parallel rows of the incidence matrix show that places are parallel to each other.
These features or attributes are not necessary directly visible from the net itself as the drawing of the net might not be so clear due to issues with the layout. Having parallel places implies that there could be parallel states occurring during the execution or static state of the net.

Parallel Columns of the Incidence Matrix
The parallel columns of the incidence matrix also indicate that the transitions occur in parallel.

Inferring Concurrency from the Incidence Matrix
If there is an incidence matrix for a Petri net that is properly labelled. It is possible to infer if transitions can possibly occur concurrently. Note that this just indicates the possibility of this taking place.

Separate Petri nets having Identical Number of Transitions and Identical Number of Places
Definition 1: If two Petri nets have incidence matrices with identical dimensions it follows by definition that the Petri nets must have an identical number of places and an identical number of transitions. The number of connections can differ. The sum of these two incidence matrices is possible. This implies that if two Petri nets have incidence matrices with identical dimensions it is possible to add these incidence matrices together. A better way would be to sum the input and output matrices for both nets and create new ones and then to derive the incidence matrices. The result of adding these matrices together is the creation of new nets. I.e. the different nets are combined into one. E.g. if we have A1 and A2 and the orders for A1,A2 are identical Mo= M1 then A1 can be added to A2 or vice-versa. Definition 2: From definition 1, it holds that if two nets are identical their arcs can be summed together. Converting this net into the incidence matrix should yield the same value as summing the incidence matrices of the individual identical nets.

Difference of Incidence matrices having identical dimensions :
This is possible but the result could be a net with dangling nodes. I.e. it is possible to have a result of unconnected nodes. The definitions for doing this can be based on the definitions previously given which need to be amended.

Separate Petri nets Not having Identical Number of Transitions and Identical Number of Places
Given a Petri net where the no. of places ≠ no. of transitions. I.e. the number of transitions and places is not equal, then there cannot be an incidence matrix that is square. Hence there cannot be a symmetric matrix.

Possible Properties for Petri nets having Square Matrices
Deduction: That if there is a net having the same amount of places and transitions. i.e. no. of places = no. of transitions and properly labelled in sequence, the incidence matrix will be a square matrix that is possibly symmetric. Where T A A = .

Decomposing or Representing the Petri net using Column and Row Vectors
The incidence matrix of the Petri net can be easily decomposed or separated into column and row vectors. This is easier to do if there are several unconnected subnets. This is explained in [11] and [12].

Some Examples and Results
For the following examples it is assumed that the matrices are created from respective Petri nets and the row and columns follow ordered labelling. Rows represent places (p1,p2,...,pn) whilst columns represent transitions (t1,t2,...tn).

Row and Column Vectors
The following square incidence matrix implies that row vector [-1 0 0] has a place P1 represented by this vector. There is an input transition t1 but no outputs are visible. A column vector implies that transition t1 has an input place p1 and an output place p2.

Concurrency and Parallel Behaviour
The following 3x3 square incidence matrix implies that out of three transitions two are parallel or concurrent.
The following matrix implies that three transitions are parallel or concurrent.
This incidence matrix implies that place p1 has one input and one output. These could occur in parallel or concurrently. Place p2 has two outputs that must occur in parallel.
Implies that e.g. t1 outputs to places p2/p3 concurrently for sure.
Im p l i es t h at t 1 get s or awai t s i n p u t s f r om p 1 an d p 2 con cu r r en t l y .

Inferring Conflict and Choice
If a row vector n i of the incidence matrix has > 1 negative values then it implies that a place represented by the row connects to more than one transition. So to explain in simpler terms a place is shared between two or more transitions. Thus there is the possibility for conflict or choice arising.

Direct Sum of Square Subnet Matrices having identical dimensions
In this particular example if the weight values of the input arcs and output arcs are identical the result of the incidence matrix would be a zero matrix. There is also the possibility of having an identity matrix.
If there are nets that are unconnected or broken down into sub-components, if the number of places and the number of transitions for the net are equal, i.e. the nets incidence matrices can be represented using square matrices A 1 , A 2 ,……, A n of order m 1 ,m 2 ,……., m n where m 1 = m 2 =,….,= m n. It is possible to create a generalized ordered matrix A through the direct sum of A 1 , A 2 ,……, A n. The values A 1 , A 2 ,……, A n are the diagonal values in A. This can only be done if nets A 1 , A 2 ,……, A n are completely unconnected.  fig.4 indicates that the input value is 0.25 or one fourth of a token. The incidence matrix is represented as the vector

Some Uses of Petri net Matrices and Findings
These Petri net matrices have important uses for finding transition and place invariants as is already done in general Petri net theory. However several other uses for these nets can be identified. E.g. they could be used for verification of concurrency and reliability issues of the nets. The matrices can be considered to be fundamental properties of Petri nets and also the counterpart representation of the Petri net. Many different definitions related to Petri nets are used in literature. E.g. ordinary or non-ordinary nets. However such definitions are subjective in the sense that they pertain to fixed Petri net classes. It is possible to create new definitions or find new names for these properties.
As has been done in previous work [11]- [12] it is possible to invert the matrices and find several other properties that have not been discussed here. In real life scenarios these matrices represent patterns of behavior and organization. The matrices are a concise and direct way of representing the Petri net more formally and mathematically from just using a simple drawing.
The ideas of using vectors and fractional values shows that even simple matrices can exhibit several types of behavior that are not immediately obvious. This work can be extended to different areas of Petri net research and can include other types of nets.
Unfortunately for analysis sake each Petri net has to be understood in isolation. Just a simple modification of the input or output arcs of the Petri net can result in a totally new independent configuration which implies that a previous condition or result would not necessarily hold true. Modifying the basic structure of the net like adding new places and transitions will create completely different configurations.

Concluding Remarks
This work demonstrates the importance of using matrices for Petri net representation and for understanding and analyzing important properties. It is hoped that in the future more work is done in this direction.
Pictures are the traditional means for communicating and explaining this between systems and persons. Normally much attention is paid to the graphical or pictorial part. Petr nets can be used to serve both ends.