Question 17408 – ISRO CS-2023
January 25, 2024Question 10200 – CPU-Scheduling
January 25, 2024Question 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.
Given string accepts all palindromes.
Option B → baba is not palindrome.
So, this is not accepted by S.
aaaa
baba
abba
babaaabab
Subscribe
Login
0 Comments