JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.1 (1-18)
Theoretical Computer Science ••• (••••) •••–•••
Contents lists available at ScienceDirect
Theoretical Computer Science www.elsevier.com/locate/tcs
Derivation languages and descriptional complexity measures of restricted flat splicing systems Prithwineel Paul ∗ , Kumar Sankar Ray Electronics and Communication Sciences Unit, Indian Statistical Institute, 203 B. T. Road, Kolkata, West Bengal 700108, India
a r t i c l e
i n f o
Article history: Received 10 May 2019 Received in revised form 2 September 2019 Accepted 4 October 2019 Available online xxxx Communicated by J.M. Pérez-Jiménez Keywords: Flat splicing Labeled restricted flat splicing systems Szilard language Control language Chomsky hierarchy
a b s t r a c t In this paper, we associate the idea of derivation languages with a restricted variant of flat splicing systems where at each step splicing is done with an element from the initial set of words present in the system. We call these flat splicing systems as restricted flat splicing systems. We show that the families of Szilard languages of labeled restricted flat finite splicing systems of type (m, n) and REG, C F and C S are incomparable. Also, any non-empty regular, non-empty context-free and recursively enumerable language can be obtained as homomorphic image of the Szilard language of the labeled restricted flat finite splicing systems of type (1, 2), (2, 2) and (5, 2) respectively. We also introduce the idea of control languages for restricted labeled flat finite splicing systems and show that any nonempty regular and context-free language can be obtained as a control language of labeled restricted flat finite splicing systems of type (1, 2) and (2, 2) respectively. At the end, we show that any recursively enumerable language can be obtained as a control language of labeled restricted flat finite splicing systems of type (5, 2) when λ-labeled rules are allowed. © 2019 Elsevier B.V. All rights reserved.
1. Introduction Splicing systems mathematically formalize the recombination behavior of DNA molecules under the presence of restriction enzymes and ligases. The restriction enzymes cut the DNA molecules in specific cites and ligases help the molecules to recombine with each other to produce new molecules. After each splicing step new DNA molecules and sometimes the same molecules taking part in splicing are produced. Splicing systems are a well-investigated topic in formal language theory [11]. Different variants of splicing systems and their computational capabilities already have been investigated in [5, 9–11]. Splicing systems containing finite set of axioms and rules can generate only regular languages [3]. But with different restrictions on the set of axioms and the rules, finite splicing systems can even characterize recursively enumerable languages [11]. In this work, we discuss a variant of splicing systems known as flat splicing systems and its restricted variant. In flat splicing, if x0 = x0 u . vx0 is spliced with y 0 = y 0 v 1 y 0 by the rule r = < u | y 0 − y 0 | v >, the string x0 u . y 0 v 1 y 0 . vx0 is generated. It is written as (x0 , y 0 ) r x0 u . y 0 v 1 y 0 . vx0 . Moreover in flat splicing systems any two strings generated at any step can be spliced together depending on the rules available in the system. However, in restricted flat splicing systems, all strings obtained during computation must be spliced with the elements from the initial set of strings present in the system (axiom) only. The idea of flat splicing was introduced by Berstel et al. in [1]. Also different variants of flat splicing systems and their computational power for linear as well as for circular words such as alphabetic flat splicing systems, pure
*
Corresponding author. E-mail addresses:
[email protected],
[email protected] (P. Paul).
https://doi.org/10.1016/j.tcs.2019.10.003 0304-3975/© 2019 Elsevier B.V. All rights reserved.
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.2 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
2
alphabetic flat splicing systems, concatenation systems have been discussed in [1]. The language generating power of the alphabetic flat splicing P systems, its variants and matrix variant of flat splicing systems have been discussed in [13], [19] and [2] respectively. Some new models of picture generation using the flat splicing rules in arrays have been introduced in [20]. In this paper, we introduce the ideas of two types of derivation languages of labeled restricted flat splicing systems and compared the families of these languages with the families of languages in Chomsky hierarchy. The first one is Szilard languages and the second one is control languages. Szilard languages are well-known concept in formal language theory. Szilard languages of Chomsky grammars, parallel communicating grammar systems, communicating distributive grammar systems etc. along with their closure properties, decidability aspects, complexity aspects have been investigated in [4]. Also, the idea of derivation languages for DNA computing and membrane computing models have been investigated in [6] and [7] respectively. In [6], derivation languages have been associated with splicing systems and in [7] the derivation languages have been introduced for splicing P systems. Also, the idea of control languages for spiking neural P systems, transition P systems and tissue P systems has been investigated in [16–18,21]. In this paper, we show that the families of Szilard languages of labeled restricted flat finite splicing systems and REG, C F and C S are incomparable. Moreover, any non-empty regular, non-empty context-free and recursively enumerable language can be obtained as homomorphic image of the Szilard language of labeled restricted flat finite splicing systems of type (1, 2), (2, 2) and (5, 2) respectively. We also introduce the idea of control languages for labeled restricted flat splicing systems and show that unlike in the case of Szilard languages, any non-empty regular and context-free language can be obtained as control language by labeled restricted flat finite splicing systems of type (1, 2) and (2, 2) respectively. Moreover, any recursively enumerable language can be obtained as control language of labeled restricted flat finite splicing systems of type (5, 2) when the splicing rules can have λ-label. The paper is organized as follows: In section 2 we recall the basic definitions required for this paper. We introduce Szilard and control languages for the labeled restricted flat splicing systems in section 3 and discuss the main results of this paper. In section 4, we discuss conclusion and open problems which can be investigated further. 2. Preliminaries For the basic definitions and notions of formal language theory we refer to [15]. Chomsky normal form: For every context-free grammar G, a grammar G = ( N , T , S , P ) can be effectively constructed where the rules in P are of the form A → BC and A → a, A , B , C ∈ N , a ∈ T such that L (G ) \ {λ} = L (G ) \ {λ}. Greibach normal form: A context-free grammar G = ( N , T , S , P ) is said to be in Greibach normal form if the rules in P are of the form A → aα , A ∈ N , a ∈ T , α ∈ N ∗ . Type-0-grammar: A type-0-grammar is a construct of the form G = ( N , T , S , P ) where N is the non-terminal alphabet and T is the terminal alphabet such that N ∩ T = ∅. The starting symbol S ∈ N and the rules in P are ordered pairs (u , v ) where u ∈ ( N ∪ T )∗ N ( N ∪ T )∗ and v ∈ ( N ∪ T )∗ . Kuroda normal form: Every type-0 grammar G = ( N , T , S , P ) is in Kuroda normal form if the rules of the grammar G are of the following forms:
A → BC , A B → C D , A → a, A → λ for A , B , C , D ∈ N and a ∈ T . Homomorphism: A homomorphism is a mapping h from ∗ to ∗ where , are alphabets. Also, the mapping preserves concatenation, i.e., h( v . w ) = h( v ).h( w ), v , w ∈ ∗ . Szilard languages [15]: Let G = ( N , T , S , P ) be Chomsky grammar and F be an alphabet such that the cardinalities of the set F and P are the same. Let f be a bijective mapping from P to F such that for each p ∈ P a unique label f ( p ) is associated with p and is called the label of the rule p. A derivation in G is called successful if a string over T is generated starting from S. With each successful derivation of G, a string over F can be associated if the labels of the applied rules of any successful derivation are concatenated sequentially. The language generated in this manner is called Szilard language of the grammar G and is denoted by S Z (G ). Example 1. Let G = ({ S }, {a, b}, S , { S → aSb, S → ab}) be a context-free grammar. The rules are labeled in the following manner: f 1 : S → aSb, f 2 : S → ab. Hence the Szilard language generated by the grammar G is S Z (G ) = { f 1n f 2 | n ≥ 0}. The families of regular, context-free, context-sensitive and recursively enumerable languages are denoted by REG, C F , C S and R E respectively. Flat splicing systems [1]: A flat splicing system is a construct of the form S = ( A , I , R ) where A is an alphabet, I is a set of words over the alphabet A, R is a finite set of splicing rules. The rules in a flat splicing system are of the form < α |γ − δ|β > where α , β, γ , δ are words over the alphabet A. The strings α , β, γ , δ are called the handles of the rule. If the rule r = < α |γ − δ|β > is applied to the pair of strings (u , v ) where u = xα . β y and v = γ zδ , then the string v is inserted in the “.” location of u. Hence after application of the rule r, the string w = xα . γ zδ . β y is obtained. The location “.” represents the location where the cutting and pasting operations take place. The flat splicing operation over the
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.3 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
3
two words u and v can be represented as (u , v ) r w. Moreover, a flat splicing system is called finite, regular, context-free, context-sensitive if the corresponding initial set I is finite, regular, context-free and context-sensitive respectively. The language generated by the flat splicing system S = ( A , I , R ) is denoted by F (S ) which is also the smallest language L containing I . It is also closed under R, i.e., for u , v ∈ L and r ∈ R , (u , v ) r w ∈ L. In this paper, we introduce the notion of type with the rules in flat splicing systems. A flat splicing system S = ( A , I , R ) is called of type (m, n) where m = max{|α |, |β|| < α |γ − δ|β >∈ R } and n = max{|γ δ|| < α |γ − δ|β >∈ R } where u = xα .β y , v = γ zδ, (u , v ) = (xα .β y , γ zδ) r xα .γ zδ.β y, and x, y , α , β, γ , δ, z ∈ A ∗ , |γ | ≤ 1, |δ| ≤ 1 and |γ zδ| ≥ 1. The parameters m and n represent the descriptional complexity measures of the flat splicing systems. Note that whenever a string γ zδ is inserted into another word xα .β y, the inserted string is represented by γ − δ , i.e., only by the end letters of the words. Furthermore, if the inserted word (i.e., |γ zδ| = 1) is of length 1, i.e., γ1 ∈ A is inserted then it is denoted as − γ1 or γ1 − . We have explained these notations in Examples 2 and 3. Moreover, the language generated by the flat splicing system S of type (m, n) is denoted as Fnm (S ) and the families of languages generated by the flat splicing systems of type (m, n) are denoted by F S nm . When m and n are not specified, they are replaced by “∗”. Also the flat splicing of two strings is simply mentioned as splicing of two strings. A rule of the flat splicing system S is called alphabetic if for any rule r = < α |γ − δ|β >, either α , β, γ , δ are letters or empty strings. A flat splicing system is called alphabetic if all the rules present in the system are alphabetic, i.e., alphabetic flat splicing systems are flat splicing systems of type (1, 2). Example 2. [1] Let S = ( A , I , R ) be a flat splicing system where A = {a, b}, I = {ab} and R = {< a|a − b|b >}. Since ab ∈ I , at first ab is spliced with ab only and generates a2 b2 . This process is continued and the strings of the form an bn are spliced with the strings of the form an bn only. Hence F21 (S ) = {an bn |n ≥ 1}. In the previous example the strings inserted must be of length at least two, otherwise the rule cannot be applied. Now, we give examples of flat splicing systems where strings of length one are inserted in the specified location. Example 3. Let S = ( A , I , R ) where A = { X , Y , a}, I = { X Y , a} and R = {< X | − a|Y >}. Hence F11 (S ) = { XaY }. Example 4. Let S = ( A , I , R ) be a flat splicing system where A = {a, b, Z }, I = {aab, Z }, R = {< | − Z |a >}. The application of < | − Z |a > to the words .aab, Z will generate the word Z .aab. This flat splicing operation is a concatenation operation. Moreover, F11 (S ) = { Zaab}. In this work we introduce a new variant of flat splicing systems called as restricted flat splicing systems. Restricted flat splicing systems: A restricted flat splicing system is a construct of the form RS = ( A , I , R ) where A , I and R are same as in the definition of flat splicing systems with the exception where splicing performed in the system follows the pattern below:
(xi −1 , y i −1 ) xi , (xi , y i ) xi +1 , (i ≥ 1), x0 , y 0 , y i (i ≥ 1) ∈ I Note that x0 , y 0 ∈ I and x1 is generated after splicing of x0 and y 0 . In the second step, the string obtained after splicing in the first step, i.e., x1 is spliced with y 1 and (x1 , y 1 ) x2 where y 1 ∈ I . Similarly, in the next step x2 is spliced with y 2 ∈ I and (x2 , y 2 ) x3 . This process is continued and the words generated in this process, i.e., x1 , x2 , x3 , . . . ∈ Fnm (RS ) where Fnm (RS ) represents the language generated by the restricted flat splicing system RS of type (m, n). This variant is fundamentally different from the flat splicing systems, since in flat splicing systems for any u , v ∈ L , (u , v ) w ∈ L. But in case of restricted flat splicing systems one of the elements in each splicing step must be from the initial set of elements present in the system. Example 5. Let RS = ( A , I , R ) be a restricted flat splicing system where A = {a, x, y }, I = {a, xy }, R = {< a|x − y | >, < y |x − y | >, < y |a − y | >}. The word a can be spliced with xy and it generates the word axy. Moreover repeated application of the rule < y |x − y | > obtains the words a(xy )n , n ≥ 1. Furthermore, there is no word in I with end letters a and y. Hence the splicing rule < y |a − y | > is not applicable. So, F21 (RS ) = {a(xy )n |n ≥ 1}. Remark. In the above example if we consider RS as a flat splicing system S instead of a restricted flat splicing system then we have (a, xy ) a.xy , (axy , xy ) axy .xy, (axyxy , axy ) axyxy .axy. In the last step the rule < y |a − y | > is used. So, axyxyaxy ∈ F21 (S ) but axyxyaxy ∈ / F21 (RS ). In the next section, we investigate two types of derivation languages of the labeled restricted flat splicing systems. At first, we introduce the idea of Szilard languages of labeled restricted flat splicing systems. Then we introduce the idea of control languages of labeled restricted flat splicing systems.
JID:TCS
4
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.4 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
3. Szilard and control languages of labeled restricted flat splicing system Let RS = ( A , I , R ) be a restricted flat splicing system. A labeled restricted flat splicing system is a construct of the form L RS = ( A , I , R , Lab) such that A ∩ Lab = ∅ where each rule of the flat splicing system is labeled in one-to-one manner with the elements from Lab. A derivation in a labeled restricted flat splicing system is called terminal derivation if it follows the following pattern:
(x0 , y 0 ) a1 x1 , (x1 , y 1 ) a2 x2 , (x2 , y 2 ) a3 x3 , . . . , (xn−1 , yn−1 ) an xn where x0 , y 0 , y 1 , . . . , yn−1 ∈ I , a1 , a2 , . . . , an ∈ Lab. Moreover, no rule from R is applicable to the word xn ∈ A + and the word a1 a2 . . . an is called a Szilard word. The language obtained by collecting all the Szilard words is called Szilard language of the labeled restricted flat splicing system L RS and S Z nm, F AM (L RS ) denotes the Szilard language of the labeled restricted flat splicing system L RS of type (m, n) where the initial set I ∈ F A M = {FIN, REG, C F , C S }. The families of Szilard languages of the labeled restricted flat splicing systems of type (m, n), are denoted as S Z L S nm, F AM . If m and n are not specified, they are replaced by “∗”. Example 6. We give an example of an alphabetic labeled restricted flat finite splicing system which can obtain a regular language as a Szilard language. Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where A = { X , A 1 , A , Y }, I = { X A 1 Y , A 1 , A }, R = {a :< A 1 | − A 1 |Y >; c :< A 1 | − A |Y >}. The a-rule is applicable any number of times and it can splice the words X A n1 Y , n ≥ 1 and A 1 . But after application of the c-rule, the word X A n1 A Y , n ≥ 1 is obtained. No rule is applicable to this word. Hence S Z 11,FIN (L RS ) = {an c |n ≥ 0}. Control languages of labeled restricted flat splicing systems: Let S = ( A , I , R ) be a restricted flat splicing system. A labeled restricted flat splicing system is a construct of the form L RS = ( A , I , R , Lab) such that A ∩ Lab = ∅ where each rule of the flat splicing system are associated with a label from the set Lab. Unlike in the case of Szilard languages of labeled restricted flat splicing systems, the rules in R are not labeled in one-to-one manner (multiple rules can have the same label but one rule cannot have multiple labels) and also the rules can have empty label (i.e., λ-label). The words obtained by concatenating the labels of the applied rules of any terminal derivation of the labeled restricted flat splicing system is called as control word and the collection of all the control words is called as control language. The control language of the labeled restricted flat splicing system L RS of type (m, n) is denoted by C L m n, F AM (L RS ). The families of the control languages of the labeled restricted flat splicing systems of type (m, n), are denoted as CLLSm n, F AM . If some of the rules of L RS are associated with label ‘λ’ (empty) label, then the control language of the labeled restricted flat splicing system L RS of type (m, n) is denoted by C L m n,λ, F AM (L RS ). The families of control languages of the labeled restricted flat splicing systems of type (m, n) with λ-labeled rules are denoted by CLLSm n,λ, F AM . When m and n are not specified, they are replaced by “∗”. Now we give examples of labeled restricted flat finite splicing systems which can obtain non-context-free contextsensitive and non-regular context-free languages as control languages. Example 7. Let L RS = ( A , I , R , Lab) be a labeled restricted flat finite splicing system where A = { X , Y , A 1 , A }, I = { X Y , A 1 , A }, R = {a :< X | A 1 − | Y >, a :< A 1 | A 1 − | Y >, b :< A 1 | A − | Y >, b :< A 1 | A − | A 1 A >}. On application of the a-rules, one A 1 is added between the markers X and Y . Similarly, the first b-rule inserts A between A 1 and Y and the second b-rule inserts A between A 1 and A 1 A . Also, the b-rules are applicable after application of a-rules and only after application of same number of a and b-rules, the string X ( A 1 A )n Y , n ≥ 1 over A is generated where no rule is applicable further. Hence C L 21,FIN (L S ) = {an bn | n ≥ 1}.
Example 8. Let L RS = ( A , I , R , Lab) be a labeled restricted flat finite splicing system where A = { X , Y , A , B , A 1 }, I = { X Y , A , B , A 1 }, R = {a :< X | A 1 − | Y >, a :< A 1 | A 1 − | Y >, b :< A 1 | A − | Y >, b :< A 1 | A − | A 1 A >, c :< X A 1 A 1 | B − | A 1 >, c :< B A 1 A 1 | B − | A 1 >, c :< B A 1 A 1 | B − | Y >}. Hence, C L 31,FIN (L RS ) = {an bn cn |n ≥ 1}. 3.1. Comparisons of the families of Szilard languages of labeled restricted flat splicing systems and the families of languages in Chomsky hierarchy In this section, we discuss the results related to the Szilard languages of the labeled restricted flat splicing systems. The language {aa} cannot be obtained as Szilard language of any Chomsky grammar. But we prove that this language can be obtained as Szilard language of labeled restricted flat finite splicing system. Moreover, we show that some regular, nonregular context-free and non-context-free context-sensitive language cannot be a Szilard language of any labeled restricted flat finite splicing system. But any non-empty regular, non-empty context-free and recursively enumerable language can be obtained as homomorphic image of the Szilard language of restricted labeled flat finite splicing systems of type (1, 2), (2, 2) and (5, 2) respectively.
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.5 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
5
Theorem 1. {aa} ∈ S Z L S 11,FIN . Proof. Let L RS = ( A , I , R , Lab) be an alphabetic labeled restricted flat finite splicing system where A = { S , X a , Y }, I = { S Y S Y , X a }, R = {a :< S | − X a |Y >}, Lab = {a}. After application of the a-rule, S Y S Y splice with X a and obtains S X a Y S Y or S Y S X a Y . Next application of the a-rule obtains X S a Y X S a Y . No rule is applicable to it. Hence S Z 11,FIN (L RS ) = {aa}. 2 In the next result, we show that the regular language {an |n ≥ 1} cannot be a Szilard language of any labeled restricted flat finite splicing system. ∗ / S Z L S ∗, Theorem 2. {an | n ≥ 1} ∈ FIN .
Proof. Let us assume that there exists a labeled restricted flat finite splicing system L RS = ( A , I , R , Lab) such that S Z nm,FIN (L RS ) = {an |n ≥ 1} where R = {a :< u |u 1 − v 1 | v >} and x1i u . vx2i , u 1 δ v 1 ∈ I , x1i , x2i , u , v , u 1 , v 1 , δ ∈ A ∗ , |u 1 | ≤ 1, | v 1 | ≤ 1. Now since a ∈ {an |n ≥ 1}, there exists a derivation
(x00 , y 00 ) a z10
(1)
where = ∈ I and a :< u |u 1 − v 1 | v > is not applicable to Similarly, the terminal derivation for a2 is as follows: x00
x10 u . vx20 ,
y 00
z10 .
(x10 , y 10 ) a z11 , ( z11 , y 11 ) a z21
(2)
where ∈ I and a :< u |u 1 − v 1 | v > is not applicable to Again, the terminal derivation of a3 is as follows: x10 ,
y 10 ,
y 11
z21 .
(x20 , y 20 ) a z12 , ( z12 , y 21 ) a z22 , ( z22 , y 22 ) a z32
(3)
where ∈ I and a :< u |u 1 − v 1 | v > is not applicable to Since, the labeled restricted flat splicing system L RS contains only one a-rule, then from the above derivations it is clear that either after application of a-rule, the subword uv is again obtained in the newly generated word or the initial pair of words (x0i , y 0i ), i ≥ 0 are distinct (i.e., at least one of term of the pair is different from any other initial pair of words). If after application of the a-rule again a subword uv is obtained, then no terminal derivation is obtained. Hence {an |n ≥ 1} cannot be a Szilard language of the labeled restricted flat finite splicing system L RS . In the second case, to obtain {an |n ≥ 1} as Szilard language, the pairs (x0i , y 0i ) must be distinct, where x0i , y 0i ∈ I and I is finite. Hence {an |n ≥ 1} cannot be Szilard language of any labeled restricted flat finite splicing system. 2 x20 ,
y 20 ,
y 21 ,
y 22
z32 .
Now we show that {an |n ≥ 1} can be Szilard language of a labeled restricted flat regular splicing system. Theorem 3. {an |n ≥ 1} can be obtained as Szilard language of an alphabetic labeled restricted flat regular splicing system, i.e., {an |n ≥ 1} ∈ S Z L S 11,REG . Proof. Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where A = { X , A 1 , A , Y }, I = { X A n1 Y |n ≥ 2} ∪ { A }, R = {a :< A 1 | − A | A 1 >}, Lab = {a}. Hence S Z 11,REG (L RS ) = {an |n ≥ 1}. 2 Theorem 4. S Z L S 11,FIN ∩ (REG \ FIN) = ∅. Proof. Follows from Example 6.
2
Theorem 5. S Z L S 12,FIN ∩ (C F \ REG) = ∅. Proof. Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where A = { X , A 1 , Y , A 2 }, I = { X A 1 Y , A 1 , A 2 }, R = {a :< A 1 | − A 1 |Y >, b :< A 1 | − A 2 |Y >, c :< A 1 | − A 2 | A 1 A 2 >}, Lab = {a, b, c }. Hence, S Z 12,FIN (L RS ) = {an bcn |n ≥ 1}. 2 Theorem 6. (C S \ C F ) ∩ S Z L S 12,FIN = ∅.
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.6 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
6
Proof. Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where A = { X , A , A , A , Y }, I = { X A AY , A , A , A }, R = {a :< A | − A | A >, b :< A | − A | A >, c :< A A | − A | A >}, Lab = {a, b, c }. On application of the a-rule, X A AY splice with A and obtains X A A AY . Similarly, application of the b-rule inserts A between the two A’s of the subword A A and generates the subword A A A. Similarly, when c-rule is applied, the string A A is replaced by A A A . So after application of the a-rule n times, the word X A n+2 Y is obtained. Next (n + 1) time application of the b-rule obtains X ( A A )n+1 AY and finally (n + 1) time application of the c-rule obtains the word X ( A A A )n+1 AY . No splicing rule is applicable to this word. Hence terminal derivation can be obtained in L RS only after n time application of a-rule, followed by (n + 1) time application of b and c-rules respectively. Hence, S Z 12,FIN (L RS ) ∩ a∗ b∗ c ∗ =
{an bn+1 cn+1 | n ≥ 1}. Since {an bn+1 cn+1 |n ≥ 1} is a context-sensitive language and context-sensitive languages are closed under intersection with regular languages, S Z 12,FIN (L RS ) must be context-sensitive. 2 Now we show that the non-regular context-free language {an bn |n ≥ 1} cannot be obtained as a Szilard language of labeled restricted flat finite splicing system. ∗ Theorem 7. {an bn |n ≥ 1} ∈ / S Z L S ∗, FIN .
Proof. Let L RS = ( A , I , R , Lab) be a labeled restricted flat finite splicing system such that S Z nm (L RS ) = {an bn |n ≥ 1} where a :< u |u 1 − v 1 | v >, b :< u 2 |u 3 − v 3 | v 2 >, u 1 δ1 v 1 , u 3 δ3 v 3 ∈ I , u , v , u 2 , v 2 , u 1 , v 1 , u 3 , v 3 , δ1 , δ3 ∈ A ∗ , |u 1 |, | v 1 |, |u 3 |, | v 3 | ≤ 1. Since, ab ∈ S Z nm (L RS ), there exists a terminal derivation
(x00 , y 00 ) a z10 ( z10 , y 01 ) b z20 where no rule from R is applicable to the word z20 . Similarly, a2 b2 ∈ S Z nm (L RS ). Hence there exists a derivation
(x10 , y 10 ) a z11 ( z11 , y 11 ) a z21 ( z21 , y 12 ) b z31 ( z31 , y 13 ) b z41 where x10 , y 10 , y 11 , y 12 , y 13 ∈ I and no rule is applicable to z41 . Also, a3 b3 ∈ S Z nm (L RS ). Hence there exists a derivation
(x20 , y 20 ) a z12 ( z12 , y 21 ) a z22 ( z22 , y 22 ) a z32 ( z32 , y 23 ) b z42 ( z42 , y 24 ) b z52 ( z52 , y 25 ) b z62 where x20 , y 20 , y 21 , y 22 , y 23 , y 24 , y 25 ∈ I and no rule is applicable to z62 . R contains two rules a :< u |u 1 − v 1 | v > and b :< u 2 |u 3 − v 3 | v 2 > where u , v , u 2 , v 2 , u 1 , v 1 , u 3 , v 3 ∈ A ∗ , |u 1 | ≤ 1, | v 1 | ≤ 1, |u 3 | ≤ 1, | v 3 | ≤ 1. Proceeding in the similar manner as in Theorem 2, we can say that to obtain {an bn |n ≥ 1} as a Szilard language of labeled restricted flat finite splicing system L RS , either after application of a-rule and b-rule, the subwords uv and u 2 v 2 are obtained respectively in the newly generated words or at least one of the words in the initial pair (x0i , y 0i ), i ≥ 0 is distinct from other initial pairs in each terminal derivation. If a-rule and b-rule obtain the subwords uv and u 2 v 2 respectively in the newly generated words, then no terminal j j derivation can be obtained. Also if the initial pair of words (x0 , y 0 ), j = 0, 1, 2, . . . are distinct then I cannot be finite - a contradiction. Hence {an bn |n ≥ 1} cannot be a Szilard language of any labeled restricted flat finite splicing system. 2 Theorem 8. {an bn |n ≥ 1} ∈ S Z L S 13,REG . Proof. Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where A = { X , A 1 , B 1 , Y }, I = { X A n1 B 1 Y |n ≥ 2} ∪ { B 1 , X }, R = {a :< A 1 | − B 1 | A 1 B 1 >, b :< X A 1 B 1 | − X | A 1 B 1 >}. Hence S Z 13,REG (L RS ) = {an bn |n ≥ 1}. 2
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.7 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
7
∗ Theorem 9. {an bn cn |n ≥ 1} ∈ / S Z L S ∗, FIN .
Proof. We can prove this result proceeding in the similar manner as in Theorem 7.
2
Theorem 10. {an bn cn |n ≥ 1} ∈ S Z L S 14,REG . Proof. Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where A = { X , B 1 , C 1 , Y }, I = { X B n1 C 1 Y |n ≥ 2} ∪{C 1 , X , Y }, R = {a :< B 1 | − C 1 | B 1 C 1 >, b :< X B 1 C 1 | − X | B 1 C 1 >, c :< B 1 C 1 | − Y | X B 1 C 1 Y >}. Hence S Z 14,REG (L RS ) = {an bn cn |n ≥ 1}. 2 Theorem 11. The families S Z L S nm,FIN and REG (resp. C F , C S) are incomparable. Proof. Follows from the Theorems 2, 4, 5, 6, 7 and 9.
2
Open problem: Can labeled restricted flat regular splicing systems obtain any recursively enumerable language as Szilard language? We have already proved that not all regular language can be Szilard language of labeled restricted flat finite splicing systems. But in the next result we show that any non-empty regular language can be obtained as homomorphic image of the Szilard language of the labeled restricted flat finite splicing systems of type (1, 2). Theorem 12. Any non-empty regular language can be obtained as a homomorphic image of the Szilard language of the restricted labeled flat finite splicing system of type (1, 2). Proof. Let L be a λ-free regular language and the grammar G = ( N , T , S , P ) generates L, i.e., L = L (G ). We construct a labeled restricted flat splicing system which simulates the rules in the grammar G. Initially, the non-terminals N of G are rewritten using the symbols D i , 1 ≤ i ≤ n, starting from D 1 = S and the labeled restricted flat splicing system L RS is constructed in such a manner that L = L (G ) = h( S Z 21,FIN (L RS )) where h is a homomorphism and S Z 21,FIN (L RS ) denotes the Szilard language of the restricted labeled flat splicing system of type (1, 2). Now the rules in P are of the form D i → aD j , and D i → a, where D i , D j ∈ N, and a ∈ T . Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where:
• A = { X , Y , D 1 , D 2 , . . . , D n } ∪ {Y a |a ∈ T }; • I = { X D 1 Y } ∪ {Y a D j | D i → aD j ∈ P } ∪ {Y a | D i → a ∈ P }; • The rules in R are of the form: (I) For each D i → aD j , D i , D j ∈ N , a ∈ T we have the following rule: aiD :< D i |Y a − D j |Y > where Y a − D j = Y a D j ; j (II) For each D i → a, D i ∈ N , a ∈ T we have the following rule: ai :< D i | − Y a |Y >. • Lab = {aiD j | D i → aD j , D i , D j ∈ N , a ∈ T } ∪ {ai | D i → a, a ∈ T }. The non-erasing homomorphism h : ( Lab)∗ → T ∗ is defined in the following manner: h(aiD ) = a and h(ai ) = a where j
aiD , ai ∈ Lab. j
The rule D i → aD j is simulated by the splicing rule aiD :< D i |Y a − D j |Y >. So any derivation of the form x1 D i x2 ⇒
x1 aD j x2 has the corresponding derivation in L RS : aiD
( X y1 D i Y , Y a D j )
j
j
X y1 D i Y a D j Y .
Also, the terminating rule D i → a is simulated by the splicing rule ai :< D i | − Y a |Y >. So each derivation x1 D i x2 ⇒ x1 ax2 has the corresponding derivation in L RS : i
( X y 1 D i Y , Y a ) a X y 1 D i Y a Y . Every w ∈ L (G ) can be generated by application of the rules in G and there exist labeled splicing rules simulating the rules in G. Also there exists a one-to-one correspondence between the rules in G and L RS . So the application of the labeled splicing rules starting from X D 1 Y in the same order as in the derivation of w ∈ T ∗ , generates a string over A such that no splicing rule is applicable to it. Hence, each terminal derivation S ⇒∗ w = γ1 γ2 . . . γn ∈ L (G ) where γi ∈ T has the corresponding derivation in L RS :
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.8 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
8 i
at1
( X D 1 Y , y0)
1
i
at2
x1 , (x1 , y 1 )
2
in
x2 , . . . , (xn , yn ) atn xn+1 = X w Y , w ∈ ( N ∪ {Y a |a ∈ T })+
where no rule is applicable to X w Y and X D 1 Y , y 0 , y 1 , . . . , yn ∈ I . i i Also, concatenation of the labels of the splicing rules generates a word w 1 = at11 . . . atnn ∈ ( Lab)+ . Since, h(aiD ) = a j
i
i
and h(ai ) = a, the homomorphic image of the string, w 1 , i.e., h( w 1 ) = h(at11 . . . atnn ) =
γ1 γ2 . . . γn = w. Hence w ∈
h( S Z 21,FIN (L RS )). This will imply, L = L (G ) ⊆ h( S Z 21,FIN (L RS )).
It only remains to prove the inclusion h( S Z 21,FIN (L RS )) ⊆ L (G ), i.e., the homomorphic image of the Szilard languages of flat splicing systems of type (1, 2) is only the elements of L (G ). After application of the aiD -rule the word Y a D j is inserted into the word X w Y , w ∈ ( N ∪ {Y a |a ∈ T })+ and no rule from j
(I) and (II) is applicable further to the word Y a D j . Again, the ai -rule inserts the Y a into the word X w Y and no rule is further applicable to it. Hence no extra derivation is possible. Let w ∈ h( S Z 21,FIN (L RS )). Hence there exists w 1 ∈ S Z 21,FIN (L RS ) such that h( w 1 ) = w. i
a1
i
a2
in
Again, ( X D 1 Y , y 0 ) t1 x1 , (x1 , y 1 ) t2 x2 , . . . , (xn , yn ) atn xn+1 = X w Y , w ∈ ( N ∪ {Y a |a ∈ T })+ such that no rule is applii i i cable to xn+1 and X D 1 Y , y 0 , y 1 , . . . , yn ∈ I be a terminal derivation in L RS where at11 at22 . . . atnn = w 1 . Since there exists a one-to-one correspondence between the rules in L RS and G then for each terminal derivation in L RS we have a corresponding derivation in G where S ⇒∗ w = γ1 γ2 . . . γn ∈ T + , where γi ∈ T if the rules are applied in the same order. i
i
i
Moreover, h(at11 at22 . . . atnn ) = γ1 γ2 . . . γn . Hence, h( S Z 21,FIN (L RS )) ⊆ L (G ).
2
It was proved by P˘aun in [12] that some context-free languages cannot be represented as a homomorphic image of the Szilard language of any context-free language. Theorem 13. [12] The families of context-free languages and homomorphic image of context-free languages are incomparable. It was proved in [12] that {an bn |n ≥ 1} cannot be obtained as a homomorphic image of the Szilard language of the context-free languages. We also proved that {an bn |n ≥ 1} cannot be Szilard language of any labeled restricted flat finite splicing system. However in the next result we prove that any context-free language can be obtained as a homomorphic image of Szilard language of the labeled restricted flat finite splicing system of type (2, 2). Theorem 14. Any non-empty context-free language can be obtained as a homomorphic image of the Szilard language of the labeled restricted flat finite splicing system of type (2, 2). Proof. Let L be a non-empty context-free language and let G = ( N , T , S , P ) be a grammar such that L = L (G ). Let the grammar G is in Chomsky normal form and the rules in P are of the form, A 1 → B 1 C 1 and A 1 → a, where A 1 , B 1 , C 1 ∈ N , a ∈ T . Each element of the language L can be generated by initial application of the context-free rules A 1 → B 1 C 1 and then by application of the rules A 1 → a in the left-most manner. Also, each rule of P is associated with a unique label r i . We construct a labeled restricted flat splicing system L RS = ( A , I , R , Lab) such that L = h( S Z 22,FIN (L RS )) where h is a morphism from ( Lab)∗ to T ∗ and S Z 22,FIN (L RS ) denotes the Szilard language of the labeled restricted flat splicing system L RS of type (2, 2). Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where
• A = { X , Y , E } ∪ N ∪ 1 ∪ 2 ∪ {[rm ]} where 1 = {[r i ] | r i : A 1 → B 1 C 1 }, 2 = {[r i ] | r i : A 1 → a}; • I = { X S E Y } ∪ {[r i ] B 1 C 1 |r i : A 1 → B 1 C 1 ∈ P } ∪ {[r i ]|r i : A 1 → a} ∪ {[rm ]}; • R contains the following rules: (I) For each r i : A 1 → B 1 C 1 we have the following rule: [r i ]1 :< A 1 |[r i ] − C 1 |α1 α2 > where α1 ∈ N ∪ { E }, α2 ∈ N ∪ { E , Y } ∪ {[r i ]|[r i ] ∈ 1 }, α1 α2 ∈ / { N Y , E N } ∪ { E [r i ]|[r i ] ∈ 1 } and [r i ] − C 1 = [r i ] B 1 C 1 ; (II) For each r i : A 1 → a we have: [r i ]a :< [rm ] A 1 | − [r i ]|α3 >, α3 ∈ N ∪ { E }; Also we have the following rules: (II) [rk1 ] :< X | − [rm ]|α4 >, α4 ∈ N; [rk2 ] :< [rm ]α5 | − [rm ]|α6 >, α5 , α6 ∈ N ∪ 1 ∪ 2 , α5 α6 ∈ / N N. • Lab = {[r i ]1 | [r i ] ∈ 1 } ∪ {[r i ]a | [r i ] ∈ 2 } ∪ {[rk1 ] , [rk2 ] }. The morphism h : ( Lab)∗ → T ∗ is as follows: h([r i ]1 ) = h([rk1 ] ) = h([rk2 ] ) = λ, h([r i ]a ) = a where [r i ]1 , [rk1 ] , [rk2 ] , [r i ]a ∈ Lab and a ∈ T . We first prove that L (G ) = L ⊆ h( S Z 22,FIN (L RS )). Let w ∈ L (G ) and it can be generated by application of the contextfree rules A 1 → B 1 C 1 and then by left-most application of the rules A 1 → a. Each rule of G is associated with a unique
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.9 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
label and the rule r i : A 1 → B 1 C 1 is simulated by the splicing rule < A 1 |[r i ] − C 1 |α1 α2 >, where N ∪ {Y , E } ∪ {[r i ]|r i ∈ 1 }, α1 α2 ∈ / { E N , N Y } ∪ { E [r i ]|r i ∈ 1 }, [r i ] − C 1 = [r i ] B 1 C 1 . Let x1 A 1 x2 ⇒ x1 B 1 C 1 x2 be a derivation in G. The corresponding derivation in L RS is
9
α1 ∈ N ∪ { E }, α2 ∈
( X w 1 A 1 w 2 Y , [ri ] B 1 C 1 ) [ri ] X w 1 A 1 [ri ] B 1 C 1 w 2 Y . 1
The symbol [rm ] identifies the left-most non-terminal where the [r i ]a -rule is applicable for each r i : A 1 → a. The [rk1 ] -rule splices the string X α4 w 1 Y , w 1 ∈ A ∗ , α4 ∈ N with [rm ] and generates the string X [rm ]α4 w 1 Y .
( X α4 w 1 Y , [rm ]) [rk1 ] X [rm ]α4 w 1 Y . The [rk2 ] -rule inserts [rm ] into the specified locations.
( X w 1 [rm ]α5 α6 w 2 E Y , [rm ]) [rk2 ] X w 1 [rm ]α5 [rm ]α6 w 2 E Y where w 1 ∈ ( N ∪ 1 ∪ 2 ∪ [rm ])∗ , w 2 ∈ ( N ∪ 1 ∪ 2 )∗ , α5 , α6 ∈ N ∪ 1 ∪ 2 , α5 α6 ∈ / N N. The [rk1 ] and [rk2 ] labeled rules are constructed in such a manner that they help to identify the leftmost non-terminal in the word X w Y , where the [r i ] can be inserted by splicing with [r i ] after application of the [r i ]a -rule. The r i : A 1 → a rule is applied in the left-most manner and is simulated when the string X w 1 [rm ] A 1 w 2 E Y , w 1 , w 2 ∈ ( N ∪ 1 ∪ 2 ∪ [rm ])∗ is spliced with [r i ] and generates the string X w 1 [rm ] A 1 [r i ] w 2 Y .
( X w 1 [rm ] A 1 w 2 E Y , [ri ]) [ri ] X w 1 [rm ] A 1 [ri ] w 2 E Y . a
Now in the above derivation, if w 1 = α1 [r1 ]α2 [r2 ] . . . αn [rn ] where the following derivation:
( X α1 [r1 ]α2 [r2 ] . . . αn [rn ] A 1 w 2 E Y , [rm ]) [rk1 ]
αi ∈ N , [ri ] ∈ 1 , w 2 ∈ ( N ∪ 1 ∪ 2 )∗ then we have
X [rm ]α1 [r1 ]α2 [r2 ] . . . αn [rn ] A 1 w 2 E Y ,
( X [rm ]α1 [r1 ]α2 [r2 ] . . . αn [rn ] A 1 w 2 E Y , [rm ]) [rk2 ]
X [rm ]α1 [rm ][r1 ]α2 [r2 ] . . . αn [rn ] A 1 w 2 E Y ,
( X [rm ]α1 [rm ][r1 ]α2 [r2 ] . . . αn [rn ] A 1 w 2 E Y , [rm ]) [rk2 ]
X [rm ]α1 [rm ][r1 ][rm ]α2 [r2 ] . . . αn [rn ] A 1 w 2 E Y ,
.. . ( X [rm ]α1 [rm ][r1 ][rm ]α2 [rm ][r2 ][rm ] . . . [rm ]αn [rm ][rn ][rm ] A 1 w 2 E Y , [ri ]) [ri ]
a
X [rm ]α1 [rm ][r1 ][rm ]α2 [rm ][r2 ][rm ] . . . [rm ]αn [rm ][rn ][rm ] A 1 [r i ] w 2 E Y . So with each terminal derivation S ⇒∗ w = a1 a2 . . . an ∈ T + , we can associate a derivation
( X S E Y , y 0 ) β1 x1 , . . . , (xi , y i ) [ri1 ] xi +1 , . . . , (x j , y j ) [rin ] x j +1 , . . . , (xn−1 , yn−1 ) βt xn a1
an
where no rule is applicable to xn . Moreover X S E Y , y 0 , y 1 , . . . yn−1 ∈ I and β1 , . . . , βt ∈ Lab \ {[r i ]a |r i : A 1 → a}. Also h(γ 1 [r i 1 ]a1 γ 2 [r i 2 ]a2 . . . γ n [r in ]an γ n+1 ) = a1 a2 . . . an where γ i ∈ ( Lab \ {[r i ]a |r i : A 1 → a})∗ (i = 1, 2, . . . , n + 1). Hence each w ∈ L (G ), can be represented as w = h( w 1 ) ∈ h( S Z 22,FIN (L RS )) where w 1 ∈ S Z 22,FIN (L RS ).
Now to prove the other inclusion h( S Z 22,FIN (L RS )) ⊆ L (G ) = L, let w ∈ h( S Z 22,FIN (L RS )). Hence w = h( w 1 ) where
w 1 ∈ S Z 22,FIN (L RS ). Since w 1 ∈ S Z 22,FIN (L RS ), i.e., concatenation of the labels of the applied splicing rules of a terminal derivation in L RS generates w 1 . Again, after splicing of the words X w 1 A 1 w 2 Y and [r i ] B 1 C 1 , r i ∈ 1 , the word X w 1 A 1 [r i ] B 1 C 1 w 2 Y is obtained.
( X w 1 A 1 w 2 Y , [ri ] B 1 C 1 ) [ri ] X w 1 A 1 [ri ] B 1 C 1 w 2 Y . 1
Also the splicing rules from (I), (II) cannot modify the subword A 1 [r i ]. Again this subword is used when the word X w 1 [rm ] A 1 [r i ] B 1 C 1 w 2 Y is spliced with [rm ].
( X w 1 [rm ] A 1 [ri ] B 1 C 1 w 2 Y , [rm ]) [rk2 ] X w 1 [rm ] A 1 [rm ][ri ] B 1 C 1 w 2 Y . After splicing of the words X w 1 [rm ] A 1 α3 w 2 Y and [r i ] ∈ 2 the word X w 1 [rm ] A 1 [r i ]α3 w 2 Y is obtained.
( X w 1 [rm ] A 1 α3 w 2 Y , [ri ]) [ri ] X w 1 [rm ] A 1 [ri ]α3 w 2 Y . a
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.10 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
10
The subword [rm ] A 1 [r i ] cannot be modified by the splicing rules in (I) and (II). Also this subword can be further modified after application of the [rk2 ] -rule.
( X w 1 [rm ] A 1 [ri ]α3 w 2 Y , [ri ]) [rk2 ] X w 1 [rm ] A 1 [rm ][ri ]α3 w 2 Y . Since the subwords A 1 [r i ] and [rm ] A 1 [r i ] only can be modified by the [rk2 ] splicing rule, then no extra derivation is possible. Again ( X S E Y , y 0 ) β1 x1 , (x1 , y 1 ) β2 x2 , . . . , (xn−1 , yn−1 ) βn xn be a derivation in L RS where βi ∈ {[r i ]1 |r i : A 1 → B 1 C 1 }(1 ≤ i ≤ n). Hence if x = u 1 v 1 u 2 v 2 . . . un v n where u i ∈ (αi [r i ])+ , αi ∈ N , r i ∈ 1 and v i ∈ N + , then there exists a derivation S ⇒∗ v 1 v 2 . . . v n in G. Again let there exist a derivation in L RS of the form:
(xi , y i ) βi+1 xi +1 , (xi +1 , y i +1 ) βi+2 xi +2 , . . . , (xi +k−1 , y i +k−1 ) βi+k xi +k , (xi +k , y i +k ) [ri1 ] xi +k+1 a1
where xi = u 1 v 1 u 2 v 2 . . . un v n , u i ∈ (αi [r i ])+ , αi ∈ N , r i ∈ 1 , v i ∈ N + , βi +1 , . . . , βi +k ∈ {[rk1 ] , [rk2 ] } and [r i 1 ]a1 -rule is the first time application of any rule from (II). Then there exists the corresponding derivation S ⇒∗ a1 v 1 v 2 . . . v n in G where v 1 ∈ N ∗ . So n-th time application of any rule from (II) corresponds to the derivation S ⇒∗ a1 a2 . . . an in G. Hence with each terminal derivation
( X S E Y , y 0 ) β1 x1 , . . . , (xi , y i ) [ri1 ] xi +1 , . . . , (x j , y j ) [rin ] x j +1 , . . . , (xn−1 , yn−1 ) βt xn a1
an
where no rule is applicable to xn and X S E Y , y 0 , . . . , yn−1 ∈ I ; β1 , . . . , βt ∈ Lab \ {[r i ]a |r i : A 1 → a} corresponds to the derivation S ⇒∗ a1 a2 . . . an in G. Again, h(γ1 [r i ]a1 γ2 [r i ]a2 . . . γn [r i ]an γn+1 ) = a1 a2 . . . an where γi ∈ ( Lab \ {[r i ]a |r i : A 1 → a})∗ . Hence h( S Z 22,FIN (L RS )) ⊆ L (G ). 2 In the next result, we show that any recursively enumerable language can be characterized by the homomorphic image of the Szilard language of the labeled restricted flat finite splicing systems of type (5, 2). We can prove the next theorem proceeding in the similar manner as Theorem 4.7 in [14]. Theorem 15. Each recursively enumerable language can be obtained as homomorphic image of the Szilard language of the labeled restricted flat finite splicing systems of type (5, 2). Proof. Let L ∈ R E and we know that any recursively enumerable language can be generated by a grammar G = ( N , T , S , P ) in Kuroda normal form, i.e., L (G ) = L. The rules of the grammar G are of the form A 1 → B 1 C 1 , A 1 B 1 → C 1 D 1 , A 1 → a, A 1 → λ where A 1 , B 1 , C 1 , D 1 ∈ N , a ∈ T . Any element x ∈ L can be generated by application of the rules A 1 → B 1 C 1 and A 1 B 1 → C 1 D 1 and then by left-most application of the context-free rules A 1 → a and A 1 → λ [8]. In this proof, a labeled restricted flat splicing system L RS = ( A , I , R , Lab) is constructed in such a manner that L = h( S Z 25,FIN (L RS )) where A ∩ Lab = ∅. Also, the labeled splicing rules in L RS are constructed by simulating the rules in P where each rule of P is associated with a unique label r i (1 ≤ i ≤ n) if | P | = n. The set contains all the labels of the rules in P and
= 1 ∪ 2 ∪ 3 ∪ 4 , where 1 = {ri | ri : A 1 → B 1 C 1 ∈ P }; 2 = {ri | ri : A 1 B 1 → C 1 D 1 ∈ P }; 3 = {ri | ri : A 1 → a ∈ P }; 4 = {ri | ri : A 1 → λ ∈ P }; Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system, where:
• A = { X , Y } ∪ N ∪ {[r i ] | r i ∈ 1 ∪ 2 } ∪ {[rm ]} ∪ {kai |r i : A 1 → a} ∪ {kλi |r i : A 1 → λ}; • I = { X S Y } ∪ {[r i ] B 1 C 1 |r i : A 1 → B 1 C 1 ∈ P } ∪ {[r i ]C 1 D 1 |r i : A 1 B 1 → C 1 D 1 ∈ P } ∪ {kai |r i : A 1 → a ∈ P } ∪ {kλi |r i : A 1 → λ ∈ P } ∪ {[r i ]|r i ∈ 1 ∪ 2 } ∪ {[rm ]}; • R contains the following rules: (R11 ) For each r i : A 1 → B 1 C 1 we have the following rules: r it :< ut |[r i ] − C 1 | v t > (t = 1, 2, . . . , 6), where [r i ] − C 1 = [r i ] B 1 C 1 , ut = A 1 ( j = 1, 2, . . . , 5) and
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.11 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
v 1 = Y , v 2 = α1 Y , α1 ∈ N ; v 3 = α1 α2 Y , α1 , α2 ∈ N ; v 4 = α1 α2 α3 Y , α1 , α2 , α3 ∈ N ; v 5 = α1 α2 α3 α4 Y where
α1 ∈ N , α2 ∈ N ∪ 1 , α3 ∈ N ∪ 1 ∪ 2 , α4 ∈ N ∪ 1 ∪ 2 , α2 α3 ∈/ (1 )(1 ∪ 2 ), α3 α4 ∈/ (1 ∪ 2 )(1 ∪ 2 ), v 6 = α1 α2 α3 α4 α5 Y ;
where
α1 ∈ N , α2 ∈ 2 , α3 ∈ N , α4 ∈ 1 and α2 = α5 .
(R12 ) For r i : A 1 B 1 → C 1 D 1 we add the following rules: r it :< ut |[r i ] − D 1 | v t >, (t = 7, 8, . . . , 15) where [r i ]C 1 D 1 = [r i ] − D 1 , ut = A 1 B 1 ; v t +6 = v t , (t = 1, 2, . . . , 6) The application of the rules r i13 , r i14 and r i15 in order also can simulate the rule r i : A 1 B 1 → C 1 D 1 :
r i13 :< A 1 | − [r i ]|α1 α2 >, α1 ∈ N , α2 ∈ 1 , r i14 :< [r i ]α1 β1 | − [r i ]|α2 α3 >, α1 ∈ N , α2 ∈ N , α3 ∈ 1 ∪ N , [r i ] ∈ 2 , β1 ∈ 1 , r i15 :< β1 [r i ] B 1 |[r i ] − D 1 |α1 α2 >, α1 ∈ N , α2 ∈ N ∪ {Y } ∪ 1 , [r i ] ∈ 2 , β1 ∈ 1 , [r i ]C 1 D 1 = [r i ] − D 1 .
(R13 ) For r i : A 1 → a: a1i :< X A 1 | − kai |Y >, ati :< ut | − kai | v t >, (t = 2, 3, . . . , 7) where ut = [rm ] A 1 and v t +1 = v t (t = 1, 2, . . . , 6). i i rm +1 :< [rm ] A 1 ka | − [rm ]|α1 α2 >, α1 ∈ N , α2 ∈ { Y } ∪ N ∪ 1 ∪ 2 .
(R14 ) For r i : A → λ: r i16 :< X A 1 | − kλi |Y >, r it :< ut | − kλi | v t >, (t = 17, 18, . . . , 22) where ut = [rm ] A 1 and v t +16 = v t (t = 1, 2, . . . , 6). i i rm +2 :< [rm ] A 1 kλ | − [rm ]|α1 α2 >, α1 ∈ N , α2 ∈ { Y } ∪ N ∪ 1 ∪ 2 .
(R15 ) rm :< X α1 β1 | − [rm ]|α2 >, α1 , α2 ∈ N , β1 ∈ 1 , rm+t :< [rm ]ut | − [rm ]| v t >, (t = 1, 2, . . . , 6) where u 1 = α1 α2 β1 , v 1 = α3 ; α1 , α2 , α3 ∈ N , β1 ∈ 2 , u 2 = α1 β1 , v 2 = α2 β2 β1 ; α1 , α2 ∈ N , β1 ∈ 2 , β2 ∈ 1 , u 3 = α1 β1 , v 3 = α2 α3 ; α1 ∈ N , α2 ∈ N , α3 ∈ N ∪ 1 ∪ 2 , β1 ∈ 1 , u 4 = α1 β1 β2 , v 4 = α2 β2 ; α1 , α2 ∈ N , β2 ∈ 2 , β1 ∈ 1 , u 5 = α1 β1 β2 , v 5 = α2 α3 β2 ; α1 ∈ N , α2 ∈ N , α3 ∈ 1 , β1 ∈ 1 , β2 ∈ 2 , u 6 = α1 β1 , v 6 = α2 α3 ; α1 , α2 ∈ N , α3 ∈ N ∪ 1 ∪ 3 ∪ 4 , β1 ∈ 2 .
• Lab = {r i1 , r i2 , r i3 , r i4 , r i5 , r i6 | r i ∈ 1 }
∪{ri7 , ri8 , ri9 , ri10 , ri11 , ri12 , ri13 , ri14 , ri15 | ri ∈ 2 } i ∪{a1i , a2i , a3i , a4i , a5i , a6i , a7i , rm + 1 | r i ∈ 3 } i ∪{ri16 , ri17 , ri18 , ri19 , ri20 , ri21 , ri22 , rm + 2 | r i ∈ 4 }
∪{rm , rm+1 , rm+2 , rm+3 , rm+4 , rm+5 , rm+6 }.
11
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.12 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
12
The homomorphism is defined in the following manner: h : ( Lab)∗ → T ∗ by h(a1i ) = h(a2i ) = h(a3i ) = h(a4i ) = h(a5i ) = h(a6i ) = h(a7i ) = a and h(l) = λ, for l ∈ Lab \ {a1i , a2i , a3i , a4i , a5i , a6i , a7i }. Here we give a summary of the proof of Theorem 15. The detailed simulation of the rules has been discussed in the appendix. Now in order to prove L = h( S Z 25,FIN (L RS )), we have to prove the inclusions L ⊆ h( S Z 25,FIN (L RS )) and h( S Z 25,FIN (L RS )) ⊆ L, i.e., we have to prove that any element of the recursively enumerable language L can be obtained as homomorphic image of the Szilard language of a labeled restricted flat finite splicing system L RS of type (5, 2). Moreover, no other word can be obtained as homomorphic image of the Szilard language of the labeled restricted flat finite splicing system L RS except the words from L.
(⊆). To prove the inclusion L = L (G ) ⊆ h( S Z 25,FIN (L RS )), let us assume that w ∈ L = L (G ). Now, w ∈ L can be generated at first by application of the rules r i : A 1 → B 1 C 1 and r i : A 1 B 1 → C 1 D 1 and then by left-most application of the context-free rules r i : A 1 → a and r i : A 1 → λ. Starting from X S Y if the rules in labeled flat splicing system L RS are applied in the same order, then a word over A is generated and no further computation will be possible. The concatenation of the labels of the applied rules generates a word w 1 ∈ ( Lab)+ . Hence, with each terminal derivation S ⇒∗ w = γ1 γ2 . . . γn ∈ T ∗ in G we can associate the following terminal derivation in L RS : k
ai 1
( X S Y , y 0 ) β1 x1 , . . . , (xr , yr )
1
k n
ai n
xr +1 , . . . , (xt , yt )
. . . , (xn−1 , yn−1 ) βn xn
where no rule is applicable to xn and X S Y , y 0 , . . . , yn−1 ∈ I . k k k k Again, h(ai 1 ) = γ1 , . . . , h(ai n ) = γn where ai 1 , . . . , ai n ∈ {a1i , . . . , a7i |r i ∈ 3 }, γi ∈ T (1 ≤ i ≤ n). So the concatenation of the 1
n
1
n
labels of the splicing rules obtains the string w 1 = δ1 ai 1 . . . δn ai n δn+1 where δ1 , δ2 , . . . , δn+1 ∈ ( Lab \ {a1i , . . . , a7i |r i ∈ 3 })∗ n 1 such that w = h( w 1 ). 5 Hence L = L (G ) ⊆ h( S Z 2,FIN (L RS )). k
k
(⊇). To prove the second inclusion h( S Z 25,FIN (L RS )) ⊆ L (G ) = L, let x ∈ h( S Z 25,FIN (L RS )). Hence there exists x1 ∈
S Z 25,FIN (L RS ) such that x = h(x1 ). The word x1 is obtained by concatenating the labels of a terminal derivation of L RS . Since, the flat splicing rules are simulated from the rules in G and no extra derivation is possible (discussed in detail in the appendix). So the application of the rules in G in the same order generates x ∈ T ∗ . In fact, each terminal derivation in L RS is of the form k
ai 1
( X S Y , y 0 ) β1 x1 , . . . , (xr , yr )
1
k n
ai n
xr +1 , . . . , (xt , yt )
. . . , (xn1 , yn−1 ) βn xn
where no rule is applicable to xn and X S Y , y 0 , . . ., yn−1 ∈ I . k k k k It corresponds to the derivation S ⇒∗ w = γ1 γ2 . . . γn ∈ T ∗ in G where h(ai 1 ) = γ1 , . . . , h(ai n ) = γn and ai 1 , . . . , ai n ∈ 1
n
1
n
{a1i , . . . , a7i |r i ∈ 3 }. k k Hence, h(δ1 ai 1 . . . δn ai n δn+1 ) = γ1 γ2 . . . γn where δ1 , δ2 , . . . , δn+1 ∈ ( Lab \ {a1i , . . . , a7i |r i ∈ 3 })∗ . So h( S Z 25,FIN (L RS )) ⊆ n 1 L (G ) = L. 2 Now we associate the idea of control languages with labeled restricted flat finite splicing systems. Unlike in the case of Szilard languages, the same label can be assigned to multiple rules but one rule cannot have multiple labels. We show that although there exist regular languages which cannot be Szilard language by any labeled flat finite splicing systems, any non-empty regular language can be obtained as control language of labeled flat finite splicing systems. Also, any non-empty context-free language can be obtained as control language of these systems and any recursively enumerable language can be obtained as control language when some rules are associated with label λ. 3.2. Comparisons of the families of the control language of labeled restricted flat splicing systems and families of the languages in Chomsky hierarchy We have proved that there exist some regular languages which cannot be Szilard language of any labeled restricted flat finite splicing systems. But in the next result, we prove that any non-empty regular language can be obtained as control language of labeled restricted flat finite splicing systems of type (1, 2). Theorem 16. (REG \ {λ}) ⊆ CLLS12,FIN . Proof. Let L be a λ-free regular language and there exists a grammar G = ( N , T , S , P ) such that L = L (G ). The non-terminals N of G are renamed as D i , 1 ≤ i ≤ n, starting from D 1 = S. Now, the rules in P are of the form D i → aD i , D i → aD j (i = j ), and D i → a, D i , D j ∈ N, and a ∈ T . In this proof we construct a labeled restricted flat splicing systems L RS such that L = L (G ) = C L 12,FIN (L RS ). Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where:
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.13 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
13
• A = { X , Y , D 1 , D 2 , . . . , D n } ∪ {Y a |a ∈ T }; • I = { X D 1 Y } ∪ {Y a D j | D i → aD j ∈ P } ∪ {Y a | D i → a ∈ P }; • The rules in R are of the following form: a :< D i |Y a − D j |Y > for each D i → aD j , D i , D j ∈ N , a ∈ T ; a :< D i | − Y a |Y > for each D i → a, a ∈ T .
• Lab = {a | D i → aD j , D i , D j ∈ N , a ∈ T } ∪ {a | D i → a, a ∈ T }. The context-free rules D i → aD j in G are simulated by the rule a :< D i |Y a − D j |Y >. Moreover, the derivation x1 D i x2 ⇒ x1 aD j x2 , has the following corresponding derivation in L RS :
( X w 1 D i Y , Y a D j ) a X w 1 D i Y a D j Y . The terminal rule D i → a is simulated by a :< D i | − Y a |Y >. So the derivation x1 D i x2 ⇒ x1 ax2 has the corresponding derivation
( X w 1 D i Y , Y a ) a X w 1 D i Y a Y in L RS . So any terminal derivation D 1 ⇒∗ x = a1 a2 . . . an ∈ T ∗ has a corresponding derivation
( X D 1 Y , y 0 ) a1 x1 , (x1 , y 1 ) a2 x2 , . . . , (xn−1 , yn−1 ) an X w n Y t Y where Y t ∈ {Y a | D i → a ∈ P } and no rule of R is applicable to the word X w n Y t Y . Moreover, X D 1 Y , y 0 , y 1 , . . . , yn ∈ I . Hence L (G ) ⊆ C L 12,FIN (L RS ). After application of the a-rules, the words Y a D j and Y a are inserted into X w Y , w ∈ ( N ∪ {Y a |a ∈ T })+ . No flat splicing rule from R is applicable to Y a D j and Y a and hence no extra derivation is possible. Again, from the one-to-one correspondence between the rules in P and labeled flat splicing rules in R we can say that each terminal derivation of the form
( X D 1 Y , y 0 ) a1 x1 , (x1 , y 1 ) a2 x2 , . . . , (xn−1 , yn−1 ) an xn = X w n Y where w n ∈ ( N ∪ {Y a |a ∈ T })+ and no rule is applicable to X w n Y and X D 1 Y , y 0 , . . . , yn−1 ∈ I has the corresponding derivation D 1 ⇒∗ a1 a2 . . . an when the rules in G are applied in the same order. Hence, we have the inclusion C L 12,FIN (L RS ) ⊆ L (G ). 2 Now we show that any non-empty context-free language can be obtained as a control language of the labeled restricted flat finite splicing systems of type (2, 2). Theorem 17. (C F \ {λ}) ⊆ CLLS22,FIN . Proof. Let L be a non-empty context-free language and G = ( N , T , S , P ) be a grammar in Greibach normal form such that L = L (G ). The rules in P are of the form, A 1 → aα and A 1 → a, where A 1 ∈ N , α ∈ N + , a ∈ T . The main idea of the proof is to construct a labeled restricted flat splicing system L RS = ( A , I , R , Lab) such that L = C L 22,FIN (L RS ) where C L 22,FIN (L RS ) denotes the control language of the labeled flat splicing systems L RS of type (2, 2). At first the rules in G are rewritten in the following manner: (1) Each distinct pair of rules A 1 → aα and B 1 → aβ where A 1 , B 1 ∈ N , α , β ∈ N + , are rewritten as: A 1 → ak α and B 1 → al β where k = l, k, l ∈ N . (2) Each distinct pair of rules of the form A 1 → a and B 1 → a where A 1 , B 1 ∈ N, are rewritten as A 1 → ak and B 1 → al where k = l, k, l ∈ N . (3) Also, if only one rule A 1 → aα , A 1 ∈ N , α ∈ N + , a ∈ T is present in G, then the rule is rewritten as A 1 → a1 α . Similarly, if there exists only one rule A 1 → a, A 1 ∈ N , a ∈ T , then it is rewritten as A 1 → a1 . Moreover, any two rules A 1 → aα and A 1 → a are rewritten as A 1 → ai α and A 1 → a j where i = j , i , j ∈ N . Now, we construct a labeled restricted flat splicing system which simulates the newly transformed rules. Let L RS = ( A , I , R , Lab) be a labeled restricted flat splicing system where:
• A = { X , Y } ∪ N ∪ { Y ai | A 1 → a i α ∈ P } ∪ { Y ai | A 1 → a i ∈ P }; • I = { X S Y } ∪ { Y ai α | A 1 → a i α ∈ P } ∪ { Y ai | A 1 → a i ∈ P }; • R contains the following rules: (I) For each A 1 → ai α : a :< X S |Y ai − β|Y > where Y ai − β = Y ai α ∈ I , β ∈ N , ai ∈ T ;
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.14 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
14
a :< Y a j A 1 |Y ai − β|α2 >, where A 1 ∈ N , α2 ∈ N ∪ {Y }, Y ai − β = Y ai α ∈ I , β ∈ N , ai , a j ∈ T . (II) For each A 1 → ai : a :< X S | − Y ai |Y >, ai ∈ T ; a :< Y a j A 1 | − Y ai |α2 >, A 1 ∈ N , α2 ∈ N ∪ {Y }, ai , a j ∈ T where i , j ∈ N . • Lab = {a| A 1 → ai α } ∪ {a| A 1 → ai }; (⊆) We first prove that L (G ) = L ⊆ C L 22,FIN (L RS ). Any element x ∈ L can be generated after application of the contextfree rules A 1 → ai α , α ∈ N + and A 1 → a in P . The derivation x1 A 1 x2 ⇒ x1 ai α x2 has the corresponding derivations in L RS :
( X S Y , Y ai α ) a X S Y ai α Y ( X w 1 Y a j A 1 w 2 Y , Y ai α ) a X w 1 Y a j A 1 Y ai α w 2 Y where w 2 ∈ N ∗ ∪ {λ}. So whenever a rule A 1 → ai α is applied in a derivation in G, there exists a corresponding derivation in L RS where the a-rule is applied to splice the strings X w Y , w ∈ ( N ∪ {Y ai |ai ∈ T })+ and Y ai α . Moreover after application of the a-rule, the word Y ai α is inserted into the word X w Y . Similarly, any derivation of the form x1 A 1 x2 ⇒ x1 ai x2 in G, has the following corresponding derivations in L RS :
( X S Y , Y ai ) a X S Y ai Y ( X w 1 Y a j A 1 w 2 Y , Y ai ) a X w 1 Y a j A 1 Y ai w 2 Y where w 2 ∈ N ∗ ∪ {λ}. The string x ∈ L (G ) is obtained by application of the rules in G. If the flat splicing rules simulating the rules in G are applied in the same order starting from X S Y , a string over A is generated where no rule can be applied further, i.e., a terminal derivation is obtained. In fact, with each terminal derivation S ⇒∗ x = a1 a2 . . . an ∈ T + , we can associate a terminal derivation
( X S Y , y 0 ) a1 x1 , (x1 , y 1 ) a2 x2 , . . . , (xn−1 , yn−1 ) an xn where no rule is applicable to the word xn and X S Y , y 0 , y 1 , . . . yn−1 ∈ I . Also, concatenation of the labels of the flat splicing rules generates the string x. Hence L (G ) = L ⊆ C L 22,FIN (L RS ).
(⊇) The a-rule simulating A 1 → ai α inserts the word Y ai α into the word X w Y , w ∈ ( N ∪ {Y ai |ai ∈ T })+ . Similarly, a-rule simulating A 1 → ai inserts Y ai into X w Y . Let w 1 ∈ C L 22,FIN (L RS ), i.e., there exists a terminal derivation in L RS such that the concatenation of the labels of the splicing rules generates w 1 . If the rules in G are applied in the same order as in the terminal derivation of L RS generating w 1 , the string w 1 is generated again. So each terminal derivation
( X S Y , y 0 ) a1 x1 , (x1 , y 1 ) a2 x2 , . . . (xn−1 , yn−1 ) an xn where no rule from R is applicable to xn and X S Y , y 0 , . . . , yn−1 ∈ I corresponds to the derivation S ⇒∗ a1 a2 . . . an in G. This will imply C L 22,FIN (L RS ) ⊆ L. 2 In the next theorem, we show that if some of the rules in L RS are labeled with λ, then any recursively enumerable language can be obtained as a control language of the labeled restricted flat finite splicing systems of type (5, 2). Theorem 18. R E = C L λ L S 25,FIN . Proof. The inclusion C L λ L S 25,FIN ⊆ R E follows from the Church-Turing thesis. It only remains to prove the inclusion R E ⊆ C L λ L S 25,FIN . The proof of this inclusion follows from the proof of the Theorem 15. If all the labels of the rules of Theorem 15 except a1i , a2i , a3i , a4i , a5i , a6i and a7i for each r i : A 1 → a are replaced with λ and the a1i , a2i , a3i , a4i , a5i , a6i and a7i labeled rules are replaced by a, then by following the same procedure as in Theorem 15 we can prove that R E ⊆ C L λ L S 25,FIN . 2 4. Conclusion In this work, we compared the families of Szilard and control languages of labeled restricted flat splicing systems with the families of languages in the Chomsky hierarchy. We proved that the families of Szilard language of labeled restricted flat finite splicing systems and families of regular, context-free and context-sensitive languages are incomparable. Also, any non-empty regular and context-free language can be obtained as Szilard language of these systems when a homomorphism is applied. Furthermore, any recursively enumerable language can be obtained as homomorphic image of Szilard language of labeled restricted flat finite splicing system of type (5, 2). We also proved that any non-empty regular and context-free language can be obtained as control language by labeled restricted flat finite splicing systems and any recursively enumerable
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.15 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
15
language can be obtained as control language if some of the rules can be labeled with the empty label (i.e., λ). It remains to be investigated whether the bounds mentioned in this paper are optimal. Also it remains to investigate whether the following problems are decidable for any regular language R: (1) R ⊆ S Z nm,FIN (L RS ). (2) S Z nm,FIN (L RS ) ⊆ R. (3) S Z nm,FIN (L RS ) = R. Furthermore, comparing the families of control languages of labeled restricted flat finite splicing systems and contextsensitive languages can be a direction of future research. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Acknowledgement First author acknowledges the fund received from Indian Statistical Institute, Kolkata, West Bengal, India. Appendix A Extended proof of Theorem 15: (1) Simulation of r i : A 1 → B 1 C 1 using r i1 , r i2 , r i3 , r i4 , r i5 -rule: For each r i : A 1 → B 1 C 1 there exist r i1 , r i2 , r i3 , r i4 and r i5 -rule. Moreover, after application of these rules depending on the contexts, the words X w 1 A 1 w 2 Y and [r i ] B 1 C 1 are spliced together and the word X w 1 A 1 [r i ] B 1 C 1 w 2 Y is obtained where w 1 , w 2 ∈ ( N ∪ ∪ [rm ])∗ . So the derivation x1 A 1 x2 ⇒ x1 B 1 C 1 x2 has the corresponding derivation in L RS : 1
2
3
4
5
( X w 1 A 1 w 2 Y , [ri ] B 1 C 1 ) ri ,ri ,ri ,ri ,ri X w 1 A 1 [ri ] B 1 C 1 w 2 Y
(A.1)
Lemma 1. No rule from R 11 , R 12 , R 13 and R 14 is applicable to the subword A 1 [r i ] obtained after application of the rules in R 11 simulating r i : A 1 → B 1 C 1 . The left and right contexts of the rules in R 11 , R 12 , R 13 and R 14 prevent application of any splicing rule such that the subword A 1 [r i ] is modified. But rules from ( R 15 ) are applicable to the subword [rm ] A 1 [r i ] obtained during identification of the leftmost non-terminal symbol where the rules from R 13 and R 14 are applicable. We discuss about it in (9). (2) Simulation of r i : A 1 B 1 → C 1 D 1 using r i7 , r i8 , r i9 , r i10 and r i11 -rule: For each r i : A 1 B 1 → C 1 D 1 there exist r i7 , r i8 , r i9 , r i10 and r i11 -rule. These rules splice the strings X w 1 A 1 B 1 w 2 Y and [r i ]C 1 D 1 where w 1 , w 2 ∈ ( N ∪ ∪ [rm ])∗ . So for each derivation x1 A 1 B 1 x2 ⇒ x1 C 1 D 1 x2 we have the following derivation in L RS : 7
8
9
10
( X w 1 A 1 B 1 w 2 Y , [ri ]C 1 D 1 ) ri ,ri ,ri ,ri
,r i11
X w 1 A 1 B 1 [r i ]C 1 D 1 w 2 Y
(3) Simulation of r i : A 1 B 1 → C 1 D 1 in a word of the form X w 1 A 1 α1 [r1 ] N , [r1 ], . . . , [rn ] ∈ 1 , w 1 , w 2 ∈ ( N ∪ ∪ [rm ])∗ using r i13 , r i14 and r i15 -rule:
(A.2)
α2 [r2 ] . . . αn [rn ] B 1 w 2 Y where α1 , . . . , αn ∈
( X w 1 A 1 α1 [r1 ]α2 [r2 ] . . . αn [rn ] B 1 w 2 Y , [ri ]) 13
ri
X w 1 A 1 [r i ]α1 [r1 ]α2 [r2 ] . . . αn [rn ] B 1 w 2 Y
( X w 1 A 1 [ri ]α1 [r1 ]α2 [r2 ] . . . αn [rn ] B 1 w 2 Y , [ri ]) 14
ri X w 1 A 1 [ri ]α1 [r1 ][ri ]α2 [r2 ] . . . αn [rn ] B 1 w 2 Y .. . ( X w 1 A 1 [ri ]α1 [r1 ][ri ]α2 [r2 ] . . . [ri ]αn [rn ] B 1 w 2 Y , [ri ]) 14
ri
X w 1 A 1 [r i ]α1 [r1 ][r i ]α2 [r2 ] . . . [r i ]αn [rn ][r i ] B 1 w 2 Y
( X w 1 A 1 [ri ]α1 [r1 ][ri ]α2 [r2 ] . . . [ri ]αn [rn ][ri ] B 1 w 2 Y , [ri ]C 1 D 1 ) 15
ri
X w 1 A 1 [r i ]α1 [r1 ][r i ]α2 [r2 ] . . . [r i ]αn [rn ][r i ] B 1 [r i ]C 1 D 1 w 2 Y
(A.3)
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.16 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
16
Lemma 2. No rule from R 11 , R 12 , R 13 and R 14 is applicable to A 1 [r i ]α1 [r1 ][r i ]α2 [r2 ] . . . [r i ]αn [rn ][r i ] B 1 [r i ] obtained after simulation of the rule r i : A 1 B 1 → C 1 D 1 . (4) Application of the r 6j and rk12 -rule for r i : A 1 B 1 → C 1 D 1 :
After the simulation of r i : A 1 B 1 → C 1 D 1 , a word X w 1 A 1 [r i ]α1 [r1 ][r i ] . . . αn [rn ][r i ] B 1 [r i ] w 2 Y , w 1 , w 2 ∈ ( N ∪ ∪ {[rm ]})+ is obtained. If w 1 = w 1 A 2 , w 1 ∈ ( N ∪ ∪ {[rm ]})∗ and there exists a rule r j : A 2 → B 2 C 2 , then the application of the rule is simulated in the following manner
( X w 1 A 2 A 1 [ri ]α1 [r1 ][ri ] . . . αn [rn ][ri ] B 1 [ri ] w 2 Y , [r j ] B 2 C 2 ) r 6j
X w 1 A 2 [r j ] B 2 C 2 A 1 [r i ]α1 [r1 ][r i ] . . . αn [rn ][r i ] B 1 [r i ] w 2 Y .
(A.4)
Also in the similar manner we can simulate the rule rk : A 2 B 2 → C 2 D 2 by the rule in the following manner by splicing of the words X w 1 A 2 B 2 A 1 [r i ]α1 [r1 ][r i ]α2 [r2 ][r i ] . . . αn [rn ][r i ] B [r i ] w 2 Y and [rk ]C 2 D 2 where w 1 , w 2 ∈ ( N ∪ ∪[rm ])∗ . rk12 -rule
( X w 1 A 2 B 2 A 1 [ri ]α1 [r1 ][ri ]α2 [r2 ][ri ] . . . αn [rn ][ri ] B [ri ] w 2 Y , [rk ]C 2 D 2 ) 12
rk
X w 1 A 2 B 2 [rk ]C 2 D 2 A 1 [r i ]α1 [r1 ][r i ]α2 [r2 ][r i ] . . . αn [rn ][r i ] B [r i ] w 2 Y .
(A.5)
Lemma 3. No rule in R 11 , R 12 , R 13 and R 14 is applicable to the subword A 1 B 1 [r i ] obtained after application of the rules in R 12 simulating r i : A 1 B 1 → C 1 D 1 . Similarly as above the context of the rules in R 11 , R 12 , R 13 and R 14 prevents any modification of the subword A 1 B 1 [r i ]. But the rules in ( R 15 ) are applicable to the subword [rm ] A 1 B 1 [r i ] obtained during the computation. It is discussed in (9). (5) Simulation of r i : A 1 → a using the a2i , a3i , a4i , a5i , a6i , a7i -rule: For each r i : A 1 → a there exist a2i , a3i , a4i , a5i , a6i and a7i -rule which splice the words X w 1 [rm ] A 1 w 2 Y and kai . Hence each derivation x1 A 1 x2 ⇒ x1 ax2 corresponds to the following derivation: 2
3
4
5
6
7
( X w 1 [rm ] A 1 w 2 Y , kai ) ai ,ai ,ai ,ai ,ai ,ai X w 1 [rm ] A 1kai w 2 Y
(A.6)
Similarly, the rule r i : A 1 → λ can be simulated by application of the
r i17 , r i18 , r i19 , r i20 ,
r i21
and
r i22 -rule.
(6) Application of a1i -rule and r 16 -rule: j j
-rule for each r j : A 2 → λ are applicable to the words X A 1 Y , kai and X A 2 Y , kλ The a1i -rule for each r i : A 1 → a and r 16 j respectively. 1
( X A 1 Y , kai ) ai X A 1kai Y j
r 16 j
( X A 2 Y , kλ )
(A.7)
j
X A 2 kλ Y
(A.8)
(7) Application of a7j -rule for a j : A 3 → a and rl22 -rule for rl : A 4 → λ: The application of the a7j -rule for a j : A 3 → a and rl22 -rule for rl : A 4 → λ can be simulated by splicing of the j X w 1 A 3 A 1 [r i ] 1 [r1 ][r i ] . . . n [rn ][r i ] B 1 [r i ] w 2 Y , ka and X w 1 A 4 A 1 [r i ] 1 [r1 ][r i ] . . . n [rn ][r i ] B 1 [r i ] w 2 Y , klλ respectively
α
α
α
α
words in the
following manner: j
( X w 1 A 3 A 1 [ri ]α1 [r1 ][ri ] . . . αn [rn ][ri ] B 1 [ri ] w 2 Y , ka ) a7j
j
X w 1 A 3 ka A 1 [r i ]α1 [r1 ][r i ] . . . αn [rn ][r i ] B 1 [r i ] w 2 Y
(A.9)
l
( X w 1 A 4 A 1 [ri ]α1 [r1 ][ri ] . . . αn [rn ][ri ] B 1 [ri ] w 2 Y , kλ ) 22
rl
X w 1 A 4 klλ A 1 [r i ]α1 [r1 ][r i ] . . . αn [rn ][r i ] B 1 [r i ] w 2 Y
(A.10) j
Lemma 4. No rule from R 11 , R 12 , R 13 and R 14 is applicable to A 3 ka and A 4 klλ obtained after application of the rules simulating r j : A 3 → a and rl : A 4 → λ. The flat splicing rules simulating the terminal rules r i : A 1 → a and r j : A 1 → λ are constructed in such a manner that the left-most non-terminal is identified by the marker X and the symbol [rm ] and then the splicing is performed. This j i process is performed by application of the rm +1 and rm+2 -rule and the rules in ( R 15 ). j
i (8) Application of rm +1 -rule for r i : A 1 → a and rm+1 -rule for r j : A 2 → λ:
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.17 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
17 j
The rules a2i , . . . , a7i and r i17 , . . . , r i22 simulate the rules r i : A 1 → a and r j : A 2 → λ. Moreover [rm ] A 1 kai and [rm ] A 2 kλ are obtained after application of these rules. To proceed the computation further j
X w 1 [rm ] A 1 kai
i rm +1 -rule
and
j rm+2 -rule
are applied.
These rules are applicable to the words α1 α2 w 2 Y and X w 1 [rm ] A 2kλ α1 α2 w 2 Y respectively where w 1 , w 2 ∈ ( N ∪ ∪ {[rm ]})∗ , α1 ∈ N , α2 ∈ N ∪ 1 ∪ 2 . This can be done by splicing the words X w 1 [rm ] A 1 kai α1 α2 w 2 Y and j
X w 1 [rm ] A 2 ka α1 α2 w 2 Y with [rm ]. i
( X w 1 [rm ] A 1kai α1 α2 w 2 Y , [rm ]) rm+1 X w 1 [rm ] A 1kai [rm ]α1 α2 w 2 Y j
j
r m +2
( X w 1 [rm ] A 2kλ α1 α2 w 2 Y , [rm ])
(A.11)
j
X w 1 [rm ] A 2 kλ [rm ]α1 α2 w 2 Y
(A.12) j
Lemma 5. No rule from R 11 , R 12 , R 13 , R 14 and R 15 is applicable to the subwords [rm ] A 1 kai and [rm ] A 2 kλ . The symbol [rm ] helps the system to identify the leftmost non-terminal where the rules a2i , . . . , a7i and r i17 , . . . , r i22 can be applied. The identification process is performed by the rm , rm+1 , rm+2 , rm+3 , rm+4 , rm+5 and rm+6 -rule. (9) Application of rm , rm+1 , rm+2 , rm+3 , rm+4 , rm+5 , rm+6 -rule: The context-free rules r i : A 1 → a and r i : A 1 → λ are applied in leftmost manner and the corresponding flat splicing rules are constructed to simulate this process. To identify the leftmost non-terminal rm -rule is applied first.
( X A [ri ]α w 2 Y , [rm ]) rm X A [ri ][rm ]α w 2 Y
(A.13)
Again the subword A 1 [r i ] is obtained after application of the rules in ( R 11 ) in the word X w 1 [rm ] A 1 [r i ] w 2 Y , w 1 , w 2 ∈ ( N ∪ ∪ {[rm ]})∗ where r i : A 1 → B 1 C 1 . Only rm+3 -rule is applicable to the subword [rm ] A [r i ]:
( X w 1 [rm ] A 1 [ri ] w 2 Y , [rm ]) rm+3 X w 1 [rm ] A 1 [ri ][rm ] w 2 Y . Moreover, after simulation of the rule r i : A 1 B 1 → C 1 D 1 using the r i7 , r i8 , r i9 , r i10 and r i11 -rule we have a word X w 1 A 1 B 1 [r i ] w 2 Y , w 1 , w 2 ∈ ( N ∪ ∪ [rm ])+ . The subword A 1 B 1 [r i ] becomes inactive, i.e., no rule is applicable to the subword. But it becomes active again when the subword [rm ] A 1 B 1 [r i ] is obtained.
( X w 1 [rm ]αk [rk ] A 1 B 1 [ri ] w 2 Y , [rm ]) rm+3 X w 1 [rm ]αk [rk ][rm ] A 1 B 1 [ri ] w 2 Y ( X w 1 [rm ]αk [rk ][rm ] A 1 B 1 [ri ] w 2 Y , [rm ]) rm+1 X w 1 [rm ]αk [rk ][rm ] A 1 B 1 [ri ][rm ] w 2 Y
(A.14)
Also, after simulation of the rule r i : A 1 B 1 → C 1 D 1 , the word X w 1 A 1 [r i ] α1 [r1 ][r i ]α2 [r2 ][r i ] . . . [r i ]αn [rn ][r i ] B 1 [r i ]C 1 D 1 w 2 Y where αi ∈ N , [r i ] ∈ 1 , w 1 , w 2 ∈ ( N ∪ ∪ {[rm ]})+ is obtained. So, the computation proceeds in the following manner when a word X w 1 [rm ]α0 [r0 ] A 1 [r i ]α1 [r1 ][r i ]α2 [r2 ][r i ] . . . [r i ] αn [rn ] [r i ] B 1 [r i ] w 2 Y is obtained.
( X w 1 [rm ]α0 [r0 ] A 1 [ri ]α1 [r1 ][ri ]α2 [r2 ][ri ] . . . [ri ]αn [rn ][ri ] B 1 [ri ] w 2 Y , [rm ]) rm+3 X w 1 [rm ]α0 [r0 ][rm ] A 1 [ri ]α1 [r1 ][ri ]α2 [r2 ][ri ] . . . [ri ]αn [rn ][ri ] B 1 [ri ] w 2 Y ; ( X w 1 [rm ]α0 [r0 ][rm ] A 1 [ri ]α1 [r1 ][ri ]α2 [r2 ][ri ] . . . [ri ]αn [rn ][ri ] B 1 [ri ] w 2 Y , [rm ]) rm+2 X w 1 [rm ]α0 [r0 ][rm ] A 1 [ri ][rm ]α1 [r1 ][ri ]α2 [r2 ][ri ] . . . [ri ]αn [rn ][ri ] B 1 [ri ] w 2 Y ; ( X w 1 [rm ]α0 [r0 ][rm ] A 1 [ri ][rm ]α1 [r1 ][ri ]α2 [r2 ][ri ] . . . [ri ]αn [rn ][ri ] B 1 [ri ] w 2 Y , [rm ]) rm+5 X w 1 [rm ]α0 [r0 ][rm ] A 1 [ri ][rm ]α1 [r1 ][ri ][rm ]α2 [r2 ][ri ] . . . [ri ]αn [rn ][ri ] B 1 [ri ] w 2 Y ; So after repeated application of the rm+5 -rule, the word X w 1 [rm ]α0 [r0 ][rm ] A 1 [r i ] [rm ]α1 [r1 ][r i ][rm ]α2 [r2 ][r i ][rm ] . . . [r i ]
[rm ]αn [rn ][r i ] B 1 [r i ] w 2 Y is obtained.
( X w 1 [rm ]α0 [r0 ][rm ] A 1 [ri ][rm ]α1 [r1 ][rm ][ri ]α2 [r2 ][ri ][rm ] . . . [ri ][rm ]αn [rn ][ri ] B 1 [ri ] w 2 Y , [rm ]) rm+4 X w 1 [rm ]α0 [r0 ][rm ] A 1 [ri ][rm ]α1 [r1 ][rm ][ri ]α2 [r2 ][ri ][rm ] . . . [ri ][rm ]αn [rn ] [ri ][rm ] B 1 [ri ] w 2 Y ; ( X w 1 [rm ]α0 [r0 ][rm ] A 1 [ri ][rm ]α1 [r1 ][rm ][ri ]α2 [r2 ][ri ][rm ] . . . [ri ][rm ]αn [rn ][ri ][rm ] B 1 [ri ] w 2 Y , [rm ]) rm+6 X w 1 [rm ]α0 [r0 ][rm ] A 1 [ri ][rm ]α1 [r1 ][rm ][ri ]α2 [r2 ][ri ] . . . [ri ][rm ]αn [rn ][ri ] [rm ] B 1 [ri ][rm ] w 2 Y ;
(A.15)
From the above derivations we know that after simulating the rules, subwords of the form A 1 [r i ], A 1 B 1 [r i ], A 1 [r i ]α1 [r1 ][r i ]α2 [r2 ] . . . [r i ]αn [rn ][r i ] B 1 [r i ], A 1 kai and A 1 kλi are obtained. Moreover, these subwords become active again when the
JID:TCS
AID:12209 /FLA
Doctopic: Theory of natural computing
[m3G; v1.261; Prn:17/10/2019; 15:51] P.18 (1-18)
P. Paul, K.S. Ray / Theoretical Computer Science ••• (••••) •••–•••
18
subwords [rm ] A 1 [r i ], [rm ] A 1 B 1 [r i ], [rm ] A 1 kai , [rm ] A 1 [r i ]α1 [r1 ][r i ]α2 [r2 ] . . . [r i ]αn [rn ][r i ] B 1 [r i ] and [rm ] A 1 kλi are obtained. Also the flat splicing rules are constructed in such a manner that no extra derivation is possible. Hence, for each terminal derivation in G, there exists a corresponding derivation in L RS and similarly each terminal derivation in L RS has a corresponding terminal derivation in G. References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21]
J. Berstel, L. Boasson, I. Fagnot, Splicing systems and the Chomsky hierarchy, Theor. Comput. Sci. 436 (2012) 2–22. R. Ceterchi, L. Pan, B. Song, K.G. Subramanian, Matrix flat splicing systems, in: BIC-TA 2016, in: CCIS, vol. 681, 2017, pp. 54–63. K. Culik II, T. Harju, Splicing semigroups of dominoes and DNA, Discrete Appl. Math. 31 (1991) 261–277. L. Cojocaru, E. Mäkinen, On some derivation mechanisms and the complexity of their Szilard languages, Theor. Comput. Sci. 537 (2014) 87–96. R. Freund, L. Kari, G. P˘aun, DNA computing based on splicing: the existence of universal computers, Theory Comput. Syst. 32 (1999) 69–112. K. Mahalingam, P. Paul, E. Mäkinen, On derivation languages of a class of splicing systems, Acta Cybern. 23 (2018) 1–13. K. Mahalingam, P. Paul, B. Song, L. Pan, K.G. Subramanian, Derivation languages of splicing P systems, in: BIC-TA 2017, in: CCIS, vol. 791, 2017, pp. 487–501. C. Martin-Vide, G. P˘aun, A. Salomaa, Characterizations of recursively enumerable languages by means of insertion grammars, Theor. Comput. Sci. 2005 (1998) 195–205. G. P˘aun, DNA computing based on splicing: universality results, Theor. Comput. Sci. 231 (2000) 275–296. G. P˘aun, Splicing systems with targets are computationally universal, Inf. Process. Lett. 59 (3) (1996) 129–133. G. P˘aun, G. Rozenberg, A. Salomaa, DNA Computing: New Computing Paradigms, Springer-Verlag, 1998. G. P˘aun, On some families of Szilard languages, Bull. Math. Soc. Sci. Math. Rép. Soc. Roum. 27 (75) (1983) 259–265. L. Pan, B. Song, A.K. Nagar, K.G. Subramanian, Language generating alphabetic flat splicing P systems, Theor. Comput. Sci. 724 (2018) 28–34, https:// doi.org/10.1016/j.tcs.2017.12.014. P. Paul, On Szilard languages of labelled insertion grammars, Fundam. Inform. (2019), https://doi.org/10.3233/FI-2019-1800, in press. G. Rozenberg, A. Salomaa (Eds.), Handbook of Formal Languages, vol. 1, Springer, Berlin, 1997. A. Ramanujan, K. Krithivasan, Control words of transition P systems, in: BIC-TA 2012, in: Adv. in Intell. Syst. and Comp., vol. 201, Springer, India, 2013. A. Ramanujan, K. Krithivasan, Control languages associated with tissue P systems, in: UCNC 2013, in: LNCS, vol. 7956, Springer, Berlin, Heidelberg, 2013. A. Ramanujan, K. Krithivasan, Control languages associated with spiking neural P systems, Rom. J. Inf. Sci. Technol. 15 (4) (2012) 301–318. G. Samdanielthompson, N.G. David, K.G. Subramanian, Alphabetic flat splicing pure context-free grammar systems, J. Math. Inform. 7 (2017) 1–6. G. Samdanielthompson, N.G. David, A.K. Nagar, K.G. Subramanian, Flat splicing array grammar systems generating picture arrays, Int. J. Comput. Inform. Syst. Ind. Manag. Appl. 8 (2016) 336–344. X. Zhang, Y. Liu, B. Luo, L. Pan, Computational power of tissue P systems for generating control languages, Inf. Sci. 2014 (2014) 285–297.