Академический Документы
Профессиональный Документы
Культура Документы
http://freepdf-books.com
Theory of Computation Solved
MCQ - Part 2
Given the language L-{ab, aa, baa}, which of the following strings are
in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
1,2 and 3
2,3 and 4
1,2 and 4
1,3 and 4
_________________________________________________________
____________________________
Push down machine represents
Type 0 Grammar
Type 1 grammar
Type-2 grammar
Type-3 grammar
_________________________________________________________
____________________________
The behavior of a NFA can be stimulated by DFA
always
sometimes
never
depend on NFA
http://freepdf-books.com
_________________________________________________________
____________________________
_________________________________________________________
____________________________
A
B
C
D
_________________________________________________________
____________________________
Which of the following is not primitive recursive but partially
recursive?
Carnot function
Rieman function
Bounded function
Ackermann function
_________________________________________________________
____________________________
http://freepdf-books.com
No string produced by the grammar has four consecutive b s
No string produced by the grammar has three consecutive a s
No string produced by the grammar has an odd number of
consecutive b s
The length of every string produced by the grammar is even.
_________________________________________________________
____________________________
Set of regular languages over a given alphabet set,is not closed
under
Union
Complementation
Intersection
None of the above
_________________________________________________________
____________________________
Consider the regular expression (a + b) (a + b) … (a + b) (n-times).
The minimum number of states in finite automaton that recognizes
the language represented by this regular expression contains
n states
n + 1 states
n + 2 states
2n states
_________________________________________________________
____________________________
http://freepdf-books.com
B
C
D
_________________________________________________________
____________________________
The logic of pumping lemma is a good example of
_________________________________________________________
____________________________
If every string of a language can be determined whether it is legal or
illegal in finite time the language is called
Decidable
Undecidable
Interpretive
Non deterministic
_________________________________________________________
____________________________
Context free language can be recognized by
_________________________________________________________
____________________________
Fred created a new automaton model which is a push down
automaton but with two stacks and the added ability of having
http://freepdf-books.com
commands which do not read input tape but which can pop from one
stack and push into the other.This new automaton can recognize
(choose strongest result)
_________________________________________________________
____________________________
_________________________________________________________
____________________________
Consider the set of strings on {0,1} in which, every substring of 3
symbols has at most two zeros. For example, 001110 and 011001 are
in the language, but 100010 is not. All strings of length less than 3
are also in the language. A partially completed DFA that accepts this
language is shown below.
A
B
C
D
_________________________________________________________
http://freepdf-books.com
____________________________
A
B
C
D
_________________________________________________________
____________________________
The regular expression for the following DFA
ab*(b + aa*b)*
a*b(b + aa*b)*
a*b(b* + aa*b)
a*b(b * + aa*b)*
_________________________________________________________
____________________________
FSM can recognize
Any grammar
Only CFG
Any unambiguous grammar
Only regular grammar
_________________________________________________________
____________________________
http://freepdf-books.com
S1 is correct and S2 is not correct.
Both S1 and S2 are correct.
Both S1 and S2 are not correct.
S1 is not correct and S2 is correct.
_________________________________________________________
____________________________
Which of the following is the most general phase structured grammar
?
Regular
Context-sensitive
Context free
None of the above
_________________________________________________________
____________________________
A FSM can be used to add how many given integers?
1
3
4
5
_________________________________________________________
____________________________
L(abb*a)
{a} U L(abb*a)
L(ab*a)
{a} U L(ab*a)
http://freepdf-books.com
_________________________________________________________
____________________________
Consider the following statements :
I. Recursive languages are closed under complementation.
II. Recursively enumerable languages are closed under union.
III. Recursively enumerable languages are closed under
complementation.
Which of the above statements are true ?
I only
I and II
I and III
I and III
_________________________________________________________
____________________________
6 Files F1,F2,F3,F4,F5 and F6 have 100,200,50,80,120,150 records
repectively.
In what order should they be sorted so as to optimize activity?
Assume each file is accessed with the same frequency.
F3,F4,F1,F5,F6,F2
F2,F6,F5,F1,F4,F3
F1,F2,F3,F4,F5,F6
Ordering is immaterial as all files are accessed with the same
frequency
_________________________________________________________
____________________________
Following grammar
S-> bS
S -> b
S -> aA
A -> bA
Type -3 grammar
Type -2 grammar
http://freepdf-books.com
Type -1 grammar
Type -0 grammar
_________________________________________________________
____________________________
1,2,3,4
1,2
2,3,4
3,4
_________________________________________________________
____________________________
The language L={ak bk|k>=1} is
Type -3 Grammar
Type -2 Grammar
Type -1 Grammar
Type -0 Grammar
_________________________________________________________
____________________________
All strings having equal number of a and b can be recognized by
DFA
NDFA
PDA
All of these
_________________________________________________________
http://freepdf-books.com
____________________________
The basic limitation of a FSM is that
_________________________________________________________
____________________________
How many states can a process be in ?
2
3
4
5
_________________________________________________________
____________________________
Which one of the following statement is false ?
_________________________________________________________
____________________________
Given the language L = {ab, aa, baa}, which of the following strings
are in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
1, 2 and 3
2, 3 and 4
http://freepdf-books.com
1, 2 and 4
1, 3 and 4
_________________________________________________________
____________________________
Which is not the correct statement(s) ?
(i) Every context sensitive language is recursive.
(ii) There is a recursive language that is not context sensitive.
_________________________________________________________
____________________________
A formal grammar is a___________for rewriting strings.
Set of rules
Set of functions
Both A and B
None of the above
_________________________________________________________
____________________________
Finite automata are used for pattern matching in text editors for
_________________________________________________________
____________________________
Two finite states are equivalent if they
http://freepdf-books.com
Have same number of states
Have same number of edges
Have same number of states and edges
Recognize same set of tokens
_________________________________________________________
____________________________
A PDM behaves like a TM when the number of auxiliary memory it has
is
Zero
One or more
Two or more
None of these
_________________________________________________________
____________________________
Which of the following permanent database that has an entry for each
terminal symbol ?
Literal table
Identifier table
Terminal table
Source table
_________________________________________________________
____________________________
The language accepted by finite automata is
Context free
Regular
Non regular
None of these
_________________________________________________________
____________________________
http://freepdf-books.com
The following CFG
S®aB|bA, A®a|as|bAA, B®b|bs|aBB
generates strings of terminals that have
_________________________________________________________
____________________________
An FSM can be used to add two given integers.This remark is
True
False
May be true
None of the above
_________________________________________________________
____________________________
Context free languages are not closed under
Union
Concatenation
Closure
Iteration
_________________________________________________________
____________________________
http://freepdf-books.com
5
4
3
2
_________________________________________________________
____________________________
Which of the following is most powerful?
DFA
NDFA
2PDA
DPDA
_________________________________________________________
____________________________
Which of the following statements is/are FALSE?
(1) For every non-deterministic Turing machine, there exists an
equivalent deterministic Turing machine.
(2) Turing recognizable languages are closed under union and
complementation.
(3) Turing decidable languages are closed under intersection and
complementation
(4) Turing recognizable languages are closed under union and
intersection.
1 and 4 only
1 and 3 only
2 only
3 only
_________________________________________________________
____________________________
http://freepdf-books.com
G1 is not ambiguous and G2 is ambiguous.
G1 is not ambiguous and G2 is not ambiguous.
_________________________________________________________
____________________________
Finite state machine___________recognize palindromes.
Can
Cannot
May
May not
_________________________________________________________
____________________________
Given L1=L(a*baa*) and L2=L(ab*). The regular expression
corresponding to language L3 = L1/L2 (right quotient) is given by
a*b
a*baa*
a*ba*
None of the above
_________________________________________________________
____________________________
If two finite state machines are equivalent they should have the same
number of
States
Edges
States and edges
None of these
http://freepdf-books.com