Petri Nets: Concurrency, Reachability & Invariants

A rigorous working model of weighted place/transition nets: enabling and firing, true concurrency and conflict, reachability and coverability, behavioral properties, incidence matrices, invariants, structural certificates, extension boundaries, and a diagnostic workflow.

A state machine puts the whole system in one control state. A Petri net instead distributes state across places and lets several local events become possible at once. That small change makes resource competition, synchronization, causal independence, and unbounded accumulation explicit rather than forcing them into one exponentially large product state.

This entry fixes one baseline throughout: a weighted place/transition net (P/T net) with nonnegative integer tokens and no capacities, guards, priorities, time, or probability. Extensions are useful, but their extra rules must be named because they change enabling, firing, and sometimes decidability.

The typed P/T-net contract #

The underlying graph is directed and bipartite: arcs go only from a place to a transition or from a transition to a place. The maps are intentionally typed on P×TP\times T in both directions. The argument order identifies a place and a transition; Pre versus Post identifies the arc direction. This avoids the common mistake of declaring a pre-incidence map in the output direction.

Once orders for PP and TT are fixed, a marking is a vector M∈N∣P∣M\in\mathbb N^{|P|} and Pre and Post are ∣P∣×∣T∣|P|\times|T| matrices. For one transition tt, write Pret\mathop{\mathrm{Pre}}_t and Postt\mathop{\mathrm{Post}}_t for its columns.

Two restricted terms are worth keeping separate:

  • An ordinary net has only unit nonzero arc weights. A weighted P/T net permits any nonnegative integer weights.
  • A pure net has no place-transition pair with both Pre(p,t)>0\mathop{\mathrm{Pre}}(p,t)>0 and Post(p,t)>0\mathop{\mathrm{Post}}(p,t)>0. General P/T semantics does not require purity. Such a self-loop can require tokens while returning them, even though its net incidence is zero.

Places are not intrinsically “conditions” and transitions are not intrinsically “random events.” Those are possible interpretations. Formally, a marking is a token-count vector and firing chooses an enabled transition nondeterministically unless an explicitly stochastic extension supplies probabilities or rates.

Enabling and firing are local and atomic #

A transition tt is enabled at marking MM exactly when every input requirement is available:

M≥Pret⟺∀p∈P: M(p)≥Pre(p,t).M\geq\mathop{\mathrm{Pre}}_t \quad\Longleftrightarrow\quad \forall p\in P:\ M(p)\geq\mathop{\mathrm{Pre}}(p,t).

If tt fires, all its input consumption and output production form one atomic state change:

M[t⟩M′⟺M≥Pret∧M′=M−Pret+Postt.M[t\rangle M' \quad\Longleftrightarrow\quad M\geq\mathop{\mathrm{Pre}}_t \land M'=M-\mathop{\mathrm{Pre}}_t+\mathop{\mathrm{Post}}_t.

The brackets M[t⟩M′M[t\rangle M' mean that tt is enabled at MM and its firing yields M′M'. Enabling must be checked against Pre, not against the net token change. A self-loop may have zero incidence while still requiring a token.

Weighted firing rule All input consumption and output production happen in one atomic step. Before · M = (2, 1, 0) p r t q 2 1 2 M ≥ Preₜ ✓ fire t − Preₜ + Postₜ After · M′ = (0, 0, 2) p r t q 2 1 2 M′ = M − Preₜ + Postₜ
An enabled weighted transition consumes its complete Pre column and produces its complete Post column in one atomic firing. Here (2,1,0) becomes (0,0,2).

Steps and multisets of transitions #

Formal step semantics treats a finite step as a transition multiset ν∈N∣T∣\nu\in\mathbb N^{|T|}. It is enabled when the marking can pay for all occurrences together:

M≥Preν.M\geq \mathop{\mathrm{Pre}}\nu.

Its firing yields

M′=M−Preν+Postν.M'=M-\mathop{\mathrm{Pre}}\nu+\mathop{\mathrm{Post}}\nu.

This formulation matters when a step contains two occurrences of one transition or two transitions sharing an input place: individual enabling is not enough; their combined demand must fit.

Concurrency, conflict, and interleaving #

These three ideas describe different facts.

Co-enabled
Distinct transitions $t$ and $u$ are each individually enabled at the same marking $M$.
Step-concurrent at $M$
The two-transition multiset is enabled: $M\geq\mathop{\mathrm{Pre}}_t+\mathop{\mathrm{Pre}}_u$. Both resource demands can be met together.
Pairwise semantic conflict at $M$
$t$ and $u$ are co-enabled, but their two-transition multiset is not enabled. Their individual demands fit separately, while their combined demand does not.
Interleaving
A linear sequence records one firing before another. It is an observation order, not automatically a causal dependency.

Pairwise conflict is only the binary case. More generally, a finite nonempty transition multiset GG is in semantic conflict at MM when every one-transition restriction G∣{t}G|_{\{t\}} is enabled with its full multiplicity, but GG itself is not. This matters: if three transitions each consume one token from the same place and M(p)=2M(p)=2, every pair is a valid step while the triple is in conflict. At M(p)=3M(p)=3, the same structure is conflict-free for that triple.

Post-firing disabling is a stronger, separate predicate. If two self-looping transitions each consume and immediately replace the only token in pp, they are in pairwise semantic conflict because the joint step needs two tokens; nevertheless, firing either one restores the token and leaves the other enabled. A conflict definition based only on what remains enabled after one firing would miss this case.

If tt and uu are step-concurrent in a weighted P/T net, both serializations are possible and meet at the same marking:

M[t⟩Mt[u⟩Mtu,M[u⟩Mu[t⟩Mut,Mtu=Mut.M[t\rangle M_t[u\rangle M_{tu}, \qquad M[u\rangle M_u[t\rangle M_{ut}, \qquad M_{tu}=M_{ut}.

The reason is algebraic. The joint enabling inequality leaves enough input tokens for either transition after the other consumes its share, and vector addition commutes. Interleaving semantics represents the one concurrent step as two paths; it preserves the final marking but forgets that neither event had to cause the other.

Conflict is different. If a place contains one token and both tt and uu require it without immediately replacing it, each is individually enabled but their joint step is not. In this canonical choice case, firing one also removes the witness that enabled the other.

Confusion: when concurrency changes a choice #

Let tconfMut\mathrel{\mathrm{conf}_M}u mean that tt and uu are in pairwise semantic conflict at reachable marking MM. A confusion exists at MM when distinct transitions a,b,ca,b,c can be chosen such that aa and bb are step-concurrent at MM, but firing one of them changes whether the other is in conflict with cc. In other words, an event that is causally independent of part of a choice changes that choice's enabled conflict set.

This is a marking-dependent interaction, not merely the presence of one conflict and one concurrent pair somewhere in the same net. It covers the symmetric pattern in which aa and bb are concurrent while both compete with cc, and the asymmetric pattern in which the ordering of a concurrent event creates or removes a later conflict. The distinction matters to distributed scheduling: a supposedly local concurrent decision can change which global alternative remains available.

One structural subclass prevents this mixing. For an ordinary unit-weight P/T structure, define

p∙={u∈T∣Pre(p,u)>0},∙t={q∈P∣Pre(q,t)>0}.p^{\bullet}=\{u\in T\mid\mathop{\mathrm{Pre}}(p,u)>0\}, \qquad {}^{\bullet}t=\{q\in P\mid\mathop{\mathrm{Pre}}(q,t)>0\}.

The net is free-choice when every input arc (p,t)(p,t) satisfies

p∙={t}or∙t={p}.p^{\bullet}=\{t\} \quad\text{or}\quad {}^{\bullet}t=\{p\}.

Therefore, if a place offers more than one outgoing choice, every candidate transition has that place as its only input. An unrelated synchronization input cannot selectively enable only some candidates. In an ordinary 1-safe net, this separates choice from synchronization and rules out the classical confusion pattern above.

Free-choice structure alone is not enough for the marking-dependent conflict relation when places may hold several tokens. Let M(p)=M(r)=1M(p)=M(r)=1; let aa consume the token in rr and produce one in pp; and let bb and cc each consume one token from pp. The structure is free-choice, and aa is step-concurrent with bb. Initially bconfMcb\mathrel{\mathrm{conf}_M}c, but after aa fires, pp contains two tokens and bb and cc are jointly enabled, so their pairwise semantic conflict disappears. The firing of an independent event changed the enabled choice without violating the structural free-choice condition. Weighted variants likewise need an explicitly stated generalization: unequal input weights can make candidates enabled under different token counts even when the unweighted support graph looks free-choice.

Worked bounded example: fork, independent completion, join #

Let the place order be

(I,L,R,Ld,Rd),(I,L,R,L_d,R_d),

where II is an idle job, LL and RR are active branches, and LdL_d and RdR_d are completed branches. The four transitions are:

Transition Consumes Produces Meaning
fork II L+RL+R start both branches
finish_L LL LdL_d finish the left branch
finish_R RR RdR_d finish the right branch
join Ld+RdL_d+R_d II synchronize and return idle

Start from

M0=(1,0,0,0,0).M_0=(1,0,0,0,0).

One exact firing trace is

(1,0,0,0,0)[fork⟩(0,1,1,0,0)[finish_L⟩(0,0,1,1,0)[finish_R⟩(0,0,0,1,1)[join⟩(1,0,0,0,0).\begin{aligned} (1,0,0,0,0) &[\mathtt{fork}\rangle(0,1,1,0,0)\\ &[\mathtt{finish\_L}\rangle(0,0,1,1,0)\\ &[\mathtt{finish\_R}\rangle(0,0,0,1,1)\\ &[\mathtt{join}\rangle(1,0,0,0,0). \end{aligned}

After fork, finish_L and finish_R are step-concurrent. Reversing their order gives the other path through (0,1,0,0,1)(0,1,0,0,1) and reaches the same pre-join marking (0,0,0,1,1)(0,0,0,1,1). join is disabled until both completions are present, so synchronization is an enabling constraint rather than a special control primitive.

Exact reachability graph · bounded fork/join net Place order: (I, L, R, Ld, Rd). The diamond records two orders of independent completions. M₀ (1,0,0,0,0) M₁ (0,1,1,0,0) M₂ (0,0,1,1,0) M₃ (0,1,0,0,1) M₄ (0,0,0,1,1) fork finish_L finish_R finish_R finish_L join Unbounded growth · exact states versus ω acceleration Exact reachability 0 1 2 3 … grow grow grow Coverability tree 0 ω accelerate ω: arbitrarily large finite token counts are coverable. It is a symbolic upper summary, not an exact reachable marking.
The bounded fork-join net has six exact edges and five reachable markings; its middle diamond is two interleavings of concurrent completions. An unbounded counter uses omega only as a coverability summary, not as an exact marking.

The reachable set is exactly the five markings drawn in the upper panel. Inspection already suggests that the net is safe, deadlock-free, live, reversible, and persistent. The definitions below make those claims testable rather than visual guesses.

Reachability is exact; coverability is an upper question #

A firing sequence σ=t1⋯tk\sigma=t_1\cdots t_k is executable from MM when there are markings

M=M0′[t1⟩M1′[t2⟩⋯[tk⟩Mk′.M=M_0'[t_1\rangle M_1'[t_2\rangle\cdots[t_k\rangle M_k'.

Write M[σ⟩M′M[\sigma\rangle M' for the complete path and

R(M0)={M∈N∣P∣∣∃σ: M0[σ⟩M}R(M_0)=\{M\in\mathbb N^{|P|}\mid\exists\sigma:\ M_0[\sigma\rangle M\}

for the reachability set. A target MM is reachable only when some execution ends at that exact vector.

A target marking KK is coverable when

∃M∈R(M0): M≥K\exists M\in R(M_0):\ M\geq K

componentwise. Coverability asks whether the net can reach at least the requested token counts, perhaps with additional tokens elsewhere. It compares a reachable marking with the target KK, not with the initial marking.

Reachability graph #

The reachability graph has one vertex for every marking in R(M0)R(M_0) and an edge

M→tM′M\xrightarrow{t}M'

for every firing M[t⟩M′M[t\rangle M'. It is finite exactly when the marked net is bounded. For the fork/join example, the graph is finite and exact; paths answer reachability, deadlock, reversibility, and liveness questions directly. Its size can still grow exponentially with the number of concurrent components because all distinguishable token distributions remain explicit.

Karp–Miller-style acceleration and the ω\omega boundary #

An unbounded net can have an infinite reachability graph. For example, one input-free transition that adds one token to place pp reaches 0,1,2,3,…0,1,2,3,\ldots. The core idea of Karp–Miller-style acceleration is to compare a descendant with an ancestor on its branch and replace components that can keep growing by ω\omega.

The symbol obeys n<ωn<\omega and ω±n=ω\omega\pm n=\omega for finite nn. It means arbitrarily large finite values are coverable in that component. It is not a token count and not an exact reachable marking.

That sentence is the intuition, not the complete algorithm. A correct finite construction must also specify which symbolic nodes are expanded, how loop ends and repeated labels are handled, and why the expansion terminates. Hack's complete coverability-tree construction supplies those details for weighted P/T nets. Its finite tree decides coverability: a finite target is coverable exactly when it is componentwise dominated by an appropriate symbolic node. It also exposes unbounded components. But acceleration deliberately loses exact-count information such as parity and correlations between places. Therefore:

  • a reachability graph is exact but may be infinite;
  • a complete ω\omega-accelerated coverability tree is finite and sufficient for coverability and boundedness;
  • the ω\omega abstraction does not decide exact reachability or liveness by itself.

General P/T-net reachability is nevertheless decidable. Mayr's 1981 paper presented an algorithm for the general Petri-net reachability problem, establishing that result by a substantially deeper construction. “The coverability tree cannot answer it” and “the problem is undecidable” are not equivalent claims.

Behavioral properties with quantifiers #

Let En(M)={t∈T∣M≥Pret}\mathop{\mathrm{En}}(M)=\{t\in T\mid M\geq\mathop{\mathrm{Pre}}_t\}.

$k$-bounded
For a specified $k\in\mathbb{N}$, the net is $k$-bounded when $\forall M\in R(M_0),\ \forall p\in P:\ M(p)\leq k$. A net is bounded if some finite $k$ satisfies this condition.
Safe
The net is 1-bounded: every reachable place count belongs to $\{0,1\}$. Safety never means token values $\{1,2\}$.
Deadlocked marking
$M$ is deadlocked when $\mathop{\mathrm{En}}(M)=\varnothing$. The net is deadlock-free when every reachable marking enables at least one transition.
Live transition and live net
A transition $t$ is live when, from every $M\in R(M_0)$, some continuation can eventually fire $t$: $\forall M\in R(M_0),\ \exists\sigma,M',M'':\ M[\sigma\rangle M'[t\rangle M''$. The net is live when every transition is live.
Reversible
$\forall M\in R(M_0):\ M_0\in R(M)$. Every reachable marking can return to the initial marking. More generally, a home marking is reachable from every reachable marking.
Persistent
For every reachable $M$ and every pair of distinct enabled transitions $t,u$, firing either does not disable the other: $M[t\rangle M'\Rightarrow u\in\mathop{\mathrm{En}}(M')$, with the universally quantified swapped pair covering the other direction.

Liveness is stronger than deadlock freedom: a system may always have some enabled transition while permanently starving another. Persistence is not the negation of that definition; it is the preservation of an already enabled alternative after another firing.

For the fork/join net, the five-node reachability graph proves all six claims:

  • every coordinate is 0 or 1, so it is safe and bounded;
  • every node has an outgoing edge, so it is deadlock-free;
  • from any node the cycle can progress until every transition fires, so every transition is live;
  • every node reaches M0M_0, so it is reversible;
  • the only marking with two enabled transitions is the post-fork marking, and either completion leaves the other enabled, so it is persistent.

These are properties of the marked net (N,M0)(N,M_0). Changing only M0M_0 can change every conclusion.

Incidence matrix and the state equation #

Fix place rows and transition columns. Define

C=Post−Pre∈Z∣P∣×∣T∣.C=\mathop{\mathrm{Post}}-\mathop{\mathrm{Pre}} \in\mathbb Z^{|P|\times|T|}.

For the fork/join net, using row order (I,L,R,Ld,Rd)(I,L,R,L_d,R_d) and column order (fork, finish_L, finish_R, join),

C=[−10011−10010−10010−1001−1].C= \begin{bmatrix} -1&0&0&1\\ 1&-1&0&0\\ 1&0&-1&0\\ 0&1&0&-1\\ 0&0&1&-1 \end{bmatrix}.

If an executable sequence σ\sigma fires transition tt exactly x(t)x(t) times, its Parikh vector is x=Ψ(σ)∈N∣T∣x=\Psi(\sigma)\in\mathbb N^{|T|}. Summing each firing equation gives the state equation

M=M0+Cx.M=M_0+Cx.

This equation is a necessary condition for reachability: every executable sequence supplies a nonnegative integer solution. It is not sufficient because CC records only net token change. It forgets the order of firings and whether the intermediate input requirements were ever available.

A spurious state-equation solution #

Take places (p,q)(p,q) and one transition tt with

Pret=(1,1)T,Postt=(0,2)T,Ct=(−1,1)T.\mathop{\mathrm{Pre}}_t=(1,1)^\mathsf T, \qquad \mathop{\mathrm{Post}}_t=(0,2)^\mathsf T, \qquad C_t=(-1,1)^\mathsf T.

From M0=(1,0)TM_0=(1,0)^\mathsf T, the equation with x(t)=1x(t)=1 yields the nonnegative candidate

M0+Ctx=(0,1)T.M_0+C_tx=(0,1)^\mathsf T.

Yet tt is not enabled initially because qq has no token, and there is no other transition. The target satisfies the state equation but is unreachable. Any analysis that solves M=M0+CxM=M_0+Cx must still prove that some ordering of the proposed transition multiset is executable.

P-invariants and T-invariants #

The incidence matrix exposes exact linear certificates.

For the fork/join net,

y=(2,1,1,1,1)Ty=(2,1,1,1,1)^\mathsf T

satisfies yTC=0y^\mathsf TC=0, giving

2M(I)+M(L)+M(R)+M(Ld)+M(Rd)=2.2M(I)+M(L)+M(R)+M(L_d)+M(R_d)=2.

The coefficient 2 accounts for the one idle token becoming two branch tokens. Because every coefficient is positive, this invariant supplies a finite upper bound for every place. A nonnegative invariant with zero coefficients may bound only the places in its support; an invariant with negative coefficients is an algebraic conservation law but not directly a token bound.

Here

x=(1,1,1,1)Tx=(1,1,1,1)^\mathsf T

is a T-invariant: one fork, each completion once, and one join have zero total marking change. The exact trace above realizes that multiset and returns to M0M_0.

The equations do not supply their own executions:

  • a P-invariant constrains reachable markings but does not characterize the reachability set;
  • a T-invariant need not have any enabled ordering from the chosen M0M_0;
  • even a realizable T-invariant does not by itself prove that every transition is live, that the net is reversible, or that the cycle is reachable from every reachable marking;
  • a basis of linear invariants may miss nonlinear and ordering constraints.

Use invariants to prove impossibility, conservation, or bounds; use behavioral reasoning to prove an execution exists.

Traps and siphons are structural certificates #

For a place set S⊆PS\subseteq P, define

∙S={t∈T∣∃p∈S:Post(p,t)>0},S∙={t∈T∣∃p∈S:Pre(p,t)>0}.{}^{\bullet}S=\{t\in T\mid\exists p\in S:\mathop{\mathrm{Post}}(p,t)>0\}, \qquad S^{\bullet}=\{t\in T\mid\exists p\in S:\mathop{\mathrm{Pre}}(p,t)>0\}.

Thus ∙S{}^{\bullet}S contains transitions that put tokens into SS, while S∙S^{\bullet} contains transitions that take tokens from SS.

  • A trap satisfies S∙⊆∙SS^{\bullet}\subseteq{}^{\bullet}S. Every transition that removes tokens from the set also returns at least one token somewhere in it. Once a trap is marked, it remains marked.
  • A siphon satisfies ∙S⊆S∙{}^{\bullet}S\subseteq S^{\bullet}. Every transition that adds tokens to the set also requires tokens from it. Once a siphon is empty, it remains empty.

These implications follow directly from the arc sets and firing rule, including weighted arcs. They are not complete deadlock tests. A marked trap need not be bounded; an empty siphon need not deadlock the whole net; and whether a trap starts marked or a siphon can become empty is behavioral information tied to M0M_0. Stronger conclusions require a theorem for a stated net subclass.

Structural facts versus marked behavior #

The unmarked structure is N=(P,T,Pre,Post)N=(P,T,\mathop{\mathrm{Pre}},\mathop{\mathrm{Post}}); adding M0M_0 produces a marked net. This division prevents two frequent reasoning errors.

Kind of statement What it depends on Examples
Structural graph and weights incidence matrix, P/T-invariant solution spaces, traps, siphons, free-choice shape
Behavioral structure plus initial marking and executions reachability, coverability, boundedness, safety, deadlock, liveness, reversibility, persistence

An invariant equation is structural, but its conserved constant yTM0y^\mathsf TM_0 and the bound inferred from it depend on the initial marking. Conversely, finding no useful linear invariant does not prove that the marked net is unbounded.

Graph reductions have the same boundary. Removing a place, fusing transitions, or collapsing a subnet is valid only under a specific reduction theorem whose structural, weight, marking, and target-property side conditions have been checked. There is no unconditional list of local rewrites that preserves boundedness, liveness, reachability, and reversibility all at once.

Extensions change the contract #

Plain weighted P/T arcs inspect and update token counts only through fixed nonnegative integer Pre and Post weights. The following variants add distinct semantics:

Extension Additional rule What must not be assumed from plain P/T semantics
Place capacities a firing must respect a maximum post-firing count plain nets have no implicit capacity or overflow rejection
Read/test arcs require tokens without consuming them enabling is no longer described solely by the consuming Pre column
Inhibitor arcs require a place count below a threshold, often zero this is a zero test, not an ordinary input arc
Reset arcs remove all tokens from a place on firing the update is marking-dependent, not one fixed incidence column
Priorities suppress lower-priority enabled transitions enabled in the token sense may no longer mean selectable
Colored/high-level nets tokens have types or values; bindings, guards, and arc expressions select data a colored marking is not a plain vector of anonymous counts without an explicit unfolding
Timed nets attach delays, clocks, or firing intervals untimed reachability alone says nothing about deadlines or duration
Stochastic nets attach probabilities, rates, or distributions plain nondeterministic choice is not random choice

Adding one of these features can change expressiveness, analysis algorithms, and decidability boundaries. Always put the variant in the model's name and restate its enabling and firing rules before reusing a property or theorem.

Diagnostic workflow #

When a net or an analysis result looks wrong, work from semantics outward:

  1. Name the exact net class. Record whether weights, capacities, read/inhibitor/reset arcs, priorities, colors, time, or stochastic rules are present.
  2. Type the structure. Check P∩T=∅P\cap T=\varnothing, arc endpoints, nonnegative integer weights, and the direction of Pre and Post.
  3. Write the initial marking and place order. Every vector and matrix must use the same declared order.
  4. Recompute enabling before firing. Verify M≥PretM\geq\mathop{\mathrm{Pre}}_t componentwise; then apply the complete atomic equation.
  5. Separate choice from concurrency. For co-enabled transitions, test the combined inequality M≥Pret+PreuM\geq\mathop{\mathrm{Pre}}_t+\mathop{\mathrm{Pre}}_u and then test whether one firing disables the other.
  6. Find a short exact trace. A concrete sequence often exposes a reversed arc, missing token, or illegal extension faster than global analysis.
  7. Use algebra as a filter. Compute CC, check the state equation, and solve for P/T-invariants. Treat a failed necessary condition as a proof of impossibility; do not treat a passed condition as proof of reachability.
  8. Choose exact or covering analysis deliberately. Build the reachability graph only when boundedness makes it finite or exploration limits are explicit. Use Karp–Miller-style coverability acceleration for coverability and unboundedness, never as an exact-marking oracle.
  9. State the property's quantifiers. “No deadlock found,” “each transition fired once,” and “live from every reachable marking” are three different claims.
  10. Validate any reduction against its theorem. List the property being preserved and every side condition before changing the net.

The central discipline is simple: keep the enabling relation, the token-update equation, and the question being asked distinct. Most incorrect Petri-net arguments collapse at least two of those layers.

Sources

  1. bookDiscrete Mathematics: Lecture Notes, Part 2pdfnotes
  2. bookDecidability Questions for Petri Netspdfnotes
  3. paperPetri Nets: Properties, Analysis and Applicationspdfnotes
  4. paperAbstract Processes of Place/Transition Systemsnotes
  5. paperMayr — An Algorithm for the General Petri Net Reachability Problem

Searches titles, aliases, headings, summaries, and full text.↑↓ move ↵ open esc close