1 votes 1 votes The language of all non-null strings of a's can be defined by a context free grammar as follow : $S \rightarrow a \: S \mid S\: a \mid a$ The word $a^3$ can be generated by ______ different trees. Two Three Four Five Compiler Design compiler-design grammar ugcnetcse-dec2015-paper3 + – shekhar chauhan asked Jun 5, 2016 • edited Jun 5, 2016 by shekhar chauhan shekhar chauhan 4.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 8 votes 8 votes Answer : 4 shekhar chauhan answered Jun 29, 2016 • selected Jan 18, 2017 by Lokesh . shekhar chauhan comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Ans is C: four 1. S=>aS =>aaS =>aaa 2. S=>Sa =>Saa =>aaa 3. S=>aS =>aSa =>aaa 4. S=>Sa =>aSa =>aaa debanjan sarkar answered Jun 5, 2016 debanjan sarkar comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes As it is a CFG we have no need to check if it is left linear or right linear or both. We can generate tree by all of these three combinations . So, number of different trees will be 3 srestha answered Jun 29, 2016 srestha comment Share Follow See 1 comment See all 1 1 comment reply Arjun commented Jun 29, 2016 reply Follow Share 1 missing? 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes formula for this is 2 |W| -1 suryaprakash answered Feb 9, 2018 suryaprakash comment Share Follow See 1 comment See all 1 1 comment reply Prajna commented Jun 16, 2019 reply Follow Share above formula to get the number of steps to derive the given string ... 0 votes 0 votes Please log in or register to add a comment.