The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
22 views
is grammar CFG =    S->AS/epsilon

                                    A->aA/a

in Chomsky Nomal form ?
asked in Theory of Computation by Active (1.6k points) | 22 views
0
i think its not in chomsky normal form.

second prodn should be A->AA /a

1 Answer

0 votes
A grammar is in Chomsky normal form if the productions are of the form:

$$A \rightarrow BC  \;\text{or} \\
A \rightarrow a \; \text{or} \\
S \rightarrow \epsilon$$

where $A,B,C$ are non-terminal symbols and $S$ is the starting symbol and $a$ is a terminal.

In your grammar, due to the presence of $A \rightarrow aA$, it is not in CNF.

It can be converted into CNF by replacing $A \rightarrow aA$ as $A \rightarrow X, X \rightarrow a$.
answered by Loyal (6.1k points)

Related questions

0 votes
1 answer
3
0 votes
1 answer
6
asked Oct 8, 2016 in Theory of Computation by Rahul Jain25 Boss (11.7k points) | 117 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
47,928 questions
52,334 answers
182,380 comments
67,807 users