<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>General Multigenerative Grammar Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Roman Luk</string-name>
          <email>lukas@fit.vutbr.cz</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexander Medunar</string-name>
          <email>meduna@fit.vutbr.cz</email>
        </contrib>
      </contrib-group>
      <fpage>205</fpage>
      <lpage>212</lpage>
      <abstract>
        <p>This paper presentsnew models for generating matrix languages. These models are based on multigenerative grammar systems that simultaneouslygenerateseveral strings in a parallel way. The componentsof these models are context-free grarrrmars,working in a general way. The rewritten nonterminalsaredeterminedby a finite setof nonterminalsequences.</p>
      </abstract>
      <kwd-group>
        <kwd>Grammar system</kwd>
        <kwd>matrix gralrlmar</kwd>
        <kwd>generalderivation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The formal language theory has intensively investigatedvarious grammar systems
(see [1], l2l, [8]), which consist of several cooperating components,usually
representedby grammars.Although this variety is extremelybroad, all thesegrammar
systemsalways use a derivation that generatesa single string. In this paper,however,
we introducegrammarsystemsthat simultaneouslygenerateseveralstrings,which are
subsequentlycomposedin a single string by some common string operation,such as
concatenation.</p>
      <p>More precisely, for a positive integer n, an r-multigenerative grammar
systemdiscussedin this paper works with n context-freegrarnmaticalcomponentsin
a general way-{hat is, in every derivation step, each of these componentsrewrites
any nonterminal occurring in its current sentential form. These n derivations are
controled n-tuples of nonterminals or rules. Under a control like this, the grammar
system generatesn strings, out of which the strings that belong to the generated
languageare made by some basic operations.Specifically, these operationsinclude
union, concatenationand a selectionof the string generatedby the first component.</p>
      <p>In this paper, we prove that all the multigenerative grammar systemsunder
discussion characterize the family of languages, which is generated by matrix
grammars.Besidesthis fundamentalresult, we give severaltransformationalgorithms
of thesemultigenerativegrammarsystems.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Preliminaries</title>
      <p>This paper assumesthat the readeris familiar with the formal languagetheory (see
[4]). For a set, Q, carcl(Q) denotes the cardinality of Q. For an alphabet, V, f
representsthe free monoid generatedby V under the operationof concatenation.The
unit of I is denoted by e. Set I/ : I - {e}; algebraically, X rs thus the free
semigroupgeneratedby Zunder the operationof concatenation.</p>
      <p>A context-freegrammar is a quadruple,G: (N, T, P, 8, whereN and T arc disjoint
alphabets. Symbols in N and T arc referred to as nonterminals and terminals,
respectively,and S e N is the start symbol of G. P is a finite setof rules of the form A
) x, where A e l,'l and x c (N wT).. To declarethat a label r denotesthe rule, we
write as r: A-+ x.Letu, v e (Nu 7)'. For everyr: A -&gt; x e P, write uAv = uxv lr],
or simply uAv &gt; uxv. Let =' denote the transitive-reflexive closure of =. The
languageof G, L(G),is definedasL(G) : {w:S -* w rn G,for some, e t' 7.</p>
      <p>A matrix grammar is a pair, H : (G, A4),where G : (N, T, P, S) is a context-free
g r a m m aar n d M i s a f i n i t e l a n g u a g e o v e r a l p h a b e t P , M c . PL' e. t x 6 ,x t , . . . , x n e ( l ' , 1
u T)- for any n ) 0, xi-1) xi lpil in G for all i: l, ..., n andppz...pn e M. Then
matrix grammarH makesdirect derivation stepfrom xsto xr, denotedzISxs :&gt; xn.Let
=. denotethe transitive-reflexiveclosureof =. The languageof H, L(H), is defined
asL(11): {w: S 3* w in H, for some* e t'y.</p>
    </sec>
    <sec id="sec-3">
      <title>3 Definitions</title>
      <p>Dejinition 1. An n-multigenerative nonterminal-synchronizedgrammar system
(nMGN) is an n+l tuple,</p>
      <p>f : ( G r ,G z ,. . . , G n ,Q ) ,
where Gi: (Ni, Ti,Pi, S,) is a context-freegrammarfor eachi: l, ...,,n, andQ rs a
finite set of n-tuplesof the form (At, Ar, ..., An),whereAi e Ni for all i: t, ..., n.
Then, a sententialn-form of n-MGN is an z-tuple of the form X: (xv xz, ..., xn),
wherexi e (Niv-1T)' for all i : I, ...) n.Let y: (urAp1,u2A2y2..,., u,Anv) and7 :
(uppy u2x2r2.,.., u,&amp;rrr) be two sententialn-fotm, whereAi e Ni, Lti,vi, x; e (//, t-r
Z;).for all i : 1, ..., n. LetAi -+ xi € Pifor all i : I, ..., n and(At, A2, ..., Ar) e Q.
Then X directly derives X in f, denotedby X = X. h the standardway, we
generalize= to -k, k ) 0, 3*, and=*. Then-languageof f , n-L(f), is definedas
n - L ( f ) : { ( w r w, 2 , . . . , w , ) : ( S , , S r , . . . , S , , ) = *w( rz,,,. . . , w , ) , w , Te 1f*o r a l li : 7 , . . . , n } .
The languagegeneratedbyl in the unionmode,Lu,io,(l), is definedas</p>
      <p>L u n i o n ( l ) :{ w : ( w r ,w r , . . . , w n )e n - L ( l ) , w e { w i :i : l , . . . ,n ) } .</p>
      <p>The languagegeneratedby I in the concatenationmode,L"on,(f), is definedas</p>
      <p>Lronr(l): {wtwz...wn: (w5 w2, ..., wn) e n-L(l)}.</p>
      <p>The languogegeneratedby I in thefirst mode,Lnn,(l), is defined as</p>
      <p>Lp,r,(l): {wi (wr,wr, ..., wr) e n-L(l)|.</p>
      <sec id="sec-3-1">
        <title>GeneralMultigenerative Grammar Systems</title>
        <p>Example1. f : (Gr, Gz,Q), whereGr : ({Sr,I ,), {a, b, c}, {Sr -+ aS1,S1--&gt;aA6 A1
--&gt;bA(, At --&gt;bc\, Sr),Gz: ({Sz,Ar.}, {d}, {Sz-+ SzAzS,z-) Az,Az -+ d), Sz),Q:
{(S', Sz),(Av Az)\ is a 2-multigenerativenonterminal-synchronizedgrammar system.
W e h a v e2 - L ( f ) : { ( a n b n c ' , d n ) , n &gt;l } , L u , i o n ( f ): { a ' b n c ' : n } l } u { d ' : n &gt; 1 } ,
Lrorr(l): {anbnc'd'n: ) | }, andLn^,(f): {anb'c':n&gt; l}.</p>
        <p>DeJinition 2. An n-multigenerativerule-synchronizedgrammar system (n-MGR) is
n+l tuple</p>
        <p>f : ( G t , G z ,. . . , G * Q ) ,
where Gi: (Ni, Ti, Pi, S,) is a context-freegrammarfor eachi: l, ..., fl, and Q is a
finitesetof n-tuplesof the form (pt,pr, ...,pn),wherepi e Pt for all i: l, ...,fl.A
sententialn-form for n-MGR is defined as the sententialn-form for an n-MGN. Let y
: (utA1r1u,2A2r2.,.., u,y'4r)t and X : (utxp1,u2x2v2..,., u,{nvr)aretwo sententianl
form, whereAi € Ni,Lti,ri,xi e (,Mu, Ti)-for all i: 1, ...) n. Letpi: Ai -+ xi € Pi for all
i : I, ..., n and(pv pr,, ..., pn) e Q. Then X directly derives 1 in f, denotedby X =
X. An n-Ianguagefor any n-MGR is defined as the n-Ianguagefor any n-MGN, and a
languagegeneratedby n-MGN in the X mode, for eachX e {union, conc,first}, is
def,rnedasthe languagegeneratedby n-MGR in theX mode.</p>
        <p>
          Example2. f : (Gt, Gz,Q),whereGr : ({St, Ar}, {a, b, c}, {1: 51 -) rzS12,: 51-+
aA1,3:Ar -) bAp,4z A1 --&gt;bc\, Sr),Gz: ({Sz}, {d}, {l: ,S 2-) S2S2,2Szz-+,S23,: 52
-+ d|, Sz),Q : {(1, l), (
          <xref ref-type="bibr" rid="ref2 ref2">2, 2</xref>
          ), (
          <xref ref-type="bibr" rid="ref3 ref3">3, 3</xref>
          ), (
          <xref ref-type="bibr" rid="ref3 ref4">4,3</xref>
          )}, is 2-multigenerativerule-slmchronized
granrmarsystemW.e havez-LQ): {(anb'cn,dn)n: &gt; 1}, Lunion(f):{anb'c':n&gt; l} v
{d': n &gt; l}, L"on"(f): {a'bncn{:n&gt; | }, andLn,,,(f): {e'bnc':n&gt; l}.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3 Results</title>
      <p>t
0 : {Qqr-) /r, Az -+ x2, '.., An ) xr):Ai ) xi e P; for all i : 1, ..., n, and
( A v A z , . . . , A ne) Q ) .
o
.
o</p>
      <sec id="sec-4-1">
        <title>Algorithm 2. Conversionof n-MGR to n-MGN</title>
        <p>Input' n-MGR f : (G', Gz,..., Gn,Q)
O u t p z t . n. - M G N f : 1G , , G r , . . . , G , , Q ) s u c h t h a t n - L ( f ) : n - L ( T )</p>
      </sec>
      <sec id="sec-4-2">
        <title>Method:</title>
        <p>Let Gi: (N,, 7,,Pr,S;)for aIl i : l, ..., n, then:
q : ( N,, Ti, 4 ' S,)for all i: l, "', n, where:</p>
        <p>N , : { &lt; A ,x &gt; : A - ) r
€ P , } u { S r } ,</p>
        <p>4'))'
j;;:,
:-::,,^-l;J"':;:-:;: ;"
ri(a) : {a} for all a e Ti; r1(A) : {&lt;A, x&gt;: A -, x e P;} for all A e Ni.</p>
        <p>Cluim 1. Let f be any n-MGN, let f be any n-MGR and let n-L(f) : n-L(f ). Then,
LAD : LAf ;, for eachX e {union, conc,first}.</p>
        <p>Proof.</p>
        <p>Theorem 1. The classof languagesgeneratedby n-MGN in the X mode, where X e
{union, conc,first} is equivalentto the classof languagegeneratedby n-MGR in the
X mode.</p>
        <p>Proof. This follows from Algorithm l, Algorithm2 andClaim l.</p>
      </sec>
      <sec id="sec-4-3">
        <title>GeneralMultigenerativeGrammarSystems</title>
        <p>Algorithm 3. Conversionof n-MGR in the concatenationmode to matrix grammar
o Input' z-MGR f : (Gr, Gz,..., G,, Q)</p>
        <p>Outpzf.' Matrix grammarH: (G, M) such thatL,o,.(f): L(m</p>
      </sec>
      <sec id="sec-4-4">
        <title>Method:</title>
        <p>Let Gi: (N,, Ti,Pi, Sr)for all i : l, ..., n, andlet for anyj, k : 1,..., fl, whereT
+ ft holds: N1n Np: A; S € N' Then:</p>
        <p>G : (N, T, P, 8, where:</p>
        <p>N : { s }, , ! N) ; r :</p>
        <p>l , r , t
P : {s:S -+ S1S2..S. ,}u ( [J 4 );</p>
        <p>j=l</p>
        <p>M : { t } w { p r p z . . . p n( p: sp z ,. . . ,p , ) e Q } .</p>
        <p>Algorithm 4. Conversionof n-MGR in the first mode to matrix grammar
o Input' zr-MGRf : (Gr, Gz,..., G,, Q)</p>
        <p>Output: Matrix grammarH: (G, rty')suchthatLp,t(f): L(ID</p>
      </sec>
      <sec id="sec-4-5">
        <title>Method:</title>
        <p>Let G; : (Nj, Ti,Pi,,S,)for all i : 1, ..., n, andlet for anyj, k : 1,..., fr, whereT
* ft holds: I,{1a N1,: A; S € /{. Then:
G : (N, T, P, S, where:
,!] t, ) t (!J{ ) to</p>
        <p>l_tn
' t,=Ur;rh(A:) 7 fotalAI e
9*,t
M : { s ) w { p , p r . . . p , t( p t ,p z , . . . ,p , ) e Q } .</p>
        <p>N : { , St}/ N rt ( U { A :A . N , }) ; T : T ;</p>
        <p>
          i=2
P : { s: ,S-&gt; Srft(S2).. h(
          <xref ref-type="bibr" rid="ref5">5,</xref>
          ) } u P1u
(, ln)Vf , l -+ h(x): A -+ x e P,\), whereh ts a homomorphismfrom
i-2
:Ae N,}defineadsh: (a):erorall
Convention: Let p: A -&gt; x be a rule. Then, label p denotesrule h(A) --&gt;h(x).
        </p>
      </sec>
      <sec id="sec-4-6">
        <title>R.LukdiandA. Meduna . c</title>
      </sec>
      <sec id="sec-4-7">
        <title>Method:</title>
        <p>Algorithm 5. Conversion of n-MGR in the union mode to matrix grammar
o Input' n-MGR f : (Gt, Gz,..., Gn,Q)</p>
        <p>Output: Matrix grammarH: (G,Iy') suchthatLunion(D: L(m</p>
        <p>Let G1: (Nl, Ti,Pi, S) for all i : 1, ..., n, andlet for anyj, k: 1,...,fr, whereT
* k holds:N,n Nr: A; S e N7.Then:
G: (N, T, P, S), where:</p>
        <p>
          M : { , st} ( Ui=l N ,) , { lj=)l t V :AeN , } ) T;: li=)l r , t
P : {
s1:,S) ,Srft(S2..).h(
          <xref ref-type="bibr" rid="ref5">5,</xref>
          ),s2:S -) ,(,Sr)S2. . h(
          <xref ref-type="bibr" rid="ref5">5,</xref>
          ), ...
s,: ,S-+ft(Sr)ft(S2)... S),u
( U f ) u ( g t f n - &gt; h ( x ) : A - - &gt; x e P , \ w),h e r eh i s a
homom'orphifsromm(l'llr, ) u (Uq ) t" ; {V : A. N,}
        </p>
        <p>Y' j=r i=r
h(A) : V for all
M : { t t , s 2 ,. . . ,s r } U { p , F r . . . F ,(i p vP z ,. . . , P r )e Q }
defined as:h(a): e for all a el)f,t</p>
        <p>i=l
n t n</p>
        <p>U * ' t
j=l
v { P , P r . . . P ,(:P r ,P z ," ' , P , ) e Q }
Theorem2,For everyn-MGR in the Xmode, whereX e {union, conc,firsl}, thereis
an equivalentmatrix grammar.</p>
        <p>Proof. This follows from Algorithm 3, Algorithm 4 andAlgorithm 5.</p>
      </sec>
      <sec id="sec-4-8">
        <title>GeneraMlultigenerativGerammarSystems</title>
        <p>Algorithm 6. Conversionof matrix grarnmarto 2-MGR
o Input' Matrix grammarH: (G,i1); string w eT., where Iis any alphabet
. Output:2-MGR f : (Gr, Gz,Q); {wt: (wt, ,) e z-L(f)} - L(m
o Method:</p>
        <p>Let G: (N, T, P, 8, then:
G t : G ;
Gz: (Nz,Tz,Pz,S2),where:</p>
        <p>N z : { S z }v { &lt; p p z . . . p k , j &gt; i p t p z . . . p rM, e,l S j &lt; k - t ) ; T z : T ;
P z : { S z 1 &lt; p p z . . .p p , l } : p r p z . . . p re, M , k &gt; - 2 } w
{&lt;prpr...P rj&gt;, + &lt;PtPz'P..t,j+l', prpr....Per,M, k&gt; 2, | &lt;j &lt; k-z)} v
{&lt;prpr...pr,k-l&gt; -) 52:ppz...pr e M, k&gt;2} v
{ S z+ S zp: t . M , l p | : 1 } u
{&lt;ptpr...pr,k-l&gt; -+ w i prpz...pre M, k&gt;2} w
{ S z- + f r , p , e M , l p r l : 1 } ;
Q : {(pr,Sz-+&lt;prpz..p.r, l&gt;): ptpz..p.r e M, k&gt;2} w
{(pi*t,&lt;PrPz".Pr,)P &lt;Ptpz...pk,i+l&gt;p):tpr..P'.r e M, k&gt; 2, | &lt;i &lt; k-2} w
{(pr,&lt;ptpz...pr,k,-l&gt; + 52):prpz...Pre, M, k&gt;-2} w
{ ( p v S z + S 2 ) p: r e M , l p t l : 1 } u
{(pr,&lt;prpz...prk,-,l&gt; -+ w): prpr...pr€, M, k&gt;2} w
{ ( p ' , s z - - &gt;w ) , p t e M ' l p ' t l: 1 } .</p>
        <p>Claim 2. For every matrix grammar H, there is an equivalent 2-MGR in the
concatenationmode.</p>
        <p>Proof. Use Algorithm 6 with matrix grammar H and w : e in the input.
Claim 3. For every matrix granrmar H, there is an equivalent 2-MGR in the first
mode.</p>
        <p>Proof. Use Algorithm 6 with matrix grammarH andany string w eT" in the input. *
Ctuim 4. For every matrix grammar H, there is an equivalent 2-MGR in the union
mode.</p>
        <p>Proof. Use Algorithm 6 with matrix grarnmarH and w in the input, where w is any
string in L(l-l), provided thatL(H) is nonempty.Otherwise, w is any string.
Theorem.S.For every matrix grailrmar,there is an equivalent2-MGR in the X mode,
whereX e {union,conc,first}.</p>
        <p>Proof. This follows from Claim 2, Claim 3 and Claim 4.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>3 Conclusion</title>
      <p>Let .4(n-MGNx) and /(n-MGRx) denotethe languagefamilies defined by n-MGN in
theX mode and n-MGR in the X mode, respectively,whereX e {union, conc,first} ,
let /(H) denote the family of languagesgeneratedby matrix grammars.From the
previousresults,we obtain:
.</p>
      <p>4 H ) : . 4 ( i - M G N r , i &gt; 2 .</p>
      <p>. .1(H):.4(i-MGRx), i &gt; 2.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>L</given-names>
            <surname>Csuhaj-Varju</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Dassow</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Kelemen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Paun</surname>
          </string-name>
          ,Gh.:
          <article-title>GrammarSystems:A Grammatical Approach to Distribution and Cooperation,Gordon</article-title>
          and Breach,London (
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Dassow</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paun</surname>
          </string-name>
          , Gh., and
          <string-name>
            <surname>Rozenberg</surname>
          </string-name>
          ,G.:
          <article-title>Grammar Systems</article-title>
          ,In Handbook of Formal LanguagesR,ozenbergG,. and SalomaaA,. (eds.),
          <source>Volumes2</source>
          , Springer,Berlin (
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Harrison</surname>
          </string-name>
          ,Michael A.:
          <article-title>Introductionto FormalLanguageTheory</article-title>
          .Addison-Wesley,London (l e78)
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Meduna</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <source>Automata and Languages:Theory and Applications</source>
          , Springer, London (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Meduna</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Two-Way Metalinear PC Grammar Systems and Their Descriptional Complexity</article-title>
          ,Acta
          <string-name>
            <surname>Cybernetica</surname>
          </string-name>
          (
          <year>2003</year>
          )
          <fpage>126</fpage>
          -
          <lpage>137</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Paun</surname>
          </string-name>
          , Gh.,
          <string-name>
            <surname>Salomaa</surname>
            ,A. and
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Vicolov</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>On the generativecapacity of parallel communicating grammar systems</article-title>
          .
          <source>International Journal of Computer Mathematics</source>
          <volume>45</volume>
          ,
          <article-title>(tee24)s-se</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Salomaa</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          : FormalLanguagesA,cademicPress,New York (
          <year>1973</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Vaszil</surname>
          </string-name>
          , G.:
          <article-title>On simulatingNon-returningPC grammar systemswith retuming systems</article-title>
          ,
          <source>TheoreticalComputerScience(209)</source>
          l-
          <fpage>2</fpage>
          (
          <year>1998</year>
          )
          <fpage>319</fpage>
          -
          <lpage>329</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>