...
Question 9784 – GATE 2001
December 14, 2023
UGC NET CS 2013 Dec-paper-2
December 14, 2023
Question 9784 – GATE 2001
December 14, 2023
UGC NET CS 2013 Dec-paper-2
December 14, 2023

GATE 2009

Question 12
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.
Question 12 Explanation: 
From the grammar, we can easily infer that it generates all the palindromes of odd length, for ex: strings {aba, bab, aaa, bbb, ….}
Correct Answer: B
Question 12 Explanation: 
From the grammar, we can easily infer that it generates all the palindromes of odd length, for ex: strings {aba, bab, aaa, bbb, ….}
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x