Automata Theory

Theory of Computation Questions Answers GATE 2021

Theory of Computation GATE Question Answers with Explanation.

Q1 – Suppose that L1 is a regular language and L2 is a context free language. Which one of the following languages is NOT necessarily context-free? (GATE 2021 Set 1)

 

  1. L1 ∩ L2
  2. L1.L2
  3. L1 – L2
  4. L1 U L2

Ans – (3)

Explanation – 

Q2 – Let ⟨M⟩ denote an encoding of an automaton M. Suppose that Σ={0,1}. Which of the following languages is/are NOT recursive? (GATE 2021 Set 1)

 

  1. L = {⟨M⟩ ∣ M is a DFA such that L(M)=∅}
  2. L = {⟨M⟩ ∣ M is a DFA such that L(M)=Σ*}
  3. L = {⟨M⟩ ∣ M is a PDA such that L(M)=∅}
  4. L = {⟨M⟩ ∣ M is a PDA such that L(M)=Σ*}

Ans – (4)

Explanation

Q3 – Consider the following language:
L = { w ∈ {0,1}∗ ∣ w ends with the substring 011 }
Which one of the following deterministic finite automata accepts L? (GATE 2021 Set 1)

1.TOC GATE 2021 SET 1 1

2.TOC GATE 2021 SET 1 2

3. TOC GATE 2021 SET 1 3

4. TOC GATE 2021

Ans – (4)

Explanation –

Q4 – For a Turing machine M, ⟨M⟩ denotes an encoding of M. Consider the following two languages.
L1 = { ⟨M⟩ ∣ M takes more than 2021 steps on all inputs }
L2 = { ⟨M⟩ ∣ M takes more than 2021 steps on some input }
Which one of the following options is correct? (GATE 2021 Set 1)

 

  1. Both L1 and L2 are decidable
  2. L1 is decidable and L2 is undecidable
  3. L1 is undecidable and L2 is decidable
  4. Both L1 and L2 are undecidable

Ans – (1)

Explanation –

Q15 – In a pushdown automaton P=(Q, Σ, Γ, δ, q0, F), a transition of the form, 

TOC GATE 2021 SET 1

where p, q ∈ Q, a ∈ σ ∪ {ϵ}, X, Y ∈ Γ ∪ {ϵ}, represents

(q,Y) ∈ δ(p,a,X)

Consider the following pushdown automaton over the input alphabet Σ= {a, b} and stack alphabet Γ = {#, A}. 

TOC GATE 2021 SET 1

The number of strings of length 100 accepted by the above pushdown automaton is ___________. (GATE 2021 Set 1)

Ans – (50)

Explanation –