Gate CS-2009 Question Paper With Solutions

Q. 50 S -> aSa|bSb|a|b; The language generated by the above grammar over the alphabet {a,b} is the set of

(A) all palindromes

(B) all odd length palindromes

(C) strings that begin and end with the same symbol

(D) all even length palindromes

Answer: (B)

Explanation:

Gate CS-2009 Question Paper With Solutions

Learn More:   Gate EC-2006 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here