Skip to content

GATE CS Regular Expressions and Finite Automata questions

Practise Regular Expressions and Finite Automata questions for GATE CS. Explore official PYQs and original topic-wise quizzes, check answers and view available solutions. Free, no sign-in.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2019Theory of ComputationRegular Expressions and Finite AutomataNAT · 2 marks
Let Σ\Sigma be the set of all bijections from {1,…,5}\{1, \dots , 5\} to {1,…,5}\{1, \dots , 5 \}, where idid denotes the identity function, i.e. id(j)=j,∀jid(j)=j, \forall j. Let ∘\circ denote composition on functions. For a string x=x1x2…xn∈Σn,n≥0x=x_1 x_2 \dots x_n \in \Sigma^n, n \geq 0, let π(x)=x1∘x2∘⋯∘xn\pi(x)=x_1 \circ x_2 \circ \dots \circ x_n. Consider the language …
Official PYQ2018Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let NN be an NFA with nn states. Let kk be the number of states of a minimal DFA which is equivalent to NN. Which one of the following is necessarily true?
Official PYQ2017Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
Consider the language LL given by the regular expression (a+b)∗b(a+b)(a+b)^{*} b (a+b) over the alphabet {a,b}\{a,b\}. The smallest number of states needed in a deterministic finite-state automaton (DFA) accepting LL is ___________ .
Official PYQ2017Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
The minimum possible number of states of a deterministic finite automaton that accepts the regular language LL = {w1aw2w_{1}aw_{2} | w1,w2w_{1},w_{2} ∈\in {a,b}∗\left \{ a,b \right \}^{*} , ∣w1∣=2,∣w2∣≥3\left | w_{1} \right | = 2, \left | w_{2} \right |\geq 3} is ______________ .
Official PYQ2016Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 00's and two consecutive 11's?
Official PYQ2016Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the following two statements: If all states of an NFA are accepting states then the language accepted by the NFA is Σ∗\Sigma_{}^{*}. There exists a regular language AA such that for all languages BB, A∩BA \cap B is regular. Which one of the following is CORRECT?
Official PYQ2016Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
The number of states in the minimum sized DFA that accepts the language defined by the regular expression. (0+1)∗(0+1)(0+1)∗(0+1)^{*} (0+1) (0+1)^{*} is ________.
Official PYQ2015Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
Consider the DFAs MM and NN given above. The number of states in a minimal DFA that accept the language L(M)∩L(N)L(M) \cap L(N) is_____________.
Official PYQ2015Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
The number of states in the minimal deterministic finite automaton corresponding to the regular expression (0+1)∗(10)(0+1)^* (10) is _____.
Official PYQ2015Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the alphabet Σ={0,1}\Sigma = \{0, 1\}, the null/empty string λ\lambda and the set of strings X0,X1, and X2X_0, X_1, \text{ and } X_2 generated by the corresponding non-terminals of a regular grammar. X0,X1, and X2X_0, X_1, \text{ and } X_2 are related as follows. X0=1X1X_0 = 1 X_1 X1=0X1+1X2X_1 = 0 X_1 + 1 X_2 X2=0X1+{λ}X_2 = 0 X_1 + \{ \lambda \} Which one of the following …
Official PYQ2015Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let LL be the language represented by the regular expression Σ∗0011Σ∗\Sigma^*0011\Sigma^* where Σ={0,1}\Sigma = \{0, 1\}. What is the minimum number of states in a DFA that recognizes Lˉ\bar{L} (complement of LL)?
Official PYQ2014Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Which of the regular expressions given below represent the following DFA? 0∗1(1+00∗1)∗0^*1(1+00^*1)^* 0∗1∗1+11∗0∗10^*1^*1+11^*0^*1 (0+1)∗1(0+1)^*1
Official PYQ2014Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the finite automaton in the following figure: What is the set of reachable states for the input string 00110011?
Official PYQ2014Theory of ComputationRegular Expressions and Finite AutomataNAT · 1 mark
The length of the shortest string NOT in the language (over Σ={a,b})\Sigma = \{a, b\}) of the following regular expression is _______. a∗b∗(ba)∗a∗a^*b^*(ba)^*a^*
Official PYQ2013Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the DFA AA given below. Which of the following are FALSE? Complement of L(A)L(A) is context-free. L(A)=L((11∗0+0)(0+1)∗0∗1∗)L(A) = L((11^*0+0)(0 + 1)^*0^*1^*) For the language accepted by A,AA, A is the minimal DFA. AA accepts all strings over {0,1}\{0, 1\} of length at least 22.
Official PYQ2012Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the set of strings on {0,1}\{0,1\} in which, every substring of 33 symbols has at most two zeros. For example, 001110001110 and 011001011001 are in the language, but 100010100010 is not. All strings of length less than 33 are also in the language. A partially completed DFA that accepts this language is shown below. The missing arcs in the DFA are:
Official PYQ2012Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
What is the complement of the language accepted by the NFA shown below? Assume Σ={a}\Sigma = \{a\} and ϵ\epsilon is the empty string.
Official PYQ2011Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
A deterministic finite automaton (DFA\text{DFA}) DD with alphabet Σ={a,b}\Sigma = \{a, b\} is given below. Which of the following finite state machines is a valid minimal DFA\text{DFA} which accepts the same languages as DD?
Official PYQ2011Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Definition of a language LL with alphabet {a}\{a\} is given as following.L={ank∣k>0,  and  n is a positive integer constant}L = \left\{a^{nk} \mid k > 0, \:\: and \:\: n \text{ is a positive integer constant} \right\}What is the minimum number of states needed in a DFA to recognize LL?
Official PYQ2011Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Which of the following pairs have DIFFERENT expressive power?