Multiple Choice Questions (Set I)
In each of the following questions, choose the correct answer from the four choices provided.
1. | The following grammar
G = (N, T, P, S)
N = {S, A, B}
T = {a, b, c}
P : S → aSa
| ||||||||||||||||||||||||||||||||||||
2. | The following grammar
| ||||||||||||||||||||||||||||||||||||
3. | The following grammar
G = (N, T, P, S)
N = {S, A, B, C}
T = {a, b, c}
P : S → aS
| ||||||||||||||||||||||||||||||||||||
4. | The following grammar
| ||||||||||||||||||||||||||||||||||||
5. | Consider the following CFG
Consider the following derivation
This derivation is
| ||||||||||||||||||||||||||||||||||||
6. | Consider the following language
L = {anbncndn|n ≥ 1}
L is
| ||||||||||||||||||||||||||||||||||||
7. | Consider the following language
L = {anbn|n ≥ 1}
L is
| ||||||||||||||||||||||||||||||||||||
8. | Consider the following language
L = {anbmcpdq|n, m, p, q ≥ 1}
L is
| ||||||||||||||||||||||||||||||||||||
9. | The following CFG is in
S → AB
B → CD
B → AD
B → b
D → AD
D → d
A → a
C → a
| ||||||||||||||||||||||||||||||||||||
10. | The following CFG is in
S → aBB
B → bAA
A → a
B → b
| ||||||||||||||||||||||||||||||||||||
11. | Which of the following CF language is inherently ambiguous?
| ||||||||||||||||||||||||||||||||||||
12. | Which string is not accepted by the following FSA?
| ||||||||||||||||||||||||||||||||||||
13. | Which string is accepted by the following FSA?
| ||||||||||||||||||||||||||||||||||||
14. | Can a DFSA simulate a NFSA
| ||||||||||||||||||||||||||||||||||||
15. | Which of the following is true for an arbitrary language L.
| ||||||||||||||||||||||||||||||||||||
16. | The concept of FSA is much used in this part of the compiler
| ||||||||||||||||||||||||||||||||||||
17. | The concept of grammar is much used in this part of the compiler
| ||||||||||||||||||||||||||||||||||||
18. | (a + b)(cd)*(a + b) denotes the following set
| ||||||||||||||||||||||||||||||||||||
19. | baa*c denotes the set
| ||||||||||||||||||||||||||||||||||||
20. | The set of all strings over the alphabet Σ = {a, b} (including ε) is denoted by
| ||||||||||||||||||||||||||||||||||||
21. | Palindromes can’t be recognized by any FSA because
| ||||||||||||||||||||||||||||||||||||
22. | Let Σ = {a, b, c, d, e}. The number of strings in Σ* of length 4 such that no symbol is used more than once in a string is
| ||||||||||||||||||||||||||||||||||||
23. | Which of the following denotes Chomskian hiearchy?
| ||||||||||||||||||||||||||||||||||||
24. | A language L is accepted by a FSA iff it is
| ||||||||||||||||||||||||||||||||||||
25. | Which of the following regular expressions denotes a language comprising of all possible strings over Σ = {a, b} of length n where n is a multiple of 3.
| ||||||||||||||||||||||||||||||||||||
26. | A language is represented by a regular expression (a)*(a + ba). Which of the following string does not belong to the regular set represented by the above expression.
| ||||||||||||||||||||||||||||||||||||
27. | Which of the following is not primitive recursive but partially recursive?
| ||||||||||||||||||||||||||||||||||||
28. | Consider the following right-linear grammar G = (N, T, P, S) N = {S}
Which of the following regular expression denotes L(G)?
| ||||||||||||||||||||||||||||||||||||
29. | Which of the following strings is not generated by the following grammar? S → SaSbS|ε
| ||||||||||||||||||||||||||||||||||||
30. | Consider the following NFSA
The automaton accepts
| ||||||||||||||||||||||||||||||||||||
31. | Consider a language L for which there exists a Turing machine (TM), T, that accepts every word in Land either rejects or loops for every word that is not in L. The language L is
| ||||||||||||||||||||||||||||||||||||
32. | Consider the following statements
Which of the above statement are TRUE?
| ||||||||||||||||||||||||||||||||||||
33. | Which of the following statement is wrong?
| ||||||||||||||||||||||||||||||||||||
34. | Recursively enumerable languages are not closed under
| ||||||||||||||||||||||||||||||||||||
35. | Which of the following problem is undecidable?
| ||||||||||||||||||||||||||||||||||||
36. | Recursive languages are
| ||||||||||||||||||||||||||||||||||||
37. | R1 and R2 are regular sets. Which of the following is not true?
| ||||||||||||||||||||||||||||||||||||
38. | Which of the following regular expression identity is true?
| ||||||||||||||||||||||||||||||||||||
39. | Which one of the following statement is FALSE?
| ||||||||||||||||||||||||||||||||||||
40. | Which of the following conversion is not possible (algorithmically)?
|
Answers
1. | b |
2. | c |
3. | a |
4. | d |
5. | d |
6. | b |
7. | a |
8. | c |
9. | c |
10. | d |
11. | b |
12. | a |
13. | b |
14. | b |
15. | b |
16. | a |
17. | b |
18. | c |
19. | c |
20. | a |
21. | d |
22. | b |
23. | a |
24. | d |
25. | c |
26. | c |
27. | c |
28. | c |
29. | d |
30. | c |
31. | d |
32. | b |
33. | d |
34. | c |
35. | d |
36. | a |
37. | a |
38. | b |
39. | c |
40. | c |
0 comments:
Post a Comment