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 16–20 of 62
Given a language L, define as follows:
for all
The order of a language L is defined as the smallest k such that . Consider the language L1 (over alphabet 0) accepted by the following automaton.
The order of L1 is ______
for all
The order of a language L is defined as the smallest k such that . Consider the language L1 (over alphabet 0) accepted by the following automaton.
The order of L1 is ______
Answer: 2
Reading the automaton, we get (empty string or an odd number of 0s).
- (it has no even lengths except 0)
- For : an odd length plus an odd length gives every even length, so
-
The smallest k with is 2.
Answer: 2
- (it has no even lengths except 0)
- For : an odd length plus an odd length gives every even length, so
-
The smallest k with is 2.
Answer: 2
Consider the language L given by the regular expression (a+b )* b (a+b ) over the alphabet {a, b}. The smallest number of states needed in a deterministic finite-state automation (DFA) accepting L is ___________.
Answer: 4
L has all strings whose second-last symbol is b. So the DFA has to remember the last two symbols. Use the states aa, ab, ba, bb (the last two symbols read). On reading symbol , state goes to state . The start state, before two symbols are read, acts as aa, because a missing symbol is not a b. The accepting states are ba and bb.
All 4 are distinguishable. The empty string separates {ba, bb} (accepted) from {aa, ab} (rejected). The string "a" then separates the rest: ab goes to ba (accepted) but aa goes to aa (rejected), and bb goes to ba (accepted) but ba goes to aa (rejected).
So the minimal DFA has 4 states.
Answer: 4
All 4 are distinguishable. The empty string separates {ba, bb} (accepted) from {aa, ab} (rejected). The string "a" then separates the rest: ab goes to ba (accepted) but aa goes to aa (rejected), and bb goes to ba (accepted) but ba goes to aa (rejected).
So the minimal DFA has 4 states.
Answer: 4
The minimum possible number of states of a deterministic automaton that accepts the regular language is ____
Answer: 8
A string is in L when its 3rd symbol is a (this is the a after , with ) and at least 3 more symbols follow it. So L is the set of strings of length at least 6 whose 3rd symbol is a.
The DFA needs these states:
- q0, q1, q2: 0, 1, 2 symbols read (any symbols)
- q3: the 3rd symbol was a. If it is b, the DFA goes to a dead state.
- q4, q5, q6: counting 1, 2, 3 more symbols. q6 is accepting and loops on a and b.
- the dead state
That is 7 + 1 = 8 states.
All 8 are distinguishable. From q0, q1, ..., q6 the shortest accepted string has length 6, 5, 4, 3, 2, 1, 0, all different, so a string of the shorter length separates any two of them. The dead state accepts nothing, so it differs from all the others.
Answer: 8
The DFA needs these states:
- q0, q1, q2: 0, 1, 2 symbols read (any symbols)
- q3: the 3rd symbol was a. If it is b, the DFA goes to a dead state.
- q4, q5, q6: counting 1, 2, 3 more symbols. q6 is accepting and loops on a and b.
- the dead state
That is 7 + 1 = 8 states.
All 8 are distinguishable. From q0, q1, ..., q6 the shortest accepted string has length 6, 5, 4, 3, 2, 1, 0, all different, so a string of the shorter length separates any two of them. The dead state accepts nothing, so it differs from all the others.
Answer: 8
Let denote that transition function and denote the extended transition function of the - NFA whose transition table is given below:
Then is ____
Then is ____
Answer: (C)
Take the -closures. The closure of q2 is {q2, q0}.
- Read a: q0 q1 take the closure to get {q1, q2, q0}
- Read b: q1 q3, and q0 q0 take the closure to get {q3, q0, q2}
- Read a: q0 q1 take the closure to get {q1, q2, q0}
Answer: {q0, q1, q2}
- Read a: q0 q1 take the closure to get {q1, q2, q0}
- Read b: q1 q3, and q0 q0 take the closure to get {q3, q0, q2}
- Read a: q0 q1 take the closure to get {q1, q2, q0}
Answer: {q0, q1, q2}
The number of states in the minimum sized DFA that accepts the language defined by the regular expression
(0+1)* (0+1)(0+1)*
is _______.
(0+1)* (0+1)(0+1)*
is _______.
Answer: 2
The expression gives every string that is not empty. The minimum DFA needs a start state that is not final (because the empty string is not accepted). It also needs one final state that loops on both 0 and 1.
Answer: 2
Answer: 2
Keep practising