Computer Sciences > Gate 2016 Set-1 > CGF
Consider the following context-free grammars:

G1: S → aS|B, B → b|bB
G2: S → aA|bB, A → aA|B|ε, B → bB|ε

Which one of the following pairs of languages is generated by G1 and G2, respectively?
A
{ambn |m > 0 or n > 0} and {ambn |m > 0 and n > 0}
B
{ambn |m > 0 and n > 0} and {ambn |m > 0 or n ≥ 0}
C
{ambn |m ≥ 0 or n > 0} and {ambn |m > 0 and n > 0}
D
{ambn |m ≥ 0 and n > 0} and {a mbn |m > 0 or n > 0}

Correct : CGF

Similar Questions

A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters. From...
#1 MCQ
Which number does not belong in the series below? 2, 5, 10, 17, 26, 37, 50, 64
#4 MCQ
Choose the word that is opposite in meaning to the word “coherent”.
#5 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......