Computer Sciences > GATE 2025 SET-1 > Context-Free Grammars
Consider the following context-free grammar G, where S, A, and B are the variables (non-terminals), a and b are the terminal symbols, S is the start variable, and the rules of G are described as:
S→aab|Abb
A→a|aA
B→b|bB
Which ONE of the languages L(G) is accepted by G?
A
L(G)={a2bn|n≥1}∪{anb2|n≥1}
B
L(G)={anb2n|n≥1}∪{a2nbn|n≥1}
C
L(G)={anbn|n≥1}
D
L(G)={a2nb2n|n≥1}

Correct : a

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......