GATE CS 2015, set 1 · Question 50 · Theory of Computation · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

Consider the NPDA ⟨ Q = {q₀, q₁, q₂}, Σ = {0,1}, Γ = {0,1,⊥}, δ, q₀, ⊥, F = {q₂}⟩, where (as per usual convention) Q is the set of states, Σ is the input alphabet, Γ is the stack alphabet, δ is the state transition function, q₀ is the initial state, ⊥ is the initial stack symbol, and F 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?

State diagram of an NPDA with three states q0, q1, q2. q0 is the initial state (incoming start arrow). q2 is the accepting state (double circle). q0 has a self-loop labelled '1, Z → 1Z' and '0, Z → 0Z'. Transition from q0 to q1 labelled '0/1/ε, Z → Z'. q1 has a self-loop labelled '0, 1Z → Z' and '1, 0Z → Z'. Transition from q1 to q2 labelled 'ε, ⊥ → ε'. (Z denotes any stack top symbol.)
  1. (A) 10110
  2. (B) 10010
  3. (C) 01010
  4. (D) 01001
Answer

Answer (B)

Answer from the official GATE CS 2015 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes