TOC Part-2
TOC Part-2
Answer: d Answer: a
Explanation: The following are the notions to Explanation: Yes, they are equivalent. Both the
terminologies represent the two approaches of 10. Which of the following the given language
recursive inferencing. belongs to?
6. A->aA| a| b L={ambmcm| m>=1}
The number of steps to form aab: a) Context free language
a) 2 b) Regular language
b) 3 c) Both (a) and (b)
c) 4 d) None of the mentioned
d) 5
Answer: d
Answer: b Explanation: The given language is neither
Explanation: A->aA=>aaA=>aab accepted by a finite automata or a push down
7. An expression is mentioned as follows. Figure automata. Thus, it is neither a context free language
out number of incorrect notations or symbols, such nor a regular language.
that a change in those could make the expression 11. Choose the correct option:
correct. Statement: There exists two inference approaches:
L(G)={w in T*|S→*w} a) Recursive Inference
a) 0 Errors b) Derivation
b) 1 Error a) true
c) 2 Error b) partially true
d) Invalid Expression c) false
d) none of the mentioned
Answer: a
Explanation: For the given expression, L(G)={w in Answer: a
T*|S→*w}, If G(V, T, P, S) is a CFG, the language Explanation: We apply the productions of a CFG to
of G, denoted by L(G), is the set of terminal strings infer that certain strings are in a language of certain
that have derivations from the start symbol. variable.
8. The language accepted by Push down 12. Choose the correct option:
Automaton: Statement 1: Recursive Inference, using
a) Recursive Language productions from head to body.
b) Context free language Statement 2: Derivations, using productions from
c) Linearly Bounded language body to head.
d) All of the mentioned a) Statement 1 is true and Statement 2 is true
b) Statement 1 and Statement 2, both are false
Answer: b c) Statement 1 is true and Statement 2 is false
Explanation: Push down automata accepts context d) Statement 2 is true and Statement 1 is true
free language.
9. Which among the following is the correct option Answer: b
for the given grammar? Explanation: Both the statements are false.
G->X111|G1,X->X0|00 Recursive Inference, using productions from body
a) {0a1b|a=2,b=3} to head. Derivations, using productions from head
b) {0a1b|a=1,b=5} to body.
c) {0a1b|a=b} 13. Which of the following statements are correct
d) More than one of the mentioned is correct for a concept called inherent ambiguity in CFL?
a) Every CFG for L is ambiguous
Answer: a b) Every CFG for L is unambiguous
Explanation: Using the recursive approach, we can c) Every CFG is also regular
conclude that option a is the correct answer, and its d) None of the mentioned
not possible for a grammar to have more than one
language.
Answer: a Answer: d
Explanation: A CFL L is said to be inherently Explanation: The following is a theorem which
ambiguous if every CFG for L is ambiguous. states the closure property of context free languages
14. Which of the theorem defines the existence of which includes Kleene operation, Union operation
Parikhs theorem? and Dot operation.
a) Parikh’s theorem 4. For the given Regular expression, the minimum
b) Jacobi theorem number of variables including starting variable
c) AF+BG theorem required to derive its grammar is:
d) None of the mentioned (011+1)*(01)*
a) 4
Answer: a b) 3
Explanation: Rohit Parikh in 1961 proved in his c) 5
MIT research paper that some context free d) 6
language can only have ambiguous grammars.
Answer: c
. Explanation: The grammar can be written as:
S->BC
Sentential Forms “Sentential Forms”. B->AB|ε
1. State true or false: A->011|1
Statement: Every right-linear grammar generates a C->DC|ε
regular language. D->01
a) True 5. For the given Regular expression, the minimum
b) False number of terminals required to derive its grammar
is:
Answer: a (011+1)*(01)*
Explanation: A CFG is said to right linear if each a) 4
production body has at most one variable, and that b) 3
variable is at the right end. That is, all productions c) 5
of a right linear grammar are of the form A->wB or d) 6
A->w, where A and B are variables while w is
some terminal. Answer: b
2. What the does the given CFG defines? Explanation: The grammar can be written as:
S->aSbS|bSaS|e and w denotes terminal S->BC
a) wwr B->AB|ε
b) wSw A->011|1
c) Equal number of a’s and b’s C->DC|ε
d) None of the mentioned D->01
6. A grammar G=(V, T, P, S) is __________ if
Answer: c every production taken one of the two forms:
Explanation: Using the derivation approach, we can B->aC
conclude that the given grammar produces a B->a
language with a set of string which have equal a) Ambiguous
number of a’s and b’s. b) Regular
3. If L1 and L2 are context free languages, which c) Non Regular
of the following is context free? d) None of the mentioned
a) L1*
b) L2UL1 Answer: b
c) L1.L2 Explanation: The following format of grammar is
d) All of the mentioned of Regular grammar and is a part of Context free
grammar i.e. like a specific form whose finite the variables in the question and check if it satisfies
automata can be generated. or not.
7. Which among the following is a CFG for the
given Language: .
L={x∈{0,1}*|number of zeroes in x=number of
one’s in x} Construction and Yield of a Parse Tree
a) S->e|0S1|1S0|SS “Construction and Yield of a Parse Tree”.
b) S->0B|1A|e A->0S B->1S 1. The most suitable data structure used to represent
c) All of the mentioned the derivations in compiler:
a) Queue
Answer: c b) Linked List
Explanation: We can build context free grammar c) Tree
through different approaches, recursively defining d) Hash Tables
the variables and terminals inorder to fulfil the
conditions. Answer: c
8. Which of the following languages are most Explanation: The tree, known as “Parse tree” when
suitable for implement context free languages ? used in a compiler, is the data structure of choice to
a) C represent the source program.
b) Perl 2. Which of the following statement is false in
c) Assembly Language context of tree terminology?
d) None of the mentioned a) Root with no children is called a leaf
b) A node can have three children
Answer: a c) Root has no parent
Explanation: The advantage of using high level d) Trees are collection of nodes, with a parent child
programming language like C and Pascal is that relationship
they allow us to write statements that look more
like English. Answer: a
9. Which among the following is the correct Explanation: A node has atmost one parent, drawn
grammar for the given language? above the node, and zero or more children drawn
L={x∈{0,1}*|number of zeroes in x¹number of below. Lines connect parents to children. There is
one’s in x} one node, one root, that has no parent; this node
a) S-> 0|SS|1SS|SS1|S1S appears to be at the top of the tree. Nodes with no
b) S-> 1|0S|0SS|SS0|S0S children are called leaves. Nodes that are not leaves
c) S-> 0|0S|1SS|SS1|S1S are called interior nodes.
d) None of the mentioned 3. In which order are the children of any node
ordered?
Answer: c a) From the left
Explanation: L={0, 1, 00, 11, 001, 010,…} b) From the right
The grammar can be framed as: S-> 0|0S|1SS|SS1| c) Arbitrarily
S1S d) None of the mentioned
10. L={0i1j2k | j>i+k}
Which of the following satisfies the language? Answer: a
a) 0111100 Explanation: The children of a node are ordered
b) 011100 from the left and drawn so. If N is to the left of
c) 0001100 node M, then all the descendents of N are
d) 0101010 considered to be to the left of all the descendents of
M.
Answer: a 4. Which among the following is the root of the
Explanation: It is just required to put the value in parse tree?
a) Production P
b) Terminal T
c) Variable V
d) Starting Variable S
Answer: d
Explanation: The root is labelled by the start
symbol. All the leaves are either labelled by a a
terminal or with e.
5. For the expression E*(E) where * and brackets
are the operation, number of nodes in the respective
parse tree are:
a) 6
b) 7
c) 5
d) 2 a) P->1100
b) P->0110
Answer: b c) P->1100ε
Explanation: d) P->0101
Answer: b
Explanation: The following is a parse tree for the
production 0110 over {0,1}*.
8. A grammar with more than one parse tree is
called:
a) Unambiguous
6. The number of leaves in a parse tree with b) Ambiguous
expression E*(E) where * and () are operators c) Regular
a) 5 d) None of the mentioned
b) 2
c) 4 Answer: b
d) 3 Explanation: A context free grammar G is
ambiguous if there is at least one string in L(G)
Answer: a having two or more distinct derivation trees or
Explanation: equivalently, two or more distinct leftmost
derivations.
9. __________ is the acyclic graphical
representation of a grammar.
a) Binary tree
b) Oct tree
c) Parse tree
d) None of the mentioned
Answer: c Answer: b
Explanation: For a symbol X to be useful, it has to Explanation: It is the basic implication of Parse tree
be both reachable and generating i.e. theorem (assuming CNF). If the height of the parse
S->* aXb -> * w where w belongs to T*. tree is h, then |w| <=2h-1.
3. Which of the following is false for a grammar G 7. If w belongs to L(G), for some CFG, then w has
in Chomsky Normal Form: a parse tree, which tell us the ________ structure of
a) G has no useless symbols w.
b) G has no unit productions a) semantic
c) G has no epsilon productions b) syntactic
d) None of the mentioned c) lexical
d) All of the mentioned
Answer: d
Explanation: G, a CFG is said to be in Chomsky Answer: b
normal form if all its productions are in one of the Explanation: A parse tree or concrete syntactic tree
following form: is an ordered, rooted tree that represents the
A->BC or A->a syntactic structure of a string according to some
4. Given Checklist: context free grammar.
a) G has no useless symbols 8. Which of the following are distinct to parse
b) G has no unit productions trees?
c) G has no epsilon productions a) abstract parse trees
b) sentence diagrams 2. Which of the following parser reaches the root
c) both (a) and (b) symbol of the tree at last?
d) none of the mentioned a) Top down parser
b) Bottom up parser
Answer: c c) TOP down and Bottom up parser
Explanation: Both of the mentioned are different d) None of the mentioned
from parse trees. Sentence diagrams are pictorial
representations of grammatical structure of a Answer: b
sentence. Explanation: Bottom up parser starts from the
9. Choose the correct option: bottom with the string and comes up to the start
Statement: Unambiguity is the ideal structure of a symbolusing a parse tree or a derivation tree.
language. 3. Left corner parsing methof uses which of the
a) true following?
b) partially true a) Top down parser
c) false b) Bottom up parser
d) cant be said c) TOP down and Bottom up parser
d) None of the mentioned
Answer: a
Explanation: Ideally, there should be only one Answer: c
parse tree for each string, i.e. the language should Explanation: It is a hybrid method which works
be unambiguous. bottom up along the left edges of each subtree, and
10. Is the given statement correct? top down on the rest of the parse tree.
Statement: The mere existence of several 4. Which of the following parser performs top
derivations is not an issue, its is the existence of down parsing?
several parse trees that ruins a grammar. a) LALR parser
a) Correct b) LL parser
b) Incorrect c) Recursive Accent parser
d) None of the mentioned
Answer: a
Explanation: It is also true that multiple leftmost or Answer: b
rightmost derivations do cause ambiguity. Explanation: Bottom up parsing is done by shift
Unfortunately, it is not possible to remove the reduce parsers like LALR parsers, Operator
ambiguity always. precedence parsers, simple precedence parsers, etc.
5. Which of the following is true for shift reduce
To practice Automata Theory Question Bank, . parsers?
a) scans and parses the input in one forward pass
Applications-Parsers “Applications-Parsers”. over the text, without any backup.
1. To derive a string using the production rules of a b) a shift command advances in the input stream by
given grammar, we use: one symbol
a) Scanning c) LALR parser
b) Parsing d) All of the mentioned
c) Derivation
d) All of the mentioned Answer: d
Explanation: The mentioned are the correct and
Answer: b proper functions of a shift reduce parsers. The
Explanation: Parsing is required to check the parsing methods are most commonly used for
acceptability of a string. Further, comes the parsing programming languages, etc.
syntactical phase which is taken care by other 6. State true or false:
phases of compiler. Statement: LALR parsers uses tables rather than
mutually recursive functions.
a) true the class of LL-grammars, which are the CFG for
b) false which there exists some positive integer k that
allows a recursive descent parser to decide which
Answer: b production to use by examining only the next k
Explanation: It is exactly the opposite case where tokens of input.
LALR parsers uses mutually recursive functions
instead of tables. It is a simplified version of .
canonical left to right parser.
7. LALR in LALR parser stands for: YACC Parser Generator “YACC Parser
a) Left aligned left right parser Generator”.
b) Look ahead left to right parser 1. YACC is a computer program for ______
c) Language Argument left to right parser operation system.
d) None of the mentioned a) Windows
b) DOS
Answer: c) Unix
Explanation: LALR stands for Look ahead left to d) openSUSE
right parsers. It has more language recognition
power than LR(0) parser. Answer: c
8. Which of the following can be a LALR parser Explanation: YACC technique is a computer code
generator? for the Unix operating system. It is a LALR parser
a) YACC generator, generating a parser, the part of a
b) GNU Bison compiler that tries to make syntactic sense of the
c) YACC and GNU Bison source code.
d) None of the mentioned 2. YACC is an acronym for:
a) Yes Another Compile Compiler
Answer: c b) Yet Another Compile Compiler
Explanation: YACC is a computer code for UNIX c) Yet Another Compiler Compiler
operating system which generates a LALR parser. d) Yes Another Compiler Compiler
On the other hand GNU Bison or Bison can
generate LALR and GLR parsers. Answer: c
9. Which of the following parsers do not relate to Explanation: YACC stands for ‘Yet another
Bottom up parsing? compiler compiler’ and it was developed by
a) LL parser Stephen Johnson in B programming language later
b) Recursive descent parser translated to C.
c) Earley parsers 3. The YACC takes C code as input and
d) All of the mentioned outputs_________
a) Top down parsers
Answer: d b) Bottom up parsers
Explanation: All the following mentioned are top c) Machine code
down parsers and begin their operation from the d) None of the mentioned
starting symbol.
10. Which of the following is true for a predictive Answer: b
parser? Explanation: The YACC takes C code as input and
a) Recursive Descent parser produces shift reduce parsers in C,also known as
b) no backtracking Bottom up parsers which execute C snippets with
c) Recursive Descent parser and no backtracking the associated rule.
d) None of the mentioned 4. The _______ table is created by YACC.
a) LALR parsing
Answer: c b) LL parsing
Explanation: Predictive parsing is possible only for c) GLR parsing
d) None of the mentioned b) False
Answer: a Answer: a
Explanation: LALR parser generator is software Explanation: BNF is a metasyntax used to express
tool that reads a BNF grammar and creates a LALR context free grammar, moreover a formal way to
parser which is capable of parsing files written in express the language.
programming language identified by BNF 9. Which of the following are not used to express
grammar. CFG?
5. The original YACC as written in __________ a) BNF
language b) EBNF, ABNF
a) R programming language c) van Wijngaarden form
b) C programming language d) None of the mentioned
c) B programming language
d) None of the mentioned Answer: d
Explanation: W grammar or van Wijngaarden form
Answer: c is used to define potentially infinite context free
Explanation: Stephen Johnson wrote this parser grammars in a finite number of rules. It is an
generator in B programming language which was example of larger class of affix grammars. This
further modified and written in C, JAVA, Python, technique was used to define the P/L Algol 68.
etc. 10. Which of the following version of Unix came
6. Which of the following is false for B up with YACC first?
programming language? a) V3
a) typeless b) V5
b) influenced by PL/I c) CB UNIX
c) Designed by Dennis Ritchie d) Unix-RT
d) None of the mentioned
Answer: a
Answer: d Explanation: Yacc appeared in version 3 of unix,
Explanation: B was programming language though full description was published by 1975.
designed by Dennis Ritchie and Ken Thompson for
recursive, non numeric, system and language .
softwares. It was a typeless language, everything is
a word. Markup Languages “Markup Languages”.
7. Which of the following is false for BNF? 1. XML is a _________ markup language.
a) BNF means Backus Naur Form a) meta
b) It is a normal form used in Data base b) beta
normalization c) octa
c) It is a notation technique for context free d) peta
grammar
d) None of the mentioned Answer: a
Explanation: Generally speaking, a meta language
Answer: b is a language used to describe a language. XML is a
Explanation: The normal form used in Data base metalanguage that is used to describe a markup
normalization is BCNF i.e. Boyce Codd normal language.
form and NOT Backus Naur Form. 2. XML uses _________ principle to formally
8. State true or false: describe the data.
Statement: BNF is a metasyntax used to express a) DDL
CFG b) DTD
a) True c) DML
d) None of the mentioned electronic markup: presentational, procedural, and
descriptive markup. Examples are XML, HTML,
Answer: b LaTeX, etc.
Explanation: A document type definition (DTD) is 7. troff and nroff are _________ in Unix.
a set of markup declarations that define a document a) functions
type for an SGML-family markup language b) typesetting tools
(SGML, XML, HTML). A Document Type c) System sofwares
Definition (DTD) defines the legal building blocks d) None of the mentioned
of an XML document. It defines the document
structure with a list of legal elements and attributes. Answer: b
3. Which among the following are true for an Explanation: Early examples of computer markup
Extensible markup language? languages can be found in typesetting tools like
a) Human Readable/ Machine Readable troff and nroff in Unix.
b) Extended from SGML 8. SGML stands for:
c) Developed by www consortium a) Standard Generalized Markup Language
d) All of the mentioned b) Standardized General Markup Language
c) Standard General Markup Language
Answer: d d) Standard Generalized Markdown Language
Explanation: XML is an open format markup
language with a filename extension of .xml. Answer: a
4. Which of them have XML as their default Explanation: SGML is an acronym for Standard
format? Generalized Markup Language.
a) iWork 9. Markup Languages are not used for which of the
b) LibreOffice following?
c) OpenOffice a) playlists
d) All of the mentioned b) content syndication
c) user interfaces
Answer: d d) None of these
Explanation: More that hundred of document
formats using XML syntax have been developed, Answer: d
including RSS, Atom, SOAP and XHTML. Explanation: Markup languages originated with
5. A DTD is associated with a XML file by means text documents, but there is an increasing use of
of ___________. mark up language in presentation of other types of
a) Function information, including playlists, vector graphics,
b) user interfaces and web services.
c) Macros 10. Which of the following is incorrect for HTML5
d) None of the mentioned markup construct?
a) start tags: <section>
Answer: b b) end tags: </section>
Explanation: A document type definition defines c) <img src= “abc.jpeg” >ABC</img>
the legal building blocks of an XML document . d) None of the mentioned
6. Which of the following is not an example of
electronic mark up? Answer: d
a) HTML Explanation: All the mentioned options are valid
b) LaTeX HTML5 arguments and executes properly.
c) PostScript
d) None of the mentioned .
Answer: b
Explanation: Regular grammar is a subset of
Context free grammar. The CFGs which produces a
language for which a finite automaton can be
created is called Regular grammar.
10. NPDA stands for 4. A pushdown automata can be defined as: (Q, ∑,
a) Non-Deterministic Push Down Automata G, q0, z0, A, d)
b) Null-Push Down Automata What does the symbol z0 represents?
c) Nested Push Down Automata a) an element of G
d) All of the mentioned b) initial stack symbol
c) top stack alphabet
Answer: a d) all of the mentioned
Explanation: NPDA stands for non-deterministic
push down automata whereas DPDA stands for Answer: d
deterministic push down automata. Explanation: z0 is the initial stack symbol, is an
element of G. Other symbols like d represents the Answer: b
transition function of the machine. Explanation:The possible change in the stack
5. Which of the following correctly recognize the contents is a change in the number of A’s on the
symbol ‘|-‘ in context to PDA? stack.
a) Moves 9. State true or false:
b) transition function Statement: Counter Automaton can exist for the
c) or/not symbol language L={0i1i|i>=0}
d) none of the mentioned a) true
b) false
Answer: a
Explanation: Using this notation, we can define Answer: a
moves and further acceptance of a string by the Explanation: The PDA works as follows. Instead of
machine. saving excess 0’s or 1’s on the stack, we save *’s
6. Which among the following is true for the given and use two different states to indicate which
statement? symbol there is currently a surplus of. The state q0
Statement :If there are strings R and T in a is the initial state and the only accepting state.
language L so that R is prefix of T and R is not 10. Let ∑={0,1}* and the grammar G be:
equivalent to T. S->ε
a) No DPDA can accept L by empty stack S->SS
b) DPDA can accept L by an empty stack S->0S1|1S0
c) L is regular State which of the following is true for the given
d) None of the mentioned a) Language of all and only Balanced strings
b) It contains equal number of 0’s and 1’s
Answer: a c) Ambiguous Grammar
Explanation: If M is a DPDA accepting L by an d) All of the mentioned
empty stsck, R and T are distinct strings in L, and R
is a prefix of T, then the sequence of moves M Answer: d
must make in order to accept R leaves the stack Explanation: A string is said to be balanced if it
empty, since R∈L. But then T cannot be accepted, consist of equal number of 0’s and 1’s.
since M cant move with an empty stack.
7. Which of the following can be accepted by a To practice basic questions and on all areas of
DPDA? Automata Theory, .
a) The set of even length palindrome over {a,b}
b) The set of odd length palindrome over {a,b} From PDA to Grammars “From PDA to
c) {xxc| where c stands for the complement,{0,1}} Grammars”.
d) None of the mentioned 1. The instantaneous PDA is has the following
elements
Answer: d a) state
Explanation: Theorem: The language pal of b) Unconsumed input
palindromes over the alphabet {0,1} cannot be c) stack content
accepted by any finite automaton , and it is d) All of the mentioned
therefore not regular.
8. For a counter automaton, with the symbols A and Answer: d
Z0, the string on the stack is always in the form of Explanation: The instantaneous description of a
__________ PDA is represented by 3 tuple:
a) A (q,w,s)
b) AnZ0,n>=0 where q is the state, w is the unconsumed input and
c) Z0An,n>=0 s is the stack content.
d) None of the mentioned 2. The moves in the PDA is technically termed as:
a) Turnstile
b) Shifter 5. Which of the following assertion is false?
c) Router a) If L is a language accepted by PDA1 by final
d) None of the mentioned state, there exist a PDA2 that accepts L by empty
stack i.e. L=L(PDA1)=L(PDA2)
Answer: a b) If L is a CFL then there exists a push down
Explanation: A turnstile notation is used for automata P accepting CF; ; by empty stack i.e.
connecting pairs od ID’s taht represents one or L=M(P)
many moves of a PDA. c) Let L is a language accepted by PDA1 then there
3. Which of the following option resembles the exist a CFG X such that L(X)=M(P)
given PDA? d) All of the mentioned
Answer: d
Explanation:
All the assertions mentioned are theorems or
corollary.
6. A push down automata can represented using:
a) Transition graph
b) Transition table
c) ID
d) All of the mentioned
a) {0n1n|n>=0}
b) {0n12n|n>=0}
Answer: d
c) {02n1n|n>=0}
Explanation: Yes, a PDA can be represented using
d) None of the mentioned
a transition diagram, transition table and an
instantaneous description.
Answer: a
7. State true or false:
4. Which of the following correctly resembles the
Statement: Every context free grammar can be
given state diagram?
transformed into an equvalent non deterministic
push down automata.
a) true
b) false
Answer: a
Explanation: Push down automata is the automaton
machine for all the context free grammar or Type 2
languages.
8. Which of the following statement is false?
a) For non deterministic PDA, equivalence is
a) {wwr|w=(a+b)*} undecidable
b) ε is called the initial stack symbol b) For deterministic PDA, equivalence is decidable
c) Both (a) and (b) c) For deterministic PDA, equivalence is
d) None of the mentioned undecidable.
d) None of the mentioned
Answer: a
Explanation: Initially we put a special symbol ‘#’
Answer: c
into the empty stack. At state q1, the w is being
Explanation: Geraud proved the equivalence
read. In state q2, each 0 or 1 is popped when it
problem decidable for Deterministic PDA .
matches the input. If any other input is given, the
9. Which of the following are the actions that
PDA will go to a dead state. When we reach that
operates on stack top?
special symbol ‘#’, we go to the accepting state q3.
a) Pushing
b) Popping c) symmetric and transitive
c) Replacing d) none of the mentioned
d) All of the mentioned
Answer: b
Answer: d Explanation: A string w is accepted by a PDA if
Explanation: Push, pop and replace are all the basic and only if (s,w, e) |-* (f, e, e)
and only operations that takes place on stack top. 4. With reference of a DPDA, which among the
10. A push down automata is said to be _________ following do we perform from the start state with
if it has atmost one transition around all an empty stack?
configurations. a) process the whole string
a) Finite b) end in final state
b) Non regular c) end with an empty stack
c) Non-deterministic d) all of the mentioned
d) Deterministic
Answer: d
Answer: d Explanation: The empty stack in the end is our
Explanation: DPDA or Deterministic Push down requirement relative to finite state automatons.
automata has atmost one transition applicable to 5. A DPDA is a PDA in which:
each configuration. a) No state p has two outgoing transitions
b) More than one state can have two or more
. outgoing transitions
c) Atleast one state has more than one transitions
Deterministic PDA “Deterministic PDA” d) None of the mentioned
1. The transition a Push down automaton makes is
additionally dependent upon the: Answer: a
a) stack Explanation: A Deterministic Push Down
b) input tape Automata is a Push Down Automata in which no
c) terminals state p has two or more transitions.
d) none of the mentioned 6. State true or false:
Statement: For every CFL, G, there exists a PDA M
Answer: a such that L(G) = L(M) and vice versa.
Explanation: A PDA is a finite machine which has a) true
an additional stack storage. Its transitions are based b) false
not only on input and the correct state but also on
the stack. Answer: a
2. A PDA machine configuration (p, w, y) can be Explanation: There exists two lemma’s such that:
correctly represented as: a) Given a grammar G, construct the PDA and
a) (current state, unprocessed input, stack content) show the equivalence
b) (unprocessed input, stack content, current state) b) Given a PDA, construct a grammar and show the
c) (current state, stack content, unprocessed input) equivalence
d) none of the mentioned 7. If the PDA does not stop on an accepting state
and the stack is not empty, the string is:
Answer: a a) rejected
Explanation: A machine configuration is an b) goes into loop forever
element of K×Σ*×Γ*. c) both (a) and (b)
(p,w,γ) = (current state, unprocessed input, stack d) none of the mentioned
content).
3. |-* is the __________ closure of |- Answer: a
a) symmetric and reflexive Explanation: To accept a string, PDA needs to halt
b) transitive and reflexive at an accepting state and with a stack empty, else it
is called rejected. Given a PDA M, we can c) Context free language and Context Sensitive
construct a PDA M’ that accepts the same language language
as M, by both acceptance criteria. d) None of the mentioned
8. A language accepted by Deterministic Push
down automata is closed under which of the Answer: a
following? Explanation: All regular languages can be accepted
a) Complement by a non deterministic finite automata and all
b) Union context free languages can be accepted by a non
c) Both (a) and (b) deterministic push down automata.
d) None of the mentioned 2. Let T={p, q, r, s, t}. The number of strings in S*
of length 4 such that no symbols can be repeated.
Answer: a a) 120
Explanation: Deterministic Context free b) 625
languages(one accepted by PDA by final state), are c) 360
drastically different from the context free d) 36
languages. For example they are closed under
complementation and not union. Answer: b
9. Which of the following is a simulator for non Explanation: Using the permutation rule, we can
deterministic automata? calculate that there will be total of 625
a) JFLAP permutations on 5 elements taking 4 as the length.
b) gedit 3. Which of the following relates to Chomsky
c) FAUTO hierarchy?
d) None of the mentioned a) Regular<CFL<CSL<Unrestricted
b) CFL<CSL<Unrestricted<Regular
Answer: a c) CSL<Unrestricted<CF<Regular
Explanation: JFLAP is a software for d) None of the mentioned
experimenting with formal topics including NFA,
NPDA, multi-tape turing machines and L-systems. Answer: a
10. Finite-state acceptors for the nested words can Explanation: The chomsky hierarchy lays down the
be: following order: Regular<CFL<CSL<Unrestricted
a) nested word automata 4. A language is accepted by a push down automata
b) push down automata if it is:
c) NDFA a) regular
d) none of the mentioned b) context free
c) both (a) and (b)
Answer: a d) none of the mentioned
Explanation: The linear encodings of languages
accepted by finite nested word automata gives the Answer: c
class of ‘visibly pushdown automata’. Explanation: All the regular languages are the
subset to context free languages and thus can be
. accepted using push down automata.
5. Which of the following is an incorrect regular
Regular Languages and D-PDA “Regular expression identity?
Languages and D-PDA”. a) R+f=R
1. Which of the following is analogous to the b) eR=e
following? c) Rf=f
:NFA and NPDA d) None of the mentioned
a) Regular language and Context Free language
b) Regular language and Context Sensitive
language
Answer: b 10. The following denotion belongs to which type
Explanation: e is the identity for concatenation. of language:
Thus, eR=R. G=(V, T, P, S)
6. Which of the following strings do not belong the a) Regular grammar
given regular expression? b) Context free grammar
(a)*(a+cba) c) Context Sensitive grammar
a) aa d) All of the mentioned
b) aaa
c) acba Answer: b
d) acbacba Explanation: Ant formal grammar is represented
using a 4-tuple definition where V= finite set of
Answer: d variables, T= set of terminal characters, P=set of
Explanation: The string acbacba is unacceptable by productions and S= Starting Variable with certain
the regular expression (a)*(a+cba). conditions based on the type of formal grammar.
7. Which of the following regular expression
allows strings on {a,b}* with length n where n is a .
multiple of 4.
a) (a+b+ab+ba+aa+bb+aba+bab+abab+baba)* DPDA and Context Free Languages “DPDA and
b) (bbbb+aaaa)* Context Free Languages”.
c) ((a+b)(a+b)(a+b)(a+b))* 1. Context free grammar is called Type 2 grammar
d) None of the mentioned because of ______________ hierarchy.
a) Greibach
Answer: c b) Backus
Explanation: Other mentioned options do not many c) Chomsky
of the combinations while option c seems most d) None of the mentioned
reliable.
8. Which of the following strings is not generated Answer: c
by the given grammar: Explanation: Chomsky hierarchy decide four type
S->SaSbS|e of language :Type 3- Regular Language, Type 2-
a) aabb Context free language, Type 1-Context Sensitive
b) abab Language, Type 0- Unrestricted or Recursively
c) abaabb Ennumerable language.
d) None of the mentioned 2. a→b
Restriction: Length of b must be atleast as much
Answer: d length of a.
Explanation: All the given options are generated by Which of the following is correct for the given
the given grammar. Using the methods of left and assertion?
right derivations, it is simpler to look for string a) Greibach Normal form
which a grammar can generate. b) Context Sensitive Language
9. abb*c denotes which of the following? c) Chomsky Normal form
a) {abnc|n=0} d) Recursively Ennumerable language
b) {abnc|n=1}
c) {anbc|n=0} Answer: b
d) {abcn|n>0} Explanation: A context-sensitive grammar (CSG) is
a formal grammar in which the left-hand sides and
Answer: b right-hand sides of any production rules may be
Explanation: Here, the first mentioned b is fixed surrounded by a context of terminal and non
while the other can be zero or can be repeated any terminal symbols. Context-sensitive grammars are
number of time. more general than context-free grammars, in the
sense that there are some languages that cannot be
described by context-free grammars, but can be A->aaA| ^
described by CSG. B->Bb| ^
3. From the definition of context free grammars, The partial derivation tree can be drawn as:
G=(V, T, P, S)
What is the solution of VÇT?
a) Null
b) Not Null
c) Cannot be determined, depends on the language
d) None of the mentioned
Answer: a
Answer: a
Explanation: Here the production P is from the
Explanation: The grammar for the same language
definition of Context free grammar and thus, has no
can be stated as :
right or left context.
(1) S → aMb
5. There exists a Context free grammar such that:
(2) M → A
X->aX
(3) M → B
Which among the following is correct with respect
(4) A → e
to the given assertion?
(5) A → aA
a) Left Recursive Grammar
(6) B → e
b) Right Recursive Grammar
(7) B → bB
c) Non Recursive Grammar
8. Which of the following is the correct
d) None of the mentioned
representation of grammar for the given regular
expression?
Answer: b
a(aUb)*b
Explanation: The grammar with right recursive
a) (1) S → aMb
production is known as Right recursive grammar.
(2) M → e
Right recursive production is of the form X->aX
(3) M → aM
where a is a terminal and X is a non terminal.
(4) M → bM
6. If the partial derivation tree contains the root as
b) (1) S → aMb
the starting variable, the form is known as:
(2) M → Mab
a) Chomsky hierarchy
(3) M → aM
b) Sentential form
(4) M → bM
c) Root form
c) (1) S → aMb
d) None of the mentioned
(2) M → e
(3) M → aMb
Answer: b
(4) M → bMa
Explanation: Example: For any grammar,
d) None of the mentioned
productions be:
S->AB
Answer: a d) All of the mentioned
Explanation:
The basic idea of grammar formalisms is to capture Answer: d
the structure of string by Explanation:
a) using special symbols to stand for substrings of a Context-free grammars are strictly more powerful
particular structure than regular expressions:
b) using rules to specify how the substrings are 1) Any language that can be generated using
combined to form new substrings. regular expressions can be generated by a context-
9. A CFG consist of the following elements: free grammar.
a) a set of terminal symbols 2) There are languages that can be generated by a
b) a set of non terminal symbols context-free grammar that cannot be generated by
c) a set of productions any regular expression.
d) all of the mentioned As a corollary, CFGs are strictly more powerful
than DFAs and NDFAs.
Answer: d 2. State true or false:
Explanation: A CFG consists of: S-> 0S1|01
a) a set of terminals, which are characters of Statement: No regular expression exists for the
alphabets that appear in the string generated by the given grammar.
grammar. a) true
b) a set of non terminals, which are placeholders b) false
for patterns of terminal symbols that can be
generated by the nonterminal symbols. Answer: a
c) a set of productions, which are set of rules to Explanation: The grammar generates a language L
transit from one state to other forming up the string such that L={0n1n|n>=1} which is not regular.
d) a start symbol, a special non terminal symbol Thus, no regular expression exists for the same.
that appears in the initial string generated in the 3. For the given set of code, the grammar
grammar. representing real numbers in Pascal has error in one
10. A CFG for a program describing strings of of the six lines. Fetch the error.
letters with the word “main” somewhere in the (1) ->
string: (2) -> | epsilon
a) -> m a i n (3) -> | epsilon
-> | epsilon (4) -> ‘E’ | epsilon
-> A | B | … | Z | a | b … | z (5) -> + | – | epsilon
b) –> m a i n (6) -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
–> a) 3
–> A | B | … | Z | a | b … | z b) 4
c) –> m a i n c) 2
–> | epsilon d) No errors
–> A | B | … | Z | a | b … | z
d) None of the mentioned Answer: a
Explanation:
–>
. –> | epsilon
–> ‘.’ | epsilon
DPDA and Ambiguous Grammars “DPDA and –> ‘E’ | epsilon
Ambiguous Grammars”. –> + | – | epsilon
1. CFGs are more powerful than: –> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
a) DFA 4. Which among the following is incorrect with
b) NDFA reference to a derivation tree?
c) Mealy Machine a) Every vertex has a label which is a terminal or a
variable. Removal of Unit productions and c) Removal of
b) The root has a label which can be a terminal. Null productions.
c) The label of the internal vertex is a variable. 8. Which of the following are context free
d) None of the mentioned language?
a) L={aibi|i>=0}
Answer: b b) L={wwr| w is a string and r represents reverse}
Explanation: The root or interms of the grammar, c) Both (a) and (b)
starting variable can not be a terminal. d) one of the mentioned
5. Let G=(V, T, P, S)
where a production can be written as: Answer: a
S->aAS|a 9. The language L ={ai2bi|i>=0} is:
A->SbA|ba|SS a) recursive
Which of the following string is produced by the b) deterministic CFL
grammar? c) regular
a) aabbaab d) Two of the mentioned is correct
b) aabbaa
c) baabab Answer: d
d) None of the mentioned Explanation: The language is recursive and every
recursive language is a CFL.
Answer: b 10. L->rLt|tLr|t|r
Explanation: The step wise grammar translation The given grammar produces a language which is:
can be written as: a) All palindrome
aAS->aSbaA->aabAS->aabbaa b) All even palindromes
6. Statement 1: Ambiguity is the property of c) All odd palindromes
grammar but not the language. d) Strings with same begin and end symbols
Statement 2: Same language can have more than
one grammar. Answer: c
Which of the following options are correct with Explanation: As there exists no production for the
respect to the given statements? palindrome set, even palindromes like abba,
a) Statement 1 is true but statement 2 is false aabbaa, baaaaaab, etc will not be generated.
b) Statement 1 is false but statement 2 is true
c) Both the statements are true .
d) Both the statements are false
Automata Theory Assessment Questions This set
Answer: c of Automata Theory Assessment Questions and
Explanation: One language can more than one focuses on “CFG-Eliminating Useless Symbols”.
grammar. Some can be ambiguous and some 1. Suppose A->xBz and B->y, then the simplified
cannot. grammar would be:
7. Which of the following are non essential while a) A->xyz
simplifying a grammar? b) A->xBz|xyz
a) Removal of useless symbols c) A->xBz|B|y
b) Removal of unit productions d) none of the mentioned
c) Removal of null production
d) None of the mentioned Answer: a
Explanation: For the first step, substitute B in first
Answer: d production as it only produces terminal and remove
Explanation: Here are some process used to B production as it has already been utilized.
simplify a CFG but to produce an equivalent We get A->xBz|xyz and now, as B has no
grammar: production, we eliminate the terms which hold the
a) Removal of useless symbols(non terminal) b) variable B, thus the answer remain A->xyz.
2. Given Grammar: S->A, A->aA, A->e, B->bA B->aa
Which among the following productions are C->aCb
Useless productions? Find the set of variables thet can produce strings
a) S->A only with the set of terminals.
b) A->aA a) {C}
c) A->e b) {A,B}
d) B->bA c) {A,B,S}
d) None of the mentioned
Answer: d
Explanation: Some derivations are not reachable Answer: c
from the starting variable. As B is not reachable Explanation: First step: Make a set of variables that
from the starting variable, it is a useless symbol and directly end up with a terminal
thus, can be eliminated. Second step: Modify the set with variables that
3. Given: produce the elements of above
S->…->xAy->…->w generated set.
if ____________, then A is useful, else useless The rest variables are termed as useless.
symbol. 6. Given grammar:
a) A is a non terminal S->aS|A
b) A is a terminal A->a
c) w Î L B->aa
d) w Ë L Find the number of variables reachable from the
Starting Variable?
Answer: c a) 0
Explanation: Whatever operation we perform in b) 1
intermediate stages, if the string produced belongs c) 2
to the language, A is termed as useful and if not, d) None of the mentioned
not a useful variable.
4. Given: Answer: b
S->aSb Explanation: Use a dependency graph to find which
S->e variable is reachable and which is not.
S-> A
A->aA
B->C
C->D
The ratio of number of useless variables to number
of useless production is:
a) 1
7. Inorder to simplify a context free grammar, we
b) 3/4
can skip the following operation:
c) 2/3
a) Removal of null production
d) 0
b) Removal of useless symbols
c) Removal of unit productions
Answer: a
d) None of the mentioned
Explanation: A, B, C, D are the useless symbols in
the given grammar as they never tend to lead to a
Answer: d
terminal. The productions S-> A, A->aA, B->C, C-
Explanation: Inorder to simplify the grammar all of
>D are also termed as useless production as they
the process including the removal of null
will never produce a string to the grammar.
productions, unit productions and useless symbols
5. Given grammar G:
is necessary.
S->aS|A|C
8. Given a Grammar G:
A->a
S->aA
A->a d) None of the mentioned
A->B
B->A Answer: a
B->bb Explanation: We use the concept of dependency
Which among the following will be the simplified graph inorder to check, whether any of the variable
grammar? is reachable from the starting variable or not.
a) S->aA|aB, A->a, B->bb 2. The variable which produces an epsilon is called:
b) S->aA|aB, A->B, B->bb a) empty variable
c) S->aA|aB, A->a, B->A b) nullable
d) None of the emntioned c) terminal
d) all of the mentioned
Answer: a
Explanation: Step 1: Substitute A->B Answer: b
Step 2: Remove B->B Explanation: Any variable A for which the
Step 3: Substitute B->A derivation: A->*e is possible is called Nullable.
Step 4: Remove Repeated productions 3. Statement:
9. Simplify the given grammar: For A-> e ,A can be erased. So whenever it appears
A-> a| aaA| abBc on the left side of a production, replace with
B-> abba| b another production without the A.
a) A-> a| aaA| ababbAc| abbc State true or false:
b) A-> a| aaA| ababbAc| abbc, B-> abba|b a) true
c) A-> a| aaA| abbc, B->abba b) false
d) None of the mentioned
Answer: b
Answer: a Explanation: A can be erased. So whenever it
Explanation: Using the substitution rules, we can appears on the right side of the production, replace
simply eradicate what is useless and thus produce with another production without the A.
the simplified result i.e. A-> a| aaA| ababbAc| abbc. 4. Simplify the given grammar:
10. In context to the process of removing useless S->aXb
symbols, which of the following is correct? X->aXb | e
a) We remove the Nullable variables a) S->aXb | ab, X-> aXb | ab
b) We eliminate the unit productions b) S->X | ab, X-> aXb | ab
c) We eliminate products which yield no terminals c) S->aXb | ab, X-> S | ab
d) All of the mentioned d) None of the mentioned
Answer: c Answer: a
Explanation: In the process of removal of useless Explanation: As X is nullable, we replace every
symbols, we want to remove productions that can right hand side presence of X with e and produce
never take part in any derivation. the simplified result.
5. Consider the following grammar:
To practice all areas of Automata Theory A->e
Assessment Questions, . B->aAbC
B->bAbA
Eliminating Epsilon Productions “Eliminating A->bB
Epsilon Productions”. The number of productions added on the removal
1. The use of variable dependency graph is in: of the nullable in the given grammar:
a) Removal of useless variables a) 3
b) Removal of null productions b) 4
c) Removal of unit productions c) 2
d) 0 S->ABaC| AaC| ABa| Aa| a| aC| Ba| BaC
A->BC| B| C
Answer: b B->b
Explanation: The modified grammar aftyer the C->D
removal of nullable can be shown as: D-> d
B->aAbC| abC 9. Consider G=({S,A,B,E}, {a,b,c},P,S), where P
B->bAbA| bbA| bAb| bb consists of S →AB, A →a, B →b and E →c.
A->bB Number of productions in P’ after removal of
6. Let G=(V, T, P, S) be a CFG such that useless symbols:
_____________. Then there exists an equivalent a) 4
a) e ∈ L(G)
grammar G’ having no e productions. b) 3
b) w ∉ L(G)
c) 2
c) e ∉ L(G)
d) 5
d) w ∈ L(G) Answer: a
Explanation:
Answer: c P’= S->AB, A->a, B-> b,
V’={S, A, B},
CFG such that e ∉ L(G). Then there exists an
Explanation: Theorem: Let G = (V, T, S, P) be a
∑’={a, b}
equivalent grammar G’ having no e-productions. 10. Given grammar G:
7. For each production in P of the form: S->aS| AB
A-> x1x2x3…xn A-> e
put into P’ that production as well as all those B-> e
generated by replacing null variables with e in all D-> b
possible combinations. If all x(i) are nullable, Reduce the grammar, removing all the e
a) A->e is put into P’ productions:
b) A->e is not put into P’ a) S->aS| AB| A| B, D-> b
c) e is a member of G’ b) S->aS| AB| A| B| a, D-> b
d) None of the mentioned c) S->aS| AB| A| B
d) None of the mentioned
Answer: b
Explanation: It is an exception that A->e is not put Answer: b
into P’ if all x(i) are nullable variables. Explanation: We will replace all the nullables
8. For the given grammar G: wherever they appear in the right hand side of any
S->ABaC production. D will not be erased as we are just
A->BC removing nullable variables not completely
B->b| e simplifying the grammar.
C->D| e
D-> d .
Remove the e productions and generate the number
of productions from S in the modified or simplified Eliminating Unit Productions “Eliminating Unit
grammar. Productions”.
a) 6 1. Which among the following is the format of unit
b) 7 production?
c) 5 a) A->B
d) 8 b) A->b
c) B->Aa
Answer: d d) None of the mentioned
Explanation: The grammar after the removal of
epsilon production can be shown as:
Answer: a simplification is unambiguous, after simplification
Explanation: Any production of the format A-> B will also be unambiguous.
where A and B belongs to the V set, is called Unit 5. If C is A-derivable, C->B is a production, and B
production. ¹ A, then B is
2. Given Grammar G: a) nullable
S->aA b) Non-derivable
A->a| A c) A-derivable
B->B d) None of the mentioned
The number of productions to be removed
immediately as Unit productions: Answer: c
a) 0 Explanation:
b) 1 If A-> B is a production, B is called A- derivable.
c) 2 If C is A-derivable, C->B is a production, and B ¹
d) 3 A, then B is A -derivable.
No other variables are A-derivable.
Answer: c 6. A can be A-> derivable if and only if
Explanation: The productions in the format A-> A ___________.
are removed immediately as they produce self and a) A-> A is actually a production
that is not a terminal or will not lead to a string. b) A->B, B-> A exists
Hence, it is removed immediately. c) Both (a) and (b)
3. Given grammar: d) None of the mentioned
S->aA
A->a Answer: a
A->B Explanation: The format says: If A->B is a
B-> A production, B is called A-derivable.Thus A to be
B->bb A-derivable, a production : A-> A need to exist.
Which of the following is the production of B after 7. Given Grammar:
simplification by removal of unit productions? T-> T+R| R
a) A R-> R*V| V
b) bb V->(T)| u
c) aA When unit productions are deleted we are left with
d) A| bb T-> T+R| _______|(T)| u
R->R*V|(T)| u
Answer: b V-> (T)| u
Explanation: The simplified grammar can be Fill in the blank:
presented as follows: a) T*V
S->aA| aB b) T+V
A->a c) R*T
B-> bb d) R*V
4. If grammar G is unambiguous, G’ produced after
the removal of Unit production will be: Answer: d
a) ambiguous Explanation: The grammar produced after the
b) unambiguous elimination of unit production is:
c) finite T-> T+R| R*V| (T)| u
d) cannot be said R->R*V|(T)| u
V-> (T)| u
Answer: b 8. Given grammar G:
Explanation: With the simplification of Context S-> ABA, A->aA|e, B-> bB|e
free grammars, undesirable properties are Eliminate e and unit productions. State the number
introduced. It says, if grammar G, before of productions the starting variable holds?
a) 6 c) Backus Naur Form
b) 7 d) None of the mentioned
c) 9
d) 5 Answer: b
Explanation: A context free grammar is in Greibach
Answer: b Normal Form if the right hand sides of all the
Explanation: After reduction the grammar looks production rules start with a terminal, optionally
like: followed by some variables.
S->ABA| AB| BA| AA| Aa| a| bB| b 2. Which of the following does not have left
A->aA| a recursions?
B->bB| b a) Chomsky Normal Form
9. Given grammar G: b) Greibach Normal Form
S-> A| B| C c) Backus Naur Form
A-> aAa| B d) All of the mentioned
B-> bB|bb
C->aCaa|D Answer: b
D->baD|abD|aa Explanation: The normal form is of the format:
Eliminate e and unit productions and state the A->aB where the right hand side production tends
number of variables left? to begin with a terminal symbo, thus having no left
a) 5 recursions.
b) 4 3. Every grammar in Chomsky Normal Form is:
c) 3 a) Regular
d) 2 b) context sensitive
c) context free
Answer: 5 d) all of the mentioned
Explanation: The reduced production:
S->aAa| bB|bb aCaa| baD| abD| aa, A->aAa| bB| bb, Answer: c
B->bB| bb, C->aCaa| baD| abD| aa, D-> baD| abD| Explanation: Conversely, every context frr
aa grammar can be converted into Chomsky Normal
10. Which of the following variables in the given form and to other forms.
grammar is called live variable? 4. Which of the production rule can be accepted by
S->AB Chomsky grammar?
A->a a) A->BC
a) S b) A->a
b) A c) S->e
c) B d) All of the mentioned
d) None of the mentioned
Answer: d
Answer: b Explanation: in CNF, the production rules are of
Explanation: Any variable A for which there is a the form:
production A-> x with x Ε Σ* is called live. A->BC
A-> a
. S->e
5. Given grammar G:
Chomsky Normal Form “Chomsky Normal (1)S->AS
Form”. (2)S->AAS
1. The format: A->aB refers to which of the (3)A->SA
following? (4)A->aa
a) Chomsky Normal Form Which of the following productions denies the
b) Greibach Normal Form format of Chomsky Normal Form?
a) 2,4 b) parsed form
b) 1,3 c) normal form
c) 1, 2, 3, 4 d) all of the mentioned
d) 2, 3, 4
Answer: c
Answer: a Explanation: When the production in G satisfy
Explanation: The correct format: A->BC, A->a, X- certain restrictions, then G is said to be in ‘normal
>e. form’.
6. Which of the following grammars are in 10. Let G be a grammar: S->AB|e, A->a, B->b
Chomsky Normal Form: Is the given grammar in CNF?
a) S->AB|BC|CD, A->0, B->1, C->2, D->3 a) Yes
b) S->AB, S->BCA|0|1|2|3 b) No
c) S->ABa, A->aab, B->Ac
d) All of the mentioned Answer: a
Explanation: e is allowed in CNF only if the
Answer: a starting variable does not occur on the right hand
Explanation: We can eliminate the options on the side of the derivation.
basis of the format we are aware of: A->BC, B->b
and so on. .
7. With reference to the process of conversion of a
context free grammar to CNF, the number of Automata Theory Questions for Campus
variables to be introduced for the terminals are: Interviews This set of Automata Theory Questions
S->ABa and for Campus interviews focuses on “Pumping
A->aab Lemma for Context Free Language”.
B->Ac 1. Which of the following is called Bar-Hillel
a) 3 lemma?
b) 4 a) Pumping lemma for regular language
c) 2 b) Pumping lemma for context free languages
d) 5 c) Pumping lemma for context sensitive languages
d) None of the mentioned
Answer: a
Explanation: According to the number of terminals Answer: b
present in the grammar, we need the corresponding Explanation: In automata theory, the pumping
that number of terminal variables while conversion. lemma for context free languages, also kmown as
8. In which of the following, does the CNF the Bar-Hillel lemma, represents a property of all
conversion find its use? context free languages.
a) CYK Algorithm 2. Which of the expressions correctly is an
b) Bottom up parsing requirement of the pumping lemma for the context
c) Preprocessing step in some algorithms free languages?
d) All of the mentioned a) uvnwxny
b) uvnwnxny
Answer: d c) uv2nwx2ny
Explanation: Besides the theoretical significance of d) All of the mentioned
CNF, it conversion scheme is helpful in algorithms
as a preprocessing step, CYK algorithms and the Answer: b
bottom up parsing of context free grammars. Explanation: Let L be a CFL. Then there is an
9. Let G be a grammar. When the production in G integer n so that for any u that belong to language L
satisfy certain restrictions, then G is said to be in satisfying |t| >=n, there are strings u, v, w, x, y and
___________. z satisfying
a) restricted form t=uvwxy
|vwx|<=n For any m>=0, uvnwxny ∈ L
|vx|>0 provides some information about v and x that are
pumped, it says little about the location of these
3.Let L be a CFL. Then there is an integer n so that substrings in the string t. It can be used whenever
for any u that belong to language L satisfying the pumping lemma fails. Example: {apbqcrds|p=0 or
|t|>=n, there are strings u, v, w, x, y and z satisfying q=r=s}, etc.
t=uvwxy. 7. Which of the following cannot be filled in the
Let p be the number of variables in CNF form of blank below?
the context free grammar. The value of n in terms Statement: There are CFLs L1 nad L2 so that
of p : ___________is not a CFL.
a) 2p a) L1∩L2
b) 2p b) L1′
c) 2p+1 c) L1*
d) p2 d) None of the mentioned
Answer: c Answer: c
Explanation: This inequation has been derived from Explanation: A set of context free language is
derivation tree for t which must have height at least closed under the following operations:
p+2(It has more than 2p leaf nodes, and therefore its a) Union
height is >p+1). b) Concatenation
4. Which of the following gives a positive result to c) Kleene
the pumping lemma restrictions and requirements? 8. The pumping lemma is often used to prove that a
a) {aibici|i>=0} language is:
b) {0i1i|i>=0} a) Context free
c) {ss|s∈{a,b}*} b) Not context free
d) None of the mentioned c) Regular
d) None of the mentioned
Answer: b
Explanation: A positive result to the pumping Answer: b
lemma shows that the language is a CFL and ist Explanation: The pumping lemma is often used to
contradiction or negative result shows that the prove that a given language L is non-context-free,
given language is not a Context Free language. by showing that arbitrarily long strings s are in L
5. Using pumping lemma, which of the following that cannot be “pumped” without producing strings
cannot be proved as ‘not a CFL’? outside L.
a) {aibici|i>=0} 9. What is the pumping length of string of length x?
b) {ss|s∈{a,b}*} a) x+1
c) The set legal C programs b) x
d) None of the mentioned c) x-1
d) x2
Answer: d
Explanation: There are few rules in C that are Answer: a
context dependent. For example, declaration of a Explanation: There exists a property of all strings
variable before it can be used. in the language that are of length p, where p is the
6. State true or false: constant-called the pumping length .For a finite
Statement: We cannot use Ogden’s lemma when language L, p is equal to the maximum string
pumping lemma fails. length in L plus 1.
a) true 10. Which of the following does not obey pumping
b) false lemma for context free languages ?
a) Finite languages
Answer: b b) Context free languages
Explanation: Although the pumping lemma c) Unrestricted languages
d) None of the mentioned d) All of the mentioned
Answer: c Answer: d
Explanation: Finite languages (which are regular Explanation: It is a theorem which states that,
hence context free ) obey pumping lemma where as Context free languages are not closed under
unrestricted languages like recursive languages do operations like intersection and complement.
not obey pumping lemma for context free 4. Which of the following is incorrect?
languages. There exists algorithms to decide if:
a) String w is in CFL L
To practice all areas of Automata Theory for b) CFL L is empty
Campus Interviews, . c) CFL L is infinite
d) All of the mentioned
CFL- Closure Properties/Decision Properties
“CFL- Closure Properties/Decision Properties”. Answer: d
1. The context free languages are closed under: Explanation: These properties are termed as
a) Intersection decision properties of a CFL and include a set of
b) Complement problems like infiniteness problem, emptiness
c) Kleene problem and membership problem.
d) None of the mentioned 5. If the start symbol is one of those symbols which
produce no terminal through any sequence, the
Answer: c CFL is said to be
Explanation: Context free languages are closed a) nullable
under the following operation: union, kleene and b) empty
concatenation. For regular languages, we can add c) eliminated
intersection and complement to the list. d) none of the mentioned
2. Given Grammar G1:
S->aSb Answer: b
S->e Explanation: In the process of removing useless
Grammar G2: symbols, if the starting symbol is also a part, the
R->cRd CFL can be then termed as empty; otherwise not.
R->e 6. Using the pumping constant n, If there is a string
If L(G)=L(G1) U L(G2), the number of productions in the language of length between _____ and ____
the new starting variable would have: then the language is infite else not.
a) 2 a) n, 2n-1
b) 3 b) 2n, n
c) 4 c) n+1, 3n+6
d) 1 d) 0, n+1
Answer: a Answer: a
Explanation: Explanation: If there is a string in the language of
T->S|R length between n and 2n-1 then the language is
S->aSb infite else not. The idea is essentially the same for
S->e regular languages.
R->cRd 7. Which of the following is/are CFL not closed
R->e under?
3. Context free languages are not closed under: a) Reverse
a) Intersection b) Homomorphism
b) Intersection with Regular Language c) Inverse Homomorphism
c) Complement d) All of the mentioned
Answer: d A->a
Explanation: CFL is closed under union, kleene and where A, B, C, D are non terminal symbols and a is
concatenation along with the properties a terminal symbol.
reversal,homomorphism and inverse a) Greibach Normal Form
homomorphism but not difference and intersection. b) Chomsky Nrmal Form
8. If L1 and L2 are context free languages, L1-L2 c) Kuroda Normal Form
are context free: d) None of the mentioned
a) always
b) sometimes Answer: c
c) never Explanation: Linearly Bounded grammar or Kuroda
Normal Form allows the following format of
Answer: c grammatical analysis:
Explanation: Context free languages are not closed AB->CD
under difference, intersection and complement A->BC or
operations. A->B or
9. A___________ is context free grammar with A->a
atmost one non terminal in the right handside of the 2. Every Kuroda Normal form grammar generates
production. ___________.
a) linear grammar a) Context free grammar
b) linear bounded grammar b) Context sensitive grammar
c) regular grammar c) Unrestricted grammar
d) none of the mentioned d) None of the mentioned
Answer: a Answer: b
Explanation: A simple linear grammar is G with N Explanation: Every context sensitive grammar
= {S}, Σ = {a, b}, P with start symbol S and rules which does not produce an empty string can be
S → aSb generated by a grammar in Kuroda Normal form.
S→ε 3. Which of the following can generate
10. There is a linear grammar that generates a Unrestricted grammars?
context free grammar a) Pentonnen Normal form
a) always b) Floyd Normal form
b) never c) Greibach Normal form
c) sometimes d) None of the mentioned
Answer: c Answer: a
Explanation: Linear grammar is a subset of context Explanation: Pentonnen Normal form(for
free grammar which has atmost one non terminal Unrestricted grammars) is a special case where
symbol in the right hand side of the there is a slight modification in the format of
production.Thus, there exists some languages Kuroda Normal form.
which are generated by Linear grammars. AB->AD
A->BC
. A->a
4. Given a grammar in GNF and a derivable string
CFL- Other Normal Forms “CFL- Other Normal in the grammar with the length n, any
Forms”. ___________will halt at depth n.
1. The following format of grammatical notation is a) top-down parser
accepted by which of the following: b) bottom-up parser
AB->CD c) multitape turing machine
A->BC or d) none of the mentioned
A->B or
Answer: a a) worst
Explanation: Given a grammar in GNF and a b) best
derivable string in the grammar with the length n, c) average
any top-down parser will halt at depth n. As the d) none of the mentioned
parameter ‘depth’ is mentioned, we will use a top-
down parser. Example-LL parser. Answer: a
5. Which of the following grammars is similar to Explanation: This is the worst case running time of
Floyd Normal form? CYK and and this makes it one of the most
a) Backus Naur Form efficient algorithms for recognizing general context
b) Kuroda Normal Form free languages in practice.
c) Greibach Normal Form 9. Which of the following is true for Valiants
d) Chomsky Normal Form algorithm?
a) an extension of CYK
Answer: a b) deals with efficient multiplication algorithms
Explanation: Donald Knuth implied a BNF” syntax c) matrices with 0-1 entries
in which all definitions have such a form may be d) all of the mentioned
said to be in ”Floyd Normal Form”.
A->B|C Answer: d
A->BC Explanation: Valiants algorithm is actually an
A->a extention of CYK which even computes the same
6. Which among the following can parse a context parsing table yet he showed another method can be
free grammar? utilized fro performing this operation.
a) top down parser 10. Which among the following is a correct option
b) bottom up parser in format for representing symbol and expression in
c) CYK algorithm Backus normal form?
d) all of the mentioned a) <symbol> ->expression
b) <symbol>::=_expression_
Answer: d c) <symbol>=<expression>
Explanation: We use certain algorithms to parse a d) all of the mentioned
context free grammar which include the most
popular CYK algorithm which employs the concept Answer: b
of bottom up parsing and dynamic parsing. Explanation: <symbol>::=_expression_ is the
7. The standard version of CYK algorithm operates correct representation where <symbol> is a non
only on context free grammars in the following terminal, and expression consist of one or more
form: sequence of symbols, more sequence are separated
a) Greibach Normal form by |, indicating a choice.
b) Chomsky Normal form
c) Backus Naur form .
d) All of the mentioned
Intersection with Regular Languages
Answer: b “Intersection with Regular Languages”.
Explanation: It requires the presence of a context 1. Which of the following is not a negative property
free grammar into Chomsky Normal form to of Context free languages?
operate. However, every context free grammar can a) Intersection
be converted into CNF for keeping the sense of b) Complement
grammar equivalent. c) Both (a) and (b)
8. The __________ running time of CYK is O(n3 .| d) None of the mentioned
G|)
where n is the length of the parse string and |G| is Answer: c
the size of the context free grammar G. Explanation: Context free languages are not closed
under complement and intersection. Thus, are d) None of the mentioned
called Negative properties.
2. The intersection of context free language and Answer: c
regular language is _________. Explanation: CYK algorithm is a parsing algorithm
a) regular language for context free grammars, which employs bottom
b) context free language up parsing and dynamic programming.
c) context sensitive language 7. Which of the following belong to the steps to
d) non of the mentioned prove emptiness?
a) Remove useless variable
Answer: b b) Check if a start variable S is useless
Explanation: If a language L1 is regular and L2 is a c) Both (a) and (b)
context free language, then L1 intersection L2 will d) None of the mentioned
result into a context free language.
3. Which of the following is regular? Answer: c
a) a100b100 Explanation: The empty-language question can be
b) (a+b)*-{a100b100} stated as: For context free grammar G find if L(G)
c) Both (a) and (b) =f?
d) None of the mentioned 8. Which of the following is true for CYK
Algorithm?
Answer: c a) Triangular Table
Explanation: As the language seems to be finite, a b) Circular Chart
dfa can be constructed for the same, thus is regular. c) Linked List
4. Which of the following is not context free? d) None of the mentioned
a) {w: nA=nB=nC}
b) {a*b*c*} Answer: a
c) {a100b100} Explanation: A triangular table is constructed to
d) All of the mentioned facilitate the solution of membership problem using
bottom up parsing and dynamic programming.
Answer: d 9. Which of the following steps are wrong with
Explanation: {a*b*c*} and (c) are regular respect to infiniteness problem?
languages while option (a) is not context free a) Remove useless variables
language. b) Remove unit and epsilon production
5. Which of the following can be used to prove a c) Create dependency graph for variables
language is not context free? d) If there is a loop in the dependency graph the the
a) Ardens theorem language is finite else infinite
b) Power Construction method
c) Regular Closure Answer: d
d) None of the mentioned Explanation: If we are able to detect a loop in the
formed dependency graph, then the language in
Answer: c infinite.
Explanation: We can use the properties of regular 10. State true or false:
closure to prove that a language is not a context Statement: Every context free language can be
free language. Example: Intersection of context free generated by a grammar which contains no useless
language and regular language is a context free non terminals.
language. Proof by contradiction helps here. a) true
6. Which of the following are valid membership b) false
algorithms?
a) CYK algorithm Answer: a
b) Exhaustive search parser Explanation: At first, we detect useless symbols
c) Both (a) and (b) and discard them. Inorder to find whether a symbol
is useless, just make it the starting symbol and 4. ‘a’ in a-machine is :
check for emptiness. a) Alan
b) arbitrary
. c) automatic
d) None of the mentioned
Automata Theory Interview Questions and for
Freshers This set of Automata Theory Interview Answer: c
Questions and for freshers focuses on “Turing Explanation: The turing machine was invented by
Machine – Notation and Transition Diagrams”. Alan turing in 1936. He named it as a-
1. A turing machine is a machine(automatic machine).
a) real machine 5. Which of the problems were not answered when
b) abstract machine the turing machine was invented?
c) hypothetical machine a) Does a machine exists that can determine
d) more than one option is correct whether any arbitrary machine on its tape is
circular.
Answer: d b) Does a machine exists that can determine
Explanation: A turing machine is abstract or whether any arbitrary machine on its tape is ever
hypothetical machine thought by mathematician prints a symbol
Alan Turing in 1936 capable of simulating any c) Hilbert Entscheidungs problem
algorithm, however complicated it is. d) None of the mentioned
2. A turing machine operates over:
a) finite memory tape Answer: d
b) infinite memory tape Explanation: Invention of turing machine answered
c) depends on the algorithm a lot of questions which included problems like
d) none of the mentioned decision problem, etc.) . Alan was able to prove the
properties of computation using such model.
Answer: b 6. The ability for a system of instructions to
Explanation: The turing machine operates on an simulate a Turing Machine is called _________
infinite memory tape divided into cells. The a) Turing Completeness
machine positions its head over the cell and reads b) Simulation
the symbol. c) Turing Halting
3. Which of the functions are not performed by the d) None of the mentioned
turing machine after reading a symbol?
a) writes the symbol Answer: a
b) moves the tape one cell left/right Explanation: Turing Completeness the ability for a
c) proceeds with next instruction or halts system of instructions to simulate a Turing
d) none of the mentioned machine. A programming language that is Turing
complete is theoretically capable of expressing all
Answer: d tasks accomplishable by computers; nearly all
Explanation: After the read head reads the symbol programming languages are Turing complete.
from the input tape, it performs the following 7. Turing machine can be represented using the
functions: following tools:
a) writes a symbol(some model allow symbol a) Transition graph
erasure/no writing) b) Transition table
b) moves the tape left or right (some models allows c) Queue and Input tape
no motion) d) All of the mentioned
c) proceeds with subsequent instruction or goes
either into accepting halting state or rejecting Answer: d
halting state. Explanation: We can represent a turing machine,
graphically, tabularly and diagramatically.
8. Which of the following is false for an abstract c) Counter machine
machine? d) None of the mentioned
a) Turing machine
b) theoretical model of computer Answer: b
c) assumes a discrete time paradigm Explanation: A more mathematically oriented
d) all of the mentioned definition with the same universal nature was
introduced by church and turing together called the
Answer: d Church-Turing thesis(formal theory of
Explanation: A n abstract machine also known as computation).
abstract computer, is a theoretical model of 2. Which of the problems are unsolvable?
computer or hardware system in automata theory. a) Halting problem
Abstraction in computing process usually assumes b) Boolean Satisfiability problem
a discrete time paradigm. c) Both (a) and (b)
9. Fill in the blank with the most appropriate d) None of the mentioned
option.
Statement: In theory of computation, abstract Answer: c
machines are often used in ___________ regarding Explanation: Alan turing proved in 1936 that a
computability or to analyze the complexity of an general algorithm to solve the halting problem for
algorithm. all possible program-input pairs cannot exist.
a) thought experiments 3. Which of the following a turing machine does
b) principle not consist of?
c) hypothesis a) input tape
d) all of the mentioned b) head
c) state register
Answer: d d) none of the mentioned
Explanation: A thought experiment considers some
hypothesis, theory or principle for the purpose of Answer: d
thinking through its consequences. Explanation: A state register is one which stores the
10. State true or false: state of the turing machine, one of the finitely
Statement: RAM model allows random access to many. Among these is the special start state with
indexed memory locations. which the state register is initialized.
a) true 4. The value of n if turing machine is defined using
b) false n-tuples:
a) 6
Answer: a b) 7
Explanation: In computer science, Random access c) 8
machine is an abstract machine in the general class d) 5
of register machines. Random access machine
should not be confused with Random access Answer: b
memory. Explanation:
The 7-tuple definition of turing machine: (Q, S, G,
To practice all areas of Automata Theory for d, q0, B, F)
Interviews, . where Q= The finite set of states of finite control
S= The finite set of input symbols
The Language of Turing Machine “The Language G= The complete set of tape symbols
of Turing Machine”. d= The transition function
1. A turing machine that is able to simulate other q0= The start state, a member of Q, in which the
turing machines: finite control is found initially.
a) Nested Turing machines B= The blank symbol
b) Universal Turing machine
F= The set of final or accepting states, a subset of oracle machine is a abstract machine used to study
Q. decision problems. The problem the oracle solves
5. If d is not defined on the current state and the can be of any complexity class. Even undecidable
current tape symbol, then the machine ______ problems like halting problems can be used.
a) does not halts 9. RASP stands for:
b) halts a) Random access storage program
c) goes into loop forever b) Random access stored program
d) none of the mentioned c) Randomly accessed stored program
d) Random access storage programming
Answer: b
Explanation: If we reach hA or hR, we say TM halts. Answer: b
Once it has halted, it cannot move further, since d Explanation: RASP or Random access stored
is not defined at any pair (hA,X) or (hR,X) where hA program is an abstract machine that has instances
= accept halting state and hR = reject halting state. like modern stored computers.
6. Statement: Instantaneous descriptions can be 10. Which of the following is not true about RASP?
designed for a Turing machine. a) Binary search can be performed more quickly
State true or false: using RASP than a turing machine
a) true b) Stores its program in memory external to its state
b) false machines instructions
c) Has infinite number of distinguishable,
Answer: a unbounded registers
Explanation: Inorder to describe formally what a d) Binary search can be performed less quickly
Turing machine does, we need to develop a using RASP than a turing machine
notation for configurations or Instantaneous e) More than two options are incorrect
descriptions(ID).
7. Which of the following are the models Answer: d
equivalent to Turing machine? Explanation: In theoretical computer science, the
a) Multi tape turing machine random access stored program( RASP ) machine
b) Multi track turing machine model is an abstract machine used for the purpose
c) Register machine of algorithm development and algorithm
d) All of the mentioned complexity theory.
11. State true or false:
Answer: d Statement: RASP is to RAM like UTM is to turing
Explanation: Many machines that might be thought machine.
to have more computational capability than a a) true
simple UTM can be shown to have no more power. b) false
They might compute faster or use less memory but
cannot compute more powerfully i.e. more Answer: a
mathematical questions. Explanation: The Rasp is a random access machine
8. Which among the following is incorrect for o- model that, unlike the RAM has its program in its
machines? registers together with its input. The registers are
a) Oracle Turing machines unbounded(infinite in capacity); whether the
b) Can be used to study decision problems number of registers is finite is model-specific.
c) Visualizes Turing machine with a black box
which is able to decide cerain decion problems in .
one operation
d) None of the mentioned Automata Theory Questions and for Freshers
This set of Automata Theory Questions and for
Answer: d Freshers focuses on ” The Language of Turing
Explanation: In automata theory, an o- machine or Machine-2″.
1. The class of recursively ennumerable language isAnswer: c
known as: Explanation: Both the union and intersection
a) Turing Class operations preserve the property of recursive
b) Recursive Languages ennumerablity(Theorem).
c) Universal Languages 5. If L is a recursive language, L’ is:
d) RE a) Recursive
b) Recursively Ennumerable
Answer: d c) Both (a) and (b)
Explanation: RE or recursively ennumerable is only d) None of the mentioned
called the class of recursively ennumerable
language. Answer: c
2. A language L is said to be Turing decidable if: Explanation: If T is a turing machine recognizing
a) recursive L, we can make it recognize L’ by interchanging
b) TM recognizes L the two outputs. And every recursive language is
c) TM accepts L recursively ennumerable.
d) None of the mentioned 6. Choose the appropriate option:
Statement: If a language L is recursive, it is closed
Answer: a,b under the following operations:
Explanation: A language L is recursively a) Union
ennumerable if there is a turing machine that b) Intersection
accepts L, and recursive if there is a TM that c) Complement
recognizes L.(Sometimes these languages are alse d) All of the mentioned
called Turing-acceptable and Turing-decidable
respectively). Answer: d
3. Which of the following statements are false? Explanation: The closure property of recursive
a) Every recursive language is recursively languages include union, intersection and
ennumerable complement operations.
b) Recursively ennumerable language may not be 7. A recursively ennumerable language L can be
recursive recursive if:
c) Recursive languages may not be recursively a) L’ is recursively ennumerable
ennumerable b) Every possible sequence of moves of T, the TM
d) None of the mentioned which accept L, causes it to halt
c) Both (a) and (b)
Answer: c d) None of the mentioned
Explanation: Every recursive language is
recursively ennumerable but there exists Answer: c
recursively ennumerable languages that are not Explanation: Theorem- If L is a recursively
recursive. If L is accepted by a Non deterministic ennumerable language whose complement is
TM T, and every possible sequence of moves of T recursively ennumerable, then L is recursive.
causes it to halt, then L is recursive. 8. A language L is recursively ennumerable if
4. Choose the correct option: L=L(M) for some turing machine M.
Statement: If L1 and L2 are recursively
ennumerable languages over S, then the following
is/are recursively ennumerable.
a) L1 U L2
b) L2 ∩ L2
c) Both (a) and (b)
d) None of the mentioned
Answer: d
Explanation:
a) {a}*{b}*{a,b}
b) {a,b}*{aba}
c) {a,b}*{bab}
9. State true or false: d) {a,b}*{a}*{b}*
Statement: An ennumerator is a turing machine
mwith extra output tape T, where symbols, once Answer: b
written, are never changed. Explanation: The given diagram is a transition
a) true graph for a turing machine which accepts the
b) false language with the regular expression {a,b}*{aba}.
2. Construct a turing machine which accepts a
Answer: a string with ‘aba’ as its substring.
Explanation: To ennumerate a set means to list the a)
elements once at a time, and to say that a set is
ennumerable should perhaps mean that there exists
an algorithm for ennumerating it.
10. A Language L may not be accepted by a Turing
Machine if:
a) It it is recursively ennumerable
b) It is recursive
c) L can be ennumerated by some turing machine
d) None of the mentioned
b)
Answer: b
Explanation: A language L is recursively
ennumerable if and only if it can be ennumerated
by some turing machine. A recursive ennumerable
language may or may not be recursive.
Answer: a
Explanation: The finite automata can be
represented as:
c)
d)
Answer: c
Explanation: Three things can occur when a string
is tested over a turing machine:
a) enter into accept halting state
b) enter into reject halting state
Answer: c
c) goes into loop forever
Explanation: The language consist of strings with a
5. d(q,X)=(r,Y,D) where D cannot be:
substring ‘aba’ as fixed at its end and the left part
can be anything including epsilon. Thus the turing
machine uses five states to express the language
excluding the rejection halting state which if
allowed can modify the graph as: a) L
b) R
c) S
d) None of the mentioned
Answer: c
Explanation: D represents the direction in which
automata moves forward as per the queue which
surely cannot be a starting variable.
6. Which of the following can accept even
palindrome over {a,b}
a) Push down Automata
b) Turing machine
c) NDFA
d) All of the mentioned
3. The number of states required to automate the
last question i.e. {a,b}*{aba}{a,b}* using finite Answer: c
automata: Explanation: A language generating strings which
are palindrome is not regular, thus cannot b 10. What does the following transition graph
represented using a finite automaton. shows:
7. Which of the functions can a turing machine not
perform?
a) Copying a string
b) Deleting a symbol
c) Accepting a pal
d) Inserting a symbol
e) All of the mentioned
Answer: d
Explanation: Different turing machines exist for a) Copies a symbol
operations like copying a string, deleting a symbol, b) Reverses a string
inserting a symbol and accepting palindromes. c) Accepts a pal
8. If T1 and T2 are two turing machines. The d) None of the mentioned
composite can be represented using the expression:
a) T1T2 Answer: c
b) T1 U T2 Explanation: The composite TM accepts the
c) T1 X T2 language of palindromes over {a, b} by comparing
d) None of the mentioned the input string to its reverse and accepting if and
only if the two are equal.
Answer: a
Explanation: If T1 and T2 are TMs, with disjoint .
sets of non halting states and transition function d1
and d2, respectively, we write T1T2 to denote this Programming Techniques-Storage and
composite TM. Subroutines “Programming Techniques-Storage
9. The following turing machine acts like: and Subroutines”.
1. A turing machine has ____________ number of
states in a CPU.
a) finite
b) infinte
c) May be finite
d) None of the mentioned
Answer: a
Explanation: A turing machine has finite number of
states in its CPU. However the states are not small
in number. Real computer consist of registers
which can store values (fixed number of bits).
2. Suppose we have a simple computer with control
unit holding a PC with a 32 bit address +
Arithmetic unit holding one double length 64 bit
a) Copies a string
Arithmetic Register. The number of states the finite
b) Delete a symbol
machine will hold:
c) Insert a symbol
a) 2^(32*64)
d) None of the mentioned
b) 2^96
c) 96
Answer: b
d) 32
Explanation: A turing machine does the deletion by
changing the tape contents from yaz to yz, where y
Answer: b
belongs to (S U {#})*.
Explanation: According to the statistics of the
question, we will have a finite machine with 2^96 c) Statement 1 and Statement 2 are independent
states. from each other
3. In one move a turing machine will: d) None of the mentioned
Answer: a
Explanation: Cartesian product works like a struct
in C/C++. For Example: Computer tape storage is
something like 8 or 9 bits in each cell. One can
recognize a multi track tape machine by looking at
the transitions because each will have tuples as the
read and write symbols.
a) Change a state 6. A multi track turing machine can described as a
b) Write a tape symbol in the cell scanned 6-tuple (Q, X, S, d, q0, F) where X represents:
c) Move the tape head left or right a) input alphabet
d) All of the mentioned b) tape alphabet
c) shift symbols
Answer: d d) none of the mentioned
Explanation: A move of a turing machine is the
function of the state of finite control and the tape Answer: b
symbol just scanned. Explanation: The 6-tuple (Q, X, S, d, q0, F) can be
4. State true or false: explained as:
Statement: We can use the finite control of turing Q represents finite set of states,
machine to hold a finite amount of data. X represents the tape alphabet,
a) true S represents the input alphabet
b) false d represents the relation on states and the symbols
q0 represents the initial state
Answer: a F represents the set of final states.
Explanation: 7. Which of the following statements are false?
a) A multi track turing machine is a special kind of
multi tape turing machine
b) 4-heads move independently along 4-tracks in
standard 4-tape turing machine
c) In a n-track turing machine, n head reads and
writes on all the tracks simultaneously.
d) All of the mentioned
Answer: c
The finite control not only contains state q but also Explanation: In a n-track turing machine, one head
three data, A, B, C. The following technique reads and writes on all the tracks simultaneously.
requires no extension to the Turing Machine model. 8. State true or false:
Shaping states this way allows to describe Statement: Two track turing machine is equivalent
transitions in more systematic way and often to to a standard turing machine.
simplify the strategy of the program. a) true
5. Statement 1: Multitrack Turing machine. b) false
Statement 2: Gamma is Cartesian product of a
finite number of finite sets. Answer: a
Which among the following is the correct option? Explanation: This can be generalized for n- tracks
a) Statement 1 is the assertion and Statement 2 is and can be proved equivalent using ennumerable
the reason languages.
b) Statement 1 is the reason and Statement 2 is the
assertion
9. Which of the following is/are not true for Answer: a
recursively ennumerable language? Explanation: The multitape turing machine model
a) partially decidable seems much powerful than the single tape model,
b) Turing acceptable but any multi tape machine, no matter how many
c) Turing Recognizable tapes, can be simulated by single taped TM.
d) None of the mentioned 3. In what ratio, more computation time is needed
to simulate multitape turing machines using single
Answer: d tape turing machines?
Explanation: In automata theory, a formal language a) doubly
is called recursively ennumerable language or b) triple
partially decidable or semi decidable or turing c) quadratically
acceptable or turing recognizable if there exists a d) none of the mentioned
turing machine which will ennumerate all valid
strings of the language. Answer: c
10. According to Chomsky hierarchy, which of the Explanation: Thus, multitape turing machines
following is adopted by Recursively Ennumerable cannot calculate any more functions than single
language? tape machines.
a) Type 0 4. Which of the following is true for two stack
b) Type 1 turing machines?
c) Type 2 a) one read only input
d) Type 3 b) two storage tapes
c) Both (a) and (b)
Answer: a d) None of the mentioned
Explanation: Recursively Ennumerable languages
are type 0 languages in the Chomsky hierarchy. All Answer: c
regular, context free, context sensitive languages Explanation: Two-stack Turing machines have a
are recursivelyennumerable language. read-only input and two storage tapes. If a head
moves left on either tape a blank is printed on that
. tape, but one symbol from a “library” can be
printed.
Multitape Turing Machines “Multitape Turing 5. Which of the following is not a Non
Machines”. deterministic turing machine?
1. A turing machine with several tapes in known as: a) Alternating Turing machine
a) Multi-tape turing machine b) Probabalistic Turing machine
b) Poly-tape turing maching c) Read-only turing machine
c) Universal turing machine d) None of the mentioned
d) All of the mentioned
Answer: c
Answer: a Explanation: A read only turing machine or 2 way
Explanation: A multitape turing machine is an deterministic finite automaton is a class of model of
ordinary turing machine with multiple tapes. Each computability that behaves like a turing machine,
tape has its own head to control the read and write. and can move in both directions across input,
2. A multitape turing machine is ________ except cannot write to its input tape.
powerful than a single tape turing machine. 6. Which of the turing machines have existential
a) more and universal states?
b) less a) Alternating Turing machine
c) equal b) Probalistic Turing machine
d) none of the mentioned c) Read-only turing machine
d) None of the mentioned
Answer: a Answer: c
Explanation: ATM is divide into two sets: an Explanation: An oblivious turing machine where
existential state is accepting if some transitions movements of various heads are fixed functions of
leads to an accepting state; an universal state is time, independent of the input. Pippenger and
accepting if every transition leads to an accepting Fischer showed that any computation that can be
state. performed by a multi-tape Turing machine in n
7. Which of the following is false for Quantum steps can be performed by an oblivious two-tape
Turing machine? Turing machine in O(n log n) steps.
a) Abstract machine
b) Any quantum algorithm can be expressed .
formally as a particular quantum turing machine
c) Gives a solution to ‘Is a universal quantum Equivalence of One-Tape and Multitape TM's
computer sufficient’ “Equivalence of One-Tape and Multitape TM’s”.
d) None of the mentioned 1. Which of the following are related to
construction of One Tape turing machines?
Answer: c a) JFLAP
Explanation: ‘Is a universal quantum computer b) NFLAP
sufficient’ is one of the unsolved problem from c) Both (a) and (b)
physics. d) None of the mentioned
8. A deterministic turing machine is:
a) ambiguous turing machine Answer: a
b) unambiguous turing machine Explanation: JFLAP is educational software written
c) non-deterministic in java to experiment with the topics in automata
d) none of the mentioned theory and area of formal languages.
2. Which of the following topics cannot be covered
Answer: b using JFLAPS?
Explanation: A deterministic turing machine is a) L-System
unambiguous and for every input, there is exactly b) Unrestricted Grammar
one operation possible. It is a subset of non- c) Regular Expression
deterministic Turing machines. d) None of the mentioned
9. Which of the following is true about Turing’s a-
machine? Answer: d
a) a stands for automatic Explanation: Topics like regular expressions,
b) left ended, right end-infinite context free languages and unrestricted grammar
c) finite number of tape symbols were allowed including parsers like LL,SLR parsers can be
d) all of the mentioned covered using JFLAPS.
3. State true or false:
Answer: d Statement: Multitape turing machine have multi
Explanation: Turings a- machine or automatic tapes where each tape is accessed with one head.
machine was left ended,right end infinite.Any of a) true
finite number of tape symbols were allowed and the b) false
5 tuples were not in order.
10. Which of the following is a multi tape turing Answer: b
machine? Explanation: Multitape turing machines do have
a) Post turing Machine multiple tapes but they they are accessed by
b) Wang-B Machine separate heads.
c) Oblivious turing Machine 4. Which of the following statements is/are true?
d) All of the mentioned a) Every multitape turing machine has its
equivalent single tape turing machine
b) Every multitape turing machine is an abstract
machine multi-tape TM and one-band TM rely on the fact
c) Both (a) and (b) that the number of tapes is bounded.
d) None of the mentioned 9. Every language accepted by a k-tape TM is
_____ by a single-tape TM.
Answer: c a) accepted
Explanation: A multitape turing machine is an b) not accepted
ordinary turing machine which is always c) generated
abstract.And they do have their equivalent single d) not generated
tape turing machines.
5. Are Multitape and Multitrack turing machines Answer: a
same? Explanation: Its the theorem that states Every
a) Yes multitape turing machine can be simulated by a
b) No single tape turing machine and the corresponding
c) Somewhat yes language can be accepted.
d) Cannot tell 10. Which of the following is/are a basic TM
equivalent to?
Answer: a a) Multitrack TM
Explanation: Multitrack turing machines are special b) Multitape TM
types of Multitape turing machines. In a standard n- c) Non-deterministic TM
tape Turing machine, n heads move independently d) All of the mentioned
along n-tracks.
6. In a n-track turing machine, ___ head/heads read Answer: d
and write on all tracks simultaneously. Explanation: Tms can be used as both: language
a) one recognizers/Computers. TMs are like universal
b) two computing machines with universal storage.
c) n
d) infinite .
Answer: d
Explanation: The upper track represents the cells of
the original TM that are at the right of the initial
head position. The lower track represents the cells .
to the left of the initial head position, but in reverse
order. Simulation of Turing Machine “Simulation of
8. Which among the following options are correct? Turing Machine”.
Statement 1: TMs can accept languages that are not 1. Fill in the blank with an appropriate option.
accepted by any PDA with one stack. In automata theory, ___________ is said to be
Statement 2: But PDA with two stacks can accept Computationally Universal if can be used to
any language that a TM can accept. simulate any single taped Turing Machine.
a) Statement 1 and 2, both are correct a) Computer’s instruction set
b) Statement 1 is correct but Statement 2 is false b) A programming language
c) Statement 2 is correct while Statement 1 is false c) Cellular Automaton
d) Statement 1 and 2, both are false d) All of the mentioned
Answer: a Answer: d
Explanation: Both the statements are true. Both the Explanation: Computationally Universal or Turing
statements are properties of Multistack machines. Complete is a set of data manipulation rules if it
9. A two-way infinite tape turing machine is can be used to simulate a single-taped turing
________ superior than the basic model of the machine.
turing machine in terms of power. 2. Give a classic example of the concept of turing
a) more complete.
b) less a) lambda calculus
c) no way b) C++
d) none of the mentioned c) Lisp
d) All of the mentioned
Answer: c
Explanation: A two way infinite tape turing Answer: d
machine is a turing machine with its input tape Explanation: Most of the programming languages,
infinte in both directions, the other component conventional or unconventional are turing
being the same as the basic model. complete. Functional languages like Lisp and
10. For a basic turing machine, there exists an Haskell are also turing complete.
equivalent : 3. Let two machines be P and Q. The state in which
a) 2-counter machine P can simulate Q and Q can simulate P is called:
b) 3-counter machine a) Turing Equivalence
c) 4-counter machine b) State Equivalence
d) All of the mentioned c) Universal Turing Machine
d) None of the mentioned
Answer: d
Answer: a b) Infinite memory
Explanation: It is a closely related concept with c) Infinite time
Turing complete. It says, two computers P and Q d) None of the mentioned
are called equivalent if P can simulate Q and Q can
simulate P. Answer: d
4. Which of the following remarks the given Explanation: Real computers which are
statement? manufactured till date, all are similar to single
Statement: Any function whose values can be taped turing machine. However, they have limited
computed by an algorithm, can be computed by a physical resources so they are linearly bounded
Turing machine. complete on the contrary.
a) Smn theorem 8. Which among are not the results of
b) Structured Program theorem computational theory?
c) Church-Turing thesis a) In general, it is impossible to predict that what a
d) None of the mentioned Turing-complete program will do over an
arbitrarily long time.
Answer: c b) It is impossible to determine for every input,
Explanation: The following conclusion is laid down whether the program will eventually stop or
from the Church-Turing thesis: continue forever.
Any function whose values can be computed by an c) It is not possible to determine whether a program
algorithm, can be computed by a Turing machine. will return true or false.
If any real world computer can be simulated by a d) None of the mentioned
turing machine, it is Turing equivalent to a Turing
Machine. Answer: d
5. Which of the following can be used to simulate Explanation: All of the following mentioned are the
any turing machine? conclusions of automata theory or computability
a) Finite State Automaton theory.
b) Universal Turing Machine 9. Which of the games fill under the category of
c) Counter machines Turing-complete?
d) All of the mentioned a) Minecraft
b) Minesweeper
Answer: b c) Dwarf Fortress
Explanation: The computational aspect of any d) All of the mentioned
possible real world computer can be simulated
using an Universal Turing Machine so can be any Answer: d
turing machine. Explanation: Many games fall under the category
6. State true or false: og turing complete:
Statement: Inorder to show something is Turing a) Minecraft
complete, it is enough to demonstrate that it can be b) Minesweeper
used to simulate some Turing complete system. c) Dwarf Fortress
a) true d) Conway’s Game of Life
b) false e) Pokemon Yellow, etc.
10. Which of the following a Non-turing Complete
Answer: a language?
Explanation: Yes it is. For instance, an imperative a) Regular Language
language is called Turing complete if it tends to b) Context free grammars
have conditional branching and an ability to c) Epigram
maintain an arbitrary number of symbols. d) All of the mentioned
7. Which of the following can lack in a Universal
computer? Answer: There exists some computational
a) Turing Complete Instruction set languages which are not turing complete. Regular
language which is accepted by finite automata tops Answer: d
the list. Other examples are pixel shader languages Explanation: Example: Does a graph G has a
embedded in Direct3D and OpenGL extensions. Hamilton cycle?
=>Each undirected graph is an instance of
. Hamilton cycle problem.
5. If a problem has an algorithm to answer it, we
The Diagonalization Languages “The call it ____.
Diagonalization Languages” a) decidable
1. Which of the following technique is used to find b) solved
whether a natural language isnt recursive c) recognizable
ennumerable? d) none of the mentioned
a) Diagonalization
b) Recursive Induction Answer: a
c) Both (a) and (b) Explanation: An algorithm is a TM that halts on all
d) None of the mentioned inputs,accepted or not. Putting other way, decidable
problems are recursive languages.
Answer: a 6. Which of the following are decidable problems?
Explanation: To find a non recursively a) Can a particular line of code in a program ever
ennumerable language, we use the technique of be executed?
diagonalization. b) Do two given CFG’s generate the same language
2. Diagonalization can be useful in: c) Is a given CFG ambiguous?
a) To find a non recursively ennumerable language d) None of the mentioned
b) To prove undecidablility of haltig problem
c) Both (a) and (b) Answer: d
d) None of the mentioned Explanation: All of the mentioned problems are
undecidable.
Answer: c 7.Which one of the following is true for the given?
Explanation: Diagonalization is a technique we use A={(M,w)|M is a turing machine that accepts string
for the following operations: w}
a) To find a non recursively ennumerable language. a) A concrete undecidable problem
b) To prove undecidablility of halting problem. b) A is recognizable but not decidable
3. Which of the following are undecidable c) -A is not recognizable
problems? d) All of the mentioned
a) Determining whether two grammars generate the
same language Answer: d
b) Determining whether a grammar is ambiguous Explanation: We can proof A to be undecidable
c) Both (a) and (b) using the contradiction method.
d) None of the mentioned 8. Which of the following are correct statements?
a) TMs that always halt are known as Decidable
Answer: c problems
Explanation: In contrast we can put up an algorithm b) TMs that are guaranteed to halt only on
for checking whether two FA’s are equivalent and acceptance are recursive ennumerable.
this program can be implemented as a program. c) Both (a) and (b)
4. Which of the following are incorrect options? d) None of the mentioned
a) Informally, problem is a yes/no question about
an infinite set of possible instances Answer: c
b) Formally, a problem is a language Explanation: There are two types of TMs on the
c) Both (a) and (b) basis of halting: Recursive and Recursively
d) None of the mentioned Ennumerable(TM may or may not halt,could loop
forever).
9. Statement: If L id R.E., Lc needs to be R.E. Is it Questions and for Experienced people focuses on
correct? “The Universal Language-Undecidability”.
a) Yes 1. The decision problem is the function from string
b) No to ______________
c) Maybe a) char
d) Cannot predict b) int
c) boolean
Answer: b d) none of the mentioned
Explanation: Any recursive ennumerable language
is not closed under complementation. Answer: c
10. Which of the following is true for The Halting Explanation: The decision problem requires
problem? checking of input (string) has some property or not.
a) It is recursively ennumerable That is a string to boolean transaction.
b) It is undecidable 2. A language L is said to be ____________ if there
c) Both (a) and (b) is a turing machine M such that L(M)=L and M
d) None of the mentioned halts at every point.
a) Turing acceptable
Answer: c b) decidable
Explanation:Halting problem: Does a given Turing c) undecidable
machine M halt on a given input w? d) none of the mentioned
11. With reference to binary strings, state true or
false: Answer: b
Statement: For any turing machine, the input Explanation: Decidability refers to the decision
alphabet is restricted to {0,1}. problem and existence of a effective method for
a) true determining membership, and return true and false
b) false accordingly rather that going into a loop forever.
3. Which aong the following are undecidable
Answer: a theories?
Explanation: When turing machines are coded as a) The first order theory of boolean algebra
Binary strings, we are restricted to take any input b) The first order theory of Euclidean geomentry
alphabet except {0,1}. c) The first order theory of hyperbolic geometry
12. With reference ti enumeration of binary strings, d) The first order theory of the natural number with
the conversion of binary strings to integer is addition, multiplication, and equality
possible by treating the resulting string as a base- e) All of the mentioned
____ integer.
a) 2 Answer: d
b) 8 Explanation: Tarski and Mostowski in 1949,
c) 16 established that the first order theory of natural
d) All of the mentioned numbers with addition, multiplication, and equality
is an undecidable theory. Others mentioned are
Answer: a decidable theories.
Explanation: It makes sense to talk about the i-th 4. Rec-DFA = { | M is a DFA and M recognizes
binary string” and about “the i-th Turing machine. input w}.
If i makes no sense as a TM, assume the i-th TM Fill in the blank:
accepts nothing. Rec-DFA is ___________
a) Undecidable
. b) Decidable
c) Non finite
Automata Theory Questions and for d) None of the mentioned
Experienced This set of Automata Theory
Answer: b a) Those that have an algorithm
Explanation: Under decidablity of regular language b) Intractable problems: Those that are only solved
properties we have the following lemma which by a turing machine that may run forever on inputs
states that A DFA which recognizes an input w is they do not accept.
decidable. 9. An algorithm is called efficient if it runs in
5. Which among the following are semi decidable? ____________ time on a serial computer.
a) Empty-DFA a) polynomial
b) Rec-NFA b) non polynomial
c) Infinite-DFA c) logarithmic
d) All of the mentioned d) none of the mentioned
Answer: d Answer: a
Explanation: All are the properties of regular Explanation: Example: Runtimes of efficient
languages and all are decidable languages. algorithms
6. The language accepted by a turing machine is O(n), O(nlogn), O(n3log2n)
called ____________ Runtimes of inefficient algorithms
a) Recursive Ennumerable O(2n), O(n!)
b) Recursive 10. A problem is called __________ if its has an
c) Both (a) and (b) efficient algorithm for itself.
d) None of the mentioned a) tractable
b) intractable
Answer: c c) computational
Explanation: The language accepted by Turing d) none of the mentioned
machines are called recursively ennumerable (RE),
and the subset of RE languages that are accepted by Answer: a
a turing machine that always halts are called Explanation: A problem is called intractable iff
recursive. there is an efficient (i.e. polynomial time) algorithm
7. Decidable can be taken as a synonym to: that solves it. A problem is called intractable iff
a) recursive there exists no efficient algorithm that solves it.
b) non recursive 11. A formal language is recursive if :
c) recognizable a) a total turing machine exists
d) none of the mentioned b) a turing machine that halts for every input
c) turing machine rejects if the input does not
Answer: a belong to the language
Explanation: We can refer to languages as d) all of the mentioned
‘recursive’ and problems as ‘decidable’. If a
language is not recursive , then we call the problem Answer: d
expressed by that language undecidable. Explanation: A formal language is called recursive
8. The problems which have no algorithm, if it is a recursive subset of the set of all possible
regardless of whether or not they are accepted by a finite sequences over the alphabet of the language.
turing machine that fails to halts on some input are 12. Recursive languages are also known as:
referred as: a) decidable
a) Decidable b) undecidable
b) Undecidable c) sometimes decidable
c) Computable d) none of the mentioned
d) None of the mentioned
Answer: a
Answer: b Explanation: A language is recursive if there exists
Explanation: The problems that can be solved by a a turing machine such that it halts i.e. accepts if the
turing machine can divided into two classes:
input belongs to the language else rejects. It is d) none of the mentioned
better called Turing decidable language.
13. The class of recursive language is known as: Answer: a
a) R Explanation: A property of partial functions is
b) RC called trivial if it holds for all partial computable
c) RL functions or for none, and an effective decision
d) all of the mentioned method is called general if it decides correctly for
every algorithm.
Answer: a 3. Which of the following is incorrect according to
Explanation: R is the set of all recursive languages, rice theorem?
a class of decision problems solvable by turing Let S be a set of language hat is non trivial:
machines. Although, R is also used for the class a) there exists a TM that recognizes the language in
RP. S
14. Which of the following was not a part of b) there exists a TM that recognizes the language
Chomsky hierarchy ? not in S
a) Context sensitive grammar c) both (a) and (b)
b) Unrestricted grammar d) none of the mentioned
c) Recursive grammar
d) None of the mentioned Answer: c
Explanation: According to rice theorem, it is
Answer: c undecidable to determine whether the language
Explanation: All recursive languages are recognized by an arbitrary turing machine lies in S.
recursively enumerable. All regular, context free 4. Which of the following set of computable
and context sensitive languages are recursive. functions are decidable?
a) The class of computable functions that are
To practice all areas of Automata Theory for constant, and its complement
Experienced people, . b) The class of indices for computable functions
that are total
Rice's Theorem, Properties, PCP “Rice’s c) The class of indices for recursively enumerable
Theorem, Properties,PCP”. sets that are cofinite
1. According to the rice’s theorem, If P is a non d) All of the mentioned
trivial property, Lp is :
a) infinite Answer: d
b) decidable Explanation: According to Rice’s theorem, if there
c) undecidable exists atleast one computable function in a
d) none of the mentioned particular class C of computable functions and
another computable function not in C then the
Answer: c problem deciding whether a particular program
Explanation: Rice’s theorem states that ‘Any non computes a function in C is undecidable.
trivial property about the language recognized by a 5. Which of the following statements are
turing machine is undecidable’. undecidable?
2. Fill in the blank with reference to Rice’s For a given Turing Machine M,
theorem. a) does M halt on an empty input tape
For any non-trivial property of _________, no b) does M halt for anly inputs at all?
general or effective method can decide whether an c) is L(M) regular? Context free? Turing decidable?
algorithm computes it with that property. d) all of the mentioned
a) partial functions
b) piecewise functions Answer: d
c) both (a) and (b) Explanation: All of the following mentioned are
immediate results of Rice’s theorem and thus, complement.
undecidable.
6. Post Correspondence problem is Answer: b
a) decidable decision problem Explanation: As B is undecidable and it can be
b) undecidable decision problem reduced to C, C is also an undecidable problem.
c) not a decision problem
d) none of the mentioned .
Answer: c Answer: a
Explanation: The given order is the only correct Explanation: The complement of all the problems
order and further PSPACE belongs to EXPTIME in PSPACE are also in PSPACE, meaning co-
PSPACE= PSPACE.
6. NL ∈ PSPACE ∈ EXPSPACE
class and subsequently occurs EXPSPACE class.
10. Which of the following PSPACE can be
The given relation involves which of the following characterized into?
theorems? a) APTIME
a) Space hierarchy theorem b) AP
b) Savitch’s theorem c) Quantom complexity class
c) Both (a) and (b) d) None of the mentioned
d) None of the mentioned
Answer: d
Explanation: An alternative characterization of
Explanation: From space hierarchy theorem: NL ∈
Answer: c
PSPACE is a set of problems decidable by a turing
NPSPACE, from Savitch’s theorem: NPSPACE= machine in polynomial time, sometimes called,
PSPACE. APTIME or AP.
c) Atlantic City Algorithm
. d) All of the mentioned