<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">On Separations of LR(0)-Grammars by Two Types of Pumping Patterns</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Martin</forename><surname>Plátek</surname></persName>
							<email>martin.platek@mff.cuni.cz</email>
							<affiliation key="aff0">
								<orgName type="department">Department of Computer Science</orgName>
								<orgName type="institution">Charles University</orgName>
								<address>
									<addrLine>Malostranské nám. 25</addrLine>
									<postCode>118 00</postCode>
									<settlement>PRAHA 1</settlement>
									<country key="CZ">Czech Republic</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">František</forename><surname>Mráz</surname></persName>
							<email>frantisek.mraz@mff.cuni.cz</email>
							<affiliation key="aff0">
								<orgName type="department">Department of Computer Science</orgName>
								<orgName type="institution">Charles University</orgName>
								<address>
									<addrLine>Malostranské nám. 25</addrLine>
									<postCode>118 00</postCode>
									<settlement>PRAHA 1</settlement>
									<country key="CZ">Czech Republic</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Dana</forename><surname>Pardubská</surname></persName>
							<email>pardubska@dcs.fmph.uniba.sk</email>
							<affiliation key="aff1">
								<orgName type="department">Department of Computer Science Mlynská Dolina</orgName>
								<orgName type="institution">Comenius University in Bratislava</orgName>
								<address>
									<postCode>84248</postCode>
									<settlement>Bratislava</settlement>
									<country key="SK">Slovakia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Daniel</forename><surname>Průša</surname></persName>
							<affiliation key="aff2">
								<orgName type="department">Department of Cybernetics</orgName>
								<orgName type="institution">Czech Technical University</orgName>
								<address>
									<addrLine>Karlovo nám. 13</addrLine>
									<postCode>121 35</postCode>
									<settlement>Prague 2</settlement>
									<country key="CZ">Czech Republic</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Jiří</forename><surname>Šíma</surname></persName>
							<affiliation key="aff3">
								<orgName type="department">Institute of Computer Science</orgName>
								<orgName type="institution">Czech Academy of Sciences</orgName>
								<address>
									<postBox>P. O. Box 5</postBox>
									<postCode>18207</postCode>
									<settlement>Prague 8</settlement>
									<country key="CZ">Czech Republic</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">On Separations of LR(0)-Grammars by Two Types of Pumping Patterns</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">5EADE722BE1E0DBD16237C9BDCD5991F</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T12:29+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>We present two types of pumping patterns that allow a total separation inside the class of LR(0)grammars. Using the same type of pumping patterns, we obtain a total separation inside of linear LR(0)-grammars.</p><p>This type of study has a long-term motivation from computational linguistics and the area of syntactic error localization. A recent motivation also comes from the field of formal models of neural networks.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>This paper follows the paper <ref type="bibr" target="#b5">[6]</ref>, where we have studied restarting automata recognizing deterministic contextfree languages (DCFL) with a particular type of pumping patterns. This type of pumping patterns ensures the nonregularity of the recognized languages.</p><p>In this paper, we are looking for two types of pumping patterns. The first type of pumping patterns should ensure the non-regularity of the languages recognized by a certain type of restarting automata. In contrast, the second type of pumping patterns should ensure the regularity of the languages recognized by this type of restarting automata. The union of both of these types of pumping patterns should cover all possible pumping patterns defined by the mentioned type of restarting automata.</p><p>Any deterministic context-free language L can be accepted by a LR(1)-analyzer (using lookahead of size 1), but the language L • {$}, where $ is a special end-marker not in the alphabet of L) can be accepted by a LR(0)analyzer <ref type="bibr" target="#b2">[3]</ref>. In <ref type="bibr" target="#b3">[4]</ref>, it was shown that any deterministic context-free language can be accepted by a deterministic monotone restarting automaton. This was proved by simulating any given LR(0)-analyzer by a deterministic monotone restarting automaton. Hence, the computations of such automata were controlled by LR(0)grammars. Therefore, in what follows, we will use constructions based on properties of phrase structures generated by LR(0)-grammars and we will study pumping patterns based on LR(0)-grammars.</p><p>This paper should serve as a step to refine the concepts from <ref type="bibr" target="#b4">[5]</ref>, where it was shown that restarting automata can serve as a formal model for functional generative description (FGD) of a natural language. Functional generative description is a dependency-based descriptive system that has been developed since the 1960's, see esp. <ref type="bibr" target="#b6">[7]</ref>. FGD was originally implemented as a generative procedure, but later its authors have been interested in a more declarative representation. The subject of the paper <ref type="bibr" target="#b4">[5]</ref> concerns the foundations of a reduction system using a complex restarting automaton. The reduction system is more complex than a reduction system for a (shallow) syntactic analyzer since it provides not only the possibility of checking the well-formedness of the (surface) analysis of a sentence, but also its meaning -tectogrammatical representation in terms of FGD. Such a reduction system makes it possible to define the analysis as well as the synthesis of a sentence formally.</p><p>A descriptive system <ref type="bibr" target="#b4">[5]</ref> DS of a natural language L should determine: Let us note that LM is an artificial (formal) unambiguous language, which can be described by a restarting auto-maton controlled by an LR(0)-grammar. An important feature modeled by LM is valency. More about valency can be found in <ref type="bibr" target="#b0">[1]</ref>. There are types of valency features that can be modeled as pumping patterns of non-regular type (e.g., obligatory adjuncts), and there are other valency features that can be modeled as pumping patterns of regular type (e.g., optional adjuncts).</p><p>Another recent motivation for this paper comes from a completely different area. The last results of this paper should support the analysis of analog neuron hierarchy of binary-state neural networks (NNs) with an increasing number of extra analog-state neurons, which has been introduced in <ref type="bibr" target="#b7">[8]</ref> for studying the power of NNs with realistic weights between integers and rational numbers with respect to the Chomsky hierarchy.</p><p>Note that the problem of the regularity of deterministic context-free languages gained attention already in the 60s. Algorithms deciding whether a given deterministic pushdown automaton accepts a regular language were proposed by Stearns <ref type="bibr" target="#b8">[9]</ref> and Valiant <ref type="bibr" target="#b9">[10]</ref>.</p><p>This paper is structured as follows. The next section contains basic notions and basic properties of LR(0)grammars. Section 3 introduces the concepts of our interest and presents the first main result. Section 4 presents the results about total separations. The paper concludes with a summary of future work to be done to fulfill all our plans.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Basic Notions</head><p>We suppose that the reader is familiar with the basics of formal language and automata theory presented, e.g., in <ref type="bibr" target="#b2">[3]</ref>. For technical reasons, we give a list of some notions and definitions related to formal grammars. Context-free grammars. A context-free grammar G is defined by a 4-tuple G = (V, Σ, R, S) where Σ ⊂ V , N = V \ Σ, and N, Σ are finite sets of nonterminal and terminal symbols, respectively, R ⊂ N × V * is a finite relation of rewrite (production) rules, and S ∈ N is the start symbol.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>We use the usual notation</head><formula xml:id="formula_0">A → β ∈ R for a production rule (A, β ) ∈ R. This rule can be applied to u = u 1 Au 2 where u 1 , u 2 ∈ V * , yielding v = u 1 β u 2 , which is denoted as u ⇒ v, or u ⇒ G v. We write u ⇒ R v if the nonterminal A substituted by u ⇒ v is the rightmost nonterminal in u.</formula><p>The grammar G generates the context-free language</p><formula xml:id="formula_1">L(G) = {w ∈ Σ * | S ⇒ * w} where ⇒ * (⇒ * R ) is the re- flexive transitive closure of the binary relation ⇒ (⇒ R ) on V * . Note that L(G) can also be equivalently defined as L(G) = {w ∈ Σ * | S ⇒ *</formula><p>R w}. We write u ⇒ ≤p v for some non-negative integer p if u ⇒ * v and v is derived from u by at most p derivation steps (⇒). A similar meaning has the denotation u ⇒ ≤p R v. In what follows, we will primarily work with the rightmost derivations and write ⇒ instead of ⇒ R .</p><p>Any non-empty context-free language L = L(G) = / 0 can be generated by a reduced context-free grammar G that excludes unreachable and unproductive symbols, that is, for every A ∈ N, there exist α, β ∈ V * such that S ⇒ * αAβ , and for every A ∈ N there is w ∈ Σ * such that A ⇒ * w, respectively. In the following, we work with reduced context-free grammars only.</p><p>We say that a context-free grammar G = (V, Σ, R, S) is linear if the right-hand side of any rule from R contains at most one variable (nonterminal).</p><p>For any non-empty word a 1 • • • a n , with a 1 , . . . , a n ∈ Σ, the derivation S ⇒ * a 1 • • • a n can be described by a derivation tree which is an ordered tree satisfying:</p><p>1. Inner vertices are labeled with nonterminals.</p><p>2. The root is labeled with the start symbol S.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">If inner vertex labeled with nonterminal</head><formula xml:id="formula_2">A ∈ N has children labeled (from left to right) with α 1 , α 2 , . . . , α k ∈ V then A → α 1 α 2 • • • α k ∈ R;</formula><p>A together with the subtrees rooted in its children form a complete branch of the tree.</p><p>4. The leaves in the tree are labeled (from left to right) with the terminal symbols a 1 , . . . , a n ∈ Σ.</p><p>Removing condition 2 we get the definition of a (computation) derivation sub-tree.</p><p>A grammar G is unambiguous if every non-empty string w ∈ L(G) has a unique derivation tree, or equivalently a unique rightmost derivation.</p><p>The results of our paper heavily depend on the characterization of the class of deterministic context-free languages by LR(0)-grammars and corresponding parsers. Following <ref type="bibr" target="#b2">[3]</ref>, we, therefore, give the necessary definitions and the most relevant results.</p><formula xml:id="formula_3">Definition 1. Let G = (V, Σ, R, S) be a context-free gram- mar, N = V \ Σ, γ ∈ V * . A handle of γ is an ordered pair (r, i), r ∈ R, i ≥ 0 such that there exists A ∈ N, α, β ∈ V * and w ∈ Σ * such that (a) S ⇒ * R αAw ⇒ R αβ w = γ, (b) r = A → β , and<label>(</label></formula><formula xml:id="formula_4">c) i = |αβ |. Lemma 1 ([2]</formula><p>). Let G = (V, Σ, R, S) be a reduced contextfree grammar. Then G is unambiguous if and only if every α ∈ V * , such that S ⇒ * R α, has exactly one handle except S, which has none.</p><p>In general, the identification of a handle in a string is not uniquely defined, which is not true for LR(0) grammars. Definition 2. Let G = (V, Σ, R, S) be a reduced contextfree grammar such that S ⇒ + R S is not possible in G. We say G is an LR(0)-grammar if, for each w, w ,</p><formula xml:id="formula_5">x ∈ Σ * , η, α, α , β , β ∈ V * , and A, A ∈ V \ Σ, if (a) S ⇒ * R αAw ⇒ R αβ w = ηw, and (b) S ⇒ * R α A x ⇒ R α β x = ηw imply (A → β , |αβ |) = (A → β , |α β |)</formula><p>Note that as a consequence of the above definition we have that A = A , β = β , α = α , γ = αβ = α β and x = w . Thus, if G is an LR(0)-grammar, then the rightmost derivation of the word w by G and the left-right analysis is unique (deterministic). In this paper, we consider LR(0) grammars rather as analytical grammars. A language generated by an LR(0)-grammar is called LR(0)-language.</p><p>Theorem 1 (LR(0)-language characterization theorem from <ref type="bibr" target="#b2">[3]</ref>). Let L ⊆ Σ * . The following four statements are equivalent.</p><p>(a) L is an LR(0) language.</p><p>(b) L is a deterministic context-free language and for all</p><p>x ∈ Σ + , w, y ∈ Σ * , if w ∈ L, wx ∈ L, and y ∈ L, then yx ∈ L.</p><p>(c) There exists a deterministic pushdown automaton A with a single final state q f and a pushdown symbol Z f such that each word w ∈ L is accepted by A by entering the state q f with Z f as the only symbol in its pushdown.</p><p>(d) There exist strict deterministic languages L 0 and L 1 such that L = L 0 L * 1 . Note that strict deterministic languages are deterministic context-free languages recognizable by empty pushdown, or equivalently prefix-free deterministic contextfree languages.</p><p>Let us recall semi-Dyck languages. Let r ≥ 1, Σ r = {a 1 , . . . , a r }, Σr = { ā1 , . . . , ār } and Σ = Σ r ∪ Σr . The semi-Dyck language D r is the language generated by the grammar G r = (V r , Σ, P, S), where V r = Σ ∪ {S}, and R contains the following production rules:</p><formula xml:id="formula_6">S → Sa i S āi S | λ , for each i, 1 ≤ i ≤ r.</formula><p>Informally, D r is the set of all well-balanced parentheses containing r different pairs of brackets <ref type="bibr" target="#b2">[3]</ref>. The semi-Dyck languages are examples of context-free languages that are not linear context-free languages. Additionally, they can be used to separate LR(0)-languages from the strict deterministic languages.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Theorem 2 ([3]</head><p>). Let D r ⊂ Σ * be the semi-Dyck language for some r ≥ 1. Then D r is an LR(0)-language, but not a strict deterministic language. LR(0)-analyzer. If L is generated by an LR(0)grammar G, then there exists an LR(0)-analyzer P(G) for L with the following important properties (see <ref type="bibr" target="#b2">[3]</ref>):</p><p>(a) For each word w ∈ L, there is exactly one rightmost derivation of w in G, which corresponds to the LR(0)analysis of the word w by P(G).</p><p>(b) Let u be a prefix of the content of the input tape w = uv, which has already been read by a computation of P(G). Then there exists a suffix v such that uv ∈ L iff P(G) did not halt and not reject while reading u.</p><p>Let L ⊆ Σ * be a deterministic context-free language (DCFL), and $ / ∈ Σ. Then, according to <ref type="bibr" target="#b2">[3]</ref>, there are LR(0)-grammar G(0, $) generating the language L • {$}, and a corresponding LR(0)-analyzer P(G(0, $)) of L • {$}; P(G(0, $)) is a deterministic push-down automaton with $ as the rightmost symbol on its input-tape.</p><p>To stress its property, we will sometimes write LR(0,$)grammar instead of grammar G(0, $). We denote the set of LR(0)-grammars by LRG and the set of LR(0,$)-grammars by LRG($). Linear LRG. We say that a context-free grammar G is linear if the right-hand side of any rule from G contains at most one variable (nonterminal). We also consider linear LR(0)-grammars. We denote the linearity by the prefix lin-, and the class of linear LR(0)-grammars as lin-LRG.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Classes of languages.</head><p>In what follows, L (A), where A is some class of grammars, denotes the class of languages generated by grammars from A. E.g., the class of languages generated by linear LR(0)-grammars is denoted by L (lin-LRG).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Pumping by LR(0)-grammars</head><p>The first goal of our paper is to specify properties of deterministic (linear) context-free grammars that assure that the corresponding (linear) language is non-regular. In this section, we show such properties. We start with several definitions and notations. Pumping notions. Let G = (V, Σ, R, S) be an LR(0)grammar generating (analyzing) the language L = L(G), and P(G) be the corresponding LR(0)-analyzer for G. Let w ∈ L(G), w = xu 1 vu 2 y, where x, u 1 , v, u 2 , y ∈ Σ * , u 1 u 2 ∈ Σ + are given by the derivation tree T w from Fig. <ref type="figure" target="#fig_2">1</ref>. The proper sub-trees T 1 and T 2 of T w are (computation) subtrees whose roots are labeled with the same nonterminal A, thus by replacing T 1 with T 2 properly inside of T w , we again get a derivation tree, namely the derivation tree T w(0) for the word w(0) = xvy ∈ L(G).</p><p>Analogously, replacing T 2 with a copy of T 1 , we get the derivation tree T w(2) for a longer word w(2) = xu 2 1 vu 2 2 y. If we repeat i times such replacing of T 2 with T 1 we obtain the derivation tree T w(i+1) for the word w(i+1) = xu i+1 1 vu i+1 2 y. Pumping tree, prefix, infix, pattern and reduction. Let x, u 1 , v, u 2 , A, y, T 1 be as on Fig. <ref type="figure" target="#fig_2">1</ref>. Then we say that P p = xu 1 vu 2 is an (x, u 1 , A, v, u 2 )-pumping prefix by G, P in = xu 1 vu 2 y is an (x, u 1 , A, v, u 2 , y)-pumping infix by G, and that T 1 is a pumping tree of P p . Recall that the LR(0)analysis by P(G) of the prefix P p in any word of the form P p γ is the same, for any γ ∈ Σ * . We say that (u 1 , A, v, u 2 ) is a pumping pattern by G (of P p ). Let us recall that for any z ∈ Σ * , the LR(0)-analyzer P(G)) reduces xu 1 vu 2 z into xvz. We write xu 1 vu 2 z ⇐ P(G) xvz, and say that xu 1 vu 2 z ⇐ P(G)</p><formula xml:id="formula_7">d d d d d d d d d d d d d d A d d A x u 1 v u 2 y T 2 T 1 T w Figure 1:</formula><p>The structure of a derivation tree.</p><p>xvz is an (x, u 1 , A, v, u 2 )-pumping reduction by G. Note that the word xu 1 vu 2 z needs not be a word from L(G).</p><p>We will often say in the following that (x, u 1 , A, v, u 2 ) is a pumping prefix and that (x, u 1 , A, v, u 2 , y) is a pumping infix.</p><p>Elementary infix etc. We say that an (x, u 1 , A, v, u 2 , y)pumping infix by G is elementary if the (x, u 1 , A, v, u 2 )pumping reduction is the only and, at the same time, the last pumping reduction by G that can be performed inside of the word xu 1 vu 2 y, i.e. xvy cannot be reduced by any pumping reduction by G at all. In this case, we say that (x, u 1 , A, v, u 2 ) is an elementary pumping prefix, and that (u 1 , A, v, u 2 ) is an elementary pumping pattern by G.</p><p>Let us note that the corresponding elementally pumping tree T 1 does contain an internal node with the same nonterminal as the root of T 1 , and does not contain any other repetition of a nonterminal on any path from its root to a leaf. While the size (the number of terminal symbols) of a pumping infix by G is unbounded, there exists a constant c &gt; 0 that depends on the number of terminals and nonterminals, and the length of rules of G such that any elementary pumping infix by G is of size at most c.</p><p>We can see the following obvious proposition that summarizes the (pumping) properties of LR(0)-grammars, which we will use in the following text. It is a direct consequence of the previous definitions and the properties of LR(0)-grammars and their analyzers summarized in <ref type="bibr" target="#b2">[3]</ref>, and inspired by <ref type="bibr" target="#b8">[9]</ref>. Proposition 1. Let G = (V, Σ, R, S) be an LR(0)-grammar generating (analyzing) the language L = L(G). Let a word P p = xu 1 vu 2 be an (x, u 1 , A, v, u 2 )-pumping prefix by G, and xu 1 u 1 vu 2 u 2 ⇐ P(G) xu 1 vu 2 be an (xu 1 , u 1 , A, v, u 2 )-pumping reduction by G. Then (a) Any w ∈ L determines its derivation tree T w by G unambiguously.</p><p>(b) P p determines its pumping sub-tree unambiguously. (e) An (x, u 1 , A, v, u 2 )-pumping prefix by G, and the pumping pattern (u 1 , A, v, u 2 ) determine unambiguously a single pumping reduction.</p><formula xml:id="formula_8">(c) xu m 1 u 1 vu 2 u 2 n z ⇐ P(G) xu m 1 vu 2 n z is an (xu m 1 , u 1 , A, v, u<label>2</label></formula><formula xml:id="formula_9">(f) xu n 1 vu m 2 z ∈ L iff xu n+k 1 vu m+k 2 z ∈ L for any m, n, k ≥ 0.</formula><p>Assertion (c) is essential for our further considerations. It shows that, for a non-empty u 1 , the distance of the place of pumping from the left end is not limited, and that the position of pumping is determined both by the pumping pattern of a pumping reduction and the pumping prefix of the pumping reduction. We use this property in the following definition formalizing a non-regular type of pumping. The pumping notions can be illustrated in Fig. <ref type="figure" target="#fig_3">2</ref> with a derivation tree for w = xaabby ∈ L(G), where x ∈ a * ,y ∈ b * . We can see, by taking x = a, that P p = aaabb is an (a, a, S 1 , ab, b)-pumping prefix by G, and that T 1 is a pumping tree of P p . Pumping pattern of P p by G is We say that A is a distinguishing nonterminal for G, and xu 1 vu 2 ⇐ P(G) xv is an (x, u 1 , A, v, u 2 )-distinguishing reduction by G if at least one of the following conditions is true: (I) for some y ∈ Σ * there is a p &gt; 0 such that xvy ∈ L iff xvu p j 2 y / ∈ L, for all j &gt; 0;</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head></head><label></label><figDesc>(a) The set LC of all correct sentences of the language L. (b) The set LM of all correct meaning descriptions of the language L. LM represents all meanings of all sentences in LC. (c) A relation SH ⊆ LC × LM between LC and LM. The relation describes the ambiguity and the synonymy of L.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head></head><label></label><figDesc>)-pumping reduction by G for any m, n &gt; 0, and any z ∈ Σ * . (d) xu 1 vu 2 z ∈ L iff xu m 1 vu m 2 z ∈ L for any m ≥ 0, and any z ∈ Σ * .</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Example 1 .•</head><label>1</label><figDesc>Consider the non-regular context-free language L ab = {a n b n | n ∈ N}, that can be generated by the grammar G = ({S, S 1 , a, b}, {a, b}, R, S)), with the following set of rules R:S → S 1 S 1 → aS 1 b | abThe grammar is reduced and unambiguous. Consider the sentence γ = aaabbb.• The handle of γ (cf. Definition 1) is the pair (S 1 → ab, 4), as S ⇒ * R aaS 1 bb ⇒ R aaabbb and the division of γ into α, β , w is unique: G is an LR(0)-grammar, moreover, linear as(a) S ⇒ * R αAw ⇒ R αβ w = ηw (b) S ⇒ * R α A x ⇒ R α β x = ηw obviously implies (A → β , |αβ |) = (A → β , |α β |)</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2: The structure of a derivation tree.</figDesc></figure>
		</body>
		<back>

			<div type="funding">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>* Supported partially by the grant GA19-05704S of the Czech Science Foundation and by the institutional support RVO: 67985807.</p><p>† Supported by the grant 1/0601/20 of the Slovak Scientific Grant Agency VEGA.</p><p>‡ Supported by the grant GA19-21198S of the Czech Science Foundation.</p></div>
			</div>

			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>(II) for some y ∈ Σ * , there is a p &gt; 0 such that xvy ∈ L iff xu p j 1 vy / ∈ L, for all j &gt; 0.</p><p>We say that the tuple (u 1 , A, v, u 2 ) is a distinguishing pattern for G.</p><p>If G contains a distinguishing nonterminal (pattern) then we call G a distinguishing LR(0)-grammar (denoted dist-LRG).</p><p>For the sake of accuracy, we also say that A is an (x, u 1 , A, v, u 2 )-distinguishing nonterminal for G.</p><p>Example 1 (continued). According to case (I) of Definition 3 the nonterminal S 1 is a distinguishing nonterminal and aabb ⇐ P(G) ab is a (λ , a, S 1 , ab, b)-distinguishing reduction for y = λ , and p = 1. Thus, (a, S 1 , ab, b) is a distinguishing pattern for G.</p><p>Let us recall that the class of LR(0)-languages is not closed under complement (see <ref type="bibr" target="#b1">[2]</ref>), but DCFL is closed under complement.</p><p>Example 1 (continued). The language L abc = c + • L ab can be generated by LR(0) grammar G abc = ({S, S 1 , S 2 , a, b, c}, {a, b, c}, R, S), with the set of rules R :</p><p>Then, analogously to the situation in L ab , nonterminal S 1 is distinguishing, and there is a (c, a, S 1 , ab, b)distinguishing reduction based on case (I) of Definition 3; here, we can take again y = λ , and p = 1. On the other hand, (c, S 2 , ab, λ ) is a pumping pattern by G abc , which is not distinguishing for any (x, c, S 2 , ab, λ )-reduction by G abc ; thus (c, S 2 , ab, λ ) is a non-distinguishing pumping pattern by G abc .</p><p>Lemma 2. Let G = (V, Σ, R, S) be a dist-LR(0)-grammar. Let (u 1 , A, v, u 2 ) be a distinguishing pattern by G. Then u 1 , u 2 ∈ Σ + . Proof. Assume, for example, that condition (I) from Definition 3 holds. It is then clear that u 2 = λ , otherwise xvu p j 2 y = xvy for all p, j &gt; 0. It is also easy to see that u 1 = λ . If u 1 = λ , we get from Proposition 1 that xvu pm 2 y ∈ L and we have xvu pm 2 u p 2 y / ∈ L for all m ≥ 0 and some p &gt; 0. The first fact yields xvu p 2 y ∈ L for m = 1, the second fact yields xvu p 2 y / ∈ L for m = 0. This is a contradiction.</p><p>The existence of a distinguishing nonterminal serves as a sufficient condition for non-regularity.</p><p>Theorem 3. Let L = L(G) be a language accepted by a dist-LR(0)-grammar G = (V, Σ, R, S). Then L is a nonregular language.</p><p>Proof. Assume, for a contradiction, that G = (V, Σ, R, S) is a dist-LR(0)-grammar generating a regular language L = L(G) and B be an</p><p>As L is regular, there exists a deterministic finite automaton A = (Q, Σ, δ , q 0 , F) with n A = |Q| states accepting the language L = L(A). The proof then follows by the case analysis based on properties of the (x, u 1 , B, v, u 2 )distinguishing pattern. Since there is an analogy of the case analysis, we will prove the theorem only by the assumption that condition (I) from Definition 3 is fulfilled.</p><p>Suppose that for some y ∈ Σ * and p &gt; 0 it holds xvy ∈ L, and, for all j &gt; 0, xvu p• j 2 y / ∈ L. Proposition 1 implies that xu pm 1 vu pm 2 y ∈ L for all m ≥ 0 and xu pm 1 vu p(m+ j) 2 y / ∈ L for all m ≥ 0, j &gt; 0, and Lemma 2 implies that u 1 , u 2 ∈ Σ + . Let us inspect states reachable by the automaton A when reading words of the form xu pm 1 vu pk 2 , for m &gt; n A , k ≥ 0. Since A has n A states, the pigeonhole principle yields that there are integers r, s, 1 ≤ r &lt; s ≤ n A + 1 and a state q of A such that</p><p>As y, which is again a contradiction.</p><p>The previous proof yields the following corollary.</p><p>Corollary 1. Let G = (V, Σ, R, S) be a dist-LR(0)grammar. Let (x, u 1 , A, v, u 2 ) be a distinguishing prefix by G, and P in be an (x, u 1 , A, v, u 2 , y)-infix by G. Then the language L(G) ∩ {xu n 1 vu m 2 y | n ≥ 0, m ≥ 0} is not a regular language.</p><p>We will use the following definition to stress the ability of LR(0)-grammars to define DCFL. Definition 4. Let G be an LRG(0, $) grammar which generates L(G) = L{$}, where L ⊆ Σ * . We say that G is an LRG(1)-grammar which defines L.</p><p>We take</p><p>In what follows, the sign ⊂ means a proper subset.</p><p>Theorem 4. It holds the following:</p><p>Proof. All inclusions (a)-(d) follow from the fact that, according to Theorem 3, all languages generated (accepted) by distinguishing LR(0)-grammars are non-regular, while both L (lin-LRG) and L (lin-LRG(1)) contain all regular languages. The equality (e) is just the fact that for any deterministic context-free language L ⊆ Σ * , where $ ∈ Σ, the language L{$} is accepted by an LR(0)-grammar <ref type="bibr" target="#b2">[3]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Some total separations inside of LR(0)-languages</head><p>While the size of distinguishing pumping patterns is unbounded, the size of elementary pumping patterns for a given grammar is limited. Therefore, below we introduce a condition that implies non-regularity of a language generated by an LR(0)-grammar based on elementary pumping patterns only.</p><p>Definition 5. Let G = (V, Σ, R, S) be an LR(0)-grammar and α = (x, u 1 , A, v, u 2 , y) be an elementary pumping infix by G. We say that α is regular if the language L(G,</p><p>We say that G is an elementary-regular grammar if all elementary pumping infixes by G are regular. We denote the class of elementary-regular grammars by the prefix er-.</p><p>We say that G is an elementary-non-regular grammar if there exists an elementary non-regular pumping infix by G.</p><p>We denote the class of elementary non-regular grammars by the prefix enr-.</p><p>We say that a language L is an elementary-non-regular language if an elementary-non-regular LR(0)-grammar G exists such that L(G) = L. The property being elementarynon-regular we mark by the prefix enr-and the class of elementary-non-regular grammars is denoted as enr-LRG. Similarly, the prefix er-will denote the property being elementary-regular.</p><p>We say that a language L ∈ L (LR(0)) is an elementaryregular language if there is not any elementary-nonregular LR(0)-grammar G such that L(G) = L. We denote the class of elementary-regular languages as L (er-LGR).</p><p>The next corollary follows from the previous definition and Corollary 1.</p><p>Corollary 2. Let G = (V, Σ, R, S) be a dist-LR(0)grammar. Let (x, u 1 , A, v, u 2 ) be a distinguishing elementary prefix by G, and α = (x, u 1 , A, v, u 2 , y) be a pumping infix by G. Then the language L(G) is an elementary-nonregular language.</p><p>Theorem 5. Let L be an elementary-non-regular language. Then L is not a regular language.</p><p>Proof. Let G be an elementary-non-regular LR(0)grammar such that L(G) = L. Let α = (x, u 1 , A, v, u 2 , y) be a non-regular pumping infix by G. The facts that</p><p>is a regular language and L ∩ L is not a regular language imply that L is not regular, because regular languages are closed under the intersection operation.</p><p>For the opposite direction that each non-regular language L generated by an LR(0)-grammar is elementarynon-regular, we still do not have proof.</p><p>The next corollary presents our current results about total separations achieved by LR(0)-grammars. We consider these results important from the point of view of our motivations mentioned in the introduction. The corollary is mainly a consequence of Definition 5. What remains is a further study of relations between the class of regular languages and the classes of languages generated by LR(0)-grammars that are not distinguishing or elementary-regular. We believe that the following conjectures hold. Above, in Corollary 2, we have seen that if an elementary pumping prefix is distinguishing for an LR(0)grammar G, we can obtain a non-regular pumping infix for G. We conjecture that also the opposite direction holds.</p><p>Conjecture 2. Let G = (V, Σ, R, S) be an LR(0)-grammar and (x, u 1 , A, v, u 2 , y) be a pumping infix by G. If (x, u 1 , A, v, u 2 , y) is non-regular pumping infix by G then (u 1 , A, v, u 2 ) is a distinguishing pattern for G.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Conclusion and Future Work</head><p>It remains yet some work to do in order to fulfill our plans mentioned in the introduction and show our conjectures. It also remains to show the relation between elementary nonregular pumping patterns and distinguishing pumping patterns, and between elementary regular pumping patterns and non-distinguishing pumping patterns. We believe that we will make that in the near future.</p><p>We also plan to show that the distinguishing pumping and the non-distinguishing pumping by LR(0)-grammars can be characterized by pumping patterns of limited size (e.g., elementary pumping patterns) depending only on corresponding LR(0)-grammars. Such patterns could help with proving the decidability of the problem whether an LR(0)-grammar is distinguishing or not. After that, we plan to present the mentioned transformation to restarting automata controlled by LR(0)-grammars. This step will open a broad field on studying the descriptional complexity of DCFL and its subclasses. One interesting type of descriptional complexity will be the degree of non-regularity of DCFL and some of its subclasses. Similarly, a degree of regularity of a deterministic context-free language can be measured.</p><p>Finally, let us note that total separations of the presented type have essential importance for computational and comparative linguistic, and for expressing of properties of programming languages. We can, in this way, formally express, e.g., the (non-)existence of obligatory adjuncts in a natural language (or in a sentence of it) or the use of different types of parenthesis in a programming language.</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Prague dependency treebank 2.5 -a revisited version of PDT 2.0</title>
		<author>
			<persName><forename type="first">E</forename><surname>Bejček</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Panevová</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Popelka</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Straňák</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Sevčíková</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Štěpánek</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Z</forename><surname>Žabokrtský</surname></persName>
		</author>
		<ptr target="https://www.aclweb.org/anthology/C12-1015/" />
	</analytic>
	<monogr>
		<title level="m">24th International Conference on Computational Linguistics, Proceedings of the Conference: Technical Papers</title>
				<editor>
			<persName><forename type="first">M</forename><surname>Kay</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">C</forename><surname>Boitet</surname></persName>
		</editor>
		<meeting><address><addrLine>Mumbai, India</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2012">cember 2012. 2012</date>
			<biblScope unit="page" from="231" to="246" />
		</imprint>
		<respStmt>
			<orgName>Indian Institute of Technology Bombay</orgName>
		</respStmt>
	</monogr>
	<note>COLING 2012</note>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">On LR(k) grammars and languages</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">M</forename><surname>Geller</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">A</forename><surname>Harrison</surname></persName>
		</author>
		<idno type="DOI">10.1016/0304</idno>
		<idno>-3975(77)90013-5</idno>
		<ptr target="https://doi.org/10.1016/0304" />
	</analytic>
	<monogr>
		<title level="j">Theor. Comput. Sci</title>
		<imprint>
			<biblScope unit="volume">4</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="245" to="276" />
			<date type="published" when="1977">1977</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Introduction to formal language theory</title>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">A</forename><surname>Harrison</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Series in computer science</title>
				<imprint>
			<publisher>Addison-Wesley Longman Publishing Co., Inc</publisher>
			<date type="published" when="1978">1978</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Restarting automata</title>
		<author>
			<persName><forename type="first">P</forename><surname>Jančar</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Mráz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Plátek</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Vogel</surname></persName>
		</author>
		<idno type="DOI">10.1007/3-540</idno>
		<idno>-60249-6_60</idno>
		<ptr target="https://doi.org/10.1007/3-540" />
	</analytic>
	<monogr>
		<title level="m">Fundamentals of Computation Theory, 10th International Symposium, FCT &apos;95</title>
		<title level="s">Proceedings. Lecture Notes in Computer Science</title>
		<editor>
			<persName><forename type="first">H</forename><surname>Reichel</surname></persName>
		</editor>
		<meeting><address><addrLine>Dresden, Germany</addrLine></address></meeting>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="1995">August 22-25, 1995. 1995</date>
			<biblScope unit="volume">965</biblScope>
			<biblScope unit="page" from="283" to="292" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Towards a formal model for functional generative description: Analysis by reduction and restarting automata</title>
		<author>
			<persName><forename type="first">M</forename><surname>Lopatková</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Plátek</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Sgall</surname></persName>
		</author>
		<ptr target="http://ufal.mff.cuni.cz/pbml/87/lopatkova-et-al.pdf" />
	</analytic>
	<monogr>
		<title level="j">Prague Bull. Math. Linguistics</title>
		<imprint>
			<biblScope unit="volume">87</biblScope>
			<biblScope unit="page" from="7" to="26" />
			<date type="published" when="2007">2007</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Pumping deterministic monotone restarting automata and DCFL</title>
		<author>
			<persName><forename type="first">F</forename><surname>Mráz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Pardubská</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Plátek</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Šíma</surname></persName>
		</author>
		<ptr target="http://ceur-ws.org/Vol-2718/paper13.pdf" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 20th Conference Information Technologies -Applications and Theory (ITAT 2020)</title>
		<title level="s">CEUR Workshop Proceedings</title>
		<editor>
			<persName><forename type="first">M</forename><surname>Holena</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">T</forename><surname>Horváth</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">A</forename><surname>Kelemenová</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">F</forename><surname>Mráz</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">D</forename><surname>Pardubská</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">M</forename><surname>Plátek</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">P</forename><surname>Sosík</surname></persName>
		</editor>
		<meeting>the 20th Conference Information Technologies -Applications and Theory (ITAT 2020)<address><addrLine>Hotel Tyrapol, Oravská Lesná, Slovakia</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2020">September 18-22, 2020. 2020</date>
			<biblScope unit="volume">2718</biblScope>
			<biblScope unit="page" from="51" to="58" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<monogr>
		<title level="m" type="main">A functional approach to syntax in generative description of language</title>
		<author>
			<persName><forename type="first">P</forename><surname>Sgall</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Goralčíková</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Nebeský</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Hajičová</surname></persName>
		</author>
		<imprint>
			<date type="published" when="1969">1969</date>
			<publisher>American Elsevier Publishing Company, Inc</publisher>
			<pubPlace>New York</pubPlace>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">One analog neuron cannot recognize deterministic context-free languages</title>
		<author>
			<persName><forename type="first">J</forename><surname>Šíma</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Plátek</surname></persName>
		</author>
		<idno type="DOI">10.1007/978-3-030-36718-3_7</idno>
		<ptr target="https://doi.org/10.1007/978-3-030-36718-3_7" />
	</analytic>
	<monogr>
		<title level="m">Neural Information Processing -26th International Conference, ICONIP 2019</title>
		<title level="s">Proceedings, Part III. Lecture Notes in Computer Science</title>
		<editor>
			<persName><forename type="first">T</forename><surname>Gedeon</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">K</forename><forename type="middle">W</forename><surname>Wong</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">M</forename><surname>Lee</surname></persName>
		</editor>
		<meeting><address><addrLine>Sydney, NSW, Australia</addrLine></address></meeting>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2019">December 12-15, 2019. 2019</date>
			<biblScope unit="volume">11955</biblScope>
			<biblScope unit="page" from="77" to="89" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">A regularity test for pushdown machines</title>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">E</forename><surname>Stearns</surname></persName>
		</author>
		<idno type="DOI">10.1016/S0019-9958(67)90591-8</idno>
		<ptr target="https://doi.org/10.1016/S0019-9958(67)90591-8" />
	</analytic>
	<monogr>
		<title level="j">Inf. Control</title>
		<imprint>
			<biblScope unit="volume">11</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="323" to="340" />
			<date type="published" when="1967">1967</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Regularity and related problems for deterministic pushdown automata</title>
		<author>
			<persName><forename type="first">L</forename><forename type="middle">G</forename><surname>Valiant</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Journal of the ACM</title>
		<imprint>
			<biblScope unit="volume">22</biblScope>
			<biblScope unit="page" from="1" to="10" />
			<date type="published" when="1975">1975</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
