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 11–15 of 29
Language L1 is defined by the grammar:
Language L2 is defined by the grammar:
Consider the following statements:
P: L1 is regular
Q: L2 is regular
Which one of the following is TRUE?
Language L2 is defined by the grammar:
Consider the following statements:
P: L1 is regular
Q: L2 is regular
Which one of the following is TRUE?
Answer: (C)
Let us look at each statement in turn:
- : the language must count the letters so it is not regular (P is false).
- it is regular (Q is true).
Answer: P is false and Q is true
- : the language must count the letters so it is not regular (P is false).
- it is regular (Q is true).
Answer: P is false and Q is true
Which of the following languages is/are regular?
is the reverse of string w
is the reverse of string w
Answer: (A)
is regular. If a string is , its first symbol and last symbol are the same (the first symbol of ), and its length is at least 3. Conversely, a string of length at least 3 that starts and ends with the same symbol has the form with and non-empty. So .
is not regular. If it were, its complement intersected with would be regular. That set is , which is not regular (pumping the 's of breaks the equal count).
is regular. It is the language of .
Answer: (A)
is not regular. If it were, its complement intersected with would be regular. That set is , which is not regular (pumping the 's of breaks the equal count).
is regular. It is the language of .
Answer: (A)
Which one of the following is TRUE?
Answer: (C)
(C) A DFA with 3 states counts the number of 's modulo 3 (an keeps the state). It accepts in the state for remainder 1. So the language with 's is regular.
(A) : with pumping length , take . The pumped part lies in the 's, so pumping changes only the number of 's and the counts no longer match. Not regular.
(B) Prime length: take with prime. The pumped part is with . Pumping with gives length . Both factors are at least 2, so the length is not prime. Not regular.
(D) : the prefixes are pairwise distinguishable. With the suffix , the string is in the language. For , has two 1s, so would have to be with , which needs . So it is not in the language. A DFA would need infinitely many states. Not regular.
Answer: (C)
(A) : with pumping length , take . The pumped part lies in the 's, so pumping changes only the number of 's and the counts no longer match. Not regular.
(B) Prime length: take with prime. The pumped part is with . Pumping with gives length . Both factors are at least 2, so the length is not prime. Not regular.
(D) : the prefixes are pairwise distinguishable. With the suffix , the string is in the language. For , has two 1s, so would have to be with , which needs . So it is not in the language. A DFA would need infinitely many states. Not regular.
Answer: (C)
If and , Consider
(I) is a regular language
(II)
Which one of the following is CORRECT?
(I) is a regular language
(II)
Which one of the following is CORRECT?
Answer: (A)
The concatenation is . This language is regular so (I) is true.
The number of a's and the number of b's do not depend on each other. So the language is not equal to (for example, aab is in it) so (II) is false.
Answer: Only (I)
The number of a's and the number of b's do not depend on each other. So the language is not equal to (for example, aab is in it) so (II) is false.
Answer: Only (I)
Let has at least as many occurrences of (110)'s as (011)'s}.
Let has at least as many occurrence of (000)'s as (111)'s}.
Which one of the following is TRUE?
Let has at least as many occurrence of (000)'s as (111)'s}.
Which one of the following is TRUE?
Answer: (A)
is regular. The substring 110 occurs once for each block of 1s of length at least 2 that is followed by a 0. The substring 011 occurs once for each block of 1s of length at least 2 that is preceded by a 0. A block with a 0 on both sides counts once in each, so the counts can differ only because of the first block and the last block of :
, where each bracket is 1 if true and 0 if false.
So is outside only when it ends with 0 and at least two 1s, and does not start with at least two 1s followed by a 0. A DFA can check this by looking only at the first three and the last three symbols, so is regular.
is not regular. Let be the pumping length and take . It has copies of 000 and copies of 111, so it is in . In any split with and , lies inside the 0s. Pumping down gives , which has at most copies of 000 but still copies of 111. So it is not in .
Answer: (A)
, where each bracket is 1 if true and 0 if false.
So is outside only when it ends with 0 and at least two 1s, and does not start with at least two 1s followed by a 0. A DFA can check this by looking only at the first three and the last three symbols, so is regular.
is not regular. Let be the pumping length and take . It has copies of 000 and copies of 111, so it is in . In any split with and , lies inside the 0s. Pumping down gives , which has at most copies of 000 but still copies of 111. So it is not in .
Answer: (A)
Keep practising