Theory of Computation Solutions
Theory of Computation Solutions
Theory of Computation Solutions
Solutions
A. 37 B. 35 C. 2 D. 36
Solution: Option C
2. Let the string be defined over symbols a and b then what will be the number of states in minimal
DFA, if every string starts and ends with different symbols?
A. 5 B. 4 C. 3 D. None
Solution: Option A
A. 7 B. 10 C. 11 D. 8
Solution: Option C
4. Let ∑= {a, b}, what are the number of states in minimal DFA, length of every string congruent
to mod 5.
A. 2 B. 3 C. 5 D. None
Solution: Option C
Solution: Option D
Solution: Option D
1
7. S AB
A BB/ a
B AB/ b
Solution: Option B
8. One of the following Regular Expressions is not the same as others. Which one?
Solution: Option C
Solution: Option A
Solution: Option D
11. Consider the regular grammar generating the set of all strings ending with ‘00’.
S 1S/ 0P
P 0C/ 0/ 1S
Solution: Option A
2
12. Consider a DFA with
Solution: Option D
13. What are the number of states needed in minimal DFA, that accepts (1+1111)*
A. 5 B. 4 C. 1 D. None
Solution: Option C
The smallest string for which the grammar has two derivation trees:
Solution: Option B
Solution: Option B
Solution: Option A
3
17. Let ∑= {0, 1}
What will be the number of states in minimal DFA, if the Binary number string is congruent
to (mod 8).
A. 8 B. 9 C. 7 D. 4
Solution: Option D
18.
The FA above recognizes a set of stings of length 6, what is the total number of strings that can
be generated from the FA?
A. 18 B. 20 C. 130 D. None.
Solution: Option B
19. What are the number of final states in minimal DFA, where ∑= {a, b}, if every string starts
with “aa” and length of string is not congruent to 0 (mod 4).
A. 7 B. 6 C. 3 D. 5
Solution: Option C
20. How many DFA with four states can be constructed over the alphabet ∑= {a, b} with
designated initial state?
Solution: Option B
21. Let ∑= {a}, assume language, L= { a2012.K/ K> 0}, what is minimum number of states
needed in a DFA to recognize L?
4
Solution: Option B
SaB/ bA
A a/ aS/ bAA
B b/ bS/ aBB generates strings with
Solution: Option C
23. Let A= (a + b)* ab (a + b)*, B= a*b* and C= (a + b)*. Then the relation between A, B and C:
Solution: Option C
Solution: Option B
25.
Let M1 be the NFA obtained by interchanging final and non-final states of M. Let the
language accepted by M be L and that accepted by M1 be L1. Choose correct statement:
A. L1= L
5
B. L1∩ L2= Φ
C. L1⊆ L2
D. L1= (0+ε)*
Solution: Option D
26. Assertion (a): The language L= Set of all strings not containing 101 as a substring is regular set
Regular (r): L satisfies the regular set but not the pumping lemma.
A. Both (a) and (r) are true and (r) is a reason for (a)
B. Both (a) and (r) are true and (r) is not correct reason (a)
C. Both (a) and (r) are false
D. (a) is true but (r) is false
Solution: Option B
27. Let M= (Q, ∑, δ, S, F) and M’= (Q, ∑, δ, S, Q-F ) where M accepts L and M’ accepts L1 and
M is NFA, what could be the relation between L and L’ ?
Solution: Option C
28.
Solution: Option B
6
29. The minimal DFA of the above machine has:
Solution: Option A
Consider the grammar given below where the flowers are non-terminals and animals are
terminals:
X XX/ aX/ bX/ null string
where, a is tiger and b is for lion
Solution: Option B
31. The string for which the grammar has maximum of two derivation trees is:
A. lion tiger lion B. lion tiger C. tiger lion D. None of the above
Solution: Option D
Solution: Option B
7
33. What will be this TM?
Solution: Option C