Abstract
Context-sensitive fusion grammars are a special case of context-dependent fusion grammars where a rule has only a single positive context condition instead of finite sets of positive and negative context conditions. They generate hypergraph languages from start hypergraphs via successive applications of context-sensitive fusion rules and multiplications of connected components, as well as a filtering mechanism to extract terminal hypergraphs from derived hypergraphs in a certain way. The application of a context-sensitive fusion rule consumes two complementarily labeled hyperedges and identifies corresponding attachment vertices provided that the context condition holds. In this paper, we show that the Post correspondence problem can be formulated very intuitively by such a grammar. Furthermore, we prove that these grammars can generate all recursively enumerable string languages (up to representation of strings as graphs) and are universal in this respect.
Keywords: Graph transformation, Context-sensitive fusion grammars, Recursively enumerable languages, Chomsky grammar, Post correspondence problem
Introduction
In 2017 we introduced fusion grammars as generative devices on hypergraphs (cf. [2]). They are motivated by the observation, that one encounters various fusion processes in various scientific fields like DNA computing, chemistry, tiling, fractal geometry, visual modeling and others. The common principle is that a few small entities may be copied and fused to produce more complicated entities. Besides hypergraph language generation they can be used to model and solve interesting decision problems, e.g., in [3] it is shown that the Hamiltonian path problem can be solved efficiently by a respective fusion grammar due to the massive parallelism in a way that mimics Adleman’s famous experiment in DNA computing (cf. [1]). In this paper, we show that the Post correspondence problem (PCP, cf. [6]), which is well-known to be undecidable, can be expressed very intuitively by means of fusion and its solvability by using context-sensitive fusion rules. Hence, undeciability results carry over to context-sensitive fusion grammars. Recently, we showed that context-dependent fusion grammars (introduced in [4]) are powerful enough to simulate Turing machines (cf. [5]). In this paper, we show that one can do much better. We show that rules with a single positive context condition are sufficient. To prove this, a known result of formal language theory is used, which is, that each recursively enumerable string language is a (left) quotient of two linear languages. In our construction we employ the same recognition mechanism as the one for PCP. Throughout in the proofs we are actually operating on graphs. As graphs are a subclass of hypergraphs the results hold for the general case.
The paper is organized as follows. In Sect. 2, basic notions and notations of hypergraphs are recalled. Section 3 introduces the notions of context-sensitive fusion grammars. In Sect. 4 we present a reduction of the Post correspondence problem to the membership and emptiness problem for context-sensitive fusion grammars. Afterwards, we prove that context-sensitive fusion grammars can generate all recursively enumerable string languages (up to representation) in Sect. 5. Section 6 concludes the paper pointing out some open problems.
Preliminaries
A hypergraph over a given label alphabet
is a system
where V is a finite set of vertices, E is a finite set of hyperedges,
are two functions assigning to each hyperedge a sequence of sources and targets, respectively, and
is a function, called labeling. The components of
may also be denoted by
,
,
,
, and
respectively. The class of all hypergraphs over
is denoted by
.
Let
, and let
be an equivalence relation on
. Then the fusion of the vertices in
H
with respect to
yields the (quotient) hypergraph
with the set of equivalence classes
and
,
for each
with
,
.
Given
, a hypergraph morphism
consists of two mappings
and
such that
,
and
for all
, where
is the canonical extension of
, given by
for all
.
Given
, H is a subhypergraph of
, denoted by
, if
,
,
,
, and
for all
.
Let
as well as
and
. Then the removal of (V, E) from
given by
with
,
and
for all
defines a subgraph
if
for all
. We will use removals of the form
below.
Let
and let
be the set of source and target vertices for
. H is connected if for each
, there exists a sequence of triples
such that
and
for
and
for
. A subgraph C of H is a connected component of H if it is connected and there is no larger connected subgraph, i.e.,
and
connected implies
. The set of connected components of H is denoted by
.
Given
, the disjoint union of H and
is denoted by
. It is defined by the disjoint union of the underlying sets (also denoted by
). The disjoint union of H with itself k times is denoted by
. We use the multiplication of H defined by means of
as follows. Let
be a mapping, called multiplicity, then
.
A string is represented by a simple path where the sequence of labels along the path equals the given string. Let
be a label alphabet. Let
for
and
for
. Then the string graph of w is defined by
with
and
for
. The string graph of the empty string
, denoted by
, is the discrete graph with a single node 0. Obviously, there is a one-to-one correspondence between
and
. For technical reasons, we need the extension of a string graph
for some
by a s-labeled edge bending from the begin node 0 to the end node n, where n is the length of w. The resulting graph is denoted by
.
Context-Sensitive Fusion Grammars
In this section, we introduce context-sensitive fusion grammars. These grammars generate hypergraph languages from start hypergraphs via successive applications of context-sensitive fusion rules, multiplications of connected components, and a filtering mechanism. Such a rule is applicable if the positive context-condition holds. Its application consumes the two hyperedges and fuses the sources of the one hyperedge with the sources of the other as well as the targets of the one with the targets of the other.
Definition 1
is a fusion alphabet if it is accompanied by a complementary fusion alphabet
, where
and
for
with
and a type function
with
for each
.
For each
, the fusion rule
is the hypergraph with
,
,
,
,
,
, and
and
.
The application of
to a hypergraph
proceeds according to the following steps: (1) Choose a matching hypergraph morphism
. (2) Remove the images of the two hyperedges of
yielding
. (3) Fuse the corresponding source and target vertices of the removed hyperedges yielding the hypergraph
where
is generated by the relation
. The application of
to H is denoted by
and called a direct derivation.
A context-sensitive fusion rule is a tuple
for some
where c is a hypergraph morphism with domain
mapping into a finite context C.
The rule
is applicable to some hypergraph H via a matching morphism
if there exists a hypergraph morphism
such that h is injective on the set of hyperedges and
.
If
is applicable to H via g, then the direct derivation
is the direct derivation
.
Remark 1
In this paper, we only make use of the case where every hyperedge has one source and one target vertex. Hence, fusion rules are of the form
. The type is therefore omitted throughout the paper.The applications of
and
are equivalent. We use the first as an abbreviation for the latter. We call these rules context-free fusion rules.
Example 1
Let
. Define
) for each
where the morphism is uniquely defined by the labels and maps the vertices as follows:
. Consider the graph
. Only
is applicable because the other complementarily labeled edges do not share a common source vertex. The matching morphism g maps the edges labeled
, resp. in
to the
-labeled (resp,
-labeled) edges in G; vertices are mapped respectively:
. The morphism
exists (inclusion morphism). Then
where
. Afterwards, no further context-sensitive fusion rule is applicable.
Given a finite hypergraph, the set of all possible successive fusions is finite as fusion rules never create anything. To overcome this limitation, arbitrary multiplications of disjoint components within derivations are allowed. The generated language consists of the terminal part of all resulting connected components that contain no fusion symbols and at least one marker symbol, where marker symbols are removed in the end. These marker symbols allow us to distinguish between wanted and unwanted terminal components.
Definition 2
A context-sensitive fusion grammar is a system
where
is a start hypergraph consisting of a finite number of connected components, F is a finite fusion alphabet, M with
is a finite set of markers, T with
is a finite set of terminal labels, and P is a finite set of context-sensitive fusion rules.
A direct derivation
is either a context-sensitive fusion rule application
for some
or a multiplication
for some multiplicity
. A derivation
of length
is a sequence of direct derivations
with
and
. If the length does not matter, we may write
.
is the generated language where
is the terminal hypergraph obtained by removing all hyperedges with labels in M from Y.
Remark 2
Let
be a context-sensitive fusion grammar. If for every
a rule in P exists and every rule is context-free, then all rules are specified F and
is a fusion grammar as defined in [2]. P is obsolete.
A Context-Sensitive Fusion Grammar for the Post Correspondence Problem
In this section, we model Post correspondence problems (PCPs) by means of context-sensitive fusion grammars in such a way that a PCP is solvable if the generated language of the corresponding grammar consists of a single vertex and that a PCP is not solvable if the language is empty. Therefore, it turns out that the emptiness problem and the membership problem for context-sensitive fusion grammars are undecidable.
The Post correspondence problem is defined as follow. Given a finite set of pairs
with
for some finite alphabet
. Does there exist a sequence of indices
with
such that
? In terms of fusion, the pairs may be copied and fused in order to concatenate the strings. However, one needs a recognition mechanism to decide whether
or not. This recognition procedure is expressible by means of context-sensitive fusion.
Construction 1
Let
with
,
be an instance of PCP. Let
be a fusion alphabet with
. Let
where reduce(x) be as in Example 1. For each
where
and
define
and
. Let
and
. Then
is the to S corresponding context-sensitive fusion grammar.
Theorem 1
if and only if there exists a solution to S.
is either
or
.
Corollary 1
The membership and the emptiness problem for context-sensitive fusion grammars are undecidable.
The proof of the theorem is based on the following lemmata.
Lemma 1
Let
be the hypergraph consisting of two string graphs
and
with
where the first vertex of both string graphs is the same. i.e.,
. Then
by applying
, where
denotes the discrete graph with
vertices and no edges.
Proof
Induction base:
.
because by definition
is the discrete graph [1] by construction of dsg these two vertices are identified yielding the discrete graph [1]. Hence,
.
Induction step: Given
. Then
can be applied because by construction of
the two complementary
- and
-labeled hyperedges share a common source vertex yielding
. Then by induction hypothesis
. 
Lemma 2
Let
be a derivation in
. Then the two direct derivations can be interchanged yielding
for some
.
Proof
The statement follows directly from the fact that the two rules do not share fusion symbols such that they matches are hyperedge disjoint and that the context conditions of reduce(x) only requires a commonly shared source for the two hyperedges. 
Proof
(of Theorem 1). Let
. Let
be a solution to S, i.e.,
. Let
be the number of occurrences of
in the sequence except the first. Then there exists a derivation
where (1)
for
for
and
otherwise; (2) the order in which the connected components are fused by applications of
does not matter; (3)
with
because
is a solution to S; and (4) the two connected complementary strings graphs can be erased by successive applications of reduce(x) for suitable x due to Lemma 1. Hence,
.
Now let
. Then there exists a derivation
for some hypergraph X.
is the only connected component with marker in the start hypergraph, therefore,
must stem from
. The only possibility to get rid of the A-hyperedge without attaching a new one is the application of
to
and some
with
where the latter connected component is obtained from respective multiplications and the successive fusion wrt
to some
for some n and possibly applications of reduce(x) for suitable x. Due to Lemma 2 all the applications of reduce(x) can be shifted behind the applications of
and due to [2, Corollary 1] all the multiplications can be done as initial derivation step. To obtain
the two connected complementary strings graphs must be erased by successive applications of
. If
is a proper prefix of
, i.e.,
, then one gets
, and analogously if
is a proper prefix of
, then one gets
. This implies
and
for
must hold. Because
and
,
is a solution to S.
The second statement is a direct consequence of the first. Other connected components do not contribute to the language due to the lack of
-hyperedges. 
Transformation of Chomsky Grammars into Context-Sensitive Fusion Grammars
In this section, we prove that context-sensitive fusion grammars can generate all recursively enumerable string languages. For every Chomsky grammar one can construct a corresponding context-sensitive fusion grammar such that the generated languages of the corresponding grammars coincide up to representation.
Construction 2
Let
be a Chomsky grammar. Let
. Then
is the corresponding context-sensitive fusion grammar where
Schematic drawings of some connected components of the start hypergraph are depicted in Fig. 1.
Fig. 1.
Schematic drawings of some connected components of the start hypergraph of CSFG(G)
Theorem 2
.
The proof is based on the following fact. We recall some details of the proof because we will refer to them in the proof of Theorem 2.
Fact 1
Any recursively enumerable string language
is left quotient of two linear languages
, i.e.,
(cf. [7, Theorem 3.13.]).
Remark 3
, where
where
for
and
is a Chomsky grammar with
.
![]() |
where
. The basic idea is that for each
exists a derivation
with
and
where
for
, i.e.,
captures the relation
and
captures the relation
.1
and
are linear. The following grammars generate them.
![]() |
Example 2
Let
. Then
![]() |
Two derivations may be
and
. Removing the prefix z from d yields bbaa.
Every context-free string grammars can be transformed into fusion grammars generating the same language up to representation of strings as graphs as the following construction shows.
Construction 3
Let
be a context-free string grammar. Then
with
,
for
and
is the corresponding fusion grammar.
Example 3
Let
with
and
. Then the rules are represented by
and
with
is the corresponding fusion grammar.
Lemma 3
.A derivation
in G exists if and only if a derivation
in
exists.
Proof
Each context-free string grammar G can be transformed into a hyperedge replacement grammar with connected right hand sides. Hence, the transformation of hyperedge replacement grammars into fusion grammars (cf. [2]) can be applied yielding
.Proof by induction on the length of the derivation.

Remark 4
The connected components in the start hypergraphs of the context-sensitive fusion grammar in Construction 2 are hypergraph representation of the rules of the two linear string grammars (cf. Construction 3) slightly modified. The connected components in
are constructed for the linear rules in
such that each symbol in
is complemented and for each T-symbol the primed copy is used instead. The connected components for the linear rules in
containing
and
are constructed such that they contain fusion symbols left and terminal symbols right of the
-labeled hyperedge. Again for each terminal symbol the primed copy is used instead. The other connected components use the standard construction and are therefore only fusion symbol labeled (replacing also terminal symbols by their primed copy).
Proof
(of Theorem 2). Let
. Then
by Fact 1 and there are derivations in
and
with
and
with
and
. For each of these derivations exists by Lemma 3 a derivation in the corresponding fusion grammar (
, resp. where
and
are defined in Remark 3). Because the nonterminal alphabets of
and
are disjoint and the connected component
contains two hyperedges one labeled with each start symbol of the two linear string grammars there is a derivation
applying context-free fusion rules2. Then the two complementary strings graphs can be erased by successive applications of reduce(x) for suitable x due to Lemma 1, i.e.,
. Consequently,
.
Now, let
. Then there is a derivation
with
. Because only
contains a
-hyperedge this connected component is substantial for some derived connected component contributing to the generated language. W.l.o.g. one can assume that
is never multiplied due to the following reasoning. Let C be a connected component derivable from Z. Let
be a mapping of hypergraphs over
to the number of
-labeled hyperedges in the respective hypergraph. Then
, i.e., no two or more copies of
contribute to C as the following reasoning indicates. For each
by construction. For each
assume
for some
where
and
are two connected components and
for
.
implies
. Hence,
,
. Further, r must be a context-free fusion rule because the positive context conditions of reduce(x) restrict that both hyperedges must be attached to a common source vertex which is not possible if
and
are two connected components. Let
be the applied context-free fusion rule,
. W.l.o.g. let A be the label of the hyperedge in
and let
be the label of the hyperedge in
. Furthermore, it is sufficient to analyze the case
for
. However,
implies that
contributes to
but because the linear structure of the rules in
and
carries over to the connected components
cannot contain both a
- and a
-labeled hyperedge. Hence, the assumption must be false.
The fusion rules wrt
are context free and thus one connected component or two connected components with two complementarily labeled hyperedges from this subset can be fused arbitrarily. This may produce connected components without markers where all the hyperedges labeled with
are fused. E.g.
may be multiplied several times and all the complementary
- and
-hyperedges can be fused yielding two circles. However this connected component is not fusible to some other connected component because now it is only labeled with fusion symbols
but for these symbols the fusion is restricted to take only place if the two complementary hyperedges are attached to the same vertex. A similar argument can be applied to other cases wrt connected components with
-hyperedges.
The direct derivations steps can be interchanged3 in such a way that one gets a derivation of the following form:
Hence,
. The linear structure of the connected components gives us
. 
Conclusion
In this paper, we have continued the research on context-dependent fusion grammars. We have introduced context-sensitive fusion grammars and have showed that the Post correspondence problem can be formulated very intuitively by such a grammar. Afterwards, we have showed that every Chomsky grammar can be simulated by a corresponding context-sensitive fusion grammar. Hence, they can generate all recursively enumerable string languages (up to representation of strings as graphs). This improves the previous result presented in [5] showing that context-dependent fusion grammars (with positive and negative context-conditions) are another universal computing model. However, further research is needed including the following open question. Is it true, that fusion grammars without context-conditions are not universal? Are also only negative context conditions powerful enough to simulate Chomsky grammars? If so is also a single negative context-condition sufficient? One may also investigate fusion grammar with other regulations like priorities or regular expressions.
Acknowledgment
We are grateful to Hans-Jörg Kreowski and Sabine Kuske for valuable discussions. We also thank the reviewers for their valuable comments.
Footnotes
1. W.l.o.g. assume
such that each derivation is of length
.
2. For technical reasons each word contains the derivation twice, the middle is separated by cc,
is separated by ccc, the first is in reverse order and the second is reversed. This yields
String in
are of the form
where
in G and
; and strings in
are of the form
, where
. Therefore,
for some
if and only if
for
and
. Consequently, 
Applying first
with
and then
is arbitrary. The rules may be applied in any order.
Contributor Information
Alberto Leporati, Email: alberto.leporati@unimib.it.
Carlos Martín-Vide, Email: carlos.martin@urv.cat.
Dana Shapira, Email: shapird@g.ariel.ac.il.
Claudio Zandron, Email: zandron@disco.unimib.it.
Aaron Lye, Email: lye@math.uni-bremen.de.
References
- 1.Adleman LM. Molecular computation of solutions to combinatorial problems. Science. 1994;266:1021–1024. doi: 10.1126/science.7973651. [DOI] [PubMed] [Google Scholar]
- 2.Kreowski H-J, Kuske S, Lye A. Fusion grammars: a novel approach to the generation of graph languages. In: de Lara J, Plump D, editors. Graph Transformation; Cham: Springer; 2017. pp. 90–105. [Google Scholar]
- 3.Kreowski H-J, Kuske S, Lye A. Relating DNA computing and splitting/fusion grammars. In: Guerra E, Orejas F, editors. Graph Transformation; Cham: Springer; 2019. pp. 159–174. [Google Scholar]
- 4.Kreowski H-J, Kuske S, Lye A. Transformation of petri nets into context-dependent fusion grammars. In: Martín-Vide C, Okhotin A, Shapira D, editors. Language and Automata Theory and Applications; Cham: Springer; 2019. pp. 246–258. [Google Scholar]
- 5.Lye, A.: Transformation of turing machines into context-dependent fusion grammars. In: Post-Proceedings of 10th International Workshop on Graph Computation Models, (GCM 2019). Electronic Proceedings in Theoretical Computer Science (EPTCS) (2019). 10.4204/EPTCS
- 6.Post EL. A variant of a recursively unsolvable problem. Bull. Am. Math. Soc. 1946;52:264–269. doi: 10.1090/s0002-9904-1946-08555-9. [DOI] [Google Scholar]
- 7.Păun G, Rozenberg G, Salomaa A. DNA Computing – New Computing Paradigms. Heidelberg: Springer; 1998. [Google Scholar]





