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 36–40 of 62
Answer: (D)
The other statements are true:
- (A) The minimal DFA of a regular language is unique, up to renaming the states.
- (B) An NFA is a PDA that never uses its stack, so it converts to a PDA.
- (C) Every context-free language is decidable (for example by the CYK algorithm). A decider for the complement just runs it and flips the result, so the complement is recursive (even though it need not be context-free).
Answer: (D)
Which one of the following is TRUE?
Answer: (A)
M1: the first state stays on 0 and goes to the middle state on 1. From the middle state, 0 goes back to the first state and 1 goes to the final state, which loops on 0 and 1. So M1 accepts exactly the strings that contain 11 as a substring: .
M2: the first state loops on 0 and 1, and it can move on a 1 to the middle state and then on another 1 to the final state, which loops on 0 and 1. So M2 also accepts exactly the strings that contain 11: .
Both languages are the set of strings containing 11, so . So (A) is true.
Check the others:
(B) is false if means a proper subset, because the two sets are equal.
(C) , since a language and its complement share no string. So (C) is also true, as a direct consequence of (A).
(D) , so is false.
So, as set in the paper, both (A) and (C) are true. The basic result is , and (C) only follows from it, so (A) is the accepted key.
Answer: (A)
Answer: (A)
The given DFA reaches its final state only after reading , so it accepts exactly the strings that end with , that is .
Swapping final and non-final states gives the complement: the new DFA accepts all strings that do not end with .
The complement DFA (L') is:
A. Strings that do not end with . This is exactly L'.
B. Strings that begin with either or . The string begins with but is rejected, because it reaches the non-final state . Also is accepted by L' but begins with neither.
C. Strings that do not contain the substring . The string contains , yet it is accepted, because it ends in the final state .
D. The language of . Every such string has at least one , but is accepted by L'.
Answer: (A)
Answer: (A)
Each state of the DFA is a subset of the set of states of the equivalent NFA. So the equivalent DFA of an NFA can have at most states. Here is the number of states in the NFA. A set with items has at most subsets.
So, the answer here is (A).
1. + 0(01*1 + 00) * 01*
2. + 0(10 *1 + 00) * 0
3. + 0(10 *1 + 10) *1
4. + 0(10 *1 + 10) *10 *
Answer: (C)
P: s and n are final. From m, going back to m takes either 0 then 0 (via s), or 0, then 1's, then 1 (via n). The machine can end at s (after 0) or at n (after 0 and some 1's), so it ends with . This gives , which is 1.
Q: only s is final. Loops at m are 00 (via s) and (via n). The machine ends at s after a 0, so , which is 2.
R: only s is final. Loops at m are 10 (via s) and (via n). The machine ends at s after a 1, so , which is 3.
S: s and n are final, so it can end at s (after a 1) or at n (after 1 and some 0's), which is . Loops are the same as R, so , which is 4.
So P-1, Q-2, R-3, S-4. Check with 01010: Q reads it as s, m, n, n, m, s and ends in its final state, and it matches expression 2 as 0, 101, 0. P has no move on 1 from m, so it rejects the string, and expression 1 also cannot match it.
Answer: (C)
Keep practising