1 votes 1 votes Which of the following is not a production of the grammar, which generated the expression 19-25+70? E $\rightarrow$ E+T E $\rightarrow$ ET $\mid$ T T $\rightarrow$ 0 $\mid$ 1 $\mid$ 2 $\mid$ 3 $\mid$ 4 $\mid$ 5 $\mid$ 6 $\mid$ 7 $\mid$ 8 $\mid$ 9 $\mid$ E $\rightarrow$ E - E Theory of Computation grammar + – Sourabh Kumar asked May 21, 2016 • retagged Jun 18, 2019 by Cristine Sourabh Kumar 572 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 7 votes 7 votes E -> E+T cannot generate right grammer It should be replaced by E -> E+E otherwise right grammar generation not possible .like this srestha answered May 26, 2016 • selected Jul 1, 2016 by Sourabh Kumar srestha comment Share Follow See all 4 Comments See all 4 4 Comments reply Praveen Saini commented May 26, 2016 reply Follow Share little correction need in parse tree. 1 votes 1 votes ManojK commented May 26, 2016 reply Follow Share Great srestha . 1 votes 1 votes srestha commented May 26, 2016 reply Follow Share tnks @Manoj @Praveen Sir done ok? 1 votes 1 votes Praveen Saini commented May 26, 2016 reply Follow Share tree while using E->ET 1 votes 1 votes Please log in or register to add a comment.
5 votes 5 votes Every one is necessary. 1) It will generate the Numbers. 2) Will be used for + sign, But due to this it can not generate 10+25. It has to change E-> E + E 3) It is necessary for creating 2 digit number. 4) will be used for - sign Hence Answer is 2. rude answered May 20, 2016 rude comment Share Follow See all 4 Comments See all 4 4 Comments reply ManojK commented May 20, 2016 reply Follow Share Ans given is 2 .which is not possible rt? 0 votes 0 votes rude commented May 20, 2016 reply Follow Share @ManojK Can you think of not using that production and getting the desired expression? 0 votes 0 votes ManojK commented May 20, 2016 reply Follow Share Nopes i am not thinking .Your ans is perfect.I am just telling the ans given of UPPCL org . 0 votes 0 votes rude commented May 24, 2016 reply Follow Share @Arjun sir, please verify this. 0 votes 0 votes Please log in or register to add a comment.