Regular Expression: GATE CS Previous Year Questions

Regular Expression · Theory of Computation

19 questions · asked in 14 of 27 years (2000–2026)

MCQ 16 · MSQ 1 · NAT 21-mark 15 · 2-mark 4

2000Questions per year2026

Questions 6–10 of 19

Q6GATE 2021 (Session 2)2 marksMSQ
Which of the following regular expressions represent(s) the set of all binary numbers that are divisible by three? Assume that the string ϵ\epsilon is divisible by three.

One or more options are correct.

Q7GATE 2016 (Session 1)1 markMCQ−0.33 if wrong
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?

Q8GATE 2014 (Session 3)1 markNAT
The length of the shortest string NOT in the language (over Σ\Sigma={a,b}) of the following regular expression is _________.
a*b* (ba)* a*

Q9GATE 20102 marksMCQ−0.67 if wrong
Let L = {w ∈\in (0 + 1)*|w has even number of 1s}, i.e. L is the set of all bit strings with even number of 1s. Which one of the regular expressions below represents L?

Q10GATE 20091 markMCQ−0.33 if wrong
Which one of the following languages over the alphabet {0,1} is described by the regular expression: (0+1)*0(0+1)*0(0+1)*?

Keep practising

Topics in Theory of Computation

All CS topics ›