0% found this document useful (0 votes)
26 views32 pages

MCQ

The document contains various questions related to finite automata, regular expressions, and formal languages. It addresses topics such as identifying languages accepted by finite automata, the relationship between NFA and DFA, and properties of different types of automata. Additionally, it includes questions on the pumping lemma and grammar definitions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views32 pages

MCQ

The document contains various questions related to finite automata, regular expressions, and formal languages. It addresses topics such as identifying languages accepted by finite automata, the relationship between NFA and DFA, and properties of different types of automata. Additionally, it includes questions on the pumping lemma and grammar definitions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Identify the Language of Finite Automata

accepting {0,1}
a. Even number of 0’s
b. Exactly 2 0’s
c. Atleast 2 1’s
d. Atleast 20’s
Identify the Language of Finite Automata
accepting {0,1}
a. Atleast 2 0’s
b. Exactly 2 0’s
c. Atmost 20’s
d. Even 0’s
Identify the Language{a,b}- here q0,q1,and
Q2 are final accepting states
• Language ending with aaa
• Language contains aa
• Language that does not contain
3 consecutive a’s
• Language ending with b
Find the appropriate answer {a,b}
• Accepts ab
• Accepts aaab
• Ending with b
• Accepts aab
• Predict the number of transitions required to automate the
following language using only 3 states:
L = {w | w ends with 00}
a) 3
b) 2
c) 4
d) Cannot be said
• What is the relation between NFA-accepted languages and
DFA accepted languages?
a) >
b) <
c) =
d) <=
How many states will be formed when
minimized DFA will be constructed

•3
•4
•5
•6
• In mealy machine, the O/P
depends upon?
a) State
b) Previous State
c) State and Input
d) Only Input
• .The ratio of number of input to the number of output in a
mealy machine can be given as:
a) 1
b) n: n+1
c) n+1: n
d) none of the mentioned
• How many strings of length less than 4 contains the
language described by the regular expression
(x+y)*y(a+ab)*?
a) 7
b) 10
c) 12
d) 11

• ANSWER 12
Identify the language
• Atleast 2 a’s
• Even a’s
• Atmost 2 a’s
• Exactly 2 a’s
Identify the language
• Starts with a
• Ends with a
• Starts and ends with same
symbol
• Starts and ends with different
symbol
Identify the language
• Starts with a
• Ends with a
• Starts and ends with same
symbol
• Starts and ends with different
symbol
NFA containing null moves
• What is the second step in • What is the Last step in
removing null moves between 2 removing null moves between 2
vertices(v1 and v2) vertices(v1 and v2)
• A. copy all transitions from v1 to • copy all transitions from v1 to v2
v2 • B. remove null move directly
• B. remove null move directly • Make v1 as final state if v2 is
• Make v1 as initial state final state
• none • none
1. By using Arden’s Theorem, the equation q1 = q1(ab + ba) + ^ can be 1. The regular expression corresponding to the equation q2 = 0*1 +
written as, q2(1) when an Arden’s Theorem is applied is ______________
a. q1= (a+ b)* a. (0*1)1*
b. q1= (abba)* b. (00)*
c. q1= (ab + ba)* c. (11)*
d. q1= (ab)* d. 0*1*
• How many strings of length • . If Σ = {a,b} and given productions are
less than 4 contains the • S→XaaX
language described by the
regular expression • X→aX| bX|Λ
(x+y)*y(a+ab)*?
• Then the above grammar defines the language
• a) 7 expressed by___________ regular expression
• b) 10 a. (a+b)*aa(a+b)*
• c) 12 b. (a+b)*a(a+b)*a
• d) 11 c. (a+b)*aa(a+b)*aa
d. (a+b)*aba+b)*
• Which of the following strings do not belong the • A grammar G = (V, T, P, S) in which T is
given regular expression?
(a)*(a+cba)
• a) Set of variables
a) aa
b) aaa
c) acba • b) Set of terminals
d) acbacba
• c) Set of variables and terminals

• d) None of these
• A context sensitive language is accepted by • A grammar G = (V, T, P, S) in which T is

• a) Finite automata • a) Set of variables

• b) Linear bounded automata • b) Set of terminals

• c) Both (a) and (b) • c) Set of variables and terminals

• d) None of these • d) None of these


• Which of the following is more powerful? • Which of the following relates to Chomsky
hierarchy?
a) Regular<CFL<CSL<Unrestricted
• a) PDA
b) CFL<CSL<Unrestricted<Regular
c) CSL<Unrestricted<CF<Regular
• b) Turing machine d) None of the mentioned

• c) Finite automata

• d) Context sensitive language


• A language is accepted by a push down automata if • Which of the following strings do not belong the
it is: given regular expression?
a) regular (a)*(a+cba)
b) context free a) aa
c) both (a) and (b) b) aaa
d) none of the mentioned c) acba
d) acbacba
• The symbols in a grammar that must be replaced by • While applying Pumping lemma
other Synbols are called:
over a language, we consider a
a. Productions string w that belong to L and
b. Terminals
fragment it into _________
parts.
c. Non-terminals
d. None of given
• a) 2
• b) 5
• c) 3
• d) 6
• If we select a string w such that • Question 3: There exists a language
w∈L, and w=xyz. Which of the L. We define a string w such that
following portions cannot be an w∈L and w=xyz and |w| >=n for
empty string? some constant integer n.What can
• a) x be the maximum length of the
substring xy i.e. |xy|<=?
• b) y
• a) n
• c) z
• b) |y|
• d) all of the mentioned
• c) |x|
• d) none of the mentioned
• : Answer in accordance to the
third and last statement in
pumping lemma:
• For all _______ xyiz ∈L
• a) i>0
• b) i<0
• c) i<=0
• d) i>=0

You might also like