**4. Synchrony**

Careful observation reveals that sequential relation, concurrent relation and conflict relation are not relations between two transitions, but rather, they are relations between transition firings, i.e. two transitions may fall into one relation at a marking and fall into a different relation at another marking. Thus, a more precise way to denote these relations is: sq(M[t1>, M[t2>), cn(M[t1>, M[t2>), and cf(M[t1>, M[t2>) respectively. Note that sq(M[t1>, M[t2>) is asymmetry.

Synchrony is about how transitions themselves are synchronized. It describes laws exhibited in the course of transition firings. For example, the sunrise and the sunset are alternating "transitions" while a hand-clapping "transition" consists of simultaneous actions of the two hands. One may observe one more sunrise or one more sunset, depending on the times the observation starts and ends, but one always counts the same number of actions of the two hands for hand clapping. The laws exhibited by alternating transitions and simultaneous transitions are given by "the synchronous distance is 1" and "the synchronous distance is 0" respectively.

The concept of synchronous distance was originally defined in terms of events in a C/Esystem, which is a model describing changes in the nature, like the changes of 4 seasons. A C/E-system has no initial marking. Instead, it has a current marking. This chapter is about artificial systems. We have to redefine this concept of synchronous distance to serve our need.

### **4.1. Synchronous distance in a P/T-system**

A net system as defined by Definition 3 and 4 is conventionally called a Place/Transitionsystem, P/T-system for short.

Definition 7

112 Petri Nets – Manufacturing and Computer Science

how to find efficient analysis methods.

disabled (by others) without firing.

**4. Synchrony** 

asymmetry.

respectively.

The set [M0> may be infinite for a finite system. The algorithm for computing [M0> produces a finite tree, denoted by T(Σ), and this tree can be re-structured to become a graph, denoted by G(Σ). G(Σ) will be used for the computing of synchronous distances later on. All these

So far we have not said a word about how to relate a net to the real world. This reflects an important aspect of Petri net, that is, a net is unexplained. This nature of nets has its good point and bad point. The good point is: the same net or net system may be explained in different application areas to solve different problems; the bad point is: unexplained transition firings lead to general analysis methods that are bound to be of low efficiency,

A net is "physically implementable" when every element in S∪T has an explaination for a fixed application problem, and every transition firing describes real changes in that application area. A net describes how real changes relate with each other. This chapter aims to show how to build, with the guidance of GNT, net systems for workflow modelling and

Some transitions are defined as "instant transitions" in Timed Petri Nets, for they fire instantly when they become enabled. What would happen when two instant transitions are in conflict? Conflict resolution takes time since it needs to be detected and it requires a decision from the system environment. Generally speaking, an enabled transition may be

Careful observation reveals that sequential relation, concurrent relation and conflict relation are not relations between two transitions, but rather, they are relations between transition firings, i.e. two transitions may fall into one relation at a marking and fall into a different relation at another marking. Thus, a more precise way to denote these relations is: sq(M[t1>, M[t2>), cn(M[t1>, M[t2>), and cf(M[t1>, M[t2>) respectively. Note that sq(M[t1>, M[t2>) is

Synchrony is about how transitions themselves are synchronized. It describes laws exhibited in the course of transition firings. For example, the sunrise and the sunset are alternating "transitions" while a hand-clapping "transition" consists of simultaneous actions of the two hands. One may observe one more sunrise or one more sunset, depending on the times the observation starts and ends, but one always counts the same number of actions of the two hands for hand clapping. The laws exhibited by alternating transitions and simultaneous transitions are given by "the synchronous distance is 1" and "the synchronous distance is 0"

The concept of synchronous distance was originally defined in terms of events in a C/Esystem, which is a model describing changes in the nature, like the changes of 4 seasons. A C/E-system has no initial marking. Instead, it has a current marking. This chapter is about

concepts and algorithms are in the category of techniques, we will go no further here.

since they cannot make use of application specific properties.

LetΣ= (S,T;F,K,W,M0) be a P/T-system. A sequence of transitions δ= t1t2⋯tn is called a transition sequence if they can fire one after another in the given order, starting from the initial marking. The length of δ is n.

An infinite sequence of transitions is a transition sequence if any of its finite prefix is a transition sequence. ◆

In what follows ρ denotes the set of all transition sequences of Σ.

Definition 8

Let Σ=(S,T;F,K,W,M0) be a P/T-system and T1, T2 be subsets of T, T1≠ ∅, T2≠ ∅. Let � be a finite transition sequence, i.e. δ ∈ ρ. Let #(δ, T1), #(δ, T2) denote the numbers of firings of transitions in T1,T2 respectively, and #(δ, T1,T2) = #(δ, T1) -#(δ, T2). The synchronous distance between T1 and T2, denoted by σ(T1,T2), is defined by

σ(T1,T2) = max{#(δ, T1,T2)∣δ∈ ρ} - min{#(δ, T1,T2)∣δ∈ ρ }if exists, other wise σ (T1,T2) = ∞. ◆

Figure 3 (a) is P/T-system Σ1 and its set of transition sequences is {a, ab, b, ba}. We have, for T1 = {a} and T2 ={b}, max{#(δ, T1,T2)∣δ∈ ρ} = 1 and min{#(δ, T1,T2)∣δ∈ ρ } = -1, so σ(T1,T2) = 2.

(a) Σ1, (b) Σ<sup>2</sup>

**Figure 3.** σ(a,b) =2

Note that we write σ(a,b) =2 instead of σ(T1,T2) =2 in figure 3 by convention when both T1,T2 are singletons.

The set of transition sequences of Σ2 is infinite and it contains infinite sequences. It is easy to check that any repeatable portion in a finite or infinite transition sequence contains the same

#### 114 Petri Nets – Manufacturing and Computer Science

number of firings of transition b and transition a. This is why σ(a,b) is finite. The consecutive firings of transition a count at most to 2, so do the consecutive firings of transition b. This is the physical meaning of σ(a,b) =2 for Σ2.

The distance (i.e. synchronous distance from now on) between left hand action and right hand action is 0, since it is impossible to see only an action of either hand in the course of hand clapping.

Figure 4 (a) shows another situation of σ(a,b) =2, where transitions a and b are in conflict at the initial marking. Figure 4 (b) is still another case of σ(a,b) =2.

Workflow Modelling Based on Synchrony 115

We have said that hand clapping is a single transition consisting of actions of two hands; A live show and the on-going game would appear in a net as one transition as well since if they were separated as different transitions in parallel, ordered firings would produce the same effect , but this cannot be true. Synchronization characterized by distance 0 is "transition synchronization". Synchronization with σ(T1,T2) > 0 is "place synchronization" since such synchronization is achieved via places and it can be observed by taking an added

System Σ5 in Figure 5 (a) is the same system as shown in Figure 3 (b) with an added place p denoted by a dotted circle and connected to transitions by dotted arrows. This added place

An observer records what he finds through the window by putting a token into p when transition a fires and removing a token from p when transition b fires. It is assumed that place p has enough tokens, say n tokens, to start with, so the recording would not be interrupted. The maximum number of tokens in p is n+1 while the minimum is n-1. So the difference is 2 between transition b and transition a. The same observation applies to Σ6 to

The observation window p for disjoint transition sets T1 and T2 is an added place whose input arcs are from T1 and output arcs are pointing to T2. Place p gets a token whenever a transition in T1 fires and loses a token whenever a transition in T2 fires. Place p has enough tokens to start with to ensure a smooth observation. In case the number of tokens in p is not bounded, the distance between T1 and T2 is ∞. Otherwise, the difference between the

It is easy to find that σ(a,b) = ∞ for the P/T-system in Figure 6 (a), since the repeatable sequence t1abat2 contains two firings of a and only one firing of b. The added place p as shown in Figure 6 (b) has weight 2 on the arc from p to transition b, it would have n+1 tokens after the first firing of a and n-1 tokens after the firing of b. The difference is 2.This is a weighted distance between b and a: σ(a,2b) = 2, the weight for a is 1 while the weight for b is 2. The concept of weighted synchronous distances makes a distinction when infinite

place as an observation window.

(a) Σ5 (b) Σ<sup>6</sup>

get the same distance.

does not belong to Σ5, it is to be used for observations.

**Figure 5.** Added Place as Observation Window

maximum and the minimum is the distance.

(a) Σ3 (b) Σ<sup>4</sup>

**Figure 4.** σ(a,b) =2: a and b in conflict

#### Theorem 2

The synchronous distance defined by Definition 8 satisfies distance axioms:

σ(T1,T2) = 0 if and only if T1 = T2 ; σ(T1,T2)≥ 0; σ(T1,T2) = σ(T2,T1); σ(T1,T2) + σ(T2,T3)≥ σ(T1,T3). ◆

This theorem explains why the concept is called distance. It is assumed that T1∩T2= ∅ when σ(T1,T2)> 0, since σ(T1,T2) = σ(T1-T2, T2 - T1) by definition.

#### Theorem 3

σ(T1,T2)<∞ if and on ly if for any repeatable portion δ of any sequence in ρ, #(δ, T1,T2) = 0. ◆

It is easy to prove the above two theorems, so omitted here.
