StreakPeaked· Practice

ExamsGATETechnical

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?

  1. L = {aⁿ bⁿ | n ≥ 0} and is not accepted by any finite automata
  2. L = {aⁿ | n ≥ 0} ∪ {aⁿ bⁿ | n ≥ 0} and is not accepted by any deterministic PDA
  3. L is not accepted by any Turing machine that halts on every input
  4. L = {aⁿ | n ≥ 0} ∪ {aⁿ bⁿ | n ≥ 0} and is deterministic context-free

Correct answer: L = {aⁿ | n ≥ 0} ∪ {aⁿ bⁿ | n ≥ 0} and is deterministic context-free

Solution

The correct option accurately describes the language accepted by the PDA as a union of two sets: strings of 'a's of any length and strings of 'a's followed by an equal number of 'b's. This language can be recognized by a deterministic pushdown automaton, confirming its classification as deterministic context-free.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →