Home » Theory of Computation » Theory of computation miscellaneous » Question

Theory of computation miscellaneous

Theory of Computation

  1. Identify the language generated by the following grammar, where S is the start variable.
    S → XY
    X → aX | a
    Y → aYb | ∈
    1. { am bn | m ≥ n , n > 0 }
    2. { am bn | m ≥ n , n ≥ 0 }
    3. { am bn | m > n , n ≥ 0 }
    4. { am bn | m > n , n > 0 }
Correct Option: C

The given grammar with S as start symbol is
S → XY
X → ax | a ⇒ X → ( am | m ≥ 1 )
Y → ayb | E ⇒ Y → ( an bn | n ≥ 0 )
S → XY
S → { am bn | m > n , n ≥ 0 }
because, from Non terminal X we can generate any number of a's including a single 'a' and from Y equal number of a's and b's.
Hence L = { am bn | m > n , n ≥ 0 }
m > n , because at least one will be attached on left of am bn . So, option (c) is correct.



Your comments will be displayed only after manual approval.