Petri Nets Until 4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Technische Universität München, I7 Summer Term 2022

Prof. J. Esparza / A. R. Balasubramanian / Ch. Weil-Kennedy

Petri nets — Exercise sheet 1

The symbol F denotes that a question in an exercise is harder than the rest.

Exercise 1.1
For each Petri net (N , M0 ) below:

(a) construct the reachability graph of (N , M0 ).


(b) say whether (N , M0 ) is bounded and/or deadlock-free. If it is bounded, give the smallest k such that it
is k-bounded. Justify your answers.

(c) give the subnet N 0 = (P 0 , T 0 , F 0 ) of N such that P 0 = {p0 , p1 , p2 , p4 } and T 0 = T .


(d) For the first Petri net: Is there a firing sequence in which transition t3 is fired infinitely often? Is there a
firing sequence in which transition t2 is enabled infinitely often?

p4
t3

p2
t0
p0 t2

p1 t1 p3

p3

p0 p2
t3 t0 t1
2

2
p1 t2 p4

1
Exercise 1.2
Show the following “Exchange Lemma”:
vu uv
Let u and v be transitions of a net satisfying • u ∩ v • = ∅. Show: If M −→ M 0 then M −→ M 0 .

Exercise 1.3
Consider the partial Petri net below.

out

We say a Petri net (N , M0 ) terminates with marking M if M is reachable and there are no enabled transitions
in M . Add places and transitions to the partial Petri net above such that:

(a) if M0 (x) = m, M0 (y) = n and M0 (out) = 0, then the Petri net always terminates with marking M such
that M (out) = m + n;
(b) F if M0 (x) = m, M0 (y) = n and M0 (out) = 0, then the Petri net always terminates with marking M
such that 0 ≤ M (out) ≤ m · n, and it can terminate with marking M such that M (out) = m · n.

In case you add places, provide the initial marking of these places.

Acknowledgment: Exercise idea by Prof. Roland Meyer et al. (TU Kaiserslautern).

Exercise 1.4
There are exercises for you to try on your own on Automata Tutor.

• Course ID: PN2021 Password: UZOXB0AQ


• Course ID: Petri nets Password: NSD5DPRJ
These correspond to the exercises in the lecture script. You can also access them by clicking the links in
the script. Warning: these exercises are in Beta mode. If you find any mistakes, you are welcome to email
us.

2
Solution 1.1
1.

{p0 , p1 }

t3 t1
t0

t3
{p1 , p2 , p4 } {p2 , p3 , p4 } {p0 , p3 }
t1

t2

{p2 , 2 · p4 }

t3

{p0 , p4 }

2. It is 2-bounded since all markings of the reachability graph have at most two tokens in each place. It is
not deadlock-free since {p0 , p4 } has no successor.
3.
p4
t3

p2
t0
p0 t2

p1 t1

0 3 t 1 t 0 3 1 t t t t
4. By observing the reachability graph, we can see that {p0 , p1 } −→ {p2 , p3 , p4 } −→ {p0 , p3 } −→ {p0 , p1 } −−−−→
. . . is an example of a firing sequence in which t3 is fired infinitely often.
The same firing sequence enables t2 infinitely often (in marking {p2 , p3 , p4 }).

1.

{p0 , 2 · p1 }

t0 t3

{p1 , p3 , 2 · p2 } {2 · p0 , p1 }

t3 t2
t1 t0

{p1 , p2 , p4 } {p0 , 2 · p2 , p3 }

t2 t1

{3 · p1 } {p0 , p2 , p4 }

3
2. It is 3-bounded since all markings of the reachability graph have at most three tokens in each place. It is
deadlock-free since every marking of the reachability graph has an outgoing arc.

3.

p0 p2
t3 t0 t1
2

2
p1 t2 p4

Solution 1.2
v u
We prove the following: If M − → M 0 for arbitrary markings M, L, M 0 and transitions u, v with • u ∩ v • = ∅,
→L−
v 0 u
then M −
→L − → M for some marking L0 .
0

We first show that M enables u by showing that M (s) ≥ 1 for every place s ∈ • u. Assume s ∈ • u. Then
L(s) ≥ 1 because L enables u. Since • u ∩ v • = ∅ we have s ∈
/ v • . So the number of tokens on s does not increase
by the occurence of v, i.e. M (s) ≥ L(s). Therefore M (s) ≥ 1.
u
Let M − → L0 , we show that L0 enables v. Let s be a place of • v.
/ u then L0 (s) ≥ M (s) , and M (s) ≥ 1 because M enables v.
If s ∈ •

If s ∈ • u then L0 (s) ≥ M (s) − 1. We show M (s) ≥ 2 for s ∈ • v ∩ • u. Again, L(s) ≥ 1 because L enables u and
s ∈ • u. Since s ∈ • v and s ∈
/ v • (because • u ∩ v • = ∅) we get L(s) = M (s) − 1. Thus M (s) ≥ 2 and L0 (s) ≥ 1.
So L marks every place in • v, and therefore L0 enables v.
0

The sequences uv and vu have the same effect on the number of tokens in each place, therefore both lead from
M to the same marking, namely to M 0 . This completes the proof of the claim.

Solution 1.3
(a) Addition:

out

(b) Multiplication:

4
x out

Some intuition:
The bottom cycle can happen at most number of tokens in place y times.
The top cycle takes tokens from x and copies them into out, at most once per top cycle. The top cycle
must happen at the same time as the bottom cycle.

5
Technische Universität München, I7 Summer Term 2022
Prof. J. Esparza / A. R. Balasubramanian / Ch. Weil-Kennedy

Petri nets — Exercise sheet 2

Exercise 2.1
In a “just-in-time” manufacturing system, items can be ordered to be produced, which is signaled by an “order”
event. An order is acknowledged by a “receive” event, and then manufactured by a “produce” event. After
that, the item is checked by quality control and can either be ready to be sent (event “positive”) or be discarded
(event “negative”). In the positive case, the item is sent (event “send”) to the customer. In the negative case,
a replacement item is scheduled to be produced.

An item can be in any of the states “ordered”, “received”, “produced”, “to be sent”, “sent” “discarded”.
Suppose that there are initially two orders.

(a) Model the system as a Petri net, where there are transitions for each event and places for each possible
state of an item. You may have additional places and transitions. Do not use weighted arcs.
(b) Now adapt your model such that there is at most one item in the “produced” state at any time, and
further items have to wait for that item to be quality checked before they are produced.

Exercise 2.2
σtσ 0
Let N = (P, T, W ) be a net with weighted arcs. Let M, M 0 ∈ NP , σ, σ 0 ∈ T ∗ and t ∈ T be such that M −−−→ M 0 .
Prove or disprove the following statements:

tσσ 0
(a) if t does not consume any token, i.e W (p, t) = 0 for every p ∈ P , then M −−−→ M 0 .
σσ 0 t
(b) if t does not produce any token, i.e. W (t, p) = 0 for every p ∈ P , then M −−−→ M 0 .
tσσ 0
(c) if t consumes no more tokens than it produces, i.e W (p, t) ≤ W (t, p) for every p ∈ P , then M −−−→ M 0 .
σσ 0 t
(d) if t produces no more tokens than it consumes, i.e. W (t, p) ≤ W (p, t) for every p ∈ P , then M −−−→ M 0 .

Exercise 2.3
Sketch an algorithm solving the following problem. The worst-case running time of your algorithm should be
exponential.

Input: a net with weighted arcs N = (S, T, W ) and a markings M and M 0 .



Output: a net N 0 = (S 0 , T 0 , F 0 ), and two markings L and L0 , such that M −
→ M 0 in N

if and only if L − → L0 in N 0 .

Apply your algorithm on the net below with M = Hq2 I and M 0 = Hq1 , 2 · q2 , q3 I.

1
q1 q3
t3
3

2
t2
t1
2

q2

Exercise 2.4
In a paper by Murata [1], 8 different Petri nets (without weights) are shown that exhibit all possible combinations
of the following three properties and their negations:

• bounded (B) / not bounded (B)

• live (L) / not live (L)


• reversible (R) / not reversible (R)

A Petri net (N , M0 ) is said to be reversible if, for each marking M reachable from M0 , marking M0 is reachable
from M . In other words, in an reversible net it is always possible to return to the initial marking.

(a) Without looking at the paper, for each of the 8 possible combinations, try to find a Petri net (without
weights) exhibiting this combination. Have at least one place and at least one transition, and give con-
nected nets.
Hint: The bounded, live, but not reversible Petri net is hard to find. However, it can be done with only
4 places and 3 transitions.
(b) Compare your solutions to the Petri nets in the paper (page 549). Actually, none of the solutions given
by Murata are minimal. Can you find smaller solutions?

2
Solution 2.1
(a) For example:
positive to be sent send
sent

ordered received produce produced


order receive

negative
discarded

(b) The capacity constraint can be enforced by introducing an additional place that has a token iff there is
no token in “produced” and adding arcs from the transitions that affect “produced” accordingly.

positive to be sent send


sent

ordered received produce produced


order receive
produced empty

negative
discarded

Solution 2.2
σ t σ0
(a) True. Let A, A0 ∈ NP be such that M −→A→ − A0 −→ M 0 . Since W (p, t) = 0 for every p ∈ P , t is enabled
t
at any marking. We have A −A ≥ ~0 with (A0 −A)(p) = W (t, p) for every p ∈ P . Thus, M →
0
− M +(A0 −A)
σ
and, by monotonicity, M + (A0 − A) −
→ A + (A0 − A). Therefore,

t σ σ0
− M + (A0 − A) −
M→ → A0 −→ M 0 .

(b) True. Symmetrically as above.


(c) False. Consider the following Petri net:

p
t s

st
We have 0 −→ 1 and W (p, t) = W (t, p), yet ts cannot be fired from 0.
(d) False. Consider the following Petri net:

p
t s

ts
We have 1 −→ 0 and W (t, p) = W (p, t), yet st cannot be fired from 1.

Solution 2.3
Let us first give a net for the given net with weighted arcs:

3
q1
t3
q3

r
t1 t2

q2

where the markings are:

L = Hq2 , rI,
L0 = Hq1 , 2 · q2 , q3 , rI.

More generally, a transition such as:

p p0

3 2
t

q q0

4
can be converted into the following gadget that simulates the transition:

r p0

rt,0 rt,1 rt,2 rt,3 rt,4


tstart t1 t2 t3 t4 tend

t−1
start t−1
1 t−1
2 t−1
3 t−1
4

q0

where place r must be shared by all gadgets, and s−1 denotes the inverse transition of s, i.e., (p, s−1 ) ∈ F ⇐⇒
(s, p) ∈ F and (s−1 , p) ∈ F ⇐⇒ (p, s) ∈ F for every place p (the arcs are not drawn for readability reasons).
Place r is a control place that enforces that only one transition of the original net is being simulated at one
time. The token in place r is consumed at the beginning of the simulation, and replaced at the end. The inverse
transitions are there so that we do not create a deadlock inside the simulated transition. Indeed consider a
marking of the gadget with four tokens in q, one token in r and two tokens in p. The original transition being
simulated would not have been enabled, but here transition tstart is enabled and we can get to place rt,2 by
taking t1 then t2 . But then we are ”stuck” and the transition t3 is not enabled. The inverse transitions allow
us to ”backtrack” and bring the tokens back into places p and q.

Solution 2.4
The following 8 Petri nets exhibit the desired properties. The labels (a)-(h) correspond to the same labels in
the paper by Murata (page 549) and show that the nets given here are smaller.

5
p1 p1
t1 t1 t2

p1 p1
t1 t1

p2 t2 p2 t3
(a) BLR (b) BLR (c) BLR (d) BLR
p1 p2
t1

p1 p1 p1
t1 t2 t1 t1
t3
t2 p3

(e) BLR (f) BLR (g) BLR (h) BLR


p4

For most Petri nets, it is clear that they have the desired properties: for (d), (f) and (h), the reachability graph
just has one or two markings; while for (a), (b), (c) and (e), the reachability graph is infinite, but essentially a
line with a marking for each natural number, traversable only in forward direction for (a) and (c) and in both
directions for (b) and (e).

To see that the Petri net (g) for the combination BLR is indeed bounded, live, but not reversible, we can
construct the reachability graph:

{p1 , p3 }

t1

{p2 , p3 }

t2 t3

t1
{p1 , p4 } {p2 , p4 }

The reachability graph is not strongly connected: after firing t1 , we can not return to the initial marking.
Therefore the Petri net is not reversible. However, the strongly connected component reached after firing t1
contains every transition, so the Petri net is live. As the reachability graph is finite, the Petri net is bounded.

References
[1] Tadao Murata. Petri nets: Properties, analysis and applications. Proceedings of the IEEE, 77(4):541–580,
April 1989. Available at http://www2.ing.unipi.it/~a009435/issw/extra/murata.pdf.

6
Technische Universität München, I7 Summer Term 2022
Prof. J. Esparza / A. R. Balasubramanian / Ch. Weil-Kennedy

Petri nets — Exercise sheet 3

Exercise 3.1
Given n ∈ N, i > 0, let MSBFi (n) be the most-significant-bit-first binary encoding of n of length i. For example:

MSBF3 (3) = 011 and MSBF4 (9) = 1001 MSBF2 (0) = 00.

Consider the following Petri net places. We want to add transitions such that the resulting Petri net (N , H01 , 02 , 03 I)
has markings that encode numbers written in MSBF3 , and such that the reachability graph of the net is of the
form MSBF3 (0) → MSBF3 (1) → . . . → MSBF3 (7) → MSBF3 (0).

A marking of N encoding MSBF3 (n) contains a token in 0i if and only if the i-th letter from the right in
MSBF3 (n) is a 0, and it contains a token in 1i if and only if the i-th letter from the right in MSBF3 (n) is a 1.

There exists a solution with 5 transitions.

03 02 01

13 12 11

Exercise 3.2

(a) You have seen that the coverability problem is PSPACE-hard, even for 1-bounded Petri nets. Show that
the following problems are also PSPACE-hard by reducing 1-bounded Petri net coverability to them (you
do not need to prove the correctness of your reduction). Given a 1-bounded Petri net:

1. can a given transition t ever occur?


2. is there a reachable marking that concurrently enables two given transitions t1 and t2 ?
3. is there a run containing a given transition t infinitely often?
(b) Show that problems 1. and 2. can be reduced to coverability in a 1-bounded Petri net. This will prove
that they are solvable in PSPACE, since coverability is PSPACE-complete in 1-bounded Petri nets.

Exercise 3.3
Consider the following net N = (S, T, F ):
t3

s1 s2 s3
t1

t4

t2

(a) Construct the coverability graph of (N, M0 ) where M0 = {0, 1, 1}.

(b) Describe the set of markings coverable from (N, {0, 1, 1}).

(c) Say whether (N, M0 ) is live from every marking M0 or not. Prove your answer.

Exercise 3.4
Exhibit a Petri net (with or without weighted arcs) such that every node in the coverability graph of the Petri
net has a successor, but the Petri net has a deadlock.
Solution 3.1
03 02 01

13 12 11

Solution 3.2
(a) Let (N , M0 ) be a 1-bounded Petri net, and let M be the marking we wish to cover.

1. Add a transition t to N such that • t = M and t• = ∅. Transition t is enabled if and only if marking
M is coverable in (N , M0 ).
2. Add the following transitions to N : t such that • t = M and t• = {s1 , s2 }, and ti such that • ti = {si }
and t• = ∅ for i = 1, 2. Transitions t1 and t2 are simultaneously enabled if and only if marking M is
coverable in (N , M0 ).
Another (non-connected) solution is to add the following transitions to N : t1 such that • t1 = M and
t•1 = ∅, and t2 such that • t2 = {s} = t• for some new place s which initially gets a token. That is,
we define a new net (N 0 , M00 ) and marking M 0 such that N 0 is a copy of N to which we add t1 , t2 , s,
and M00 = M0 + s, M 0 = M + s. Transition t2 is always enabled in (N 0 , M00 ), and t1 is enabled if and
only if M is coverable in (N , M0 ).
3. Add a transition t to N such that • t = M and t• = M . If t is enabled in some marking M 0 reachable
from M0 , then M 0 ≥ • t = M so M is coverable in (N , M0 ). If M is coverable then there exists a
σ
→ M 0 ≥ M . The run σ(t)ω is a run which contains t infinitely often.
firing sequence σ such that M0 −

(b) Let (N , M0 ) be a 1-bounded Petri net.


1. Let M be the marking equal to the multiset • t. Transition t is enabled if and only if marking M is
coverable in (N , M0 ).
2. Let M be the marking equal to the union of • t1 and • t2 . Transitions t1 and t2 are simultaneously
enabled if and only if marking M is coverable in (N , M0 ).

Solution 3.3
(a)
t3 (0, 1, 1)

t4 t2

t3 t1
t3 , t4 (0, ω, ω) (0, 0, 0) (1, 2, 0) (1, ω, 0) t1

t3
t2 t3

(ω, ω, ω)

t1 , t2 , t3 , t4

(b) All markings are coverable.

(c) Yes. Let M0 be a marking and let M be a marking reachable from M0 . We need to prove that for all

transitions t ∈ {t1 , . . . , t4 }, there is a marking Mt such that M −
→ Mt and t is enabled at Mt . We do a
case analysis.

• t = t3 : Since • t3 = ∅, t3 is enabled at any marking. Hence we can take Mt to be M .


t
• t = t2 or t = t4 : We have already seen that t3 is enabled at M . Let M −→ 3
M 0 . It is clear that
M 0 (s2 ) > 0 and M 0 (s3 ) > 0. Hence both t2 and t4 are enabled in M 0 and we can take Mt to be M 0 .
• t = t1 : We have already constructed the marking Mt2 . Now, we let M 00 be the marking obtained by
firing t2 from Mt2 . Notice that M 00 (s1 ) > 0 and so t1 is enabled at M 00 . Hence we can take Mt to be
M 00 .

Solution 3.4
A Petri net with weighted arcs with its coverability graph, where t1 t2 leads to a deadlock:

s1
t1 t2
2
2

(1)

t1

(ω)

t1 , t2

A Petri net without weighted arcs with its coverability graph, where t1 t3 leads to a deadlock:

s2
t1 t2
s1

t3
(1, 0)

t1

(1, ω) t1 , t2

t3

(0, ω) t2
Technische Universität München, I7 Summer Term 2022
Prof. J. Esparza / A. R. Balasubramanian / Ch. Weil-Kennedy

Petri nets — Exercise sheet 4

Exercise 4.1
Let N and N 0 be respectively the left and right Petri nets below.

t1

p1 p2

q1
t2 s1 s2

s3
p3 q2 q3

Use the backwards reachability algorithm to answer the following questions.

(a) Determine whether M = (0, 0, 2) is coverable by the initial marking M0 = (1, 0, 0) in N . Record all
intermediate sets of markings with their finite representation of minimal elements.
(b) Determine whether Hq1 , q3 I is coverable from Hq1 , q1 I. in N 0 .

Exercise 4.2
The algorithm Coverability-Graph does not specify how the coverability graph should be traversed during
its construction. Show that different traversal strategies can lead to different coverability graphs. More precisely,
exhibit a marking M and two different coverability graphs for (N , M ), where N is the following net:

t1

p1 p2 p3
t3 t4

t2

1
Exercise 4.3
A net with reset, doubling and transfer arcs is a tuple (P, T, F, R, D, T r) where (P, T, F ) is a net,

R ⊆ P × T, D ⊆ T × P, T r ⊆ (P × T ) ∪ (T × P ),

and F , R, D and T r are pairwise disjoint. Let M ∈ NP and t ∈ T . We say that t is enabled at M if M (p) > 0
for every (p, t) ∈ F . Firing t at M has the following effect:

• every arc (p, t) ∈ F consumes a token from p;

• every arc (t, p) ∈ F produces a token in p;


• every arc (p, t) ∈ R empties p;
• every arc (t, p) ∈ D doubles the amount of tokens in p;
• every arc (p, t) ∈ T r empties p;
P
• every arc (t, p) ∈ T r adds (q,t)∈T r M (q) tokens to p.

Show that the backward algorithm works for this extended class of nets by showing that it is monotonic, i.e.
show that for every markings X, X 0 , Y ∈ NP , if X →
− Y and X 0 ≥ X, then X 0 →
− Y 0 for some Y 0 ≥ Y .

Exercise 4.4
Given a Petri net (N , M0 ), we say that a marking M is good with respect to (N , M0 ) if there are infinitely
many markings M1 , M2 , . . . , in the reachability graph of (N , M0 ) such that each Mi ≥ M . Give an algorithm
which determines whether a marking M is a good with respect to a Petri net (N , M0 ).

2
Solution 4.1
(a) We execute the backward algorithm from (0, 0, 2).
We start with m0 = {(0, 0, 2)}, which is the set of minimal elements for {M }. Recall that the backwards
reachability algorithm iteratively updates m to
[
m = min(m ∪ pre(R[t] ∧ m, t)).
t∈T

In the following, we let pret (m) denote pre(R[t] ∧ m, t). Note that we have R[t1 ] = (1, 1, 0) and R[t2 ] =
(0, 1, 1).

pret1 (m0 ) = pre((1, 1, 2), t1 ) = (1, 0, 2)


pret2 (m0 ) = pre((0, 1, 2), t2 ) = (1, 1, 1)

After adding the new markings to m0 and eliminating non-minimal markings, our new set is m1 =
{(0, 0, 2), (1, 1, 1)}. For the new marking (1, 1, 1), we compute the predecessors:

pret1 ((1, 1, 1)) = pre((1, 1, 1), t1 ) = (1, 0, 1)


pret2 ((1, 1, 1)) = pre((1, 1, 1), t2 ) = (2, 1, 0)

We add the new markings, take the minimal elements and obtain m2 = {(0, 0, 2), (1, 0, 1), (2, 1, 0)}. For
(2, 1, 0), we compute the predecessors:

pret1 ((2, 1, 0)) = pre((2, 1, 0), t1 ) = (2, 0, 0)


pret2 ((2, 1, 0)) = pre((2, 1, 1), t2 ) = (3, 1, 0)

For (1, 0, 1), we get the same predecessors as for (1, 1, 1). Hence, we then get m3 = {(0, 0, 2), (1, 0, 1), (2, 0, 0)}.
For (2, 0, 0), we get the same predecessors as for (2, 1, 0). Hence, we would get that m4 = m3 and so we
can stop the computation of predecessors. Comparing M0 with m3 , we get that no marking in m3 is less
than or equal to M0 . This implies that M0 cannot cover M .
(b) We want to determine whether M = (1, 0, 1) is coverable from M0 = (2, 0, 0). We let m0 = (1, 0, 1) and
we proceed with the computation as before.

Iteration presi (m) m


0 — {(1, 0, 1)}

pres1 (1, 0, 1) = (1, 0, 1)


1 pres2 (1, 0, 1) = (0, 0, 2) {(1, 0, 1), (0, 0, 2), (2, 1, 0)}
pres3 (1, 0, 1) = (2, 1, 0)

pres1 (1, 0, 1) = (1, 0, 1)


pres2 (1, 0, 1) = (0, 0, 2)
pres3 (1, 0, 1) = (2, 1, 0)
pres1 (0, 0, 2) = (1, 0, 2)
2 pres2 (0, 0, 2) = (0, 0, 3) {(1, 0, 1), (0, 0, 2), (2, 0, 0)}
pres3 (0, 0, 2) = (1, 1, 1)
pres1 (2, 1, 0) = (2, 0, 0)
pres2 (2, 1, 0) = (1, 1, 1)
pres3 (2, 1, 0) = (3, 2, 0)

We can stop at this point, as M0 belongs to the set m obtained in the second iteration. Hence, M0 can
cover M .

3
Solution 4.2
Let M = Hp1 I. We exhibit two coverability graphs for (N , M ), where nodes are labeled with respect to the
total order p1 < p2 < p3 . We construct the first coverability graph by exploring the configuration (1, 0, 0) and
its enabled transitions, then configuration (0, 1, 0) and then (1, 0, ω):

t2
1, 0, 0 0, 1, 0

t1
t4 t4

t2
t4 1, 0, ω 0, 1, ω t4

t1
t3 t3

ω, ω, ω 0, ω, ω
t1
t1 , t2 , t3 , t4 t3 , t4

For the second coverability graph, we explore the configuration (1, 0, 0) and its enabled transitions, then con-
figuration (1, 0, ω) and then (0, 1, 0):

t2
1, 0, 0 0, 1, 0

t1
t4 t4

t2
t4 1, 0, ω 0, 1, ω t4

t1
t3 t3

t2
t3 , t4 1, ω, ω 0, ω, ω t3 , t4

t1
t1

ω, ω, ω

t1 , t2 , t3 , t4

Treating configuration (1, 0, ω) and its enabled transitions before (0, 1, 0) allows configuration (1, ω, ω) to be
added to the graph.

4
Solution 4.3
t
Let X, X 0 , Y ∈ NP and t ∈ T be such that X →
− Y and X 0 ≥ X. Let us first argue that t is enabled at X 0 :

t is enabled at X ⇐⇒ X(p) > 0 for every (p, t) ∈ F


=⇒ X 0 (p) > 0 for every (p, t) ∈ F (since X 0 ≥ X)
⇐⇒ t is enabled at X 0 .
t
Let Y 0 ∈ NP be the marking such that X 0 →− Y 0 . Let p ∈ P . It remains to show that Y 0 (p) ≥ Y (p). First note
that F , R, D and T r are pairwise disjoint: for example this means we cannot have (p, t) ∈ F and (p, t) ∈ R.
This makes our case distinction easier.

Let us write • t the set of places such that (p, t) ∈ F ∪R∪T r, and t• the set of places such that (t, p) ∈ F ∪D∪T r.
First, we consider the case when p is not in the intersection of the preset and the postset of t, i.e. p ∈ / • t ∩ t• :

Case Proof

(p, t) ∈ F Y 0 (p) = X 0 (p) − 1 ≥ X(p) − 1 = Y (p)

(t, p) ∈ F Y 0 (p) = X 0 (p) + 1 ≥ X(p) + 1 = Y (p)

(p, t) ∈ R Y 0 (p) = 0 = Y (p)

(t, p) ∈ D Y 0 (p) = 2 · X 0 (p) ≥ 2 · X(p) = Y (p)

(p, t) ∈ T r Y 0 (p) = 0 = Y (p)

Y 0 (p) = X 0 (p) + (q,t)∈T r X 0 (q) ≥ X(p) + (q,t)∈T r X(q) = Y (p)


P P
(t, p) ∈ T r

Now, we consider the case when p ∈ • t ∩ t• . Arc (p, t) can be in F, R or T r and arc (t, p) can be in F, D or T r :

• If (p, t), (t, p) ∈ F , then Y 0 (p) = X 0 (p) ≥ X(p) = Y (p).


• If (t, p) ∈ T r and (p, t) ∈ T r or (p, t) ∈ R, then Y 0 (p) = (q,t)∈T r X 0 (q) ≥ (q,t)∈T r X(q) = Y (p).
P P

• If (t, p) ∈ T r and (p, t) ∈ F , then Y 0 (p) = (q,t)∈T r X 0 (q) − 1 ≥ (q,t)∈T r X(q) − 1 = Y (p).
P P

• and so on...

Solution 4.4
Let (N , M0 ) be a Petri net and M be a marking. We claim that M is good with respect to (N , M0 ) iff there is
an ω-marking M 0 ≥ M in the coverability graph of (N , M0 ) which has at least one ω-place.

Suppose there is an ω-marking M 0 ≥ M in the coverability graph which has at least one ω-place. By Lemma
3.2.7 in the notes, for every k > 0, there is a marking Mk in the reachability graph of (N , M0 ) such that
Mk (s) = M 0 (s) for every normal place of M 0 and Mk (s) > k for every ω-place of M 0 . Since M 0 has at least one
ω-place, this immediately implies that M is good with respect to (N , M0 ).

Suppose M is a good marking with respect ot (N , M0 ). Hence, there are infinitely many markings M1 , M2 , . . . ,
in the reachability graph of (N , M0 ) such that each Mi ≥ M . By Dickson’s lemma, there must be an infinite
subsequence
P Mi1 , Mi2 , . . . of this sequence such that Mi1 < Mi2 < . . . . In particular, it is clear that if we set
rij = s∈P Mij (s), then ri1 < ri2 < . . . .

By Theorem 3.2.8 in the notes, for each Mij , there is an ω-marking Mi0j in the coverability graph of (N , M0 )
such that Mi0j ≥ Mij ≥ M . Since the coverabilty graph is finite and since ri1 < ri2 < . . . , there must be at
least one ω-marking M 0 in Mi01 , Mi02 , . . . such that M 0 has an ω-place. This then proves our claim.

Hence, to check if a marking M is good with respect to (N , M0 ), simply construct the coverability graph of
(N , M0 ) and check if there is an ω-marking M 0 ≥ M which has at least one ω-place.

You might also like