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 21–25 of 29
Which of the following are regular sets?
II.
III.
IV.
II.
III.
IV.
Answer: (A)
I. is regular. It is . The two parts do not depend on each other.
II. is not regular. An automaton would have to count the b's and then match twice that many a's, and a finite automaton cannot count without limit. By the pumping lemma, take . Pumping inside the a's gives more than a's against b's, which breaks .
III. is not regular. If it were, its complement intersected with the regular set would be regular. That intersection is , which is not regular. So III is not regular.
IV. is regular. It is .
Only I and IV are regular.
Answer: (A)
II. is not regular. An automaton would have to count the b's and then match twice that many a's, and a finite automaton cannot count without limit. By the pumping lemma, take . Pumping inside the a's gives more than a's against b's, which breaks .
III. is not regular. If it were, its complement intersected with the regular set would be regular. That intersection is , which is not regular. So III is not regular.
IV. is regular. It is .
Only I and IV are regular.
Answer: (A)
Which of the following languages is regular?
Answer: (C)
(C) A string starts and ends with the first symbol of , and has length at least 3. Conversely, any string of length at least 3 that starts and ends with the same symbol is with . So the language is . Regular.
(A) is the set of even palindromes. The prefixes are pairwise distinguishable: the suffix gives , which is in the language, but with is not. Not regular.
(B) is the set of strings with an even-length palindrome as a proper prefix. Take the prefixes with odd . The string (, odd) is in the language only when , because the only even palindrome prefix then is , centred at . So these prefixes are pairwise distinguishable. Not regular.
(D) is the reverse of (B), because . Regular languages are closed under reversal, so it is not regular either.
Answer: (C)
(A) is the set of even palindromes. The prefixes are pairwise distinguishable: the suffix gives , which is in the language, but with is not. Not regular.
(B) is the set of strings with an even-length palindrome as a proper prefix. Take the prefixes with odd . The string (, odd) is in the language only when , because the only even palindrome prefix then is , centred at . So these prefixes are pairwise distinguishable. Not regular.
(D) is the reverse of (B), because . Regular languages are closed under reversal, so it is not regular either.
Answer: (C)
Let L be a regular language. Consider the constructions on L below:
I.
II.
III.
IV.
(The linked part asks which of these constructions could lead to a non-regular language; only I can.)
Which choice of L is best suited to support your answer above?
I.
II.
III.
IV.
(The linked part asks which of these constructions could lead to a non-regular language; only I can.)
Which choice of L is best suited to support your answer above?
Answer: (A)
The linked part asks which construction can fail to give a regular language for a regular . Only can fail, so the best must be one where is really not regular.
Option (A): is regular, and . This is not regular. Pumping lemma: take , which is in the language with . Pumping inside the first gives with . It has exactly two b's, so a split into needs one b in each half. But the first half is shorter than and so has no b. Hence the string is not of the form .
Why the others fail:
(B) is finite, so is finite and regular.
(C) , which is regular.
(D) is itself not regular, but the question needs a regular .
Answer: (A)
Option (A): is regular, and . This is not regular. Pumping lemma: take , which is in the language with . Pumping inside the first gives with . It has exactly two b's, so a split into needs one b in each half. But the first half is shorter than and so has no b. Hence the string is not of the form .
Why the others fail:
(B) is finite, so is finite and regular.
(C) , which is regular.
(D) is itself not regular, but the question needs a regular .
Answer: (A)
Let L be a regular language. Consider the constructions on L below:
I.
II.
III.
IV.
Which of the constructions could lead to a non-regular language?
I.
II.
III.
IV.
Which of the constructions could lead to a non-regular language?
Answer: (B)
I. repeat(L) can be non-regular. Take the regular language . Then . By the pumping lemma with , pumping the first block of a's gives a string with unequal blocks of a's, so it is not in the language. So it is not regular.
(For a finite it is regular, but the question asks what can go wrong.)
II. prefix(L) is regular. Take a DFA for and make every state from which an accepting state can be reached an accepting state.
III. suffix(L) is regular. Take an NFA for and add a new start state with -moves to every state reachable from the old start. Then the NFA accepts exactly when some leads to the state where starts an accepting run.
IV. half(L) is regular. Take a DFA with transition function , start state and accepting set . After reading keep the pair . Here and is the set of states from which some string of length reaches . Start with . On reading a symbol , the new is the set of states with for some symbol . Accept when . There are finitely many pairs, so it is a DFA.
Only I can lead to a non-regular language.
Answer: (B)
(For a finite it is regular, but the question asks what can go wrong.)
II. prefix(L) is regular. Take a DFA for and make every state from which an accepting state can be reached an accepting state.
III. suffix(L) is regular. Take an NFA for and add a new start state with -moves to every state reachable from the old start. Then the NFA accepts exactly when some leads to the state where starts an accepting run.
IV. half(L) is regular. Take a DFA with transition function , start state and accepting set . After reading keep the pair . Here and is the set of states from which some string of length reaches . Start with . On reading a symbol , the new is the set of states with for some symbol . Accept when . There are finitely many pairs, so it is a DFA.
Only I can lead to a non-regular language.
Answer: (B)
Which of the following statements about regular languages is NOT true ?
Answer: (C)
The statement in option C is not true.
- Every language has a regular superset: True. is one such superset.
- Every language has a regular subset: True. is one such subset.
- Every subset of a regular language is regular: False. We have , but is not regular.
- Every subset of a finite language is regular: True. By definition, any subset of a finite set is finite. Any finite set is regular. So every subset of a finite language is regular.
Keep practising