Consider the context-free grammar G below. Here S is the starting non-terminal symbol, while a and b are terminal symbols.
S → aSb | T
T → bT | b
The language generated by G is:
- (A)
{a^m b^n : 0 ≤ m < n}
- (B)
{a^m b^n : 0 < m < n}
- (C)
{a^m b^n : 0 < n ≤ m}
- (D)
{a^n b^n : 0 ≤ n}
