188 views
0 votes
0 votes
is grammar CFG =    S->AS/epsilon

                                    A->aA/a

in Chomsky Nomal form ?

1 Answer

0 votes
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$.

Related questions

1 votes
1 votes
1 answer
1
atul_21 asked Jul 4, 2017
329 views
Consider the statements:S1: Regular Expression for the language over the alphabet Σ={a} containing strings whose length is either multiple of 2 or a multiple of 3 (this ...
0 votes
0 votes
2 answers
2
1 votes
1 votes
1 answer
3
0 votes
0 votes
3 answers
4
Anmol Verma asked Nov 30, 2016
2,266 views
S->AbaCA->BCB->b/epsilonC->D/epsilonD->d I want to know that will A contain epsilon as B and C both are null variables???(In Elimination of epsilon-production)