Which of the following languages is generated by the given grammar? S → aS |…
GATE · 2016 · CS · Set 1 · Computer Science & IT
Which of the following languages is generated by the given grammar?
S → aS | bS | ε
- A.
{an bm | n,m ≥ 0}
- B.
{w ∈ {a,b}∗ | w has equal number of a’s and b’s }
- C.
{an | n ≥ 0} ∪ {bn | n ≥ 0} ∪ {an bn | n ≥ 0}
- D.
{a,b}*
Attempted by 247 students.
Sign up free to check your answer
Sign up freeLoading lesson…