**4. Search of a firing sequence**

Given the initial marking **M**0 and the destination marking **M**d of a PN, a solution **X**ei is solved from **AX**=**M**d-**M**0. Then, an algorithm is developed to determine whether **M**d is reachable from **M**0 under **X**ei or not. If **M**d is reachable from **M**0, the algorithm gives the associated firing sequence S(**X**ei).

**Definition 12.** Let S= t1t2…tr be a finite transition sequence. The transitions appearing in S are defined by the set Z(S) ={t1, t2, …, tr}. The set of transitions Z(S) is called a sequence component. Z(S) is the set of elements that appear in a transition sequence S.

**Algorithm 2.** Search of a firing sequence S(**X**ei) under **M**<sup>0</sup>

**Step 1.** According to **I**, determine all the conflict structure Ci=<p, Tci>, and construct Tc and C.

**Step 2.** Initialization: Let *M*=**M**0, *X*=**X**ei, *S*=λ (λ is the sequence of length zero)

**Step 3.** Under *M* and *X*, calculate **F**=**F**o+**F**c from Definition 6.

If **F**o≠**0**, go to Step 4.

430 Petri Nets – Manufacturing and Computer Science

2 r2

3 r1

Go to Step 4 in Algorithm 1.

**4. Search of a firing sequence** 

associated firing sequence S(**X**ei).

**Step 5-3.** If Xtemp=Φ, then end

executable solution.

and C.

( (r) {p|p t T( ) } )

**<sup>W</sup> <sup>U</sup>** =3.

( )(r) {p|p t T( ) } )

**<sup>W</sup> <sup>U</sup>** =3.

**V**+**U**1+2**U**2, **V**+2**U**1+**U**2, **V**+2**U**1+2**U**2, **V**+2**U**1+3**U**2}

**V**+2**U**1+**U**2, **V**+2**U**1+2**U**2, **V**+2**U**1+3**U**2, **V**+**U**2+3**U**1}

**V**+2**U**1+3**U**2, **V**+**U**2+3**U**1}. Let's put Xtemp=Φ.

**Step 4-3.** For any pair of (**B**i, **U**j), because T(**U**j) T(**B**i), Xtemp=Φ

For (**V**+**U**2, **U**2), because T(**U**2)T(**V**+**U**2), choose the next pair.

If T(**U**1) T(**V**+**U**2), then **D**3=(**V**+**U**2)-max(**V**+**U**2)**U**1, **W**3(r)=f(**D**3(r)),

Then add **V**+2**U**1+**U**2, **V**+2**U**1+2**U**2, and **V**+2**U**1+3**U**2 to Xtemp. So Xtemp={**V**+**U**1+**U**2,

Then add **V**+**U**2+**U**1, **V**+**U**2+2**U**1, and **V**+**U**2+3**U**1 to Xtemp. So Xtemp={**V**+**U**1+**U**2, **V**+**U**1+2**U**2,

So, Xe=Xe+B={**V**, **V**+**U**1, **V**+2**U**1, **V**+**U**2, **V**+**U**1+**U**2, **V**+**U**1+2**U**2, **V**+2**U**1+**U**2, **V**+2**U**1+2**U**2,

**Step 5-2.** If Xtemp≠Φ, then let B=Xtemp={**V**+**U**1+**U**2, **V**+**U**1+2**U**2, **V**+2**U**1+**U**2, **V**+2**U**1+2**U**2,

**M**d is reachable from **M**0. The firing sequence is t9\*t7\*t4\*t1\*t5\*t6\*t7\*t2\*t4\*t5\*t6\*t10\*t3\*t8. Its firing count vector corresponds to **V**+2**U**1+**U**2=(1,1,1,2,2,2,2,1,1,1) in the sufficient test space Xe. This example illustrates that suppressing **B**i+k**U**j (k=β) in Xe may eliminate some possible

Given the initial marking **M**0 and the destination marking **M**d of a PN, a solution **X**ei is solved from **AX**=**M**d-**M**0. Then, an algorithm is developed to determine whether **M**d is reachable from **M**0 under **X**ei or not. If **M**d is reachable from **M**0, the algorithm gives the

**Definition 12.** Let S= t1t2…tr be a finite transition sequence. The transitions appearing in S are defined by the set Z(S) ={t1, t2, …, tr}. The set of transitions Z(S) is called a sequence

**Step 1.** According to **I**, determine all the conflict structure Ci=<p, Tci>, and construct Tc

component. Z(S) is the set of elements that appear in a transition sequence S.

**Algorithm 2.** Search of a firing sequence S(**X**ei) under **M**<sup>0</sup>

10

r 1

For (**V**+**U**2, **U**1),

**V**+2**U**1+3**U**2, **V**+**U**2+3**U**1}.

10

r 1

If **F**o =**0** and **F**c≠0, go to Step 5.

If **F**=**0**, go to step 6.

**Step 4.** If **F**o≠0, then there exists an S(**F**o) that has a firing sequence under *M*. Therefore, S(**F**o) can be fired. The reachable marking is calculated by **M**'=*M*-**AF**o,

Let *M*=**M**', *X*=*X*–**F**o, *S*=*S*\*S(**F**o), where \* is concatenation operation and *S*\*S(**F**o) means *S* followed by S(**F**o). Go to Step 3.

**Step 5. F**o =0 and **F**c≠0 means that all transitions in S(**F**c) are effective conflict transitions. Therefore, branching occurs and the number of branches is |T(**F**c)|. From here, the computation has to consider all |T(**F**c)| branches.

After selecting a transition tj∈T(**F**c), fire it, then the reachable marking is calculated by **M**'=*M*-**A***e*[tj].

Let *M*=**M**', *X*=*X*–*e*[tj], *S*=*S*\*tj.Go to Step 3


The validity of the above algorithm is proved as the following four cases:

Base: Let **X** be a solution of **AX**=**M**d-**M**0. The actual firing vector **F**=**F**o+**F**c is obtained with **M** and **X**. Let to∈T(**F**o) and tc∈T(**F**c).

Case 1: If **F**o≠**0** and **F**c=**0**, then multiple firing of S(**F**o) doesn't affect a firing sequence associated with **X** under **M**0, for the input places of T(**F**o) don't affect the enabling condition of other transitions in T(**X**) except transitions in T(**F**o).

Case 2: If **F**o=**0** and **F**c≠**0**, then the firing of each transition in S(**F**c) is considered as a branch and implemented with respect to all branches. It means that all possibilities are involved. So, Algorithm 2 doesn't eliminate any possible firing sequence.

Case 3: If **F**o=**0** and **F**c=**0**, then no transition is enabled.

Case 4: If **F**o≠**0** and **F**c≠**0**, then the multiple firing of S(**F**o) can be implemented before S(**F**c). It doesn't eliminate any probability of finding a firing sequence associated with **X** under **M**0. It is proven in Proposition 1.

**Proposition 1.** If σ∈S(**X**) is a firing sequence under **M**0, then (S(**F**o)\*σ')∈S(**X**) is a firing sequence under **M**0 for any sequence σ'.

Proof:

**Step 1.** Let T(**F**o)={to1, to2, …, ton}. For a transition to1∈T(**F**o), σ can be represented as σ =σ1\*to\*σ2, where to1Z(σ1). Then **M**<sup>0</sup> <sup>1</sup> <sup>σ</sup> **M**<sup>1</sup> o1 <sup>t</sup> **M**<sup>2</sup> <sup>2</sup> <sup>σ</sup> **M**d is a firing sequence. Since T(**F**o) is the set of transitions possible to be enabled under **M**0, **M**0 enables to1. Therefore it is possible to put **M**<sup>0</sup> o1 <sup>t</sup> **M**3. By the definition of **F**o, we have M3(p)≥M0(p) for any p∈Z(σ1). So σ1 is enabled under M3 because σ1 is enabled under M0 (Monotonicity Lemma). After σ1 firing, **M**2 is reachable from **M**3. Therefore, we have **M**<sup>0</sup> o1 <sup>t</sup> **M**<sup>3</sup> <sup>1</sup> <sup>σ</sup> **M**2. Since σ2 is enabled under M2, to1\*σ1\*σ2 is a firing sequence under **M**0.

Reachability Criterion with Sufficient Test Space for Ordinary Petri Net 433

**Step 1.** There are two conflict structures, C1=<p1, {t2, t5}>, C2=<p2, {t3, t4}>, Tc={t2, t3, t4, t5}.

**Step 2.** Initialization: *M*=**M**0= (0,0,0,0,0,0,1,0,0), *X*=**X**=(1,2,1,1,1,1,1), *S*=λ **Step 3.** Under *M* and *X*, only t6 is 1-enabled. Then, **F**o=(0,0,0,0,0,1,0).

**Step 3-1.** Under *M* and *X*, **F**o=(0,0,0,0,0,0,1).

**Step 4.** Fire S(**F**o)= t6. Then the reachable marking **M**' becomes (1,0,0,0,0,0,0,1,0)

**Step 4-1.** Fire S(**F**o)=t7. Then, the reachable marking becomes **M**'=(1,0,0,0,0,0,1,0,1)

Let *M*=**M**', *X*=*X*-**F**o=(1,1,1,1,1,0,0), *S*= t6\*t7\*t2. Go to Step 3 in Algorithm 2.

**Step 4-2.** Fire S(**F**o)=t2 (t2 is not an effective conflict transition because t5 cannot enable),

**Step 4-3.** Fire S(**F**o)=t3 (t3 is not an effective conflict transition because t4 cannot enable),

Let *M*=**M**', *X*=*X*-**F**o=(1,1,0,1,1,0,0), *S*= t6\*t7\*t2\*t3. Go to Step 3 in Algorithm 2.

**Step 7.** There is no effective conflict transition i.e., no branch. Consequently, **M**d is not

The above implementing process can be presented by a firing path tree as shown in Figure 4.

An example will be given to illustrate how to use the proposed method of Algorithm 1 and

**Example 4.** When the initial marking is **M**0=(1,0,0,0,0,0,0,0,1) in the PN of Figure 5, is the

**Step 1.** Solve the equation **AX**=0, get one positive integer minimal T-invariant

**Step 2.** Solve the equation **AX**=**M**d-**M**0, get the positive integer minimal particular solutions

Let *M*=**M**', *X*=*X*-**F**o=(1,2,1,1,1,0,0), *S*=t6\*t7. Go to Step 3 in Algorithm 2.

**Step 3-2.** Under *M* and *X*, **F**o=(0,1,0,0,0,0,0). Go to Step 4 in Algorithm 2.

**Step 3-3.** Under *M* and *X*, **F**o=(0,0,1,0,0,0,0). Go to Step 4 in Algorithm 2.

then the reachable marking becomes **M**'=(0,1,0,0,1,0,1,0,1)

then the reachable marking becomes **M**'=(0,0,1,0,1,0,1,0,1)

**Step 3-4.** Under *M* and *X*, **F**=**0,** go to Step 6 in Algorithm 2.

**Step 6.** Because *X*≠**0,** go to Step 7 in Algorithm 2.

**5. Application of Reachability Criterion** 

destination marking **M**d=(0,0,1,0,1,0,0,0,1) reachable from **M**0 ? First, calculate sufficient test space using the following steps:

**Step 3.** Initialization: Let Xe={**V**1, **V**2, **V**3}, Xtemp=Φ, B=Xe

**V**1=(0,2,1,0,2,2,0,0), **V**2=(2,2,1,2,0,0,0,0) and **V**3=(1,2,1,1,1,1,0,0)

Algorithm 2 to solve the reachability problem.

reachable under **X** because *X*≠**0**.

**U**=(0,0,0,0,0,0,1,1).

**Step 4-1.** For (**V**1, **U**),

Let *M*=**M**', *X*=*X*-**F**o=(1,2,1,1,1,0,1), *S*=t6. Go to Step 3 in Algorithm 2.


**Example 3.** Let us now apply the proposed algorithm to the PN of Figure 3. Given **M**0=(0,0,0,0,0,0,1,0,0), **M**d=(0,0,0,0,1,0,1,0,0) and **X**=(1,2,1,1,1,1,1), determine if **M**d is reachable or not under **M**0 and **X**.

**Figure 3.** Petri net structure


Let *M*=**M**', *X*=*X*-**F**o=(1,2,1,1,1,0,1), *S*=t6. Go to Step 3 in Algorithm 2.

**Step 3-1.** Under *M* and *X*, **F**o=(0,0,0,0,0,0,1).

432 Petri Nets – Manufacturing and Computer Science

**Step 1.** Let T(**F**o)={to1, to2, …, ton}. For a transition to1∈T(**F**o), σ can be represented as σ =σ1\*to\*σ2, where to1Z(σ1). Then **M**<sup>0</sup> <sup>1</sup> <sup>σ</sup> **M**<sup>1</sup> o1 <sup>t</sup> **M**<sup>2</sup> <sup>2</sup> <sup>σ</sup> **M**d is a firing sequence. Since T(**F**o) is the set of transitions possible to be enabled under **M**0, **M**0 enables to1. Therefore it is possible to put **M**<sup>0</sup> o1 <sup>t</sup> **M**3. By the definition of **F**o, we have M3(p)≥M0(p) for any p∈Z(σ1). So σ1 is enabled under M3 because σ1 is enabled under M0 (Monotonicity Lemma). After σ1 firing, **M**2 is reachable from **M**3. Therefore, we have **M**<sup>0</sup> o1 <sup>t</sup> **M**<sup>3</sup> <sup>1</sup> <sup>σ</sup> **M**2. Since σ2 is enabled under M2, to1\*σ1\*σ2 is a firing sequence under

**Step 2.** Under **M**3, let's consider the new T(**F**o)={to2, …, ton}T(**F**o'), where T(**F**o') is the set of transition generated after to1 firing and may be empty. For a transition to2∈T(**F**o), σ1\*σ<sup>2</sup> can be represented as σ1\*σ2=σ3\*to2\*σ4, where to2Z(σ3). Then σ3\*to2\*σ4 is a firing sequence. By the same way described in Step 1, we can prove that to2\*σ3\*σ4 is a firing

**Step 4.** In the same way, it is proven that to1\*to2\*…\*ton\*σi\*σj is a firing sequence under **M**0. According to the definition of **F**o, all transitions in {to1, to2, …, ton} can fire simultaneously

**Example 3.** Let us now apply the proposed algorithm to the PN of Figure 3. Given **M**0=(0,0,0,0,0,0,1,0,0), **M**d=(0,0,0,0,1,0,1,0,0) and **X**=(1,2,1,1,1,1,1), determine if **M**d is reachable

under **M**0. Let's put σ'=σi\*σj, then (S(Fo)\*σ')∈S(**X**) is a firing sequence under **M**0.

t7

t4

t2

p4 p3

t3

p5

p9

t5

p2

p8

**Step 3.** By Step 1 and Step 2, to1\*to2\*σ3\*σ4 is a firing sequence under **M**0.

p7

p1

p6

t1

**Figure 3.** Petri net structure

t6

Proof:

**M**0.

sequence under **M**3.

or not under **M**0 and **X**.

**Step 4-1.** Fire S(**F**o)=t7. Then, the reachable marking becomes **M**'=(1,0,0,0,0,0,1,0,1)

Let *M*=**M**', *X*=*X*-**F**o=(1,2,1,1,1,0,0), *S*=t6\*t7. Go to Step 3 in Algorithm 2.

**Step 3-2.** Under *M* and *X*, **F**o=(0,1,0,0,0,0,0). Go to Step 4 in Algorithm 2.

**Step 4-2.** Fire S(**F**o)=t2 (t2 is not an effective conflict transition because t5 cannot enable),

then the reachable marking becomes **M**'=(0,1,0,0,1,0,1,0,1)

Let *M*=**M**', *X*=*X*-**F**o=(1,1,1,1,1,0,0), *S*= t6\*t7\*t2. Go to Step 3 in Algorithm 2.

**Step 3-3.** Under *M* and *X*, **F**o=(0,0,1,0,0,0,0). Go to Step 4 in Algorithm 2. **Step 4-3.** Fire S(**F**o)=t3 (t3 is not an effective conflict transition because t4 cannot enable),

then the reachable marking becomes **M**'=(0,0,1,0,1,0,1,0,1)

Let *M*=**M**', *X*=*X*-**F**o=(1,1,0,1,1,0,0), *S*= t6\*t7\*t2\*t3. Go to Step 3 in Algorithm 2.

**Step 3-4.** Under *M* and *X*, **F**=**0,** go to Step 6 in Algorithm 2.

**Step 6.** Because *X*≠**0,** go to Step 7 in Algorithm 2.

**Step 7.** There is no effective conflict transition i.e., no branch. Consequently, **M**d is not reachable under **X** because *X*≠**0**.

The above implementing process can be presented by a firing path tree as shown in Figure 4.
