Consider the context-free grammer G below. There S is the starting non…

ISRO Scientist/Engineer SC · 2023 · Computer Science · Part A · Discipline

Consider the context-free grammer G below. There S is the starting non terminal symbol, while a and b are terminal symbols.

S→aaSb|T

T→Tb|a

Which of the following statments is true about the language L(G) generated by G?

  1. A.

    aabbaabb belongs to L(G) but aabb does not

  2. B.

    aaaaabbb belongs to L(G) but aaaabb does not

  3. C.

    aaaabb belongs to L(G) but aabbaabb does not

  4. D.

    aaabb belongs to L(G) but aaaaabbb does not

Attempted by 129 students.

Show answer

Correct answer: B

The worked solution is available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…