Chomsky Normal Form
A context free grammar is said to be in chomsky normal form (CNF) if all its productions are of the form-
- S → AB
- A → a
S,A,B are non-terminals and a is a terminal.
Above points can be, as
- Non-terminal -> two non terminals
- Non-terminal -> terminal
Example,
S -> AB
A -> a
B -> b
Above grammar is in CNF, because it all productions follow the above wo points of CNF.
What if grammar is not in CNF?
- Eliminate null productions
- Eliminate unit productions
- Eliminate unused production.
Find the grammar in Chomsky Normal form equivalent to S-->aAD;A->aB/bAB;B->b,D->d ?
Ans. Click here.
Related topics :
- Definition of DFA
- DFA notations
- How DFA process inputs
- DFA solved examples
- Minimization of DFA
- Definition of NFA
- Equivalent of DFA and NFA
- Properties of transition functions
- Trape/ Dead state
- Moore machine
- Mealy machine
- Mealy to Moore machine conversion
- Moore to Mealy machine conversion
- Difference between Mealy and Moore machine
- Regular expression
- Regular expression examples
- Regular expresstion to CFG
- Regular expression to Regular grammar
- Ambiguous grammar
- Leftmost and Rightmost derivations
- Arden's Law
- NFA with ∈ moves
- Construct NFA without ∈ moves
- NFA with ∈ to DFA Indirect method
- Context Free Grammars
- Convert CFG in to CNF
- CFL are not closed under intersection
Post a Comment
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.