Professional Documents
Culture Documents
(Theoretical Computer Science 1976-Dec Vol. 3 Iss. 3) David S. Wise - A Strong Pumping Lemma For Context-Free Languages (1976) (10.1016 - 0304-3975 (76) 90052-9) - Libgen - Li
(Theoretical Computer Science 1976-Dec Vol. 3 Iss. 3) David S. Wise - A Strong Pumping Lemma For Context-Free Languages (1976) (10.1016 - 0304-3975 (76) 90052-9) - Libgen - Li
*uAy and A =>" vAx => * owe, Proof, As in the proof of Theorem 2 apply Property 2 repeatedly to obtain a sequence of sentential forms z = f,,...,¢1 and nonterminals A; € N such that for 1" wAyy, and A) =>* 0; () ae, vx e, and | nowy, | k. We will begin by determining how some {; might satisfy the claim. Observe that although (2) is not a context-free derivation the derivation (4) of yiax; from A, is independent of the context surrounding A, (Its precisely this fact which allowed us to pass from Property 2 back to Property 1 in Theorem 2.) It any y, or x, is, or is used (in derivation (2)) to derive, a string containing an a then it is, or is used to derive, a string composed entirely of a's. Similarly for a string on b or on ¢. If any » or xi is used to derive some string of a’s then there is some later sentential form g in which yx; a* and 1<|»,x,|*uAy, A) =>" vAx => * owe, and 1S #, (ux) = #. (1 vlek 0. (In fact />|N| because of the definition of n; this fact reappears in the following argument.) Restricting i tuAyy and A, =>" vA,x =>" ows, where (p - q)<#. (ux) 0. Let m now be #,(vx) and notice that m clearly divides n!, Choose i=n!/m or i=2n!/m depending on whether #,(ux)=0 or #.(vx)=0. Then one of the following two sentences is shown to be in L, (where d is a value which doesn’t matte: antnl pret gntanivd or nant prvnted gnednt, a c Both of these sentences violate the definition of L; and, therefore, contradict the existence of G. Gi The esoteric flavor of Property 3 is particularly useful for theorems like the following. Theorem 5. © L2={a"ba™" | m,n >0} cannot be expressed as the intersection of any finite member of context-free languages. Proof. This (by contradiction) follows from a choice of m and n based on the368 DS. Wise finite union of finite I" implied by Property 3 applied to any hypothetical selection of context-free grammars. Corollary 2, La is not a member of the Boolean closure of the deterministic context-free languages [4] Proof. If L, were in that class then it could be expressed as some Boolean combination of deterministic languages in conjunctive normal form. Each conjunct would necessarily be context-free because the class of deterministic languages is closed on complementation, because each deterministic language is context-free, and because context-free languages are closed on union. Theorem 5 does the rest. O 5. Conclusions ‘The examples of the last section demonstrate that Corollary 1 and Theorem 3 do not characterize context-free languages. However, this weakness does not appear in Theorem 1 (which may indeed be necessary and sufficient). Theorem 2 shows that the essence of context-free languages is a pumping property of a finite nature which may appear at different points in the sentence, The pumping may be characterized by the self-embedding chains of a grammar. Alternatively, it may be expressed as a set of finite substitutions on a finite domain, avoiding the terminology of grammati- cal derivations. ‘Therefore, the universal strategy for proving that a language is not context-free (when such is the case) is to assume it is characterized by Property 2 or Property 3 and search for the guaranteed contradiction. Acknowledgement 1 am grateful for the comments of Jan van Leeuwen, of Michael Harrison, and of the referees. Particular thanks are due to John C. Beatty who is responsible for the course of the proof that L; is not context-free using Property 2. References (1) AV. Aho and J.D. Ullman, The Theory of Parsing, Translation and Compiting 1: Parsing (Prentice-Hall, Englewood Clits 1972) (2) ¥. Bar-Hile, M, Perles and E. Shamir, On formal properties of simple phrase structure grammars, Z. Phonetik Sprachwiss. Kommunikat 14 (1961) 143-172. Also ia Y. Bar-Hillel, Language and Information (Addison-Wesley, Reading 1964) [3] N.Chomsky, On certain formal properties of grammars, Information and Control 2 (1988) 137-167.A strong pumping lemma for context-free languages 369 [4] S. Ginsburg and 8. Greibach, Deter: (21966) 620-648, {5} J. van Leeuwen, A generalization of Parikh’s Theorem in formal language theory, Pro. 2nd Collo, on Automata, Languages and Programming, Springer Lecture Notes in Computer Science td (1974) 17-26. [6] W. Ogden, A helpful esult for proving inherent ambiguity, Math. Systems Theory 21968) 191-194 [7] R., Parikh, On context-free languages, J. Assoc. Comput, Mach, 13 (1966) S70-581. {8} M.O. Rabin and D. Scott, Finite automata and their decision problems, IBM J. Res. Develop. 3 (1959) 114-125, Also in E.F. Moore (Bd), Sequential Machines (Addison-Wesley, Reading 1961), [9] A, Salomaa, Formal Languages (Academic Press, New York 1973). istic context-free languages, Information and Control 9