Context Free Languages questions

Q44

GATE CS 2015 CS-3Context Free LanguagesMCQ2 marks−2/3 if wrong
Which of the following languages are context-free?

L1={ambnanbm∣m,n≥1}L2={ambnambn∣m,n≥1}L3={ambn∣m=2n+1} \begin{array}{l} L_1 = \{a^m b^n a^n b^m \mid m, n \ge 1\} \\ L_2 = \{a^m b^n a^m b^n \mid m, n \ge 1\} \\ L_3 = \{a^m b^n \mid m = 2n + 1\} \end{array}
Show answer without attempting

Answer: B

Q50

GATE CS 2015 CS-1Context Free LanguagesMCQ2 marks−2/3 if wrong
Consider the NPDA ⟨Q={q0,q1,q2},Σ={0,1},Γ={0,1,⊥},δ,q0,⊥,F={q2}⟩\langle Q = \{q_0, q_1, q_2\}, \Sigma = \{0, 1\}, \Gamma = \{0, 1, \bot\}, \delta, q_0, \bot, F = \{q_2\} \rangle, where (as per usual convention) QQ is the set of states, Σ\Sigma is the input alphabet, Γ\Gamma is the stack alphabet, δ\delta is the state transition function, q0q_0 is the initial state, ⊥\bot is the initial stack symbol, and FF is the set of accepting states. The state transition is as follows:

Which one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton?
Question figure
Show answer without attempting

Answer: B

0/20 correct0 marks

Related topics in Theory of Computation