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
Questions 56–60 of 62
Let the language accepted by M be L. Let L1 be the language accepted by the NFA M1, obtained by changing the accepting state of M to a non-accepting state and by changing the non-accepting state of M to accepting states. Which of the following statements is true ?
Answer: (B)
Which strings does M1 accept?
The empty string : the start state is accepting.
Any non-empty string: its first symbol (0 or 1) takes to on the arrow labelled 0,1. Then has a loop on 0,1, so the machine can stay in for the rest of the string and end in the accepting state .
So , and (B) is true.
Swapping accepting states in an NFA does not give the complement, so (A) is not automatic. Check it with the string 1. In M, 1 takes to , which accepts, so 1 is in L. 1 is also in . So is not .
For (C) and (D): is in but not in L, because is not accepting in M. So and .
Answer: (B)
Let S denote the set of seven bit binary strings in which the first, the fourth, and the last bits are 1.
The number of strings in S that are accepted by M is
Answer: (C)
The DFA stays in its first state on , and a right after a single sends it back to the start. It reaches the final state only after two s in a row followed by a , and then stays final. So it accepts every string that has as a substring: .
A string in S has bits with . The substring can start at position , and it needs and .
- : needs , impossible.
- or : needs , impossible.
- : and fits.
- : and fits.
Case : , where the two bits are free. That gives 4 strings.
Case : , where the two bits are free. That gives 4 strings.
The string is in both cases. Total .
Answer: (C)
Answer: (B)
The automaton only needs to know the length of the input mod 3. It has three states: (start and only final state), and . Every symbol moves it around the cycle . So 3 states are enough.
Fewer is not possible. Two inputs whose lengths differ mod 3 can be told apart by a suitable suffix. If the lengths are , append any string of length . The first total length is divisible by 3 and is accepted, and the second is not. So the three length classes need three different states.
Answer: (B)
Answer: (A)
Look at the state. A is entered only on input 0, so in A the previous bit is 0. B is entered only on 1 from A, and C only on 1 from B or C. So in B and C the previous bit is 1.
Check every arc:
A, input 0: . The arc is 0/00.
A, input 1: . The arc is 1/01.
B, input 0: . The arc is 0/01.
B, input 1: . The arc is 1/10.
C, input 0: . The arc is 0/01.
C, input 1: . The arc is 1/10.
All six arcs match, so (A) is true.
(B) is wrong: for input 11 the second 1 gives output 10, not 01. (C) is wrong: for input 10 the 0 gives output 01 (from B), not 00.
Answer: (A)
Answer: (D)
A state must remember the pair (, ). There are such pairs, all reachable (by ), and the DFA that moves between them on each symbol accepts the language, with as start and only final state. So 48 states are enough.
None can be merged. Take two different pairs and . Append . The first pair becomes and is accepted. The second becomes , which is not , so it is rejected. So all 48 states are pairwise distinguishable, and by the Myhill-Nerode theorem the minimum is 48.
Answer: (D)
Keep practising