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 26–30 of 62
Which of the regular expressions given below represent the following DFA?
I) 0*1(1+00*1)*
II) 0*1*1+11*0*1
III) (0+1)*1
I) 0*1(1+00*1)*
II) 0*1*1+11*0*1
III) (0+1)*1
Answer: (B)
Read the DFA: from the start state, 0 stays and 1 goes to the final state. From the final state, 1 stays and 0 goes back to the start. So every 0 leads to the start state and every 1 leads to the final state. The machine is in the final state exactly when the last symbol is 1. It accepts the strings that end with 1.
- III is . This is exactly "ends with 1", so it is true.
- I is . Every string it makes ends in 1. Every string that ends in 1 is made by it: write it as followed by the rest. The rest is cut after each of its 1s into pieces that are either "1" or with , and these are covered by . So I is true.
- II is . The string 0101 ends in 1 so the DFA accepts it, but II cannot make it. The first part has no 0 after a 1, and the second part starts with 1. So II is false.
Answer: (B)
- III is . This is exactly "ends with 1", so it is true.
- I is . Every string it makes ends in 1. Every string that ends in 1 is made by it: write it as followed by the rest. The rest is cut after each of its 1s into pieces that are either "1" or with , and these are covered by . So I is true.
- II is . The string 0101 ends in 1 so the DFA accepts it, but II cannot make it. The first part has no 0 after a 1, and the second part starts with 1. So II is false.
Answer: (B)
Consider the DFA A given below.
Which of the following are FALSE?
1. Complement of L(A) is context-free.
2. L(A) = L((11*0+0) (0+1)*0*1*)
3. For the language accepted by A, A is the minimal DFA.
4. A accepts all strings over {0, 1} of length at least 2.
Which of the following are FALSE?
1. Complement of L(A) is context-free.
2. L(A) = L((11*0+0) (0+1)*0*1*)
3. For the language accepted by A, A is the minimal DFA.
4. A accepts all strings over {0, 1} of length at least 2.
Answer: (D)
In the figure, the start state goes to a second state on 1 and to the final state on 0. The second state does the same: 1 to itself and 0 to the final state. The final state loops on 0 and 1. So A accepts exactly the strings that have at least one 0: .
- Statement 1: the complement is . This is regular, so it is context-free. True.
- Statement 2: , and (the extra adds nothing). So the expression is = L(A). True.
- Statement 3: the start state and the second state are both non-final, and both go to the second state on 1 and to the final state on 0. So they are equivalent and can be merged, which means A is not minimal. False.
- Statement 4: the string 11 has length 2 but no 0, so A rejects it. False.
The false statements are 3 and 4.
Answer: (D)
- Statement 1: the complement is . This is regular, so it is context-free. True.
- Statement 2: , and (the extra adds nothing). So the expression is = L(A). True.
- Statement 3: the start state and the second state are both non-final, and both go to the second state on 1 and to the final state on 0. So they are equivalent and can be merged, which means A is not minimal. False.
- Statement 4: the string 11 has length 2 but no 0, so A rejects it. False.
The false statements are 3 and 4.
Answer: (D)
Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below.
The missing arcs in the DFA are
The missing arcs in the DFA are
Answer: (D)
Each state stores the last two symbols. These are the missing moves:
- From 00, input 0 gives three 0s the dead state q. From 00, input 1 goes 01.
- From 01, input 1 goes 11.
- From 10, input 0 goes 00.
- From 11, input 0 goes 10.
These match table D exactly.
Answer: D
- From 00, input 0 gives three 0s the dead state q. From 00, input 1 goes 01.
- From 01, input 1 goes 11.
- From 10, input 0 goes 00.
- From 11, input 0 goes 10.
These match table D exactly.
Answer: D
What is the complement of the language accepted by the NFA shown below? Assume ={a} and is the empty string.
Answer: (B)
The NFA moves to the final state after reading one a. The arcs then let it return and read more a's. So it accepts (a, aa, aaa, ...).
Over {a}, the one string that is not accepted is . So the complement = {}.
Answer: {}
Over {a}, the one string that is not accepted is . So the complement = {}.
Answer: {}
A deterministic finite automation (DFA)D with alphabet = {a,b} is given below
Which of the following finite state machines is a valid minimal DFA which accepts the same language as D?
Which of the following finite state machines is a valid minimal DFA which accepts the same language as D?
Answer: (A)
In D, the states s and t are both accepting and both loop on a and b, so they are equivalent. Merge them into one state. State r is a dead state.
The merged machine has these moves: p -a s, p -b q, q -a s, q -b r. This is the machine in figure A. It accepts .
It is minimal, because its 4 states are pairwise distinguishable. State s accepts the empty string and the others do not. State r accepts nothing, but q accepts "a". The string "ba" is accepted from p but rejected from q.
The other figures are wrong. In (B) and (C), p goes to the accepting state q on a single b, so they accept "b", but D rejects "b" (b leads to q, which is not accepting). The machine in (D) has a b loop on q, so it accepts "bba", which D rejects.
Answer: (A)
The merged machine has these moves: p -a s, p -b q, q -a s, q -b r. This is the machine in figure A. It accepts .
It is minimal, because its 4 states are pairwise distinguishable. State s accepts the empty string and the others do not. State r accepts nothing, but q accepts "a". The string "ba" is accepted from p but rejected from q.
The other figures are wrong. In (B) and (C), p goes to the accepting state q on a single b, so they accept "b", but D rejects "b" (b leads to q, which is not accepting). The machine in (D) has a b loop on q, so it accepts "bba", which D rejects.
Answer: (A)
Keep practising