Skip to content
Early access — you're among the first to try PYQLabs. Share feedback
Concept drill

regular-expressions

GATE CSE & IT · Lexical Analysis · 1991-2026

20
PYQs
75%
keyed
0
elite explanations
15
years appeared

Study anchor

Hopcroft-Ullman / Dragon Book

Automata, languages, parsing, syntax-directed translation

Practice action

Start latest PYQ

PYQs in this concept

All concepts →
2026 PYQ

A lexical analyzer uses the following token definitions letter → [A - Za - z] digit → [0-9] id → letter (letter $\mid$ digit)* number → digit $^{+}$ ws → (blank | tab | newline) ${...

mediumbasic explanation
2024 Q41

Let M be the 5-state NFA with \epsilon-transitions shown in the diagram below. Which one of the following regular expressions represents the language accepted by M?

mediumanswer key
2024 Q61

Consider the following two regular expressions over the alphabet {0,1}: r = 0* + 1* s = 01* + 10* The total number of strings of length less than or equal to 5, which are neither i...

hardanswer key
2024 PYQ

Consider the following two regular expressions over the alphabet {0,1} : $$r = 0^* + 1^*$$ $$s = 01^* + 10^*$$ The total number of strings of length less than or equal to 5, which...

mediumbasic explanation
2024 PYQ

Let L 1 be the language represented by the regular expression b * ab * (ab * ab * ) * and L 2 = { w ∈ (a + b) * | |w| ≤ 4 } , where |w| denotes the length of string w . The number...

mediumbasic explanation
2020 PYQ

Which one of the following regular expressions represents the set of all binary strings with an odd number of 1’s?

mediumbasic explanation
2018 PYQ

A lexical analyzer uses the following patterns to recognize three tokens $${T_1},{T_2},$$ and $${T_3}$$ over the alphabet $$\left\{ {a,b,c} \right\}.$$ $$\eqalign{ & {T_1}:\,\,\,a?...

mediumanswer keybasic explanation
2016 PYQ

Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive $$0s$$ and two consecutive $$1s?$$

easyanswer keybasic explanation
2016 PYQ

Match the following: GROUP - 1 GROUP - 2 (P) Lexical analysis (i) Leftmost derivation (Q) Top down parsing (ii) Type checking (R) Semantic analysis (iii) Regular expressions (S) Ru...

easyanswer key
2015 PYQ

Consider the alphabet $$\sum { = \left\{ {0,1} \right\},} $$ the null/empty string $$\lambda $$ and the sets of strings $${X_0},\,{X_1},$$ and $${X_2}$$ generated by the correspond...

mediumanswer key
2014 PYQ

The length of the shortest string NOT in the language (over $$\sum { = \left\{ {a,\,\,b} \right\}} $$) of the following regular expression is ____________. $$$a{}^ * b{}^ * \left(...

medium
2003 PYQ

The regular expression $${0^ * }\left( {{{10}^ * }} \right){}^ * $$denotes the same set as

mediumanswer key
2000 PYQ

Let $$S$$ and $$T$$ be languages over $$\sum { = \left\{ {a,b} \right\}} $$ represented by the regular expressions $${\left( {a + {b^ * }} \right)^ * }$$ and $$\,{\left( {a + b} \r...

easyanswer key
1998 PYQ

The string $$1101$$ does not belong to the set represented by

easyanswer keybasic explanation
1998 PYQ

If the regular set $$A$$ is represented by $$A = {\left( {01 + 1} \right)^ * }$$ and the regular set $$'B'$$ is represented by $$B = \left( {{{\left( {01} \right)}^ * }{1^ * }} \ri...

mediumanswer keybasic explanation
1997 PYQ

Which one of the following regular expressions over $$\left\{ {0,\,\,1} \right\}$$ denotes the set of all strings not containing $$100$$ as substring?

mediumanswer key
1996 PYQ

Which two of the following four regular expressions are equivalent? (i) $${\left( {00} \right)^ * }\left( {\varepsilon + 0} \right)$$ (ii) $${\left( {00} \right)^ * }$$ (iii) $${0^...

easyanswer keybasic explanation
1995 PYQ

In some programming languages, an identifier is permitted to be a letter following by any number of letters or digits. If L and D denote the sets of letters and digits respectively...

easyanswer key
1992 PYQ

Which of the following regular expression identities are true?

easyanswer key
1991 PYQ

Let $$r = 1\,{\left( {1 + 0} \right)^ * },s = {11^ * }\,0$$ and $$\,t = {1^ * }\,0$$ be three regular expressions. Which one of the following is true?

easyanswer key