MCQ | Theory of Computation (TOC) Part 2


Theory of Computation - TOC


1. If L be a language recognizable by a finite automaton, then language front {L} = { w such that w is prefix of v where v ∈ L }, is a




... Answer is B)
Regular language


2. If a language is denoted by a regular expression L = ( x )* (x | y x ) , then which of the following is not a legal string within L ?




... Answer is C)
xyxyx



3. Finite automatarequires minimum number of stacks.




... Answer is A)
0



4. Number of final state require to accept Φ in minimal finite automata.




... Answer is D)
None of these



5. How many DFA’s exits with two states over input alphabet {a,b} ?




... Answer is A)
64



6. A Language for which no DFA exist is a




... Answer is A)
Non-Regular Language



7. Which of the following option is correct?




... Answer is A)
NFA is slower to process and its representation uses less memory than DFA



8. Concatenation Operation refers to which of the following set operations




... Answer is A)
Dot



9.RR* can be expressed in which of the forms




... Answer is D)
R+



10.What kind of expressions do we used for pattern matching?




... Answer is C)
Regular and RationalExpression



11. If L1′ and L2′ are regular languages, then L1.L2 will be




... Answer is C)
regular



12. If L is a regular language, then (L’)’ U L will be




... Answer is C)
L



13. Generate a regular expression for the given language: L(x): {xÎ{0,1}*| x ends with 1 nd does not contain a substring 01}




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



14. The entity which generate Language is termed as:




... Answer is C)
Grammar



15. Which of the following statement is false?




... Answer is A)
Context sensitive language is a subset of context freelanguage



16. The Grammar can be defined as: G=(V, ∑, p, S) In the given definition, what does S represents?




... Answer is A)
Starting Variable



17. Which among the following cannot be accepted by a regular grammar?




... Answer is C)
L is a set of 0n1n



18. A multi track turing machine can described as a 6-tuple (Q, X, S, d, q0, F) where X represents:




... Answer is B)
tape alphabet



19. A turing machine has number of states in a CPU.




... Answer is B)
finite



20. Which of the following is false for an abstract machine?




... Answer is D)
all of the mentioned



21.Turing machine can be represented using the following tools




... Answer is D)
all of the mentioned



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




... Answer is A)
Turing Completeness



23. A turing machine is a




... Answer is A)
more than one option is correct



24. There is a linear grammar that generates a context free grammar




... Answer is B)
sometimes



25. A is context free grammar with atmost one non terminal in the right handside of the production.




... Answer is A)
linear grammar



26. Context free languages are not closed under:




... Answer is D)
All of the mentioned



27. What does NP stands for in complexity classes theory?




... Answer is A)
Non-deterministic polynomial



28. A generalization of P class can be:




... Answer is A)
NP



29. The complexity class P consist of all the decision problems that can be solved by using polynomial amount of computation time.




... Answer is A)
Deterministic Turing machine



30. Which of the following cannot be solved using polynomial time?




... Answer is D)
None of the mentioned



31. Which of the functions can a turing machine not perform?




... Answer is A)
Inserting a symbol



32. Which of the following can accept even palindrome over {a,b}




... Answer is C)
NDFA



33. An algorithm is called efficient if it runs in time on a serial computer




... Answer is A)
polynomial



34. The decision problem is the function from string to




... Answer is C)
boolean



35. Grammar is checked by which component of compiler




... Answer is A)
Both Scanner and Sementic Analyser



36. ______ is the acyclic graphical representation of a grammar.




... Answer is A)
Parse tree



37. A grammar with more than one parse tree is called




... Answer is C)
Ambiguous



38. Which among the following is the root of the parse tree




... Answer is A)
Starting Variable S



39. In which order are the children of any node ordered




... Answer is C)
From the left



40. The most suitable data structure used to represent the derivations in compiler




... Answer is A)
Tree



41. The entity which generate Language is termed as




... Answer is D)
Grammar

No comments:

Post a Comment