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


in Chomsky Nomal form ?
asked in Theory of Computation by Active (1.1k points) | 17 views
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 Active (2.7k points)

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

40,903 questions
47,555 answers
62,304 users