Theory Of Computation _ Weekly Test 02 - Test Paper
Theory Of Computation _ Weekly Test 02 - Test Paper
[MCQ] [MSQ]
6. Consider the language L given by the regular 7. Which of the following option is/are correct?
expression (a + b)* ab(a + b)* over the alphabet {a, b}. (a) For L = {w|w {a, b}*, |w| = 5} Minimum
What is the correct regular expression of L ? number of states in DFA is 7.
(a) (a + b)* (ab + ba + bb + aa) + (b) For L = {w|w {a, b}* |w| 5} minimum number
(b) (a* b*)* (ba + bb + aa) (a*b*)* + a + b of stater in NFA is 6.
(c) (a + b)* ba (a + b)* + a + b (c) L = {w|w {a, b}*}, 6th symbol from begin is ‘a’}
(d) (a + b)* (ba + bb + aa) (a + b)* + + a + b minimum number of states in DFA is 64.
(d) L = {w|w {a, b}*, 10th symbol from ends is ‘a’}
minimum number of states in DFA is 1024.
2
[MCQ]
[MCQ] 10. The following diagram represents a finite state
8. Consider the following statements: machine which takes as input a binary number from the
S1: If a finite automata M with n states accepts a string least significant bit
of length w, w ≥ n then surely L(M) is infinite.
S2: If a finite automata m with n states accepts a string
of length w, w < n then, surly L(M) is finite.
S3: The pumping length for any regular language is
unique.
Which of the following is correct: Which one of the following is TRUE?
(a) S1 and S2 are correct. (a) It computes 1’s complement of the input number
(b) S1 and S3 are correct. (b) It computes 2’s complement of the input number
(c) S2 and S3 are correct. (c) It increments the input number
(d) None of this. (d) It decrements the input number
[MSQ]
9. For language L = {Every odd bit is a}
On alphabet = {a, b}. Which of the following is/are
correct regular expression?
(a) (aa + ab)* ( + a)
(b) (aa + ab + ba + b)*a
(c) (aa + ba)*( + a + b)
(d) (a(a + b))* + (a(a + b))* a
3
Answer Key
1. (b) 6. (d)
2. (3) 7. (a, b, d)
3. (2) 8. (d)
4. (0) 9. (a, d)
5. (b) 10. (b)
4
7. (a, b, d)
Number of states = 5 (a) n + 2 = 5 + 2 = 7 states DFA
(b) n + 1 = 5 + 1 = 6 states NFA
2. (3) (c) n + 2 = 6 + 2 = 8 states DFA
(d) 2n = 210 = 1024 states DFA
Hence, (a, b, d) are correct.
Number of states = 3
The above NFA represents the language where 2nd 8. (d)
symbol is ‘a’. S1 True:
3. (2)
n=3
(w) ≥ 3
For 3 length there must be a loop an any
Number of states = 2
state. S2 False:
|w| < n
4. (0)
L1 ∩ L2 = a* + b* 2<3
L3 ∩ L4 = a* b* a* S2 will be true If and only if all the strings
L = (a* + b*) – a*b*a* S3 False: where | w | <n .
= Minimum pumping length is unique.
Number of strings = 0
9. (a, d)
5. (b)
R = (a + b)* (a + b)2 (a + b)*
Number of equivalence classes in my hill Nerode =
Number of states in minimal DFA
DFA for R:
FA:
For more questions, kindly visit the library section: Link for web: https://smart.link/sdfez8ejd80if