Transformation of Petri Nets into Context-Dependent Fusion Grammars org Kreowski 1 , Sabine Kuske 1 and Aaron Lye 2 Hans-J¨ University of Bremen 1 Department of Computer Science, 2 Department of Mathematics P.O.Box 33 04 40, 28334 Bremen, Germany { kreo,kuske,lye } @informatik.uni-bremen.de 27.03.2019 13th International Conference on Language and Automata Theory and Applications (LATA) 1/26
Motivation We introduced fusion grammars generating hypergraphs at ICGT17. Formal framework for fusion processes in: ◮ DNA computing ◮ chemistry ◮ tiling ◮ fractal geometry ◮ visual modeling ◮ etc. 2/26
Hypergraph We consider hypergraphs over Σ with hyperedges like v k 1 v 1 . . . k 1 1 A 1 k 2 . . . w 1 w k 2 where v 1 · · · v k 1 is a sequence of source nodes w 1 · · · w k 2 is a sequence of target nodes A ∈ Σ is a label. The class of all hypergraphs over Σ is denoted by H Σ . 3/26
Fusion rule Let F ⊆ Σ be a fusion alphabet. Let type : F → N × N . Each A ∈ F has a complement A ∈ F where type ( A ) = type ( A ). v ′ v ′ v 1 v k 1 1 . . . k 1 . . . 1 k 1 1 k 1 fr ( A ) = type ( A ) = ( k 1 , k 2 ) A A 1 k 2 1 k 2 . . . . . . w ′ w ′ w k 2 w 1 1 k 2 Examples: fr ( t 4 ) = type ( t 4 ) = (2 , 1) t 4 t 4 fr ( ◦ ) = ◦ ◦ type ( ◦ ) = (0 , 1) 4/26
Rule application 1. find a matching morphism g of fr ( A ) in the hypergraph H v ′ v ′ v 1 v k 1 1 . . . k 1 . . . 1 k 1 1 k 1 H A A 1 k 2 k 2 1 . . . . . . w ′ w k 2 w ′ w 1 1 k 2 5/26
Rule application 1. find a matching morphism g of fr ( A ) in the hypergraph H 2. remove the images of the two hyperedges of fr ( A ) v ′ v ′ v 1 v k 1 1 . . . k 1 . . . I . . . . . . w ′ w k 2 w ′ w 1 1 k 2 5/26
Rule application 1. find a matching morphism g of fr ( A ) in the hypergraph H 2. remove the images of the two hyperedges of fr ( A ) 3. identify corresponding source and target vertices of the removed edges v k 1 = v ′ v 1 = v ′ 1 k 1 . . . H ′ . . . w k 2 = w ′ w 1 = w ′ 1 k 2 5/26
Rule application 1. find a matching morphism g of fr ( A ) in the hypergraph H 2. remove the images of the two hyperedges of fr ( A ) 3. identify corresponding source and target vertices of the removed edges v k 1 = v ′ v 1 = v ′ 1 k 1 . . . H ′ . . . w k 2 = w ′ w 1 = w ′ 1 k 2 5/26
Rule application 1. find a matching morphism g of fr ( A ) in the hypergraph H 2. remove the images of the two hyperedges of fr ( A ) 3. identify corresponding source and target vertices of the removed edges v k 1 = v ′ v 1 = v ′ 1 k 1 . . . H ′ . . . w k 2 = w ′ w 1 = w ′ 1 k 2 fr ( A ) H ′ . ⇒ Rule application is denoted by H = 5/26
Example fr ( t 4 ) = t 4 t 4 ◦ ◦ t 4 ◦ ◦ H = t 4 ◦ ◦ ◦ t 4 6/26
Example fr ( t 4 ) = t 4 t 4 ◦ ◦ t 4 ◦ ◦ H = t 4 ◦ ◦ ◦ t 4 6/26
Example fr ( t 4 ) = t 4 t 4 ◦ ◦ t 4 ◦ ◦ H = t 4 ◦ ◦ ◦ t 4 ◦ v 1 t 4 ◦ v ′ ◦ ◦ I = w 1 1 w ′ ◦ 1 v ′ ◦ v 2 ◦ 2 6/26
Example fr ( t 4 ) = t 4 t 4 ◦ ◦ t 4 ◦ ◦ H = t 4 ◦ ◦ ◦ t 4 ◦ v 1 t 4 ◦ v ′ ◦ ◦ I = w 1 1 w ′ ◦ 1 v ′ ◦ v 2 ◦ 2 v 1 = v ′ ◦ 1 ◦ H ′ = ◦ ◦ t 4 ◦ w 1 = w ′ ◦ 1 v 2 = v ′ ◦ 2 6/26
Context-dependent fusion rule and its application PC , NC : sets of morphisms with domain fr ( A ) ( fr ( A ) , PC , NC ) applicable to hypergraph H via a matching morphism g : fr ( A ) → H if 1. ∀ c ∈ PC 2. ∀ c ∈ NC c c fr ( A ) fr ( A ) C C = = g g ∃ h � ∃ h H H and h is injective on the set of hyperedges. 7/26
Multiplication Generalization of dublication used in DNA computing. Let C ( H ) be the set of all connected components of H . Define multiplicity m : C ( H ) → N . � H = m m · H = ⇒ m ( C ) · C C ∈C ( H ) 8/26
Multiplication Generalization of dublication used in DNA computing. Let C ( H ) be the set of all connected components of H . Define multiplicity m : C ( H ) → N . � H = m m · H = ⇒ m ( C ) · C C ∈C ( H ) Example: ◦ ◦ t 4 H = ◦ ◦ t 4 ◦ ◦ ◦ t 4 = C 1 + C 2 = ⇒ 2 · C 1 + 3 · C 2 for m ( C 1 ) = 2 , m ( C 2 ) = 3 m ◦ ◦ = ◦ ◦ t 4 t 4 ◦ ◦ ◦ t 4 ◦ t 4 ◦ t 4 ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ t 4 t 4 t 4 8/26
Context-dependent fusion grammar CDFG = ( Z , F , M , T , P ) ◮ Z ∈ H F ∪ F ∪ M ∪ T finite start hypergraph F , M , T ⊆ Σ, fusion, marker, terminal alphabet (all finite) M ∩ ( F ∪ F ) = ∅ , T ∩ ( F ∪ F ) = ∅ = T ∩ M P finite set of context-dependent fusion rules 9/26
Context-dependent fusion grammar CDFG = ( Z , F , M , T , P ) ◮ Z ∈ H F ∪ F ∪ M ∪ T finite start hypergraph F , M , T ⊆ Σ, fusion, marker, terminal alphabet (all finite) M ∩ ( F ∪ F ) = ∅ , T ∩ ( F ∪ F ) = ∅ = T ∩ M P finite set of context-dependent fusion rules ◮ A direct derivation is either cdfr H ′ H = ⇒ for some cdfr ∈ P or H = m m · H = � ⇒ m ( C ) · C for some multiplicity C ∈C ( H ) m : C ( H ) → N . ◮ Derivations are defined by the reflexive and transitive closure. 9/26
Context-dependent fusion grammar CDFG = ( Z , F , M , T , P ) ◮ Z ∈ H F ∪ F ∪ M ∪ T finite start hypergraph F , M , T ⊆ Σ, fusion, marker, terminal alphabet (all finite) M ∩ ( F ∪ F ) = ∅ , T ∩ ( F ∪ F ) = ∅ = T ∩ M P finite set of context-dependent fusion rules ◮ A direct derivation is either cdfr H ′ H = ⇒ for some cdfr ∈ P or H = m m · H = � ⇒ m ( C ) · C for some multiplicity C ∈C ( H ) m : C ( H ) → N . ◮ Derivations are defined by the reflexive and transitive closure. ◮ The generated language ∗ L ( CDFG ) = { rem M ( Y ) | Z = ⇒ H , Y ∈ C ( H ) ∩ ( H T ∪ M −H T ) } , where rem M ( Y ) removes all marker hyperedges from Y . 9/26
Petri Net PN = ( P , T , F , W , M 0 ) t 1 t 3 ◮ disjoint finite sets P and T ◮ flow relation F ⊆ ( P × T ) ∪ ( T × P ) p 1 p 2 p 3 p 4 p 5 ◮ weight function W : F → N > 0 2 t 2 t 4 ◮ marking M : P → N ◮ • t and t • denote the set of pre- and post-places of t ∈ T . 10/26
Petri Net PN = ( P , T , F , W , M 0 ) t 1 t 3 ◮ disjoint finite sets P and T ◮ flow relation F ⊆ ( P × T ) ∪ ( T × P ) p 1 p 2 p 3 p 4 p 5 ◮ weight function W : F → N > 0 2 t 2 t 4 ◮ marking M : P → N ◮ • t and t • denote the set of pre- and post-places of t ∈ T . ◮ t is enabled in M if M ( p ) ≥ W ( p , t ) for each p ∈ • t . ◮ M [ t � M ′ : in each p ∈ • t W ( p , t ) tokens are consumed M [ t � M ′ : and to each p ∈ t • W ( t , p ) tokens are added. 10/26
Petri Net PN = ( P , T , F , W , M 0 ) t 1 t 3 ◮ disjoint finite sets P and T ◮ flow relation F ⊆ ( P × T ) ∪ ( T × P ) p 1 p 2 p 3 p 4 p 5 ◮ weight function W : F → N > 0 2 t 2 t 4 ◮ marking M : P → N ◮ • t and t • denote the set of pre- and post-places of t ∈ T . ◮ t is enabled in M if M ( p ) ≥ W ( p , t ) for each p ∈ • t . ◮ M [ t � M ′ : in each p ∈ • t W ( p , t ) tokens are consumed M [ t � M ′ : and to each p ∈ t • W ( t , p ) tokens are added. ◮ Reach ( PN ) = { M ′′ | M 0 [ ∗� M ′′ } is the set of markings reachable from M 0 . 10/26
Transformation of Petri Nets into Context-Dependent Fusion Grammars PN = ( P , T , F , W , M 0 ) ❀ CDFG ( PN ) = ( Z PN , F PN , M PN , T PN , P PN ) 11/26
Transformation of Petri Nets into Context-Dependent Fusion Grammars PN = ( P , T , F , W , M 0 ) ❀ CDFG ( PN ) = ( Z PN , F PN , M PN , T PN , P PN ) ◮ F PN = {◦} ∪ T , M PN = { µ } , T PN = {•} type ( ◦ ) = (0 , 1), type ( t ) = ( | • t | , | t • | ) for each t ∈ T 11/26
Transformation of Petri Nets into Context-Dependent Fusion Grammars PN = ( P , T , F , W , M 0 ) ❀ CDFG ( PN ) = ( Z PN , F PN , M PN , T PN , P PN ) ◮ F PN = {◦} ∪ T , M PN = { µ } , T PN = {•} type ( ◦ ) = (0 , 1), type ( t ) = ( | • t | , | t • | ) for each t ∈ T Both ◦ and • represent token, because F ∩ T = ∅ 11/26
Transformation of Petri Nets into Context-Dependent Fusion Grammars PN = ( P , T , F , W , M 0 ) ❀ CDFG ( PN ) = ( Z PN , F PN , M PN , T PN , P PN ) ◮ F PN = {◦} ∪ T , M PN = { µ } , T PN = {•} type ( ◦ ) = (0 , 1), type ( t ) = ( | • t | , | t • | ) for each t ∈ T Both ◦ and • represent token, because F ∩ T = ∅ ◮ Z PN = hg ( P , T , M 0 ) + � C t + C • + � D t t ∈ T t ∈ T 11/26
Transformation of Petri Nets into Context-Dependent Fusion Grammars PN = ( P , T , F , W , M 0 ) ❀ CDFG ( PN ) = ( Z PN , F PN , M PN , T PN , P PN ) ◮ F PN = {◦} ∪ T , M PN = { µ } , T PN = {•} type ( ◦ ) = (0 , 1), type ( t ) = ( | • t | , | t • | ) for each t ∈ T Both ◦ and • represent token, because F ∩ T = ∅ ◮ Z PN = hg ( P , T , M 0 ) + � C t + C • + � D t t ∈ T t ∈ T ◮ hg ( P , T , M 0 ) represents the initial Petri net ◮ C t is used for firing transitions t according to W 11/26
Recommend
More recommend