Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2014 | Question 52
  • Last Updated : 11 May, 2018

Consider the following grammar.

S -> AB
A -> a
A -> BaB
B -> bbA

Which of the following statements is FALSE?
(A) The length of every string produced by this grammar is even
(B) No string produced by this grammar has three consecutive a’s
(C) The length of substring produced by B is always odd
(D) No string produced by this grammar has four consecutive b’s


Answer: (D)

Explanation: Statement 1 is true as the length of every string produced by this grammar is always even. Example: abbbbaabba
Statement 2 is true as no string produced by this grammar has three consecutive a’s. Strings can have a maximum of 2 consecutive a’s.
Statement 3 is also true.
Statement 4 is false as there can be strings with 4 consecutive b’s. Example: abbbbaabba

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :