- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

Let G = (V, T, P, S) be a CFL. If every production in P is of the form as given below

A -> aa

Where A is in V, a is in T, and a is in V*, then G is said to be in Greibach Normal Form (GNF).

S -> aAB | bB A -> aA | a

B -> bB | c

- Theorem − Let L be a CFL not containing {s}. Then there exists a GNF grammar G such that L = L(G).
- Lemma 1 − Let L be a CFL. Then there exists a PDA M such that L = LE(M).
- Proof − Assume without loss of generality that s is not in L. The construction can be modified to includes later.

Let G = (V, T, P, S) be a CFG, and assume without loss of generality that G is in GNF.

Construct M = (Q, E, r, 5, q, z, 0) where −

Q = {q}

E = T

r = V

z = S

5: for all a in E and A in r,

5(q, a, A) contains (q, y) if A -> ay is in P or rather −

5(q, a, A) = {(q, y) | A -> ay is in P and y is in r*}, for all a in E and A in r

For a given string x in E*, M will attempt to simulate a leftmost derivation of x with G.

Consider the following CFG in GNF.

S ^ aS S a

Construct M as follows −

Q = {q}

E = T = {a} r = V = {S}

z = S

5(T a S) = {(T S) (T s)}

5(q, s, S) = 0

- Related Questions & Answers
- How to convert CFG to Greibach Normal Form?
- Explain Chomsky normal form in TOC
- First Normal Form (1NF)
- Second Normal Form (2NF)
- Fifth Normal Form (5NF)
- Third Normal Form (3NF)
- Domain-Key Normal Form
- Fourth Normal Form (4NF)
- Sixth Normal Form (6NF)
- Boyce–Codd Normal Form (BCNF)
- Which normal form is the highest that satisfies the functional dependencies(DBMS)?
- Program to decode a run-length form of string into normal form in Python
- Program to encode a string in normal form to its run-length form in Python
- Create an example table that is in its first normal form(DBMS)
- Explain how normal forms can be transformed from lower to higher(DBMS)

Advertisements