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

Consider the transition diagram of a PDA given below with input alphabet Σ = {a, b} and stack alphabet Γ = {X, Z}. Z is the initial stack symbol. Let L denote the language accepted by the PDA.
Which one of the following is TRUE ?

PDA transition diagram with three unlabelled states drawn left to right. State 1 (leftmost) is the start state, marked by an incoming arrow from the left, and is an accepting state (double circle). State 1 has a self-loop labelled with two transitions: 'a, X/XX' and 'a, Z/XZ'. An arrow from state 1 to state 2 is labelled 'b, X/ε'. State 2 (middle) is a single circle, not accepting, with a self-loop labelled 'b, X/ε'. An arrow from state 2 to state 3 is labelled 'ε, Z/Z'. State 3 (rightmost) is an accepting state (double circle) with no outgoing transitions.
  1. (A) L = {aⁿ bⁿ | n ≥ 0} and is not accepted by any finite automata
  2. (B) L = {aⁿ | n ≥ 0} ∪ {aⁿ bⁿ | n ≥ 0} and is not accepted by any deterministic PDA
  3. (C) L is not accepted by any Turing machine that halts on every input
  4. (D) L = {aⁿ | n ≥ 0} ∪ {aⁿ bⁿ | n ≥ 0} and is deterministic context-free
Answer

Answer (D)

Answer from the official GATE CS 2016 answer key.

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