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 PYQ2010Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let ww be any string of length nn in {0,1}∗\{0,1\}^*. Let LL be the set of all substrings of ww. What is the minimum number of states in non-deterministic finite automation that accepts LL?
Official PYQ2010Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let L={w∈ (0+1)∗∣w has even number of 1s}L=\{ w \in \:(0+1)^* \mid w\text{ has even number of }1s \}. i.e., LL is the set of all the bit strings with even numbers of 11s. Which one of the regular expressions below represents LL?
Official PYQ2009Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The above DFA accepts the set of all strings over {0,1}\{0,1\} that
Official PYQ2009Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Which one of the following languages over the alphabet {0,1}\{0,1\} is described by the regular expression: (0+1)∗0(0+1)∗0(0+1)∗(0+1)^*0(0+1)^*0(0+1)^*?
Official PYQ2008Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Match the following NFAs with the regular expressions they correspond to: P Q R S ϵ+0(01∗1+00)∗01∗\epsilon + 0\left(01^*1+00\right)^*01^* ϵ+0(10∗1+00)∗0\epsilon + 0\left(10^*1+00\right)^*0 ϵ+0(10∗1+10)∗1\epsilon + 0\left(10^*1+10\right)^*1 ϵ+0(10∗1+10)∗10∗\epsilon + 0\left(10^*1+10\right)^*10^*
Official PYQ2007Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the following Finite State Automaton: The minimum state automaton equivalent to the above FSA has the following number of states:
Official PYQ2007Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the following Finite State Automaton: The language accepted by this automaton is given by the regular expression
Official PYQ2007Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
A minimum state deterministic finite automaton accepting the language L={w∣w∈{0,1}∗,L=\{w\mid w \in \{0, 1\}^*, number of 00s and 11s in ww are divisible by 33 and 55, respectively }\} has
Official PYQ2006Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the regular language L=(111+11111)∗.L=(111+11111)^{*}. The minimum number of states in any DFA accepting this languages is:
Official PYQ2005Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The following diagram represents a finite state machine which takes as input a binary number from the least significant bit. Which of the following is TRUE?
Official PYQ2005Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let NfN_f and NpN_p denote the classes of languages accepted by non-deterministic finite automata and non-deterministic push-down automata, respectively. Let DfD_f and DpD_p denote the classes of languages accepted by deterministic finite automata and deterministic push-down automata respectively. Which one of the following is TRUE?
Official PYQ2004Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The following finite state machine accepts all those binary strings in which the number of 11’s and 00’s are respectively:
Official PYQ2003Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the NFA MM shown below. Let the language accepted by MM be LL. Let L1L_1 be the language accepted by the NFA M1M_1 obtained by changing the accepting state of MM to a non-accepting state and by changing the non-accepting states of MM to accepting states. Which of the following statements is true?
Official PYQ2003Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the following deterministic finite state automaton MM. Let SS denote the set of seven bit binary strings in which the first, the fourth, and the last bits are 11. The number of strings in SS that are accepted by MM is
Official PYQ2003Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The regular expression 0∗(10∗)∗0^*(10^*)^* denotes the same set as
Official PYQ2002Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The smallest finite automaton which accepts the language {x∣\{x \mid length of xx is divisible by 3}3\} has
Official PYQ2002Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The finite state machine described by the following state diagram with AA as starting state, where an arc label is x/y,x/y, and xx stands for 11-bit input and yy stands for 22-bit output
Official PYQ2001Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider a DFA over Σ={a,b}\Sigma=\{a,b\} accepting all strings which have number of a's divisible by 66 and number of bb's divisible by 88. What is the minimum number of states that the DFA will have?
Official PYQ2001Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Given an arbitrary non-deterministic finite automaton (NFA) with NN states, the maximum number of states in an equivalent minimized DFA at least
Official PYQ2000Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Let SS and TT be languages over Σ={a,b}\Sigma=\{a,b\} represented by the regular expressions (a+b∗)∗(a+b^*)^* and (a+b)∗(a+b)^*, respectively. Which of the following is true?