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

                                    A->aA/a

in Chomsky Nomal form ?
asked in Theory of Computation by Active (1.3k points) | 20 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 (5.9k points)

Related questions

0 votes
1 answer
2
0 votes
1 answer
5
asked Oct 8, 2016 in Theory of Computation by Rahul Jain25 Boss (11.6k points) | 113 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

44,156 questions
49,640 answers
163,333 comments
65,808 users