Greibach Normal Form
Greibach Normal Form
Greibach Normal Form
FORM
Presented by:-
NEHA JAIN
II-CSE
399/05
GREIBACH NORMAL FORM
IN CNF we put restrictions on the length of
the right sides of a production.
ABC
Aa
Where A,B,C are in V, and a is in T.
λ ε L(G),
There exists an equivalent grammar Ĝ
In
Greibach Normal Form
CONVERSION OF CFG TO GNF
Starting with a grammar: G = ( V, T, P, S)
1a) Eliminate useless variables that can not
become terminals
1b) Eliminate useless variables that can not be
reached
2) Eliminate epsilon productions
3) Eliminate unit productions
4) Convert productions to Chomsky Normal
Form
5) Convert productions to Greibach Normal
Form using algorithm
STEP 1
Every CFG must be in CNF form, if not
then convert it into CNF.
Which is in GNF.
EXAMPLE 3
Convert the
grammar
SAB
ABS | a
BSA | b
into GNF.
SOLUTION:
APPLICATIONS
THANK YOU…