Question 17408 – ISRO CS-2023
January 25, 2024
Operating-Systems
January 25, 2024
Question 17408 – ISRO CS-2023
January 25, 2024
Operating-Systems
January 25, 2024

Question 10880 – GATE 2006-IT

In the context-free grammar below, S is the start symbol, a and b are terminals, and ϵ denotes the empty string

S → aSa | bSb | a | b | ϵ 

Which of the following strings is NOT generated by the grammar?

Correct Answer: B

Question 4 Explanation: 
S → aSa | bSb | a | b | ϵ
Given string accepts all palindromes.
Option B → baba is not palindrome.
So, this is not accepted by S.
A
aaaa
B
baba
C
abba
D
babaaabab

Leave a Reply

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