The Gateway to Computer Science Excellence
+1 vote
1.3k views

Is it mandatory in GNF that first element in production must be terminal(I am considering there is no Left recursion)


Is it mandatory in CNF that in production only two nonterminal or terminal should be there 

Can we not take in one production as

two nonterminal and one terminal 

OR

one terminal and two nonterminal

in Theory of Computation by Active (3.2k points) | 1.3k views
0

Is it mandatory in GNF that first element in production must be terminal(I am considering there is no Left recursion).

Yes this is mandatory.

Is it mandatory in CNF that in production only two nonterminal or terminal should be there.

This is also mandatory.

0
For CNF can we write like this

S->aAB or S->ABa
0

Is this GNF

+1
No.

S->aAB is in gnf and second one is not in any of them
0
Okk what about image GNF
0
Not in gnf

first production E1-> E# is not in gnf

E->(E)Z also not in gnf.

just follow the definition  of cnf and gnf.
0

Thanks 

To avoid left recursion can  we do like this I think this is wrong

Please log in or register to answer this question.

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
50,654 questions
56,169 answers
193,876 comments
94,298 users