Greibach normal form transformation, revisited

  • Robert Koch
  • Norbert Blum
Automata Theory I
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1200)

Abstract

We develop a direct method for placing a given context-free grammar into Greibach normal form with only polynomial increase of its size; i.e., we don't use any algebraic concept like formal power series. Starting with a cfg G in Chomsky normal form, we will use standard methods for the construction of an equivalent context-free grammar from a finite automaton and vice versa for transformation of G into an equivalent cfg G′ in Greibach normal form. The size of G′ will be O(¦G¦3), where ¦G¦ is the size of G. Moreover, we show that it would be more efficient to apply the algorithm to a context-free grammar in canonical two form, obtaining a context-free grammar where, up to chain rules, the productions fulfill the Greibach normal form properties, and then to use the standard method for chain rule elimination for the transformation of this grammar into Greibach normal form. The size of the constructed grammar is O(¦G¦4) instead of O(¦G¦6), which we would obtain if we transform G into Chomsky normal form and then into Greibach normal form.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    A. V. Aho, and J. D. Ullman, The Theory of Parsing, Translation, and Compiling, Vol. I: Parsing, Prentice-Hall (1972).Google Scholar
  2. 2.
    N. Blum, More on the power of chain rules in context-free grammars, TCS 27 (1983), 287–295.CrossRefGoogle Scholar
  3. 3.
    S. A. Greibach, A new normal-form theorem for context-free, phrase-structure grammars, JACM 12 (1965), 42–52.CrossRefGoogle Scholar
  4. 4.
    M. A. Harrison, Introduction to Formal Language Theory, Addison-Wesley (1978).Google Scholar
  5. 5.
    M. A. Harrison, and A. Yehudai, Eliminating null rules in linear time, The Computer Journal 24 (1981), 156–161.CrossRefGoogle Scholar
  6. 6.
    J. E. Hopcroft, and J. D. Ullman, Introduction to Autmata Theory, Languages, and Computation, Addison-Wesley (1979).Google Scholar
  7. 7.
    A. Kelemenová, Complexity of normal form grammars, TCS 28 (1984), 299–314.CrossRefGoogle Scholar
  8. 8.
    D. J. Rosenkrantz, Matrix equations and normal forms for context-free grammers, JACM 14 (1967), 501–507.CrossRefGoogle Scholar
  9. 9.
    D. Wood, Theory of Computation, Harper & Row (1987).Google Scholar

Copyright information

© Springer-Verlag 1997

Authors and Affiliations

  • Robert Koch
    • 1
  • Norbert Blum
    • 1
  1. 1.Informatik IVUniversität BonnBonnGermany

Personalised recommendations