Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Graph rewriting
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Algebraic approach=== The algebraic approach to graph rewriting is based upon [[category theory]]. The algebraic approach is further divided into sub-approaches, the most common of which are the ''[[Double pushout graph rewriting|double-pushout (DPO) approach]]'' and the ''[[Single pushout graph rewriting|single-pushout (SPO) approach]]''. Other sub-approaches include the ''sesqui-pushout'' and the ''pullback approach''. From the perspective of the DPO approach a graph rewriting rule is a pair of [[morphism]]s in the category of graphs and [[graph homomorphism]]s between them: <math>r = (L \leftarrow K \rightarrow R)</math>, also written <math>L \supseteq K \subseteq R</math>, where <math>K \rightarrow L</math> is [[injective]]. The graph K is called ''invariant'' or sometimes the ''gluing graph''. A ''[[rewriting]] step'' or ''application'' of a rule r to a ''host graph'' G is defined by two [[pushout (category theory)|pushout]] diagrams both originating in the same [[morphism]] <math>k\colon K\rightarrow D</math>, where D is a ''context graph'' (this is where the name ''double''-pushout comes from). Another graph morphism <math>m\colon L\rightarrow G</math> models an occurrence of L in G and is called a ''[[Pattern matching|match]]''. Practical understanding of this is that <math>L</math> is a subgraph that is matched from <math>G</math> (see [[subgraph isomorphism problem]]), and after a match is found, <math>L</math> is replaced with <math>R</math> in host graph <math>G</math> where <math>K</math> serves as an interface, containing the nodes and edges which are preserved when applying the rule. The graph <math>K</math> is needed to attach the pattern being matched to its context: if it is empty, the match can only designate a whole connected component of the graph <math>G</math>. In contrast a graph rewriting rule of the SPO approach is a single morphism in the category of [[labeled multigraph]]s and ''partial mappings'' that preserve the multigraph structure: <math>r\colon L\rightarrow R</math>. Thus a rewriting step is defined by a single [[Pushout (category theory)|pushout]] diagram. Practical understanding of this is similar to the DPO approach. The difference is, that there is no interface between the host graph G and the graph G' being the result of the rewriting step. From the practical perspective, the key distinction between DPO and SPO is how they deal with the deletion of nodes with adjacent edges, in particular, how they avoid that such deletions may leave behind "dangling edges". The DPO approach only deletes a node when the rule specifies the deletion of all adjacent edges as well (this ''dangling condition'' can be checked for a given match), whereas the SPO approach simply disposes the adjacent edges, without requiring an explicit specification. There is also another algebraic-like approach to graph rewriting, based mainly on Boolean algebra and an algebra of matrices, called ''matrix graph grammars''.<ref>{{harvnb|Perez|2009}} covers this approach in detail.</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)