1 votes 1 votes LL grammar for the language $L = \{a^n b^m c^{n+m} \mid m \geq 0, n \geq 0\}$ is $ S \rightarrow aSc \mid S_1 ; S_1 \rightarrow bS_1c \mid \lambda$ $ S \rightarrow aSc \mid S_1 \lambda \mid S_1 \mid \lambda ; S_1 \rightarrow bS_1c $ $ S \rightarrow aSc \mid S_1 \lambda \mid S_1 \mid \lambda ; S_1 \rightarrow bS_1c \mid \lambda$ $ S \rightarrow aSc \mid S_1 \lambda ; S_1 \rightarrow bS_1c \mid \lambda$ Theory of Computation ugcnetsep2013ii theory-of-computation grammar + – go_editor asked Jul 20, 2016 • recategorized May 24, 2020 go_editor 1.5k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Answer is C in option A) n > 0 and m >0 in every condition so m=0 is not satisfied in option B) There is no way to end the cycle S1-> bS1c in option D) same condition as A Kashyap Avinash answered Jul 20, 2016 • edited Jul 21, 2016 by Kashyap Avinash Kashyap Avinash comment Share Follow See all 4 Comments See all 4 4 Comments reply sh!va commented Jul 20, 2016 reply Follow Share Why in option A) n > 0 in every condition so n =0 is not satisfied? I can derive S-> S1 ->bS1c->bλc =bc //n=0 In same way n=0 will be in D also. Moreover I think in C, we have S-> S1 and S-> S1λ both productions are starting with S1 , hence left recursive and ambiguous. C cannot be the answer I think.. Please correct me if I am wrong.! 3 votes 3 votes Kashyap Avinash commented Jul 21, 2016 reply Follow Share check for m = 0 in A and D and S and S1 different check it with pen and paper 0 votes 0 votes LeenSharma commented Jul 21, 2016 reply Follow Share can you give a example of a string for which we can eliminate option(A) and (D) 0 votes 0 votes Rams B commented Jun 12, 2018 reply Follow Share yeah, we can derive ac as well as bc in A. 0 votes 0 votes Please log in or register to add a comment.