Parallel Rewriting of Graphs through the. Pullback Approach. Michel Bauderon 1. Laboratoire Bordelais de Recherche en Informatique

Similar documents
Figure 1: A cycle's covering. Figure : Two dierent coverings for the same graph. A lot of properties can be easily proved on coverings. Co

Localization in Graphs. Richardson, TX Azriel Rosenfeld. Center for Automation Research. College Park, MD

THE FREUDENTHAL-HOPF THEOREM

A Nim game played on graphs II

Handout 9: Imperative Programs and State

1.2 Adding Integers. Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

CPSC 320 Sample Solution, Playing with Graphs!

.Math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in .

Applied Finite Mathematics. Collection Editor: Rupinder Sekhon

Connexions module: m Linear Equations. Rupinder Sekhon

Math 302 Introduction to Proofs via Number Theory. Robert Jewett (with small modifications by B. Ćurgus)

Tilings of the Euclidean plane

On a conjecture of Keedwell and the cycle double cover conjecture

Edge disjoint monochromatic triangles in 2-colored graphs

The Global Standard for Mobility (GSM) (see, e.g., [6], [4], [5]) yields a

Math 443/543 Graph Theory Notes

ON DIFFERENCE CORDIAL GRAPHS

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA

14.1 Encoding for different models of computation

Chordal graphs and the characteristic polynomial

Infinite locally random graphs

Abstract. This note presents a new formalization of graph rewritings which generalizes traditional

Graph Theory Questions from Past Papers

Math 443/543 Graph Theory Notes

Synchronization Expressions: Characterization Results and. Implementation. Kai Salomaa y Sheng Yu y. Abstract

Calculus I (part 1): Limits and Continuity (by Evan Dummit, 2016, v. 2.01)

Nesting points in the sphere. Dan Archdeacon. University of Vermont. Feliu Sagols.

Intersection of sets *

1 Recursion. 2 Recursive Algorithms. 2.1 Example: The Dictionary Search Problem. CSci 235 Software Design and Analysis II Introduction to Recursion

A stack eect (type signature) is a pair of input parameter types and output parameter types. We also consider the type clash as a stack eect. The set

NOVEL APPROACH FOR COMPARING SIMILARITY VECTORS IN IMAGE RETRIEVAL

Discrete mathematics , Fall Instructor: prof. János Pach

Computability and Complexity

Chapter 5 Lempel-Ziv Codes To set the stage for Lempel-Ziv codes, suppose we wish to nd the best block code for compressing a datavector X. Then we ha

Grade 6 Math Circles November 6 & Relations, Functions, and Morphisms

degree at least en? Unfortunately, we can throw very little light on this simple question. Our only result in this direction (Theorem 3) is that, if w

Experiments on string matching in memory structures

Let us dene the basic notation and list some results. We will consider that stack eects (type signatures) form a polycyclic monoid (introduced in [NiP

Eulerian disjoint paths problem in grid graphs is NP-complete

Hypergraph Grammars in hp-adaptive Finite Element Method

Enumeration of Full Graphs: Onset of the Asymptotic Region. Department of Mathematics. Massachusetts Institute of Technology. Cambridge, MA 02139

Propositional Logic. Part I

Weak Dynamic Coloring of Planar Graphs

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

Fundamental Properties of Graphs

Isogeny graphs, algorithms and applications

Strong edge coloring of subcubic graphs

Bipolar Fuzzy Line Graph of a Bipolar Fuzzy Hypergraph

Theory of Graph Transformations

Discrete mathematics

Treewidth and graph minors

A Cantor-Bernstein theorem for paths in graphs

arxiv: v1 [math.co] 25 Sep 2015

GENERATIVELY DETERMINISTIC L LANGUAGES. SUBWORD POINT OF VIEW

MA651 Topology. Lecture 4. Topological spaces 2

Distributed minimum spanning tree problem

Lecture 19 Thursday, March 29. Examples of isomorphic, and non-isomorphic graphs will be given in class.

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

On the Recognizability of Arrow and Graph Languages

Sparse Hypercube 3-Spanners

Algebraic Properties of CSP Model Operators? Y.C. Law and J.H.M. Lee. The Chinese University of Hong Kong.

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

Extremal results for Berge-hypergraphs

talk in Boca Raton in Part of the reason for not publishing the result for such a long time was his hope for an improvement in terms of the size

EXTREME POINTS AND AFFINE EQUIVALENCE

. The problem: ynamic ata Warehouse esign Ws are dynamic entities that evolve continuously over time. As time passes, new queries need to be answered

Some Hardness Proofs

On Universal Cycles of Labeled Graphs

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

Category Theory in Ontology Research: Concrete Gain from an Abstract Approach

G G[S] G[D]

Johns Hopkins Math Tournament Proof Round: Point Set Topology

Abstract algorithms. Claus Diem. September 17, 2014

Tomaz Pisanski, University of Ljubljana, Slovenia. Thomas W. Tucker, Colgate University. Arjana Zitnik, University of Ljubljana, Slovenia

Structural and Syntactic Pattern Recognition

ON SWELL COLORED COMPLETE GRAPHS

Introduction aux Systèmes Collaboratifs Multi-Agents

Let v be a vertex primed by v i (s). Then the number f(v) of neighbours of v which have

THE LINEAR CHROMATIC NUMBER OF A GRAPH

6 Planar Graphs. 6.1 Euler's Formula

Universal Cycles for Permutations

Labelling Wheels for Minimum Sum Number. William F. SMYTH. Abstract. A simple undirected graph G is called a sum graph if there exists a

Math 5593 Linear Programming Lecture Notes

Incidence coloring game and arboricity of graphs

The problem of minimizing the elimination tree height for general graphs is N P-hard. However, there exist classes of graphs for which the problem can

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

A note on Prüfer-like coding and counting forests of uniform hypertrees

Three applications of Euler s formula. Chapter 10

Monotone Paths in Geometric Triangulations

COLORING EDGES AND VERTICES OF GRAPHS WITHOUT SHORT OR LONG CYCLES

Helly Property, Clique Graphs, Complementary Graph Classes, and Sandwich Problems

Routing in Unidirectional (n, k)-star graphs

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

time using O( n log n ) processors on the EREW PRAM. Thus, our algorithm improves on the previous results, either in time complexity or in the model o

Topology and the Four Color Theorem

the application rule M : x:a: B N : A M N : (x:a: B) N and the reduction rule (x: A: B) N! Bfx := Ng. Their algorithm is not fully satisfactory in the

2 ZARKO BIZACA AND JOHN ETNYRE innitely many smooth structures. Our construction of these smooth structures is based on Gompf's [G1] end-sums with exo

A step towards the Bermond-Thomassen conjecture about disjoint cycles in digraphs

CONNECTIVITY AND NETWORKS

Transcription:

URL: http://www.elsevier.nl/locate/entcs/volume.html 8 pages Parallel Rewriting of Graphs through the Pullback Approach Michel Bauderon Laboratoire Bordelais de Recherche en Informatique Universite Bordeaux I 45 Talence Cedex, France Abstract We continue here the development of our description of the pullback approach to graph rewriting - already shown to encompass both the NCE and the doublepushout approach, by describing parallel application of rewriting rules. We show that this new framework provides a genuine denition of parallel rewriting (parallel application of several rewriting rules at several dierent places in the graph is actually expressed through the application of one single mathematical operation) and even further that a deterministic graph grammar can be described by a single rule which we call P -grammar. Introduction In two earlier papers [,], we have presented a new categorical approach to graph rewriting where the traditional pushout is replaced by a pullback. As shown in [] by the coding of (B)NLC [5] and HR [,4] rules, this new approach provides a unied framework to both node and edge rewriting. The denitions used there were simplied and tailored to the problem we were adressing : coding of a single NLC or HR rule into a pullback rule. In this paper, we look at the more realistic case of a set of rules which are applied to a set of variables in a graph. This necessitates of course a slight improvement of our formalism, namely the use of an alphabet with an arbitrary number of unknowns. We can then describe our two main concepts, that of a graph with a set of compatible unknowns (which we call a multiunknown) and that of a P -grammar which unies into one single rule a whole set of ordinary rules, i.e., a (deterministic) grammar. The pullback mechanism can then be applied to dene simultaneous application of a P -grammar to a set of compatible unknowns. This is what we This work has been supported by the Esprit BRA "Computing with graph transformations" c995 Elsevier Science B. V. Open access under CC BY-NC-ND license.

call parallel rewriting in that it describes the genuinely parallel application of a set of rules to one graph. By genuinely,we mean that the rewriting does not depend on the rule itself, nor on the rewriting mechanism but only on where and howwechoose to apply the rule. More precisely, if for instance we consider a given P -grammar which may apply a rewriting to two distinct variables which we shall call x and y (simply for convenience since, as we shall point out later, labels are useless in our context), we maychoose to apply only the part concerning x to an x variable, the whole rule two a pair of compatible variables x and y or even more the whole rule to several occurrences of both variables (provided they remain compatible in a sense that we shall make more precise later in this paper). Then the main property of our rewriting mechanism is that whatever the variable pattern, rewriting with the P -grammar will require one and only one pullback step (without of course any of the usual artefacts such as duplicating the rewriting rule to get as many copies as we get occurences of one variable). It is clear that in this setting, the only natural way to apply a P -grammar to a graph with a set of variables G is to apply it in parallel : sequentializing the application would imply replacing G by a family of one variable graphs to which the rule could be applied step by step. This would be extremely unnatural. Section recalls from [] and extends the basic denitions and results on graphs and pullbacks that we need in the sequel, section describes the rewriting mechanism, shows how to transform a deterministic grammar into a single rewriting rule, and briey indicates some basic applications of those results. Although we believe that this framework is both simple and natural and might become a new basis for the study of graph grammars (at least deterministic ones), we are aware that it is completely new and might look alien to most researchers in the eld. This is why this short presentation contains only the basic denitions and enough examples for the reader to get some intuition. Results are only briey described and very few technical details are given. Denitions Let Z, N and N be respectively the sets of integers, non negative integers and positive integers. We shall consider simple, undirected graphs, possibly with loops and we shall use indistinctly the words nodes and vertices. A graph is a pair G = hv Ei where V is the set of vertices and E is the set of edges. An edge between vertices u and v will be denoted by [u v]. A node v in V is reexive if[v v] E. If S is any set, the complete graph K S over S is the graph <S SS>. A graph morphism h : G! G is a pair h =< h V h E > where h V :V! V and h E : E! E are two mappings of sets such that h E ([u v]) = [h V (u) h V (v)]. It is well known that the good properties of graph morphisms turn the set of graphs into a category that we shall denote by G.

a c π b a π c f a b f Fig.. A sample pullback Proposition. The category G has arbitrary products and equalizers. The graph with one vertex and one edge is a terminal object simply denoted by. It is a neutral element for the product. The category G has arbitrary limits (it is complete) and in particular pullbacks. The categorical (or Kronecker) product of two graphs G and G is a pair of arrows G G G! G where G G is dened by : V = V V E = f[u u v v ]=[u v ] E ^ [u v ] E g: The denition of the corresponding projections i : G G! G i is quite obvious. g The pullback of a pair of graph morphisms G! G g G is another h pair G H h! G of morphisms where H is the subgraph of the product G G consisting of those items (nodes and edges) on which g and g coincide. To ease the intuition of the reader who feels unfamiliar with pullbacks, and without getting into too much details (which can be found in [6]), Figure shows the pullbackoftwo arrows from K to a totally reexivecopyofk given by the obvious projections : the vertical edges project onto the corresponding loop, while the horizontal edges remain unchanged. The dotted triangles are shown to give a better intuition of the computation, but they do not belong to the pullback.

- - Fig.. The alphabet graph Rewriting rules. Labels and unknowns Denition. The alphabet graph A is the innite totally reexive graph with : Z as set of vertices, f[ i n]=n i N g[f[ n]=n N g[f[m n]=m n N g as set of edges. In other words, A is obtained by taking the countable complete graph K!, an extra reexive node called, a countable set of reexive nodes called ::: and linking each of them to all the nodes of K!. For convenience, we shall call the context, the negative numbers the unknowns and the positive ones the letters. Considering the graph A will allow ustotakeinto account an arbitrary number of distinct letters and variables. If we only need nite numbers m and n of such letters and variables, we can restrict to its subgraph A m n, where Z is replaced by [ n m] (see Figure for the graph A ). As a matter of fact, we shall not really need letters or labels in the usual acception, since the labelling of nodes will be provided by morphims into A, butwe shall sometimes color the drawings with labels to make them more intuitive. In the same way, drawing the node and the negative ones on dierent sides of the positive ones is simply aimed at emphasizing the dierence we shall make later. The graph A could as well have been drawn in a lot of dierent ways. Only the morphisms we shall use in the next sections will actually make the dierence. Let us rst dene the notion of an unknown - or rather - show howwe shall encode the usual notion of an unknown into our formalism. Denition. Let G be agraph and u be a vertex of G. A label a on u is a morphism a : G! A which maps u onto a node j for some j> (an unknown), all immediate neighbours of u onto a node i with i> (a letter) and all other nodes on the node (the context). An unknown is a label on a reexive node. 4

NLC Rule a x x c b Connection relation C = {(a,a),(b,c),(x,c)} - - (a) (b) Fig.. An NLC Rewrite rule and its coding as a P -rule Intuitively, a label on u distinguishes between u considered as a variable, its immediate neighbours which are mapped to the letters in A and the rest of the graph, mapped onto the context in A.. Rewriting rule and rewriting step The second ingredient we need in order to describe a rewriting system is the notion of a rewriting rule. Denition. A P -rule is a morphism r : R! A where #r ()=and all the r (i), i N have at most a single element, and where only one of the unknowns has a non empty inverse image. It is shown in [], how annlc or an HR rewriting rule can be coded into a P - rule on a one variable alphabet. The multiplicity ofvariables in the alphabet graph does not make much dierence when encoding a single rule. Let us simply recall on an example what our formalism looks like. Take for instance the NLC rule of Figure (a) with connection rule C = f(a a) (b c) (x c)g. Forgetting all the labels and adding context, neighbours and connection yields the P -rule of Figure (b), where the morphism sends the nodes,, and to the corresponding nodes in the alphabet, all the other nodes on let us say - and projects the edges correspondingly. The only thing which is missing on this representation is the fact that the x labelled node in the right hand side of the original rule is intended to be an unknown node i.e. that the rule itself may be later applied to the node which represents x in the coding of the rule. 5

This can be easily handled by noticing that an unknown in the right hand side must be encoded as a reexive node and an appropriate label on that node, i.e. an appropriate morphism from the graph encoding the right hand side of the rule onto the alphabet graph A. After the application of a rewriting rule to an unknown, usual morphism composition of the unknown on the right hand side and of the projection of the resulting graph on the right hand side of the rule will provide a new unknown on the resulting graph. We can not develop that point any further here but shall simply recall the denition of a rewriting step from [] to which we refer for an example of a rewriting step (a parallel rewriting step wil be described later). Denition.4 Let u : G! A be an unknown and r : R! A be ap -rule. Then the application of r at u (a rewriting step) is the pullback of u and r.. Multi-unknowns Denition.5 Let u and v is be two distinct vertices of G, a and b two labels on u and v respectively. We shall say that the labels a and b are compatible if for each vertex w of G, when both a(w) and b(w) are positive then a(w) =b(w). In other words, whenever w is a neighbour of both u and v, itismappedto the same node i in A by both a and b, hence the condition has to be checked only for labels on two nodes which share a common neighbour. Of course a neighbour of u can be in the context of v or u can be a neighbour of v. Proposition.6 Let a and b be two compatible unknowns. Then, they uniquely dene a morphism a b, called the sum of a and b by : a b = 8 >< >: a(s) if a(s) < b(s) if b(s) < a(s) =b(s) if both a(s) > and b(s) > otherwise This proposition simply shows that a set of compatible unknowns denes a unique morphism which gathers all the interesting properties of this set of unknowns : it singles out the nodes to be rewritten and indicates their relationships with the neighbourhood. This morphism will be called in the sequel a multi-unknown. Remark.7 Possible adjacency of variables could be handled by demanding that the variables form a complete graph as well : A would then be KZ, without the [ j] edges. We shall not deal with this possibility in this paper..4 P-grammars The mechanism for gathering several rewriting rules into a single \parallel" one which we shall call a P -grammar is somehow dual to the one we used for the transformation of a set of compatible unknowns into a single multi-unknown, besides the fact that there is no compatibility condition. 6 ()

- - - - - Fig. 4. A rewriting step for a P -grammar with two rules The P -grammar is simply obtained by taking the P -rules and identifying the context and neighbour parts (operation which could of course be represented by a pullback). This leads to a new denition by simply dropping the last condition in Denition.. Denition.8 : A P -grammar is a morphism r : R!A where #r () = and all the r (), i N have at most a single element. Application of a P -grammar r to a multi-unknown u is simply the pullback of r and u. If once again we try to describe the situation through a single exemple, Figure 4 shows a rewriting step for a P -grammar obtained through the addition of a second rewriting rule to the one represented in Figure. Simply consider that all the new nodes are now mappedonto the nodes - in the alphabet and again that all the new edges are consequently mapped onto the corresponding edges in A. The multi-unknown has two occurences of the unknown - and one of -. We hope the rest of the gure is self explaining. The main result is the following : Proposition.9 Any deterministic HR or BNLC grammar is equivalent to a P -grammar where byequivalent, we mean that any HR or NLC grammar can be encoded intoap -grammar in such a way that pullback application of yields the same graph language as parallel application of. The case of non deterministic grammar can of course be handled with this mechanism, the only problem being that each time, pullback rewriting will apply all the alternative rules at once. 7

.5 Applications A rst application of the denitions we have given would be the study of the resolution of a set of simultaneous equations, including the study of context free grammars and the description of innite graphs generated by edge replacement (as described in [], that was our rst motivation when we tried to nd a categorical framework for node rewriting). This would for instance yield new possibilities for the generation of regular patterns. 4 Conclusion It must by now be quite obvious that the length of this paper was only sucient to give a few intuitions of our subject, since its relative novelty implies dening all the basic notions in the paper. Still, we hope that it is clear for the reader that pullback rewriting provides a very sound framework for graph rewriting. As was shown in [], pullback rewriting provides a uniform setting for node and edge rewriting (namely BNLC and HR rewriting), and even for NCE and double-pushout rewriting. It can also be used to describe label rewriting systems and node rewriting in hypergraphs. In this paper we have shown that it has some more powerful features, especially an intrinsic parallelism, which allows the description of a deterministic (node or edge rewriting) system as a single rule which can be applied at once to several occurences of several unknowns. A lot of topics remain to be investigated about pullback rewriting, but in this precise direction, simply looking at non deterministic graph grammars or adjacent unknowns might yield interesting results. References [] M. Bauderon, A categorical approach to vertex replacement : the generation of innite graphs, 5th International Conference on Graph Grammars and their applications to Computer Science, Williamsburg, November 994,To appear, Lect. Notes in Comp. Sci. [] M. Bauderon,A uniform approach to graph rewriting : the pullback approach, Proc. WG'95, Aachen, - March 995, To appear Lect. Notes in Comp. Sci. [] M. Bauderon, B. Courcelle, Graph expressions and graph rewritings, Math. Systems Theory (987), 8-7 [4] A. Habel, Hyperedge Replacement : Grammars and Languages, Lect. Notes in Comp. Sci. 64, 99. [5] D. Janssens, G. Rozenberg, Graph grammars with node label controlled rewriting and embedding, Lect. Notes in Comp. Sci., 5 (98), 86-5. [6] S. McLane, Categories for the working mathematician, Springer, 97 8