8 8 votes Consider the following grammar. $S \rightarrow AB$ $A \rightarrow a$ $A \rightarrow BaB$ $B \rightarrow bbA$ Which of the following statements is FALSE? The length of every string produced by this grammar is even No string produced by this grammar has three consecutive $a's$ The length of substring produced by $B$ is always odd No string produced by this grammar has four consecutive $b's$ Compiler Design isro2014 compiler-design grammar parsing + – go_editor 8.3k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 13 13 votes S->AB S->aB S->abbA S->abbBaB S->abbbbAabbA S->abbbbaabba Given Grammar can produce a string which has 4 consecutive b's. Hence,Option(D)No string produced by this grammar has four consecutive b's. LeenSharma answered Jul 1, 2016 • selected Aug 28, 2016 by Praveen Saini LeenSharma comment Share Follow See all 4 Comments 4 4 Comments reply chandankannaujia commented Aug 28, 2016 reply Follow flag u r right 0 0 replyShare sarbesh commented May 23, 2017 reply Follow flag I think all four options are false so no answer match..?. 0 0 replyShare LeenSharma commented May 23, 2017 reply Follow flag sarbesh You should read the question properly. 0 0 replyShare psnt_rwt commented Dec 26, 2023 reply Follow flag Option (C) can also be the answer. S → AB → aB --> abbA → abba This is a string with even length. 1 1 replyShare Please log in or register to add a comment.
2 2 votes Answer : No string produced by this grammar has four consecutive b's shekhar chauhan answered Jul 1, 2016 shekhar chauhan comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote d option because here we can derive 4 consecutive b's string abbbbaabba can be genrate which has 4 b's akankshadewangan24 answered Apr 22, 2017 akankshadewangan24 comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote how is option b not the answer ? any string for b shubhamganvir answered Jan 8, 2020 shubhamganvir comment Share Follow 0 reply Please log in or register to add a comment.