Professional Documents
Culture Documents
a)
b)
c)
How many number of states are there in a minimal DFA that accepts the strings
with even number of a’s and even number of b’s with inputs=a,b ?
a) 3
b) 4
c) 5
d) 2
Answer: b
How many final states are there in a minimal DFA that accepts the strings with
even number of a’s and any number of b’s with ∑={a,b} ?
a) 3
b) 4
c) 1
d) 2
Answer : c
How many number of Tuples are there in an “unrealistic finite automata without
output ?
a) 4
b) 5
c) 6
d) Cant determined
Answer : b
a) n
b) n+1
c) n+2
d) Cant determined
Answer : a
How many number of states are there in a minimal DFA that accepts the strings
that ends with ‘ab’ using ∑={a,b} ?
a) 2
b) 3
c) 4
d) 5
Answer : b
How many number of states are there in a minimal DFA that accepts the language,
a) 4
b) 3
c) 2
d) 5 Answer : a
a) 1
b) 0
c) 2
d) None of the mentioned Answer : b
The sum of minimum and maximum number of final states for a DFA having
‘n+1’ states is equal to:
a) n+1
b) n
c) n-1
d) n+2
Answer : d
The maximum sum of in degree and out degree over a state in a DFA can be
determined as:
∑= {a, b, c, d}
a) 4+4
b) 4+16
c) 4+0
d) cant determined
Answer : d
answer : a
Which DFA is accept the string in which every a is followed by b where Σ = {a,b}
.
a)
b)
c)
d) None of these
Which string is accepted by DFA
a) an
b) anbn
c) anbncn
1)c
2) a ,b
3) a,b,c
4) a
Answer : 4
Answer: c
δ(q,ya) is equivalent to .
a) δ((q,y),a)
b) δ(δ(q,y),a)
c) δ(q,ya)
d) independent from δ notation
answer: b
a) Correct
b) Incorrect, Incomplete DFA
c) Wrong proposition
d) May be correct
Answer : b
a)
b)
c)
d) None of these
Answer : a
Present State 0 1
q1 q3 Ε
q2 q2, q3 q3
→q3 q3 q3
a) b)
c) d) None of these
Answer : a
Find output string for the input string 0111 from the following Moore Machine
a) 00010
b) 10110
c) 11111
d) 10101
Answer : a
Find output string for the input string 1111 from the following Moore
Machine
a) 01000
b) 00110
c) 11111
d) 10101
Answer : a
For the following NDFA, what would be the states in a corresponding DFA?
a. [q0]
b. [q0], [q1]
c. [q0], [q0, q1]
d. [q0], [q1], [q0, q1]
Answer : d
a) D
b) A
c) B
d) C
Answer : c
The following mealy machine outputs which of the following?
a) 9’s Complement
b) 2’s Complement
c) 1’s Complement
d) 10’s Complement
Answer: b
Find the correct answer after, converting the following Mealy to Moore machine
a)
Next State Output
Present a=0 a=1
State
->q1 q3 q20 0
q20 q1 q4 0
q21 q1 q4 1
q3 q21 q1 0
q4 q4 q3 1
b)
c)
Present Next State Output
State a=0 a=1
->q1 q3 q20 1
q20 q1 q4 0
q21 q1 q4 1
q3 q21 q1 1
q4 q4 q3 1
d)
How many states are require to construct a minimal dfa from the given DFA
answer b
Q1
Q2
Q3
Consider the production of the grammar
S → AA
A → aa
A → bb
Describe the language specified by the production grammar.
a) L = {aaaa, aabb, bbaa, bbbb}
b) L = {abab, abaa, aaab, baaa}
c) L = {aaab, baba, bbaa, bbbb}
d) L = {aaaa, abab, bbaa, aaab}
Ans A
Q4
Given a production grammar that specified language
L = {a ͥ b² ͥ / i ≥ 1}
a) {S → aSbb, S → abb}
b) {S → aSb, S → b}
c) {S → aA, S → b, A → b}
d) None of these
Ans A
Q5
Which of the following string can be obtained by language
L = {a ͥ b² ͥ / i ≥ 1}
a) aaabbbbbb
b) aabbb
c) abbabbba
d) aaaabbbabb
Ans A
Given a production grammar for the language L = {x/x ∈ (a, b)* , the number of
a’s in x is a multiple of 3}
a) {S → bS, S → b, S → aA, S → bA, A → aB, B → bB, B → aS, S → a}
b) {S → aS, S → bA, A → bB, B → bBa, B → bB}
c) {S → aaS, S → bbA, A → bB, B → ba}
d) None of these
Ans A
Q28
CFG
While converting the context free grammar into Greibach normal form, which of
the following is not necessary
a) Elimination of null production
b) Elimination of unit production
c) Converting given grammar in Chomsky normal form
d) None of these
Ans D
The variable which produces an epsilon is called:
a) empty variable
b) nullable
c) terminal
d) all of the mentioned
Simplification of grammar
The use of variable dependency graph is in:
a) Removal of useless variables
b) Removal of null productions
c) Removal of unit productions
d) None of the mentioned
Answer: a
Simplify the given grammar:
S->aXb
X->aXb | e
a) S->aXb | ab, X-> aXb | ab
b) S->X | ab, X-> aXb | ab
c) S->aXb | ab, X-> S | ab
d) None of the mentioned
Answer: a
a. Parser Design
b. DFA
c. NFA
d. None of the above
Let Grammar G = ({S}, {a,b,+,*}, P, S), where P consists of S->S+S | S*S |a| b.
What will be the possible derivation trees for the yield
a.
b.
A grammar in CNF, the derivation tree has the following property: Every node has
atmost two descendants
Pumping Lemma for Context Free language prove that certain languages are
a. Context Free
b. Not Regular
c. Not Context Free
d. Regular
An initial ID is (q0,x,Z0). This means that initially the PDA is in the initial state q0,
the input string to be processed is
a. x
b. q0
c. Z0
d. None of the above
a. Rightmost Derivation
b. Leftmost Derivation
c. Both (a) & (b)
d. None of the above
Answer: a
answer: b
answer: d
answer: a
answer:a
a. Left recursion
b. Left Factoring
c. Both (a) & (b)
d. None of the above
For constructing ID in Turing Machine, we simply insert the current state in the
___________________ to the left of the symbol under the R/W head
a. Input string
b. Output string
c. Both (a) & (b)
d. None of the above
Consider the Turing Machine M described by the transition table given below and
check which of the following string is accepted by M
a. 011
b. 001
c. 0011
d. 0111
Consider the Turing machine given below and recognize which type of string it
will accept
a. {1n2n3n | n≥1}
b. {2n3n1n | n≥1}
c. {3n 2n1n | n≥1}
d. All of the above