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 6–10 of 29
Let be an arbitrary regular language accepted by a minimal DFA with k states. Which one of the following languages must necessarily be accepted by a minimal DFA with k states?
Answer: (C)
(C) Take a minimal DFA for (complete, states) and swap its final and non-final states. It accepts and still has states. It stays minimal, because two states that some string tells apart for are told apart by the same string for the complement.
The others can change the number of states. Take , which needs 1 state.
(A) is neither empty nor all strings, so it needs at least 2 states.
(B) Take , which needs 1 state. Then needs 4 states (three for the prefixes and a dead state).
(D) Take , which needs 3 states (start, accept, dead). Then needs 4 states.
Answer: (C)
The others can change the number of states. Take , which needs 1 state.
(A) is neither empty nor all strings, so it needs at least 2 states.
(B) Take , which needs 1 state. Then needs 4 states (three for the prefixes and a dead state).
(D) Take , which needs 3 states (start, accept, dead). Then needs 4 states.
Answer: (C)
Consider the following two statements about regular languages:
S1: Every infinite regular language contains an undecidable language as a subset.
S2: Every finite language is regular.
Which one of the following choices is correct?
S1: Every infinite regular language contains an undecidable language as a subset.
S2: Every finite language is regular.
Which one of the following choices is correct?
Answer: (C)
Let us check each statement:
- S1: An infinite language has uncountably many subsets. Only countably many of them are decidable. So at least one subset is undecidable TRUE.
- S2: A finite language is a finite union of single strings it is regular TRUE.
Answer: Both S1 and S2 are true
- S1: An infinite language has uncountably many subsets. Only countably many of them are decidable. So at least one subset is undecidable TRUE.
- S2: A finite language is a finite union of single strings it is regular TRUE.
Answer: Both S1 and S2 are true
Consider the following statements.
I. If is regular, then both must be regular.
II. The class of regular languages is closed under infinite union.
Which of the above statements is/are TRUE?
I. If is regular, then both must be regular.
II. The class of regular languages is closed under infinite union.
Which of the above statements is/are TRUE?
Answer: (D)
Check each statement:
- I: let be any non-regular language and take . The union is , which is regular, yet is not regular so I is FALSE.
- II: every language is an infinite union of single strings, and each string is regular. If regular languages were closed under this, every language would be regular so II is FALSE.
Answer: Neither I nor II
- I: let be any non-regular language and take . The union is , which is regular, yet is not regular so I is FALSE.
- II: every language is an infinite union of single strings, and each string is regular. If regular languages were closed under this, every language would be regular so II is FALSE.
Answer: Neither I nor II
If L is a regular language over , which one of the following languages is NOT regular ?
Answer: (B)
(A) Regular languages are closed under reversal and concatenation, so is regular.
(C) Prefix(L): in a DFA for , make every state from which a final state can be reached a final state. This DFA accepts Prefix(L), so it is regular.
(D) Suffix(L): in an NFA for , let every reachable state be a start state. This NFA accepts Suffix(L), so it is regular.
(B) : for this is the set of even-length palindromes. It is not regular. For example, in pumping the first 's breaks the symmetry. So this language need not be regular.
Answer: (B)
(C) Prefix(L): in a DFA for , make every state from which a final state can be reached a final state. This DFA accepts Prefix(L), so it is regular.
(D) Suffix(L): in an NFA for , let every reachable state be a start state. This NFA accepts Suffix(L), so it is regular.
(B) : for this is the set of even-length palindromes. It is not regular. For example, in pumping the first 's breaks the symmetry. So this language need not be regular.
Answer: (B)
For , let us consider the regular language
.
Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for L?
.
Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for L?
Answer: (D)
A valid p has to be bigger than the length of any string that cannot be pumped.
- The string cannot be pumped. If any part is removed, fewer than 10 b's are left, and that is not in L. So p must be at least 11 so 3, 5 and 9 fail.
- Take p = 24. Every b-string with length (34, 46, ) can be pumped using within the first 24 symbols. Every a-string can be pumped using .
Answer: 24
- The string cannot be pumped. If any part is removed, fewer than 10 b's are left, and that is not in L. So p must be at least 11 so 3, 5 and 9 fail.
- Take p = 24. Every b-string with length (34, 46, ) can be pumped using within the first 24 symbols. Every a-string can be pumped using .
Answer: 24
Keep practising