0 votes 0 votes Let G be the following grammar: S -> aBbD B -> Sc | $\epsilon$ D -> BD | $\epsilon$ How many number of productions will be in G after elimination of all null productions only? sumit chakraborty asked Dec 18, 2017 sumit chakraborty 385 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments sumit chakraborty commented Dec 18, 2017 reply Follow Share But isn't B contains $\epsilon$ and D too contains $\epsilon$ and so putting both in the production of D -> BD we will get one $\epsilon$ ? 0 votes 0 votes Ashwin Kulkarni commented Dec 19, 2017 reply Follow Share We have to remove all epsilons! And in the case that you’re considering is applicable only for start symbol! Only on start symbol we have to preserve that epsilon if generating! Otherwise ignore it 0 votes 0 votes sumit chakraborty commented Dec 19, 2017 reply Follow Share Ok thanks for the clarification 0 votes 0 votes Please log in or register to add a comment.