Toc Comp Final Merge
Toc Comp Final Merge
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. Which of the following a Turing machine does not consist of?
A : Input tape
B : Head
C : State register
D : Stack
A : Finite
B : Infinite
C : May be finite
D : One
Q.no 3. Turing machine is more powerful than (a) Finite automata, (b) Push down
automata
A : Only (a)
B : Only (b)
A : Ambiguous
B : Regular
C : Non Regular
D : Context sensitive
Q.no 6. Given the language L = {ab, aa, baa}, which of the following strings are in
L*? 1) abaabaaabaa 2) aaaabaaaa
3) baaaaabaaaab 4) baaaaabaa
A : 1, 2 and 3
B : 2, 3 and 4
C : 1, 2 and 4
D : 1, 3 and 4
Q.no 7. Construct a regular expression for the language that contains strings
having at least one pair of consecutive zeros over {0, 1}.
A : (100)*
B : 1* (00)* 1*
C : [ (1 + 0 )* (00) (1 + 0 )*] +
D : ((0+1)(0+1))*
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
D : L is a set of 0^n1^n
A : accepted by DFA
B : accepted by PDA
C : accepted by LBA
A : Useful symbols
B : epsilon productions
C : Reachable symbols
A : regular
B : context sensitive
C : context free
D : Unrestricted
A : x+1
B:x
C : x-1
D : x2
Q.no 15. Number of states required to accept strings ending with 101
A:3
B:4
C:2
D : cannot be represented.
A : (01)*0 = 0(10)0*
B : (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*
C : (0+1)*01(0+1)*+1*0* = (0+1)*0
D : (01)*01 = 0(10)0*1
A : any grammar
A : regular language
D : unrestricted language
A:
B:
C:
D:
Q.no 20. In Moore machine, if input is of length n, then length of output string will
be
A:n
B : n+1
C : n+n
D : n-1
Q.no 21. The set of all strings over {a,b} in which strings consisting a’s and b’s and
ending with bb is
A : ab
B : a*bbb
C : (a+b)* bb
D : (a+b)+ bb
Q.no 22. According to the given language, which among the following expressions
does it corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
D : (0+1+ε)^4
Q.no 25. The production of the form A->B , where A and B are non terminals is
called
A : Null production
C : Unit production
Q.no 27. Which of the following automata takes stack as auxiliary storage
A : finite automata
B : pushdown automata
C : Turing machine
Q.no 28. Which among the following is not true for 2-way infinte TM?
C : Any computation that can be performed by 2-way infinite tape can also be
performed by standard TM.
Q.no 29. CFGs are more powerful than (a) DFA, (b) NDFA, (c) Mealy Machine
A : Only (a)
Q.no 30. Which productions will generate even length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
A:0
B:1
C:2
D:3
B : no trival method.
Q.no 33. The difference between number of states in FA for regular expression (a
+ b) and (a + b) * is:
A:1
B:2
C:3
D:0
Q.no 35. How many strings of length less than 4 contain the language described by
the regular expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
Q.no 36.
A:
B:
C:
D:
Q.no 37. The maximum number of transitions which can be performed over a
state in a DFA having alphabet set a,b,c are
A:1
B:2
C:3
D:4
A : subset
B : proper subset
C : not subset
Q.no 39. Which of the following statement(s) are correct? (a) All languages can be
generated by CFG, (b) Any regular language has an equivalent CFG, (c) Some non
regular languages cannot be generated by CFG.
A : only (a)
B : Only (b)
C : Only (c)
D : Both (b) and (c)
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
Q.no 41. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
A:
B:
C:
D:
A : Kleene closure
B : Concatenation
C : Complement
D : Union
A:
B:
C:
Q.no 45. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 46. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 47. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 48. Consider the following statements.
I. The complement of every Turing decidable language is Turing decidable
II. There exists some language which is in NP but is not Turing decidable
III. If L is a language in NP, L is Turing decidable
Which of the above statements is/are true?
A : Only II
B : Only III
C : Only I and II
Q.no 49. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 50. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 51. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
A : i,ii are equal and ii,iii are not
A:3
B:5
C:7
D:2
Q.no 53.
B : X is decidable
Q.no 54. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
Q.no 55. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 56. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 58. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 60. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Answer for Question No 1. is d
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
A : A->B
B : A->b
C : B->Aa
D : B->aA
Q.no 5. The major difference between Mealy and Moore machine is about:
A : Output Variations
B : Input Variations
C : Both
D : Transitions
A : Regular Language
B : Non-Regular Language
C : May be Regular
D : Cannot be said
A : accepted by DFA
B : accepted by PDA
C : accepted by LBA
D : accepted by Turing machine
C : Turing machine rejects if the input does not belong to the language
A : input symbol
B : stack symbol
C : output symbol
D : tape symbol
A : Captal Letters
B : Small Letters
C : Italic Letters
D : Roman Letters
A : leftmost derivation
B : rightmost derivation
A : Type 0 grammar
B : Type 1 grammar
C : Type 2 grammar
D : Type 3 grammar
Q.no 13. Which among the following are incorrect regular identities?
A:
B:
C:
D:
Q.no 14. A grammar that produces more than one parse tree for some sentence is
called
A : ambiguous
B : unambiguous
C : regular
A : Concatenation
B : Selection
C : Iteration
D : Addition
Q.no 16.
A : L*
B:
C:L
D:
A : Terminal Symbol
C : Start symbol
D : End symbol
Q.no 18. Which one of the following languages over the alphabet {0, 1} is
described by the regular expression: (0+1)*0(0+1)*0(0+1)*
D : The set of all strings that begin and end with either 0 or 1
A : queue
B : linked list
C : hash table
D : stack
Q.no 20. Turing Machine also behaves like General purpose computer and that TM
is known as _______
A : Yes
B : No
C : May be
D : Cannot be determined
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
Q.no 24. Which productions will generate odd length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
A : Quadruple
B : Quintuple
C : Triple
Q.no 26. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings in which the total number of a’s is
divisible by 2.
A : ((a+b)(a+b))*
B : (a + ab)*
C : ( b* a b*ab*)* + b*
D : a* b (aa)*b a*
Q.no 27. Out of the three decision problems P1, P2 and P3, P1 is decidable and P2 is
undecidable. The statement that holds true is
B : P3 is decidable if P1 is reducible to P3
C : P3 is undecidable if P1 is reducible to P3
D : P3 is undecidable if P2 is reducible to P3
A:3
B:7
C:5
D:6
Q.no 29. Which of the regular expressions correspond to the given problem
statement: Express the identifiers in C Programming language where l=letters
d=digits
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
A : Mealy machine
B : Moore machine
C : Turing machine
Q.no 32. The regular expression with all strings of 0′s and 1′s with at least two
consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
A : subset
B : proper subset
C : not subset
Q.no 34. The travelling salesman problem can be solved using _________
A : A spanning tree
D : DFS traversal
A : false
B : true
C : may be
D : cannot say
Q.no 36. The problem of finding a path in a graph that visits every vertex exactly
once is called
Q.no 39. Which of the following represents a language which has no pair of
consecutive 1’s if alphabet = {0,1}?
A:
B:
C:
D:
Q.no 40. Which of the following statement is correct?
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
Q.no 41. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Q.no 43. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 44. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 45.
Q.no 46. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
Q.no 47. The regular expression for all strings of 0′s and 1′s with no two
consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
Q.no 48. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 49. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 50. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
A:
B:
C:
Q.no 52. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 53. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 54. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 55. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
A : I and II
B : I and IV
C : II and III
D : II and IV
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 58. John is asked to make an automaton which accepts a given string for all
the occurrence of ‘1001’ in it. How many number of transitions would John use
such that, the string processing application works?
A : 10
B : 11
C : 12
D : 15
Q.no 59.
A : X is decidable
A : Only II
B : Only III
C : Only I and II
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Finite Automaton
B : Turing Machine
A:1
B:2
C:3
D : Depends on problem
B : stack symbol
C : output symbol
D : tape symbol
A : Its memory
B : number of states
C : start state
D : input symbols
A:
B:
C:
D:
Q.no 6. _________ is the class of decision problems that can be solved by non-
deterministic polynomial algorithms?
A : NP
B:P
C : Hard
D : Complete
Q.no 7. If T1 and T2 are two Turing machines, the composite can be represented
using the expression
A : T1 T2
B : T2 T1
C : T1 X T2
D : T2 X T1
A : decidable problem
B : undecidable problem
C : complete problem
D : trackable problem
A : Terminals
B : Variables
C : Start Symbol
D : Productions
C : Nothing
D : Type of input
Q.no 12. The major difference between a moore and mealy machine is that
Q.no 13.
A:R
B:
C : R*
D:
Q.no 14. Which among the following is the format of unit production?
A : A->B
B : A->b
C : B->Aa
D : B->aA
A : true
B : false
C : maybe
D : cannot say
Q.no 16. Which of the following a Turing machine does not consist of?
A : Input tape
B : Head
C : State register
D : Stack
B : LR(K)
C : SLR(K)
D : CLR(K)
Q.no 18. Problems that can be solved in polynomial time are known as
A : intractable
B : tractable
C : decision
D : complete
A : Terminals
B : Variables
C : Start Symbol
D : Productions
Q.no 21. Out of the three decision problems P1, P2 and P3, P1 is decidable and P2 is
undecidable. The statement that holds true is
B : P3 is decidable if P1 is reducible to P3
C : P3 is undecidable if P1 is reducible to P3
D : P3 is undecidable if P2 is reducible to P3
Q.no 22. Number of external states of a UTM should be atleast
A:1
B:2
C:3
D:4
A : [(a+b)*(aa+bb)]*
B : [(0+1)-(0b+a1)*(a+]*
C : (01+11+10)*
D : (1+2+0)*(1+2)*
D : Turing Machine
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 26. The complexity class P consist of all the decision problems that can be
solved by ___________using polynomial amount of computation time.
B : DFA
C : NDFA
A : String
B : Word
C : Alphabet
D : Grammar
Q.no 28. Which among the following is not true for 2-way infinte TM?
C : Any computation that can be performed by 2-way infinite tape can also be
performed by standard TM.
Q.no 29. The ability for a system of instructions to simulate a Turing Machine is
called _________
A : Turing Completeness
B : Simulation
C : Turing Halting
D : Computability
Q.no 30. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be
generated by
A : (r1)(r2)
B : (r1 + r2)
C : (r2)(r1)
D : (r1)
A : Instantaneous description
B : input symbols
C : start state
D : final state
Q.no 35. The operations of PDA never work on elements other than top of the
stack.
A : false
B : true
C : may be
D : cannot say
Q.no 36. Which of the following is not a Non deterministic Turing machine?
D : Unsolvable
Q.no 37. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
B : stack alphabet
D : transition function
Q.no 39. Number of states required to accept strings ending with 10 are
A:3
B:2
C:1
D : can’t be represented.
Q.no 40. For a DFA accepting binary numbers whose decimal equivalent is
divisible by 4, what are all the possible remainders?
A:0
B:2
C : 0,2,4
D : 0,1,2,3
Q.no 41. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 42. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 44. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 45. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 46. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence
of non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
Q.no 47.
A : X is decidable
Q.no 48. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 50. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 51. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 52. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 53. Find the pair of regular expressions that are equivalent
A:3
B:5
C:7
D:2
Q.no 56. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 57.
A:A
B:B
C:C
D:D
A : Only II
B : Only III
C : Only I and II
A:
B:
C:
D:
Q.no 60. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Answer for Question No 1. is b
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is
called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
A : Concatenation
B : Selection
C : Iteration
D : Addition
Q.no 3. Which of the following statement is true?
C : Converting from Mealy into Moore machine and vice versa is not possible
Q.no 4. Which of the following case does not exist in complexity theory?
A : Best case
B : Worst case
C : Average case
D : Null case
A : (01)*0 = 0(10)0*
B : (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*
C : (0+1)*01(0+1)*+1*0* = (0+1)*0
D : (01)*01 = 0(10)0*1
Q.no 6. Given the language L = {ab, aa, baa}, which of the following strings are in
L*? 1) abaabaaabaa 2) aaaabaaaa
3) baaaaabaaaab 4) baaaaabaa
A : 1, 2 and 3
B : 2, 3 and 4
C : 1, 2 and 4
D : 1, 3 and 4
A : leftmost derivation
B : rightmost derivation
Q.no 9. The finite automata is called NFA when there exists____________ for a
specific input from current state to next state
A : Single path
B : Multiple paths
D : Three paths
A : regular language
Q.no 13. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
B : P class
C : NP complete
D : NP hard
C : LR parsing
D : SLR parsing
A : x+1
B:x
C : x-1
D : x2
C : Computability
D : All of these
A : type 0
B : type 1
C : type 2
D : type 3
A : Useful symbols
B : epsilon productions
C : Reachable symbols
A : Finite
B : Infinite
C : May be finite
D : One
A : yes
B : no
C : maybe
D : never
Q.no 21. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be
generated by
A : (r1)(r2)
B : (r1 + r2)
C : (r2)(r1)
D : (r1)
Q.no 22. The total number of states and transitions required to form a Moore
machine that processes a binary input string and will produce residue mod 3.
A : 3 and 6
B : 3 and 5
C : 2 and 4
D : 2 and 5
Q.no 24. The regular expression with all strings of 0′s and 1′s with at least two
consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
Q.no 26.
A:
B:
C:
D : {0, 1}
Q.no 27. The subset construction shows that every NFA accepts a ……..
A : String
B : Function
C : Regular language
D : Context-free language
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
Q.no 30. Which productions will generate even length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
Q.no 31. Which of the following pairs have DIFFERENT expressive power?
Q.no 32. The automaton which allows transformation to a new state without
consuming any input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
Q.no 33.
A : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the
right movement.
B : Perform the transition from q0 to q1 by changing "X" symbol to "a" and perform the
right movement.
C : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the
Left movement.
D : Perform the transition from q0 to q1 by changing "q0" symbol to "q1" and perform
the right movement.
Q.no 34. Which of the regular expressions correspond to the given problem
statement: Express the identifiers in C Programming language where l=letters
d=digits
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
Q.no 35. An instantaneous description of Turing machine consists of
C : Both NP-complete
D : Both in P
Q.no 37. The shown language is recognized by (a) Turing machine, (b) Pushdown
A : Only (a)
B : Only (b)
C : Only (c)
D : current state
A : Every language that is defined by regular expression can also be defined by finite
automata
A:3
B:7
C:5
D:6
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 42. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
Q.no 44. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 46. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 47.
A:A
B:B
C:C
D:D
Q.no 48. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 50. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A:
B:
C:
Q.no 52. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence
of non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
Q.no 53. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
Q.no 55. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 56. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
B : Incorrect, Incomplete DFA
C : Wrong proposition
D : May be correct
Q.no 57.
B : X is decidable
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 59. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
A:
B:
C:
D:
Answer for Question No 1. is b
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : A->B
B : A->b
C : B->Aa
D : B->aA
A : yes
B : no
C : may be
D : cannot say
Q.no 3. Those problems that require large amount of computational resources that are
practically not feasible to solve, these problems are known as _________
A : Decidable
B : Undecidable
C : Tractable
D : Intractable
Q.no 4. Which of the following regular expressions represents the set of strings which
do not contain a substring ‘rt’ if alphabet = {r, t}
A : (rt)*
B : (tr)*
C : (r*t*)
D : (t*r*)
A : intractable
B : tractable
C : decision
D : complete
Q.no 6.
A : b*a*
B : (a*b*)*
C : a*b*
D:
C : Turing machine rejects if the input does not belong to the language
Q.no 10. A problem is called __________ if it has an efficient algorithm for itself.
A : Tractable
B : Intractable
C : Computational
D : Computable
Q.no 11. The decision problem is the function from string to ______________
A : char
B : int
C : boolean
D : float
Q.no 12. Turing Machine also behaves like General purpose computer and that TM is
known as _______
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
A : true
B : false
C : maybe
D : cannot say
Q.no 15. The transition a Push down automaton makes is additionally dependent upon
the:
A : Current State
B : input tape
C : stack
D : terminals
A : Terminal Symbol
C : Start symbol
D : End symbol
Q.no 17. The finite automata is called NFA when there exists____________ for a specific
input from current state to next state
A : Single path
B : Multiple paths
D : Three paths
Q.no 19. Which of the following case does not exist in complexity theory?
A : Best case
B : Worst case
C : Average case
D : Null case
Q.no 20. The major difference between a moore and mealy machine is that
Q.no 21. The RE in which any number of 0′s is followed by any number of 1′s followed
by any number of 2′s is
A : (0+1+2)*
B : 0*1*2*
C : 0* + 1 + 2
D : (0+1)*2*
Q.no 23. Recursively enumerable languages are …….. , whereas recursive languages are
…....
Q.no 24. The set of all strings over alphabet = {a,b} in which all strings having bbbb as
substring is
B : (a+b)* bb (a+b)*bb
C : bbb(a+b)*
D : bb (a+b)*
Q.no 27. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
Q.no 29. CFGs are more powerful than (a) DFA, (b) NDFA, (c) Mealy Machine
A : Only (a)
Q.no 30. Turing machine (TM) is more powerful than FSM (Finite State Machine)
because
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
Q.no 32. For a DFA accepting binary numbers whose decimal equivalent is divisible by
4, what are all the possible remainders?
A:0
B:2
C : 0,2,4
D : 0,1,2,3
A : Yes
B : No
C : May be
D : Cannot be determined
Q.no 34. The complexity class P consist of all the decision problems that can be solved
by ___________using polynomial amount of computation time.
B : DFA
C : NDFA
Q.no 36. It is less complex to prove the closure properties over regular languages using
A : NFA
B : DFA
C : PDA
D : Canot be said
Q.no 38. The subset construction shows that every NFA accepts a ……..
A : String
B : Function
C : Regular language
D : Context-free language
Q.no 39. The automaton which allows transformation to a new state without consuming
any input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
Q.no 41. The regular expression denotes a language comprising all possible strings of
even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
A:
B:
C:
A:3
B:5
C:7
D:2
Q.no 44. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 46. The lexical analysis for a modern computer language such as Java needs the
power of which one of the following machine models in a necessary and sufficient
sense?
D : Turing machine
Q.no 47. The regular expression for all strings of 0′s and 1′s with no two consecutive 0′s
is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
A:
B:
C:
D:
Q.no 50. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii) ((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 51. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
A : any palindrome
Q.no 53. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 54. Which Transition table of Turing Machine is correct to check well formedness
of parentheses?
A:
B:
C:
D:
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 56. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 57. Which grammar accepts the language of {a, b} having strings ending with 'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 58. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 59. Out of the three problems S, Q and R, S is an NP-complete problem and Q and R
are the two other problems not known to be in NP. Which one of the following
statements is true if Q is polynomial time reducible to S and S is the polynomial time
reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 60. The set of all strings over alphabet ={a,b} in which a single a followed by any
number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Answer for Question No 1. is a
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Recursive
B : Non Recursive
C : Recognizable
D : Non Recognizable
Q.no 3. _________ is the class of decision problems that can be solved by non-
deterministic polynomial algorithms?
A : NP
B:P
C : Hard
D : Complete
A:
B:
C:
D:
Q.no 5. The Grammar can be defined as: G= (V, T, P, S) In the given definition, what
does S represents?
A : Accepting State
B : Starting Variable
C : Sensitive Grammar
D : Final state
A : LL(1)
B : SLR
C : CLR
D : LALR
Q.no 7. Which of the following are the actions that operates on stack top?
A : only push
B : only pop
Q.no 8. Which of the following a Turing machine does not consist of?
A : Input tape
B : Head
C : State register
D : Stack
Q.no 9. Turing Machine can update symbols on its tape, whereas the FA cannot
update symbols on tape.
A : true
B : false
C : Cannot say
D : May be
Q.no 10. A grammar that produces more than one parse tree for some sentence is
called
A : ambiguous
B : unambiguous
C : regular
Q.no 11.
A:R
B:
C : R*
D:
Q.no 12. What is the Regular Expression Matching Zero or More Specific
Characters
A:x
B:#
C:*
D:&
Q.no 13. Which of the following can be used to simulate any Turing machine?
C : Counter machines
Q.no 14. What is the value of n if Turing machine is defined using n-tuples?
A:6
B:7
C:8
D:5
C : Nothing
D : Type of input
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
A : Its memory
B : number of states
C : start state
D : input symbols
Q.no 18. Those problems that are solvable in polynomial time belong to __
A : NP
B:P
C : Hard
D : Complete
A:0
B:1
C:2
D:3
Q.no 20.
A:
B:
C:0
D:1
Q.no 21. Which of the following is the restricted model of Turing machines (a)
Turing machine with semi-infinite tape, (b) Multi stack machine, (c) Offline
Turing machine
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 22. Which of the following pairs have different expressive power
Q.no 23. The set of all strings over alphabet = {a,b} in which all strings having
bbbb as substring is
B : (a+b)* bb (a+b)*bb
C : bbb(a+b)*
D : bb (a+b)*
Q.no 24. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings in which any occurrence of the
symbol b, is in groups of odd numbers.
A : (abbb)*
B : a* b (bb)* a*
C : ((a+b)(a+b)(a+b))*
D : a* b* (bb)* a*
Q.no 25. Which of the following is analogous to the NFA and NPDA ?
D : Unrestricted language
Q.no 26. Construct a regular expression for the language that contains strings
having even number of 0’s followed by odd number of 1’s over {0, 1}.
A : (00)* 1 (11)*
B : ((0+1)(0+1))*
C : (0+1)*
D : (001)*
A : subset
B : proper subset
C : not subset
B : stack alphabet
D : transition function
Q.no 30.
A:
B:
C:
D : {0, 1}
C : Palindrome string
Q.no 32.
A:
B:
C:
D:
B : no trival method.
B : Type 2
C : Type 1
D : Type 0
Q.no 35. The regular expression with all strings of 0′s and 1′s with at least two
consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
C : Both NP-complete
D : Both in P
Q.no 37. The difference between Turing Machine and Two Way FA is in:
A : Input Tape
C : Finite Control
D : All of these
Q.no 38. Out of the three decision problems P1, P2 and P3, P1 is decidable and P2 is
undecidable. The statement that holds true is
B : P3 is decidable if P1 is reducible to P3
C : P3 is undecidable if P1 is reducible to P3
D : P3 is undecidable if P2 is reducible to P3
Q.no 39. For a DFA accepting binary numbers whose decimal equivalent is
divisible by 4, what are all the possible remainders?
A:0
B:2
C : 0,2,4
D : 0,1,2,3
A : Regular language
B : Context-free language
C : Context-sensitive language
Q.no 41. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 42.
A : Only II
B : Only III
C : Only I and II
Q.no 44. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 45. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 47. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 50. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 51. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 53. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 58. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
A:
B:
C:
D:
Q.no 60. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
Answer for Question No 1. is a
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. The major difference between Mealy and Moore machine is about:
A : Output Variations
B : Input Variations
C : Both
D : Transitions
A : Input alphabet
B : Transition function
C : Initial State
D : Output alphabet
B : Variables
C : Start Symbol
D : Productions
Q.no 4. Which of the following statement is true? (a) Turing machine was
developed by Alan Turing, (b) PDA is less powerful than Turing machine, (c) FA is
more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
A:
B:
C:
D:
Q.no 6. The Grammar can be defined as: G= (V, T, P, S) In the given definition, what
does S represents?
A : Accepting State
B : Starting Variable
C : Sensitive Grammar
D : Final state
Q.no 8. A->aA| a| b
The number of steps to generate aab are
A:2
B:3
C:4
D:5
Q.no 9. Given the language L = {ab, aa, baa}, which of the following strings are in
L*? 1) abaabaaabaa 2) aaaabaaaa
3) baaaaabaaaab 4) baaaaabaa
A : 1, 2 and 3
B : 2, 3 and 4
C : 1, 2 and 4
D : 1, 3 and 4
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
Q.no 11. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
B : P class
C : NP complete
D : NP hard
A : Recursive language
C : Regular language
A : decidable
B : Undecidable
C : sometimes decidable
D : infinite
Q.no 15. Turing Machine can update symbols on its tape, whereas the FA cannot
update symbols on tape.
A : true
B : false
C : Cannot say
D : May be
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
D : LL1 Parsing
A : leftmost derivation
B : rightmost derivation
C : Nothing
D : Type of input
C : Converting from Mealy into Moore machine and vice versa is not possible
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
Q.no 22. The set of all strings over {a,b} in which strings consisting a’s and b’s and
ending with bb is
A : ab
B : a*bbb
C : (a+b)* bb
D : (a+b)+ bb
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
Q.no 25. Which of the following statement(s) are correct? (a) All languages can be
generated by CFG, (b) Any regular language has an equivalent CFG, (c) Some non
regular languages cannot be generated by CFG.
A : only (a)
B : Only (b)
C : Only (c)
Q.no 26. The difference between Turing Machine and Two Way FA is in:
A : Input Tape
C : Finite Control
D : All of these
Q.no 30. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
C : Palindrome string
Q.no 34. A context free language is called ambiguous if (a) It has two or more
leftmost derivations for the same string. (b) It has two or more rightmost
derivations for the same string. (c) It has Only single derivation tree.
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 35. The worst case complexity of a deterministic problem to find the
satisfiability of a given formula of n variables is
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
Q.no 36. The problem of finding a path in a graph that visits every vertex exactly
once is called
Q.no 37. Which of the following is not a Non deterministic Turing machine?
D : Unsolvable
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
Q.no 40. Which of the following represents a language which has no pair of
consecutive 1’s if alphabet = {0,1}?
A:
B:
C:
D:
Q.no 41. John is asked to make an automaton which accepts a given string for all
the occurrence of ‘1001’ in it. How many number of transitions would John use
such that, the string processing application works?
A : 10
B : 11
C : 12
D : 15
A : any palindrome
Q.no 43. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 44. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 45. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 46. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 47. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
A:
B:
C:
D:
Q.no 49.
A:A
B:B
C:C
D:D
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 52. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
A : Only II
B : Only III
C : Only I and II
D : Only I and III
Q.no 55. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 56. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
traversed?
A:AB
B:BD
C:CD
D:DA
A:
B:
C:
Q.no 60. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Answer for Question No 1. is a
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
C : Nothing
D : Type of input
B : Non Recursive
C : Recognizable
D : Non Recognizable
Q.no 4. _________ is the class of decision problems that can be solved by non-
deterministic polynomial algorithms?
A : NP
B:P
C : Hard
D : Complete
A : accepted by DFA
B : accepted by PDA
C : accepted by LBA
Q.no 6. Which of the following regular expressions represents the set of strings
which do not contain a substring ‘rt’ if alphabet = {r, t}
A : (rt)*
B : (tr)*
C : (r*t*)
D : (t*r*)
Q.no 7. Which of the following does not belong to the language if input alphabet
set is a,b
A:a
B:b
C : epsilon
D:c
Q.no 8. A grammar that produces more than one parse tree for some sentence is
called
A : ambiguous
B : unambiguous
C : regular
A : any grammar
Q.no 11. Those problems that are solvable in polynomial time belong to __
A : NP
B:P
C : Hard
D : Complete
A:
B:
C:
D:
A : Turing acceptable
B : Decidable
C : Undecidable
D : NP-HARD
Q.no 14. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is
called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
Q.no 15. A grammar G=(V, T, P, S) is __________ if every production taken one of the
two forms: B->aC , B->a
A : Ambiguous
B : Regular
C : Non Regular
D : Context sensitive
Q.no 16. Given the expression, is there some assignment of true and false values
to the variables that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
B:x
C : x-1
D : x2
Q.no 18. Which among the following is the format of unit production?
A : A->B
B : A->b
C : B->Aa
D : B->aA
A:
B:
C:
D:
Q.no 20. A two-way infinite tape Turing machine is ________ superior than the basic
model of the Turing machine in terms of power.
A : More
B : Less
C : No way
D : Very Much
Q.no 22. Which of the following automata takes stack as auxiliary storage
A : finite automata
B : pushdown automata
C : Turing machine
Q.no 25. Which productions will generate odd length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
A : Regular
B : Context free
C : Context sensitive
D : Unrestricted
Q.no 28. Is the language preserved in all the steps while eliminating epsilon
transitions from a NFA?
A : yes
B : no
C : may be
D : cannot say
C : Palindrome string
A : Input Tape
C : Finite Control
D : All of these
Q.no 32. A context free language is called ambiguous if (a) It has two or more
leftmost derivations for the same string. (b) It has two or more rightmost
derivations for the same string. (c) It has Only single derivation tree.
A : Only (a)
B : Only (b)
D : Only (c)
A : Empty
B : abcabc
C : b*c|a
D : abc
Q.no 34. According to the given language, which among the following expressions
does it corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
D : (0+1+ε)^4
Q.no 35. Which of the following is not a Non deterministic Turing machine?
D : Unsolvable
A : false
B : true
C : may be
D : cannot say
Q.no 37. Out of the three decision problems P1, P2 and P3, P1 is decidable and P2 is
undecidable. The statement that holds true is
B : P3 is decidable if P1 is reducible to P3
C : P3 is undecidable if P1 is reducible to P3
D : P3 is undecidable if P2 is reducible to P3
Q.no 38. CFGs are more powerful than (a) DFA, (b) NDFA, (c) Mealy Machine
A : Only (a)
D : current state
Q.no 40. How many strings of length less than 4 contain the language described by
the regular expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
Q.no 42. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 43. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 44.
A:A
B:B
C:C
D:D
Q.no 45. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 46. The regular expression for all strings of 0′s and 1′s with no two
consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
Q.no 47. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 48. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 51. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 52. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 53. John is asked to make an automaton which accepts a given string for all
the occurrence of ‘1001’ in it. How many number of transitions would John use
such that, the string processing application works?
A : 10
B : 11
C : 12
D : 15
Q.no 54. The following Turing machine acts like
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 55. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 56. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
A : Kleene closure
B : Concatenation
C : Complement
D : Union
A:
B:
C:
D:
Q.no 59. Find the pair of regular expressions that are equivalent
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Terminals
B : Variables
C : Start Symbol
D : Productions
B : More than one state can have two or more outgoing transitions
A : Recursive language
C : Regular language
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
A : R+
B : R-
C : R+ U R-
D:R
B : false
C : maybe
D : cannot say
A : Type 0 grammar
B : Type 1 grammar
C : Type 2 grammar
D : Type 3 grammar
A:
B:
C:
D:
Q.no 11. Those problems that require large amount of computational resources
that are practically not feasible to solve, these problems are known as _________
A : Decidable
B : Undecidable
C : Tractable
D : Intractable
Q.no 12. Which of the production rule can be accepted by Chomsky grammar. (i)
A->BC, (ii) A->a
A : only i
B : only ii
C : both i and ii
D : neither i nor ii
Q.no 13. Given the language L = {ab, aa, baa}, which of the following strings are in
L*? 1) abaabaaabaa 2) aaaabaaaa
3) baaaaabaaaab 4) baaaaabaa
A : 1, 2 and 3
B : 2, 3 and 4
C : 1, 2 and 4
D : 1, 3 and 4
Q.no 14. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
B : P class
C : NP complete
D : NP hard
D : LL1 Parsing
D : Type of input
Q.no 18. The minimum number of states required to recognize an octal number
divisible by 3 is
A:1
B:3
C:5
D:7
Q.no 20. Which of the following statement is true? (a) Turing machine was
developed by Alan Turing, (b) PDA is less powerful than Turing machine, (c) FA is
more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
A : (1+0)*
B:
C : ((0+1)(0+1))*
D : (01 + 10)*
Q.no 23. Number of states required to accept strings ending with 10 are
A:3
B:2
C:1
D : can’t be represented.
Q.no 24. A context free language is called ambiguous if (a) It has two or more
leftmost derivations for the same string. (b) It has two or more rightmost
derivations for the same string. (c) It has Only single derivation tree.
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 25. Which of the functions are not performed by the Turing machine after
reading a symbol?
Q.no 26. Which among the following is equivalent to the given regular expression
01*+1
A : (01)*+1
B : 0((1)*+1)
C : (0(1)*)+1
D : ((0*1)1*)*
Q.no 29. Turing machine (TM) is more powerful than FSM (Finite State Machine)
because
Q.no 30. The ability for a system of instructions to simulate a Turing Machine is
called _________
A : Turing Completeness
B : Simulation
C : Turing Halting
D : Computability
B : proper subset
C : not subset
B : no trival method.
Q.no 34. What does it mean when we say that an algorithm X is asymptotically
more efficient than Y?
A : regular language
C : unrestricted
A : Mealy machine
B : Moore machine
C : Turing machine
A : Every language that is defined by regular expression can also be defined by finite
automata
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A : Only II
B : Only III
C : Only I and II
A:
B:
C:
D:
Q.no 44. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 45. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 46. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 47. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence
of non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
Q.no 48.
A:A
B:B
C:C
D:D
Q.no 49. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Q.no 50. John is asked to make an automaton which accepts a given string for all
the occurrence of ‘1001’ in it. How many number of transitions would John use
such that, the string processing application works?
A : 10
B : 11
C : 12
D : 15
Q.no 51. Find the pair of regular expressions that are equivalent
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 53. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 56.
B : X is decidable
Q.no 57. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 58. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 59. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 60. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Answer for Question No 1. is b
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. Given the language L = {ab, aa, baa}, which of the following strings are in
L*? 1) abaabaaabaa 2) aaaabaaaa
3) baaaaabaaaab 4) baaaaabaa
A : 1, 2 and 3
B : 2, 3 and 4
C : 1, 2 and 4
D : 1, 3 and 4
D : LL1 Parsing
Q.no 3. A->aA| a| b
The number of steps to generate aab are
A:2
B:3
C:4
D:5
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
Q.no 5. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is
called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
A : decidable
B : Undecidable
C : sometimes decidable
D : infinite
Q.no 9. Which one of the following languages over the alphabet {0, 1} is described
by the regular expression: (0+1)*0(0+1)*0(0+1)*
D : The set of all strings that begin and end with either 0 or 1
A : decidable problem
B : undecidable problem
C : complete problem
D : trackable problem
A : Kleene plus +
B : Kleene star *
C : Question mark ?
D : Union
Q.no 12. A grammar that produces more than one parse tree for some sentence is
called
A : ambiguous
B : unambiguous
C : regular
A : Terminal Symbol
C : Start symbol
D : End symbol
A : Terminals
B : Variables
C : Start Symbol
D : Productions
Q.no 15. If T1 and T2 are two Turing machines, the composite can be represented
using the expression
A : T1 T2
B : T2 T1
C : T1 X T2
D : T2 X T1
A:
B:
C:
D:
A : any grammar
Q.no 19. A boolean formula is said to be in Conjuctive Normal Form (CNF) if it can
represented as
A : e1 V e2 V e3
B : e1 Ʌ e2 V e3
C : e1 V e2 Ʌ e3
D : e1 Ʌ e2 Ʌ e3
D : current state
A : subset
B : proper subset
C : not subset
Q.no 25. The automaton which allows transformation to a new state without
consuming any input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
Q.no 27. The travelling salesman problem can be solved using _________
A : A spanning tree
B : A minimum spanning tree
D : DFS traversal
Q.no 28. The complement of a language will only be defined when and only when
the __________ over the language is defined.
A : String
B : Word
C : Alphabet
D : Grammar
Q.no 29. Which among the following is equivalent to the given regular expression
01*+1
A : (01)*+1
B : 0((1)*+1)
C : (0(1)*)+1
D : ((0*1)1*)*
A : Regular
B : Context free
C : Context sensitive
D : Unrestricted
Q.no 31. Which of the following pairs have different expressive power
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
Q.no 34. Under which of the following operation, NFA is not closed?
A : Negation
B : Kleene
C : Concatenation
D : complement
Q.no 35. Turing machine (TM) is more powerful than FSM (Finite State Machine)
because
A : 2,4
B : 1,3
C : 1, 2, 3, 4
D : 2, 3, 4
Q.no 37. The difference between Turing Machine and Two Way FA is in:
A : Input Tape
C : Finite Control
D : All of these
C : Both NP-complete
D : Both in P
Q.no 40. Which among the following is not true for 2-way infinte TM?
C : Any computation that can be performed by 2-way infinite tape can also be
performed by standard TM.
B : Only III
C : Only I and II
Q.no 42. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
Q.no 43.
A:A
B:B
C:C
D:D
Q.no 44. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 46.
A:
B:
C:
D:
Q.no 48. For two regular languages
L1 = (a + b)* a
and
L2 = b (a + b ) *
the intersection of L1 and L2 is given by
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
A:
B:
C:
D:
Q.no 50. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 51. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 52. What does the following transition graph shows
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 54. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 55. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
A:
B:
C:
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 59. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 60. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Answer for Question No 1. is c
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
A : accepted by DFA
B : accepted by PDA
C : accepted by LBA
A : Left Movement
B : Right Movement
C : Top Movement
D : Bottom Movement
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
A : Push
B : Pop
D : Read
A : {x,y}
B : {xy}
C : {x}
D : {y}
B : Non-Regular Language
C : May be Regular
D : Cannot be said
Q.no 9. Which of the following does not belong to the language if input alphabet
set is a,b
A:a
B:b
C : epsilon
D:c
A : b*a*
B : (a*b*)*
C : a*b*
D:
Q.no 11.
A : L*
B:
C:L
D:
Q.no 12. Which one of the following languages over the alphabet {0, 1} is
described by the regular expression: (0+1)*0(0+1)*0(0+1)*
D : The set of all strings that begin and end with either 0 or 1
Q.no 13. The push down automata indicate the acceptance of input string in terms
of
A : final state
B : empty stack
D : start state
Q.no 14.
A:
B:
C:L
D : L*
A : Useful symbols
B : epsilon productions
C : Reachable symbols
B : Undecidable
C : sometimes decidable
D : infinite
Q.no 18. Given the language L = {ab, aa, baa}, which of the following strings are in
L*? 1) abaabaaabaa 2) aaaabaaaa
3) baaaaabaaaab 4) baaaaabaa
A : 1, 2 and 3
B : 2, 3 and 4
C : 1, 2 and 4
D : 1, 3 and 4
Q.no 19. Which of the following a Turing machine does not consist of?
A : Input tape
B : Head
C : State register
D : Stack
Q.no 20. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
B : P class
C : NP complete
D : NP hard
Q.no 21. Let the class of language accepted by finite state machine be L1 and the
class of languages represented by regular expressions be L2 then
A : L1<L2
B : L1>=L2
C : L1!=L2
D : L1=L2
Q.no 22. The instantaneous description is PDA shows
Q.no 23. How many strings of length less than 4 contain the language described by
the regular expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
Q.no 24. Pushdown automata behaves like Turing machine when it has the
number of auxiliary memory
A : one or more
B : two or more
C : zero
D : one
A : Mealy machine
B : Moore machine
C : Turing machine
Q.no 27. Identify the following problem: If G=(V, E) and V' is subset of V, then V' is
an independent set iff no two nodes in V' are connected by an edge in E.
A : Satisfiability
B : Independent set
C : Node-Cover Problem
Q.no 28.
A:
B:
C:
D : {0, 1}
A : false
B : true
C : may be
D : cannot say
A:0
B:1
C:2
D:3
Q.no 32. The regular expression with all strings of 0′s and 1′s with at least two
consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
Q.no 33. The worst case complexity of a deterministic problem to find the
satisfiability of a given formula of n variables is
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
A : regular language
C : unrestricted
Q.no 35. Number of states required to accept strings ending with 10 are
A:3
B:2
C:1
D : can’t be represented.
Q.no 37. The ability for a system of instructions to simulate a Turing Machine is
called _________
A : Turing Completeness
B : Simulation
C : Turing Halting
D : Computability
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
C : Palindrome string
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 42. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
A:
B:
C:
D:
Q.no 44. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 45. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
A : Only II
B : Only III
C : Only I and II
Q.no 47. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
A:
B:
C:
D : state and its input
Q.no 49. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 51. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 52.
A : X is decidable
A:3
B:5
C:7
D:2
Q.no 55. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 56. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence
of non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
Q.no 57. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 58. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 59. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 60. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Answer for Question No 1. is a
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : NP class
B : P class
C : NP complete
D : NP hard
A : Always
B : Never
C : Sometimes
D : Everytime
B:4
C:2
D : cannot be represented.
A : any grammar
Q.no 5. If the PDA does not stop on an accepting state and the stack is not empty,
the string is
A : rejected
D : accepted
A : regular language
D : unrestricted language
Q.no 7. A->aA| a| b
The number of steps to generate aab are
A:2
B:3
C:4
D:5
Q.no 8. In one move the Turing machine___
Q.no 9. Which of the following statement is true? (a) Turing machine was
developed by Alan Turing, (b) PDA is less powerful than Turing machine, (c) FA is
more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
A : Recursive
B : Non Recursive
C : Recognizable
D : Non Recognizable
Q.no 11. Minimal finite automata need _____________ no. of final states
A:1
B:2
C:3
D : Depends on problem
Q.no 12. A problem is called __________ if it has an efficient algorithm for itself.
A : Tractable
B : Intractable
C : Computational
D : Computable
A:4
B:5
C:6
D : unlimitted
Q.no 14. A problem which is both _______ and _________ is said to be NP complete.
A : P, NP
B : NP, NP hard
C : P, P complete
D : NP Hard,P
Q.no 15. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
A : Push
B : Pop
D : Read
A : b*a*
B : (a*b*)*
C : a*b*
D:
A : Recursive language
C : Regular language
Q.no 20. In Moore machine, if input is of length n, then length of output string will
be
A:n
B : n+1
C : n+n
D : n-1
Q.no 21. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
Q.no 22. The problem of finding a path in a graph that visits every vertex exactly
once is called
Q.no 23. Which of the functions are not performed by the Turing machine after
reading a symbol?
Q.no 24. Which of the following is not a Non deterministic Turing machine?
D : Unsolvable
Q.no 25. The shown language is recognized by (a) Turing machine, (b) Pushdown
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 26. Which of the following statement(s) are correct? (a) All languages can be
generated by CFG, (b) Any regular language has an equivalent CFG, (c) Some non
regular languages cannot be generated by CFG.
A : only (a)
B : Only (b)
C : Only (c)
Q.no 27. Let the class of language accepted by finite state machine be L1 and the
class of languages represented by regular expressions be L2 then
A : L1<L2
B : L1>=L2
C : L1!=L2
D : L1=L2
Q.no 30. What does it mean when we say that an algorithm X is asymptotically
more efficient than Y?
A : false
B : true
C : may be
D : cannot say
Q.no 32. For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice
versa.
A : true
B : false
C : maybe
D : probably
Q.no 33.
C : {w | w is a string of length 3}
D : {w | w is an empty string}
A : Regular language
B : Context-free language
C : Context-sensitive language
A : Every language that is defined by regular expression can also be defined by finite
automata
B : Every language defined by finite automata can also be defined by regular expression
Q.no 37. Which of the following pairs have different expressive power
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
Q.no 39. Construct a regular expression for the language that contains strings that
start with either ‘01’ or ‘10’ over {0, 1}.
A : (01 + 10)*
D : (1+0)*
Q.no 40. Which of the following is analogous to the NFA and NPDA ?
D : Unrestricted language
Q.no 41. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 42. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 43. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 44. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 45. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
B : Delete a symbol
C : Insert a symbol
Q.no 47. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 48. The regular expression for all strings of 0′s and 1′s with no two
consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 50. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
Q.no 51. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
A:
B:
C:
D:
Q.no 53. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 54. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
A : Only II
B : Only III
C : Only I and II
Q.no 56. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
Q.no 59. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of
non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
Q.no 60. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Answer for Question No 1. is c
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Recursive language
C : Regular language
A : regular language
D : unrestricted language
Q.no 3. Turing Machine can update symbols on its tape, whereas the FA cannot
update symbols on tape.
A : true
B : false
C : Cannot say
D : May be
Q.no 4. _________ is the class of decision problems that can be solved by non-
deterministic polynomial algorithms?
A : NP
B:P
C : Hard
D : Complete
Q.no 5. Which of the following are the examples of finite state machine system?
(a) Control Mechanism of an elevator (b) Traffic Lights (c) Combinational Locks
A : Only (a)
B : Only (b)
C : Only (c)
A : intractable
B : tractable
C : decision
D : complete
Q.no 8. Turing Machine also behaves like General purpose computer and that TM
is known as _______
C : Turing machine rejects if the input does not belong to the language
Q.no 10. Which of the following regular expressions represents the set of strings
which do not contain a substring ‘rt’ if alphabet = {r, t}
A : (rt)*
B : (tr)*
C : (r*t*)
D : (t*r*)
A : yes
B : no
C : may be
D : cannot say
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
A : Left Movement
B : Right Movement
C : Top Movement
D : Bottom Movement
A : Regular Language
B : Non-Regular Language
C : May be Regular
D : Cannot be said
Q.no 15. Which of the following are the actions that operates on stack top?
A : only push
B : only pop
A:0
B:1
C:2
D:3
A : Useful symbols
B : epsilon productions
C : Reachable symbols
A : type 0
B : type 1
C : type 2
D : type 3
A : Type 0 grammar
B : Type 1 grammar
C : Type 2 grammar
D : Type 3 grammar
Q.no 20. Which of the following a Turing machine does not consist of?
A : Input tape
B : Head
C : State register
D : Stack
Q.no 21. Turing machine (TM) is more powerful than FSM (Finite State Machine)
because
Q.no 22. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
A : [(a+b)*(aa+bb)]*
B : [(0+1)-(0b+a1)*(a+]*
C : (01+11+10)*
D : (1+2+0)*(1+2)*
Q.no 24. The subset construction shows that every NFA accepts a ……..
A : String
B : Function
C : Regular language
D : Context-free language
A : Binary tree
B : Sparse tree
C : Parse tree
D : Forest
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
A : regular language
C : unrestricted
A : true
B : false
C : maybe
D : cannot say
B : syntax analysis
C : semantic analysis
D : code generation
Q.no 33. Which among the following is equivalent to the given regular expression
01*+1
A : (01)*+1
B : 0((1)*+1)
C : (0(1)*)+1
D : ((0*1)1*)*
A:0
B:1
C:2
D:3
Q.no 36. The difference between Turing Machine and Two Way FA is in:
A : Input Tape
C : Finite Control
D : All of these
Q.no 37. Which of the following pairs have different expressive power
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
Q.no 40. The travelling salesman problem can be solved using _________
A : A spanning tree
D : DFS traversal
Q.no 41. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 42. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
A : any palindrome
Q.no 44. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
A:
B:
C:
D : state and its input
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 49. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Q.no 50. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 51. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 53. The regular expression for all strings of 0′s and 1′s with no two
consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
Q.no 54. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 55. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 56. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
A:3
B:5
C:7
D:2
Q.no 58. The following Turing machine acts like
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 59.
A:A
B:B
C:C
D:D
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Answer for Question No 1. is c
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
C : Nothing
D : Type of input
A : Tractable
B : Intractable
C : Computational
D : Computable
A : leftmost derivation
B : rightmost derivation
Q.no 6. Construct a regular expression for the language that contains strings
having at least one pair of consecutive zeros over {0, 1}.
A : (100)*
B : 1* (00)* 1*
C : [ (1 + 0 )* (00) (1 + 0 )*] +
D : ((0+1)(0+1))*
A:4
B:5
C:6
D : unlimitted
B : LR(K)
C : SLR(K)
D : CLR(K)
A : Recursive language
C : Regular language
A : decidable
B : Undecidable
C : sometimes decidable
D : infinite
A : Terminals
B : Variables
C : Start Symbol
D : Productions
A : R+
B : R-
C : R+ U R-
D:R
Q.no 14. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
B : P class
C : NP complete
D : NP hard
C : Converting from Mealy into Moore machine and vice versa is not possible
Q.no 16. Which of the following correctly recognize the symbol ‘|-‘ in context to
PDA?
A : moves
B : transition function
C : or symbol
D : not symbol
B : Non Recursive
C : Recognizable
D : Non Recognizable
Q.no 19. Which of the following a Turing machine does not consist of?
A : Input tape
B : Head
C : State register
D : Stack
Q.no 20. What is the Regular Expression Matching Zero or More Specific
Characters
A:x
B:#
C:*
D:&
Q.no 21. Under which of the following operation, NFA is not closed?
A : Negation
B : Kleene
C : Concatenation
D : complement
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
B:2
C:3
D:4
A:0
B:1
C:2
D:3
Q.no 25. The subset construction shows that every NFA accepts a ……..
A : String
B : Function
C : Regular language
D : Context-free language
Q.no 26. Which productions will generate odd length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
Q.no 28. Which of the following is the restricted model of Turing machines (a)
Turing machine with semi-infinite tape, (b) Multi stack machine, (c) Offline
Turing machine
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 29. The problem of finding a path in a graph that visits every vertex exactly
once is called
Q.no 30. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
Q.no 31. Is the language preserved in all the steps while eliminating epsilon
transitions from a NFA?
A : yes
B : no
C : may be
D : cannot say
Q.no 32. The complement of a language will only be defined when and only when
the __________ over the language is defined.
A : String
B : Word
C : Alphabet
D : Grammar
Q.no 33. Which among the following is not true for 2-way infinte TM?
C : Any computation that can be performed by 2-way infinite tape can also be
performed by standard TM.
Q.no 35. The difference between Turing Machine and Two Way FA is in:
A : Input Tape
C : Finite Control
D : All of these
A : Quadruple
B : Quintuple
C : Triple
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
Q.no 38. According to the given language, which among the following expressions
does it corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
D : (0+1+ε)^4
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
Q.no 41. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 42. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
A:
B:
C:
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 45.
B : X is decidable
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
Q.no 47. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 49. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 50. John is asked to make an automaton which accepts a given string for all
the occurrence of ‘1001’ in it. How many number of transitions would John use
such that, the string processing application works?
A : 10
B : 11
C : 12
D : 15
Q.no 51. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 52. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 53. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 54. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 55. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 56. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
Q.no 57.
A:A
B:B
C:C
D:D
A : Kleene closure
B : Concatenation
C : Complement
D : Union
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 60. Context free grammar having the following production
X->Xa
is termed as
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
B:
C:
D:
A : queue
B : linked list
C : hash table
D : stack
Q.no 5. Which of the production rule can be accepted by Chomsky grammar. (i) A-
>BC, (ii) A->a
A : only i
B : only ii
C : both i and ii
D : neither i nor ii
A : Decidable
B : Undecidable
C : Tractable
D : Intractable
A : Regular Language
B : Non-Regular Language
C : May be Regular
D : Cannot be said
A : Push
B : Pop
D : Read
A : NP class
B : P class
C : NP complete
D : NP hard
Q.no 10. Which among the following is the format of unit production?
A : A->B
B : A->b
C : B->Aa
D : B->aA
Q.no 12. Which of the following correctly recognize the symbol ‘|-‘ in context to
PDA?
A : moves
B : transition function
C : or symbol
D : not symbol
A : (01)*0 = 0(10)0*
B : (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*
C : (0+1)*01(0+1)*+1*0* = (0+1)*0
D : (01)*01 = 0(10)0*1
A : decidable problem
B : undecidable problem
C : complete problem
D : trackable problem
A:
B:
C:
D:
A : Turing acceptable
B : Decidable
C : Undecidable
D : NP-HARD
Q.no 19. What is the value of n if Turing machine is defined using n-tuples?
A:6
B:7
C:8
D:5
Q.no 20. The major difference between Mealy and Moore machine is about:
A : Output Variations
B : Input Variations
C : Both
D : Transitions
A : regular language
C : unrestricted
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 24. How many strings of length less than 4 contain the language described by
the regular expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
Q.no 25. The set of all strings over {a,b} in which strings consisting a’s and b’s and
ending with bb is
A : ab
B : a*bbb
C : (a+b)* bb
D : (a+b)+ bb
Q.no 27. The shown language is recognized by (a) Turing machine, (b) Pushdown
A : Only (a)
B : Only (b)
C : Only (c)
C : Both NP-complete
D : Both in P
Q.no 30. Which of the following represents a language which has no pair of
consecutive 1’s if alphabet = {0,1}?
A:
B:
C:
D:
C : Palindrome string
A : Boolean value
B : A state
C : A set of states
D : An edge
Q.no 34. Which productions will generate even length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
B : no trival method.
Q.no 40. The maximum number of transitions which can be performed over a
state in a DFA having alphabet set a,b,c are
A:1
B:2
C:3
D:4
A:
B:
C:
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
A : any palindrome
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 46. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
A:3
B:5
C:7
D:2
Q.no 48. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 49. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 50. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 52. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 53. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 54. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
D : (a), (b) and (c)
Q.no 55. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 56. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 58. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence
of non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
Q.no 59. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
C : Nothing
D : Type of input
A : P, NP
B : NP, NP hard
C : P, P complete
D : NP Hard,P
C : Nothing
D : Type of input
Q.no 4. The major difference between Mealy and Moore machine is about:
A : Output Variations
B : Input Variations
C : Both
D : Transitions
A : Input alphabet
B : Transition function
C : Initial State
D : Output alphabet
Q.no 6. Given the expression, is there some assignment of true and false values to the
variables that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
A:
B:
C:
D:
C : Turing machine rejects if the input does not belong to the language
A : Turing Machine
B : Finite Automata
Q.no 10. The transition a Push down automaton makes is additionally dependent upon
the:
A : Current State
B : input tape
C : stack
D : terminals
Q.no 12. _________ is the class of decision problems that can be solved by non-
deterministic polynomial algorithms?
A : NP
B:P
C : Hard
D : Complete
Q.no 13.
A:R
B:
C : R*
D:
Q.no 14. Which among the following cannot be accepted by a regular grammar?
D : L is a set of 0^n1^n
Q.no 15.
Q.no 16.
A:
B:
C:L
D : L*
Q.no 18. In given Transition function of TM which head movement of tape is shown
(q0,a)->(q1,X,L)
A : Left Movement
B : Right Movement
C : Top Movement
D : Bottom Movement
Q.no 19. Which of the following does not belong to the language if input alphabet set is
a,b
A:a
B:b
C : epsilon
D:c
A : Push
B : Pop
D : Read
Q.no 21. Which of the regular expressions corresponds to the given problem statement
over the alphabet = {a, b}, All strings in which any occurrence of the symbol b, is in
groups of odd numbers.
A : (abbb)*
B : a* b (bb)* a*
C : ((a+b)(a+b)(a+b))*
D : a* b* (bb)* a*
Q.no 22. Which of the following is true for the language?
A : false
B : true
C : may be
D : cannot say
Q.no 24. For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice versa.
A : true
B : false
C : maybe
D : probably
Q.no 25. If there exists a TM which when applied to any problem in the class,
terminates, if correct answer is yes and may or may not terminate otherwise is called
A : Stable
B : Unsolvable
C : Partially solvable
D : Unstable
A:1
B:2
C:3
D:4
C : Palindrome string
A : Mealy machine
B : Moore machine
C : Turing machine
Q.no 29. Under which of the following operation, NFA is not closed?
A : Negation
B : Kleene
C : Concatenation
D : complement
C : Both NP-complete
D : Both in P
A : Instantaneous description
B : input symbols
C : start state
D : final state
Q.no 34. The worst case complexity of a deterministic problem to find the satisfiability
of a given formula of n variables is
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
Q.no 35. Recursively enumerable languages are …….. , whereas recursive languages are
…....
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A : Quadruple
B : Quintuple
C : Triple
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
B : no trival method.
Q.no 40. Which of the following is the restricted model of Turing machines (a) Turing
machine with semi-infinite tape, (b) Multi stack machine, (c) Offline Turing machine
A : Only (a)
B : Only (b)
C : Only (c)
A:
B:
C:
A : There exist context-free languages such that all context free grammars generating them
are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of
the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 43.
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 45. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-
blank symbols does not contain any blank symbols B in between. Consider Alphabet
{a,b}.
A:
B:
C:
D:
A:
B:
C:
D:
Q.no 47. Choose the correct option for the given statement: The DFA shown represents
all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
Q.no 48. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 49. Which grammar accepts the language of {a, b} having strings ending with 'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 50. The set of all strings over alphabet ={a,b} in which a single a followed by any
number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 51. John is asked to make an automaton which accepts a given string for all the
occurrence of ‘1001’ in it. How many number of transitions would John use such that,
the string processing application works?
A : 10
B : 11
C : 12
D : 15
Q.no 52. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 53. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii) ((ϵ+a)b*)*
Which of the following statements is correct?
A : Only II
B : Only III
C : Only I and II
A : X is decidable
Q.no 57.
B : X is decidable
Q.no 58. In conversion from the following CFG to CNF, the number of nonterminals to
be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 59. Find the pair of regular expressions that are equivalent
A : any palindrome
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
B : More than one state can have two or more outgoing transitions
C : LR parsing
D : SLR parsing
C : Turing machine rejects if the input does not belong to the language
A : Input alphabet
B : Transition function
C : Initial State
D : Output alphabet
Q.no 6. A two-way infinite tape Turing machine is ________ superior than the basic
model of the Turing machine in terms of power.
A : More
B : Less
C : No way
D : Very Much
A:6
B:7
C:8
D:5
Q.no 8.
A : L*
B:
C:L
D:
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
Q.no 10. In Moore machine, if input is of length n, then length of output string will
be
A:n
B : n+1
C : n+n
D : n-1
A : (01)*0 = 0(10)0*
B : (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*
C : (0+1)*01(0+1)*+1*0* = (0+1)*0
D : (01)*01 = 0(10)0*1
Q.no 13. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is
called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
C : Nothing
D : Type of input
Q.no 16. A boolean formula is said to be in Conjuctive Normal Form (CNF) if it can
represented as
A : e1 V e2 V e3
B : e1 Ʌ e2 V e3
C : e1 V e2 Ʌ e3
D : e1 Ʌ e2 Ʌ e3
Q.no 17. Turing Machine can update symbols on its tape, whereas the FA cannot
update symbols on tape.
A : true
B : false
C : Cannot say
D : May be
Q.no 18. The major difference between a moore and mealy machine is that
Q.no 19. Given the expression, is there some assignment of true and false values
to the variables that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
A:2
B:3
C:4
D:5
Q.no 21. Which of the following is analogous to the NFA and NPDA ?
D : Unrestricted language
Q.no 22. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be
generated by
A : (r1)(r2)
B : (r1 + r2)
C : (r2)(r1)
D : (r1)
Q.no 23. The set of all strings over {a,b} in which strings consisting a’s and b’s and
ending with bb is
A : ab
B : a*bbb
C : (a+b)* bb
D : (a+b)+ bb
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A : Every language that is defined by regular expression can also be defined by finite
automata
Q.no 27. Identify the following problem: If G=(V, E) and V' is subset of V, then V' is
an independent set iff no two nodes in V' are connected by an edge in E.
A : Satisfiability
B : Independent set
C : Node-Cover Problem
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
Q.no 29. Which productions will generate odd length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
A : never
B : not always
C : always
D : maybe
Q.no 33. According to the given language, which among the following expressions
does it corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
D : (0+1+ε)^4
Q.no 34. For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice
versa.
A : true
B : false
C : maybe
D : probably
Q.no 35. Production Rule: aAb->agb belongs to which of the following category?
A : Regular Language
B : (a+b)* bb (a+b)*bb
C : bbb(a+b)*
D : bb (a+b)*
Q.no 37. Let the class of language accepted by finite state machine be L1 and the
class of languages represented by regular expressions be L2 then
A : L1<L2
B : L1>=L2
C : L1!=L2
D : L1=L2
Q.no 38. Turing machine (TM) is more powerful than FSM (Finite State Machine)
because
Q.no 39. The complement of a language will only be defined when and only when
the __________ over the language is defined.
A : String
B : Word
C : Alphabet
D : Grammar
Q.no 40. The worst-case efficiency of solving a problem in polynomial time is?
A : O(p(n))
A : Only II
B : Only III
C : Only I and II
A:
B:
C:
D:
Q.no 44. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 45. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
Q.no 47. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 48. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 50.
A : X is undecidable but partially decidable
B : X is decidable
Q.no 51. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 53. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 54. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 55. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 56. John is asked to make an automaton which accepts a given string for all
the occurrence of ‘1001’ in it. How many number of transitions would John use
such that, the string processing application works?
A : 10
B : 11
C : 12
D : 15
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
Q.no 60. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. Which of the following are the examples of finite state machine system?
(a) Control Mechanism of an elevator (b) Traffic Lights (c) Combinational Locks
A : Only (a)
B : Only (b)
C : Only (c)
A : Input alphabet
B : Transition function
C : Initial State
D : Output alphabet
Q.no 3. Turing Machine also behaves like General purpose computer and that TM
is known as _______
A : queue
B : linked list
C : hash table
D : stack
A : Captal Letters
B : Small Letters
C : Italic Letters
D : Roman Letters
A:3
B:4
C:2
D : cannot be represented.
A : Useful symbols
B : epsilon productions
C : Reachable symbols
A:
B:
C:0
D:1
A : {x,y}
B : {xy}
C : {x}
D : {y}
Q.no 11.
A:
B:
C:L
D : L*
B:
C:
D:
A : decidable
B : Undecidable
C : sometimes decidable
D : infinite
A : Left Movement
B : Right Movement
C : Top Movement
D : Bottom Movement
C : Nothing
D : Type of input
A : Finite
B : Infinite
C : May be finite
D : One
A : Polynomial
B : Non polynomial
C : Logarithmic
D : Non Logarithmic
Q.no 20. Which among the following cannot be accepted by a regular grammar?
D : L is a set of 0^n1^n
A : Boolean value
B : A state
C : A set of states
D : An edge
Q.no 22. X is a simple mathematical model of a computer. X has unrestricted and
unlimited memory. X is a FA with R/W head. X can have an infinite tape divided
into cells, each cell holding one symbol.
Name X?
C : Turing machines
Q.no 23.
A : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the
right movement.
B : Perform the transition from q0 to q1 by changing "X" symbol to "a" and perform the
right movement.
C : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the
Left movement.
D : Perform the transition from q0 to q1 by changing "q0" symbol to "q1" and perform
the right movement.
Q.no 24. PDA works as Finite Automata when the number of auxiliary memory it
has is
A:3
B:2
C:1
D:0
Q.no 27. The regular expression with all strings of 0′s and 1′s with at least two
consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
Q.no 30. Which of the following is not a Non deterministic Turing machine?
A : Alternating Turing Machine
D : Unsolvable
Q.no 31. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
A : Yes
B : No
C : May be
D : Cannot be determined
A : Quadruple
B : Quintuple
C : Triple
A : 2,4
B : 1,3
C : 1, 2, 3, 4
D : 2, 3, 4
Q.no 35. In multi head Turing machine there are
A : never
B : not always
C : always
D : maybe
Q.no 39. The total number of states and transitions required to form a Moore
machine that processes a binary input string and will produce residue mod 3.
A : 3 and 6
B : 3 and 5
C : 2 and 4
D : 2 and 5
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
Q.no 41. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 42. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 43. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 45. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 46. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
A:
B:
C:
D:
Q.no 49. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 51. The following Turing machine acts like
A : Copies a string
B : Delete a symbol
C : Insert a symbol
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
Q.no 53. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 54. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Q.no 55. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
Q.no 56. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
A:
B:
C:
D:
A:
B:
C:
Q.no 59. The regular expression for all strings of 0′s and 1′s with no two
consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
A:3
B:5
C:7
D:2
Answer for Question No 1. is d
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is
called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
Q.no 2. Which one of the following languages over the alphabet {0, 1} is described
by the regular expression: (0+1)*0(0+1)*0(0+1)*
D : Sentential form
Q.no 4. Which of the following a Turing machine does not consist of?
A : Input tape
B : Head
C : State register
D : Stack
Q.no 5. _________ is the class of decision problems that can be solved by non-
deterministic polynomial algorithms?
A : NP
B:P
C : Hard
D : Complete
A : Push
B : Pop
D : Read
A : Kleene plus +
B : Kleene star *
C : Question mark ?
D : Union
C : LR parsing
D : SLR parsing
Q.no 11. The Grammar can be defined as: G= (V, T, P, S) In the given definition,
what does S represents?
A : Accepting State
B : Starting Variable
C : Sensitive Grammar
D : Final state
A:
B:
C:
D:
Q.no 13. The minimum number of states required to recognize an octal number
divisible by 3 is
A:1
B:3
C:5
D:7
A : Concatenation
B : Selection
C : Iteration
D : Addition
C : Converting from Mealy into Moore machine and vice versa is not possible
Q.no 17.
A : true
B : false
C : maybe
D : cannot say
Q.no 19. Which of the following is not a part of 5-tuple finite automata?
A : Input alphabet
B : Transition function
C : Initial State
D : Output alphabet
Q.no 20. A problem which is both _______ and _________ is said to be NP complete.
A : P, NP
B : NP, NP hard
C : P, P complete
D : NP Hard,P
C : Both NP-complete
D : Both in P
A : Empty
B : abcabc
C : b*c|a
D : abc
A : Regular language
B : Context-free language
C : Context-sensitive language
Q.no 24. Under which of the following operation, NFA is not closed?
A : Negation
B : Kleene
C : Concatenation
D : complement
Q.no 25. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings in which the total number of a’s is
divisible by 2.
A : ((a+b)(a+b))*
B : (a + ab)*
C : ( b* a b*ab*)* + b*
D : a* b (aa)*b a*
Q.no 26.
A:
B:
C:
D : {0, 1}
Q.no 27. The shown language is recognized by (a) Turing machine, (b) Pushdown
automata, (c) Finite automata
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 29. Production Rule: aAb->agb belongs to which of the following category?
A : Regular Language
Q.no 30. Construct a regular expression for the language that contains strings
having even number of 0’s followed by odd number of 1’s over {0, 1}.
A : (00)* 1 (11)*
B : ((0+1)(0+1))*
C : (0+1)*
D : (001)*
A : Mealy machine
B : Moore machine
C : Turing machine
Q.no 34. The travelling salesman problem can be solved using _________
A : A spanning tree
D : DFS traversal
Q.no 35. According to the given language, which among the following expressions
does it corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
D : (0+1+ε)^4
A : Binary tree
B : Sparse tree
C : Parse tree
D : Forest
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 39. Construct a regular expression for the language that contains strings
having no pair of consecutive zeros over {0, 1}.
A : (1+0)*
B:
C : ((0+1)(0+1))*
D : (01 + 10)*
Q.no 41. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 42. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
Q.no 43. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
A : any palindrome
Q.no 45. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 46. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 47. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
A : Kleene closure
B : Concatenation
C : Complement
D : Union
A : Copies a string
B : Delete a symbol
C : Insert a symbol
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
Q.no 51.
A:A
B:B
C:C
D:D
Q.no 54. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 55. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
A:
B:
C:
Q.no 57. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
A:
B:
C:
D:
Q.no 59. Transition function of Epsilon-NFA machine is given by
A:
B:
C:
D:
Q.no 60. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
Answer for Question No 1. is b
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A:3
B:4
C:2
D : cannot be represented.
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
B : Finite Automata
Q.no 4. A grammar that produces more than one parse tree for some sentence is
called
A : ambiguous
B : unambiguous
C : regular
D : L is a set of 0^n1^n
A : input symbol
B : stack symbol
C : output symbol
D : tape symbol
A : NP
B:P
C : Hard
D : Complete
Q.no 8. A two-way infinite tape Turing machine is ________ superior than the basic
model of the Turing machine in terms of power.
A : More
B : Less
C : No way
D : Very Much
A : Useful symbols
B : epsilon productions
C : Reachable symbols
A : Terminal Symbol
C : Start symbol
D : End symbol
D : Sentential form
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
Q.no 13. Which of the following regular expressions represents the set of strings
which do not contain a substring ‘rt’ if alphabet = {r, t}
A : (rt)*
B : (tr)*
C : (r*t*)
D : (t*r*)
Q.no 14. Which of the following is false for a grammar G in Chomsky Normal
Form:
A : R+
B : R-
C : R+ U R-
D:R
Q.no 16. Choose the correct option for the statement: Unambiguity is the ideal
structure of a language.
A : true
B : Partially True
C : false
D : Cannot be said
Q.no 17. Which among the following are incorrect regular identities?
A:
B:
C:
D:
A : (01)*0 = 0(10)0*
B : (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*
C : (0+1)*01(0+1)*+1*0* = (0+1)*0
D : (01)*01 = 0(10)0*1
A:*,.,+
B:.,*,+
C:.,+,*
D:+,.,*
C : Nothing
D : Type of input
Q.no 21. The set of all strings over {a,b} in which strings consisting a’s and b’s and
ending with bb is
A : ab
B : a*bbb
C : (a+b)* bb
D : (a+b)+ bb
Q.no 22. The basic limitation of finite automata is that
A:0
B:1
C:2
D:3
A : Regular language
B : Context-free language
C : Context-sensitive language
D : Turing Machine
Q.no 26. Which of the following is a regular language?
C : Palindrome string
A : false
B : true
C : may be
D : cannot say
Q.no 28. Which of the following pairs have DIFFERENT expressive power?
Q.no 30. Which of the following is analogous to the NFA and NPDA ?
A : never
B : not always
C : always
D : maybe
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
Q.no 34. Which of the following is not a Non deterministic Turing machine?
D : Unsolvable
Q.no 35. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
Q.no 36. Which among the following is not true for 2-way infinte TM?
C : Any computation that can be performed by 2-way infinite tape can also be
performed by standard TM.
Q.no 37. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
Q.no 38.
A:
B:
C:
D : {0, 1}
Q.no 40. The ability for a system of instructions to simulate a Turing Machine is
called _________
A : Turing Completeness
B : Simulation
C : Turing Halting
D : Computability
Q.no 41. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 42. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
B : Only III
C : Only I and II
Q.no 44. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 46. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 47.
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 49. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 50. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 52. Find the pair of regular expressions that are equivalent
Q.no 53. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 54. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 55. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 56. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 57. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 58.
A : X is decidable
Q.no 59. John is asked to make an automaton which accepts a given string for all
the occurrence of ‘1001’ in it. How many number of transitions would John use
such that, the string processing application works?
A : 10
B : 11
C : 12
D : 15
Q.no 60. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Answer for Question No 1. is b
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
C : Converting from Mealy into Moore machine and vice versa is not possible
A : Terminal Symbol
C : Start symbol
D : End symbol
Q.no 3. Which one of the following languages over the alphabet {0, 1} is described
by the regular expression: (0+1)*0(0+1)*0(0+1)*
D : The set of all strings that begin and end with either 0 or 1
Q.no 4. Which of the production rule can be accepted by Chomsky grammar. (i) A-
>BC, (ii) A->a
A : only i
B : only ii
C : both i and ii
D : neither i nor ii
A : char
B : int
C : boolean
D : float
D : Set of strings with even number of a’s followed by odd number of b’s
Q.no 7. Which of the following pair of regular expressions are not equivalent?
A : leftmost derivation
B : rightmost derivation
Q.no 11. A grammar that produces more than one parse tree for some sentence is
called
A : ambiguous
B : unambiguous
C : regular
A:4
B:5
C:6
D : unlimitted
A : Turing Machine
B : Finite Automata
Q.no 14. The major difference between Mealy and Moore machine is about:
A : Output Variations
B : Input Variations
C : Both
D : Transitions
Q.no 15. The transition a Push down automaton makes is additionally dependent
upon the:
A : Current State
B : input tape
C : stack
D : terminals
A : Concatenation
B : Selection
C : Iteration
D : Addition
Q.no 17. The minimum number of states required to recognize an octal number
divisible by 3 is
A:1
B:3
C:5
D:7
Q.no 18. Identify the problem: Given a graph G = <V, E>, and a starting node a,
does it have a tour cost less than k?
A : Satisfiability
B : Independent set
C : Node-Cover Problem
Q.no 19. The major difference between a moore and mealy machine is that
Q.no 21. The worst case complexity of a deterministic problem to find the
satisfiability of a given formula of n variables is
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
Q.no 22. Which productions will generate even length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
Q.no 23. Construct a regular expression for the language that contains strings
that start with either ‘01’ or ‘10’ over {0, 1}.
A : (01 + 10)*
D : (1+0)*
Q.no 24. Let the class of language accepted by finite state machine be L1 and the
class of languages represented by regular expressions be L2 then
A : L1<L2
B : L1>=L2
C : L1!=L2
D : L1=L2
Q.no 25. The complexity class P consist of all the decision problems that can be
solved by ___________using polynomial amount of computation time.
B : DFA
C : NDFA
A : lexical analysis
B : syntax analysis
C : semantic analysis
D : code generation
B : input symbols
C : start state
D : final state
Q.no 28. It is less complex to prove the closure properties over regular languages
using
A : NFA
B : DFA
C : PDA
D : Canot be said
A : regular language
C : unrestricted
Q.no 30. Which of the regular expressions correspond to the given problem
statement: Express the identifiers in C Programming language where l=letters
d=digits
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
Q.no 31. Which of the following does not obey pumping lemma for context free
languages ?
A : Finite languages
C : Unrestricted languages
D : Restricted languages
C : Both NP-complete
D : Both in P
D : Turing Machine
Q.no 34. Production Rule: aAb->agb belongs to which of the following category?
A : Regular Language
Q.no 35. According to the given language, which among the following expressions
does it corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
D : (0+1+ε)^4
A : Yes
B : No
C : May be
D : Cannot be determined
Q.no 37. Which of the following is analogous to the NFA and NPDA ?
D : Unrestricted language
A : 2,4
B : 1,3
C : 1, 2, 3, 4
D : 2, 3, 4
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
Q.no 40. The ability for a system of instructions to simulate a Turing Machine is
called _________
A : Turing Completeness
B : Simulation
C : Turing Halting
D : Computability
Q.no 41. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 42. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 43. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 44. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
A:
B:
C:
Q.no 46. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 48. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
A:
B:
C:
D:
Q.no 50. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 51.
A:A
B:B
C:C
D:D
Q.no 52. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 53. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 54. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 57. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 58. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 59. What does the following transition graph shows
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
Q.no 60. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : A->B
B : A->b
C : B->Aa
D : B->aA
A : Tractable
B : Intractable
C : Computational
D : Computable
C : Start symbol
D : End symbol
A : NP
B:P
C : Hard
D : Complete
Q.no 5. Turing Machine also behaves like General purpose computer and that TM
is known as _______
A : P, NP
B : NP, NP hard
C : P, P complete
D : NP Hard,P
C : Nothing
D : Type of input
Q.no 8. What is the Regular Expression Matching Zero or More Specific
Characters
A:x
B:#
C:*
D:&
A : Regular
B : Recursively Enumerable
C : Context free
D : Context sensitive
C : Converting from Mealy into Moore machine and vice versa is not possible
A : Polynomial
B : Non polynomial
C : Logarithmic
D : Non Logarithmic
A : Push
B : Pop
D : Read
Q.no 14. Which of the following regular expressions represents the set of strings
which do not contain a substring ‘rt’ if alphabet = {r, t}
A : (rt)*
B : (tr)*
C : (r*t*)
D : (t*r*)
A : decidable
B : Undecidable
C : sometimes decidable
D : infinite
A : Useful symbols
B : epsilon productions
C : Reachable symbols
D : Non Unit productions
A : leftmost derivation
B : rightmost derivation
A : Terminals
B : Variables
C : Start Symbol
D : Productions
Q.no 21. Is the language preserved in all the steps while eliminating epsilon
transitions from a NFA?
A : yes
B : no
C : may be
D : cannot say
Q.no 23. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
Q.no 24. The worst-case efficiency of solving a problem in polynomial time is?
A : O(p(n))
C:
Q.no 25. Which among the following is not true for 2-way infinte TM?
C : Any computation that can be performed by 2-way infinite tape can also be
performed by standard TM.
Q.no 26.
A:
B:
C:
D : {0, 1}
Q.no 27. The total number of states and transitions required to form a Moore
machine that processes a binary input string and will produce residue mod 3.
A : 3 and 6
B : 3 and 5
C : 2 and 4
D : 2 and 5
Q.no 28. The minimum number of 1’s to be used in a regular expression of the
given language of all strings containing exactly 2 zeroes.
A:2
B:3
C:0
D:1
Q.no 29. CFGs are more powerful than (a) DFA, (b) NDFA, (c) Mealy Machine
A : Only (a)
B : no trival method.
Q.no 31. The ability for a system of instructions to simulate a Turing Machine is
called _________
A : Turing Completeness
B : Simulation
C : Turing Halting
D : Computability
Q.no 32. Which of the following statement(s) are correct? (a) All languages can be
generated by CFG, (b) Any regular language has an equivalent CFG, (c) Some non
regular languages cannot be generated by CFG.
A : only (a)
B : Only (b)
C : Only (c)
A : never
B : not always
C : always
D : maybe
Q.no 34. The automaton which allows transformation to a new state without
consuming any input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
Q.no 35. The set of all strings over {a,b} in which strings consisting a’s and b’s and
ending with bb is
A : ab
B : a*bbb
C : (a+b)* bb
D : (a+b)+ bb
A : Instantaneous description
B : input symbols
C : start state
D : final state
A : Empty
B : abcabc
C : b*c|a
D : abc
A : Mealy machine
B : Moore machine
C : Turing machine
D : Finite state machine
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 42. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 43. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 44.
A : I and II
B : I and IV
C : II and III
D : II and IV
A:
B:
C:
D:
Q.no 49. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 50. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 51. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
A:
B:
C:
Q.no 53. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 54. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 55. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 56. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 57. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 58. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
Q.no 60. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Answer for Question No 1. is a
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Type 0 grammar
B : Type 1 grammar
C : Type 2 grammar
D : Type 3 grammar
A : Always
B : Never
C : Sometimes
D : Everytime
B : Selection
C : Iteration
D : Addition
A : b*a*
B : (a*b*)*
C : a*b*
D:
Q.no 5. Which of the following pair of regular expressions are not equivalent?
D : x+ and x*x+
Q.no 6. Given the expression, is there some assignment of true and false values to
the variables that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
A : regular
B : context sensitive
C : context free
D : Unrestricted
Q.no 8. Which of the following can be used to simulate any Turing machine?
C : Counter machines
Q.no 9. Identify the problem: Given a graph G = <V, E>, and a starting node a, does
it have a tour cost less than k?
A : Satisfiability
B : Independent set
C : Node-Cover Problem
Q.no 10. Which one of the following languages over the alphabet {0, 1} is
described by the regular expression: (0+1)*0(0+1)*0(0+1)*
D : The set of all strings that begin and end with either 0 or 1
Q.no 11. Which among the following are incorrect regular identities?
A:
B:
C:
D:
B:1
C:2
D:3
Q.no 13. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
B : P class
C : NP complete
D : NP hard
A : Recursive
B : Non Recursive
C : Recognizable
D : Non Recognizable
A : regular language
D : unrestricted language
Q.no 16. The major difference between a moore and mealy machine is that
B:
C:
D:
Q.no 18. Choose the correct option for the statement: Unambiguity is the ideal
structure of a language.
A : true
B : Partially True
C : false
D : Cannot be said
Q.no 19. Which among the following is the format of unit production?
A : A->B
B : A->b
C : B->Aa
D : B->aA
Q.no 20. For alphabet = {a,b}, the regular expression r = (aa)*(bb)*b denotes
D : Set of strings with even number of a’s followed by odd number of b’s
A : Instantaneous description
B : input symbols
C : start state
D : final state
Q.no 24. Which of the regular expressions correspond to the given problem
statement: Express the identifiers in C Programming language where l=letters
d=digits
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
Q.no 28. How many strings of length less than 4 contain the language described by
the regular expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
Q.no 32. The worst case complexity of a deterministic problem to find the
satisfiability of a given formula of n variables is
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
Q.no 33. The subset construction shows that every NFA accepts a ……..
A : String
B : Function
C : Regular language
D : Context-free language
Q.no 35.
A:
B:
C:
D : {0, 1}
Q.no 37. Which of the following pairs have different expressive power
D : Turing Machine
Q.no 39. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings in which any occurrence of the
symbol b, is in groups of odd numbers.
A : (abbb)*
B : a* b (bb)* a*
C : ((a+b)(a+b)(a+b))*
D : a* b* (bb)* a*
Q.no 40. The regular expression with all strings of 0′s and 1′s with at least two
consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
Q.no 41. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
Q.no 42. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
A:3
B:5
C:7
D:2
Q.no 44.
Q.no 45. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 46. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A:
B:
C:
Q.no 48. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
A : Finite state automata
D : Turing machine
Q.no 49. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 50. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 51.
A : X is decidable
Q.no 52. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 54. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
A : any palindrome
Q.no 58. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 59. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 60. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Answer for Question No 1. is d
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A:0
B:1
C:2
D:3
C : Computability
D : All of these
Q.no 3. If T1 and T2 are two Turing machines, the composite can be represented
using the expression
A : T1 T2
B : T2 T1
C : T1 X T2
D : T2 X T1
A : Turing Machine
B : Finite Automata
A : Useful symbols
B : epsilon productions
C : Reachable symbols
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
Q.no 8. Which of the following a Turing machine does not consist of?
A : Input tape
B : Head
C : State register
D : Stack
A : NP class
B : P class
C : NP complete
D : NP hard
B : More than one state can have two or more outgoing transitions
Q.no 11. A boolean formula is said to be in Conjuctive Normal Form (CNF) if it can
represented as
A : e1 V e2 V e3
B : e1 Ʌ e2 V e3
C : e1 V e2 Ʌ e3
D : e1 Ʌ e2 Ʌ e3
Q.no 12. Those problems that require large amount of computational resources
that are practically not feasible to solve, these problems are known as _________
A : Decidable
B : Undecidable
C : Tractable
D : Intractable
Q.no 13. Identify the problem: Given a graph G = <V, E>, and a starting node a,
does it have a tour cost less than k?
A : Satisfiability
B : Independent set
C : Node-Cover Problem
Q.no 14. Which among the following are incorrect regular identities?
A:
B:
C:
D:
C : Nothing
D : Type of input
A : queue
B : linked list
C : hash table
D : stack
Q.no 17. Which of the following are the examples of finite state machine system?
(a) Control Mechanism of an elevator (b) Traffic Lights (c) Combinational Locks
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 18. There is a linear grammar that generates a context free grammar
A : Always
B : Never
C : Sometimes
D : Everytime
Q.no 19. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is
called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
A : leftmost derivation
B : rightmost derivation
Q.no 21. Which of the following automata takes stack as auxiliary storage
A : finite automata
B : pushdown automata
C : Turing machine
D : finite state machine
Q.no 22. The shown language is recognized by (a) Turing machine, (b) Pushdown
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 23. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings in which the total number of a’s is
divisible by 2.
A : ((a+b)(a+b))*
B : (a + ab)*
C : ( b* a b*ab*)* + b*
D : a* b (aa)*b a*
Q.no 24. Number of states required to accept strings ending with 10 are
A:3
B:2
C:1
D : can’t be represented.
A : Yes
B : No
C : May be
D : Cannot be determined
Q.no 27. The automaton which allows transformation to a new state without
consuming any input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
Q.no 30. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be
generated by
A : (r1)(r2)
B : (r1 + r2)
C : (r2)(r1)
D : (r1)
B : Grammar Parsers
C : Text Search
D : Image processing
Q.no 32. Which of the following is the restricted model of Turing machines (a)
Turing machine with semi-infinite tape, (b) Multi stack machine, (c) Offline
Turing machine
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 34. PDA works as Finite Automata when the number of auxiliary memory it
has is
A:3
B:2
C:1
D:0
Q.no 35. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings in which any occurrence of the
symbol b, is in groups of odd numbers.
A : (abbb)*
B : a* b (bb)* a*
C : ((a+b)(a+b)(a+b))*
D : a* b* (bb)* a*
Q.no 36. For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice
versa.
A : true
B : false
C : maybe
D : probably
Q.no 37. The worst-case efficiency of solving a problem in polynomial time is?
A : O(p(n))
C:
Q.no 38. The problem of finding a path in a graph that visits every vertex exactly
once is called
Q.no 39. Which productions will generate odd length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
C : Turing machines
Q.no 41. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 42. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 46. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 47. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence
of non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
A:
B:
C:
D:
A:3
B:5
C:7
D:2
Q.no 50. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 51. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 52. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
A:A
B:B
C:C
D:D
Q.no 55. The regular expression for all strings of 0′s and 1′s with no two
consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
Q.no 56. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
B:
C:
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
Q.no 60. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
A : Context free grammar
C : Unrestricted grammar
D : Phrase grammar
Answer for Question No 1. is a
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : input symbol
B : stack symbol
C : output symbol
D : tape symbol
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
B : A->b
C : B->Aa
D : B->aA
A : char
B : int
C : boolean
D : float
Q.no 5.
A : L*
B:
C:L
D:
A : regular
B : context sensitive
C : context free
D : Unrestricted
Q.no 7. The push down automata indicate the acceptance of input string in terms
of
A : final state
B : empty stack
A:x
B:#
C:*
D:&
Q.no 9. Which of the following are the actions that operates on stack top?
A : only push
B : only pop
Q.no 10. The Grammar can be defined as: G= (V, T, P, S) In the given definition,
what does S represents?
A : Accepting State
B : Starting Variable
C : Sensitive Grammar
D : Final state
A : b*a*
B : (a*b*)*
C : a*b*
D:
Q.no 12.
A:
B:
C:L
D : L*
Q.no 13. A problem which is both _______ and _________ is said to be NP complete.
A : P, NP
B : NP, NP hard
C : P, P complete
D : NP Hard,P
A : Left Movement
B : Right Movement
C : Top Movement
D : Bottom Movement
Q.no 17. Which of the following statement is true? (a) Turing machine was
developed by Alan Turing, (b) PDA is less powerful than Turing machine, (c) FA is
more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
B : may be different
C : must be different
D : cannot say
A : type 0
B : type 1
C : type 2
D : type 3
Q.no 20. The finite automata is called NFA when there exists____________ for a
specific input from current state to next state
A : Single path
B : Multiple paths
D : Three paths
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
Q.no 23. How many strings of length less than 4 contain the language described by
the regular expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
A : false
B : true
C : may be
D : cannot say
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
Q.no 27. The basic limitation of finite automata is that
Q.no 28. Which of the following does not obey pumping lemma for context free
languages ?
A : Finite languages
C : Unrestricted languages
D : Restricted languages
Q.no 29. The shown language is recognized by (a) Turing machine, (b) Pushdown
A : Only (a)
B : Only (b)
C : Only (c)
A : subset
B : proper subset
C : not subset
Q.no 33. Let the class of language accepted by finite state machine be L1 and the
class of languages represented by regular expressions be L2 then
A : L1<L2
B : L1>=L2
C : L1!=L2
D : L1=L2
Q.no 34. PDA works as Finite Automata when the number of auxiliary memory it
has is
A:3
B:2
C:1
D:0
A : true
B : false
C : maybe
D : cannot say
C : Both NP-complete
D : Both in P
Q.no 38. The set of all strings over alphabet = {a,b} in which all strings having
bbbb as substring is
B : (a+b)* bb (a+b)*bb
C : bbb(a+b)*
D : bb (a+b)*
A : Regular
B : Context free
C : Context sensitive
D : Unrestricted
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 41. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 44. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 46. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
A:3
B:5
C:7
D:2
Q.no 48. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
A : any palindrome
A:
B:
C:
D:
Q.no 54. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
A:A
B:B
C:C
D:D
Q.no 56.
Q.no 57.
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 59. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 60. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Answer for Question No 1. is b
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Useful symbols
B : epsilon productions
C : Reachable symbols
A : R = QP*
B : R = P*Q
C : R = RP
D : R = QP
A : Input alphabet
B : Transition function
C : Initial State
D : Output alphabet
Q.no 8. Given the expression, is there some assignment of true and false values to
the variables that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
C : Turing machine rejects if the input does not belong to the language
Q.no 10. Which of the following are the examples of finite state machine system?
(a) Control Mechanism of an elevator (b) Traffic Lights (c) Combinational Locks
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 11. The transition a Push down automaton makes is additionally dependent
upon the:
A : Current State
B : input tape
C : stack
D : terminals
Q.no 12. The language accepted by a Turing machine is called ………. language.
A : Regular
B : Recursively Enumerable
C : Context free
D : Context sensitive
Q.no 13. The push down automata indicate the acceptance of input string in terms
of
A : final state
B : empty stack
D : start state
A : x+1
B:x
C : x-1
D : x2
C : Converting from Mealy into Moore machine and vice versa is not possible
A:
B:
C:
D:
A : decidable
B : Undecidable
C : sometimes decidable
D : infinite
C : Nothing
D : Type of input
A : Polynomial
B : Non polynomial
C : Logarithmic
D : Non Logarithmic
Q.no 21.
C : {w | w is a string of length 3}
D : {w | w is an empty string}
Q.no 22.
A : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the
right movement.
B : Perform the transition from q0 to q1 by changing "X" symbol to "a" and perform the
right movement.
C : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the
Left movement.
D : Perform the transition from q0 to q1 by changing "q0" symbol to "q1" and perform
the right movement.
Q.no 23. The worst-case efficiency of solving a problem in polynomial time is?
A : O(p(n))
C:
Q.no 24. What does it mean when we say that an algorithm X is asymptotically
more efficient than Y?
Q.no 25. Which among the following is equivalent to the given regular expression
01*+1
A : (01)*+1
B : 0((1)*+1)
C : (0(1)*)+1
D : ((0*1)1*)*
Q.no 26. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings in which any occurrence of the
symbol b, is in groups of odd numbers.
A : (abbb)*
B : a* b (bb)* a*
C : ((a+b)(a+b)(a+b))*
D : a* b* (bb)* a*
B : stack alphabet
D : transition function
Q.no 28. Under which of the following operation, NFA is not closed?
A : Negation
B : Kleene
C : Concatenation
D : complement
A : Regular
B : Context free
C : Context sensitive
D : Unrestricted
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
Q.no 31. The complexity class P consist of all the decision problems that can be
solved by ___________using polynomial amount of computation time.
B : DFA
C : NDFA
Q.no 32. CFGs are more powerful than (a) DFA, (b) NDFA, (c) Mealy Machine
A : Only (a)
Q.no 34. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
A : Instantaneous description
B : input symbols
C : start state
D : final state
Q.no 37. If there exists a TM which when applied to any problem in the class,
terminates, if correct answer is yes and may or may not terminate otherwise is
called
A : Stable
B : Unsolvable
C : Partially solvable
D : Unstable
Q.no 38. The automaton which allows transformation to a new state without
consuming any input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
Q.no 39. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings in which the total number of a’s is
divisible by 2.
A : ((a+b)(a+b))*
B : (a + ab)*
C : ( b* a b*ab*)* + b*
D : a* b (aa)*b a*
Q.no 40. The operations of PDA never work on elements other than top of the
stack.
A : false
B : true
C : may be
D : cannot say
Q.no 41. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 42. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 43. From the options given below the statement, which is not necessarily true
if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
A:3
B:5
C:7
D:2
Q.no 45. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of
non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
Q.no 46. If all the production rules have single nonterminal symbol on the left side
then grammar is called as
D : Phrase grammar
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 48. John is asked to make an automaton which accepts a given string for all
the occurrence of ‘1001’ in it. How many number of transitions would John use
such that, the string processing application works?
A : 10
B : 11
C : 12
D : 15
Q.no 49. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
A:
B:
C:
Q.no 52. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
A : any palindrome
Q.no 55. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 58. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
Q.no 59.
B : X is decidable
Q.no 60. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Answer for Question No 1. is d
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Type 0 grammar
B : Type 1 grammar
C : Type 2 grammar
D : Type 3 grammar
A : Left Movement
B : Right Movement
C : Top Movement
D : Bottom Movement
Q.no 3. Epsilon-closure of a state is a combination of self state and ----
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
A : Recursive language
C : Regular language
Q.no 5. Identify the problem: Given a graph G = <V, E>, and a starting node a, does
it have a tour cost less than k?
A : Satisfiability
B : Independent set
C : Node-Cover Problem
A:x
B:#
C:*
D:&
C : LR parsing
D : SLR parsing
C : Computability
D : All of these
Q.no 10. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is
called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
Q.no 11. The language accepted by a Turing machine is called ………. language.
A : Regular
B : Recursively Enumerable
C : Context free
D : Context sensitive
Q.no 12. Which of the following are the actions that operates on stack top?
A : only push
B : only pop
C : only push and pop
Q.no 13. Turing Machine can update symbols on its tape, whereas the FA cannot
update symbols on tape.
A : true
B : false
C : Cannot say
D : May be
Q.no 14. Which of the following is false for a grammar G in Chomsky Normal
Form:
Q.no 15. Given the expression, is there some assignment of true and false values
to the variables that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
A : Polynomial
B : Non polynomial
C : Logarithmic
D : Non Logarithmic
B : Kleene star *
C : Question mark ?
D : Union
Q.no 18. In Moore machine, if input is of length n, then length of output string will
be
A:n
B : n+1
C : n+n
D : n-1
A : decidable problem
B : undecidable problem
C : complete problem
D : trackable problem
Q.no 20. Choose the correct option for the statement: Unambiguity is the ideal
structure of a language.
A : true
B : Partially True
C : false
D : Cannot be said
A : subset
B : proper subset
C : not subset
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
A : 2,4
B : 1,3
C : 1, 2, 3, 4
D : 2, 3, 4
Q.no 25. Turing machine (TM) is more powerful than FSM (Finite State Machine)
because
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
A : false
B : true
C : may be
D : cannot say
Q.no 29. The automaton which allows transformation to a new state without
consuming any input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
C : Both NP-complete
D : Both in P
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
A : Empty
B : abcabc
C : b*c|a
D : abc
Q.no 33. Which of the following does not obey pumping lemma for context free
languages ?
A : Finite languages
C : Unrestricted languages
D : Restricted languages
C : Turing machines
A:3
B:7
C:5
D:6
Q.no 36. Which of the following is in 2-CNF?
Q.no 37. The total number of states and transitions required to form a Moore
machine that processes a binary input string and will produce residue mod 3.
A : 3 and 6
B : 3 and 5
C : 2 and 4
D : 2 and 5
Q.no 38. The worst case complexity of a deterministic problem to find the
satisfiability of a given formula of n variables is
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
Q.no 39. Which of the following is the restricted model of Turing machines (a)
Turing machine with semi-infinite tape, (b) Multi stack machine, (c) Offline
Turing machine
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 40. The shown language is recognized by (a) Turing machine, (b) Pushdown
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 41. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
A : Only II
B : Only III
C : Only I and II
Q.no 43.
A : X is decidable
Q.no 44. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 45. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 46.
Q.no 47.
B : X is decidable
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 50. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
A:
B:
C:
D:
Q.no 53. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 54. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 55. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
A:
B:
C:
D:
A:3
B:5
C:7
D:2
Q.no 58. The regular expression for all strings of 0′s and 1′s with no two
consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
Q.no 59. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 60. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Answer for Question No 1. is d
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A:3
B:4
C:2
D : cannot be represented.
Q.no 2.
A:R
B:
C : R*
D:
A : Regular
B : Recursively Enumerable
C : Context free
D : Context sensitive
A : Recursive
B : Non Recursive
C : Recognizable
D : Non Recognizable
A : Turing Machine
B : Finite Automata
A : Recursive language
C : Regular language
D : Context Sensitive language
A : {x,y}
B : {xy}
C : {x}
D : {y}
Q.no 10. Which among the following cannot be accepted by a regular grammar?
D : L is a set of 0^n1^n
A : Type 0 grammar
B : Type 1 grammar
C : Type 2 grammar
D : Type 3 grammar
Q.no 14. Which of the following statement is true? (a) Turing machine was
developed by Alan Turing, (b) PDA is less powerful than Turing machine, (c) FA is
more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 15. The finite automata is called NFA when there exists____________ for a
specific input from current state to next state
A : Single path
B : Multiple paths
D : Three paths
A:
B:
C:
D:
Q.no 17. 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.
A : Turing acceptable
B : Decidable
C : Undecidable
D : NP-HARD
Q.no 18. Which one of the following languages over the alphabet {0, 1} is
described by the regular expression: (0+1)*0(0+1)*0(0+1)*
D : The set of all strings that begin and end with either 0 or 1
Q.no 19. A grammar G=(V, T, P, S) is __________ if every production taken one of the
two forms: B->aC , B->a
A : Ambiguous
B : Regular
C : Non Regular
D : Context sensitive
A : Finite
B : Infinite
C : May be finite
D : One
Q.no 22. The set of all strings over alphabet = {a,b} in which all strings having
bbbb as substring is
B : (a+b)* bb (a+b)*bb
C : bbb(a+b)*
D : bb (a+b)*
Q.no 23. Production Rule: aAb->agb belongs to which of the following category?
A : Regular Language
A : regular language
C : unrestricted
Q.no 25. The problem of finding a path in a graph that visits every vertex exactly
once is called
Q.no 26. The worst-case efficiency of solving a problem in polynomial time is?
A : O(p(n))
B : O(p( n log n))
C:
Q.no 27. The minimum number of 1’s to be used in a regular expression of the
given language of all strings containing exactly 2 zeroes.
A:2
B:3
C:0
D:1
Q.no 28. Construct a regular expression for the language that contains strings
having no pair of consecutive zeros over {0, 1}.
A : (1+0)*
B:
C : ((0+1)(0+1))*
D : (01 + 10)*
Q.no 29. Which of the following represents a language which has no pair of
consecutive 1’s if alphabet = {0,1}?
A:
B:
C:
D:
Q.no 30. Which productions will generate even length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
Q.no 32. Which of the following automata takes stack as auxiliary storage
A : finite automata
B : pushdown automata
C : Turing machine
Q.no 33. The maximum number of transitions which can be performed over a
state in a DFA having alphabet set a,b,c are
A:1
B:2
C:3
D:4
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
Q.no 35. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
A : [(a+b)*(aa+bb)]*
B : [(0+1)-(0b+a1)*(a+]*
C : (01+11+10)*
D : (1+2+0)*(1+2)*
Q.no 37. PDA works as Finite Automata when the number of auxiliary memory it
has is
A:3
B:2
C:1
D:0
Q.no 38. Which productions will generate odd length palindromes for terminals
'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
Q.no 39. Identify the following problem: If G=(V, E) and V' is subset of V, then V' is
an independent set iff no two nodes in V' are connected by an edge in E.
A : Satisfiability
B : Independent set
C : Node-Cover Problem
Q.no 40. A context free language is called ambiguous if (a) It has two or more
leftmost derivations for the same string. (b) It has two or more rightmost
derivations for the same string. (c) It has Only single derivation tree.
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 41. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 42. The regular expression denotes a language comprising all possible
strings of even length over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 43. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
Q.no 44.
A:A
B:B
C:C
D:D
Q.no 45. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 46. Consider the following statements.
I. The complement of every Turing decidable language is Turing decidable
II. There exists some language which is in NP but is not Turing decidable
III. If L is a language in NP, L is Turing decidable
Which of the above statements is/are true?
A : Only II
B : Only III
C : Only I and II
Q.no 47. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 48. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
B:5
C:7
D:2
Q.no 50.
Q.no 51. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence
of non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
Q.no 52. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 53. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A:
B:
C:
D:
Q.no 55. Find the pair of regular expressions that are equivalent
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 57. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 58. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 59. What does the following transition graph shows
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
Q.no 60. The regular expression for all strings of 0′s and 1′s with no two
consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
Answer for Question No 1. is b
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. The Grammar can be defined as: G= (V, T, P, S) In the given definition, what
does S represents?
A : Accepting State
B : Starting Variable
C : Sensitive Grammar
D : Final state
A:4
B:5
C:6
D : unlimitted
Q.no 3. An algorithm is called efficient if it runs in ____________ time on a serial
computer.
A : Polynomial
B : Non polynomial
C : Logarithmic
D : Non Logarithmic
Q.no 4. 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
A : R = QP*
B : R = P*Q
C : R = RP
D : R = QP
Q.no 5. Which of the following a Turing machine does not consist of?
A : Input tape
B : Head
C : State register
D : Stack
A:
B:
C:
D:
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
C : Nothing
D : Type of input
Q.no 10. Construct a regular expression for the language that contains strings
having at least one pair of consecutive zeros over {0, 1}.
A : (100)*
B : 1* (00)* 1*
C : [ (1 + 0 )* (00) (1 + 0 )*] +
D : ((0+1)(0+1))*
Q.no 11. In Moore machine, if input is of length n, then length of output string will
be
A:n
B : n+1
C : n+n
D : n-1
C : Computability
D : All of these
A : Terminals
B : Variables
C : Start Symbol
D : Productions
D : Sentential form
Q.no 16. Given the language L = {ab, aa, baa}, which of the following strings are in
L*? 1) abaabaaabaa 2) aaaabaaaa
3) baaaaabaaaab 4) baaaaabaa
A : 1, 2 and 3
B : 2, 3 and 4
C : 1, 2 and 4
D : 1, 3 and 4
Q.no 17. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
B : P class
C : NP complete
D : NP hard
A : leftmost derivation
B : rightmost derivation
C : Nothing
D : Type of input
Q.no 20. For alphabet = {a,b}, the regular expression r = (aa)*(bb)*b denotes
D : Set of strings with even number of a’s followed by odd number of b’s
A : false
B : true
C : may be
D : cannot say
D : current state
Q.no 23. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
Q.no 24. Construct a regular expression for the language that contains strings
having no pair of consecutive zeros over {0, 1}.
A : (1+0)*
B:
C : ((0+1)(0+1))*
D : (01 + 10)*
A : Boolean value
B : A state
C : A set of states
D : An edge
C : Palindrome string
C : Both NP-complete
D : Both in P
Q.no 28. The set of all strings over {a,b} in which strings consisting a’s and b’s and
ending with bb is
A : ab
B : a*bbb
C : (a+b)* bb
D : (a+b)+ bb
Q.no 29.
A : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the
right movement.
B : Perform the transition from q0 to q1 by changing "X" symbol to "a" and perform the
right movement.
C : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the
Left movement.
D : Perform the transition from q0 to q1 by changing "q0" symbol to "q1" and perform
the right movement.
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
Q.no 31. Construct a regular expression for the language that contains strings
that start with either ‘01’ or ‘10’ over {0, 1}.
A : (01 + 10)*
D : (1+0)*
Q.no 32. The regular expression with all strings of 0′s and 1′s with at least two
consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
A:0
B:1
C:2
D:3
Q.no 34. Which of the following represents a language which has no pair of
consecutive 1’s if alphabet = {0,1}?
A:
B:
C:
D:
Q.no 35. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
A : Regular language
B : Context-free language
C : Context-sensitive language
Q.no 37. Which of the following statement(s) are correct? (a) All languages can be
generated by CFG, (b) Any regular language has an equivalent CFG, (c) Some non
regular languages cannot be generated by CFG.
A : only (a)
B : Only (b)
C : Only (c)
A : [(a+b)*(aa+bb)]*
B : [(0+1)-(0b+a1)*(a+]*
C : (01+11+10)*
D : (1+2+0)*(1+2)*
Q.no 39. The automaton which allows transformation to a new state without
consuming any input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
Q.no 40. The difference between number of states in FA for regular expression (a
+ b) and (a + b) * is:
A:1
B:2
C:3
D:0
Q.no 41. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 42. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence
of non-blank symbols does not contain any blank symbols B in between. Consider
Alphabet {a,b}.
A:
B:
C:
D:
Q.no 43. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 44. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
Q.no 45. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 46. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 47.
B : X is decidable
Q.no 48. Choose the correct option for the given statement: The DFA shown
represents all strings which have 1 at the second last position.
A : Correct
C : Wrong proposition
D : May be correct
Q.no 49. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 50. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
A : any palindrome
Q.no 52. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 53. The regular expression for all strings of 0′s and 1′s with no two
consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
Q.no 55. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Q.no 56. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
A:
B:
C:
A:
B:
C:
D:
Q.no 60. Find the pair of regular expressions that are equivalent
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 2. Turing Machine can update symbols on its tape, whereas the FA cannot
update symbols on tape.
A : true
B : false
C : Cannot say
D : May be
Q.no 3. Which among the following are incorrect regular identities?
A:
B:
C:
D:
A : Concatenation
B : Selection
C : Iteration
D : Addition
Q.no 5. Choose the correct option for the statement: Unambiguity is the ideal
structure of a language.
A : true
B : Partially True
C : false
D : Cannot be said
A : LL(1)
B : SLR
C : CLR
D : LALR
B : Non polynomial
C : Logarithmic
D : Non Logarithmic
A : leftmost derivation
B : rightmost derivation
D : L is a set of 0^n1^n
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
Q.no 11. Which of the following statement is true? (a) Turing machine was
developed by Alan Turing, (b) PDA is less powerful than Turing machine, (c) FA is
more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 12. A->aA| a| b
The number of steps to generate aab are
A:2
B:3
C:4
D:5
Q.no 13. If T1 and T2 are two Turing machines, the composite can be represented
using the expression
A : T1 T2
B : T2 T1
C : T1 X T2
D : T2 X T1
A : Recursive
B : Non Recursive
C : Recognizable
D : Non Recognizable
A : queue
B : linked list
C : hash table
D : stack
A : yes
B : no
C : maybe
D : never
Q.no 17. In Moore machine, if input is of length n, then length of output string will
be
A:n
B : n+1
C : n+n
D : n-1
A : Turing acceptable
B : Decidable
C : Undecidable
D : NP-HARD
Q.no 21. Is the language preserved in all the steps while eliminating epsilon
transitions from a NFA?
A : yes
B : no
C : may be
D : cannot say
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
Q.no 23. Which of the following represents a language which has no pair of
consecutive 1’s if alphabet = {0,1}?
A:
B:
C:
D:
A:0
B:1
C:2
D:3
Q.no 27. Pushdown automata behaves like Turing machine when it has the
number of auxiliary memory
A : one or more
B : two or more
C : zero
D : one
Q.no 28. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be
generated by
A : (r1)(r2)
B : (r1 + r2)
C : (r2)(r1)
D : (r1)
Q.no 29. Which among the following is equivalent to the given regular expression
01*+1
A : (01)*+1
B : 0((1)*+1)
C : (0(1)*)+1
D : ((0*1)1*)*
Q.no 30. The worst case complexity of a deterministic problem to find the
satisfiability of a given formula of n variables is
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
Q.no 31. The RE in which any number of 0′s is followed by any number of 1′s
followed by any number of 2′s is
A : (0+1+2)*
B : 0*1*2*
C : 0* + 1 + 2
D : (0+1)*2*
Q.no 32. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
B : no trival method.
Q.no 37. Turing machine (TM) is more powerful than FSM (Finite State Machine)
because
Q.no 38. It is less complex to prove the closure properties over regular languages
using
A : NFA
B : DFA
C : PDA
D : Canot be said
Q.no 39. Which of the functions are not performed by the Turing machine after
reading a symbol?
A : Yes
B : No
C : May be
D : Cannot be determined
Q.no 41. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 43. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 44. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 45. Find the pair of regular expressions that are equivalent
Q.no 46. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
A:
B:
C:
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 49. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
D : Turing machine
Q.no 50. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 52. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 53. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
A:
B:
C:
D:
Q.no 55. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
A:3
B:5
C:7
D:2
Q.no 57. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 58. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 60. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Answer for Question No 1. is a
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. Turing machine is more powerful than (a) Finite automata, (b) Push down
automata
A : Only (a)
B : Only (b)
A:
B:
C:
D:
Q.no 3. Choose the correct option for the statement: Unambiguity is the ideal
structure of a language.
A : true
B : Partially True
C : false
D : Cannot be said
B : may be different
C : must be different
D : cannot say
Q.no 5. The push down automata indicate the acceptance of input string in terms
of
A : final state
B : empty stack
D : start state
A : P, NP
B : NP, NP hard
C : P, P complete
D : NP Hard,P
Q.no 7. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is
called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
Q.no 8.
A:
B:
C:0
D:1
Q.no 9. Given the language L = {ab, aa, baa}, which of the following strings are in
L*? 1) abaabaaabaa 2) aaaabaaaa
3) baaaaabaaaab 4) baaaaabaa
A : 1, 2 and 3
B : 2, 3 and 4
C : 1, 2 and 4
D : 1, 3 and 4
Q.no 11. For alphabet = {a,b}, the regular expression r = (aa)*(bb)*b denotes
A : yes
B : no
C : maybe
D : never
C : LR parsing
D : SLR parsing
Q.no 14. There is a linear grammar that generates a context free grammar
A : Always
B : Never
C : Sometimes
D : Everytime
A : Captal Letters
B : Small Letters
C : Italic Letters
D : Roman Letters
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
A : Regular Language
B : Non-Regular Language
C : May be Regular
D : Cannot be said
Q.no 18. A boolean formula is said to be in Conjuctive Normal Form (CNF) if it can
represented as
A : e1 V e2 V e3
B : e1 Ʌ e2 V e3
C : e1 V e2 Ʌ e3
D : e1 Ʌ e2 Ʌ e3
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
A : Kleene plus +
B : Kleene star *
C : Question mark ?
D : Union
A:3
B:7
C:5
D:6
Q.no 23. For a DFA accepting binary numbers whose decimal equivalent is
divisible by 4, what are all the possible remainders?
A:0
B:2
C : 0,2,4
D : 0,1,2,3
Q.no 24.
A:
B:
C:
D:
A : regular language
C : unrestricted
A : subset
B : proper subset
C : not subset
Q.no 27. Which of the regular expressions corresponds to the given problem
statement over the alphabet = {a, b}, All strings in which any occurrence of the
symbol b, is in groups of odd numbers.
A : (abbb)*
B : a* b (bb)* a*
C : ((a+b)(a+b)(a+b))*
D : a* b* (bb)* a*
Q.no 29. Which of the following represents a language which has no pair of
consecutive 1’s if alphabet = {0,1}?
A:
B:
C:
D:
Q.no 30. PDA works as Finite Automata when the number of auxiliary memory it
has is
A:3
B:2
C:1
D:0
A : Type 3
B : Type 2
C : Type 1
D : Type 0
C : Both NP-complete
D : Both in P
C : Turing machines
Q.no 37. Which among the following is not true for 2-way infinte TM?
C : Any computation that can be performed by 2-way infinite tape can also be
performed by standard TM.
A : 2,4
B : 1,3
C : 1, 2, 3, 4
D : 2, 3, 4
Q.no 40. What does it mean when we say that an algorithm X is asymptotically
more efficient than Y?
Q.no 41. John is asked to make an automaton which accepts a given string for all
the occurrence of ‘1001’ in it. How many number of transitions would John use
such that, the string processing application works?
A : 10
B : 11
C : 12
D : 15
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 43. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 44. The set of all strings over alphabet ={a,b} in which a single a followed by
any number of b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 45. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Q.no 46.
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
A : Copies a string
B : Delete a symbol
C : Insert a symbol
A:
B:
C:
D:
A:
B:
C:
D:
Q.no 51.
A : X is decidable
A : any palindrome
Q.no 53. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 54. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 56. Consider three decision problems P1, P2 and P3. It is known that P1 is
decidable and P2 is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 58. The context free languages are closed under (a) union, (b) concatenation,
(c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 59. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 60.
A:A
B:B
C:C
D:D
Answer for Question No 1. is c
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. Turing machine is more powerful than (a) Finite automata, (b) Push down
automata
A : Only (a)
B : Only (b)
C : Nothing
D : Type of input
Q.no 3. Construct a regular expression for the language that contains strings
having at least one pair of consecutive zeros over {0, 1}.
A : (100)*
B : 1* (00)* 1*
C : [ (1 + 0 )* (00) (1 + 0 )*] +
D : ((0+1)(0+1))*
A : Finite Automaton
B : Turing Machine
Q.no 5. 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
A : R = QP*
B : R = P*Q
C : R = RP
D : R = QP
A : e1 V e2 V e3
B : e1 Ʌ e2 V e3
C : e1 V e2 Ʌ e3
D : e1 Ʌ e2 Ʌ e3
A : NP
B:P
C : Hard
D : Complete
A:
B:
C:
D:
A : Alan Turing
B : Turing man
C : Turing taring
D : Turling Bake
Q.no 11. Choose the correct option for the statement: Unambiguity is the ideal
structure of a language.
A : true
B : Partially True
C : false
D : Cannot be said
Q.no 12. The decision problem is the function from string to ______________
A : char
B : int
C : boolean
D : float
Q.no 13. What is the value of n if Turing machine is defined using n-tuples?
A:6
B:7
C:8
D:5
Q.no 14. If there exists a language L, for which there exists a TM, T, that accepts
every word in L and either rejects or loops for every word that is not in L, is
called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
D : LL1 Parsing
A : Kleene plus +
B : Kleene star *
C : Question mark ?
D : Union
Q.no 17. A grammar G=(V, T, P, S) is __________ if every production taken one of the
two forms: B->aC , B->a
A : Ambiguous
B : Regular
C : Non Regular
D : Context sensitive
C : LR parsing
D : SLR parsing
Q.no 19. A two-way infinite tape Turing machine is ________ superior than the basic
model of the Turing machine in terms of power.
A : More
B : Less
C : No way
D : Very Much
A : Regular Language
B : Non-Regular Language
C : May be Regular
D : Cannot be said
Q.no 21. Construct a regular expression for the language that contains strings
that start with either ‘01’ or ‘10’ over {0, 1}.
A : (01 + 10)*
A : never
B : not always
C : always
D : maybe
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A:0
B:1
C:2
D:3
Q.no 25. The total number of states and transitions required to form a Moore
machine that processes a binary input string and will produce residue mod 3.
A : 3 and 6
B : 3 and 5
C : 2 and 4
D : 2 and 5
Q.no 27. The ability for a system of instructions to simulate a Turing Machine is
called _________
A : Turing Completeness
B : Simulation
C : Turing Halting
D : Computability
A : regular language
C : unrestricted
A : Yes
B : No
C : May be
D : Cannot be determined
Q.no 31. The automaton which allows transformation to a new state without
consuming any input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
Q.no 32. Construct a regular expression for the language that contains strings
having no pair of consecutive zeros over {0, 1}.
A : (1+0)*
B:
C : ((0+1)(0+1))*
D : (01 + 10)*
Q.no 33. Identify the following problem: If G=(V, E) and V' is subset of V, then V' is
an independent set iff no two nodes in V' are connected by an edge in E.
A : Satisfiability
B : Independent set
C : Node-Cover Problem
A : Binary tree
B : Sparse tree
C : Parse tree
D : Forest
Q.no 36. Which of the following pairs have different expressive power
Q.no 37. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
Q.no 38. Which of the following automata takes stack as auxiliary storage
A : finite automata
B : pushdown automata
C : Turing machine
A:3
B:7
C:5
D:6
Q.no 40. Number of states required to accept strings ending with 10 are
A:3
B:2
C:1
D : can’t be represented.
Q.no 41. Out of the three problems S, Q and R, S is an NP-complete problem and Q
and R are the two other problems not known to be in NP. Which one of the
following statements is true if Q is polynomial time reducible to S and S is the
polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 42. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii)
((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 43. Examine the following DFA: If input is 011100101, which edge is NOT
traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 44. In conversion from the following CFG to CNF, the number of
nonterminals to be introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 45. Which grammar accepts the language of {a, b} having strings ending with
'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 46. If all the production rules have single nonterminal symbol on the left
side then grammar is called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 48. Which Transition table of Turing Machine is correct for the following
problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
A : Only II
B : Only III
C : Only I and II
Q.no 50. The lexical analysis for a modern computer language such as Java needs
the power of which one of the following machine models in a necessary and
sufficient sense?
A : Finite state automata
D : Turing machine
A:
B:
C:
Q.no 52. Construct a Turing machine which accepts a string with ‘aba’ as its
substring.
A:
B:
C:
D:
Q.no 53. From the options given below the statement, which is not necessarily
true if X1 is the recursive language and X2 and X3 are the languages that are
recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 54. The problems which have no algorithm, regardless of whether or not
they are accepted by a turing machine that fails to halt on some input are
referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
A : There exist context-free languages such that all context free grammars generating
them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each
string of the language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
D : Finite set of strings from one alphabet is always a regular language.
Q.no 57. Find the pair of regular expressions that are equivalent
Q.no 59. Let S be an NP-complete problem and Q and R be two other problems not
known to be in NP. Q is polynomial time reducible to S and S is polynomial-time
reducible to R. Which one of the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 60. Which Transition table of Turing Machine is correct to check well
formedness of parentheses?
A:
B:
C:
D:
Answer for Question No 1. is c
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
D : Sentential form
B : More than one state can have two or more outgoing transitions
Q.no 4. In Moore machine, if input is of length n, then length of output string will be
A:n
B : n+1
C : n+n
D : n-1
A:*,.,+
B:.,*,+
C:.,+,*
D:+,.,*
A : Push
B : Pop
D : Read
A : intractable
B : tractable
C : decision
D : complete
Q.no 8. 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
A : R = QP*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : R = P*Q
C : R = RP
D : R = QP
A : {x,y}
B : {xy}
C : {x}
D : {y}
Q.no 10. Those problems that are solvable in polynomial time belong to __
A : NP
B:P
C : Hard
D : Complete
Q.no 11. If T1 and T2 are two Turing machines, the composite can be represented using the
expression
A : T1 T2
B : T2 T1
C : T1 X T2
D : T2 X T1
Q.no 12.
A:
B:
C:0
D:1
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 13. The decision problem is the function from string to ______________
A : char
B : int
C : boolean
D : float
Q.no 14. Which of the following are the actions that operates on stack top?
A : only push
B : only pop
Q.no 15. The major difference between a moore and mealy machine is that
A : Output of the former depends on the present state and present input
D : output of the former depends on the present input and next state
A : input symbol
B : stack symbol
C : output symbol
D : tape symbol
Q.no 17. Construct a regular expression for the language that contains strings having at least one
pair of consecutive zeros over {0, 1}.
A : (100)*
B : 1* (00)* 1*
C : [ (1 + 0 )* (00) (1 + 0 )*] +
D : ((0+1)(0+1))*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Its memory
B : number of states
C : start state
D : input symbols
C : Converting from Mealy into Moore machine and vice versa is not possible
A : queue
B : linked list
C : hash table
D : stack
Q.no 22. According to the given language, which among the following expressions does it
corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
D : (0+1+ε)^4
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 25.
A:
B:
C:
D : {0, 1}
Q.no 26. The difference between Turing Machine and Two Way FA is in:
A : Input Tape
C : Finite Control
D : All of these
Q.no 27. Number of states required to accept strings ending with 10 are
A:3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:2
C:1
D : can’t be represented.
B : stack alphabet
D : transition function
Q.no 29. The travelling salesman problem can be solved using _________
A : A spanning tree
D : DFS traversal
A : Empty
B : abcabc
C : b*c|a
D : abc
Q.no 31. Which productions will generate odd length palindromes for terminals 'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
D : current state
A : [(a+b)*(aa+bb)]*
B : [(0+1)-(0b+a1)*(a+]*
C : (01+11+10)*
D : (1+2+0)*(1+2)*
Q.no 35. Which productions will generate even length palindromes for terminals 'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
A : false
B : true
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : may be
D : cannot say
A : For every non-deterministic Turing machine, there exists an equivalent deterministic Turing
machine.
Q.no 39. Under which of the following operation, NFA is not closed?
A : Negation
B : Kleene
C : Concatenation
D : complement
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
A : There exist context-free languages such that all context free grammars generating them are
ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of the
language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 43. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2
is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 44.
A:A
B:B
C:C
D:D
A : any palindrome
Q.no 47. Find the pair of regular expressions that are equivalent
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
Q.no 49.
Q.no 50. The context free languages are closed under (a) union, (b) concatenation, (c) Kleen
closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 51. Out of the three problems S, Q and R, S is an NP-complete problem and Q and R are
the two other problems not known to be in NP. Which one of the following statements is true if Q
is polynomial time reducible to S and S is the polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Q is NP-hard
D : R is NP-hard
Q.no 52. The set of all strings over alphabet ={a,b} in which a single a followed by any number of
b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 53. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-blank
symbols does not contain any blank symbols B in between. Consider Alphabet {a,b}.
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 54. Let S be an NP-complete problem and Q and R be two other problems not known to be
in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of
the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
A : I and II
B : I and IV
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : II and III
D : II and IV
A : Copies a string
B : Delete a symbol
C : Insert a symbol
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
Q.no 58. The regular expression denotes a language comprising all possible strings of even length
over the alphabet (0, 1)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 60. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/16
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A:3
B:4
C:2
D : cannot be represented.
A : Terminals
B : Variables
C : Start Symbol
D : Productions
C : Computability
D : All of these
A : true
B : false
C : maybe
D : cannot say
Q.no 7. Which of the following statement is true? (a) Turing machine was developed by Alan
Turing, (b) PDA is less powerful than Turing machine, (c) FA is more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Converting from Mealy into Moore machine and vice versa is not possible
Q.no 10. A grammar G=(V, T, P, S) is __________ if every production taken one of the two forms:
B->aC , B->a
A : Ambiguous
B : Regular
C : Non Regular
D : Context sensitive
Q.no 11. Which of the following are the examples of finite state machine system? (a) Control
Mechanism of an elevator (b) Traffic Lights (c) Combinational Locks
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 12. Which among the following are incorrect regular identities?
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
A:*,.,+
B:.,*,+
C:.,+,*
D:+,.,*
A : leftmost derivation
B : rightmost derivation
Q.no 15.
A:
B:
C:0
D:1
Q.no 16. Which of the following can be used to simulate any Turing machine?
C : Counter machines
Q.no 17. Identify the problem: Given a graph G = <V, E>, and a starting node a, does it have a
tour cost less than k?
A : Satisfiability
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Independent set
C : Node-Cover Problem
A : leftmost derivation
B : rightmost derivation
Q.no 19. Minimal finite automata need _____________ no. of final states
A:1
B:2
C:3
D : Depends on problem
Q.no 20. Turing Machine also behaves like General purpose computer and that TM is known as
_______
Q.no 21. The difference between number of states in FA for regular expression (a + b) and (a + b)
* is:
A:1
B:2
C:3
D:0
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 23. The operations of PDA never work on elements other than top of the stack.
A : false
B : true
C : may be
D : cannot say
A : never
B : not always
C : always
D : maybe
Q.no 25. The difference between Turing Machine and Two Way FA is in:
A : Input Tape
C : Finite Control
D : All of these
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 28. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be generated by
A : (r1)(r2)
B : (r1 + r2)
C : (r2)(r1)
D : (r1)
Q.no 29. Turing machine (TM) is more powerful than FSM (Finite State Machine) because
Q.no 30. The production of the form A->B , where A and B are non terminals is called
A : Null production
C : Unit production
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
A : Empty
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : abcabc
C : b*c|a
D : abc
A : 2,4
B : 1,3
C : 1, 2, 3, 4
D : 2, 3, 4
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
Q.no 35. Which of the regular expressions correspond to the given problem statement: Express
the identifiers in C Programming language where l=letters d=digits
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
Q.no 38. Is the language preserved in all the steps while eliminating epsilon transitions from a
NFA?
A : yes
B : no
C : may be
D : cannot say
Q.no 39. Production Rule: aAb->agb belongs to which of the following category?
A : Regular Language
A : regular language
C : unrestricted
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 42. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
A : Only II
B : Only III
C : Only I and II
Q.no 44. Out of the three problems S, Q and R, S is an NP-complete problem and Q and R are
the two other problems not known to be in NP. Which one of the following statements is true if Q
is polynomial time reducible to S and S is the polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 45. Which Transition table of Turing Machine is correct to check well formedness of
parentheses?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
Q.no 46. The regular expression for all strings of 0′s and 1′s with no two consecutive 0′s is
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 50. Construct a Turing machine which accepts a string with ‘aba’ as its substring.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 51. In conversion from the following CFG to CNF, the number of nonterminals to be
introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
A:
B:
C:
D:
Q.no 53. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 54. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Q.no 55. The lexical analysis for a modern computer language such as Java needs the power of
which one of the following machine models in a necessary and sufficient sense?
D : Turing machine
Q.no 56. John is asked to make an automaton which accepts a given string for all the occurrence
of ‘1001’ in it. How many number of transitions would John use such that, the string processing
application works?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : 10
B : 11
C : 12
D : 15
A : any palindrome
Q.no 58. Choose the correct option for the given statement: The DFA shown represents all strings
A : Correct
C : Wrong proposition
D : May be correct
Q.no 59.
A : X is decidable
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 60.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 17/17
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : type 0
B : type 1
C : type 2
D : type 3
A : NP
B:P
C : Hard
D : Complete
Q.no 3. Given the language L = {ab, aa, baa}, which of the following strings are in L*? 1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab 4) baaaaabaa
A : 1, 2 and 3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : 2, 3 and 4
C : 1, 2 and 4
D : 1, 3 and 4
D : Sentential form
Q.no 5.
A:
B:
C:0
D:1
Q.no 6.
A : yes
B : no
C : maybe
D : never
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : char
B : int
C : boolean
D : float
A:
B:
C:
D:
Q.no 10. Which of the following is false for a grammar G in Chomsky Normal Form:
Q.no 11. Problems that can be solved in polynomial time are known as
A : intractable
B : tractable
C : decision
D : complete
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
A:4
B:5
C:6
D : unlimitted
Q.no 14. _________ is the class of decision problems that can be solved by non-deterministic polynomial
algorithms?
A : NP
B:P
C : Hard
D : Complete
A : regular
B : context sensitive
C : context free
D : Unrestricted
A:0
B:1
C:2
D:3
Q.no 17. The language accepted by a Turing machine is called ………. language.
A : Regular
B : Recursively Enumerable
C : Context free
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : Context sensitive
Q.no 18. Which of the following statement is true? (a) Turing machine was developed by Alan Turing,
(b) PDA is less powerful than Turing machine, (c) FA is more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 19. Identify the problem: Given a graph G = <V, E>, and a starting node a, does it have a tour cost
less than k?
A : Satisfiability
B : Independent set
C : Node-Cover Problem
Q.no 20. Which of the following does not belong to the language if input alphabet set is a,b
A:a
B:b
C : epsilon
D:c
A : regular language
C : unrestricted
Q.no 22. Which of the following pairs have different expressive power
B : Deterministic Push Down Automata (DPDA) and Non-deterministic Push Down Automata (NPDA)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 23. Which of the regular expressions corresponds to the given problem statement over the
alphabet = {a, b}, All strings in which the total number of a’s is divisible by 2.
A : ((a+b)(a+b))*
B : (a + ab)*
C : ( b* a b*ab*)* + b*
D : a* b (aa)*b a*
Q.no 24. For a DFA accepting binary numbers whose decimal equivalent is divisible by 4, what are all
the possible remainders?
A:0
B:2
C : 0,2,4
D : 0,1,2,3
A : Every language that is defined by regular expression can also be defined by finite automata
B : Every language defined by finite automata can also be defined by regular expression
A:0
B:1
C:2
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:3
Q.no 28. Which of the following automata takes stack as auxiliary storage
A : finite automata
B : pushdown automata
C : Turing machine
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
Q.no 30.
A:
B:
C:
D : {0, 1}
Q.no 31. The difference between Turing Machine and Two Way FA is in:
A : Input Tape
C : Finite Control
D : All of these
Q.no 32. The maximum number of transitions which can be performed over a state in a DFA having
alphabet set a,b,c are
A:1
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:2
C:3
D:4
Q.no 33.
A : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the right movement.
B : Perform the transition from q0 to q1 by changing "X" symbol to "a" and perform the right movement.
C : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the Left movement.
D : Perform the transition from q0 to q1 by changing "q0" symbol to "q1" and perform the right movement.
Q.no 34. Which of the following is analogous to the NFA and NPDA ?
D : Unrestricted language
C : Determining of a universal Turing machine can be written for fewer than k instructions for some k
D : Turing Machine
Q.no 37. Let the class of language accepted by finite state machine be L1 and the class of languages
represented by regular expressions be L2 then
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : L1<L2
B : L1>=L2
C : L1!=L2
D : L1=L2
Q.no 38. Number of states required to accept strings ending with 10 are
A:3
B:2
C:1
D : can’t be represented.
Q.no 39. The subset construction shows that every NFA accepts a ……..
A : String
B : Function
C : Regular language
D : Context-free language
A : Binary tree
B : Sparse tree
C : Parse tree
D : Forest
Q.no 41. John is asked to make an automaton which accepts a given string for all the occurrence of
‘1001’ in it. How many number of transitions would John use such that, the string processing
application works?
A : 10
B : 11
C : 12
D : 15
Q.no 42. The problems which have no algorithm, regardless of whether or not they are accepted by a
turing machine that fails to halt on some input are referred as:
A : Decidable
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Undecidable
C : Computable
D : Recognizable
Q.no 43. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 44.
A:A
B:B
C:C
D:D
Q.no 45. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is
undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 46. The regular expression for all strings of 0′s and 1′s with no two consecutive 0′s is
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
Q.no 47. The regular expression denotes a language comprising all possible strings of even length over
the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 48. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 49. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 50. Which Transition table of Turing Machine is correct to check well formedness of parentheses?
A:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:
C:
D:
Q.no 51. The lexical analysis for a modern computer language such as Java needs the power of which
one of the following machine models in a necessary and sufficient sense?
D : Turing machine
Q.no 52. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 53. Let S be an NP-complete problem and Q and R be two other problems not known to be in NP.
Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of the given
statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 54. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
B:5
C:7
D:2
Q.no 55. Which grammar accepts the language of {a, b} having strings ending with 'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 57. Out of the three problems S, Q and R, S is an NP-complete problem and Q and R are the two
other problems not known to be in NP. Which one of the following statements is true if Q is polynomial
time reducible to S and S is the polynomial time reducible to R?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 58. Choose the correct option for the given statement: The DFA shown represents all strings
A : Correct
C : Wrong proposition
D : May be correct
Q.no 60.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/15
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : leftmost derivation
B : rightmost derivation
A : Terminal Symbol
C : Start symbol
D : End symbol
A : Captal Letters
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Small Letters
C : Italic Letters
D : Roman Letters
A : NP class
B : P class
C : NP complete
D : NP hard
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
A : R+
B : R-
C : R+ U R-
D:R
Q.no 7. What is the Regular Expression Matching Zero or More Specific Characters
A:x
B:#
C:*
D:&
Q.no 8. 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
A : R = QP*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : R = P*Q
C : R = RP
D : R = QP
B : More than one state can have two or more outgoing transitions
Q.no 10. The Grammar can be defined as: G= (V, T, P, S) In the given definition, what does S
represents?
A : Accepting State
B : Starting Variable
C : Sensitive Grammar
D : Final state
A : b*a*
B : (a*b*)*
C : a*b*
D:
C : Computability
D : All of these
Q.no 13. Which of the following are the actions that operates on stack top?
A : only push
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : only pop
Q.no 14.
A:
B:
C:0
D:1
A : regular
B : context sensitive
C : context free
D : Unrestricted
A : true
B : false
C : maybe
D : cannot say
Q.no 17. Which one of the following is the most powerful method?
A : LL(1)
B : SLR
C : CLR
D : LALR
Q.no 18. What is the value of n if Turing machine is defined using n-tuples?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:6
B:7
C:8
D:5
A:0
B:1
C:2
D:3
A : any grammar
Q.no 21.
A : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the right
movement.
B : Perform the transition from q0 to q1 by changing "X" symbol to "a" and perform the right
movement.
C : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the Left
movement.
D : Perform the transition from q0 to q1 by changing "q0" symbol to "q1" and perform the right
movement.
Q.no 22. Number of states required to accept strings ending with 10 are
A:3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:2
C:1
D : can’t be represented.
Q.no 23. Which of the following represents a language which has no pair of consecutive 1’s if
alphabet = {0,1}?
A:
B:
C:
D:
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Quadruple
B : Quintuple
C : Triple
Q.no 29.
A:
B:
C:
D:
Q.no 30. The power of non-deterministic pushdown automata and deterministic pushdown
automata is not same.
A : true
B : false
C : maybe
D : cannot say
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Regular language
B : Context-free language
C : Context-sensitive language
A : 2,4
B : 1,3
C : 1, 2, 3, 4
D : 2, 3, 4
Q.no 34. Is the language preserved in all the steps while eliminating epsilon transitions from a
NFA?
A : yes
B : no
C : may be
D : cannot say
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : never
B : not always
C : always
D : maybe
C : Palindrome string
Q.no 37. According to the given language, which among the following expressions does it
corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
D : (0+1+ε)^4
Q.no 38. Pushdown automata behaves like Turing machine when it has the number of auxiliary
memory
A : one or more
B : two or more
C : zero
D : one
C : Both NP-complete
D : Both in P
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 40. Which of the following is the restricted model of Turing machines (a) Turing machine
with semi-infinite tape, (b) Multi stack machine, (c) Offline Turing machine
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 41. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2
is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 42. John is asked to make an automaton which accepts a given string for all the occurrence
of ‘1001’ in it. How many number of transitions would John use such that, the string processing
application works?
A : 10
B : 11
C : 12
D : 15
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 44. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 45. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 46. In conversion from the following CFG to CNF, the number of nonterminals to be
introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:4
D:5
A : There exist context-free languages such that all context free grammars generating them are
ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of the
language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
A : Only II
B : Only III
C : Only I and II
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 51. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii) ((ϵ+a)b*)*
Which of the following statements is correct?
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 53. If all the production rules have single nonterminal symbol on the left side then grammar
is called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 54. The regular expression denotes a language comprising all possible strings of even length
over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 55. From the options given below the statement, which is not necessarily true if X1 is the
recursive language and X2 and X3 are the languages that are recursively enumerable but not
recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 56. The lexical analysis for a modern computer language such as Java needs the power of
which one of the following machine models in a necessary and sufficient sense?
D : Turing machine
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 58. The regular expression for all strings of 0′s and 1′s with no two consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
Q.no 60. Construct a Turing machine which accepts a string with ‘aba’ as its substring.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 17/17
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. Which of the following are the actions that operates on stack top?
A : only push
B : only pop
A : Finite Automaton
B : Turing Machine
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
Q.no 4. Construct a regular expression for the language that contains strings having at least one
pair of consecutive zeros over {0, 1}.
A : (100)*
B : 1* (00)* 1*
C : [ (1 + 0 )* (00) (1 + 0 )*] +
D : ((0+1)(0+1))*
A : yes
B : no
C : may be
D : cannot say
Q.no 7. Turing machine is more powerful than (a) Finite automata, (b) Push down automata
A : Only (a)
B : Only (b)
A : Regular
B : Recursively Enumerable
C : Context free
D : Context sensitive
Q.no 10. Which among the following cannot be accepted by a regular grammar?
D : L is a set of 0^n1^n
A:
B:
C:
D:
A:*,.,+
B:.,*,+
C:.,+,*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:+,.,*
Q.no 13. Which one of the following is the most powerful method?
A : LL(1)
B : SLR
C : CLR
D : LALR
Q.no 15. There is a linear grammar that generates a context free grammar
A : Always
B : Never
C : Sometimes
D : Everytime
B : may be different
C : must be different
D : cannot say
Q.no 17. Given the expression, is there some assignment of true and false values to the variables
that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 18. Which of the following case does not exist in complexity theory?
A : Best case
B : Worst case
C : Average case
D : Null case
A : Useful symbols
B : epsilon productions
C : Reachable symbols
Q.no 20. The major difference between a moore and mealy machine is that
A : Output of the former depends on the present state and present input
D : output of the former depends on the present input and next state
A : Boolean value
B : A state
C : A set of states
D : An edge
Q.no 22. According to the given language, which among the following expressions does it
corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : (0+1+ε)^4
Q.no 23. The regular expression with all strings of 0′s and 1′s with at least two consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
Q.no 24. The set of all strings over alphabet = {a,b} in which all strings having bbbb as substring
is
B : (a+b)* bb (a+b)*bb
C : bbb(a+b)*
D : bb (a+b)*
A : subset
B : proper subset
C : not subset
A : For every non-deterministic Turing machine, there exists an equivalent deterministic Turing
machine.
Q.no 27. Which of the following pairs have different expressive power
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Deterministic Push Down Automata (DPDA) and Non-deterministic Push Down Automata
(NPDA)
Q.no 28. A context free language is called ambiguous if (a) It has two or more leftmost
derivations for the same string. (b) It has two or more rightmost derivations for the same string.
(c) It has Only single derivation tree.
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 29. The automaton which allows transformation to a new state without consuming any
input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
A:0
B:1
C:2
D:3
A : regular language
C : unrestricted
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
Q.no 33. Recursively enumerable languages are …….. , whereas recursive languages are …....
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
Q.no 36. The minimum number of 1’s to be used in a regular expression of the given language of
all strings containing exactly 2 zeroes.
A:2
B:3
C:0
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:1
Q.no 37. The operations of PDA never work on elements other than top of the stack.
A : false
B : true
C : may be
D : cannot say
Q.no 39.
A:
B:
C:
D:
Q.no 40. Which of the regular expressions correspond to the given problem statement: Express
the identifiers in C Programming language where l=letters d=digits
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
Q.no 41. Any string of terminals that can be generated by the following CFG
S-> XY ,
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
X-> aX | bX | a ,
Y-> Ya | Yb | a
A : Only II
B : Only III
C : Only I and II
Q.no 43.
B : X is decidable
Q.no 44. Let S be an NP-complete problem and Q and R be two other problems not known to be
in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of
the given statements is true?
A : R is NP-complete
B : R is NP-hard
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Q is NP-complete
D : Q is NP-hard
Q.no 45. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 46. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 47. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
Q.no 48. Construct a Turing machine which accepts a string with ‘aba’ as its substring.
A:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:
C:
D:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 49.
A : X is decidable
Q.no 50. The context free languages are closed under (a) union, (b) concatenation, (c) Kleen
closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 51. Examine the following DFA: If input is 011100101, which edge is NOT traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 52. The problems which have no algorithm, regardless of whether or not they are accepted
by a turing machine that fails to halt on some input are referred as:
A : Decidable
B : Undecidable
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Computable
D : Recognizable
Q.no 53. From the options given below the statement, which is not necessarily true if X1 is the
recursive language and X2 and X3 are the languages that are recursively enumerable but not
recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 54. Which Transition table of Turing Machine is correct to check well formedness of
parentheses?
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 55. If all the production rules have single nonterminal symbol on the left side then grammar
is called as
C : Unrestricted grammar
D : Phrase grammar
A:
B:
C:
D:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : any palindrome
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 60. The regular expression denotes a language comprising all possible strings of even length
over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 17/17
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. _________ is the class of decision problems that can be solved by non-deterministic
polynomial algorithms?
A : NP
B:P
C : Hard
D : Complete
A : input symbol
B : stack symbol
C : output symbol
D : tape symbol
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:4
B:5
C:6
D : unlimitted
A : decidable problem
B : undecidable problem
C : complete problem
D : trackable problem
A : NP class
B : P class
C : NP complete
D : NP hard
A : intractable
B : tractable
C : decision
D : complete
A : P, NP
B : NP, NP hard
C : P, P complete
D : NP Hard,P
Q.no 8. The major difference between Mealy and Moore machine is about:
A : Output Variations
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Input Variations
C : Both
D : Transitions
A : Tractable
B : Intractable
C : Computational
D : Computable
Q.no 11. If there exists a language L, for which there exists a TM, T, that accepts every word in L
and either rejects or loops for every word that is not in L, is called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
Q.no 12. Which of the following correctly recognize the symbol ‘|-‘ in context to PDA?
A : moves
B : transition function
C : or symbol
D : not symbol
Q.no 13. Which one of the following languages over the alphabet {0, 1} is described by the regular
expression: (0+1)*0(0+1)*0(0+1)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : The set of all strings that begin and end with either 0 or 1
B : may be different
C : must be different
D : cannot say
A : accepted by DFA
B : accepted by PDA
C : accepted by LBA
Q.no 16. Which among the following are incorrect regular identities?
A:
B:
C:
D:
Q.no 17. Which of the following statement is true? (a) Turing machine was developed by Alan
Turing, (b) PDA is less powerful than Turing machine, (c) FA is more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : type 0
B : type 1
C : type 2
D : type 3
Q.no 19. Which of the following is false for a grammar G in Chomsky Normal Form:
Q.no 20. Which among the following cannot be accepted by a regular grammar?
D : L is a set of 0^n1^n
Q.no 21. Identify the following problem: If G=(V, E) and V' is subset of V, then V' is an
independent set iff no two nodes in V' are connected by an edge in E.
A : Satisfiability
B : Independent set
C : Node-Cover Problem
Q.no 22. The regular expression with all strings of 0′s and 1′s with at least two consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
Q.no 26. Under which of the following operation, NFA is not closed?
A : Negation
B : Kleene
C : Concatenation
D : complement
Q.no 28. Which of the regular expressions correspond to the given problem statement: Express
the identifiers in C Programming language where l=letters d=digits
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
Q.no 31. It is less complex to prove the closure properties over regular languages using
A : NFA
B : DFA
C : PDA
D : Canot be said
C : Palindrome string
Q.no 34. The difference between Turing Machine and Two Way FA is in:
A : Input Tape
C : Finite Control
D : All of these
A : Regular
B : Context free
C : Context sensitive
D : Unrestricted
Q.no 36. Which of the following does not obey pumping lemma for context free languages ?
A : Finite languages
C : Unrestricted languages
D : Restricted languages
Q.no 37. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
Q.no 38. PDA works as Finite Automata when the number of auxiliary memory it has is
A:3
B:2
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:1
D:0
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
Q.no 40.
C : {w | w is a string of length 3}
D : {w | w is an empty string}
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 42. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 44. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2
is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 46. Construct the regular expressions for the following DFAs:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
A : any palindrome
Q.no 48.
Q.no 49. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 50. Which Transition table of Turing Machine is correct to check well formedness of
parentheses?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 51. Choose the correct option for the given statement: The DFA shown represents all strings
A : Correct
C : Wrong proposition
D : May be correct
Q.no 52. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 53.
B : X is decidable
Q.no 54. In conversion from the following CFG to CNF, the number of nonterminals to be
introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:5
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 56. John is asked to make an automaton which accepts a given string for all the occurrence
of ‘1001’ in it. How many number of transitions would John use such that, the string processing
application works?
A : 10
B : 11
C : 12
D : 15
Q.no 58. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 59. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
Q.no 60. The lexical analysis for a modern computer language such as Java needs the power of
which one of the following machine models in a necessary and sufficient sense?
D : Turing machine
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/15
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A:4
B:5
C:6
D : unlimitted
Q.no 2. If T1 and T2 are two Turing machines, the composite can be represented using the
expression
A : T1 T2
B : T2 T1
C : T1 X T2
D : T2 X T1
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 3.
A:
B:
C:0
D:1
A : Finite
B : Infinite
C : May be finite
D : One
A : x+1
B:x
C : x-1
D : x2
A:*,.,+
B:.,*,+
C:.,+,*
D:+,.,*
A : regular
B : context sensitive
C : context free
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : Unrestricted
A : true
B : false
C : maybe
D : cannot say
A : Input alphabet
B : Transition function
C : Initial State
D : Output alphabet
D : Sentential form
A:0
B:1
C:2
D:3
Q.no 12. A grammar that produces more than one parse tree for some sentence is called
A : ambiguous
B : unambiguous
C : regular
A : Recursive language
C : Regular language
A : leftmost derivation
B : rightmost derivation
A : Regular Language
B : Non-Regular Language
C : May be Regular
D : Cannot be said
A : {x,y}
B : {xy}
C : {x}
D : {y}
C : Converting from Mealy into Moore machine and vice versa is not possible
Q.no 20. Which of the following regular expressions represents the set of strings which do not
contain a substring ‘rt’ if alphabet = {r, t}
A : (rt)*
B : (tr)*
C : (r*t*)
D : (t*r*)
Q.no 21. The worst-case efficiency of solving a problem in polynomial time is?
A : O(p(n))
C:
Q.no 22. Is the language preserved in all the steps while eliminating epsilon transitions from a
NFA?
A : yes
B : no
C : may be
D : cannot say
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 23.
A:
B:
C:
D : {0, 1}
Q.no 24. A context free language is called ambiguous if (a) It has two or more leftmost
derivations for the same string. (b) It has two or more rightmost derivations for the same string.
(c) It has Only single derivation tree.
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 25. X is a simple mathematical model of a computer. X has unrestricted and unlimited
memory. X is a FA with R/W head. X can have an infinite tape divided into cells, each cell
holding one symbol.
Name X?
C : Turing machines
Q.no 26. What does it mean when we say that an algorithm X is asymptotically more efficient
than Y?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 27. Out of the three decision problems P1, P2 and P3, P1 is decidable and P2 is undecidable.
The statement that holds true is
B : P3 is decidable if P1 is reducible to P3
C : P3 is undecidable if P1 is reducible to P3
D : P3 is undecidable if P2 is reducible to P3
A : For every non-deterministic Turing machine, there exists an equivalent deterministic Turing
machine.
Q.no 29. Which of the regular expressions correspond to the given problem statement: Express
the identifiers in C Programming language where l=letters d=digits
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
Q.no 30. The set of all strings over {a,b} in which strings consisting a’s and b’s and ending with
bb is
A : ab
B : a*bbb
C : (a+b)* bb
D : (a+b)+ bb
A : Binary tree
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Sparse tree
C : Parse tree
D : Forest
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
C : Palindrome string
Q.no 35. The regular expression with all strings of 0′s and 1′s with at least two consecutive 0′s is:
A : 1 + (10)*
B : (0+1)*00(0+1)*
C : (0+1)*011
D : 0*1*2*
A : regular language
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : unrestricted
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
Q.no 39. The power of non-deterministic pushdown automata and deterministic pushdown
automata is not same.
A : true
B : false
C : maybe
D : cannot say
Q.no 41. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:5
C:7
D:2
Q.no 42. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Q.no 43. John is asked to make an automaton which accepts a given string for all the occurrence
of ‘1001’ in it. How many number of transitions would John use such that, the string processing
application works?
A : 10
B : 11
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : 12
D : 15
Q.no 44. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii) ((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 46. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A : There exist context-free languages such that all context free grammars generating them are
ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of the
language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 48. Choose the correct option for the given statement: The DFA shown represents all strings
A : Correct
C : Wrong proposition
D : May be correct
Q.no 49. The context free languages are closed under (a) union, (b) concatenation, (c) Kleen
closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 50. From the options given below the statement, which is not necessarily true if X1 is the
recursive language and X2 and X3 are the languages that are recursively enumerable but not
recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 51. In conversion from the following CFG to CNF, the number of nonterminals to be
introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:4
D:5
Q.no 52. Find the pair of regular expressions that are equivalent
Q.no 53. If all the production rules have single nonterminal symbol on the left side then grammar
is called as
C : Unrestricted grammar
D : Phrase grammar
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
A : any palindrome
Q.no 56. The regular expression denotes a language comprising all possible strings of even length
over the alphabet (0, 1)
A : 1 + 0(1+0)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
A:
B:
C:
D:
Q.no 58. The set of all strings over alphabet ={a,b} in which a single a followed by any number of
b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 59.
A:A
B:B
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:C
D:D
Q.no 60. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/15
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. 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.
A : Turing acceptable
B : Decidable
C : Undecidable
D : NP-HARD
Q.no 2. Which of the following does not belong to the language if input alphabet set is a,b
A:a
B:b
C : epsilon
D:c
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : regular
B : context sensitive
C : context free
D : Unrestricted
Q.no 4. Which of the following is false for a grammar G in Chomsky Normal Form:
Q.no 5. Which of the following can be used to simulate any Turing machine?
C : Counter machines
A : intractable
B : tractable
C : decision
D : complete
Q.no 7. In Moore machine, if input is of length n, then length of output string will be
A:n
B : n+1
C : n+n
D : n-1
A:4
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:5
C:6
D : unlimitted
Q.no 9. A two-way infinite tape Turing machine is ________ superior than the basic model of the
Turing machine in terms of power.
A : More
B : Less
C : No way
D : Very Much
Q.no 10. A problem is called __________ if it has an efficient algorithm for itself.
A : Tractable
B : Intractable
C : Computational
D : Computable
Q.no 11. A grammar that produces more than one parse tree for some sentence is called
A : ambiguous
B : unambiguous
C : regular
A : Push
B : Pop
D : Read
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Turing machine rejects if the input does not belong to the language
Q.no 14. Turing machine is more powerful than (a) Finite automata, (b) Push down automata
A : Only (a)
B : Only (b)
Q.no 15. Which of the following statement is true? (a) Turing machine was developed by Alan
Turing, (b) PDA is less powerful than Turing machine, (c) FA is more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 16. Turing Machine also behaves like General purpose computer and that TM is known as
_______
C : Computability
D : All of these
A : queue
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : linked list
C : hash table
D : stack
A:*,.,+
B:.,*,+
C:.,+,*
D:+,.,*
Q.no 20.
A : L*
B:
C:L
D:
A : regular language
C : unrestricted
A : Every language that is defined by regular expression can also be defined by finite automata
B : Every language defined by finite automata can also be defined by regular expression
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Mealy machine
B : Moore machine
C : Turing machine
Q.no 24. According to the given language, which among the following expressions does it
corresponds to Language L={xϵ{0,1}|x is of length 4 or less}
A : (0+1+0+1+0+1+0+1)^4
B : (0+1)^4
C : (01)^4
D : (0+1+ε)^4
A : Regular
B : Context free
C : Context sensitive
D : Unrestricted
Q.no 26. Which of the regular expressions corresponds to the given problem statement over the
alphabet = {a, b}, All strings in which the total number of a’s is divisible by 2.
A : ((a+b)(a+b))*
B : (a + ab)*
C : ( b* a b*ab*)* + b*
D : a* b (aa)*b a*
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:0
B:1
C:2
D:3
Q.no 30. For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice versa.
A : true
B : false
C : maybe
D : probably
Q.no 31. The power of non-deterministic pushdown automata and deterministic pushdown
automata is not same.
A : true
B : false
C : maybe
D : cannot say
Q.no 32. The maximum number of transitions which can be performed over a state in a DFA
having alphabet set a,b,c are
A:1
B:2
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:3
D:4
Q.no 33.
A:
B:
C:
D:
Q.no 34. The total number of states and transitions required to form a Moore machine that
processes a binary input string and will produce residue mod 3.
A : 3 and 6
B : 3 and 5
C : 2 and 4
D : 2 and 5
Q.no 35. Which of the following statement(s) are correct? (a) All languages can be generated by
CFG, (b) Any regular language has an equivalent CFG, (c) Some non regular languages cannot
be generated by CFG.
A : only (a)
B : Only (b)
C : Only (c)
Q.no 36. Construct a regular expression for the language that contains strings having even
number of 0’s followed by odd number of 1’s over {0, 1}.
A : (00)* 1 (11)*
B : ((0+1)(0+1))*
C : (0+1)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : (001)*
Q.no 37. The minimum number of 1’s to be used in a regular expression of the given language of
all strings containing exactly 2 zeroes.
A:2
B:3
C:0
D:1
A : Empty
B : abcabc
C : b*c|a
D : abc
A : Binary tree
B : Sparse tree
C : Parse tree
D : Forest
Q.no 41. Find the pair of regular expressions that are equivalent
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 42. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
B:5
C:7
D:2
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 44. Let S be an NP-complete problem and Q and R be two other problems not known to be
in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of
the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 45. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 46. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 48. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-blank
symbols does not contain any blank symbols B in between. Consider Alphabet {a,b}.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
A:
B:
C:
D:
Q.no 50. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 51. John is asked to make an automaton which accepts a given string for all the occurrence
of ‘1001’ in it. How many number of transitions would John use such that, the string processing
application works?
A : 10
B : 11
C : 12
D : 15
A:
B:
C:
D:
A : Kleene closure
B : Concatenation
C : Complement
D : Union
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 56. Examine the following DFA: If input is 011100101, which edge is NOT traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 57. Choose the correct option for the given statement: The DFA shown represents all strings
A : Correct
C : Wrong proposition
D : May be correct
Q.no 58. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2
is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 59. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
A : any palindrome
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/16
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : intractable
B : tractable
C : decision
D : complete
A : LL(1)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : SLR
C : CLR
D : LALR
Q.no 4. Which of the following can be used to simulate any Turing machine?
C : Counter machines
A : Input alphabet
B : Transition function
C : Initial State
D : Output alphabet
D : LL1 Parsing
A : Recursive language
C : Regular language
A : decidable problem
B : undecidable problem
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : complete problem
D : trackable problem
Q.no 9.
A:R
B:
C : R*
D:
Q.no 10. Which of the following are the examples of finite state machine system? (a) Control
Mechanism of an elevator (b) Traffic Lights (c) Combinational Locks
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 11. What is the Regular Expression Matching Zero or More Specific Characters
A:x
B:#
C:*
D:&
B : may be different
C : must be different
D : cannot say
Q.no 13. What is the value of n if Turing machine is defined using n-tuples?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:6
B:7
C:8
D:5
Q.no 15. 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.
A : Turing acceptable
B : Decidable
C : Undecidable
D : NP-HARD
A:
B:
C:
D:
A : Regular Language
B : Non-Regular Language
C : May be Regular
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : Cannot be said
Q.no 18. Which of the following statement is true? (a) Turing machine was developed by Alan
Turing, (b) PDA is less powerful than Turing machine, (c) FA is more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
A : true
B : false
C : maybe
D : cannot say
Q.no 20. Given the expression, is there some assignment of true and false values to the variables
that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 23. Which of the regular expressions correspond to the given problem statement: Express
the identifiers in C Programming language where l=letters d=digits
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
D : Turing Machine
C : Determining of a universal Turing machine can be written for fewer than k instructions for some k
Q.no 27. A context free language is called ambiguous if (a) It has two or more leftmost derivations
for the same string. (b) It has two or more rightmost derivations for the same string. (c) It has
Only single derivation tree.
A : Only (a)
B : Only (b)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : Only (c)
Q.no 28. The worst case complexity of a deterministic problem to find the satisfiability of a given
formula of n variables is
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
A : Binary tree
B : Sparse tree
C : Parse tree
D : Forest
Q.no 31. Construct a regular expression for the language that contains strings having no pair of
consecutive zeros over {0, 1}.
A : (1+0)*
B:
C : ((0+1)(0+1))*
D : (01 + 10)*
A : Type 3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Type 2
C : Type 1
D : Type 0
Q.no 33. The ability for a system of instructions to simulate a Turing Machine is called _________
A : Turing Completeness
B : Simulation
C : Turing Halting
D : Computability
B : no trival method.
Q.no 35.
C : {w | w is a string of length 3}
D : {w | w is an empty string}
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
Q.no 37. Which of the following does not obey pumping lemma for context free languages ?
A : Finite languages
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Unrestricted languages
D : Restricted languages
Q.no 38. The subset construction shows that every NFA accepts a ……..
A : String
B : Function
C : Regular language
D : Context-free language
Q.no 39. The total number of states and transitions required to form a Moore machine that
processes a binary input string and will produce residue mod 3.
A : 3 and 6
B : 3 and 5
C : 2 and 4
D : 2 and 5
Q.no 40. Which of the regular expressions corresponds to the given problem statement over the
alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 41. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 43. Examine the following DFA: If input is 011100101, which edge is NOT traversed?
A:AB
B:BD
C:CD
D:DA
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
Q.no 45. Which Transition table of Turing Machine is correct to check well formedness of
parentheses?
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 46. The context free languages are closed under (a) union, (b) concatenation, (c) Kleen
closure
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 47. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2
is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 48. From the options given below the statement, which is not necessarily true if X1 is the
recursive language and X2 and X3 are the languages that are recursively enumerable but not
recursive.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 49. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 50. Choose the correct option for the given statement: The DFA shown represents all strings
A : Correct
C : Wrong proposition
D : May be correct
Q.no 51. The regular expression for all strings of 0′s and 1′s with no two consecutive 0′s is
A : (0+1)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : (0+1)*
C:
D : (0+1)* 011
A : Kleene closure
B : Concatenation
C : Complement
D : Union
Q.no 53. Let S be an NP-complete problem and Q and R be two other problems not known to be
in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of
the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
A:
B:
C:
D:
Q.no 56. The regular expression denotes a language comprising all possible strings of even length
over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 57. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-blank
symbols does not contain any blank symbols B in between. Consider Alphabet {a,b}.
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 58. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 59. The problems which have no algorithm, regardless of whether or not they are accepted
by a turing machine that fails to halt on some input are referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
Q.no 60. Find the pair of regular expressions that are equivalent
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 17/17
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. Which of the following are the actions that operates on stack top?
A : only push
B : only pop
Q.no 2. In given Transition function of TM which head movement of tape is shown (q0,a)->
(q1,X,L)
A : Left Movement
B : Right Movement
C : Top Movement
D : Bottom Movement
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Its memory
B : number of states
C : start state
D : input symbols
A : A->B
B : A->b
C : B->Aa
D : B->aA
D : LL1 Parsing
A : Regular
B : Recursively Enumerable
C : Context free
D : Context sensitive
Q.no 8. If the PDA does not stop on an accepting state and the stack is not empty, the string is
A : rejected
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : accepted
A : Terminal Symbol
C : Start symbol
D : End symbol
Q.no 10. The major difference between a moore and mealy machine is that
A : Output of the former depends on the present state and present input
D : output of the former depends on the present input and next state
Q.no 11. The major difference between Mealy and Moore machine is about:
A : Output Variations
B : Input Variations
C : Both
D : Transitions
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : queue
B : linked list
C : hash table
D : stack
A:
B:
C:
D:
Q.no 16. Turing machine is more powerful than (a) Finite automata, (b) Push down automata
A : Only (a)
B : Only (b)
C : LR parsing
D : SLR parsing
Q.no 18. Which of the following can be used to simulate any Turing machine?
C : Counter machines
Q.no 19. Those problems that are solvable in polynomial time belong to __
A : NP
B:P
C : Hard
D : Complete
Q.no 21. Construct a regular expression for the language that contains strings that start with
either ‘01’ or ‘10’ over {0, 1}.
A : (01 + 10)*
D : (1+0)*
Q.no 23. For a DFA accepting binary numbers whose decimal equivalent is divisible by 4, what
are all the possible remainders?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:0
B:2
C : 0,2,4
D : 0,1,2,3
Q.no 24. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
A:0
B:1
C:2
D:3
Q.no 26. Turing machine (TM) is more powerful than FSM (Finite State Machine) because
Q.no 27. According to Chomsky hierarchy, which of the following is recognized by Recursively
Enumerable language?
A : Type 3
B : Type 2
C : Type 1
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : Type 0
A : Regular
B : Context free
C : Context sensitive
D : Unrestricted
Q.no 31. What does it mean when we say that an algorithm X is asymptotically more efficient
than Y?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 33. How many strings of length less than 4 contain the language described by the regular
expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
Q.no 34. The problem of finding a path in a graph that visits every vertex exactly once is called
C : Palindrome string
Q.no 36. Which of the functions are not performed by the Turing machine after reading a
symbol?
Q.no 37. The set of all strings over {a,b} in which strings consisting a’s and b’s and ending with
bb is
A : ab
B : a*bbb
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : (a+b)* bb
D : (a+b)+ bb
A : [(a+b)*(aa+bb)]*
B : [(0+1)-(0b+a1)*(a+]*
C : (01+11+10)*
D : (1+2+0)*(1+2)*
A : 2,4
B : 1,3
C : 1, 2, 3, 4
D : 2, 3, 4
Q.no 42. John is asked to make an automaton which accepts a given string for all the occurrence
of ‘1001’ in it. How many number of transitions would John use such that, the string processing
application works?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : 10
B : 11
C : 12
D : 15
A:
B:
C:
D:
A:
B:
C:
Q.no 45. The context free languages are closed under (a) union, (b) concatenation, (c) Kleen
closure
A : Only (a)
B : Only (b)
C : Only (c)
A : There exist context-free languages such that all context free grammars generating them are
ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of the
language generated by it.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 47. Let S be an NP-complete problem and Q and R be two other problems not known to be
in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of
the given statements is true?
A : R is NP-complete
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
A : Only II
B : Only III
C : Only I and II
Q.no 49. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : abbaabbaa
Q.no 50. The problems which have no algorithm, regardless of whether or not they are accepted
by a turing machine that fails to halt on some input are referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
Q.no 51. Which Transition table of Turing Machine is correct to check well formedness of
parentheses?
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 52. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 53.
B : X is decidable
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 54.
Q.no 55. The lexical analysis for a modern computer language such as Java needs the power of
which one of the following machine models in a necessary and sufficient sense?
D : Turing machine
Q.no 56. Out of the three problems S, Q and R, S is an NP-complete problem and Q and R are
the two other problems not known to be in NP. Which one of the following statements is true if Q
is polynomial time reducible to S and S is the polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 57. Construct the regular expressions for the following DFAs:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 58. If all the production rules have single nonterminal symbol on the left side then grammar
is called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 59. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/15
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : regular language
D : unrestricted language
Q.no 2.
A : L*
B:
C:L
D:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : true
B : false
C : maybe
D : cannot say
A : x+1
B:x
C : x-1
D : x2
A : Type 0 grammar
B : Type 1 grammar
C : Type 2 grammar
D : Type 3 grammar
A : Finite
B : Infinite
C : May be finite
D : One
A : Terminals
B : Variables
C : Start Symbol
D : Productions
A:
B:
C:
D:
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
Q.no 11. Those problems that are solvable in polynomial time belong to __
A : NP
B:P
C : Hard
D : Complete
A : yes
B : no
C : may be
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : cannot say
Q.no 13. Which one of the following is the most powerful method?
A : LL(1)
B : SLR
C : CLR
D : LALR
Q.no 14. Which among the following are incorrect regular identities?
A:
B:
C:
D:
Q.no 15. There is a linear grammar that generates a context free grammar
A : Always
B : Never
C : Sometimes
D : Everytime
A : leftmost derivation
B : rightmost derivation
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 17.
A:R
B:
C : R*
D:
Q.no 18. Number of states required to accept strings ending with 101
A:3
B:4
C:2
D : cannot be represented.
Q.no 19. The finite automata is called NFA when there exists____________ for a specific input
from current state to next state
A : Single path
B : Multiple paths
D : Three paths
C : Converting from Mealy into Moore machine and vice versa is not possible
Q.no 21. PDA works as Finite Automata when the number of auxiliary memory it has is
A:3
B:2
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:1
D:0
Q.no 22. The problem of finding a path in a graph that visits every vertex exactly once is called
Q.no 23. The difference between number of states in FA for regular expression (a + b) and (a + b)
* is:
A:1
B:2
C:3
D:0
A : Every language that is defined by regular expression can also be defined by finite automata
B : Every language defined by finite automata can also be defined by regular expression
Q.no 25. The maximum number of transitions which can be performed over a state in a DFA
having alphabet set a,b,c are
A:1
B:2
C:3
D:4
A : Boolean value
B : A state
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : A set of states
D : An edge
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
C : Determining of a universal Turing machine can be written for fewer than k instructions for some k
Q.no 29. If there exists a TM which when applied to any problem in the class, terminates, if
correct answer is yes and may or may not terminate otherwise is called
A : Stable
B : Unsolvable
C : Partially solvable
D : Unstable
Q.no 30. What does it mean when we say that an algorithm X is asymptotically more efficient
than Y?
Q.no 31. The subset construction shows that every NFA accepts a ……..
A : String
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Function
C : Regular language
D : Context-free language
Q.no 32.
A:
B:
C:
D : {0, 1}
Q.no 34. Which among the following is not true for 2-way infinte TM?
C : Any computation that can be performed by 2-way infinite tape can also be performed by standard
TM.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
S--> 1S0
S--> Є
A : Regular language
B : Context-free language
C : Context-sensitive language
A : Quadruple
B : Quintuple
C : Triple
Q.no 38. Which productions will generate odd length palindromes for terminals 'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
Q.no 41. In conversion from the following CFG to CNF, the number of nonterminals to be
introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 44. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 45. Which grammar accepts the language of {a, b} having strings ending with 'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 46. Choose the correct option for the given statement: The DFA shown represents all strings
A : Correct
C : Wrong proposition
D : May be correct
A:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:
C:
D:
Q.no 48. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 49. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 50. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2
is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 51. The regular expression for all strings of 0′s and 1′s with no two consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : (0+1)* 011
Q.no 52. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii) ((ϵ+a)b*)*
Which of the following statements is correct?
A : Copies a string
B : Delete a symbol
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Insert a symbol
Q.no 55. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
B:5
C:7
D:2
A : There exist context-free languages such that all context free grammars generating them are
ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of the
language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 57. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 58. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-blank
symbols does not contain any blank symbols B in between. Consider Alphabet {a,b}.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 60. If all the production rules have single nonterminal symbol on the left side then grammar
is called as
C : Unrestricted grammar
D : Phrase grammar
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/16
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. Which of the following regular expressions represents the set of strings which do not
contain a substring ‘rt’ if alphabet = {r, t}
A : (rt)*
B : (tr)*
C : (r*t*)
D : (t*r*)
D : Sentential form
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Concatenation
B : Selection
C : Iteration
D : Addition
A : intractable
B : tractable
C : decision
D : complete
A : leftmost derivation
B : rightmost derivation
Q.no 6. Turing Machine also behaves like General purpose computer and that TM is known as
_______
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Recursive
B : Non Recursive
C : Recognizable
D : Non Recognizable
A:0
B:1
C:2
D:3
A : Captal Letters
B : Small Letters
C : Italic Letters
D : Roman Letters
Q.no 11. Which of the following are the actions that operates on stack top?
A : only push
B : only pop
A : input symbol
B : stack symbol
C : output symbol
D : tape symbol
Q.no 13. For alphabet = {a,b}, the regular expression r = (aa)*(bb)*b denotes
D : Set of strings with even number of a’s followed by odd number of b’s
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
B : More than one state can have two or more outgoing transitions
Q.no 16. Given the expression, is there some assignment of true and false values to the variables
that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
A:
B:
C:
D:
Q.no 18. If there exists a language L, for which there exists a TM, T, that accepts every word in L
and either rejects or loops for every word that is not in L, is called
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
Q.no 19. A grammar that produces more than one parse tree for some sentence is called
A : ambiguous
B : unambiguous
C : regular
Q.no 20. Choose the correct option for the statement: Unambiguity is the ideal structure of a
language.
A : true
B : Partially True
C : false
D : Cannot be said
Q.no 21. CFGs are more powerful than (a) DFA, (b) NDFA, (c) Mealy Machine
A : Only (a)
Q.no 22. Which of the functions are not performed by the Turing machine after reading a
symbol?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Given two arbitrary context-free grammars G1 G2 and it is undecidable whether L (G1) = L (G2).
Q.no 24. Which of the following pairs have DIFFERENT expressive power?
B : Deterministic push down automata (DPDA) and Non-deterministic pushdown automata (NPDA)
A : Quadruple
B : Quintuple
C : Triple
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
A : subset
B : proper subset
C : not subset
Q.no 28. The worst case complexity of a deterministic problem to find the satisfiability of a given
formula of n variables is
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
B : no trival method.
Q.no 32. X is a simple mathematical model of a computer. X has unrestricted and unlimited
memory. X is a FA with R/W head. X can have an infinite tape divided into cells, each cell
holding one symbol.
Name X?
C : Turing machines
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : regular language
C : unrestricted
A : {xy,xy}
B : {xx,xy,yx,yy}
C : {x,y}
D : {x,y,xy}
Q.no 35. The travelling salesman problem can be solved using _________
A : A spanning tree
D : DFS traversal
Q.no 36. Which of the following is the restricted model of Turing machines (a) Turing machine
with semi-infinite tape, (b) Multi stack machine, (c) Offline Turing machine
A : Only (a)
B : Only (b)
C : Only (c)
Q.no 37. The minimum number of productions required to produce a language consisting of
palindrome strings over T={a,b} is
A:3
B:7
C:5
D:6
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 39. Number of states required to accept strings ending with 10 are
A:3
B:2
C:1
D : can’t be represented.
Q.no 40. A context free language is called ambiguous if (a) It has two or more leftmost
derivations for the same string. (b) It has two or more rightmost derivations for the same string.
(c) It has Only single derivation tree.
A : Only (a)
B : Only (b)
D : Only (c)
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 43. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
B:5
C:7
D:2
Q.no 44. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 45. The problems which have no algorithm, regardless of whether or not they are accepted
by a turing machine that fails to halt on some input are referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
Q.no 46. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
Q.no 47. The regular expression for all strings of 0′s and 1′s with no two consecutive 0′s is
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
Q.no 49. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 50.
Q.no 51. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 53. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-blank
symbols does not contain any blank symbols B in between. Consider Alphabet {a,b}.
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 54. The lexical analysis for a modern computer language such as Java needs the power of
which one of the following machine models in a necessary and sufficient sense?
D : Turing machine
A : Only II
B : Only III
C : Only I and II
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 56. Which of the following will not be accepted by the following DFA?
A : ababaabaa
B : abbbaa
C : abbbaabb
D : abbaabbaa
Q.no 57. Construct a Turing machine which accepts a string with ‘aba’ as its substring.
A:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:
C:
D:
Q.no 58. Let S be an NP-complete problem and Q and R be two other problems not known to be
in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of
the given statements is true?
A : R is NP-complete
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : R is NP-hard
C : Q is NP-complete
D : Q is NP-hard
Q.no 59.
B : X is decidable
Q.no 60. The context free languages are closed under (a) union, (b) concatenation, (c) Kleen
closure
A : Only (a)
B : Only (b)
C : Only (c)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 17/17
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. Turing Machine can update symbols on its tape, whereas the FA cannot update symbols
on tape.
A : true
B : false
C : Cannot say
D : May be
Q.no 2. The push down automata indicate the acceptance of input string in terms of
A : final state
B : empty stack
D : start state
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Its memory
B : number of states
C : start state
D : input symbols
A:0
B:1
C:2
D:3
Q.no 6. In given Transition function of TM which head movement of tape is shown (q0,a)->
(q1,X,L)
A : Left Movement
B : Right Movement
C : Top Movement
D : Bottom Movement
A : (01)*0 = 0(10)0*
B : (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*
C : (0+1)*01(0+1)*+1*0* = (0+1)*0
D : (01)*01 = 0(10)0*1
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Regular
B : Recursively Enumerable
C : Context free
D : Context sensitive
A : Captal Letters
B : Small Letters
C : Italic Letters
D : Roman Letters
Q.no 13. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : P class
C : NP complete
D : NP hard
Q.no 14. There is a linear grammar that generates a context free grammar
A : Always
B : Never
C : Sometimes
D : Everytime
Q.no 15. The transition a Push down automaton makes is additionally dependent upon the:
A : Current State
B : input tape
C : stack
D : terminals
Q.no 16. Which of the following regular expressions represents the set of strings which do not
contain a substring ‘rt’ if alphabet = {r, t}
A : (rt)*
B : (tr)*
C : (r*t*)
D : (t*r*)
A : leftmost derivation
B : rightmost derivation
Q.no 18. An algorithm is called efficient if it runs in ____________ time on a serial computer.
A : Polynomial
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Non polynomial
C : Logarithmic
D : Non Logarithmic
A : type 0
B : type 1
C : type 2
D : type 3
Q.no 21. Which of the following statement(s) are correct? (a) All languages can be generated by
CFG, (b) Any regular language has an equivalent CFG, (c) Some non regular languages cannot
be generated by CFG.
A : only (a)
B : Only (b)
C : Only (c)
Q.no 23. The power of non-deterministic pushdown automata and deterministic pushdown
automata is not same.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : true
B : false
C : maybe
D : cannot say
Q.no 24. If there exists a TM which when applied to any problem in the class, terminates, if
correct answer is yes and may or may not terminate otherwise is called
A : Stable
B : Unsolvable
C : Partially solvable
D : Unstable
A : Regular
B : Context free
C : Context sensitive
D : Unrestricted
Q.no 26. The difference between number of states in FA for regular expression (a + b) and (a + b)
* is:
A:1
B:2
C:3
D:0
Q.no 27. Which of the following pairs have DIFFERENT expressive power?
B : Deterministic push down automata (DPDA) and Non-deterministic pushdown automata (NPDA)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 29. Which of the following pairs have different expressive power
B : Deterministic Push Down Automata (DPDA) and Non-deterministic Push Down Automata
(NPDA)
B : stack alphabet
D : transition function
Q.no 31.
A : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the right
movement.
B : Perform the transition from q0 to q1 by changing "X" symbol to "a" and perform the right
movement.
C : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the Left
movement.
D : Perform the transition from q0 to q1 by changing "q0" symbol to "q1" and perform the right
movement.
Q.no 32. The maximum number of transitions which can be performed over a state in a DFA
having alphabet set a,b,c are
A:1
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:2
C:3
D:4
Q.no 33. Is the language preserved in all the steps while eliminating epsilon transitions from a
NFA?
A : yes
B : no
C : may be
D : cannot say
Q.no 36. The problem of finding a path in a graph that visits every vertex exactly once is called
Q.no 37. What does it mean when we say that an algorithm X is asymptotically more efficient
than Y?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 38.
A:
B:
C:
D:
Q.no 39. The operations of PDA never work on elements other than top of the stack.
A : false
B : true
C : may be
D : cannot say
Q.no 40. CFGs are more powerful than (a) DFA, (b) NDFA, (c) Mealy Machine
A : Only (a)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 42. The set of all strings over alphabet ={a,b} in which a single a followed by any number of
b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 44. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
B:5
C:7
D:2
Q.no 45. If all the production rules have single nonterminal symbol on the left side then grammar
is called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 47. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 48. Examine the following DFA: If input is 011100101, which edge is NOT traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 49. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 50. The regular expression denotes a language comprising all possible strings of even length
over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
Q.no 51. The lexical analysis for a modern computer language such as Java needs the power of
which one of the following machine models in a necessary and sufficient sense?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : Turing machine
A:
B:
C:
D:
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
A : Kleene closure
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Concatenation
C : Complement
D : Union
Q.no 56.
A : X is decidable
A : There exist context-free languages such that all context free grammars generating them are
ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of the
language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 59.
Q.no 60. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/15
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
Q.no 2.
A:
B:
C:0
D:1
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 3. A->aA| a| b
The number of steps to generate aab are
A:2
B:3
C:4
D:5
A:6
B:7
C:8
D:5
C : Converting from Mealy into Moore machine and vice versa is not possible
Q.no 6. If T1 and T2 are two Turing machines, the composite can be represented using the
expression
A : T1 T2
B : T2 T1
C : T1 X T2
D : T2 X T1
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 8. In given Transition function of TM which head movement of tape is shown (q0,a)->
(q1,X,L)
A : Left Movement
B : Right Movement
C : Top Movement
D : Bottom Movement
A : Turing Machine
B : Finite Automata
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
A : Recursive language
C : Regular language
Q.no 12. The minimum number of states required to recognize an octal number divisible by 3 is
A:1
B:3
C:5
D:7
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 14. Number of states required to accept strings ending with 101
A:3
B:4
C:2
D : cannot be represented.
Q.no 15. Minimal finite automata need _____________ no. of final states
A:1
B:2
C:3
D : Depends on problem
Q.no 16. Choose the correct option for the statement: Unambiguity is the ideal structure of a
language.
A : true
B : Partially True
C : false
D : Cannot be said
A : regular language
D : unrestricted language
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Useful symbols
B : epsilon productions
C : Reachable symbols
A:0
B:1
C:2
D:3
A : Its memory
B : number of states
C : start state
D : input symbols
Q.no 21. Which of the regular expressions corresponds to the given problem statement over the
alphabet = {a, b}, All strings in which any occurrence of the symbol b, is in groups of odd
numbers.
A : (abbb)*
B : a* b (bb)* a*
C : ((a+b)(a+b)(a+b))*
D : a* b* (bb)* a*
Q.no 22. Which of the following does not obey pumping lemma for context free languages ?
A : Finite languages
C : Unrestricted languages
D : Restricted languages
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 23. The worst case complexity of a deterministic problem to find the satisfiability of a given
formula of n variables is
A : O(n)
B : O(n^2)
C : O(n^3)
D : O(2^n)
Q.no 24. The travelling salesman problem can be solved using _________
A : A spanning tree
D : DFS traversal
A : Quadruple
B : Quintuple
C : Triple
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : Determining of a universal Turing machine can be written for fewer than k instructions for some k
Q.no 29. Which of the following is not a Non deterministic Turing machine?
D : Unsolvable
Q.no 30. Turing machine (TM) is more powerful than FSM (Finite State Machine) because
Q.no 31. How many strings of length less than 4 contain the language described by the regular
expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
Q.no 32. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be generated by
A : (r1)(r2)
B : (r1 + r2)
C : (r2)(r1)
D : (r1)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 34. The subset construction shows that every NFA accepts a ……..
A : String
B : Function
C : Regular language
D : Context-free language
Q.no 35. The problem of finding a path in a graph that visits every vertex exactly once is called
Q.no 36. The operations of PDA never work on elements other than top of the stack.
A : false
B : true
C : may be
D : cannot say
A : regular language
C : unrestricted
Q.no 38. Which of the following pairs have different expressive power
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Deterministic Push Down Automata (DPDA) and Non-deterministic Push Down Automata
(NPDA)
Q.no 39. Which of the regular expressions correspond to the given problem statement: Express
the identifiers in C Programming language where l=letters d=digits
A : (l+_)(d+_)*
B : (l+d+_)*
C : (l+_)(l+d+_)*
D : (_+d)(l+d+_)*
Q.no 40. For a DFA accepting binary numbers whose decimal equivalent is divisible by 4, what
are all the possible remainders?
A:0
B:2
C : 0,2,4
D : 0,1,2,3
Q.no 41. Examine the following DFA: If input is 011100101, which edge is NOT traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 42. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2
is undecidable. Which one of the following is True?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 43. The context free languages are closed under (a) union, (b) concatenation, (c) Kleen
closure
A : Only (a)
B : Only (b)
C : Only (c)
A:
B:
C:
Q.no 47. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Q.no 48. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
B:5
C:7
D:2
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : I and II
B : I and IV
C : II and III
D : II and IV
Q.no 50. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 51. The lexical analysis for a modern computer language such as Java needs the power of
which one of the following machine models in a necessary and sufficient sense?
D : Turing machine
Q.no 53.
A : X is decidable
Q.no 54. The set of all strings over alphabet ={a,b} in which a single a followed by any number of
b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
Q.no 55.
A:A
B:B
C:C
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:D
A : Copies a string
B : Delete a symbol
C : Insert a symbol
A : Only II
B : Only III
C : Only I and II
Q.no 58. From the options given below the statement, which is not necessarily true if X1 is the
recursive language and X2 and X3 are the languages that are recursively enumerable but not
recursive.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 59. In conversion from the following CFG to CNF, the number of nonterminals to be
introduced for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
Q.no 60. The problems which have no algorithm, regardless of whether or not they are accepted
by a turing machine that fails to halt on some input are referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/15
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A:*,.,+
B:.,*,+
C:.,+,*
D:+,.,*
C : Nothing
D : Type of input
A : yes
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : no
C : may be
D : cannot say
A:
B:
C:
D:
A : Push
B : Pop
D : Read
A : true
B : false
C : maybe
D : cannot say
A : Finite
B : Infinite
C : May be finite
D : One
Q.no 8. The transition a Push down automaton makes is additionally dependent upon the:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Current State
B : input tape
C : stack
D : terminals
A : NP
B:P
C : Hard
D : Complete
A : Useful symbols
B : epsilon productions
C : Reachable symbols
Q.no 11. The minimum number of states required to recognize an octal number divisible by 3 is
A:1
B:3
C:5
D:7
Q.no 12. Turing Machine also behaves like General purpose computer and that TM is known as
_______
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
Q.no 15.
A:R
B:
C : R*
D:
A:4
B:5
C:6
D : unlimitted
A : Recursive language
C : Regular language
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 18. Which of the following case does not exist in complexity theory?
A : Best case
B : Worst case
C : Average case
D : Null case
Q.no 19.
Q.no 20. If the PDA does not stop on an accepting state and the stack is not empty, the string is
A : rejected
D : accepted
Q.no 21. Identify the following problem: If G=(V, E) and V' is subset of V, then V' is an independent set
iff no two nodes in V' are connected by an edge in E.
A : Satisfiability
B : Independent set
C : Node-Cover Problem
Q.no 22. Out of the three decision problems P1, P2 and P3, P1 is decidable and P2 is undecidable. The
statement that holds true is
B : P3 is decidable if P1 is reducible to P3
C : P3 is undecidable if P1 is reducible to P3
D : P3 is undecidable if P2 is reducible to P3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : stack alphabet
D : transition function
Q.no 24. The maximum number of transitions which can be performed over a state in a DFA having
alphabet set a,b,c are
A:1
B:2
C:3
D:4
Q.no 25. Which of the following pairs have DIFFERENT expressive power?
B : Deterministic push down automata (DPDA) and Non-deterministic pushdown automata (NPDA)
A : Mealy machine
B : Moore machine
C : Turing machine
Q.no 28. Which of the following automata takes stack as auxiliary storage
A : finite automata
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : pushdown automata
C : Turing machine
Q.no 29. Which of the functions are not performed by the Turing machine after reading a symbol?
Q.no 30. Which of the following is not a Non deterministic Turing machine?
D : Unsolvable
A : Empty
B : abcabc
C : b*c|a
D : abc
Q.no 33. Construct a regular expression for the language that contains strings having even number of
0’s followed by odd number of 1’s over {0, 1}.
A : (00)* 1 (11)*
B : ((0+1)(0+1))*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : (0+1)*
D : (001)*
Q.no 34. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
A : subset
B : proper subset
C : not subset
Q.no 36. A context free language is called ambiguous if (a) It has two or more leftmost derivations for
the same string. (b) It has two or more rightmost derivations for the same string. (c) It has Only single
derivation tree.
A : Only (a)
B : Only (b)
D : Only (c)
Q.no 37. How many strings of length less than 4 contain the language described by the regular
expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 40. The set of all strings over {a,b} in which strings consisting a’s and b’s and ending with bb is
A : ab
B : a*bbb
C : (a+b)* bb
D : (a+b)+ bb
A : Only II
B : Only III
C : Only I and II
Q.no 42.
A : X is decidable
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
is termed as
Q.no 45.
B : X is decidable
Q.no 46. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
B:5
C:7
D:2
Q.no 47. From the options given below the statement, which is not necessarily true if X1 is the recursive
language and X2 and X3 are the languages that are recursively enumerable but not recursive.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 48. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-blank symbols
does not contain any blank symbols B in between. Consider Alphabet {a,b}.
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 50. The context free languages are closed under (a) union, (b) concatenation, (c) Kleen closure
A : Only (a)
B : Only (b)
C : Only (c)
A : ababbbbab
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 52. Which grammar accepts the language of {a, b} having strings ending with 'a'.
A : S->aS | bS
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 53. Find the pair of regular expressions that are equivalent
Q.no 54. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 55. The regular expression for all strings of 0′s and 1′s with no two consecutive 0′s is
A : (0+1)
B : (0+1)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D : (0+1)* 011
A:
B:
C:
D:
Q.no 57.
Q.no 58. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 59. In conversion from the following CFG to CNF, the number of nonterminals to be introduced
for the terminals are:
S->Aba , A->aab , B->Ac
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:2
B:3
C:4
D:5
A : Kleene closure
B : Concatenation
C : Complement
D : Union
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/15
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
Q.no 1. If there exists a language L, for which there exists a TM, T, that accepts every word in L and
either rejects or loops for every word that is not in L, is called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
Q.no 2.
Q.no 3. The major difference between a moore and mealy machine is that
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Output of the former depends on the present state and present input
D : output of the former depends on the present input and next state
A : intractable
B : tractable
C : decision
D : complete
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
A:3
B:4
C:2
D : cannot be represented.
C : Computability
D : All of these
Q.no 8. A grammar that produces more than one parse tree for some sentence is called
A : ambiguous
B : unambiguous
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : regular
Q.no 9. Which of the production rule can be accepted by Chomsky grammar. (i) A->BC, (ii) A->a
A : only i
B : only ii
C : both i and ii
D : neither i nor ii
Q.no 10. Which of the following is not a part of 5-tuple finite automata?
A : Input alphabet
B : Transition function
C : Initial State
D : Output alphabet
A : leftmost derivation
B : rightmost derivation
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
Q.no 13. Minimal finite automata need _____________ no. of final states
A:1
B:2
C:3
D : Depends on problem
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 14. Which of the following does not belong to the language if input alphabet set is a,b
A:a
B:b
C : epsilon
D:c
Q.no 15. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
B : P class
C : NP complete
D : NP hard
Q.no 16. A grammar G=(V, T, P, S) is __________ if every production taken one of the two forms: B-
>aC , B->a
A : Ambiguous
B : Regular
C : Non Regular
D : Context sensitive
Q.no 17. The Grammar can be defined as: G= (V, T, P, S) In the given definition, what does S
represents?
A : Accepting State
B : Starting Variable
C : Sensitive Grammar
D : Final state
Q.no 18. A problem which is both _______ and _________ is said to be NP complete.
A : P, NP
B : NP, NP hard
C : P, P complete
D : NP Hard,P
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
A : x+1
B:x
C : x-1
D : x2
Q.no 21. It is less complex to prove the closure properties over regular languages using
A : NFA
B : DFA
C : PDA
D : Canot be said
Q.no 23. According to Chomsky hierarchy, which of the following is recognized by Recursively
Enumerable language?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 24. X is a simple mathematical model of a computer. X has unrestricted and unlimited memory. X
is a FA with R/W head. X can have an infinite tape divided into cells, each cell holding one symbol.
Name X?
C : Turing machines
Q.no 25. Let the class of language accepted by finite state machine be L1 and the class of languages
represented by regular expressions be L2 then
A : L1<L2
B : L1>=L2
C : L1!=L2
D : L1=L2
A : Quadruple
B : Quintuple
C : Triple
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
Q.no 28. How many strings of length less than 4 contain the language described by the regular
expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 29. The minimum number of 1’s to be used in a regular expression of the given language of all
strings containing exactly 2 zeroes.
A:2
B:3
C:0
D:1
Q.no 30. Pushdown automata behaves like Turing machine when it has the number of auxiliary
memory
A : one or more
B : two or more
C : zero
D : one
Q.no 31. The automaton which allows transformation to a new state without consuming any input
symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
Q.no 32. The RE in which any number of 0′s is followed by any number of 1′s followed by any number
of 2′s is
A : (0+1+2)*
B : 0*1*2*
C : 0* + 1 + 2
D : (0+1)*2*
Q.no 33. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be generated by
A : (r1)(r2)
B : (r1 + r2)
C : (r2)(r1)
D : (r1)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Every language that is defined by regular expression can also be defined by finite automata
B : Every language defined by finite automata can also be defined by regular expression
Q.no 35. Which among the following is the LEAF of the parse tree?
A : Production P
B : Nonterminal V
C : Terminal T
D : Starting symbol S
Q.no 36. Which of the regular expressions corresponds to the given problem statement over the
alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
A : lexical analysis
B : syntax analysis
C : semantic analysis
D : code generation
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 39. Which of the following represents a language which has no pair of consecutive 1’s if alphabet =
{0,1}?
A:
B:
C:
D:
Q.no 40. The maximum number of transitions which can be performed over a state in a DFA having
alphabet set a,b,c are
A:1
B:2
C:3
D:4
Q.no 41. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 42. In conversion from the following CFG to CNF, the number of nonterminals to be introduced
for the terminals are:
S->Aba , A->aab , B->Ac
A:2
B:3
C:4
D:5
A : any palindrome
Q.no 44. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : (0+010)*
D : (0+1)*
Q.no 46. John is asked to make an automaton which accepts a given string for all the occurrence of
‘1001’ in it. How many number of transitions would John use such that, the string processing
application works?
A : 10
B : 11
C : 12
D : 15
Q.no 47. The lexical analysis for a modern computer language such as Java needs the power of which
one of the following machine models in a necessary and sufficient sense?
D : Turing machine
Q.no 48. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 49. Examine the following DFA: If input is 011100101, which edge is NOT traversed?
A:AB
B:BD
C:CD
D:DA
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
Q.no 51. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is
undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 52. Find the pair of regular expressions that are equivalent
Q.no 53. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii) ((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 54.
A:A
B:B
C:C
D:D
A:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:
C:
D:
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 58. Any string of terminals that can be generated by the following CFG
S-> XY ,
X-> aX | bX | a ,
Y-> Ya | Yb | a
A : Kleene closure
B : Concatenation
C : Complement
D : Union
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/15
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : NP class
B : P class
C : NP complete
D : NP hard
A : Regular Language
B : Non-Regular Language
C : May be Regular
D : Cannot be said
A : regular language
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : unrestricted language
Q.no 4. Which of the following can be used to simulate any Turing machine?
C : Counter machines
A : Kleene plus +
B : Kleene star *
C : Question mark ?
D : Union
A : Always
B : Never
C : Sometimes
D : Everytime
A : decidable problem
B : undecidable problem
C : complete problem
D : trackable problem
Q.no 8.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : regular
B : context sensitive
C : context free
D : Unrestricted
Q.no 11. The Grammar can be defined as: G= (V, T, P, S) In the given definition, what does S
represents?
A : Accepting State
B : Starting Variable
C : Sensitive Grammar
D : Final state
C : LR parsing
D : SLR parsing
A:0
B:1
C:2
D:3
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : R+
B : R-
C : R+ U R-
D:R
A : (x+y)
B : (x+y)*
C : (x* + y)
D : (xy)*
Q.no 16. Which of the following regular expressions represents the set of strings which do not contain a
substring ‘rt’ if alphabet = {r, t}
A : (rt)*
B : (tr)*
C : (r*t*)
D : (t*r*)
Q.no 17. Which of the following does not belong to the language if input alphabet set is a,b
A:a
B:b
C : epsilon
D:c
A : Its memory
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : number of states
C : start state
D : input symbols
Q.no 20. If T1 and T2 are two Turing machines, the composite can be represented using the expression
A : T1 T2
B : T2 T1
C : T1 X T2
D : T2 X T1
A : Quadruple
B : Quintuple
C : Triple
Q.no 22. The total number of states and transitions required to form a Moore machine that processes a
binary input string and will produce residue mod 3.
A : 3 and 6
B : 3 and 5
C : 2 and 4
D : 2 and 5
A : Every language that is defined by regular expression can also be defined by finite automata
B : Every language defined by finite automata can also be defined by regular expression
Q.no 24. The worst case complexity of a deterministic problem to find the satisfiability of a given
formula of n variables is
A : O(n)
B : O(n^2)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : O(n^3)
D : O(2^n)
B : no trival method.
C : Both NP-complete
D : Both in P
A : Regular language
B : Context-free language
C : Context-sensitive language
A : Binary tree
B : Sparse tree
C : Parse tree
D : Forest
Q.no 31. Which of the following does not obey pumping lemma for context free languages ?
A : Finite languages
C : Unrestricted languages
D : Restricted languages
Q.no 32. The problem of finding a path in a graph that visits every vertex exactly once is called
Q.no 33. Which productions will generate odd length palindromes for terminals 'a' and 'b' ?
A : S-> aSa|bSb|a|b
B : S-> aSa|bSb|aa|bb
C : S-> aSa|bSb
D : S-> aSb|bSa|a|b
Q.no 34. The subset construction shows that every NFA accepts a ……..
A : String
B : Function
C : Regular language
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : Context-free language
Q.no 35. Which of the following is not a Non deterministic Turing machine?
D : Unsolvable
Q.no 36. Production Rule: aAb->agb belongs to which of the following category?
A : Regular Language
B : stack alphabet
D : transition function
Q.no 38. Which of the following represents a language which has no pair of consecutive 1’s if alphabet =
{0,1}?
A:
B:
C:
D:
Q.no 39. A non-deterministic pushdown automaton can be converted into an equivalent deterministic
pushdown automaton.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : never
B : not always
C : always
D : maybe
A : lexical analysis
B : syntax analysis
C : semantic analysis
D : code generation
Q.no 41. Examine the following DFA: If input is 011100101, which edge is NOT traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 43.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
Q.no 45. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is
undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
A : (a + b ) * ab
B : ab (a + b ) *
C:a(a+b)*b
D : b (a + b ) * a
Q.no 47. Construct a Turing machine which accepts a string with ‘aba’ as its substring.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 48. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-blank symbols
does not contain any blank symbols B in between. Consider Alphabet {a,b}.
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 49. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
A : ababbbbab
B : abbbab
C : ababbabbbab
D : ababbbbbab
Q.no 51. Which Transition table of Turing Machine is correct to check well formedness of parentheses?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
Q.no 52. If all the production rules have single nonterminal symbol on the left side then grammar is
called as
C : Unrestricted grammar
D : Phrase grammar
Q.no 53. Consider the following regular expressions. i) (a+b)* ii) (a*+b*)* iii) ((ϵ+a)b*)*
Which of the following statements is correct?
Q.no 54. From the options given below the statement, which is not necessarily true if X1 is the recursive
language and X2 and X3 are the languages that are recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
Q.no 55. The regular expression for all strings of 0′s and 1′s with no two consecutive 0′s is
A : (0+1)
B : (0+1)*
C:
D : (0+1)* 011
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 57. Choose the correct option for the given statement: The DFA shown represents all strings
A : Correct
C : Wrong proposition
D : May be correct
Q.no 58. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A : any palindrome
A : I and II
B : I and IV
C : II and III
D : II and IV
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/16
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : leftmost derivation
B : rightmost derivation
Q.no 2. Which of the following statement is true? (a) Turing machine was developed by Alan Turing,
(b) PDA is less powerful than Turing machine, (c) FA is more powerful than TM
A : Only (a)
B : Only (b)
D : Only (c)
A : Regular Language
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : Non-Regular Language
C : May be Regular
D : Cannot be said
Q.no 4. If the PDA does not stop on an accepting state and the stack is not empty, the string is
A : rejected
D : accepted
C : Computability
D : All of these
Q.no 7. Identify the problem: Given a graph G = <V, E>, and a starting node a, does it have a tour cost
less than k?
A : Satisfiability
B : Independent set
C : Node-Cover Problem
A : input symbol
B : stack symbol
C : output symbol
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : tape symbol
A : Captal Letters
B : Small Letters
C : Italic Letters
D : Roman Letters
C : Turing machine rejects if the input does not belong to the language
Q.no 11. To which of the following class does a CNF-satisfiability problem belong?
A : NP class
B : P class
C : NP complete
D : NP hard
Q.no 12. The Grammar can be defined as: G= (V, T, P, S) In the given definition, what does S
represents?
A : Accepting State
B : Starting Variable
C : Sensitive Grammar
D : Final state
Q.no 13. The transition a Push down automaton makes is additionally dependent upon the:
A : Current State
B : input tape
C : stack
D : terminals
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 14.
Q.no 15. 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
A : R = QP*
B : R = P*Q
C : R = RP
D : R = QP
A : Its memory
B : number of states
C : start state
D : input symbols
Q.no 17. Which one of the following is the most powerful method?
A : LL(1)
B : SLR
C : CLR
D : LALR
A : Finite
B : Infinite
C : May be finite
D : One
Q.no 19. Which of the production rule can be accepted by Chomsky grammar. (i) A->BC, (ii) A->a
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : only i
B : only ii
C : both i and ii
D : neither i nor ii
Q.no 20. If there exists a language L, for which there exists a TM, T, that accepts every word in L and
either rejects or loops for every word that is not in L, is called
A : Recursive
B : Recursively Enumerable
C : NP-HARD
D : NP Complete
Q.no 22. Which of the following pairs have DIFFERENT expressive power?
B : Deterministic push down automata (DPDA) and Non-deterministic pushdown automata (NPDA)
Q.no 23. Which of the following represents a language which has no pair of consecutive 1’s if alphabet =
{0,1}?
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 25. Which of the regular expressions corresponds to the given problem statement over the
alphabet = {a, b}, All strings in which the total number of a’s is divisible by 2.
A : ((a+b)(a+b))*
B : (a + ab)*
C : ( b* a b*ab*)* + b*
D : a* b (aa)*b a*
Q.no 27. The minimum number of 1’s to be used in a regular expression of the given language of all
strings containing exactly 2 zeroes.
A:2
B:3
C:0
D:1
B : stack alphabet
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : transition function
Q.no 29. Which of the regular expressions corresponds to the given problem statement over the
alphabet = {a, b}, All strings in which any occurrence of the symbol b, is in groups of odd numbers.
A : (abbb)*
B : a* b (bb)* a*
C : ((a+b)(a+b)(a+b))*
D : a* b* (bb)* a*
A : 2,4
B : 1,3
C : 1, 2, 3, 4
D : 2, 3, 4
Q.no 31. The set of all strings over alphabet = {a,b} in which all strings having bbbb as substring is
B : (a+b)* bb (a+b)*bb
C : bbb(a+b)*
D : bb (a+b)*
Q.no 32. Identify the following problem: If G=(V, E) and V' is subset of V, then V' is an independent set
iff no two nodes in V' are connected by an edge in E.
A : Satisfiability
B : Independent set
C : Node-Cover Problem
Q.no 33. Which of the following pairs have different expressive power
B : Deterministic Push Down Automata (DPDA) and Non-deterministic Push Down Automata (NPDA)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 34. The maximum number of transitions which can be performed over a state in a DFA having
alphabet set a,b,c are
A:1
B:2
C:3
D:4
Q.no 35. Turing machine (TM) is more powerful than FSM (Finite State Machine) because
Q.no 36. For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice versa.
A : true
B : false
C : maybe
D : probably
A : Every language that is defined by regular expression can also be defined by finite automata
B : Every language defined by finite automata can also be defined by regular expression
Q.no 39. The production of the form A->B , where A and B are non terminals is called
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Null production
C : Unit production
Q.no 40.
A : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the right movement.
B : Perform the transition from q0 to q1 by changing "X" symbol to "a" and perform the right movement.
C : Perform the transition from q0 to q1 by changing "a" symbol to "X" and perform the Left movement.
D : Perform the transition from q0 to q1 by changing "q0" symbol to "q1" and perform the right movement.
A:
B:
C:
D:
Q.no 43.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : X is decidable
A : any palindrome
Q.no 45.
B : X is decidable
Q.no 46. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-blank symbols
does not contain any blank symbols B in between. Consider Alphabet {a,b}.
A:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:
C:
D:
Q.no 47. The regular expression denotes a language comprising all possible strings of even length over
the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
A : Only II
B : Only III
C : Only I and II
Q.no 50. Find the pair of regular expressions that are equivalent
Q.no 51. From the options given below the statement, which is not necessarily true if X1 is the recursive
language and X2 and X3 are the languages that are recursively enumerable but not recursive.
A:
B:
C : X2 – X1 is recursively enumerable
D : X1 – X3 is recursively enumerable
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 52. The CFG "S-> aS | bS |a|b " is equivalent to regular expression
A : (a + b)
B : (a + b) (a + b)*
C : (a + b) (a + b)
D : (a . b) (a . b)
Q.no 53.
A : There exist context-free languages such that all context free grammars generating them are ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of the language
generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 55. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 57.
A:A
B:B
C:C
D:D
Q.no 58. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/15
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 59. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
Q.no 60. The set of all strings over alphabet ={a,b} in which a single a followed by any number of b’s or
a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
D : (a+b)(a+b)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/15
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Recursive language
C : Regular language
A : Type 0 grammar
B : Type 1 grammar
C : Type 2 grammar
D : Type 3 grammar
A : Its memory
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : number of states
C : start state
D : input symbols
A : Epsilon-reachable states
B : initial state
C : Final state
D : Non-final states
Q.no 5. Which of the following correctly recognize the symbol ‘|-‘ in context to PDA?
A : moves
B : transition function
C : or symbol
D : not symbol
C : Converting from Mealy into Moore machine and vice versa is not possible
Q.no 7. Which of the following case does not exist in complexity theory?
A : Best case
B : Worst case
C : Average case
D : Null case
A : input symbol
B : stack symbol
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : output symbol
D : tape symbol
A : intractable
B : tractable
C : decision
D : complete
A : Push
B : Pop
D : Read
A : Finite
B : Infinite
C : May be finite
D : One
A : LL(K)
B : LR(K)
C : SLR(K)
D : CLR(K)
A : {x,y}
B : {xy}
C : {x}
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 3/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : {y}
Q.no 14. 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.
A : Turing acceptable
B : Decidable
C : Undecidable
D : NP-HARD
A : accepted by DFA
B : accepted by PDA
C : accepted by LBA
A : x+1
B:x
C : x-1
D : x2
A : regular language
D : unrestricted language
Q.no 18.
A : L*
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 4/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:L
D:
A : decidable
B : Undecidable
C : sometimes decidable
D : infinite
Q.no 21. Which of the following pairs have different expressive power
B : Deterministic Push Down Automata (DPDA) and Non-deterministic Push Down Automata
(NPDA)
Q.no 22. The difference between number of states in FA for regular expression (a + b) and (a + b)
* is:
A:1
B:2
C:3
D:0
A : Yes
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : No
C : May be
D : Cannot be determined
Q.no 24. Is the language preserved in all the steps while eliminating epsilon transitions from a
NFA?
A : yes
B : no
C : may be
D : cannot say
Q.no 25. According to Chomsky hierarchy, which of the following is recognized by Recursively
Enumerable language?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
A : Set of Nonterminals
B : Start symbol
C : Set of terminals
D : Production
Q.no 27. X is a simple mathematical model of a computer. X has unrestricted and unlimited
memory. X is a FA with R/W head. X can have an infinite tape divided into cells, each cell
holding one symbol.
Name X?
C : Turing machines
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 28. The automaton which allows transformation to a new state without consuming any
input symbols:
A : NFA
B : DFA
C : Epsilon NFA
D : PDA
A:1
B:2
C:3
D:4
A : Empty variable
B : Nullable variable
C : Non-empty variable
D : Non-nullable variable
Q.no 31. PDA works as Finite Automata when the number of auxiliary memory it has is
A:3
B:2
C:1
D:0
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 33. How many strings of length less than 4 contain the language described by the regular
expression (x+y)*y(a+ab)*
A:7
B : 10
C : 12
D : 11
Q.no 34. The operations of PDA never work on elements other than top of the stack.
A : false
B : true
C : may be
D : cannot say
Q.no 35. What does it mean when we say that an algorithm X is asymptotically more efficient
than Y?
Q.no 36. A context free language is called ambiguous if (a) It has two or more leftmost
derivations for the same string. (b) It has two or more rightmost derivations for the same string.
(c) It has Only single derivation tree.
A : Only (a)
B : Only (b)
D : Only (c)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 38. Which of the following is analogous to the NFA and NPDA ?
D : Unrestricted language
Q.no 39. The problem of finding a path in a graph that visits every vertex exactly once is called
Q.no 40. Number of states required to accept strings ending with 10 are
A:3
B:2
C:1
D : can’t be represented.
Q.no 41. Construct the regular expressions for the following DFAs:
A : (0 + 11*0)*
B : 0*+010*
C : (0+010)*
D : (0+1)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 42. Choose the correct option for the given statement: The DFA shown represents all strings
A : Correct
C : Wrong proposition
D : May be correct
Q.no 44. Examine the following DFA: If input is 011100101, which edge is NOT traversed?
A:AB
B:BD
C:CD
D:DA
Q.no 45. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A:
B:
C:
D:
Q.no 46. Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2
is undecidable. Which one of the following is True?
A : P3 is decidable if P1 is reducible to P3
B : P3 is undecidable if P3 is reducible to P2
C : P3 is undecidable if P2 is reducible to P3
Q.no 47.
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 48. Construct a Turing machine which accepts a string with ‘aba’ as its substring.
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
A : There exist context-free languages such that all context free grammars generating them are
ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of the
language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
A : ababbbbab
B : abbbab
C : ababbabbbab
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : ababbbbbab
A:
B:
C:
D:
Q.no 52. The lexical analysis for a modern computer language such as Java needs the power of
which one of the following machine models in a necessary and sufficient sense?
D : Turing machine
A:
B:
C:
A : any palindrome
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Copies a symbol
B : Reverses a string
C : Accepts a palindrome
A : Only II
B : Only III
C : Only I and II
Q.no 57. The regular expression denotes a language comprising all possible strings of even length
over the alphabet (0, 1)
A : 1 + 0(1+0)*
B : (0+1) (1+0)*
C : (1+0)
D : (00+0111+10)*
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/16
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 58.
B : X is decidable
Q.no 59. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
B:5
C:7
D:2
Q.no 60. Out of the three problems S, Q and R, S is an NP-complete problem and Q and R are
the two other problems not known to be in NP. Which one of the following statements is true if Q
is polynomial time reducible to S and S is the polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 16/16
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Seat No -
Total number of questions : 60
10270_THEORY OF COMPUTATION
Time : 1hr
Max Marks : 50
N.B
1) All questions are Multiple Choice Questions having single correct option.
7) Use only black/blue ball point pen to darken the appropriate circle.
A : Regular
B : Recursively Enumerable
C : Context free
D : Context sensitive
A:6
B:7
C:8
D:5
A : yes
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 1/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : no
C : maybe
D : never
Q.no 4. Which of the production rule can be accepted by Chomsky grammar. (i) A->BC, (ii) A->a
A : only i
B : only ii
C : both i and ii
D : neither i nor ii
A : Always
B : Never
C : Sometimes
D : Everytime
Q.no 6. In Moore machine, if input is of length n, then length of output string will be
A:n
B : n+1
C : n+n
D : n-1
Q.no 7. If the PDA does not stop on an accepting state and the stack is not empty, the string is
A : rejected
D : accepted
A : intractable
B : tractable
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 2/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : decision
D : complete
Q.no 9. Which one of the following languages over the alphabet {0, 1} is described by the regular
expression: (0+1)*0(0+1)*0(0+1)*
D : The set of all strings that begin and end with either 0 or 1
A : Turing Machine
B : Finite Automata
Q.no 12.
A : L*
B:
C:L
D:
B : may be different
C : must be different
D : cannot say
Q.no 14. The major difference between Mealy and Moore machine is about:
A : Output Variations
B : Input Variations
C : Both
D : Transitions
A : Terminals
B : Variables
C : Start Symbol
D : Productions
A : Kleene plus +
B : Kleene star *
C : Question mark ?
D : Union
A : R+
B : R-
C : R+ U R-
D:R
Q.no 18. Which among the following cannot be accepted by a regular grammar?
D : L is a set of 0^n1^n
Q.no 19. Given the expression, is there some assignment of true and false values to the variables
that will make the entire expression true? This is termed as
A : Satisfiability problem
C : Node-Cover Problem
Q.no 20. 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
A : R = QP*
B : R = P*Q
C : R = RP
D : R = QP
A : Yes
B : No
C : May be
D : Cannot be determined
Q.no 22. The problem of finding a path in a graph that visits every vertex exactly once is called
A : false
B : true
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 5/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : may be
D : cannot say
Q.no 24. For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice versa.
A : true
B : false
C : maybe
D : probably
C : Given two arbitrary context-free grammars G1 G2 and it is undecidable whether L (G1) = L (G2).
Q.no 26.
A:
B:
C:
D:
Q.no 27. Which of the following represents a language which has no pair of consecutive 1’s if
alphabet = {0,1}?
A:
B:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 6/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C:
D:
Q.no 28. If there exists a TM which when applied to any problem in the class, terminates, if
correct answer is yes and may or may not terminate otherwise is called
A : Stable
B : Unsolvable
C : Partially solvable
D : Unstable
Q.no 29. Which of the following pairs have different expressive power
B : Deterministic Push Down Automata (DPDA) and Non-deterministic Push Down Automata
(NPDA)
Q.no 30. Which of the regular expressions corresponds to the given problem statement over the
alphabet = {a, b}, All strings without double a?
A:
B : ((a+b)(a+b))*
C : (a + bb)*
D:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 7/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : never
B : not always
C : always
D : maybe
A : Compiler Design
B : Grammar Parsers
C : Text Search
D : Image processing
A : All Regular grammars are context free but not vice versa
B : All context free grammars are regular grammars but not vice versa
C : Regular grammar and context free grammar are the same entity
D : All context sensitive grammar are regular grammar but not vice versa
D : current state
A : Empty
B : abcabc
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 8/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
C : b*c|a
D : abc
A : lexical analysis
B : syntax analysis
C : semantic analysis
D : code generation
Q.no 38. Construct a regular expression for the language that contains strings having even
number of 0’s followed by odd number of 1’s over {0, 1}.
A : (00)* 1 (11)*
B : ((0+1)(0+1))*
C : (0+1)*
D : (001)*
C : Palindrome string
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 9/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : There exist context-free languages such that all context free grammars generating them are
ambiguous.
B : An unambiguous context free grammar always has a unique parse tree for each string of the
language generated by it.
C : Both deterministic and non deterministic PDA always accet same set of languages.
Q.no 42. Which Transition table of Turing Machine is correct to check well formedness of
parentheses?
A:
B:
C:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 10/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D:
Q.no 43. The minimum number of productions required to produce a language consisting of
palindrome strings (even and odd length) over T={a,b} is
A:3
B:5
C:7
D:2
A : any palindrome
Q.no 45. Find the pair of regular expressions that are equivalent
Q.no 46. The set of all strings over alphabet ={a,b} in which a single a followed by any number of
b’s or a single b followed by any number of a’s is
A : ab* + ba*
B : ab*ba*
C : a*b + b*a
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 11/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
D : (a+b)(a+b)*
Q.no 47. Which Transition table of Turing Machine is correct for the following problem
"Design a TM to find 2's complement of a binary number".
A:
B:
C:
D:
Q.no 48. The context free languages are closed under (a) union, (b) concatenation, (c) Kleen
closure
A : Only (a)
B : Only (b)
C : Only (c)
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 12/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
A : Copies a string
B : Delete a symbol
C : Insert a symbol
Q.no 50. Which Transition Diagram is correct for the following problem
"Design a TM that erases all non blank symbols on the tape, where the sequence of non-blank
symbols does not contain any blank symbols B in between. Consider Alphabet {a,b}.
A:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 13/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B:
C:
D:
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 14/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
Q.no 51.
A:A
B:B
C:C
D:D
Q.no 53. The language A-> tB|t generated by which of the following grammar?
A : Type 3
B : Type 2
C : Type 1
D : Type 0
Q.no 54. Which grammar accepts the language of {a, b} having strings ending with 'a'.
A : S->aS | bS
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 15/17
12/27/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1
B : S->aS | bS |b
C : S->aS | bS |S
D : S->aS | bS |a
Q.no 55. Out of the three problems S, Q and R, S is an NP-complete problem and Q and R are
the two other problems not known to be in NP. Which one of the following statements is true if Q
is polynomial time reducible to S and S is the polynomial time reducible to R?
A : Q is NP-complete
B : R is NP-complete
C : Q is NP-hard
D : R is NP-hard
Q.no 57. The problems which have no algorithm, regardless of whether or not they are accepted
by a turing machine that fails to halt on some input are referred as:
A : Decidable
B : Undecidable
C : Computable
D : Recognizable
A : Only II
B : Only III
C : Only I and II
Q.no 59. Which of the following grammars are in Chomsky Normal Form:
A : S->AB | BC | CD,
A->0,
B->1,
C->2,
D->3
B : S->AB,
S->BCA | 0 | 1 | 2 | 3
C : S->Ab0,
A->001,
B->A2
D : SA->Aba,
A->aab,
B->Ac
Q.no 60.
B : X is decidable
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=1550&code=1052000&showTest=320&actForm=edit&set=1 17/17
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 1/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 3/4
12/27/2020 https://sppu.wheebox.com/WAC-3/openanswers.obj
https://sppu.wheebox.com/WAC-3/openanswers.obj 4/4