<?xml version="1.0"?><!DOCTYPE article SYSTEM "/project/take/software/searchbench_offline_processing/paperxml_generator/aclextractor/src/python/../resource/dtd/paperxml.dtd"><article><header><firstpageheader><page local="1"/><title>CONTEXTUAL GRAMMARS</title><author surname="Marcus" givenname="Solomon"><org  name="Institutul de Matematlca Str" country="ROMANIA"/></author></firstpageheader><frontmatter><p><b>CONTEXTUAL GRAMMARS</b></p><p><b>- Solomon Marcus -</b></p><p><b>Institutul de Matematlca Str, Mihal Eminescu, 47 Bucharest 9, ROMANIA</b></p></frontmatter><abstract></abstract></header><body><section title=""><p>In the following, we shall introduce a type of generative grammars, called contextual grammars. They are not comparable with regular grammars. But every language generated by a con­textual grammar is a context-tree language. Generalized con­textual grammars are introduced, which may generate non-con­text-free languages.</p><p>Let   V   be a finite non-void set ; y   is called a vocabu­lary. Every fiuite sequence of elements in   V   is said to be a string on   V. Given a string   x = <i>.^x-Z' </i>* *aa * the number <footnote anchor="11"/> <footnote anchor="18"/>called the length of   x. The string of length zero is called the nufetring and is denoted by <i>c*) , </i>Any set of strings on V is called a language on  V. The set of all strings on   V (the nulVstring inclusively)is called the universal language on V. By   <i>V^- </i>we denote the string   a...a, where   a   is iterated <i>n </i>times.</p><p>Any ordered pair {u,y&gt;   of strings on   V   is said to be a context on   V. The ,        -   string   x   is admitted by the context &lt;u,y&gt; *Lth respect to the language   L if   uyv g <i>L.</i></p><p>Let  .L^   be a finite set of strings on the vocabulary <i>V_ </i>and let<b>^B</b>)be a finite seb of contexts on   V. The triple (V,XV®) (1) is said to be a contextual_grammar ; V.   is the vocabulary of the grammar,       is the base of the grammar and ^^is the contextual component of the grammar.<page local="2"/></p><doubt alpha="0.0" length="5" tooSmall="False" monospace="0.0">- 2 -</doubt><p>let us denote by  G   the contextual grammar defined by ... (1). Consider the smallest language   L   on   V, fulfilling the following two conditions (0) if   xeL_ and   &lt;u,v&gt;e^) , then uxveL.</p><p>The language   1   is said to be the language generated by the contextual grammar   G. This means that the language gene­rated by   G   is the intersection of all languages   L fulfill­ing the conditions (°&lt;)   and .</p><p><b><i>A </i></b>language _L   is said to be a contey-hual language if there exists a contextual grammar   G   which generates L.</p><p><u>Proposition</u> 1« <u>Every finite language is a contextual lan­</u>guage.</p><p><u>Proof</u>. Let   V   be a vocabulary and let        be a finite lan. guage on   V. It is obvious that the contextual grammar <b><i>(V,hA)0), </i></b>where   <i>O   </i>denotes the void set of contexts, generates the lan­guage   L^. The same language may be generated by means of the contextual grammar CY»^»^b» where        is formed by the nuB-context only.</p><p>Two contextual grammars are called <u>equivalent</u> if they gene­rate the same language. The grammars (V,L^,0) and (V,L<b>^(^Z} </b>are equivalent, since they both generate the language I*^;</p><p>The converse of Proposition 1 is not true. Indeed,we have <u>Proposition</u> 2« <u>The universal language is a contextual lan</u>­<u>guage.</u></p><doubt alpha="46.2" length="119" tooSmall="False" monospace="0.0">Proof.Let   V = £&amp;i**2»    * «2aVDenote^7 'J*theuniver­sal language on  V. Let us put   1^ ={cu) and (^)= £ &lt;««*,«1&gt; ,'</doubt><page local="3"/><doubt alpha="0.0" length="5" tooSmall="False" monospace="0.0">- 3 -</doubt><doubt alpha="56.4" length="55" tooSmall="False" monospace="0.0">&lt;6i ,«Lp?   ^..^«u,^ It is easy to see that the grammar</doubt><p><b><i>(.V,Jt^J^j </i></b>generates the universal language on V.</p><p><u>Remarks.</u> If we put, in the proof of Proposition 2, JC«]_=V instead of then the grammar (V,Ifi»^)) does not generate .the universal language on   V, sinoe the language it ge­nerates does not contain the null-string.</p><p>In order to illustrate the activity of the grammar (V,Lj_fdefined in the proof of Proposition 2, let us consider the particular case when the vocabulary <b><i>iS </i></b>formed by two elements only : y =£a.bV. The general form of a string   x   on   V is x = <b>aWV<footnote anchor="2"/>.</b><b>.^<footnote anchor="5"/>^"? </b>, where   1^dx, .ig.dg,... <b>tiptip are</b>arbitrary non-negative integers. In order to generate the string <i>xt </i>we .start with the null-string »  and we apply       times the context   &lt;co ,a&gt;   . The result of this operation is the string</p><doubt alpha="53.7" length="82" tooSmall="False" monospace="0.0">a     ,to which we apply        times the context   &lt;&lt;=«»,b&gt;   and obtain i-i .i-i</doubt><doubt alpha="63.5" length="63" tooSmall="False" monospace="0.0">the stringa"TJ.. Now we apply   i^ times the context &lt;&lt;^o,_a&gt; ,</doubt><doubt alpha="61.7" length="60" tooSmall="False" monospace="0.0">then times the context       ,b)&gt;     and we continue so al-</doubt><doubt alpha="65.6" length="256" tooSmall="False" monospace="0.0">ternatively. When, after   2p-2 steps, we have obtained the stringy=aH^2p^2-.0^a.'^'1b^"1, it is enough to ap­plytiL.esche context &lt;ea,=_&gt;   and, to the string so ob­tained,        times she context &lt;c*j„b&gt;   , in order to generate completely the string x»</doubt><p>Haskell Gurry considered the language   1 = {abf<footnote anchor="1"/>}" (n=l,2,...) as a model of the set of natural numbers [5j „ v/e call   L the language of Gurry.</p><p><u>Proposition</u> 3. <u>The language of Gurry is a contextual lan­guage.</u></p><page local="4"/><doubt alpha="0.0" length="5" tooSmall="False" monospace="0.0">- 4 -</doubt><p><u>Proof.</u> The considered language is generated <b>by </b>the grammar (V.I^,^)), where   V = <i>{a.b\ </i>, 1^ ={«} and<b>{&lt;w,b&gt;} .</b></p><p>We recall that a language is said to be regular if it may be generated by means of a finite automaton (or, equivaleatly, by means of a finite state grammar in the sense of Ohomsky).</p><p><u>Proposition</u> 4. <u>There exists a contextual language which is </u>nft<u>t regular^</u></p><doubt alpha="66.3" length="424" tooSmall="False" monospace="0.0">Proof. Let us consider the language   L ={anb^3(n=l,2,...) If we put   V = {a.bl , L, = {ab} and (ff)=  £&lt;a.b&gt;}, then it is easy to see that   L   is generated by the contextual grammar (V,L-l»^T). On the other hand, L   is not a regular language. This fact was asserted by Chomsky in [3] and [4j, but the proof he gives is wrong. A correct proof of this assertion and a.discus­sion of Chomsky's proof were given in [?\, and</doubt><p>Propositions 2,3 and 4 show that there are many infinite languages which are contextual. This fact may be explained by means of</p><p><u>Proposition</u> 5« <u>If the set        is non-void and if the set</u><b>(1g) </b><u>contains at least one</u> nnn-nnj<u>l context, then the contextual gram­</u>mar^(V.Lj_«(jg)) <u>generates an infinite language.</u></p><p><u>Proof</u>. Since   lq_ is non-void, we may find a string   x be­longing to   L^. Since        contains, at least one non-null context, let  &lt;"u,v&gt;    be a non-null context belonging to<b>(^) </b>« From these assumptions, we infer, that the strings</p><p>uxy , u<footnote anchor="2"/>»?<footnote anchor="2"/>,...,u^xvÄ,.., are mutually distinct' and belong all to the language generated by the grammar   (V,;L,,(^). Thus, this language is infinite.</p><p>The converse of Proposition 5 is true. Indeed', we have<page local="5"/></p><p><u>Proposition</u> 6. <u>If the contextual grammar</u>   (V.I/^feJ!) <u>gene­rates an infinite language, then</u> <i>1^</i><i> </i><u>is non-void, whereas con­tains a non-null context.</u></p><p><u>Proof.</u> Let   L   be the language generated by (V,L, If Lj_ is void, L   is void too, hence it cannot be infinite. If contains no non-null context, we have   L = L-^. But        is in any case finite ; thus, L   is finite, in contradiotion with the hypo­thesis.</p><p>Since there are contextual language which are not regular (see Proposition 4 above), it would be interesting to establish whether all contextual languages are context-free languages. The answer is affirmative :</p><p><u>Pro-no sit ion</u> 7. <u>Every contextual language is a context-free </u>language^,</p><p><u>j&gt;roof</u>. Let   L_ be a contextual language. If _L   is finite, it is a regular language. But it is well known that every regu­lar language is a context-free language.   Therefore, L   is a context-free language. Howe let us suppose that   L   is infinite. Denote by   G = (V.Lj^^j))   a contextual grammar which generates the language   L, In view of Proposition 6, L^ is non-void,whe­reas there exists an integer   i,   1-4 ié.p , such that the con­text   &lt;u±,vi&gt;   is non-null, i.e. at least one of the equalities uA =<b><i>co</i></b><b><i> </i></b>, v^ = <b><i>co</i></b><b><i> </i></b>is false. Let us make a choice and suppose</p><doubt alpha="31.7" length="63" tooSmall="False" monospace="0.0">that   u±4« i Let   Lj = { x^, x2,...6x^ \ and      ^u^ , Vj? ,</doubt><p><b>«^»▼e?-  </b><b>»•••«</b><b>   &lt;.V</b>_vp&gt;} * We define a w)ltext-fr8e grammar ' <b>P   </b>as follows. The terminal vocabulary of <b><i>V </i></b>is   V. The non­terminal vocabulary of <b>P </b>contains one element only- denoted by S   -   which is, of course, the axiom of the grammar <b>P </b>« The ter-<page local="6"/></p><p>minai rules of <b>P </b>are</p><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">S</doubt><doubt alpha="33.3" length="9" tooSmall="False" monospace="0.0">R —&gt; sb ,</doubt><doubt alpha="0.0" length="7" tooSmall="False" monospace="0.0">0« * «0</doubt><p>whereas che non-terminal rules are s -Blä-V-l ,</p><doubt alpha="54.5" length="11" tooSmall="False" monospace="0.0">S—?  UqSvp,</doubt><p>It is obvious thab the number of terminal rules is equal to the number of strings in , whereas the number of non-terminal rules is precisely the number of contexts in Among the non­terminal rules, there is one at least which is non-trivial : it is the rule   S —* u^S.v^ , where   <b><i>n.</i></b><b><i> </i></b><b><i>4</i></b><b>w •</b></p><p>It is not difficult to prove that"the grammar <b>P </b>generates the given language   L. Indeed, the general form of a string in L_ is &lt;üi   f v± &gt;<b>é(^) </b>'    for   s = 1,2,...,p.</p><doubt alpha="66.7" length="15" tooSmall="False" monospace="0.0">where   y€V and</doubt><p>In order to generate the considered string we begin by apply­ing times the rule &gt;</p><doubt alpha="100.0" length="2" tooSmall="False" monospace="0.0">di</doubt><p>In this way, we obtain the expression</p><p>The next step consists in applying times.the rule which yields the expression<page local="7"/></p><p>V uu.s- v; v.</p><doubt alpha="22.2" length="18" tooSmall="False" monospace="0.0">LlLr&gt;.■ *   • 2 -1</doubt><p>Continuing in this way, we arrive, after p-1 steps, to the ex­pression</p><doubt alpha="14.3" length="14" tooSmall="False" monospace="0.0">41é-1*^-1--i*^</doubt><doubt alpha="25.0" length="20" tooSmall="False" monospace="0.0">H*2        ^S-l -D-l</doubt><p>We now apply       times the rule and thus we obtain the expression</p><p><i>J2.      </i>jp-i <i>M s lv </i>àp-i      <i>h </i>4i</p><doubt alpha="63.5" length="63" tooSmall="False" monospace="0.0">% ■ % "' %-lUlçS%   S-lVi2Hwhere, by applying the terminal rule</doubt><doubt alpha="50.0" length="6" tooSmall="False" monospace="0.0">S.—&gt;Zf</doubt><p>the considered string is completely generated. Thus, we have proved that   X   is contained in the langua-ge generated by <b>P ,</b></p><p>Conversely, let   z   be a string generated by P . The ge­neral form of this generation involves several consecutive ap­plications of non-terminal rules (the number of these applica­tions may be eventually equal to zero) followed by one and only one application of a terminal rule. It is easy to see that the result of this generation is always a string of the form (2). Thus we have proved that the language generated by P  is con­tained in   Ii. In view of the preceding considerations,   1 is precisely the language generated by f ,</p><p>Proposition 7 easily permits to obtain simple examples of languages which are not contextual languages.<page local="8"/> For instance, the lan­guage of Kleene^a—] (n=i,2,...), the first example of an infinite langaage which is not regular, is a very simple example of non-contextual language. It is enough to remark that the sequence {n<footnote anchor="2"/>} (a = 1,2,...) contains no subsequence*hich is an infinite therefore for every subsequence of fn<footnote anchor="2"/>J the difference of two conse­cutive terms has the limit equal to +oo when n—&gt;oo). But a result of<i>[A</i><i> </i>] asserts, among others, that given an infinite context-free lan­guage   L, the set of integers which represent the lengths of the strings in 1   contains an infinite arithmetic progression. It follows ■chat the language of Kleene is not context-free and, in view of Pro­position <i>7,</i><i> </i>it is not a contextual language. Tfc« *a«&lt; fact £o|f«vj</p><doubt alpha="0.0" length="5" tooSmall="False" monospace="0.0">- 8 _</doubt><doubt alpha="59.4" length="69" tooSmall="False" monospace="0.0">arithmetic progression (We have (n+1) -n =2n+l   and   lim (2n+l)=oo,</doubt><doubt alpha="60.0" length="5" tooSmall="False" monospace="0.0">n—&gt;oo</doubt><p><b><i>A </i></b>natural question now arrises : Do there exist non-contextual languages among context-free languages V The affirmative answer follows <i>trou toe </i>following remark :</p><p>The converse of Proposition 7 is not true. Indeed, we have</p><p>P<u>roposition</u> 8. <u>There exists a context-free language which</u> is not a contextua<u>l </u><u>language</u>.</p><p>Proof, let   V = In view of a theorem of GruskB <i>C ¥ J</i> _^there exists, for every positive integer   n_, a context-free language   1^ on   V, such that every context-free grammar of contains at least   n   non-terminal symbols. But, as we can see in the proof of Proposition 7, every contextual language may be gene­rated with a context-free grammar containing only one non-terminalsymbol. Therefore, if   n &gt; 2, .1^ is not a contextual language.</p><p>Proposition 8 suggests the natural question whether there exist regular languages which are not contextual languages. The answer is affirmative :<page local="9"/></p><p><u>Proposition</u> 9« <u>There exists a regular language which is not a contextual language.</u></p><p><u>Proof.</u> Let us consider the language   L = •Ç.ab -le lalfr'-j (ffl;&gt;Ç= =1,2,...), which was used by H.B.Curry [5], in order to describe the set of mathematical (true or not) propositions. This language is regular, since it can be generated by the rules   8 —<b><i>&gt; </i></b>Ab, A_—&gt;Ab, <b><i>A:</i></b>—^ Ba, B—&gt; Cc, C_—&gt; Cb , C—&gt; Db, D_—* a. We shall show that L_ is not a contextual language. Indeed, let us admit that the contra­ry holds and let   G = &lt; V,!^, De a contextual grammar of L. Here, the gensral form of a string in   L is where  ytl^ , whereas <i>&lt;a^,y^&gt;        </i>(i = l,2,...,n) and .Px»^**** ...,Pn   are arbitrary positive integers. This means that .u^,u7,... ...,11^ , v1,y2, ...,va   in the expression (3) are formed only by those elements of   V   whose number of occurences in the strings of L   is unlimited. Only   ï&gt;   satisfies this requirement. It follows that in any string of   L  both occurrences of   a and the occurence of _c_  are terms of the string   <b><i>jl   </i></b>in (3). But this implies that the intermediate terms between the occurrences of   a   are terms</p><doubt alpha="16.7" length="18" tooSmall="False" monospace="0.0">&gt;£*... u^xV^...(3)</doubt><p>of   x, hence we can find, two strings   y   and z   such that x = y a|b icaz.</p><doubt alpha="64.9" length="94" tooSmall="False" monospace="0.0">The string   y   is obviously .the null-string co , whereas   z   is of the form  b? , hence '</doubt><p>x <i>m </i>ab-- (c ab.</p><doubt alpha="12.5" length="8" tooSmall="False" monospace="0.0">-    i -</doubt><p>But   ja. may bë here an arbitrary positive integer. Therefore,since x6.<page local="10"/>% » it follows that   1^ is an infinite set of strings. This fact contradicts the assumption concerning   <b>G </b>; L   is not a con­textual language and Proposition 9 is proved.</p><doubt alpha="0.0" length="6" tooSmall="False" monospace="0.0">- 10 -</doubt><p>The contextual grammars may be generalized, in order to ge­nerate some languages which are not oontext-free.</p><p><b>A </b><u>generalized contextual <b>grammar</b></u><b> </b>is a quadruple   <b>G =^V , </b>.I<b>^fLgt </b>t where   <b>V, </b>In and (^)have the same meaning as in bhe definition of a contextual grammar, whereas        is a finite set of strings on the vocabulary _V. We define the language   X &amp;generated by   G_  in the following way :       is a language on V and   x <i>e </i>2g   if and only if we may express x   in the form pl».?-2,••• *Pn »   P   <b><i>are </i></b>Posifcive integers such that <b><i>Vi+p^.t+p^p.</i></b></p><doubt alpha="40.7" length="54" tooSmall="False" monospace="0.0">where   zé^ , y€Lg ,   «u^.v^^g/ for   i=l,2,...,n and</doubt><p>Every language generated by a generalized contextual grammar is said to be a generalized contextual language.</p><p>I£» i-Q the definition of   G, we take   Xg =£coj-, G   is equi­valent to a contextual grammar ; the language T^, is then precisely the language generated by the contextual grammar &lt;V,X1^^&gt;.In­deed, the general form of a string in the contextual language ge­nerated by    &lt;VJXl,^&gt; is</p><doubt alpha="50.0" length="20" tooSmall="False" monospace="0.0">pi.P2pn      Pn P2Pi</doubt><doubt alpha="46.0" length="63" tooSmall="False" monospace="0.0">where  &lt;uit2g&gt;é        (Ji=l,2,...,n) and   ze 1^. We have thus</doubt><doubt alpha="100.0" length="6" tooSmall="False" monospace="0.0">proved</doubt><p><u>Proposition</u> lo. <u>Every contextual language is a generalized contextual language.</u></p><page local="11"/><doubt alpha="0.0" length="6" tooSmall="False" monospace="0.0">- 11 -</doubt><p>We may consider a contextual grammar as a particular case of generalized contextual grammar, by identifying the contextual grammar ^V,I^^^ with the generalized oontextual gramoar^'Y,!^,</p><p>It is interesting to point out that sometjfimes a contextual language may be easy generated by a generalized contextual gram­mar which is not a contextual grammar. For instance, let, us con­sider the language   1 = <b><i>{</i></b>a-b<footnote anchor="0"/>} (n=lt2,...J • In view of the proof of Proposition 4, X   is a contextual language. We may ge­nerate   L   by the generalized contextual grammar (which is not a contextual grammar)   &lt; V, Xj^Xg^^^ , where   V = {a»b}» £osJ , Xg = <b><i>[y^</i></b>, (fp=    [a,<b>cjJ </b>. It is known that   X   is not re­gular. We may give a similar example, with a language which is regular. In this respect let us consider the language of Curry{âAr£ In view of Proposition 3» it is a contextual language. It is a regular language too, since it may be generated by the regular grammar containing the following two rules : &lt;?.—&gt; Sb   and S—&gt;a. Now let us consider the generalized contextual grammar ^V,Xj_, Xg,@&gt; , where   V = {a,b},   3^= {a} , Lg = {b} ={^co,co&gt;/. This grammar generates the language of Curry, but it is not a contextual grammar.</p><p>ïïow let us show that generalized contextual languages are an effective generalization of contextual languages.</p><p><u>Proposi</u>t<u>ion</u> 11. <u>There   .exista a</u> generalized, <u>contextual language which is not a contextual language.</u></p><p><u>Proof</u>. Let us consider the language  X = <i>i.aP</i><b><i>'Xfl</i></b><i>^y  </i>(n=l,2,.») It is known that this language is not context-free (see,for instance,^ <b>J </b>,p.S4). In view of Proposition 7» every contextual language is a context-free language ; hence.<page local="12"/> L.  is not a con­textual language. Now let us consider the generalized contextual grammar   G =   0,%,L2, (§)&gt; <b>t </b>"here   V = , L^ sfcoj, .^{p} and^[)= {&lt;aja&gt;i . It is easy to see that   G   generates the lan­guage T,.</p><p>ïrom the proof of Proposition 11 it follows immediately;</p><p><u>Proposition</u> 12. <u>There exists a generalized contextual lan­</u>g<u>uage which is not</u> « nnntftvt-free language.</p><p>We may now ask whether the converse of Proposition 12 is true. The answer is given by</p><p><u>Proposition</u> 1$. Th<u>ere exists</u>_a_oontext-<u>free langua</u>ge (and even a regular <u>language) which is not a generalized contextual </u>language^</p><p>Proof. We may consider the language   L = {afcmeabn-^ (m,n= the proof of Proposition 9 that   L   is regular. Let us admit that   L_  is a generalized contextual language. Given a string x in   L, its representation is of the form where   s   is a non-negative integer, depending »f   <b><i>z.</i></b><b><i></i></b><b><i> </i></b>But this means that        oontains infinitely many strings. This faot con­tradicts the definition of a generalized contextual grammar. It follows that   L   is not a generalized contextual language.<page local="13"/></p><doubt alpha="64.5" length="62" tooSmall="False" monospace="0.0">=1,2,...) used in the proof of Proposition 9. It was showed in</doubt><doubt alpha="37.1" length="35" tooSmall="False" monospace="0.0">m      r      Pi P?pn      Ppnp2.pl</doubt><doubt alpha="35.9" length="39" tooSmall="False" monospace="0.0">a&gt;-cjld- = u.-jX,^ ... un.z 7 Vn•••v2^1</doubt><doubt alpha="62.1" length="256" tooSmall="False" monospace="0.0">whereOi±,v£&gt;*($(i = 1, ... ,n),z « 1^, y e L2,Pj+...+pn=p-aadG = &lt;y,L1,Lp,^)&gt;   is the grammar of   L. By a reasoning similar to"that used in the proof of Proposition 9, we find that for every positive integerethere exists a string   z   in   Lj_ such that</doubt><doubt alpha="57.1" length="14" tooSmall="False" monospace="0.0">z= abm-cabs- ,</doubt><doubt alpha="0.0" length="6" tooSmall="False" monospace="0.0">- 13 -</doubt><p>It is to be expected that every generalized oontextual lan­guage is a context-sêsitive language. But the construction of the corresponding context-sensitive grammar seems to be very complicated, if we thin* to the generation of the language Ca Va*<footnote anchor="1"/>}.</p><p>Ju.A.Sreider has introduced a new type of grammars, called <u>neighborhood grammars</u> (okrestnostnye grammatiki) and defined in the following way ([4oJ; see àlsôVp^j. Our presentation is some what different). Given a finite set   V   called vocabulary, two strings   x   and  y   on   V, and a context &lt;u,v&gt;    on   V, we say that the pair  {&lt;u.v&gt; ,y} is a neighborhood of   y   with respect to   x   if we can find two strings   z   and   w, such that x=zuyvw. Every pair of the form £&lt;u,v&gt; , y] , where .Cu^v^ is a context on .VI, whereas   y   is a string on   V, is called a neighborhood on V. Let us consider an element 0    which does not belong to   V ; 0   will be called the bou<u>ndary element</u>. A neighborhood grammar is a triple of the form &lt;V, 6 where   V   is a vocabulary, © is the boundary element and      is a finite set of neighborhoods on the vocabulary    VU{S) . Let   L   be a language on   V. tte say that   L   is generated by the considered neighborhood grammar if in' every string   x   of the form   x =Syô    (with   y«L)-and only in such strings -   there exists in        far every term   a^ of <b><i>x=.^.jjfi^,..a.s </i></b>, a neighborhood of with respect to x.</p><p>Neighborhood grammars are closely related to the notion of context, since this notion occurs in the definition of a neigh­borhood. There is anobher notion, due to Ja.P.L.Vasilevskii and<page local="14"/></p><doubt alpha="0.0" length="4" tooSmall="False" monospace="0.0">-14-</doubt><p>M<b>.V.ahony </b>aktiv <b>(seethe reference ia[2],p.4o), »hioh </b>explains this fact. Following these authors, a <b><u>grammar </u></b><u>of <b>contexte</b></u><b> </b>(this name is improper, since no context occurs among <b>its objects) </b>is a triple <b>&lt;^V, 6 <i>,Q^&gt;   </i>, ^rhere   V   </b>and <b>6  </b>have the <b>same meaning as </b>in the definition of a neighborhood grammar, whereas   Q   is a finite set of strings on the vocabulary   <b>VU{8) </b>• This <b>grammar </b>generates the language   <b>L   </b>on   V   in the following way : x€ <b>L </b>if and only if for every string   y   and <b>any </b>strings   z   and <b>w </b>for which there exist strings   u   and   v   such <b>that   </b><b>0x6</b><b> </b><b>=</b><b> = uzywv   </b>we have either</p><doubt alpha="65.4" length="78" tooSmall="False" monospace="0.0">1)y= msp   , where   8€ Q, whereas the strings   m   andpmay be eventuallynull</doubt><doubt alpha="100.0" length="2" tooSmall="False" monospace="0.0">or</doubt><p>2) <b>0x8   </b>= &lt;jrynt, where   <b>qr </b>= z ,   <b>nt = </b><b>_w</b><b> </b>and   ryn   <b>is a </b>string belonging to Q.</p><p><b>A </b>string belonging to   Q   <b>is </b>said to be <u>closed from <b>the </b></u>left (from the right) if its first (last) term is <b>6 . A </b>string belonging to   Q   is said <b>to </b>be <u>closed</u> <b>if </b>it <b>is </b>closed <b>both from </b>the left and <b>fmim the </b>right.</p><p>A grammar of contexts is said to be   k-<u>bounded</u> if every non-closed string of   CJ   is of length   k, whereas every <b>closed </b>string of   ^ is of length not greater than k.</p><p>An important theorem of BoräSev asserts the equivalence between languages generated by neighborhood <b>grammars and lan­</b>guages generated by   k<b>-bounded grammars of </b>contexts <b>([J2.],p.4o).</b></p><p>Since grammars of contexts and contextual grammars have some similarities in their definitions, <b>it is </b>interesting <b>to esta­</b>blish more exactly the relation <b>between them.</b></p><page local="15"/><doubt alpha="0.0" length="6" tooSmall="False" monospace="0.0">- 15 -</doubt><p><u>Proposition</u> 14. <u>There exists a oontextual language jhioh is regular</u>, but which is not a ne<u>ighborhood</u> l<u>anguage.</u></p><p><u>Proof.</u> Let us consider the language <b>L = {a^J </b>(n=l<b>,2,...). </b>This language is regular, since it is generated by the regular grammar consisting in the rules S <b>—</b>? Ta, T<b>—</b>^"Ua , U—^Ta, T—&gt;a, where S is the start symbol, {a} is the terminal vo­cabulary, whereas {S,T,U} is the non-terminal vocabulary. Let us consider the contextual grammar G = ^ {a} ♦{«} • {&lt;T.a»a&gt;j^« <b><i>lb</i></b><b><i> </i></b>is easy to see that G generates the language £ I therefore L   is a contextual language.</p><p>We shall show that   <b><i>L   </i></b>is not a neighborhood language. In this respect, our method will be the following. We shall consider all systems of possible neighborhoods of the terms of the string</p><p>Baa©      and we shall shov; that every such system is either a system of neighborhoods of the terms of every string 6a^6- (n= <b>= 2,3</b>,4,...) or it is not a system of neighborhoods of the terms of the string   ea^ô   . It is easy to see that the first term of the string     Baa 8     admits che following neighborhoods : 1)0 ,</p><doubt alpha="44.6" length="195" tooSmall="False" monospace="0.0">2)ê^t3)6aa,   4)    §aaô     . The second term has the neigh­borhoods : 1)    6a, ~3) aa   ,   4) aaô    ,5)8aa ,   6) ©ja.ô . The neighborhoods of the third term are : 1)   9aa     ,   2) .aa, -</doubt><p><b>3) </b>a» 4) ae , <b>5) </b>6aa0 , <b>6) </b>_aae . The last term has the neighborhoods s 1) 6 , <b>2) </b>a g, , <b>3) </b>aaâ <b>i </b>4) ©aag . The no­tation   uxv   represents hier the neighborhood {&lt;;u,v&gt; ,x} .</p><p>It is easy to see that the fourth neighborhood of the first and of the last term cannot be a neighborhood of 6 with respect to fta^e . On the other hand, a is a neighborhood of <b><i>sl </i></b>with respect to   6an6     for every   n = 1<b>,2,</b>... .It follows that no neighborhood grammar of   1 = {a   <b>J </b>may contain one of the neigh­borhoods  <b><i>±ar&amp;    </i></b>,  0 a £   and   a.<page local="16"/> Thus, if a neighborhood gram­mar of   1   exists, it contains at least one neighborhood from every group of the following four groups of neighborhoods :</p><p>«0 1   »   Öa,   <b>6 </b>a<footnote anchor="2"/> .</p><p>j&amp;)  0 a,   aa,   <b>aafl   </b>,   0 aa , 8aa0.</p><p>y)     8aa,   aa,    a6   ,     Jaa«   , aafl.</p><p>«T)   i ,   a»   , a<footnote anchor="2"/>» . We shall consider all possible combinations between a neigh­borhood of the group ß   and a neighborhood of the group g . By <b><u>inn</u> </b>v;e shall denote the combination formed by the   m-th neigh­borhood of ^   and the n-th neighborhood of y . It is easy to see that every neighborhood grammar containing one of the combina­tions   <b>12, 22, 23, 25, </b>42   generates a language which contains every string   a&amp;   with   n » <b>2. </b>On the other hand, every neigh­borhood grammar containing one of the combinations   11, 13, 14, 15, 21, 24, 31, 32, <b>33, </b>34, 35, 41, 43, 44, 45, 51, 52, 53, 54, <b>55   </b>generates a language which either does not contain the string a^.  or contains every string   a<footnote anchor="11"/>   with   n ^. 2 . (This depends on the fact if the neighborhoods   aa.  or   aa   belong or not to the considered neighborhood grammar). Thus, there exists no neigh­borhood grammar which generates the language -fc<footnote anchor="2"/>^.</p><p>But the definition of (generalized) contextual grammars, though adequate to the investigation of the generative power of purely contextual operations, does not correspond to the situa­tion existing in real (natural or artificial) languages, where every string is admited only by some contexts and every context admits only some strings.<page local="17"/> Let us try to obtain a type of grammar corresponding to this more complex situation. We define a <u>con­textual grammar with choice</u> as a system   G = &lt;!.V<b>,L,^) </b>where Y<b>,Lj_   </b>and ^) are the objects of a contextual grammar, whereas <b>f </b>is a mapping defined on the universal language on   V   and having the values in the set of subsets <b><i>of(^&gt;). </i></b>We define the language generated by   G   as the smallest language   <b>L   </b>having the follow­ing properties     1° If   <b>xtLj^ , x € L </b><b>5 </b>2° If   ye <b>L,   </b>&lt;u<b>,y</b>&gt;e <b><i>&lt;f(y)</i></b><b><i> </i></b>and   <b>zfel^, </b>then   uyv« <b>L,   </b>zyel.  and  <b>yz«L.</b><b> </b>Thus, every string chooses some contexts and every context chooses some strings. We define a contextual language <b>with </b>choice a language which <b>is </b>ge­nerated by a contextual grammar withjcnoice. The investigation of these grammars and languages would better show the generative power of contextual operations, in a manner which corresponds to the situation existing in real languages.</p><page local="18"/><p><u>Heferenoes</u></p><p><b>1. </b>Y.BAH-HXLLEL, M.PEHL1S, B.SHAMIH : <u>On formal -properties <b>of </b></u>si<u>mple phrase structure gramm</u>ars. Zeitschrift fur Phonetik, Sprachwissenschaft und kommunikationsforschung,vol.l4,1961, p.143-172.</p><p><b>2. </b>V.B.BORäÖBV : <u>Ükrestnostnye grammatiki</u>. jSauôno-Techniceskaja Informacija, Serija 2, 1967, Wo.11, p.39-41.</p><p>3. M.CHOfcüSKY : <u>Three models for the description of language.</u>1KB Transactions on Information Theory, <b><i>TS-Z, </i></b>3,1956, p.113-124.</p><p>4. H.CHüLSKY : <u>Syntactic Structures</u> &lt; Gravenhage,1957.</p><p>5. H.CURRY : <u>Some logical aspects of g</u>ramma<u>tical structure</u>. Pro­ceedings of the Symposium in Applied iuathematics, vol.12, Structure of language and its mathematical aspects, Amerjiiath. Soc, 1961, p.56-68.</p><p>6. S.GIIfSBUHG ; <u>The mathematical bbe</u>gry^jaf context-free languages. McGraw-Hill Book Company, New York, 1966.</p><p>7. J<b>«GE</b>£JSKA <b>t </b><u>On a classification of cont</u>ext-free languages. Kybernetika, vol..3, no.l, 1967, p.22-29.</p><p>8. S.ilARCUS : <u>Gramatici si automat</u>e finite. Bditura Academiei B.F.R., Bucuresti,1964.</p><p>9. S.MARCUS : Sur le<u>s grammaires </u><u>A</u><u> </u><u>un nombre d<footnote anchor="1"/> états fini</u>. Ca­hiers de linguistique théorique et appliquée,vol.l,19<footnote anchor="6"/>5»P»,,rf'V&lt;V.</p><p>10. Ju.A.SRETDER s <u>Okrestnostnaja model jazyka.</u> Trudy Simpoziuma po primenenijam poroädajuscioh grammatik. Tartu,septjabr,1967.</p><p>11. Ju.A.äRBIDER : <u>Topologio</u>eak-ie <b>modal</b>-i <b><i>■iav.ykn. </i></b>Vsesojuznyi In­stitut nauônoi i techniSeskoi informaoii, Moscou,1968.</p></section></body></article>