Upload
others
View
18
Download
0
Embed Size (px)
Citation preview
1/30
Generating Hypergraph Languages by(Context-dependent) Fusion Grammars and
Splitting/Fusion Grammars
Aaron Lye
University of Bremen, [email protected]
24.01.2020
MINT-Doktorand*innen-Seminar
2/30
Dissertation
I PhD in theoretical computer scienceI Working title 2018:
Hypergraph Transformation
I Working title 2020:
Fusion and Splitting/Fusion Grammars -Generation of Hypergraph Languages andRelation to other Modeling Frameworks
3/30
Hypergraph
I A hypergraph consists of a set of objects (vertices) withrelations (hyperedges) between them (connecting arbitrarymany vertices).
I A hyperedge with attachment vertices looks likevk1
. . .v1
A
wk2
. . .w1
k11
k21
whereA ∈ Σ is a label,v1 · · · vk1 is a sequence of source vertices,w1 · · ·wk2 is a sequence of target vertices.
I labels and arrowheads may be omitted.I The class of all hypergraphs over Σ is denoted by HΣ.
4/30
Hypergraph transformation
I Hypergraphs are static structures.I Dynamics are expressed by hypergraph transformation
combining concepts of hypergraphs and rules.
I (Hyper-)Graph transformation combines:I category theoryI formal language theoryI concurrency theory
I It has a spectrum of applications.
4/30
Hypergraph transformation
I Hypergraphs are static structures.I Dynamics are expressed by hypergraph transformation
combining concepts of hypergraphs and rules.
I (Hyper-)Graph transformation combines:I category theoryI formal language theoryI concurrency theory
I It has a spectrum of applications.
5/30
Social networks
6/30
Social networks
Rule:Let A,B,C be vertices.If (A,B), (B,C), (C ,A) are edges, then add (A,B,C).
6/30
Social networks
Rule:Let A,B,C be vertices.If (A,B), (B,C), (C ,A) are edges, then add (A,B,C).
6/30
Social networks
Rule:Let A,B,C be vertices.If (A,B), (B,C), (C ,A) are edges, then add (A,B,C).
7/30
Motivation for fusion grammarsFusion processes in:I DNA
computingI chemistryI tilingI fractal
geometryI visual modelingI etc.
n + 14.1 MeVHe + 3.5 MeV44
H33H22
X
X
getorder A
getorder B
produce A
produce B
send A
send B
8/30
DNA computingAdleman’s experiment (1994): solution of the NP-hardHamiltonian-path problem by a polynomial number of steps
I constructing short DNAdouble strands
I doubling by polymerasechain reaction:n repetitions yield 2n copies
I fusion of complementarysticky endscomplementarity:(A,T ) and (C ,G)
I reading (sequencing):filtering of DNA moleculesof certain lengths and withcertain substrands
9/30
DNA computing ; Fusion grammar
I constructing short DNAdouble strands
I doubling by polymerasechain reaction:n repetitions yield 2n copies
I fusion of complementarysticky endscomplementarity:(A,T ) and (C ,G)
I reading (sequencing):filtering of DNA moleculesof certain lengths and withcertain substrands
constructing initial hypergraph;connected components acting asmoleculesmultiplication of connectedcomponentsfusion of complementary labeledhyperedgescomplementarity:(A,A) for each fusion label Areading:filtering of connectedcomponents with certainlabeling
9/30
DNA computing ; Fusion grammar
I constructing short DNAdouble strands
I doubling by polymerasechain reaction:n repetitions yield 2n copies
I fusion of complementarysticky endscomplementarity:(A,T ) and (C ,G)
I reading (sequencing):filtering of DNA moleculesof certain lengths and withcertain substrands
constructing initial hypergraph;connected components acting asmoleculesmultiplication of connectedcomponentsfusion of complementary labeledhyperedgescomplementarity:(A,A) for each fusion label Areading:filtering of connectedcomponents with certainlabeling
10/30
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).
fr(A) =
vk1. . .
v1 v ′1. . .
v ′k1
A A
wk2
. . .w1 w ′1
. . .w ′k2
k11
k21
k11
k21
type(A) = (k1, k2)
fr(A) represents a fusion rule corresponding to A
11/30
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
H
vk1. . .
v1 v ′1. . .
v ′k1
A A
wk2
. . .w1 w ′1
. . .w ′k2
k11
k21
k11
k21
Rule application is denoted by H =⇒fr(A)
H ′.
11/30
Rule application
1. find a matching morphism g of fr(A) in the hypergraph H2. remove the images of the two hyperedges of fr(A)
3. identify corresponding source and target vertices of theremoved edges
I
vk1. . .
v1 v ′1. . .
v ′k1
wk2
. . .w1 w ′1
. . .w ′k2
Rule application is denoted by H =⇒fr(A)
H ′.
11/30
Rule application
1. find a matching morphism g of fr(A) in the hypergraph H2. remove the images of the two hyperedges of fr(A)3. identify corresponding source and target vertices of the
removed edges
H ′
vk1 = v ′k1. . .
v1 = v ′1
wk2 = w ′k2
. . .w1 = w ′1
Rule application is denoted by H =⇒fr(A)
H ′.
11/30
Rule application
1. find a matching morphism g of fr(A) in the hypergraph H2. remove the images of the two hyperedges of fr(A)3. identify corresponding source and target vertices of the
removed edges
H ′
vk1 = v ′k1. . .
v1 = v ′1
wk2 = w ′k2
. . .w1 = w ′1
Rule application is denoted by H =⇒fr(A)
H ′.
11/30
Rule application
1. find a matching morphism g of fr(A) in the hypergraph H2. remove the images of the two hyperedges of fr(A)3. identify corresponding source and target vertices of the
removed edges
H ′
vk1 = v ′k1. . .
v1 = v ′1
wk2 = w ′k2
. . .w1 = w ′1
Rule application is denoted by H =⇒fr(A)
H ′.
12/30
Fusing social networks
12/30
Fusing social networks
13/30
Fusion grammar FG = (Z , F , T )I Z finite start hypergraph
F ,T ⊆ Σ, fusion, terminal alphabet (finite, disjoint)
I A direct derivation is eitherH =⇒
fr(A)H ′ for some A ∈ F or
H =⇒m
m · H =∑
C∈C(H)m(C) · C for some multiplicity
m : C(H)→ N.where C(H) denotes the set of connected components of H.
I Derivations are defined by the reflexive and transitive closure,i.e., sequences of direct derivations.
I The generated language
L(FG) = {Y | Z ∗=⇒H,Y ∈ C(H) ∩HT )}
FG is simplified here: It actually contains also a set of markers Mused for distinguishing components contributing to the generatedlanguage from others.
13/30
Fusion grammar FG = (Z , F , T )I Z finite start hypergraph
F ,T ⊆ Σ, fusion, terminal alphabet (finite, disjoint)I A direct derivation is either
H =⇒fr(A)
H ′ for some A ∈ F or
H =⇒m
m · H =∑
C∈C(H)m(C) · C for some multiplicity
m : C(H)→ N.where C(H) denotes the set of connected components of H.
I Derivations are defined by the reflexive and transitive closure,i.e., sequences of direct derivations.
I The generated language
L(FG) = {Y | Z ∗=⇒H,Y ∈ C(H) ∩HT )}
FG is simplified here: It actually contains also a set of markers Mused for distinguishing components contributing to the generatedlanguage from others.
13/30
Fusion grammar FG = (Z , F , T )I Z finite start hypergraph
F ,T ⊆ Σ, fusion, terminal alphabet (finite, disjoint)I A direct derivation is either
H =⇒fr(A)
H ′ for some A ∈ F or
H =⇒m
m · H =∑
C∈C(H)m(C) · C for some multiplicity
m : C(H)→ N.where C(H) denotes the set of connected components of H.
I Derivations are defined by the reflexive and transitive closure,i.e., sequences of direct derivations.
I The generated language
L(FG) = {Y | Z ∗=⇒H,Y ∈ C(H) ∩HT )}
FG is simplified here: It actually contains also a set of markers Mused for distinguishing components contributing to the generatedlanguage from others.
13/30
Fusion grammar FG = (Z , F , T )I Z finite start hypergraph
F ,T ⊆ Σ, fusion, terminal alphabet (finite, disjoint)I A direct derivation is either
H =⇒fr(A)
H ′ for some A ∈ F or
H =⇒m
m · H =∑
C∈C(H)m(C) · C for some multiplicity
m : C(H)→ N.where C(H) denotes the set of connected components of H.
I Derivations are defined by the reflexive and transitive closure,i.e., sequences of direct derivations.
I The generated language
L(FG) = {Y | Z ∗=⇒H,Y ∈ C(H) ∩HT )}
FG is simplified here: It actually contains also a set of markers Mused for distinguishing components contributing to the generatedlanguage from others.
14/30
SIER
SIER = (Z , {4}, {#}, {∗})where 4 ∈ Σ, 4 = N, k(4) = 3 and
Z =2
•3•
1•
4 #
23
1
+
•2
•3•
2•
3
•1
•1
•2
•3
•1
4 4
4
2
3
1
N +• •
•
23
1
N
A derivation may be the following.
Z =⇒m 2
•3•
1•
4 #
23
1
+
•2
•3•
2•
3
•1
•1
•2
•3
•1
4 4
4
2
3
1
N + 3 ·• •
•
23
1
N
14/30
SIER
SIER = (Z , {4}, {#}, {∗})where 4 ∈ Σ, 4 = N, k(4) = 3 and
Z =2
•3•
1•
4 #
23
1
+
•2
•3•
2•
3
•1
•1
•2
•3
•1
4 4
4
2
3
1
N +• •
•
23
1
N
A derivation may be the following.
Z =⇒m 2
•3•
1•
4 #
23
1
+
•2
•3•
2•
3
•1
•1
•2
•3
•1
4 4
4
2
3
1
N + 3 ·• •
•
23
1
N
15/30
SIER
Z =⇒m 2
•3•
1•
4 #
23
1
+
•2
•3•
2•
3
•1
•1
•2
•3
•1
4 4
4
2
3
1
N + 3 ·• •
•
23
1
N
3=⇒fr(4) 2
•3•
1•
4 #
23
1
+
• •
•
•
• • N
23
1
• •
•
•
• • #
23
1
16/30
SIER
Z =⇒m 2
•3•
1•
4 #
23
1
+
•2
•3•
2•
3
•1
•1
•2
•3
•1
4 4
4
2
3
1
N + 3 ·• •
•
23
1
N
3=⇒fr(4) 2
•3•
1•
4 #
23
1
+
• •
•
•
• • N
23
1
=⇒fr(4)
• •
•
•
• • #
23
1
17/30
SIER
Z =⇒m 2
•3•
1•
4 #
23
1
+
•2
•3•
2•
3
•1
•1
•2
•3
•1
4 4
4
2
3
1
N + 3 ·• •
•
23
1
N
3=⇒fr(4) 2
•3•
1•
4 #
23
1
+
• •
•
•
• • N
23
1
=⇒fr(4)
• •
•
•
• • #
23
1
18/30
SIER
Z =⇒m 2
•3•
1•
4 #
23
1
+
•2
•3•
2•
3
•1
•1
•2
•3
•1
4 4
4
2
3
1
N + 3 ·• •
•
23
1
N
3=⇒fr(4) 2
•3•
1•
4 #
23
1
+
• •
•
•
• • N
23
1
=⇒fr(4)
• •
•
•
• • #
23
1
∈ L(SIER)
19/30
PseudotoriLet F = {N,W } with k(N) = k(W ) = 1 and N = S,W = E .
PSEUDOTORI = ( •
•
•
•
W
S
E
N
,F , {µ}, {∗})
•
•
•
•
W
S
E
N
=⇒m
20· •
•
•
•
W
S
E
N
fr(N), fr(W )22
W
W
E
E
N
S
N
S
SN
N
S
N
S
N
S
N
S
W E
W E
W E
N N
W
S
E
W E
S
W
S
E
N
19/30
PseudotoriLet F = {N,W } with k(N) = k(W ) = 1 and N = S,W = E .
PSEUDOTORI = ( •
•
•
•
W
S
E
N
,F , {µ}, {∗})
•
•
•
•
W
S
E
N
=⇒m
20· •
•
•
•
W
S
E
N
fr(N), fr(W )22
W
W
E
E
N
S
N
S
SN
N
S
N
S
N
S
N
S
W E
W E
W E
N N
W
S
E
W E
S
W
S
E
N
19/30
PseudotoriLet F = {N,W } with k(N) = k(W ) = 1 and N = S,W = E .
PSEUDOTORI = ( •
•
•
•
W
S
E
N
,F , {µ}, {∗})
•
•
•
•
W
S
E
N
=⇒m
20· •
•
•
•
W
S
E
N
fr(N), fr(W )22
W
W
E
E
N
S
N
S
SN
N
S
N
S
N
S
N
S
W E
W E
W E
N N
W
S
E
W E
S
W
S
E
N
20/30
PseudotoriLet F = {N,W } with k(N) = k(W ) = 1 and N = S,W = E .
PSEUDOTORI = ( •
•
•
•
W
S
E
N
,F , {µ}, {∗})
•
•
•
•
W
S
E
N
=⇒m
12· •
•
•
•
W
S
E
N
fr(N), fr(W )17
N
S
N
S
N
S
N
S
W E
W E
W E
20/30
PseudotoriLet F = {N,W } with k(N) = k(W ) = 1 and N = S,W = E .
PSEUDOTORI = ( •
•
•
•
W
S
E
N
,F , {µ}, {∗})
•
•
•
•
W
S
E
N
=⇒m
12· •
•
•
•
W
S
E
N
fr(N), fr(W )17
N
S
N
S
N
S
N
S
W E
W E
W E
∗ ∗
21/30
Transformation of hyperedge replacement grammars intofusion grammars
HRG = (N,T ,P,S)N,T , non-terminal, terminal alphabet, P set of rules (all finite), S ∈ NRules of the form r = (A,R, ext)A ∈ N,R ∈ HΣ, ext sequence of k(A) vertices of R.
Application of r :
••
•
A2 1
k(A) =⇒r
••
•
R
L(HRG) = {H | S ∗=⇒H,H ∈ HT}
Idea of the transformation:F = N
RA
••
•
21
k(A)
fusion componentof r in the fusiongrammar’s starthypergraph
S with marker
TheoremL(HRG) = L(FG(HRG))
21/30
Transformation of hyperedge replacement grammars intofusion grammars
HRG = (N,T ,P,S)N,T , non-terminal, terminal alphabet, P set of rules (all finite), S ∈ NRules of the form r = (A,R, ext)A ∈ N,R ∈ HΣ, ext sequence of k(A) vertices of R.
Application of r :
••
•
A2 1
k(A) =⇒r
••
•
R
L(HRG) = {H | S ∗=⇒H,H ∈ HT}
Idea of the transformation:F = N
RA
••
•
21
k(A)
fusion componentof r in the fusiongrammar’s starthypergraph
S with marker
TheoremL(HRG) = L(FG(HRG))
21/30
Transformation of hyperedge replacement grammars intofusion grammars
HRG = (N,T ,P,S)N,T , non-terminal, terminal alphabet, P set of rules (all finite), S ∈ NRules of the form r = (A,R, ext)A ∈ N,R ∈ HΣ, ext sequence of k(A) vertices of R.
Application of r :
••
•
A2 1
k(A) =⇒r
••
•
R
L(HRG) = {H | S ∗=⇒H,H ∈ HT}
Idea of the transformation:F = N
RA
••
•
21
k(A)
fusion componentof r in the fusiongrammar’s starthypergraph
S with marker
TheoremL(HRG) = L(FG(HRG))
21/30
Transformation of hyperedge replacement grammars intofusion grammars
HRG = (N,T ,P,S)N,T , non-terminal, terminal alphabet, P set of rules (all finite), S ∈ NRules of the form r = (A,R, ext)A ∈ N,R ∈ HΣ, ext sequence of k(A) vertices of R.
Application of r :
••
•
A2 1
k(A) =⇒r
••
•
R
L(HRG) = {H | S ∗=⇒H,H ∈ HT}
Idea of the transformation:F = N
RA
••
•
21
k(A)
fusion componentof r in the fusiongrammar’s starthypergraph
S with marker
TheoremL(HRG) = L(FG(HRG))
22/30
The converse is not possible
TheoremFusion grammars are more powerful than hyperedge replacementgrammars.
Proof: L(pseudotori) contain tori of arbitrary size with underlyingrectangular grids. Therefore, the language has unboundedtreewidth whereas hyperedge replacement languages have boundedtreewidth (Courcelle/Engelfriet).
N
S
N
S
N
S
N
S
W E
W E
W E
23/30
Context-dependent fusion grammarCDFG = (Z , F , M, T , P)
I (Z ,F ,M,T ) fusion grammarP finite set of context-dependent fusion ruleswith rules of the form (fr(A),PC ,NC)where PC ,NC : sets of hypergraph morphisms with domain fr(A)
I A direct derivation is eitherH =⇒
cdfrH ′ for some cdfr ∈ P,
i.e.. application of fr(A) provided thatthe PC -contexts are present, and the NC -contexts not present(in the usual way of context conditions), orH =⇒
mm · H =
∑C∈C(H)
m(C) · C for some multiplicity m : C(H)→ N.
I derivations and generated languages as before.
23/30
Context-dependent fusion grammarCDFG = (Z , F , M, T , P)
I (Z ,F ,M,T ) fusion grammarP finite set of context-dependent fusion ruleswith rules of the form (fr(A),PC ,NC)where PC ,NC : sets of hypergraph morphisms with domain fr(A)
I A direct derivation is eitherH =⇒
cdfrH ′ for some cdfr ∈ P,
i.e.. application of fr(A) provided thatthe PC -contexts are present, and the NC -contexts not present(in the usual way of context conditions), orH =⇒
mm · H =
∑C∈C(H)
m(C) · C for some multiplicity m : C(H)→ N.
I derivations and generated languages as before.
24/30
Generative power of context-dependent fusion grammars
Transformation of Turing machines into correspondingcontext-dependent fusion grammars.
TheoremLet TM be a Turing machine. Let CDFG(TM) be thecorresponding context-dependent fusion grammar.
L(CDFG(TM)) = {sg(w) | w ∈ L(TM)}
generated language recognized language
sg(w) graph representation of a string w.
25/30
Transformation of Turing machines into context-dependentfusion grammars
Main construction steps:
1. Representation of the TM by a hypergraph (using the usualstate graph representation)
2. Generation of arbitrary inputs on the tape (using the stringgraph representation of strings)
3. Simulation of a transition step of the TM
(Context-dependent) fusion rules can only consume twocomplementary labeled hyperedges by a rule application.All modifications must be expressed in this way.
25/30
Transformation of Turing machines into context-dependentfusion grammars
Main construction steps:
1. Representation of the TM by a hypergraph (using the usualstate graph representation)
2. Generation of arbitrary inputs on the tape (using the stringgraph representation of strings)
3. Simulation of a transition step of the TM
(Context-dependent) fusion rules can only consume twocomplementary labeled hyperedges by a rule application.All modifications must be expressed in this way.
26/30
DNA computing
fusion(ligation)
splitting(triggered by enzymes)
26/30
DNA computing
fusion(ligation)
splitting(triggered by enzymes)
27/30
Splitting rule with fixed disjoint contextsplitting is the inverse of fusionsrfdc(A, a) consists of a splitting rule sr(A) and a morphisma : [k(A)]→ X for some context X .
It is applicable to H if H can be split into H ′ and X (with anadditional A-hyperedge)
Example
cut = (A,2•1•
•••⊇ [2])
••••••
••
•••
=⇒cut •
•••••
••
A + A ••
•••
27/30
Splitting rule with fixed disjoint contextsplitting is the inverse of fusionsrfdc(A, a) consists of a splitting rule sr(A) and a morphisma : [k(A)]→ X for some context X .It is applicable to H if H can be split into H ′ and X (with anadditional A-hyperedge)
Example
cut = (A,2•1•
•••⊇ [2])
••••••
••
•••
=⇒cut •
•••••
••
A + A ••
•••
27/30
Splitting rule with fixed disjoint contextsplitting is the inverse of fusionsrfdc(A, a) consists of a splitting rule sr(A) and a morphisma : [k(A)]→ X for some context X .It is applicable to H if H can be split into H ′ and X (with anadditional A-hyperedge)
Example
cut = (A,2•1•
•••⊇ [2])
••••••
••
•••
=⇒cut •
•••••
••
A + A ••
•••
28/30
Splitting/fusion grammar SFG = (Z , F , M, T , SR)
I (Z ,F ,M,T ) fusion grammarSR finite set of splitting rules with fixed disjoint context.
I A direct derivation is either
H =⇒fr(A)
H ′ for some A ∈ F or
H =⇒m
m · H =∑
C∈C(H)m(C) · C for some m : C(H)→ N or
H =⇒srfdc(A,a)
H ′ for some A ∈ F and a : K → X .
I derivation and generated language as before
28/30
Splitting/fusion grammar SFG = (Z , F , M, T , SR)
I (Z ,F ,M,T ) fusion grammarSR finite set of splitting rules with fixed disjoint context.
I A direct derivation is either
H =⇒fr(A)
H ′ for some A ∈ F or
H =⇒m
m · H =∑
C∈C(H)m(C) · C for some m : C(H)→ N or
H =⇒srfdc(A,a)
H ′ for some A ∈ F and a : K → X .
I derivation and generated language as before
28/30
Splitting/fusion grammar SFG = (Z , F , M, T , SR)
I (Z ,F ,M,T ) fusion grammarSR finite set of splitting rules with fixed disjoint context.
I A direct derivation is either
H =⇒fr(A)
H ′ for some A ∈ F or
H =⇒m
m · H =∑
C∈C(H)m(C) · C for some m : C(H)→ N or
H =⇒srfdc(A,a)
H ′ for some A ∈ F and a : K → X .
I derivation and generated language as before
29/30
Generative power of splitting/fusion grammars
TheoremLet CG = (N,T ,P,S) be a Chomsky grammarand SFG(CG) the corresponding splitting/fusion grammar.Then
cyc(L(CG)) = L(SFG(CG)).
CG SFG(CG)
L(CG) cyc(L(CG)) = L(SFG(CG))
transform
generate generatecyc
30/30
Conclusion
1. Fusion grammars can simulate hyperedge replacementgrammars; but are more powerful.
2. Context-dependent fusion grammars and splitting/fusiongrammars can generate all recursively enumerable stringlanguages (up to representation) and are universal in thisrespect.
Future work: How powerful are fusion grammars?
Thank you! Questions?
30/30
Conclusion
1. Fusion grammars can simulate hyperedge replacementgrammars; but are more powerful.
2. Context-dependent fusion grammars and splitting/fusiongrammars can generate all recursively enumerable stringlanguages (up to representation) and are universal in thisrespect.
Future work: How powerful are fusion grammars?
Thank you! Questions?
30/30
Conclusion
1. Fusion grammars can simulate hyperedge replacementgrammars; but are more powerful.
2. Context-dependent fusion grammars and splitting/fusiongrammars can generate all recursively enumerable stringlanguages (up to representation) and are universal in thisrespect.
Future work: How powerful are fusion grammars?
Thank you! Questions?