aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Test 2 - Theory of Computation | Computer Science(CS)
  • S $\rightarrow$ aSa | bSb | a | b; The language generated...
Multiple choice

S $\rightarrow$ aSa | bSb | a | b; The language generated by the above grammar over the alphabet {a, b} is the set of

  1. All palindromes.

  2. All odd length palindromes.

  3. Strings that begin and end with the same symbol

  4. All even length palindromes.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Keep practicing — related questions

  • Consider the flowing grammar C S $\rightarrow$ bS |aA| b A$\rightarrow$ bA | aB B bB |aS| a Let Na (W) and ...
  • Consider the CFG with {S, A, B} as the non-terminal alphabet, {a, b} as the terminal alphabet, S as the sta...
  • Consider the CFG with {S, A, B} as the non-terminal alphabet, {a, b} as the terminal alphabet, S as the sta...
  • Which one of the following grammars generates the language $ L=\left \\{ a^{i}b^{j}\mid i\neq j \right \\}$?
  • Consider the following statements about the context free grammar G = {S $\rightarrow$ SS, S $\rightarrow$ a...
  • Consider the following statements about the context free grammar G = {S $\rightarrow$ SS, S $\rightarrow$ a...
  • Consider the grammar: G1=({S,S1,S2},{a,b},S,P), with the following productions: P:S → S1bc,S1→ S1bc|S2,S2 →...
  • The grammar S $\rightarrow$ aSa|bS|c is
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy