MCQ | Theory of Computation (TOC) Part 1


Theory of Computation - TOC


1. That finite automata which does not contain any ambiguity is called




... Answer is A)
DFA


2. Machine without output




... Answer is A)
DFA



3. PDA is a set of _____ tupples




... Answer is A)
7



4. Grammar ia s set of following tuples




... Answer is C)
(V,T,P,S)



5. Construct a Regular Expression which accept string of 0's and 1's end with substring 00.




... Answer is C)
(0 + 1)* (00)



6. Construct a Regular Expression which accept string of a's and b's contain one a's and two b's




... Answer is B)
abb +bab +bba



7. ε + 11* =




... Answer is A)
1+ (1 positive closure)



8. Which grammar is in GNF




... Answer is B)
A->aB, B->b



9.εεaεεbεcεε=




... Answer is A)
abc



10.Moore Machine is an application of




... Answer is C)
Finite automata with output



11. In Moore machine produce output over the change of




... Answer is A)
transitions



12. Moore Machine produce output of length ______ for any input string




... Answer is B)
|Input|+1



13. "What is the output for the given language? Language: A set of strings over ∑= {a, b} is taken as input and it prints 1 as an output “for every occurrence of a, b as its substring. (INPUT: abaaab)"




... Answer is A)
10001



14. In Moore machine output alphabet can be represented as:




... Answer is C)



15. Which of the following is a correct statement?




... Answer is A)
Moore machine has no final states



16. In mealy machine, the O/P depends upon?




... Answer is B)
state and input



17. The major difference between Mealy and Moore machine can be can be identify by




... Answer is B)
output



18. The major difference between Mealy and Moore machine can be can be identify by




... Answer is A)
output



19. Which of the following does not belong to input alphabet if S={a, b}* for any language?




... Answer is A)
ε



20. The number of final states we need as per the given language? Language L: {an| n is even or divisible by 3}




... Answer is C)
2



21.A Language for which no DFA exist is a________




... Answer is A)
Non-Regular Language



22. How we know 2 finite states are equivalent?




... Answer is C)
When same number of states as well as transitions



23. Can a DFA recognize a palindrome number?




... Answer is C)
No



24. Let ∑= {a, b, …. z} and A = {TOC, Quiz}, B= {Input, Output}, then (A*∩B) U (B*∩A) can be represented as:




... Answer is A)
{}



25. The language of all words with at least 2 0's can be described by the regular expression




... Answer is D)
All of these



26. The following CFG is in S -> aBB , B -> bAA , A -> a, B -> b




... Answer is A)
Greibach normal form



27. In a context-sensitive grammar, number of grammar symbols on the left hand side of a production can't be greater than the number of




... Answer is C)
Non-terminals on the right hand side



28. Which of the following denotes Chomskian hiearchy?




... Answer is B)
REG -> CFL -> CSL -> type0



29. A grammar that produces more than one parse tree for some sentence is called




... Answer is A)
Ambiguous



30. If R1 and R2 are the regular expressions denoting the languages L1 and L2 respectively, then which of the following is wrong?




... Answer is A)
φ is not a regular expression



31. A language is represented by a regular expression (0)*(0 + 10). Which of the following string does not belong to the regular set represented by the above expression.




... Answer is C)
1010



32. Which of the following is true?




... Answer is C)
Every finite subset of non-regular set is regular



33. A push down automata is different than finite automata by




... Answer is B)
Its memory



34. Turing machine is more powerful than (a) Finite automata, (b) Push down




... Answer is C)
Only (b)



35. Turing machine was invented by




... Answer is C)
Alan Turing



36. NPDA stands for




... Answer is C)
non deterministic pushdown automata



37. A Turing machine with several tapes in known as




... Answer is A)
Multi-tape Turing machine



38. If P, Q, R are three regular expressions and if P does not contain epsilon, then the equation R = Q + RP has a unique solution given by




... Answer is A)
QP*



39. A language L is said to be ___ if there is a turing machine M such that L(M)=L and M halts at every point.




... Answer is C)
Decidable



40. Which of the given problems are NP-complete?




... Answer is A)
Traveling Salesman Problem



41. A grammar G=(V,T,P,S) in which V represents




... Answer is D)
Set of non terminals



42. A PDA chooses the next move based on




... Answer is A)
current state, stack and input



43. The difference between number of states in FA for regular expression (a + b) and (a + b) * is:




... Answer is A)
1



44. Which among the following is the LEAF of the parse tree?




... Answer is A)
Terminal T



45. The ability for a system of instructions to simulate a Turing Machine is called




... Answer is C)
Turing Completeness



46. Which of the following statement is false?




... Answer is C)
There exists a unique DFA for every regular language



47. Identify the following problem: If G=(V, E) and V’ is subset of V, then V’ is an independent set if no two nodes in V’ are connected by an edge in E.




... Answer is A)
Independent set



48. Which one of the following languages over the alphabet {a,b} is described by the regular expression: (a+b)*a(a+b)*a(a+b)* ?




... Answer is C)
The set of all strings containing at least two a’s.



49. Which one of the following is FALSE?




... Answer is A)
Every nondeterministic PDA can be converted to an equivalent deterministic PDA.



50.The regular expression a*(ba*)* denotes the same set as




... Answer is B)
(b*a)*b*



51. Let S and T be language over Σ = {0,1} represented by the regular expressions (0+1*)* and (0+1)*, respectively. Which of the following is true?




... Answer is A)
S = T



52. How many minimum states are required in a DFA to find whether a given binary string has odd number of 0's or not, there can be any number of 1's




... Answer is A)
2



53. The number of states in the minimal deterministic finite automaton corresponding to the regular expression (a + b)*(ba) is ____________




... Answer is C)
3



54. The language accepted by a Push down Automata




... Answer is C)
Type2



55. Correct hierarchical relationship among context- free, right-linear, and context-sensitive language is




... Answer is D)
right-linear ⊂context-free ⊂context-sensitive



56. Which of the following CFG's can't be simulated by an FSM?




... Answer is A)
aSb | ab



57. Consider a grammar with the following productions S--> aab | bac | aB,S --> α S |,S --> α b b | ab,Sα --> bdb | b The above grammar is




... Answer is D)
Context sensitive



58. Which of the following statement is wrong?




... Answer is B)
All non-regular languages can be generated by CFGs



59. Which of the following conversion is not possible (algorithmically)?




... Answer is C)
Nondeterministic PDA to deterministic PDA



60. The grammars G = ( { s }, { a, b }, p , s) where, p = (s —> 0S1, S —> 0S, S —> S1, S —>a} is a




... Answer is C)
Regular language

No comments:

Post a Comment