

MCQOPTIONS
Saved Bookmarks
This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your Compilers knowledge and support exam preparation. Choose a topic below to get started.
1. |
Consider the following deterministic finite state automaton M.S denotes the set of seven bit in which the 1st ,4th and last bits are 1. The number of strings that are accepted by M is |
A. | 1 |
B. | 5 |
C. | 7 |
D. | 8 |
Answer» D. 8 | |
2. |
Consider the machine M: The language recognized by M is : |
A. | {w ∈ {a, b}* / every a in w is followed by ex¬actly two b’s} |
B. | {w ∈ {a, b}* every a in w is followed by at least two b’} |
C. | {w ∈ {a, b}* w contains the substring ‘abb’} |
D. | {w ∈ {a, b}* w does not contain ‘aa’ as a substring} |
Answer» C. {w ∈ {a, b}* w contains the substring ‘abb’} | |
3. |
The length of the shortest string NOT in the language (over Σ = {a, b}) of the following regular expression is _____________a*b*(ba)*a* |
A. | 2 |
B. | 3 |
C. | 4 |
D. | 5 |
Answer» C. 4 | |
4. |
Let L1 = {w ∈ {0,1}∗ | w has at least as many occurrences of (110)’s as (011)’s}.Let L2 = { ∈ {0,1}∗ | w has at least as many occurrences of (000)’s as (111)’s}.Which one of the following is TRUE? |
A. | L1 is regular but not L2 |
B. | L2 is regular |
C. | L1 and L2 are regular |
D. | Neither of them are regular |
Answer» B. L2 is regular | |
5. |
Which of the regular expressions given below represent the following DFA?I) 0*1(1+00*1)*II) 0*1*1+11*0*1III) (0+1)*1 |
A. | I and II only |
B. | I and III only |
C. | II and III only |
D. | I II III |
Answer» C. II and III only | |
6. |
|
A. | q0, q1,q2 |
B. | q0,q1 |
C. | q0,q1,q2,q3 |
D. | q3 |
Answer» B. q0,q1 | |
7. |
The minimum state automation equivalent to the below FSA has the following number of states? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» C. 3 | |
8. |
The language accepted by this DFA is? |
A. | b*ab*ab*ab*b) (a+b)*c) b*a(a+ |
B. | (a+b)* |
C. | b*a(a+b)* |
D. | b*ab*ab* |
Answer» D. b*ab*ab* | |