Finite Automata · Theory of Computation
62 questions · asked in 27 of 27 years (2000–2026)
MCQ 45 · MSQ 5 · NAT 121-mark 34 · 2-mark 28
2000Questions per year2026
Questions 21–25 of 62
Consider the following two statements:
I. If all states of an NFA are accepting states then the language accepted by the NFA is .
II. There exists a regular language A such that for all languages B, AB is regular.
Which one of the following is CORRECT?
I. If all states of an NFA are accepting states then the language accepted by the NFA is .
II. There exists a regular language A such that for all languages B, AB is regular.
Which one of the following is CORRECT?
Answer: (B)
Let us check each statement.
- I: An NFA can have no transition on some symbol from a state. Then some strings have no path and the NFA rejects them, even when every state is accepting so the statement is FALSE.
- II: Choose . Then is regular for every language B so the statement is TRUE.
Answer: Only II is true
- I: An NFA can have no transition on some symbol from a state. Then some strings have no path and the NFA rejects them, even when every state is accepting so the statement is FALSE.
- II: Choose . Then is regular for every language B so the statement is TRUE.
Answer: Only II is true
Consider the DFAs M and N given above. The number of states in a minimal DFA that accepts the language L(M) L(N) is___________
Answer: 1
Look at each DFA:
- M accepts the strings that end with a.
- N accepts the strings that end with b.
A string cannot end with both a and b, so . The minimal DFA has only one state, and that state is non-accepting.
Answer: 1
- M accepts the strings that end with a.
- N accepts the strings that end with b.
A string cannot end with both a and b, so . The minimal DFA has only one state, and that state is non-accepting.
Answer: 1
The number of states in the minimal deterministic finite automaton corresponding to the regular expression (0+1)*(10) is __________.
Answer: 3
The language is all strings that end in "10". Use three states:
- A: no progress (start, or the string ends in 0 but not in 10)
- B: the last symbol is 1
- C: the string ends in 10 (accepting)
Transitions: A on 0 stays in A, on 1 goes to B. B on 0 goes to C, on 1 stays in B. C on 0 goes to A, on 1 goes to B.
The 3 states are distinguishable: the empty string separates C (accepted) from A and B, and the string "0" separates B (goes to C, accepted) from A (stays in A, rejected). So the minimal DFA has 3 states.
Answer: 3
- A: no progress (start, or the string ends in 0 but not in 10)
- B: the last symbol is 1
- C: the string ends in 10 (accepting)
Transitions: A on 0 stays in A, on 1 goes to B. B on 0 goes to C, on 1 stays in B. C on 0 goes to A, on 1 goes to B.
The 3 states are distinguishable: the empty string separates C (accepted) from A and B, and the string "0" separates B (goes to C, accepted) from A (stays in A, rejected). So the minimal DFA has 3 states.
Answer: 3
Let L be the language represented by the regular expression where ={0,1}. What is the minimum number of states in a DFA that recognizes (complement of L)?
Answer: (B)
A DFA for "contains 0011" tracks how much of the pattern is matched: s0 (nothing), s1 ("0"), s2 ("00"), s3 ("001") and s4 (0011 found, a trap state that loops on 0 and 1). Transitions: s0 on 0 goes to s1, on 1 stays. s1 on 0 goes to s2, on 1 goes to s0. s2 on 0 stays in s2, on 1 goes to s3. s3 on 0 goes to s1 (the string ends in 0), on 1 goes to s4.
The complement uses the same DFA with final and non-final states swapped: s0 to s3 are final and s4 is not. It has 5 states.
All 5 states are pairwise distinguishable, so none can be merged: the empty string separates s4 from the rest, "1" separates s3 from s0, s1 and s2, "11" separates s2 from s0 and s1, and "011" separates s1 from s0.
Answer: (B)
The complement uses the same DFA with final and non-final states swapped: s0 to s3 are final and s4 is not. It has 5 states.
All 5 states are pairwise distinguishable, so none can be merged: the empty string separates s4 from the rest, "1" separates s3 from s0, s1 and s2, "11" separates s2 from s0 and s1, and "011" separates s1 from s0.
Answer: (B)
Consider the finite automaton in the following figure.
What is the set of reachable states for the input string 0011?
What is the set of reachable states for the input string 0011?
Answer: (A)
Follow the set of states after each input symbol:
- Start: {q0}
- Input 0 {q0}; next input 0 {q0}
- Input 1 {q0, q1}
- Next input 1 {q0, q1, q2} (q0 stays or goes to q1; q1 goes to q2)
Answer: {q0, q1, q2}
- Start: {q0}
- Input 0 {q0}; next input 0 {q0}
- Input 1 {q0, q1}
- Next input 1 {q0, q1, q2} (q0 stays or goes to q1; q1 goes to q2)
Answer: {q0, q1, q2}
Keep practising