- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Explain Chomsky normal form in TOC
Chomsky’s Normal Form Stands as CNF.
A context free grammar is in CNF, if the production rules satisfy one of the following conditions
- If there is start Symbol generating ε. Example − A-> ε
- If a non-terminal generates two non-terminals. Example − S->AB
- If a non-terminal generates a terminal. Example − S->a
Example
Let's take G1 Production rules, as given below −
G1={ S->AB, S->c, A->a, B->b}
G1 satisfies the rule specified for CNF. So, it is in CNF.
Now, let's consider G2 production rules, as shown below
G2={ S->aA, A->a, B->c}
G2 does not satisfy the rules specified for CNF, as S->aA contains a terminal followed by a non-terminal.
So, G2 is not in CNF
Consider another example to check whether the given grammar is in CNF or not.
The grammar is as follows −
S->a|aA|B A->aBB| ε B->Aa|b
The given grammar is not in CNF because, S->aA ,A->aBB, B->Aa contains terminals followed by non-terminals.
- Related Articles
- Explain Chomsky hierarchy in TOC
- Explain the Greibach Normal Form (GNF)
- Explain Arden’s Theorem 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)
- Explain Deterministic Finite Automata in TOC.
- Explain about regular expressions in TOC?
- Explain Type-0 grammar in TOC
- Explain Type-1 grammar in TOC
- Boyce–Codd Normal Form (BCNF)

Advertisements