Question 78
78. Consider the following grammar:
S→ XY
X→ YaY | a and Y → bbX
Which of the following statements is/are true about the above grammar?
(a) Strings produced by the grammar can have consecutive three a's
(b) Every string produced by the grammar have alternate a and b
(c) Every string produced by the grammar have at least two a's
(d) Every string produced by the grammar have b's in multiple of 2.
Answer : 4. (c) and (d) only S→ XY
X→ YaY | a and Y → bbX
Which of the following statements is/are true about the above grammar?
(a) Strings produced by the grammar can have consecutive three a's
(b) Every string produced by the grammar have alternate a and b
(c) Every string produced by the grammar have at least two a's
(d) Every string produced by the grammar have b's in multiple of 2.
Previous | Next |
UGC NET CS 2018 July - II Question 77 | UGC NET CS 2018 July - II Question 79 |
Given grammar generates strings which contains "b" in multiple of 2 and number of "a" at least 2.
This grammar generate a string set of this form, L = { abba, bbaabbabba, abbbbaabba, . . . . . . . . . . . . . }
This is satisfied by statements c and d. But statements a and b are not satisfied.
Hence statements c and d is right.
So, option 4 is correct answer