Skip to content

Commit

Permalink
Ch 6: Revision complete
Browse files Browse the repository at this point in the history
  • Loading branch information
priyaasrini committed Apr 7, 2024
1 parent c2c6243 commit ac818a2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions chp6-dpo.md
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ A search pattern (`Find what`) found in a graph is carved into another pattern (
Common literature calls our "Find-and-replace machinery" for graphs as Double Pushout Rewriting (DPO).
## 6.6 A few usecases of find-and-replace
## 6.6 A few use cases of find-and-replace
### Chemistry
In chemistry, **click reactions** give high yield with low requirements and form only harmless by-products. A specific click reaction called the Diels-Alder's reaction is one of the most useful ones in material design. Discovered in 1928, Otto Diels and Kurt Alder were awareded Nobel prize for their fascinating discovery.
Expand Down Expand Up @@ -907,8 +907,8 @@ matches = homomorphisms(find, host)
```{code-cell}
# uncomment the following line to visualize the Find pattern
# to_graphviz(pattern)
# uncomment the following line to visualize the `find` graph
# to_graphviz(find)
# uncomment the following line to visualize the host
# to_graphviz(host)
Expand Down Expand Up @@ -976,7 +976,7 @@ using AlgebraicRewriting.CSets
Overlap, Find₅, Host₅ = SymmetricGraph.([2, 4, 6])
del = ACSetTransformation(Overlap, Find₅; V=[1,2])
match = ACSetTransformation(Find₅, Host₅; V=[1,1,2,2])
O_PC₅, PC_H₅ = pushout_complement(match, del)
O_PC₅, PC_H₅ = pushout_complement(del, match)
to_graphviz(dom(PC_H₅))
Expand All @@ -988,6 +988,9 @@ to_graphviz(dom(PC_H₅))
# --------
using Catlab
using AlgebraicRewriting.CSets
Overlap = SymmetricGraph(2)
Find₆ = SymmetricGraph(3)
add_edge!(Find₆, 2, 3)
Expand All @@ -997,7 +1000,7 @@ Host₆ = path_graph(SymmetricGraph, 6)
del = ACSetTransformation(Overlap, Find₆; V=[1,3])
match = homomorphism(Find₆, Host₆; initial=(V=[5,1,2],))
O_PC₆, PC_H₆ = pushout_complement(match, del)
O_PC₆, PC_H₆ = pushout_complement(del, match)
to_graphviz(dom(PC_H₆))
Expand Down Expand Up @@ -1089,6 +1092,6 @@ Finally, relational thinking is good :)
## Footnotes and References
[1]: A few examples in this chapter have been inspired by [the handout](https://steemit.com/mathematics/@markgritter/double-pushouts-on-graphs) titled "Double Pushout Rewriting in Chemistry" authored by Georg Fischer, and Hannah Gschwentner, and [the blog post](https://steemit.com/mathematics/@markgritter/double-pushouts-on-graphs) "Double pushouts on Graphs" by Mark Gritter!
[1]. Few of the examples and puzzles in this chapter were inspired by [the handout](https://steemit.com/mathematics/@markgritter/double-pushouts-on-graphs) titled "Double Pushout Rewriting in Chemistry" authored by Georg Fischer, and Hannah Gschwentner, and [the blog post](https://steemit.com/mathematics/@markgritter/double-pushouts-on-graphs) "Double pushouts on Graphs" by Mark Gritter!

0 comments on commit ac818a2

Please sign in to comment.