PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Very high Entry average rating: No information on entry rating
[parent] Greibach normal form (Definition)

A formal grammar $G=(\Sigma,N,P,\sigma)$ is said to be in Greibach normal form if every production has the following form: $$A\to aW$$ where $A \in N$ (a non-terminal symbol), $a \in \Sigma$ (a terminal symbol), and $W\in N^*$ (a word over $N$ ).

A formal grammar in Greibach normal form is a context-free grammar. Moreover, any context-free language not containing the empty word $\lambda$ can be generated by a grammar in Greibach normal form. And if a context-free language $L$ contains $\lambda$ , then $L$ can be generated by a grammar that is in Greibach normal form, with the addition of the production $\sigma \to \lambda$ .

Let $L$ be a context-free language not containing $\lambda$ , and let $G=(\Sigma,N,P,\sigma)$ be a grammar in Greibach normal form generating $L$ . We construct a PDA $M$ from $G$ based on the following specifications:

  1. $M$ has one state $p$ ,
  2. the input alphabet of $M$ is $\Sigma$ ,
  3. the stack alphabet of $M$ is $N$ ,
  4. the initial stack symbol of $M$ is the start symbol $\sigma$ of $G$ ,
  5. the start state of $M$ is the only state of $M$ , namely $p$
  6. there are no final states,
  7. the transition function $T$ of $M$ takes $(p,a,A)$ to the singleton $\lbrace (p,W)\rbrace$ , provided that $A\to aW$ is a production of $G$ . Otherwise, $T(p,a,A)=\varnothing$ .
It can be shown that $L=L(M)$ , the language accepted on empty stack, by $M$ . If we further define $T(p,\lambda,\sigma):=\lbrace (p,\lambda)\rbrace$ , then $M$ accepts $L\cup \lbrace\lambda\rbrace$ . As a result, any context-free language is accepted by some PDA.

Bibliography

1
J.E. Hopcroft, J.D. Ullman, Formal Languages and Their Relation to Automata, Addison-Wesley, (1969).




"Greibach normal form" is owned by CWoo.
(view preamble | get metadata)

View style:

See Also: Chomsky normal form, Kuroda normal form

Other names:  GNF

This object's parent.
Log in to rate this entry.
(view current ratings)

Cross-references: stack, language, singleton, transition function, final states, start state, stack alphabet, alphabet, state, specifications, PDA, generating, addition, contains, generated by, empty word, context-free language, context-free grammar, production, formal grammar
There is 1 reference to this entry.

This is version 4 of Greibach normal form, born on 2009-05-11, modified 2009-08-08.
Object id is 11775, canonical name is GreibachNormalForm.
Accessed 526 times total.

Classification:
AMS MSC68Q42 (Computer science :: Theory of computing :: Grammars and rewriting systems)
 68Q45 (Computer science :: Theory of computing :: Formal languages and automata)

Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add derivation | add example | add (any)