A new proof technique to establish equivalence of the original and the generatedλ-free CFG with linear increase in size
- 23 Downloads
To generate an equivalentλ-free context free grammar from an arbitrary CFG, the most efficient algorithms described in the literature increase the size of the grammar by a factor, polynomial in terms of the number of nonterminals maximally occuring on the right hand side of a production. In this paper, we present an algorithm to generate aλ-free CFG whose total space requirement (or its size) is limited to seven times the initial size. The correctness of our algorithm is established by using a new proof technique based on the structure of the derivation trees and using a counting argument to establish that if a terminal string can be derived in one grammar, it can also be derived in the other.
Keywords and PhrasesContext-free grammar derivation trees equivalent grammar frontier of a derivation tree λ-free CFG
Unable to display preview. Download preview PDF.
- 1.A. V. Aho and J. D. Ullman,The Theory of Parsing, Translation and Compiling, Volume I:Parsing. Prentice Hall, Englewood Cliffs, N.J., 1972.Google Scholar
- 2.M. Harrison,Introduction to Formal Language Theory. Addison Wesley, Reading, Mass., 1978.Google Scholar
- 3.H. B. Hunt, D. J. Rosenkrantz and T. G. Szymanski,On the equivalence, containment and covering problems for the regular and context-free languages. Journal of Computer and System Sciences, Vol. 12, 1976, pp. 222–268.Google Scholar