Regular Language · Theory of Computation
29 questions · asked in 18 of 27 years (2000–2026)
MCQ 25 · MSQ 3 · NAT 11-mark 20 · 2-mark 9
2000Questions per year2026
Questions 16–20 of 29
Consider the languages and . Which one of the following represents ?
Answer: (A)
First part: (joining the empty set with any language gives the empty set).
Second part:
The union is {}
Answer: {}
Second part:
The union is {}
Answer: {}
Given the language L = {ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
Answer: (D)
Every string in is a concatenation of the pieces , , . The split is forced when read from the left. A piece starting with must be . A piece starting with is or , decided by the second symbol. So there is only one way to try.
1) : valid.
2) : valid.
3) : the last cannot start a piece , and the split is forced, so it is not in .
4) : valid.
So strings 1, 2 and 4 are in .
Answer: (D)
1) : valid.
2) : valid.
3) : the last cannot start a piece , and the split is forced, so it is not in .
4) : valid.
So strings 1, 2 and 4 are in .
Answer: (D)
Let P be a regular language and Q be a context free language such that Q
P. (For example, let P be the language represented by the regular expression p*q* and Q be Then which of the following is ALWAYS regular?
Answer: (C)
is regular, and regular languages are closed under complement, so is always regular.
The other three can fail. Take and , so .
(A) , which is not regular.
(B) . If it were regular, then would be regular, which is false.
(D) If were regular, its complement would be regular, which is false.
Answer: (C)
The other three can fail. Take and , so .
(A) , which is not regular.
(B) . If it were regular, then would be regular, which is false.
(D) If were regular, its complement would be regular, which is false.
Answer: (C)
SaSa|bSb|a|b; The language generated by the above grammar over the alphabet {a,b} is the set of
Answer: (B)
Every step puts the same symbol at the two ends of the string. The derivation stops with one a or b in the centre the language is the set of odd-length palindromes (every one of them).
Answer: all odd length palindromes
Answer: all odd length palindromes
Which of the following languages is (are) non-regular?
reads the same forward and backward
contains an even number of 0's and an even number of 1's
reads the same forward and backward
contains an even number of 0's and an even number of 1's
Answer: (D)
is regular. Since , it has only finitely many strings, and every finite language is regular.
is regular. A DFA only needs to remember the parity of the 0's and the parity of the 1's read so far. That gives 4 states (even-even, even-odd, odd-even, odd-odd). The start state is even-even, and it is the only accepting state.
(palindromes over an alphabet of at least two symbols, say ) is not regular. Pumping lemma: let be the pumping length and take . Then , so with . The string is not a palindrome. A palindrome needs the same number of 0's on both sides of the 1. So the pumped string is not in .
Only is non-regular, so options with or are wrong.
Answer: (D)
is regular. A DFA only needs to remember the parity of the 0's and the parity of the 1's read so far. That gives 4 states (even-even, even-odd, odd-even, odd-odd). The start state is even-even, and it is the only accepting state.
(palindromes over an alphabet of at least two symbols, say ) is not regular. Pumping lemma: let be the pumping length and take . Then , so with . The string is not a palindrome. A palindrome needs the same number of 0's on both sides of the 1. So the pumped string is not in .
Only is non-regular, so options with or are wrong.
Answer: (D)
Keep practising