1,035 views
3 votes
3 votes

There are m variables in a grammar. The number of productions after removal of unit productions in the worst case is ,(Assume there are no null productions)

(a) O(m)
(b) O(m^2)m2m2)

(c) O(k^m)kk^mkm)

(d) O(2^m)2

1 Answer

0 votes
0 votes
Ans (a)

m variable can produce maximum m+1 productions

Related questions

0 votes
0 votes
1 answer
1
Sahil1994 asked Oct 9, 2017
352 views
We need to remover E productions from the grammarVertices-{A,B,C,S} Terminals={a,b,c,E}S->ABACA->aA/EB->bB/EC->c
0 votes
0 votes
2 answers
4
Sanjay Sharma asked Apr 16, 2017
3,016 views