Theory Of Computation (TOC)

Aptitude Education

Q:1Let R1 and R2 be regular sets defined over alphabet ∑ then
Ans:1   a.) R1 UNION R2 is regular   b.) R1 INTERSECTION R2 is regular   c.) ∑ INTERSECTION R2 IS NOT REGULAR   d.) R2* IS NOT REGULAR
Q:2Consider the production of the grammar S->AA A->aa A->bb Describe the language specified by the production grammar.
Ans:2   a.) L = {aaaa,aabb,bbaa,bbbb}   b.) L = {abab,abaa,aaab,baaa}   c.) L = {aaab,baba,bbaa,bbbb}   d.) L = {aaaa,abab,bbaa,aaab}
Q:3Give a production grammar that specified language L = {ai b2i >= 1}
Ans:3   a.) {S->aSbb,S->abb}   b.) {S->aSb, S->b}   c.) {S->aA,S->b,A->b}   d.) None of the above
Q:4Which of the following String can be obtained by the language L = {ai b2i / i >=1}
Ans:4   a.) aaabbbbbb   b.) aabbb   c.) abbabbba   d.) aaaabbbabb
Q:5Give a production grammar for the language L = {x/x ∈ (a,b)*, the number of a’s in x is multiple of 3}.
Ans:5   a.) {S->bS,S->b,S->aA,S->bA,A->aB,B->bB,B->aS,S->a}   b.) {S->aS,S->bA,A->bB,B->bBa,B->bB}   c.) {S->aaS,S->bbA,A->bB,B->ba}   d.) None of the above
Q:6The production Grammar is {S->aSbb,S->abb} is
Ans:6   a.) type-3 grammar   b.) type-2 grammar   c.) type-1 grammar   d.) type-0 grammar
Q:7Which of the following statement is wrong?
Ans:7   a.) A Turing Machine can not solve halting problem.   b.) Set of recursively enumerable languages is closed under union.   c.) A Finite State Machine with 3 stacks is more powerful than Finite State Machine with 2 stacks   d.) Context Sensitive grammar can be recognized by a linearly bounded memory machine.
Q:8Which of the following statement is wrong ?
Ans:8   a.) Recursive languages are closed under union.   b.) Recursive languages are closed under complementation.   c.) If a language and its complement are both regular then the language must be recursive.   d.) A language is accepted by FA if and only if it is recursive
Q:9Which of the following statement is wrong ?
Ans:9   a.) Every recursive language is recursively enumerable   b.) A language is accepted by FA if and only if it is context free.   c.) Recursive languages are closed under intersection   d.) A language is accepted by a FA if and only if it is right linear.
Q:10Which of the following statement is true ?
Ans:10   a.) All languages can be generated by CFG   b.) The number of symbols necessary to simulate a Turing Machine(TM) with m symbols and n states is mn.   c.) Any regular languages has an equivalent CFG.   d.) The class of CFG is not closed under union.
Q:11Recursively enumerable languages are not closed under
Ans:11   a.) Complementation   b.) Union   c.) Intersection   d.) None of the above
Q:12Regular expression (x/y)(x/y) denotes the set
Ans:12   a.) {xy,xy}   b.) {xx,xy,yx,yy}   c.) {x,y}   d.) {x,y,xy}
Q:13Regular expression x/y denotes the set
Ans:13   a.) {x,y}   b.) {xy}   c.) {x}   d.) {y}
Q:14The regular expression denote a language comprising all possible strings of even length over the alphabet (0,1)
Ans:14   a.) 1 + 0(1+0)*   b.) (0+1)(1+0)*   c.) (1+0)   d.) (00+0111+10)*
Q:15The regular expressions denote zero or more instances of an x or y is
Ans:15   a.) (x+y)   b.) (x+y)*   c.) (x* + y)   d.) (xy)*
Q:16The regular expression have all strings in which any number of 0`s is followed by any number of 1`s followed by any number of 2`s is :
Ans:16   a.) (0+1+2)*   b.) 0*1*2*   c.) 0* + 1 + 2   d.) (0+1)*2*
Q:17The regular expression have all strings of 0`s and 1`s with no two consecutive 0`s is :
Ans:17   a.) (0+1)   b.) (0+1)*   c.) (0+∈) (1+10)*   d.) (0+1)* 011
Q:18The regular expression with all strings of 0`s and 1`s with atleast two consecutive 0`s, is :
Ans:18   a.) 1 + (10)*   b.) (0+1)*00(0+1)*   c.) (0+1)*011   d.) 0*1*2*
Q:19Which of the following is NOT the set of regular expression R = (ab + abb)* bbab
Ans:19   a.) ababbbbab   b.) abbbab   c.) ababbabbbab   d.) abababab
Q:20Which string can be generated by S->aS/bA, A->d/ccA
Ans:20   a.) aabccd   b.) adabcca   c.) abcca   d.) abababd
Q:21The regular sets are closed under
Ans:21   a.) Union   b.) Concenteration   c.) Kleen closure   d.) All of the above
Q:22Which of the following statement is wrong ?
Ans:22   a.) the regular sets are closed under intersection   b.) the class of regular sets is closed under substitution   c.) The class of regular sets is closed under homomorphism   d.) Context Sensitive Grammar(CSG) can be recognized by Finite State Machine
Q:23A FSM can be considered, having finite tape length without rewinding capability and unidirectional tape movement
Ans:23   a.) Turing machine   b.) Pushdown automata   c.) Context free languages   d.) Regular languages
Q:24Any given transition graph has an equivalent
Ans:24   a.) regular   b.) DFSM (Deterministic Finite State Machine)   c.) NDFSM   d.) All of them
Q:25The intersection of CFL and regular languages
Ans:25   a.) is always regular   b.) is always context-free   c.) both option 1 and option 2 above   d.) need not be regular

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.