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 1–5 of 62
Let be a nondeterministic finite automaton (NFA) with states over a finite alphabet.
Which of the following options CANNOT be the number of states in the minimal deterministic finite automaton (DFA) that is equivalent to ?
Which of the following options CANNOT be the number of states in the minimal deterministic finite automaton (DFA) that is equivalent to ?
One or more options are correct.
Answer: (B), (D)
Use the subset construction. An NFA with states gives a DFA with at most states, one for each subset of NFA states. Minimizing can only reduce the number of states. For the minimal DFA has at most states.
- 65 and 128 are more than 64, so they CANNOT be the size of the minimal DFA.
- 1 is possible: a 6-state NFA whose states all accept and loop on every symbol accepts all strings, and its minimal DFA has 1 state.
- 32 is possible: the language "the 5th symbol from the end is a" has a 6-state NFA (stay in the start state on any symbol, guess the 5th-from-last a, then move through 4 more states). Its minimal DFA needs states, because it must remember the last 5 symbols.
Answer: (B), (D)
- 65 and 128 are more than 64, so they CANNOT be the size of the minimal DFA.
- 1 is possible: a 6-state NFA whose states all accept and loop on every symbol accepts all strings, and its minimal DFA has 1 state.
- 32 is possible: the language "the 5th symbol from the end is a" has a 6-state NFA (stay in the start state on any symbol, guess the 5th-from-last a, then move through 4 more states). Its minimal DFA needs states, because it must remember the last 5 symbols.
Answer: (B), (D)
Consider the following two finite automata and .
Which of the following statements is/are true?
Which of the following statements is/are true?
One or more options are correct.
Answer: (C), (D)
Read each machine from its start state, which is also its only final state. Every cycle back to the start state has length 3.
: the loops are 0-0-0, 0-0-1, 0-1-0 and 1-0-1, so .
: the loops are 0-1-1, 1-1-1, 1-0-0 and 1-1-0, so .
The two sets of length-3 blocks have no block in common, and together they contain all 8 strings of length 3.
(A) False: 000 is in but not in . (B) False for the same reason, since is not a subset of . (C) True: a string in both would be a series of length-3 blocks that are in both sets, and no block is common, so only is in both. (D) True: has every length-3 string, so its star is all strings whose length is a multiple of 3.
Answer: (C), (D)
: the loops are 0-0-0, 0-0-1, 0-1-0 and 1-0-1, so .
: the loops are 0-1-1, 1-1-1, 1-0-0 and 1-1-0, so .
The two sets of length-3 blocks have no block in common, and together they contain all 8 strings of length 3.
(A) False: 000 is in but not in . (B) False for the same reason, since is not a subset of . (C) True: a string in both would be a series of length-3 blocks that are in both sets, and no block is common, so only is in both. (D) True: has every length-3 string, so its star is all strings whose length is a multiple of 3.
Answer: (C), (D)
A regular language is accepted by a non-deterministic finite automaton (NFA) with states. Which of the following statement(s) is/are FALSE?
One or more options are correct.
Answer: (D)
Let the regular language be accepted by an NFA with states. Two standard facts help here: (1) the subset construction always gives an equivalent DFA with at most states, and (2) the number of states in an NFA or DFA for a language is not unique. A smaller equivalent automaton can exist.
- " may have an accepting NFA with states": this can be true, because the -state NFA may not be minimal. So it is not a false statement.
- " may have an accepting DFA with states": this is also possible, depending on the language. So it is also true, not false.
- "There exists a DFA with states accepting ": the subset construction guarantees this. So it is also true, not false.
- "Every DFA that accepts L has states": this contradicts the subset construction, since a DFA with at most states always exists. So this statement is FALSE.
Answer: "Every DFA that accepts L has more than states" is the FALSE statement.
- " may have an accepting NFA with states": this can be true, because the -state NFA may not be minimal. So it is not a false statement.
- " may have an accepting DFA with states": this is also possible, depending on the language. So it is also true, not false.
- "There exists a DFA with states accepting ": the subset construction guarantees this. So it is also true, not false.
- "Every DFA that accepts L has states": this contradicts the subset construction, since a DFA with at most states always exists. So this statement is FALSE.
Answer: "Every DFA that accepts L has more than states" is the FALSE statement.
Consider the following deterministic finite automaton (DFA) defined over the alphabet, . Identify which of the following language(s) is/are accepted by the given DFA.
One or more options are correct.
Answer: (C)
Name the states (start), , and (the final state), from left to right. Each state records the longest suffix of the input read so far that is a prefix of : is none, is b, is ba, is bab.
Transitions: on a stays, on b goes to . on b stays, on a goes to . on b goes to , on a goes to . on a goes to , on b goes to .
So the DFA is in the final state exactly when the input ends with bab. This makes (C) true.
(A) False: has zero b's (even) but the start state is not final. (B) False: baba contains bab but ends in , which is not final. (D) False: a does not contain aba but ends in , which is not final.
Answer: (C)
Transitions: on a stays, on b goes to . on b stays, on a goes to . on b goes to , on a goes to . on a goes to , on b goes to .
So the DFA is in the final state exactly when the input ends with bab. This makes (C) true.
(A) False: has zero b's (even) but the start state is not final. (B) False: baba contains bab but ends in , which is not final. (D) False: a does not contain aba but ends in , which is not final.
Answer: (C)
Consider a finite state machine (FSM) with one input and one output , represented by the given state transition table. The minimum number of states required to realize this FSM is _________. (Answer in integer)
Answer: 5
Start by grouping the states by their output pattern. States with outputs are . States with are . State with is . State with is . This gives four starting groups.
Next, split the group by looking at which group each next state belongs to. States and both go to (group of , group of ) on . States and both go to (group of , group of ). So this group splits into and .
Check again with the new finer partition . In each group, the next states now match. For example, and both go to on and into on . Also and both go to on and into on . So the partition is stable and no more splitting happens.
The final equivalence classes are , which makes classes.
Answer: 5
Next, split the group by looking at which group each next state belongs to. States and both go to (group of , group of ) on . States and both go to (group of , group of ). So this group splits into and .
Check again with the new finer partition . In each group, the next states now match. For example, and both go to on and into on . Also and both go to on and into on . So the partition is stable and no more splitting happens.
The final equivalence classes are , which makes classes.
Answer: 5
Keep practising