8 votes 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 asked Jul 1, 2016 • retagged Dec 4, 2022 by Lakshman Bhaiya go_editor 6.5k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 12 votes 12 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 See all 4 4 Comments reply chandankannaujia commented Aug 28, 2016 reply Follow Share u r right 0 votes 0 votes sarbesh commented May 23, 2017 reply Follow Share I think all four options are false so no answer match..?. 0 votes 0 votes LeenSharma commented May 23, 2017 reply Follow Share sarbesh You should read the question properly. 0 votes 0 votes psnt_rwt commented Dec 26, 2023 reply Follow Share Option (C) can also be the answer. S → AB → aB --> abbA → abba This is a string with even length. 0 votes 0 votes Please log in or register to add a comment.
4 votes 4 votes Answer : No string produced by this grammar has four consecutive b's shekhar chauhan answered Jul 1, 2016 shekhar chauhan comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes 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 See all 0 reply Please log in or register to add a comment.
1 votes 1 votes how is option b not the answer ? any string for b shubhamganvir answered Jan 8, 2020 shubhamganvir comment Share Follow See all 0 reply Please log in or register to add a comment.