Petri Nets Ina Koch and Monika Heiner 1

  • Slides: 37
Download presentation
Petri Nets Ina Koch and Monika Heiner 1

Petri Nets Ina Koch and Monika Heiner 1

Petri Nets(1962) n Carl Adam Petri 2

Petri Nets(1962) n Carl Adam Petri 2

Outline basic definition n structural analysis n biological network with Petri net n 3

Outline basic definition n structural analysis n biological network with Petri net n 3

Petri net n Definition : n PN = (P, T, f, m ) 0

Petri net n Definition : n PN = (P, T, f, m ) 0 n n n Two type nodes Set : P (Places) ; T (transitions) Edges Set : f (set of directed arcs) m 0 : initial marking(tokens) 4

Example Arcs only connect of different type 5

Example Arcs only connect of different type 5

Firing rule n Definition n A transition t is enabled in a marking m

Firing rule n Definition n A transition t is enabled in a marking m n n m[t>, if ∀p ∈ • t : f (p, t) ≤ m(p). transition t, which is enabled in m, may fire. n When t in m fires : n m[t>m’, with∀p ∈ P : m’(p) = m(p) − f (p, t) + f (t, p). 6

Example: 2 NAD+ + 2 H 2 O → 2 NADH + 2 H+

Example: 2 NAD+ + 2 H 2 O → 2 NADH + 2 H+ + O 2 firing 7

Concurrent Firing actions partial order (r 1 , r 2); (r 1 , r

Concurrent Firing actions partial order (r 1 , r 2); (r 1 , r 3); r 2, r 3 can fire independently 8

Behavioral Properties n n n Reachability liveness, reversibility Boundedness others 9

Behavioral Properties n n n Reachability liveness, reversibility Boundedness others 9

Behavioral Properties : Reachability n n Marking M is reachable from marking M 0

Behavioral Properties : Reachability n n Marking M is reachable from marking M 0 if there exists a sequence of firings s = M 0 t 1 M 1 t 2 M 2… M that transforms M 0 to M. [M 0> n Set of marking M reachable from M 0 10

Behavioral Properties : Reachability [M 0> = R(M 0)={(1 1 0 0) , (0

Behavioral Properties : Reachability [M 0> = R(M 0)={(1 1 0 0) , (0 0 1 0) , (1 0 0 1) } 11

Behavioral Properties : Liveness n Definition: Liveness of transitions n A transition t is

Behavioral Properties : Liveness n Definition: Liveness of transitions n A transition t is dead in a marking m, if it is not enabled in every marking m’ reachable from m: n n n ∃ m’ ∈ [m> : m’[t> m’ ∈ [m> : m’[t> A transition t is live, if it is not dead in any marking reachable from m 0 12

Behavioral Properties : Liveness n Definition: Liveness of Petri net n Deadlock-free (weakly live)

Behavioral Properties : Liveness n Definition: Liveness of Petri net n Deadlock-free (weakly live) : n if there are no reachable dead markings. n n (marking m is dead if there is no transition enabled in m) Live (strongly live) : n if each transition is live 13

Examples Weakly live 14

Examples Weakly live 14

Behavioral Properties : Reversibility n Definition : n A Petri net is reversible: n

Behavioral Properties : Reversibility n Definition : n A Petri net is reversible: n ∀m ∈ [m 0> : m 0 ∈ [m> X Not reversible 15

Behavioral Properties : Boundedness n Definition : n place p is k-bounded : n

Behavioral Properties : Boundedness n Definition : n place p is k-bounded : n n if ∃k ∈ postive integer : ∀m ∈ [m 0> : m(p) ≤ k Petri Net is k-bounded : n if all its places are k-bounded 16

Unbounded 17

Unbounded 17

Unbounded 18

Unbounded 18

Unbounded 19

Unbounded 19

Unbounded 20

Unbounded 20

Structural Analysis n ordinary : n n Pure: n n A Petri net is

Structural Analysis n ordinary : n n Pure: n n A Petri net is ordinary, if all arc weights are equal to 1 A Petri net is pure, if there are no two nodes, connected in both directions conservative: n A Petri net is conservative, if all transitions fire tokenpreservingly 21

Structural Analysis (cont’s) n connected : n n Strongly connected: n n A Petri

Structural Analysis (cont’s) n connected : n n Strongly connected: n n A Petri net is connected, if it holds for all pairs of nodes a and b that there is an undirected path from a to b. A Petri net is strongly connected, if it holds for all pairs of nodes a and b that there is an directed path from a to b. free of boundary nodes: n A Petri net is free of boundary nodes, if there are no transitions without pre-/postplaces and no places without pre/posttransitions 22

Structural Analysis (cont’s) n free of static confilct : n A Petri net is

Structural Analysis (cont’s) n free of static confilct : n A Petri net is free of static conflicts, if there are no two transitions sharing a preplace. . 23

Structural Analysis (cont’s) n structural deadlock : n n D ⊆ P , •

Structural Analysis (cont’s) n structural deadlock : n n D ⊆ P , • D ⊆ D • trap : n Q⊆P , Q • ⊆ • Q 24

example structural deadlock : n D ={A, B}, n trap : n • D

example structural deadlock : n D ={A, B}, n trap : n • D ={r 1, r 2}, D • ={r 1, r 2, r 3} : • D ⊆ D • • Q ={C, D, E}, Q ={r 4, r 5}, n • Q ={r 1, r 3, r 4, r 5} : Q • ⊆ • Q 25

matrix representation • matrix entry cij : token change in place pi by firing

matrix representation • matrix entry cij : token change in place pi by firing of transition tj • matrix column Δtj: vector describing the change of the whole marking by firing of tj 26

incidence (stoichiometric) matrix 27

incidence (stoichiometric) matrix 27

T-invariants n integer solutions y : ( y is transition vector) n C •

T-invariants n integer solutions y : ( y is transition vector) n C • y= 0, y≠ 0, y ≥ 0 1 y 1 − 3 y 2 +3 y 3 = 0 2 y 1 − 2 y 2 = 0 − 2 y 1 +3 y 3 = 0 +2 y 2 − 3 y 3 = 0 28

P-invariants n integer solutions x : ( x is place vector) n x •

P-invariants n integer solutions x : ( x is place vector) n x • C= 0, x≠ 0, x ≥ 0 x 1 +2 x 2 − 2 x 3 = 0 − 3 x 1 − 2 x 2 +2 x 4 +2 x 5 = 0 3 x 1 +3 x 3 − 3 x 4 − 3 x 5 = 0 29

covered by invariants n Definition : n n A Petri net is covered by

covered by invariants n Definition : n n A Petri net is covered by p-invariants—CPI, if every place belongs to a p-invariant A Petri net is covered by t-invariants—CTI, if every transition belongs to a t-invariant. 30

example P-invar solutions (2, 0, 1, 0, 3)=>{A, C, E} (0, 1, 1, 0,

example P-invar solutions (2, 0, 1, 0, 3)=>{A, C, E} (0, 1, 1, 0, 1)=>{B, C, E} (2, 0, 1, 3, 0)=>{A, C, D} (0, 1, 1, 1, 0)=>{B, C, D} T-invar solutions (3, 3, 2)=>{r 1, r 2, r 3} 31

Reachability graph n Let N = (P, T, f, m 0) be a Petri

Reachability graph n Let N = (P, T, f, m 0) be a Petri net. The reachability graph of N is the graph RG(N) = (VN, EN ), where n VN : = [m 0> is the set of nodes, n EN : = {(m, t, m’) | m, m’ ∈ [m 0, t ∈ T : m[t>m’} is the set of arcs. 32

Reachability graph n 1. k-bounded: n n 2. reversible: n n iff there is

Reachability graph n 1. k-bounded: n n 2. reversible: n n iff there is no node in the reachability graph with a token number larger than k in any place. iff the reachability graph is strongly connected. 3. deadlock-free: n iff the reachability graph does not contain nodes without outgoing arcs. 33

Reachability graph 34

Reachability graph 34

Different type of biological network signal transduction networks gene regulatory networks metabolic networks 35

Different type of biological network signal transduction networks gene regulatory networks metabolic networks 35

Pathway vs Network n n Pathway n n cell behavior or the whole model

Pathway vs Network n n Pathway n n cell behavior or the whole model of a cell represents functional subnetwork Network may consist of several pathways 36

Hypergraph to Petri Nets 37

Hypergraph to Petri Nets 37