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 6–10 of 62
Let . For , let be the product of symbols in modulo 7. We take , where is the null string.
For example, .
Define
The number of states in a minimum state DFA for is ___________. (Answer in integer)
For example, .
Define
The number of states in a minimum state DFA for is ___________. (Answer in integer)
Answer: 6
Since 7 is prime and none of 1, 2, 3, 4 is a multiple of 7, the running product mod 7 is never 0. It always lies in . Let each DFA state be the product so far mod 7. The start state is 1 (because ), reading a symbol moves from to , and the only accepting state is 2.
All 6 states are reachable. Reading 3 again and again gives the products , which covers every nonzero residue.
No two states are equivalent. Take states . Every nonzero residue is the product of some string, so pick a string with (the inverse exists since 7 is prime). From this ends at , which accepts. From it ends at , which rejects.
So no state can be merged, and the minimal DFA has 6 states.
Answer: 6
All 6 states are reachable. Reading 3 again and again gives the products , which covers every nonzero residue.
No two states are equivalent. Take states . Every nonzero residue is the product of some string, so pick a string with (the inverse exists since 7 is prime). From this ends at , which accepts. From it ends at , which rejects.
So no state can be merged, and the minimal DFA has 6 states.
Answer: 6
Consider the 5 -state DFA accepting the language shown below. For any string let be the number of in and be the number of 1 's in .
Which of the following statements is/are FALSE?
Which of the following statements is/are FALSE?
One or more options are correct.
Answer: (B), (C)
On input 0 the DFA goes 1231. On input 1 it goes 1451. The reverse arrows undo a step. So the DFA keeps track of :
state 1 = 0, states 2 and 5 = 1, states 3 and 4 = 2.
. States with the same value are equivalent.
- States 2 and 4 (values 1 and 2) are distinguishable. On input "1": 21 accepts, 45 rejects TRUE.
- 3 and 4: both have value 2 equivalent statement FALSE.
- 2 and 5: both have value 1 equivalent statement FALSE.
- difference 0 accepted TRUE.
Answer: "States 3 and 4 are distinguishable" and "States 2 and 5 are distinguishable"
state 1 = 0, states 2 and 5 = 1, states 3 and 4 = 2.
. States with the same value are equivalent.
- States 2 and 4 (values 1 and 2) are distinguishable. On input "1": 21 accepts, 45 rejects TRUE.
- 3 and 4: both have value 2 equivalent statement FALSE.
- 2 and 5: both have value 1 equivalent statement FALSE.
- difference 0 accepted TRUE.
Answer: "States 3 and 4 are distinguishable" and "States 2 and 5 are distinguishable"
Consider the language L over the alphabet {0, 1}, given below:
The minimum number of states in a Deterministic Finite-State Automaton (DFA) for L is _____.
The minimum number of states in a Deterministic Finite-State Automaton (DFA) for L is _____.
Answer: 4
The DFA counts the 1s seen in a row:
- q0: start, or the last symbol was 0 (no 1 pending)
- q1: one 1 in a row
- q2: two 1s in a row
- q3: three 1s in a row, a dead state (non-final) that loops on 0 and 1
Transitions: on 1, q0 q1 q2 q3. On 0, q0, q1 and q2 all go back to q0. q0, q1 and q2 are final.
The 4 states are distinguishable. q3 rejects everything, while the other three accept the empty string. From q2 the string "1" is rejected, but from q0 and q1 it is accepted. From q1 the string "11" is rejected, but from q0 it is accepted. So no state can be merged.
Answer: 4
- q0: start, or the last symbol was 0 (no 1 pending)
- q1: one 1 in a row
- q2: two 1s in a row
- q3: three 1s in a row, a dead state (non-final) that loops on 0 and 1
Transitions: on 1, q0 q1 q2 q3. On 0, q0, q1 and q2 all go back to q0. q0, q1 and q2 are final.
The 4 states are distinguishable. q3 rejects everything, while the other three accept the empty string. From q2 the string "1" is rejected, but from q0 and q1 it is accepted. From q1 the string "11" is rejected, but from q0 it is accepted. So no state can be merged.
Answer: 4
Which one of the following regular expressions correctly represents the language of the finite automaton given below?
Answer: (D)
The start state is not a final state. Look at the moves from the start state:
- On a, the machine goes to the upper final state. This state loops on b and goes back to the start on b. One full round trip is .
- On b, the machine goes to the lower final state. This state loops on a and goes back to the start on a. One full round trip is .
So the machine can make any number of round trips . Then it ends in one of the final states, with or .
This is .
Answer: (D)
- On a, the machine goes to the upper final state. This state loops on b and goes back to the start on b. One full round trip is .
- On b, the machine goes to the lower final state. This state loops on a and goes back to the start on a. One full round trip is .
So the machine can make any number of round trips . Then it ends in one of the final states, with or .
This is .
Answer: (D)
Consider the following language:
Which one of the following deterministic finite automata accepts ?
Which one of the following deterministic finite automata accepts ?
Answer: (D)
Each state must remember the longest suffix that matches a prefix of 011. The states are q0 (nothing), q1 ("0"), q2 ("01") and q3 ("011", the final state).
Transitions out of the final state: on 0 it goes q1 (suffix "0"). On 1 it goes q0 (the suffix "0111" has no useful part).
- (A) and (B) loop on 1 at the final state, so they accept 0111. False
- (C) moves from the final state to q2 on 1, so it accepts 01111. False
- (D) has exactly the transitions given above. True
Answer: D
Transitions out of the final state: on 0 it goes q1 (suffix "0"). On 1 it goes q0 (the suffix "0111" has no useful part).
- (A) and (B) loop on 1 at the final state, so they accept 0111. False
- (C) moves from the final state to q2 on 1, so it accepts 01111. False
- (D) has exactly the transitions given above. True
Answer: D
Keep practising