Gate2017 ss Q32

0. Identify the language generated by the following grammar, where S is the start variable.
S → XY
X → aX∣a
Y → aYb∣ϵ

  • Option : C
  • Explanation :
    The given grammar with S as start symbol is
    S → XY
    X → aX∣a
    Y → aYb∣ϵ
    X generates atleast one 'a'. While Y generates equal no of a's and b's( including epsilon).
    L = { a , ab, aab, aabb, aaabb ....}
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *