Remarks on Simple Eco-Grammar Systems with ... - Semantic Scholar

1 downloads 0 Views 255KB Size Report
step in Σ according to the team Qi = {Ri1 ,...,Risi }, 1 ≤ si ≤ n and 1 ≤ i ≤ m, if u = x0A1x1 ...... xi1,li1 → wi1,li1 ∈ Ri1,...,xiqi,liqi → wiqi,liqi ∈ Riqi . We define ...
Remarks on Simple Eco-Grammar Systems with Prescribed Teams ¨ DIETMAR WATJEN Institut fu ¨r Theoretische Informatik Technische Universit¨at Braunschweig Postfach 3329, D-38023 Braunschweig, Germany e-mail: [email protected]

Abstract. In this paper, the simple eco-grammar systems with prescribed teams of ter Beek [2] are reconsidered. We show that limited L systems can be simulated by such systems. Furthermore, we introduce the concept of programming which is imposed upon the prescribed teams of the systems. Depending on the success of the application of a team to the actual state of the system, it is specified which teams are allowed to be applied in the next step. By this mean, the generative power of the systems, at least for the non-extended case, can be enlarged. The corresponding language families are compared with each other according to the different underlying L systems (0L, T0L, etc.) of the systems and also with the language families given by the simple eco-grammar systems with prescribed teams. Some strict inclusions could be proved which were noted to be open in [2]. Keywords: Formal languages, Lindenmayer systems, eco-grammar systems, prescribed teams, programmed teams

1

Introduction

Eco-grammar systems have been introduced in [3] to model the interaction between an eco-system and the organisms living in it. An eco-system can be seen as a special multi-agent system where the agents not only interact with each other but also with their common shared environment. In the approach given in [3] and [4], an eco-grammar system consists of a Lindenmayer system which acts in parallel on the environment and of several agents which change the environment only at one position. In the original model, the choice of an acting rule of an agent usually depends on the actual state of the environment. In this paper we consider simple eco-grammar systems that is systems where the agents, independently of the actual state, can execute all possible actions on the environment. Furthermore, we assume that there exist teams of agents. Teams of agents in simple eco-grammar systems have already been considered in [1], [2], [5], [6], or [12]. In such a case, the behaviour of an eco-grammar system depends on the total number of its agents and on the number of agents in an active team. In a certain sense we can say 1

that simple eco-grammar systems are Lindenmayer systems with teams. In [5], there have been investigated teams with a fixed size. This means that the teams of a system consist of all possible teams of a fixed size that can be formed by the agents. In [6], there are considered dynamical teams which are formed according to the actual capability of activating the agents. In [12], there are allowed different sizes of the teams at different steps of the development where the size depends on the number of derivation steps which have already been carried out since the beginning of the development with the initial state. In [2], prescribed teams are investigated. This means that a system possesses a fixed set of teams which may have different sizes. Two different modes of derivation are considered. It has been shown in [2], that prescribed teams really increase the generative power of the underlying L systems. Indeed, if ET0L systems are underlying, only ε-free productions are allowed and the derivation is carried out in a certain weak mode, then the generated language family coincides with the family of languages generated by εfree programmed grammars with appearance checking. If ε-productions are allowed, then the family of recursively enumerable languages is generated. In Section 3 of this paper, we show that k-limited and uniformly k-limited L systems (see [10], [11]) can be simulated by simple eco-grammar systems with prescribed teams. In Section 4, we define simple eco-grammar systems with programmed prescribed teams which are investigated in the remainder of the paper. Similar to a programmed grammar, for every team Q there are defined success and failure fields σ(Q) and µ(Q) which determine depending on the success of the application of Q to the actual state of the system, which teams are allowed to be applied as the next team. These systems can simulate the simple eco-grammar systems with prescribed teams of [2]. We show in Section 5 that with this concept of programmed prescribed teams we get more comprehensive language families if the underlying L systems are 0L or P0L systems. Furthermore, we see that by using T0L instead of 0L systems as underlying systems we also increase the generative power of the simple eco-grammar systems. This is true for each of the three cases of systems, that is systems with prescribed teams according to the weak mode of derivation or according to the strong mode or of systems with programmed prescribed teams. An analogous result holds if we introduce a terminal alphabet, that is if we consider E0L or ET0L instead of 0L or T0L systems as underlying systems. For the non-programmed systems, these strict inclusion results still remained open in [2]. If the underlying systems are ET0L systems, then in Section 6 we see that in the ε-free case, the generated language family coincides with the family of languages generated by ε-free programmed grammars with appearance checking while if ε-productions are allowed, then we get the family of recursively enumerable languages. That is, in this case we get the same results as for systems with non-programmed prescribed teams in the weak mode.

2

Preliminary definitions

N

N

In the following, we denote by the set of all natural numbers (where 0 6∈ ). Then = ∪ {0}. Furthermore, let denote the set of all integers. For an alphabet V 0 0 ∗ and a ∈ V , V j V , w ∈ V , we set |w| to be the length of the word w, #a w to be the number of occurrences of a in w and #V 0 w to be the number of occurrences of symbols

N

N

Z

2

of V 0 in w. The empty word is written as ε. We assume that the reader is familiar with the fundamental definitions of formal language theory (e.g. see [9]). We recall the notion of an extended tabled simple ecogrammar system with prescibed teams of degree n, n ∈ , as given in [2] (abbreviated as PTETSEGn system). It is a construct

N

Σ = (E, R1 , . . . , Rn , Q1 , . . . , Qm ) where E = (VE , TE , PE , ω) is an ET0L system with alphabet VE , terminal alphabet TE j VE , a finite set PE of tables h over VE where each table h consists of a finite set of rewriting rules or productions a → v with a ∈ VE , w ∈ VE∗ such that for each a ∈ VE there exists a rule a → v in h (i.e., h is complete), and ω is the axiom. R1 , . . . , Rn are sets of context-free rules or productions a → v with a ∈ VE , w ∈ VE∗ . Every Qj , j = 1, . . . , m, is a nonempty set of the agents R1 , . . . , Rn , called a prescribed team of agents. VE is the set of symbols describing the environment, the tables h ∈ PE are sets of developmental rules of the environment and every Ri , i ∈ {1, . . . , n}, is the set of action rules of the i-th agent. A word w ∈ VE∗ is also called a state of the environment. Note that the sets Ri which describe the agents, are not necessarily complete. A PTETSEGn system works in such a manner that it changes its states of environment according to the applications of the action rules of the agents of one team and the developmental rules of the environment. There are two different modes of derivation, s the strong and weak mode. Let u, v ∈ VE∗ . We say that u =⇒Qi v is a strong derivation step in Σ according to the team Qi = {Ri1 , . . . , Risi }, 1 ≤ si ≤ n and 1 ≤ i ≤ m, if u = x0 A1 x1 . . . xsi −1 Asi xsi , v = y0 α1 y1 . . . ysi −1 αsi ysi with Ai ∈ VE , xj , yj , αi ∈ VE∗ , i ∈ {1, . . . , si }, j ∈ {0, . . . , si } and furthermore, x0 x1 . . . xsi =⇒h y0 y1 . . . ysi (a derivation according to a table h of the ET0L system E of Σ) and Ai → αi ∈ Rik , ik ∈ {i1 , . . . , isi }, ik 6= ik0 for k 6= k 0 , k, k 0 ∈ {1, . . . , si }. We see that every agent of the chosen team applies exactly one of its action rules in the environmental state u while the other symbols are rewritten according to the ET0L system E of Σ, that is according to the developmental rules of the environment. If there exists an agent of a team which cannot be applied in the environmental state then according to this team, a strong derivation step is not possible in this situation. In contrast, in a weak derivation step the maximal possible number of agents of a team w is used, but at least one agent. More exactly, u =⇒Qi v is a weak derivation step in Σ according to the team Qi = {Ri1 , . . . , Risi } as above if u = x0 A1 x1 . . . xpi −1 Api xpi , v = y0 α1 y1 . . . ypi −1 αpi ypi with 1 ≤ pi ≤ si , Ai ∈ VE , xj , yj , αi ∈ VE∗ , i ∈ {1, . . . , pi }, j ∈ {0, . . . , pi } and furthermore, x0 x1 . . . xpi =⇒h y0 y1 . . . ypi (a derivation according to a table h of the ET0L system E of Σ) and Ai → αi ∈ Rik , ik ∈ {i1 , . . . , ipi }, ik 6= ik0 for k 6= k 0 , k, k 0 ∈ {1, . . . , pi } such that for all Riq ∈ Qi − {Ri1 , . . . , Ripi } there exists no production α → β of Riq with α a subword of x0 . . . xpi . Note that there may exist different choices of maximal sets {Ri1 , . . . , Ripi } for the same Qi . 3

The language generated by Σ and operating in the weak (y = w) or strong (y = s) derivation mode is given by y

y

Ly (Σ) = {w ∈ TE∗ | ω =⇒Qi1 wi1 . . . =⇒Qik wir = w, 1 ≤ ij ≤ m, 1 ≤ j ≤ r, r ∈

N0}.

The family of languages generated by extended tabled simple eco-grammar systems of degree n with prescribed teams and operating in the strong (weak) mode is denoted by (PTs ETSEGn ) (or (PTw ETSEGn ), respectively) when restricted to ε-free productions, otherwise the symbol ε is added to the notation (e.g., (PTεs ETSEGn )). We can also consider simple eco-grammar systems without agents which are set to be the underlying ET0L systems. Thus, by definition, let (PTs ETSEG0 ) = (PTw ETSEG0 ) = (ET0L) where (ET0L) is the family of all ET0L languages. Furthermore, S (PTs ETSEG) = n∈N0 (PTs ETSEGn ) and S (PTw ETSEG) = n∈N0 (PTw ETSEGn ).

L

L

L

L

L

L

L L

L

L L

As in the case of usual ET0L systems, we may restrict ourselves to non-tabled (#(PE ) = 1, omitting the last letter T in the notations), non-extended (VE = TE , omitting the first letter E) or both non-tabled and non-extended systems (omitting the first E and the last T). If we want to formulate a statement for different types of (ε) systems, we may write, e.g., PTs (E)(T)SEG which means that the letters ε, E, T may be present in that position or not. If this notion is used on both sides of a relation, then it is understood that the relation is true for all those cases with the same choice of symbols on both sides. The same convention will be used for different types of L systems and for other systems to be introduced later. We also need the definition of a programmed grammar. Thus, a context-free programmed grammar G = (V, TE , S, F, σ, µ) with appearance checking is given by a contextfree grammar (V, TE , S, F ) and mappings σ, µ : Lab(F ) → P(Lab(F )). Lab(F ) is the set of labels of the production set F such that every label belongs to exactly one production and every production possesses at least one label. P(Lab(F )) is the set of all subsets of Lab(F ) We say that (w1 , f1 ) directly derives (w2 , f2 ), w1 ∈ (V ∪ TE )+ , w2 ∈ (V ∪ TE )∗ , f1 , f2 ∈ Lab(F ) (written (w1 , f1 ) =⇒ (w2 , f2 )), if either the contextfree production labelled by f1 is not applicable to w1 and w1 = w2 , f2 ∈ µ(f1 ), or else w1 =⇒f1 w2 (This means that the rule labelled with f1 is actually applied to w1 , yielding w2 .) and f2 ∈ σ(f1 ). The language generated by G consists of all words u ∈ TE∗ such that there is a derivation (X0 , f0 ) =⇒ (w1 , f1 ) =⇒ · · · =⇒ (wn , fn ) = (u, fn )

N

for some n ∈ , f0 ∈ Lab(F ). A production f : A → w together with its success field σ(f ) and failure field µ(f ) is also written as f : A → w, σ(f ), µ(f ). By (Prεac ) we denote the corresponding language family. If G is ε-free we write (Prac ). If σ(f ) = µ(f ) for all labels f ∈ Lab(F ), then the grammar is said to be with unconditional transfer, and the letters ut substitute ac in the notation.

L

4

L

3

Comparison with k-limited and uniformly klimited systems

In Theorem 1 of [2], it has already been shown that augmenting Lindenmayer systems with teams of agents strictly increases their generative power, that is

L (0L) $ L (PT SEG), L (E0L) $ L (PT ESEG), L (T0L) $ L (PT TSEG) ε x

ε x

ε x

for x = s0 and x = w and

L (ET0L) $ L (PT ETSEG). ε s

The simple inclusions follow since for the special case n = 0, it has been defined that ((E)(T)0L) = (PTs (E)(T)SEG0 ) = (PTw (E)(T)SEG0 ). For non-tabled systems and arbitrary n ∈ , it is even true that every (E)0L system can be simulated by a simple eco-grammar systems with n prescribed teams. In this case, the teams simply coincide with the one table of the (E)0L system. Analogous inclusions are true in the propagating (ε-free) cases. In [10] and [11], [13], k-limited and uniformly k-limited ET0L systems have been considered which constitute a limitation of the fully parallel rewriting of normal Lindenmayer systems. For these systems, analogous inclusions hold. The systems are simulated by simple eco-grammar systems where the developmental rules of the environment are identities and the simulation is carried out by the agents. Depending on the type of the given limited system, for the simulations a different amount of agents is necessary. A k-limited ET0L system (abbreviated as klET0L system) G = (VE , TE , PE , ω, k) is given by k ∈ (the limitation of the system) and an ET0L system (VE , TE , PE , ω). For w, v ∈ VE∗ , a derivation step w =⇒ v according to G is given by a step w =⇒h v where v arises from w by substituting exactly min{k, #a w} occurrences of each symbol a ∈ VE in the word w according to h, that is by some word of h(a). Let =⇒∗ be the reflexive transitive closure of =⇒. Then L(G) = {w ∈ TE∗ | ω =⇒∗ w} is the kETl0L language generated by G. By (klET0L) we denote the family of all klET0L languages. As usual we also consider propagating such systems (introducing the letter P in the notations), non-tabled (deleting T) or non-extended systems (deleting E). If the derivation mechanism is changed in such a way that at each step of the rewriting process, exactly min{k, |w|} occurrences of symbols in the word w considered have to be rewritten according to h, then we get the definition of uniformly k-limited ET0L systems (uklET0L systems) as introduced in [11], [13]. For instance, it could be shown (see Theorem 4.3 in [10]) that the family of all ET0L languages is strictly included in the family of all k-limited ET0L languages. For the non-extended case we have got quite a lot of incomparability results. Especially, the language families generated by k-limited and uniformly k 0 -limited T0L systems are, for the case k 0 6= 1, incomparable (see Theorem 3.1 in [11]). But all these languages can be generated by PTw SEG systems.

L

L

L

N

N

L

N

Theorem 3.1 Let k ∈ . (a) (ukl(E)(T)0L) j (PTεw (E)SEG) and (ukl(E)P(T)0L) j (PTw (E)SEG). (b) (kl(E)(T)0L) j (PTεw (E)SEG) and (kl(E)P(T)0L) j (PTw (E)SEG).

L L

L L

L L

5

L

L

Proof. We consider the ukl(E)(T)0L system G = (VE , TE , PE , ω, k)

N where hρ, ρ = 1, . . . , r,

where VE = {x1 , . . . , xs } and PE = {h1 , . . . , hr } for some r, s ∈ are the tables of the system. We define a PTw (E)SEG system

Σ = ((VE , TE , h, ω), R11 , . . . , Rk1 , . . . , R1r , . . . , Rkr , Q1 , . . . , Qr ) where h = {a → a | a ∈ VE }, Riρ = hρ for all i ∈ {1, . . . , k}, ρ ∈ {1, . . . , r}, Qρ = {R1ρ , . . . , Rkρ } for all ρ ∈ {1, . . . , r}. If G is propagating, then Σ is ε-free. In the weak mode, every team Qρ simulates the table hρ of the given ukl(E)(T)0L system G. Since by the table h all symbols remain unchanged, in both systems the same choices of symbols to be substituted are carried out. Thus, by the definitions (a) follows. Now assume that G as above is a kl(E)(T)0L system. We define a PTw (E)SEG system 1 1 1 1 r r r r Σ = ((VE , TE , h, ω), R11 , . . . , R1k , . . . , Rs1 , . . . , Rsk , . . . , R11 , . . . , R1k , . . . , Rs1 , . . . , Rsk , Q1 , . . . , Qr )

where h = {a → a | a ∈ VE }, ρ Rσi = {xσ → w | xσ → w ∈ hρ } for all i ∈ {1, . . . , k}, σ ∈ {1, . . . , s}, ρ ∈ {1, . . . , r}, ρ ρ ρ ρ Qρ = {R11 , . . . , R1k , . . . , Rs1 , . . . , Rsk } for all ρ ∈ {1, . . . , r}. If G is propagating, then Σ is ε-free. According to the weak mode, every team Qρ simulates the table hρ of the given kl(E)(T)0L system G. The inclusion (b) follows.

;

Most of the inclusions of Theorem 3.1 can be proved to be strict.

N

Theorem 3.2 Let k ∈ . (a) (uklE0L) $ (PTεw ESEG), (ukl(T)0L) $ (PTεw SEG), (uklEP0L) $ (PTw ESEG) and (uklP(T)0L) $ (PTw SEG). (b) (klE0L) $ (PTεw ESEG), (kl(T)0L) $ (PTεw SEG), (klEP0L) $ (PTw ESEG) and (klP(T)0L) $ (PTw SEG).

L L L L

L L L L

L L L L L L L L Proof. Obviously, L = {a | n ∈ N } ∈ L (PT ESEG). By Theorem 2.1 of [11] and Theorem 3.2 of [10], L 6∈ L (ukl(T)0L) ∪ L (kl(T)0L). By Example 3.1(a) of [13] and Theorem 4.4 of [10], L 6∈ L (uklE0L) ∪ L (klE0L). The strict inclusions follow. ; 2n

(ε) w

0

The exact inclusion status of

L (uklET0L) j L (PT ESEG), L (uklEPT0L) j L (PT ESEG), L (klET0L) j L (PT ESEG) and L (klEPT0L) j L (PT ESEG) ε w

ε w

w

w

is open. By Theorem 2 of [2], we have (∗)

L (PR

(ε) ut )

j

L (PT 6

(ε) w ESEG)

j

L (PR

(ε) ac )

L

(ε)

L

where (PRut ) and (PR(ε) ac ) are the families of those languages which are generated by (ε-free) context-free programmed grammars with unconditional transfer or appearance checking, respectively. It is well known (e.g., see [9], Theorem 5.1 in Chapter V) that (PRεac ) equals the family (re) of recursively enumerable languages. By Theorem 4.10 of [10] and Theorem 4.1 of [7] we know that

L

L

L (klET0L) j L (1lET0L) = L (PR ) and L (1lEPT0L) = L (PR ). From L (uklET0L) j L (PT ESEG), L (uklEPT0L) j L (PT ESEG) and the relaε ut

ut

ε w

w

tion (∗) we conclude that

L (uklET0L) j L (PR

ε ac )

and

L (uklEPT0L) j L (PR

ac ),

a result which has already been proved in [13].

4

Simple eco-grammar systems with programmed prescribed teams

To get more control on the sequence of teams of agents which are used during the derivation according to simple eco-grammar systems with prescibed teams, we introduce the concept of programmed prescribed teams. That is, an extended tabled simple EG system with programmed prescibed teams of degree n, n ∈ , (abbreviated as PrPTETSEGn system) is given by a construct

N

Σ = (E, R1 , . . . , Rn , Q1 , . . . , Qm , I, σ, µ) where (E, R1 , . . . , Rn , Q1 , . . . , Qm ) is the underlying PTETSEGn system, I j {Q1 , . . . , Qm } is the subset of initial teams and σ, µ : {Q1 , . . . , Qm } → P({Q1 , . . . , Qm }) are functions where the right side is the power set of {Q1 , . . . , Qm }. For a team Qi , i ∈ {1, . . . , m}, σ(Qi ) is called success field of Qi and µ(Qi ) failure field of Qi . We say that for words u, v ∈ VE∗ and teams Qi , Qj , 1 ≤ i, j ≤ m, (u, Qi ) =⇒ (v, Qj ) s

is a derivation step according to a PrPTETSEGn system if u =⇒Qi v is a strong derivation step in the underlying PTETSEGn system and Qj ∈ σ(Qi ) but also if such a strong derivation step for Qi does not exist and u = v and Qj ∈ µ(Qi ). If the failure field is empty for every team of the system Σ, then the system is called without appearance checking; otherwise it is called with appearance checking. The language generated by Σ is L(Σ) = {w ∈ TE∗ | (ω, Qi ) =⇒∗ (w, Qj ), Qi ∈ I, Qj team of Σ} where =⇒∗ is the reflexive transitive closure of =⇒. The family of languages generated by extended tabled simple eco-grammar systems of degree n with programmed prescribed teams with appearance checking is denoted by (Prεac PTETSEGn ). If all productions of the systems are ε-free, then the superscript ε is omitted. If all systems are without appearance checking, the subscript ac is omitted. We can also define simple eco-grammar systems with programmed prescribed teams without agents which are set to be the

L

7

L

underlying ET0L systems. Thus, by definition, (Prεac PTETSEG0 ) = Furthermore, we set [ (Prεac PTETSEG) = (Prεac PTETSEGn )

L

n∈

N0

L (ET0L).

L

and analogously, we proceed for other combinations of the super- and subscripts. Corresponding definitions are also true for the non-tabled and/or non-extended cases. First, we show how the weak and strong derivation mode of simple eco-grammar systems with prescribed teams can be simulated by programmed teams. Theorem 4.1 For all n ∈ (a) (b) (c) (d)

N0, the following inclusions hold:

L (PT L (PT L (PT L (PT

(ε) s (E)(T)SEGn ) (ε) s (E)(T)SEG) (ε) w (E)(T)SEGn ) (ε) w (E)(T)SEG)

j j j j

L (Pr L (Pr L (Pr L (Pr

(ε)

PT(E)(T)SEGn ) PT(E)(T)SEG) (ε) ac PT(E)(T)SEGn ) (ε) ac PT(E)(T)SEG) (ε)

Proof. For n = 0, the result of (a) and (c) is trivial because of the special definitions for these cases. In the following, let n ∈ . Let Σ = (E, R1 , . . . , Rn , Q1 , . . . , Qm ) be a PT(ε) (E)(T)SEGn system as defined in Section 2 where the derivation is carried out according to the strong mode. Then Σ0 = (Σ, I, σ, µ) with I = σ(Qi ) = {Q1 , . . . , Qm } and µ(Qi ) = ∅ for all i ∈ {1, . . . , m} is an equivalent Pr(ε) PT(E)(T)SEGn system. This proves (a). Obviously, (b) follows from (a) immediately. If Σ is considered to derive according to the weak mode, then this mode is simulated by the failure fields. Let

N

Σ00 = (E, R1 , . . . , Rn , T, I, σ, µ) where I = {Q1 , . . . , Qm }. The set T of teams and the success and failure fields have to be defined. For every Q ∈ I, we introduce a new set TQ of teams as follows. Suppose that Q possesses s agents, s ∈ . Let Pr (Q), r = 1, . . . , s, be  the set of subsets of Q with exactly r agents. Every Pr (Q) has exactly xr = rs elements. Obviously, Ps (Q) = {Q}. For all r = 1, . . . , s, we now construct exactly x2r teams

N

Qµν,r , ν, µ = 1, . . . , xr of TQ by choosing each of the sets IQ,r = {Q11,r , . . . , Q1xr ,r }, {Q1ν,r , . . . , Qxν,rr }, ν = 1, . . . , xr in such a manner that it coincides with Pr (Q). Formally, the teams Qµν,r for different (µ, ν, r) are considered to be different from one another. We identify Q11,s with Q (note that xs = 1). The success fields of the teams are given by σ(Qµν,r ) = I for all ν, µ = 1, . . . , xr and all r = 1, . . . , s. The failure fields are defined, for all r = 1, . . . , s, by µ(Qµν,r ) = {Qµ+1 ν,r }, ν = 1, . . . , xr , µ = 1, . . . , xr − 1, xr µ(Qν,r ) = IQ,r−1 , ν = 1, . . . , xr , r > 1, and r ) = ∅, ν = 1, . . . , xr . µ(Qxν,1 8

We set T =

[

TQ .

Q∈I

Consider any derivation step according to Σ00 arising from (u, Q), Q = Q11,s ∈ I. If Q is applicable in the sense of a strong derivation step, then we carry out the corresponding substitutions and the next step uses any team Q0 ∈ I. If Q is not applicable, then we choose one of the teams Q1ν,s−1 ∈ IQ,s−1 = µ(Q), ν = 1, . . . , xs−1 . By running through the sequence of teams xs−1 Q1ν,s−1 , . . . , Qν,s−1 we test if there exists a subset of Q with s − 1 agents that is an element of Ps−1 (Q), which is applicable to u in the strong mode. If this is the case, for the first such team of the sequence the corresponding substitutions are carried out, and in this case of success we continue with one of the teams of I. Since we can start the test with every Q1ν,s−1 ∈ IQ,s−1 it is secured that every element of Ps−1 (Q) being applicable in the stong mode to u really can be applied. If no of these teams is applicable, then we test if there is a subset of Q with s−2 agents (an element of Ps−2 (Q)) which is applicable to u in the strong mode. We continue this procedure until we reach a team applicable to u or else, no team is applicable and the derivation stops. It is obvious that we simulate a weak w derivation step u =⇒Q v according to Σ, and each such derivation step can be simulated by a sequence of derivation steps according to Σ00 . It follows that L(Σ) = L(Σ00 ). This implies (c). (d) follows from (c).

;

5

Hierarchical results

It is well known that 0L languages we note

L (0L) $ L (T0L). As examples of T0L languages which are not N

L1 = {an | n ∈ } ∪ {bn |n ∈ n m L2 = {a2 b2 | m, n ∈ 0 }.

N

N} and

But these languages can be generated by simple eco-grammar systems with programmed prescribed teams with underlying 0L system and without appearance checking. L1 is generated by the PrPTSEG system Σ1 = ({a, b}, {a → a, a → a2 , b → b, b → b2 }, a), R1 , R2 , Q1 , Q2 , I, σ) where

R1 = {a → a, a → b}, R2 = {a → a, a → a2 , b → b, b → b2 }, Q1 = {R1 }, Q2 = {R2 }, I = {Q1 } and σ(Q1 ) = {Q2 }, σ(Q2 ) = {Q2 }.

L2 is generated by Σ1 = ({a, b}, {a → a2 , b → b2 }, ab), R1 , R2 , Q1 , Q2 , I, σ) where

R1 = {a → a}, R2 = {b → b}, R3 = {a → a2 , b → b2 }, Q1 = {R1 }, Q2 = {R2 }, Q3 = {R3 }, I = {Q1 , Q2 } and σ(Q1 ) = {Q1 , Q3 }, σ(Q2 ) = {Q2 , Q3 }, σ(Q3 ) = {Q3 }. 9

Now, for every eco-grammar system with prescribed teams one may ask whether the generative power of the systems is enlarged if T0L instead of 0L systems are used as underlying systems. In the summary of [2], there are noted, besides others, the inclusions

L (PT

w SEG)

j

L (PT

w TSEG)

and

L (PT SEG) j L (PT TSEG). s

s

In [2] it remains open whether these inclusions are strict or not. They would be proved to be strict if there exists a T0L language which could not be generated by any PTSEG system in the strong or weak mode. In a more general setting this is proved by the following theorem. Theorem 5.1 There exists a language L ∈

L (PT0L) such that L 6∈ L (Pr

ε ac PTSEG).

Proof. We choose the PT0L system G = ({a, b}, {{a → a, b → bab, b → b, }, {a → a2 , b → b}}, bab) which generates the language ν

ν

νp

L = L(G) = {ba2 1 ba2 2 b . . . ba2 b | ν1 , . . . , νp ∈

N0, p ∈ N}.

Assume that L is generated by a PrPTSEG system Σ = (({a, b}, h, ω), R1 , . . . , Rr , Q1 , . . . , Qm , I, σ, µ)

N

for some r, m ∈ with appearance checking. In any derivation step according to a team, no more than r agents can be applied. Let max be the maximal length of the right sides of the productions of h and of all agents. In L, there exist only finitely many words w with #a w ≤ r + 1 + 2r · max. Therefore, there must exist words w1 with #a w1 > r + 1 + 2r · max which are derived further according to the programming leading to longer words w2 ∈ L. It follows that #a w2 > r · max. Obviously, w1 possesses at least two occurrences of b. Assume that b → ε is a production of h or of an agent being applicable to such a word w1 . Then we may erase the first letter of w1 , but also the last letter of w1 which in both cases is the letter b. It follows that for every production a → v of h which, since #a w1 > r + 1, is always applicable in this situation, we have v 6= av1 and v 6= v2 a for all v1 , v2 ∈ {a, b}∗ . We conclude that v = b, v = bv 0 b for some v 0 ∈ {a, b}∗ or v = ε. If v = b or v = bv 0 b, it follows since aa or aba are subwords of w1 , that we can derive words with two consecutive occurrences of b, a contradiction. It remains the case that a → ε is the only production of h with left side a. If a → v belongs to an agent being applicable in this situation, then, as above, v = b, v = bv 0 b for some v 0 ∈ {a, b}∗ or v = ε. If there exist two agents with productions a → b or a → bv 0 b being applicable, we get a contradiction as above. If only one such agent is applicable then we conclude that all other occurrences of a in w1 are erased by h. Since #a w2 > r · max, there must exist productions with left side b introducing some occurrences of a. Using b → ε, we may erase the first occurrence of b. Without restricting generality, let the second occurrence of b introduce an occurrence of a. It follows that the corresponding production must have the form b → av 00 with v 00 ∈ {a, b}∗ to prevent two consecutive occurrences of b in the derived word. But exchanging the application of b → ε with that of b → av 00 , we 10

derive a word with prefix a, a contradiction. As the last possibility, we consider the case that all occurrences of a are substituted by ε, whether by h or by an applicable agent. Then, for every production b → v, the word v must begin and end with an occurrence of b. A word with two consecutive occurrences of b is derived, a contradiction. n0 By an argument as above, there must exist a word w00 = ba2 b ∈ L with |w00 | > 0 2(r + 2 + 2r · max) · max and 2n −1 > r · max which is directly derived from a shorter word w0 ∈ L. This implies that max ≥ 2. Obviously, |w0 | > 2(r + 2 + 2r · max). Then #a w0 > r + 1 + 2r · max. By the considerations above, no occurrence of b in w0 can n be erased. It follows that w0 = ba2 b for some n ∈ , n < n0 , and some productions a → ai , i ∈ 0 , of h are used in this step. If for all such i, we have i ≤ 1, then 0 0 |w00 | < |w0 | + r · max < 2 + 2n + 2n −1 ≤ 2 + 2n , a contradiction. It follows that there exists an i0 ≥ 2 such that a → ai0 is a production of h. If there exists another production a → ai with i 6= i0 in h, then we can exchange one application of a → ai0 0 with that of a → ai such that a word w˜ 00 with #a w˜ 00 = 2n − i0 + i is derived. Since 0 0 < |i0 − i| ≤ max < 2n −1 , #a w˜ 00 is not a power of 2, a contradiction. We conclude that a → ai0 is the only production of h with left side a. Finally, we consider a word w000 = (ba)s b ∈ L, w000 6= ω, where s > (r + 1) · max. This word can only be directly derived from a word w˜ with |w| ˜ > 2(r + 1) which implies #a w˜ ≥ r + 1 At least one of these occurrences of a is substituted according to h, delivering ai0 as a subword of w000 , a contradiction.

N

N

;

L

Since (PT0L) is contained in all tabled eco-grammar language families considered in this paper and since all non-extended non-tabled eco-grammar language families are contained in (Prεac PTSEG), we get

L

L (PT L (PT L (Pr

(ε) s SEG) (ε) w SEG) (ε) (ac) PTSEG)

Corollary 5.1

$ $ $

L (PT L (PT L (Pr

(ε) s TSEG), (ε) w TSEG), (ε) (ac) PTTSEG).

;

Next, we restrict ourselves to non-extended and non-tabled systems. We shall see that in this case the programming leads to more comprehensive language families.

L

L L

L

L

Theorem 5.2 (0L) $ (PTεs SEG) $ (Prε PTSEG) $ (Prεac PTSEG) and ε ε (0L) $ (PTw SEG) $ (Prac PTSEG). Analogous inclusions also hold in the propagating (ε-free) case.

L

L

Proof. For the first inclusion we consider the following non-extended and non-tabled simple ε-free eco-grammar system with prescribed teams: Σ0 = (({a, b, c}, {a → a, b → b, c → c}, c3 ), R1 , R2 , . . . , R6 , {R1 , R2 , R3 }, {R4 , R5 , R6 }) where R1 = R2 = R3 = {c → ca}, R4 = R5 = R6 = {c → cb}. Obviously, in both the strong and weak derivation mode, L(Σ0 ) = {(cw)3 | w ∈ {a, b}∗ }. This example has also been considered in [2] (Σ3 in Example 1), and it is known that L(Σ0 ) 6∈ (E0L) (see [8]) which proves the first inclusion. To prove the second inclusion for both lines, we define

L

Σ = (({a, b, c, d, e}, {a → a, b → b, c → c, d → d, e → e}, c3 ), R1 , R2 , . . . , R12 , Q1 , Q2 , Q3 , Q4 , I, σ) 11

to be the non-extended and non-tabled simple ε-free eco-grammar system with programmed prescribed teams where R1 R4 R7 R10 Q1 Q2 Q3 Q4 I σ(Q1 ) σ(Q3 )

= = = = = = = = = = =

R2 = R3 = {c → ca}, R5 = R6 = {c → cb}, R8 = R9 = {c → cabd}, R11 = R12 = {c → ce}, {R1 , R2 , R3 }, {R4 , R5 , R6 }, {R7 , R8 , R9 }, {R10 , R11 , R12 }, {Q1 , Q2 , Q3 }, σ(Q2 ) = σ(Q4 ) = {Q1 , Q2 , Q3 }, {Q4 }.

It follows that L = L(Σ) = {(cw)3 | w ∈ {ε, abd}({a, b}∗ eabd{a, b}∗ )∗ } ∈ (Prε PTSEG) j (Prεac PTSEG).

L

L

Suppose that L is generated by a PTSEG system Σ1 = (({a, b, c, d, e}, h, ω), R1 , R2 , . . . , Rn , Q1 , . . . , Qm )

N

for some n, m ∈ according to the weak or strong mode. The underlying 0L system is deterministic since otherwise we could generate a word cw1 cw2 cw3 such that w1 = w2 = w3 is not fulfilled. By the same arguments, the agents are deterministic. There are words of L with infinitely many occurrences of each of a, b, d and e. Therefore, if one of these symbols occurs as the left side of a production of some agent, then this production must coincide with the production in h with the same left side. Obviously, c cannot occur at the right side of any production with left side a, b, d or e. Let k be the maximal size of the right side of any production with left side c in the table h or in any agent. Assume that a → uev or a → udv belongs to h for some u, v ∈ {a, b, c, d, e}∗ . It follows that words u1 = (cw1 )3 ∈ L, u1 6= ω, w1 ∈ {a, b}∗ , can only be derived from appropriate words u2 ∈ L ∩ {b, c, d, e}∗ . But a word with an occurrence of d or e contains ab as a subword and thus, by the assumption, generates an occurrence of e or d. It remains the case that u2 = (cw2 )3 ∈ L, w2 ∈ b∗ . Especially, for u1 with w1 ∈ a+ , |w1 | > k, there must exist a derivation u2 =⇒ u1 = (cw1 )3 where u2 = (cw2 )3 with w2 ∈ b+ . It follows that in h there exists a production b → ar , r ∈ . This is the only production in h with left side b. But every word u2 ∈ L, u2 6= ω, w2 ∈ b+ and |w2 | > k is also a word u1 as above. Therefore, it must be derivable from a word u02 = (cw20 )3 ∈ L, w20 ∈ b+ . But since b → ar , r ∈ , we get a contradiction. We conclude that for the production a → v in h, we have v ∈ {a, b}∗ . Analogously, b → v 0 , v 0 ∈ {a, b}∗ . Next let us assume that both a → ε and b → ε are productions of h. It follows that words of {u = (cw)3 | u 6= ω, w ∈ {a, b}∗ , |w| > k} can only be derived with the

N

N

12

help of productions d → v or e → v 0 , v, v 0 ∈ {a, b}+ . Then we consider the words of the subset S = {u = (c(eabd)ν )3 | ν ∈ , ν ≥ K} of L where K = k + |v|. Every u ∈ S can only be generated from a word u0 with suffix eabdu00 , u00 ∈ {a, b}∗ . If d → v, v ∈ {a, b}+ , then v 6= ε is a suffix of every word of S, a contradiction. If e → v 0 , v 0 ∈ {a, b}+ , then the words of S can only be generated if we use a production d → x where x contains the same non-zero number of occurrences of e and d. Because of the shape of S, this is only possible if x = (eabd)r for some r ∈ . But the subword eabd of u0 always generates the subword v 0 (eabd)r with v 0 6= ε such that the words of S cannot be derived, a contradiction. We state that we have proved that ab =⇒ w¯ with exactly one w ¯ ∈ {a, b}+ where it does not matter whether the productions belong to the table h or to an agent. ¯ we define k2 = k +|w|. ¯ Now we investigate how words w = (cu)3 ∈ L, For abd =⇒ w w 6= ω, u = u1 u2 , |u1 | ≥ k2 and u2 containing eabd as subword can be generated from a word w0 ∈ L. The occurrences of e and d in u2 can only be derived from productions with left side e or d. First, by the shape of the language L, it is not possible that the right side of such a production contains du0 d or eu0 e with u0 ∈ {a, b} as subword. Next, assume that e → u0 eabdv 0 and d → v 00 for some u0 , v 0 , v 00 ∈ {a, b, d, e}∗ . By the shape of L, e always occurs in the context eabd. It follows that each such occurrence of eabd in w0 is replaced by u¯ = u0 eabdv 0 wv ¯ 00 for fixed u0 , v 0 , v 00 , w¯ and w¯ ∈ {a, b}+ as above. We note that u¯ 6= eabd. This would mean that every u2 would be an element of ({a, b}∗ u¯{a, b}∗ )∗ which contradicts the shape of L. Analogously, a production d → u0 eabdv 0 does not occur. By the considerations so far, if d → u0 ev 0 is a production, then u0 ∈ {ε, d, ad, bd, abd}{a, b}∗ and v 0 ∈ {a, b}∗ , if e → u00 dv 00 , then u00 ∈ {a, b}∗ and v 00 ∈ {a, b}∗ {ε, e, ea, eb, eab}. In the first case, we could generate a word with a suffix ew00 where w00 ∈ {a, b}∗ , a contradiction. In the second case, we consider a derivation arising from u = (c(eabd)ν )3 ∈ L with ν > K. Then, for all possible v 00 , it is necessary that d → u0 ev 0 for some u0 , v 0 ∈ {a, b, d, e}∗ which has been excluded before. If d → u000 with u000 ∈ {a, b}∗ , then a production e → u0 eabdv 0 for some u0 , v 0 , v 00 ∈ {a, b, d, e}∗ had to be used which is impossible as proved before. Analogously, e → u000 with u000 ∈ {a, b}∗ leads to a contradiction. We conclude that d → v1 dv2 and e → v10 ev20 where v1 , v2 , v10 , v20 ∈ {a, b}∗ . This implies that the axiom ω does not contain any occurrences of e or d and that there must exist a word of the form (cabdu0 )3 ∈ L with u0 ∈ {a, b}∗ which is generated from a word (cu)3 ∈ L where u ∈ {a, b}∗ . Since we know that the occurrences of d cannot be derived from a or b, it follows that c → cabdu00 with u00 ∈ {a, b}∗ must be a production of an agent or of h. Then there exists a derivation (cabdu0 )3 =⇒ (cabdu00 wv ¯ 1 dv2 u000 )3 with v1 , v2 , w¯ as above and some u000 ∈ {a, b}∗ . Since u00 wv ¯ 1 ∈ {a, b}+ , we have derived a word not belonging to L, a contradiction. It remains to prove the last inclusion of the first line. We consider the following ε-free PrPTSEG system

N

N

Σ0 = (({a, b, c, d}, {a → a, b → b, c → c2 , d → d2 }, acd), R1 , R2 , Q1 , Q2 , I = {Q1 }, σ, µ)

13

with appearance checking where R1 R2 Q1 Q2 σ(Q1 ) σ(Q2 )

= = = = = =

{a → b2 }, {b → a2 }, {R1 }, {R2 }, {Q1 }, µ(Q1 ) = {Q2 }, {Q2 }, µ(Q2 ) = {Q1 }.

S 0 We set L(Σ0 ) = ∞ ν=0 Lν where Lν consists of all those words of L(Σ ) which are derived by ν successful derivation steps from the axiom acd. More exactly,  ν ν {wc2 d2 | w ∈ {a, bb}∗ , #a w = 22n − µ, #b w = 2µ}    for ν = 22n + µ − 1, µ = 0, . . . , 22n − 1, n ∈ 0 Lν = ν ν {wc2 d2 | w ∈ {aa, b}∗ , #b w = 22n+1 − µ, #a w = 2µ}    for ν = 22n+1 + µ − 1, µ = 0, . . . , 22n+1 − 1, n ∈ 0 .

N

N

ν

ν

We see that for every wc2 d2 ∈ Lν , we have |w| = ν + 1. Assume that L0 = L(Σ0 ) is generated by a PrPTSEG system G0 Σ2 = (({a, b, c, d}, h, ω), R10 , . . . , Rr0 , Q01 , . . . , Q0m , I, σ)

N

for some r, m ∈ 0 without appearance checking. Note that the maximal number of agents in a team is bounded by r. Thus, there exists a constant k ∈ such that in every derivation step v =⇒ w at most k occurrences of symbols in w are derived from v with the help of some team. Since L0 j {a, b}∗ {cn dn | n ∈ } and the number of occurrences of c and d in the words of L0 grows exponentially, it follows that the only productions in the production set h with left side c and d are c → ci and d → di with the same i ∈ . For every production a → u1 and b → u2 in h or in any agent, by the shape of L0 , the right sides of the productions, if not empty, have to begin with an occurrence of a or b. Every such production which, according to the program of the system, may be applied to a word w0 ∈ L0 with #a w0 ≥ r + 2 or #b w0 ≥ r + 2, does not contain an occurrence of c or d in u1 or u2 since otherwise we would generate a word with a mixture of symbols of {a, b} with symbols of {c, d}, a contradiction. Since there are words of L0 with arbitrary many occurrences of c and d, we conclude that i ≥ 2. Let ma ≥ 2 be the maximum of i and of the length of the right sides of all productions of the agents. Consider an i0 ∈ such that r · ma < 2i0 . Set l = dlog2 (r · ma )e + 1. We consider words wj ∈ L0 , j = 0, . . . , l, with #c wj = 2i0 +j . Because of the length of these words, each of them only derives longer words. Assume that in a derivation arising from wl there are used agents of the actual team with productions c → cj for some j ∈ . We get a word

N

N

N

N

N

wl0 ∈ L0 with #c wl0 = i · 2i0 +l + zl

Z

where zl ∈ , |zl | ≤ r · ma < 2i0 , is depending on the applied agents of this step using productions of the type c → cj . By the shape of L0 , i · 2i0 +l + zl must be a power of 2. Thus, there exists zl 00 00 = i · 2i0 +l−1 + . ∈ L0 with #c wl−1 wl−1 2 14

On the other side, from a word wl−1 we only can derive words 0 0 wl−1 ∈ L0 with #c wl−1 = i · 2i0 +l−1 + zl−1

Z

0 where zl−1 ∈ , |zl−1 | < 2i0 . Since i · 2i0 +l−1 ≥ 2i0 +1 , |zl |, |zl−1 | < 2i0 and #c wl−1 and 00 #c wl−1 are powers of 2, it follows that zl−1 = z2l . These arguments can be continued until w0 derives a word

w00 ∈ L0 with #c w00 = i · 2i0 +

zl . 2l

Since |zl | ≤ r · ma and l = dlog2 (r · ma )e + 1, it follows that |z2ll| < 1, a contradiction. We conclude that in agents being applicable to words of this size, no production c → cj can occur. This implies that zl = 0 and therefore, i must be a power of 2, i.e. i = 2i0 for a fixed i0 ∈ . Suppose that in the table h, there is a production a → u for some u ∈ {a, b}∗ . Let 2n 22n −1 222n −1 n∈ be a number such that 22n > r · ma + 2i0 + 2r and w¯ = a2 c2 d ∈ L0 . Then we consider a derivation step starting from w. ¯ We directly generate a word v i0 22n −1 22n −1+i0 with #c v = #d v = 2 2 = 2 . On the one hand, by the shape of L0 , we know that #{a,b} v = 22n + i0 and #{a} v = 22n − i0 . On the other hand, if |u| = 0, then #a v ≤ r · ma < 22n − i0 and if |u| > 1, then #{a,b} v ≥ |u| · (22n − r) ≥ 2(22n − r) > 22n + 2i0 > 22n + i0 which both contradict the shape of L0 . It remain the cases u = b or u = a. If u = b then #a v ≤ r · ma which is a contradiction as above. We conclude that u = a. Analogously, we can prove that the only production of h with left side b is b → b. For every n ∈ 0 , 22n > i0 + 1, we consider the singleton subsets L22n −1 = {vn = 2n 22n −1 222n −1 a2 c 2 d } j L0 . Every such vn occurs in some derivation. Since there are only finitely many teams, there exist n1 , n2 ∈ 0 , n1 < n2 , such that the same team Q0 is applied both to vn1 and vn2 in their corresponding derivations. We consider 2n 22n1 −1 222n1 −1 a subderivation D1 starting from vn1 = a2 1 c2 d using Q0 . Suppose that 2n1 s ∈ is the smallest number such that si0 > 2 . Set z = si0 − 22n1 . Note that z + 1 ≤ i0 + 1 < 22n1 . After s derivation steps in D1 , from vn1 we can derive a word v 0 2n +1 with #c v 0 = #d v 0 = 22 1 +z−1 and, by the shape of L0 , #a v 0 = 2z. In vn2 , we have at least the same number of occurrences of the different symbols as in vn1 . Therefore, we can start a subderivation D2 from vn2 using in the first step the same team Q0 as in the first step of D1 . Then, in the following derivation steps, we can use the same teams as in the corresponding steps of D1 , with the same productions of the agents. The variation of the number of occurrences of a and b is the same in both subderivations. Thus, 2n 2n after s steps, in D2 we derive a word v 00 with #c v 00 = #d v 00 = 22 2 +2 1 +z−1 < 22n2 +1 and #a v 00 = 22n2 − 22n1 + 2z. But because of the shape of L0 , it is necessary that #a v 00 = 22n2 − 22n1 − z. Since the two values of #a v 00 do not coincide, we get a contradiction.

N

N

N

N

N

;

Unfortunately, we could not prove that the language L above cannot be generated by a tabled PTSEG system according to the weak or strong mode. Analogously, we could not demonstrate that L0 cannot be generated by a tabled PrPTSEG system. Thus, it remains open if the corresponding inclusions of Theorem 4.1(b) and (d) (in the tabled, non-extended case) are strict or not. 15

Next we show that by introducing non-terminal symbols, that is by considering extended systems, the generative power of the systems is increased again. This is also valid for the tabled case. Theorem 5.3 There exists a language L (Prεac PTTSEG).

L



L (PE0L)

such that L

6∈

Proof. We consider the propagating E0L system ({A1 , A2 , B, a, b}, {A1 → a, B → b, A2 → A2 , A2 → a, a → a2 , b → b2 }, BA1 BA2 , {a, b}) which generates the language n

n

n

m

L = {b2 a2 b2 a2 | n, m ∈

N0 ,

n ≥ m}.

Assume that L is generated by a PrPTTSEG system Σ = (({a, b}, PE , ω), R1 , . . . , Rr , Q1 , . . . , Qm , I, σ, µ) with appearance checking. Because of the special shape of L, we see at once that in any h ∈ PE , if a → aih and b → bjh are productions of h, then ih = jh , that is, the tables are 0 deterministic. Let a → ai , i0 6= ih , be a production of an agent which, according to the programming, is allowed to be applied to a word w = w1 w2 w3 w4 ∈ L with #a w > r, w2 , w4 ∈ a+ and w1 , w3 ∈ b+ . Let u be the word derived from w using the table h. Without restricting generality assume that the agent rewrites an occurrence of a in w2 . If an occurrence of a in w4 has been rewritten by a → aih , whether belonging to h 0 or an agent, we exchange the application of a → ai with that of a → aih such that the new word v 0 = u01 u02 u03 u04 with u02 , u04 ∈ a+ and u01 , u03 ∈ b+ fulfills |u01 | 6= |u02 |, a contradiction. Else, all occurrences of a in w4 are rewritten by agents with productions 00 a → ai with perhaps different i00 6= ih . Since #a w > r, there must be an occurrence of a in w2 which is rewritten by a → aih . By exchanging the productions a → aih and 00 a → ai , we get an analogous contradiction as before. It follows that for all productions 0 a → ai of agents being applicable, because of the programming of the system, to words w ∈ L with #a w > r, we get ih = i0 . This is true for all tables h ∈ PE . Thus, in this situation, the tables coincide. The analogous aguments are valid if we start with an 0 agent having a production b → bi . Since L is infinite, there always exist words w ∈ L with #b w ≥ #a w > r which, according to the programming, can be derived further and can be used, for a or b, in the argumentations above. We conclude that in any case the tables of PE coincide. This means that we can consider Σ to be a non-tabled deterministic system. Since the lengths of the words of L grow exponentially, it is necessary that i = ih ≥ 2. Let ma be the maximum of the lengths of the productions of the agents with left side 0 0 a. Let n0 ∈ be a number with 2n +1 > r. For all n ∈ with 2n +1 ≥ rma +i·2n +i, n n we consider the infinitely many words wn = a2 b2 a ∈ L. Obviously, these words cannot 0 be directly derived from a word of L with less than 2n + 1 occurrences of a. Thus, each wn is directly derived from a word w0 ∈ L with #a w0 > r. This means, as proved above, that any occurrences of a in w0 is substituted by ai where i ≥ 2. But since in any word of L there exists at least one occurrence of a to the right of the occurrences of b, w0 cannot derive a word with exactly one occurrence of a to the right of the occurrences of b, a contradiction.

N

N

;

16

L

Since (EP0L) is contained in all extended eco-grammar language families considered in this paper and since all non-extended eco-grammar language families are included in (Prεac PTTSEG), we get

L

Corollary 5.2

6

L (Pr L (PT L (PT

(ε) (ac) PT(T)SEG) (ε) s (T)SEG) (ε) w (T)SEG)

$ $ $

L (Pr L (PT L (PT

(ε) (ac) PTE(T)SEG) (ε) s E(T)SEG) (ε) w E(T)SEG)

;

Extended tabled systems

In Theorem 4 of [2], it has been proved that

L

L (PT

ε w ETSEG)

=

L (re) and L (PT

w ETSEG)

=

L (PR

ac )

where (re) is the family of recursively enumerable languages. The following theorem shows that the inclusions of Theorem 4.1(d) in the case of underlying ET0L systems are equalities. Theorem 6.1

L (Pr L (Pr

ε ac PTETSEG)

= ac PTETSEG) =

L (PT L (PT

ε w ETSEG)

= w ETSEG) =

L (re) and L (PR ). ac

Proof. Theorem 4.1 (d) above and Theorem 4 of [2] prove that

L (re) = L (PT ETSEG) j L (Pr PTETSEG) and L (PR ) = L (PT ETSEG) j L (Pr PTETSEG). ε w

ac

ε ac

ε w

ac

Because of Church’s thesis, the first line of the theorem follows. To prove the second line, let Σ = (E, R1 , . . . , Rn , Q1 , . . . , Qm , I, σ, µ) be an ε-free PRPTETSEG system with appearance checking where E = (VE , TE , PE , ω) is an ε-free ET0L system. Assume that VE = {y1 , . . . , ys } and PE = {h1 , . . . , hr } for some r, s ∈ . We define a context-free programmed grammar G = (V, TE , S, F, σ 0 , µ0 ). Set

N

¯¯ | x ∈ VE }. ¯, x V = (VE − TE ) ∪ {S} ∪ {¯ x, x The productions of F with their success and failure fields are defined in the following. The programmed grammar is built up by different subprograms all of which are entered by their first line written down. Furthermore, the interconnection of different subprograms is given by flow diagrams thus leading to further subprograms. For every word ¯¯ are defined. ¯ and w w = x1 . . . xn ∈ VE∗ , we define w¯ = x¯1 . . . x¯n . Analogously, w The central work is to give, for every i ∈ {1, . . . , m}, a subprogram which simulates a derivation step of Σ starting from (u, Qi ) for any u ∈ VE∗ . Assume that Qi = {Ri1 , . . . , Riqi }, qi ∈ {1, . . . , n} and Rj = {xj1 → wj1 , . . . , xjrj → wjrj } for some rj ∈

N,

j = 1, . . . , n.

For every derivation step, the team Qi chooses exactly one action rule from each agent. There are ri1 · . . . · riqi different combinations of choices of action rules. We assume that these choices are ordered in an arbitrary, but fixed manner. First, we define a 17

subprogram A(i, l), i ∈ {1, . . . , m} and l ∈ {1, . . . , ri1 · . . . · riqi } which checks if all action rules of a choice l are applicable. Let the choice l be given by xi1,li1 → wi1,li1 ∈ Ri1 , . . . , xiqi ,liqi → wiqi ,liqi ∈ Riqi . We define the subprogram A(i, l) as follows: (i, l, 1) : (i, l, 2) :

¯ i1,li1 x¯i1,li1 → x ¯ i2,li2 x¯i2,li2 → x .. .

(i, l, 2) (i, l, 3)

out (i, ¯l, 1)

¯ i(qi −1),li(q −1) (i, l, qi − 1) : x¯i(qi −1),li(qi −1) → x (i, l, qi ) (i, ¯l, qi − 2) i ¯ iqi liq (i, l, qi ) : x¯iqi ,liqi → x T (i,l) (i, ¯l, qi − 1) i ¯ i(qi −1),li(q −1) → x¯i(qi −1),li(q −1) (i, ¯l, qi − 2) (i, ¯l, qi − 1) : x ∅ i i .. . ¯ ¯ i2,li2 → x¯i2,li2 (i, l, 2) : x (i, ¯l, 1) ∅ ¯ ¯ out ∅ (i, l, 1) : xi1,li1 → x¯i1,li1 After each production, the labels of its success field followed by the labels of the failure (i,l,1) (i,l,r) field are written down. T (i,l) = {t11 , . . . , t11 } is the set of labels for the first line of (i,l) those subprograms Tρ , ρ = 1, . . . , r, which will be defined later and which simulate a derivation of the environment according to a table hρ , but which, by the indices, also remember the team Qi and the special choice l of the agents’ action rules to be rewritten later. By A(i, l), those occurrences of symbols remain barred twice which, according to the action rules, are substituted later by the subprogram C (i,l) . If A(i, l) is left by the label “out” (both occurrences of “out” leading to the beginning of the same following subprogram), then this choice of l of the agents’ action rules is not applicable. To see whether there exists any applicable choice according to the team Qi , the subprograms A(i, l) are joined together as follows: -

A(i, 1)

out - A(i, 2)

?

?

T (i,1)

T (i,2)

out - . . .

- A(i, ri1 · . . . · riq ) i

µ(Qi )-

?

T (i,ri1 ·...·riqi )

We also consider cyclic shifts of this sequence of subprograms beginning with A(i, l) as the left-most subprogram for all l ∈ {1, . . . , ri1 · . . . · riqi }. If such a sequence is left at the right side, then a strong derivation step is not possible and we have to continue the derivation with the same state of the environment, but with one of the teams of µ(Qi ). Accordingly, by µ(Qi ) = {(j, 1, 1), . . . , (j, rj1 · . . . · rjqj , 1) | Qj ∈ µ(Qi )}, we denote the set of the labels of the first lines of the corresponding subprograms A(j, l) which are considered as the entry points of the corresponding cyclic shifts of the sequence noted above if i = j. This means that for a fixed j, we may continue the derivation with any A(j, l), l ∈ {1, . . . , rj1 ·. . .·rjqj }. This is necessary to ascertain that any applicable choice of the action rules in the team Qj which leads to a strong derivation step can really be simulated. More exactly, for every team Qi , we consider the following subprogram T i : 18

out - A(i, 2)

A(i, 1)

-

T

?

?

(i,1)

(i,2)

T

- A(i, ri1 · . . . · riq ) i ?

T

out - A(i, 3)

A(i, 2)

-

out - . . .

out - . . .

-

(i,ri1 ·...·riqi )

A(i, 1)

µ(Q-i )

-

.. .

?

?

?

T (i,2) .. .

T (i,3) .. .

T (i,1) .. .

- A(i, ri1 · . . . · riq ) out i ?

out- . . . - A(i, r · . . . · r − 1) i1 iqi

A(i, 1) ?

T (i,ri1 ·...·riqi )

.. .

?

T (i,ri1 ·...·riqi −1)

T (i,1)

The labels in different occurrences of the same A(i, l) are considered to be different with the exception of the labels “out” of the rightmost subprograms in any line and of the (i,l,1) (i,l,r) different occurrences of the success fields T (i,l) = {t11 , . . . , t11 }. If during the work of the subprogram T i , one occurrence of A(i, l) is left by T (i,l) we know that the choice l of the agents’ action rules is applicable. We first simulate the derivation according to the ET0L system. Let hρ = {yσ → vσ1 , . . . , yσ → vσiσ | σ = 1, . . . , s}, ρ = 1, . . . , r, be a corresponding table. The simulation is carried out by the subprogram Tρi,l : (i,l,ρ)

t11

(i,l,ρ)

t1i1 .. .

(i,l,ρ)

ts1

(i,l,ρ)

tsis (i,l,ρ)

(i,l,ρ)

(i,l,ρ)

T2

(i,l,ρ)

T2

: y¯1 → v¯¯11 .. . : y¯1 → v¯¯1i

T1

: y¯s → v¯¯s1 .. . : y¯s → v¯¯si

Ts

1

s

T1

(i,l,ρ)

(i,l,ρ)

(i,l,ρ)

c(1, i, l)

(i,l,ρ)

c(1, i, l)

Ts

(i,l,ρ)

where Tσ = {tσ1 , . . . , tσiσ }, σ = 1, . . . , s. Afterwards, since the team Qi and the choice l have been remembered by the labels, we can simulate the work of the chosen agents by the subprogram C i,l : ¯ i1,li1 → w¯i1,li1 x c(2, i, l) ∅ .. . ¯ i(qi −1),li(q −1) → w¯i(qi −1),li(q −1) c(qi − 1, i, l) : x c(qi , i, l) ∅ i i ¯ iqi ,liq → w¯iqi ,liq c(qi , i, l) : x {d(1, i, l), f1 } ∅ i i c(1, i, l) :

Thereafter, if we follow the label d(1, i, l), the subprogram D(i,l) transforms all symbols to symbols of the form x¯ and then we start a new simulation step. If we follow the label 19

f1 we execute final steps according to the subprogram Fin below. The subprogram Di,l is given by d(1, i, l) : y¯¯1 → y¯1 d(1, i, l) d(2, i, l) d(2, i, l) : y¯¯2 → y¯2 d(2, i, l) d(3, i, l) .. . d(s, i, l) : y¯¯ → y¯s d(s, i, l) σ(Qi ) s

where σ(Qi ) = {(j, 1, 1), . . . , (j, rj1 · . . . · rjqj , 1) | Qj ∈ σ(Qi )}. For fixed i ∈ {1, . . . , m}, the subprogram T i together with the subprograms Tρi,l , C i,l and Di,l for all l = 1, . . . , ri1 · . . . · riqi , ρ = 1, . . . , r, constitutes a subprogram T Qi which can simulate, in a “barred fashion”, each derivation step (u, Qi ) =⇒Σ (w, Qj ). The subprogram Fin is given by f1 : y¯¯1 → y1 f2 : y¯¯2 → y2 .. . fs : y¯¯s → ys f10 : y¯1 → y1 f20 : y¯2 → y2 .. .

f1 f2 f2 f3 fs f10 f10 f20 f20 f30

fs0 : y¯s → ys fs0



which, from barred words derives the corresponding words of VE∗ . These words cannot be derived further. Every derivation of G begins with the subprogram start : S → ω ¯ I¯ ∪ {f1 } ∅ where I = {(j, 1, 1), . . . , (j, rj1 · . . . · rjqj , 1) | Qj ∈ I}. The label f1 is only necessary if ω ∈ TE∗ . The context-free programmed grammar G is composed of the subprograms start, Fin and T Qi for all i ∈ {1, . . . , m}. We see that L(Σ) j L(G), and by the construction it is also clear that G can only derive words of L(Σ). If Σ is ε-free, then G is ε-free, too.

;

7

Summary and open problems

In this paper, we reconsidered simple eco-grammar systems with prescribed teams. As a first result we could show that k-limited and uniformly k-limited (T)0L and E0L systems can be simulated by simple eco-grammar systems with prescribed teams where the underlying systems are given by 0L or E0L systems, respectively. More important is the introduction of the programming concept which is imposed upon the teams of the simple eco-grammar systems. By this concept, in most cases the generative power of the systems could be enlarged. These results are summarized by the diagram below. A solid arrow indicates a strict inclusion between the corresponding language families while a dashed arrow denotes an inclusion where it is still open whether it is strict or not. The diagram is also valid for the ε-free (propagating) case but then (re) has to be replaced by (PRac ).

L

L

20

L (re) = L (PTεw ETSEG) * ! !! ! !!

L

L (PrεacPTESEG) -L (PrεacPTETSEG)

* 6 AK !!! 6 ! !A ! ! ! ! A !! !! ! ! ! ! ! ! A ! ! !! !! A ! ! ! ! (Prε PTESEG) - (Prε PTETSEG) *  - (Prε PTTSEG) ! A* (Prεac PTSEG) ac !! !! 6 6 ! ! ! ! A 6J 6!J ! ] ]J! ! (PTεw ESEG) J !! !! ! ! J J !! !!  J !!! J !!!  !J !  ε ε !! J !! J * (PTs ESEG)  * (PTs ETSEG)  ε ε ! J ! ! (Pr PTSEG) J (Pr PTTSEG) !! 6 6 ! J !! J ! !  6 6!! ! ε ε (PTw SEG) !! - (PTw TSEG) !!!  ! !  !! !!      ! ! ! !  !! !! ! !   ! ! - (ET0L) (E0L)   1  1    (PTεs TSEG) (PTεs SEG)          6 6                           (T0L) (0L)

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

For x ∈ {s, w}, the strict inclusions

L ((T)0L) $ L (PT (T)SEG) and L ((E0L) $ L (PT ESEG) ε x

ε x

above have already been proved in [2] (also in the ε-free (propagating) case). For some of the inclusions, for which the strictness is denoted to be open in [2] (page 133) we now could prove the strictness, namely (for all x ∈ {s, w})

L (PT L (PT

(ε) x SEG) (ε) x (T)SEG)

$ $

L (PT L (PT

(ε) x TSEG), (ε) x E(T)SEG).

L

The exact inclusion status of the language families between (PT(ε) s ESEG) and (ε) (Prac PTETSEG) remains open. Also, the different inclusions between the nonextended tabled systems shown above could not be proved to be strict. We think that their strictness could be demonstrated.

L

References [1] M.H. ter Beek, Teams in grammar systems: hybridity and weak rewriting. Acta Cybernetica 12(1996), 427–444. [2] M.H. ter Beek, Simple eco-grammar systems with prescribed teams. In: G. P˘aun, A. Salomaa (eds.), Grammatical Models of Multi-agent Systems. Gordon and Breach 1999, 113–135. 21

[3] E. Csuhaj-Varj´ u, J. Kelemen, A. Kelemenov´a, G. P˘aun, Eco-grammar systems. A Preview. In: R. Trappl (ed.), Proc. 12th European Meeting on Cybernetics and System Research. World Sci. Publ., Singapore 1994, 941–948. [4] E. Csuhaj-Varj´ u, J. Kelemen, A. Kelemenov´a, G. P˘aun, Eco-grammar systems. A grammatical framework for studying lifelike interactions. Artificial Life 3(1997), 1–28. [5] E. Csuhaj-Varj´ u, A. Kelemenov´a, Team behaviour in eco-grammar systems, Theoretical Computer Science 209(1998), 213–224. [6] E. Csuhaj-Varj´ u, V. Mitrana, Dynamical teams in eco-grammar Systems. Fundamenta Informaticae 44(2000), 83–94. [7] H. Fernau, D. W¨atjen, Remarks on regulated ET0L systems and regulated context-free grammars. Theoretical Computer Science 194(1998), 35–55. [8] G. Rozenberg, A. Salomaa, The Mathematical Theory of L Systems. Academic Press, New York, 1980. [9] A. Salomaa, Formal Languages. Academic Press, New York, 1973. [10] D. W¨atjen, k-limited 0L Systems and Languages. J. Inf. Process. Cybern. EIK 24(1988), 267–285. [11] D. W¨atjen, On k-uniformly-limited T0L Systems and Languages. J. Inf. Process. Cybern. EIK 26(1990), 229–238. [12] D. W¨atjen, Function-Dependent Teams in Eco-Grammar Systems. Submitted for publication. [13] D. W¨atjen, E. Unruh, On Extended k-uniformly-limited T0L Systems and Languages. J. Inf. Process. Cybern. EIK 26(1990), 283–299.

22