Automata GATE CS and IT previous year questions with answer
Ques 1 Gate 2024 Set-2
Let π be the 5-state NFA with π-transitions shown in the diagram below.

Ques 2 Gate 2023
Which of the following statements is/are CORRECT?
a) is correct
The class of recursively enumerable (RE) languages is closed under intersection.
If L1
and L2
are RE languages, then L1 β© L2
is also RE.
This can be done by constructing a Turing machine that runs the machines for both L1
and L2
in parallel and accepts if both accept.
For example:
Let L1 = { w | w contains at least one 'a' }
and L2 = { w | w contains at least one 'b' }
.
Their intersection is L1 β© L2 = { w | w contains both 'a' and 'b' }
, which is RE.
b) is incorrect
The class of recursive languages is not always closed under intersection.
If L1
and L2
are recursive, their intersection L1 β© L2
might not necessarily be recursive because deciding membership in L1 β© L2
could require undecidable steps.
For example:
Let L1 = { w | w halts on input 0 }
and L2 = { w | w halts on input 1 }
.
Their intersection is L1 β© L2 = { w | w halts on both input 0 and input 1 }
, which is not recursive because the halting problem is undecidable.
c) is incorrect
The class of context-free languages (CFLs) is not closed under intersection.
There exist CFLs L1
and L2
such that their intersection L1 β© L2
is not a CFL.
For example:
Let L1 = { an bn cm | n, m β₯ 0 }
and L2 = { am bn cn | n, m β₯ 0 }
.
Their intersection is L1 β© L2 = { an bn cn | n β₯ 0 }
, which is not a CFL.
d) is correct
The class of regular languages is closed under intersection.
If L1
and L2
are regular, then L1 β© L2
is also regular.
This can be achieved using the product construction of finite automata.
For example:
Let L1 = { w | w starts with 'a' }
and L2 = { w | w ends with 'b' }
.
Their intersection is L1 β© L2 = { w | w starts with 'a' and ends with 'b' }
, which is regular.
So, a, c, d is correct option
Ques 3 Gate 2023
Consider the following language L = {w ∈ {0,1}*| w does not contains three or more consecutive 1's}. The number of states in minimal DFA that accepts L is
4 is the correct answer.
Ques 4 Gate 2023
Consider the following grammar:
S β> aSb|X
X β>aX|Xb|a|b
What can be said about the language generated by grammar?
Ques 5 Gate 2022
Which one of the following regular expressions correctly represents the language of the finite automaton given below?

Ques 6 Gate 2022
Which of the following is/are undecidable?
Ques 7 Gate 2022
Consider the following languages:
L2 = {anbncn | m, nβ₯ 0}
L3 = {ambncn | m, nβ₯ 0}
Ques 8 Gate 2022
Which of the following statements is/are TRUE?
Ques 9 GATE 2021 SET-1
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?
Ques 10 GATE 2021 SET-1
Consider the following statements.
- S1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
- S2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.