Matrix Graph Grammars
Total Page:16
File Type:pdf, Size:1020Kb
MATRIX GRAPH GRAMMARS by Pedro Pablo P´erez Velasco Version 1.2 arXiv:0801.1245v2 [cs.DM] 17 Nov 2009 c Copyright by Pedro Pablo P´erez Velasco 2007, 2008, 2009 To my family VII ACKNOWLEDGEMENTS These lines are particularly pleasant to write. After all those years, I have a quite long list of people that have contributed to this book in one way or another. Unfortunately, I will not be able to include them all. Apologizes for the absences. First of all my family. Gema, with neverending patience and love, always supports me in every single project that I undertake. My unbounded love and gratitude. Hard to return, though I’ll try. My two daughters, Sof´ıaand Diana, make every single moment worthy. I’m absolutely grateful for their existence. My brothers Alex´ and Nina, now living in Switzerland, with whom I shared so many moments and that I miss so much. My parents, always supporting also with patience and love, worried if this boy would become a man (am I?). Juan, my thesis supervisor, whose advice and interest is invaluable. He has been actively involved in this project despite his many responsibilities. Also, I would like to thank the people at the series of seminars on complexity theory at U.A.M., headed by Roberto Moriy´on, for their interest on Matrix Graph Grammars. Many friends have stoically stood some chats on this topic affecting interest. Thank you very much for your friendship. KikeSim, GinHz, Alvaro´ Iglesias, Jaime Guerrero, ... All those who have passed by are not forgotten: People at ELCO (David, Fabrizio, Juanjo, Juli´an, Lola, ...), at EADS/SIC (Javier, Sergio, Roberto, ...), at Isban, at Banco Santander. Almost uncountable. I am also grateful to those that have worked on the tools used in this book: Emacs and microEmacs, MikTeX, TeTeX, TeXnicCenter, OpenOffice and Ubuntu. I would like to highlight the very good surveys available on different topics on math- ematics at the web, in particular at websites http://mathworld.wolfram.com and http://en.wikipedia.org, and the anonymous people behind them. Last few years have been particularly intense. A mixture of hard work and very good luck. I feel that I have received much more than I’m giving. In humble return, I will try to administer http://www.mat2gra.info, with freely available information on Matrix Graph Grammars such as articles, seminars, presentations, posters, one e-book (this one you are about to read) and whatever you may want to contribute with. Contents 1 Introduction ................................................... ..... 1 1.1 HistoricalOverview.................................. ............. 2 1.2 Motivation ......................................... ............. 6 1.3 BookOutline ........................................ ............ 11 2 Background and Theory ............................................ 15 2.1 Logics............................................ ............... 15 2.2 CategoryTheory ................................... .............. 19 2.3 GraphTheory ...................................... ............. 26 2.4 TensorAlgebra..................................... .............. 31 2.5 FunctionalAnalysis.................................. ............. 34 2.6 GroupTheory ...................................... ............. 37 2.7 Summary and Conclusions.............................. ........... 39 3 Graph Grammars Approaches ...................................... 41 3.1 DoublePushOut(DPO)................................ ........... 42 3.1.1 Basics ........................................... ......... 42 3.1.2 Sequentialization and Parallelism . .... 44 3.1.3 Application Conditions . ...... 47 3.1.4 Adhesive HLR Categories ............................. ...... 48 3.2 Other Categorical Approaches........................ .............. 48 X Contents 3.3 Node Replacement................................... ............. 52 3.4 Hyperedge Replacement.............................. ............. 56 3.5 MSOLApproach ..................................... ............ 59 3.6 Relation-Algebraic Approach . ............ 62 3.7 Summary and Conclusions.............................. ........... 65 4 Matrix Graph Grammars Fundamentals ............................ 67 4.1 Productions and Compatibility . .......... 67 4.2 TypesandCompletion ................................. ........... 74 4.3 Sequences and Coherence............................ .............. 79 4.4 CoherenceRevisited ................................. ............. 89 4.5 Summary and Conclusions.............................. ........... 95 5 Initial Digraphs and Composition ................................... 97 5.1 Minimal Initial Digraph . .......... 98 5.2 Negative Initial Digraph . ............ 107 5.3 Composition and Compatibility . ........ 111 5.4 Summary and Conclusions.............................. ........... 117 6 Matching ................................................... ........ 119 6.1 Matchand ExtendedMatch ............................ ........... 120 6.2 Marking........................................... .............. 129 6.3 Initial Digraph Set and Negative Digraph Set . ........ 131 6.4 Internal and External ε-productions ................................ 135 6.5 Summary and Conclusions.............................. ........... 139 7 Sequentialization and Parallelism ................................... 141 7.1 GraphCongruence.................................. .............. 141 7.2 Sequentialization – Grammar Rules . ......... 155 7.3 Sequential Independence – Derivations .................. ............ 161 7.4 Explicit Parallelism . .......... 163 7.5 Summary and Conclusions.............................. ........... 167 Contents XI 8 Restrictions on Rules ............................................... 169 8.1 Graph Constraints and Application Conditions . ........ 170 8.2 Embedding Application Conditions into Rules . ...... 185 8.3 Sequentialization of Application Conditions . ........ 194 8.4 Summary and Conclusions.............................. ........... 204 9 Transformation of Restrictions ...................................... 207 9.1 Consistency and Compatibility . .......... 207 9.2 MovingConditions .................................... ........... 215 9.3 From Simple Digraphs to Multidigraphs . ....... 223 9.4 Summary and Conclusions.............................. ........... 230 10 Reachability ................................................... ..... 233 10.1 CrashCoursein Petri Nets ........................... ............. 234 10.2 MGG Techniques for Petri Nets ........................ ............ 237 10.3 Fixed Matrix Graph Grammars .......................... .......... 239 10.4 Floating Matrix Graph Grammars........................ .......... 245 10.4.1 External ε-production....................................... 246 10.4.2 Internal ε-production ....................................... 249 10.5 Summary and Conclusions............................. ............ 250 11 Conclusions and Further Research .................................. 253 11.1 Summary and Short Term Research..................... ............ 253 11.2 Long Term Research Program......................... ............. 256 A Case Study ................................................... ...... 259 A.1 Presentationof the Scenario .......................... ............. 260 A.2 Sequences ........................................ ............... 267 A.3 Initial Digraph Sets and G-Congruence................... ........... 272 A.4 Reachability ........................................ ............. 277 A.5 Graph Constraints and Application Conditions . ........ 282 A.6 Derivations ........................................ .............. 288 References ................................................... ........... 291 XII Contents Index ................................................... ................ 297 List of Figures 1.1 Main Steps in a Grammar Rule Application . ..... 3 1.2 Partial Diagram of Problem Dependencies . .......... 9 1.3 Confluence ........................................ ............... 10 2.1 UniversalProperty ................................. ............... 21 2.2 Product, Cone and Universal Cone ...................... ............ 21 2.3 PushoutandPullback ................................. ............ 22 2.4 PushoutasGluing ofSets .............................. ............ 23 2.5 InitialPushout..................................... ............... 24 2.6 VanKampenSquare.................................. ............. 25 2.7 Three, Four and Five Nodes Simple Digraphs . ........ 27 3.1 Example of Simple DPO Production . ........ 42 3.2 Direct Derivation as DPO Construction . .......... 43 3.3 ParallelIndependence............................... ............... 44 3.4 Sequential Independence ............................ ............... 45 3.5 Generic Application Condition Diagram . ........ 47 3.6 Gluing Condition . ............ 49 3.7 SPODirectDerivation................................. ............ 50 3.8 SPO Weak Parallel Independence........................ ............ 50 3.9 SPO Weak Sequential Independence ..................... ............ 51 XIV List of Figures 3.10 Sequential and Parallel Independence.................. ............... 51 3.11 SPB Replication Example . ........... 53 3.12 Example of NLC Production............................ ............ 54 3.13 edNCE Node Replacement Example ....................... .......... 55 3.14 Edge Replacement.................................. ............... 56 3.15 String Grammar Example .............................. ...........