Not Expected From Rohit
Not Expected From Rohit
html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Finite
AutomataIntroduction”.
1. Assume the R is a relation on a set A, aRb is partially ordered such that a and b are _____________
a) reflexive
b) transitive
c) symmetric
d) reflexive and transitive
View Answer
Answer: d
Explanation: A partially ordered relation refers to one which is Reflexive, Transitive and Antisymmetric.
advertisement
2. The non- Kleene Star operation accepts the following string of finite length over set A = {0,1} | where
string s contains even number of 0 and 1 a) 01,0011,010101
b) 0011,11001100
c) ε,0011,11001100
d) ε,0011,11001100
View Answer
Answer: b
3. A regular language over an alphabet ∑ is one that cannot be obtained from the basic languages using the
operation
a) Union
b) Concatenation
c) Kleene*
d) All of the mentioned
View Answer
Answer: d
4. Statement 1: A Finite automata can be represented graphically; Statement 2: The nodes can be its states;
Statement 3: The edges or arcs can be used for transitions Hint: Nodes and Edges are for trees and forests
too. Which of the following make the correct combination?
a) Statement 1 is false but Statement 2 and 3 are correct
b) Statement 1 and 2 are correct while 3 is wrong
c) None of the mentioned statements are correct
d) All of the mentioned
5. The minimum number of states required to recognize an octal number divisible by 3 are/is a) 1
b) 1
c) 1
file:///C:/Users/gurun/Desktop/data.html 1/358
9/16/2020 data.html
advertisement
7. If an Infinite language is passed to Machine M, the subsidiary which gives a finite solution to the infinite
input tape is ______________ a) Compiler
b) Interpreter
c) Loader and Linkers
d) None of the mentioned
8. The number of elements in the set for the Language L={xϵ(∑r) *|length if x is at most 2} and ∑={0,1}
is_________ a) 7
b) 6
c) 8
d) 5
View Answer - Answer: a
9. For the following change of state in FA, which of the following codes is an incorrect option?
a) δ (m, 1) =n
b) δ (0, n) =m
c) δ (m,0) =ε
d) s: accept = false; cin >> char;if char = “0” goto n;
file:///C:/Users/gurun/Desktop/data.html 2/358
9/16/2020 data.html
advertisement
Recommended Posts:
1. Computer Science Questions and Answers
2. C Algorithms, Problems & Programming Examples
3. Artificial Intelligence Questions and Answers
4. Software Architecture & Design Questions and Answers
5. Cryptography and Network Security Questions and Answers
6. Control Systems Questions and Answers
7. Discrete Mathematics Questions and Answers
8. Ruby Programming Questions and Answers
9. VLSI Questions and Answers
10. Geotechnical Engineering Questions and Answers
11. Home
12. Theory of Machines Questions and Answers
13. C++ Programming Examples on Set & String Problems & Algorithms 14. Electromagnetic Theory
Questions and Answers
15. Java Programming Examples on Set & String Problems & Algorithms
16. C Programming Examples on Set & String Problems & Algorithms
17. Compilers Questions and Answers
18. Network Theory Questions and Answers
19. Automata Theory Questions and Answers
20. Automata Theory Questions and Answers – Programming Techniques-Storage and Subroutines
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Moore Machine”.
Answer: b
file:///C:/Users/gurun/Desktop/data.html 3/358
9/16/2020 data.html
Explanation: Finite automaton with an output is categorize din two parts: Moore M/C and Mealy M/C.
advertisement
Answer: b
Explanation: Moore machine produces an output over the change of transition states while mealy machine
does it so for transitions itself.
3. For a give Moore Machine, Given Input=’101010’, thus the output would be of length:
a) |Input|+1
b) |Input|
c) |Input-1|
d) Cannot be predictedView Answer
Answer: a
Explanation: Initial state, from which the operations begin is also initialized with a value.
Answer: a
Explanation: Even ε, when passed as an input to Moore machine produces an output.
advertisement
5. The total number of states and transitions required to form a moore machine that will produce residue mod
3.
a) 3 and 6
b) 3 and 5
c) 2 and 4
d) 2 and 5
View Answer
Answer: a
Explanation:
file:///C:/Users/gurun/Desktop/data.html 4/358
9/16/2020 data.html
Present State
Next State
Output
0
1
Q0
Q1
Q2
1
Q1
Q2
advertisement
1
Q2
Q0
a) Q0, Q2, 0
b) Q0, Q2, 1
c) Q1, Q2, 1
d) Q1, Q0, 0View Answer
Answer: a
Explanation: The table can be filled accordingly seeing the graph.
Answer: a
Explanation: The outputs are as per the input, produced.
Answer: b
file:///C:/Users/gurun/Desktop/data.html 5/358
9/16/2020 data.html
Explanation: Source-The tuple definition of Moore and mealy machine comprises one new member i.e.
output alphabet as these are finite machines with output.
advertisement
Answer: a
Explanation: Op(t)=δ(Op(t)) is the defined definition of how the output is received on giving a specific input
to Moore machine.
10. Which of the following is a correct statement?
a) Moore machine has no accepting states
b) Mealy machine has accepting states
c) We can convert Mealy to Moore but not vice versa
d) All of the mentionedView Answer
Answer: a
Explanation: Statement a and b is correct while c is false. Finite machines with output have no accepting
states and can be converted within each other.
Recommended Posts:
1. VLSI Questions and Answers
2. Computer Science Questions and Answers
3. Wireless & Mobile Communications Questions & Answers
4. Geotechnical Engineering Questions and Answers
5. Network Theory Questions and Answers
6. VHDL Questions and Answers
7. Machine Dynamics Questions and Answers
8. Machine Design Questions and Answers
9. Machine Drawing Questions and Answers
10. Compilers Questions and Answers
11. Electromagnetic Theory Questions and Answers
12. Machine Kinematics Questions and Answers
13. Theory of Machines Questions and Answers
14. Machine Tools & Machining Questions and Answers
15. Java Programming Examples on Set & String Problems & Algorithms 16. C Programming Examples
on Set & String Problems & Algorithms
file:///C:/Users/gurun/Desktop/data.html 6/358
9/16/2020 data.html
17. C++ Programming Examples on Set & String Problems & Algorithms
18. Automata Theory Questions and Answers
19. Automata Theory Questions and Answers – Uses of Epsilon-Transitions
20. Automata Theory Questions and Answers – From Grammars to Push Down Automata
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Mealy Machine”.
1. In mealy machine, the O/P depends upon?
a) State
b) Previous State
c) State and Input
d) Only InputView Answer
Answer: c
Explanation: Definition of Mealy Machine.
advertisement
Answer: c
Explanation: Finite Automaton with Output has a common definition for both the categories.
a) 9’s Complement
b) 2’s Complement
c) 1’s Complement
d) 10’s ComplementView Answer
Answer: b
Explanation: The input can be taken in form of a binary string and can be verified.
file:///C:/Users/gurun/Desktop/data.html 7/358
9/16/2020 data.html
b) Op(t)= δ(Op(t)i(t))
c) Op(t): ∑
d) None of the mentionedView Answer
Answer: b
Explanation: The output of mealy machine depends on the present state as well as the input to that state.
advertisement
5.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
View Answer
Answer: a
Explanation: The number of output here follows the transitions in place of states as in Moore machine.
Answer: b
Explanation: They are collectively known as Transducers.
Answer: a
Explanation: Mealy and Moore machine vary over how the outputs depends on prior one (transitions) and on
the latter one(states).
advertisement
Answer: a
Explanation: Being an input dependent and output capable FSM, Mealy machine reacts faster to inputs.
file:///C:/Users/gurun/Desktop/data.html 8/358
9/16/2020 data.html
a) 9’s Complement
b) 2’s Complement
c) 1’s Complement
d) 10’s ComplementView Answer
Answer: c
Explanation: Inputs can be taken and can be verified.
Answer: d
Explanation: It does not produce a language or a grammar or can be converted to a NFA.
advertisement
Recommended Posts:
1. VLSI Questions and Answers
2. Information Science Questions and Answers
3. Agricultural Engineering Questions and Answers
4. Discrete Mathematics Questions and Answers
5. Artificial Intelligence Questions and Answers
6. Computer Science Questions and Answers
7. Compilers Questions and Answers
8. Java Programming Examples on Set & String Problems & Algorithms
9. Network Theory Questions and Answers
10. Machine Dynamics Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 9/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Mealy Machine-
II”.
1. Which of the following does not belong to input alphabet if S={a, b}* for any language?
a) a
b) b
c) e
d) none of the mentionedView Answer
Answer: c
Explanation: The automaton may be allowed to change its state without reading the input symbol using
epsilon but this does not mean that epsilon has become an input symbol. On the contrary, one assumes that
the symbol epsilon does not belong to any alphabet.
advertisement
Answer: b
Explanation:
file:///C:/Users/gurun/Desktop/data.html 10/358
9/16/2020 data.html
Answer: b
Explanation: An e-NFA consist of 5 tuples: A=(Q, S, d, q0. F)
Note: e is never a member of S.
Answer: c
Explanation: It is more convenient to simulate a machine using e-NFA else the method of Power
Construction is used from the union-closure of DFA’s.
file:///C:/Users/gurun/Desktop/data.html 11/358
9/16/2020 data.html
Answer: b
Explanation: The epsilon closure of the set q is the set that contains q, together with all the states which can
be reached starting at q by following only epsilon transitions.
7. The number of elements present in the e-closure(f2) in the given diagram:
a) 0
b) 1
c) 2
d) 3
View Answer
Answer: c
Explanation: The epsilon closure set of f2 consist of the elements:{f2, f3}. Thus the count of the element in
the closure set is 2.
advertisement
8. Which of the steps are non useful while eliminating the e-transitions for the given diagram?
file:///C:/Users/gurun/Desktop/data.html 12/358
9/16/2020 data.html
Answer: d
Explanation: The given are the steps followed while eliminating epsilon transitions from a NFA or
converting an e-NFA to just NFA.
9. Is the language preserved in all the steps while eliminating epsilon transitions from a NFA?
a) yes
b) no
View Answer
Answer: a
Explanation: Yes, the language is preserved during the dteps of construction: L(N)=L(N1)=L(N2)=L(3).
10. Remove all the epsilon transitions in the given diagram and compute the number of a-transitions in the
result?
a) 5
b) 7
c) 9
d) 6
View Answer
file:///C:/Users/gurun/Desktop/data.html 13/358
9/16/2020 data.html
Answer: b
Explanation:
advertisement
Recommended Posts:
1. VLSI Questions and Answers
2. Information Science Questions and Answers
3. Computer Science Questions and Answers
4. C Algorithms, Problems & Programming Examples
5. Artificial Intelligence Questions and Answers
6. Chemical Engineering Questions and Answers
7. CSS Questions and Answers
8. C++ Programming Examples on Set & String Problems & Algorithms
9. Discrete Mathematics Questions and Answers
10. Machine Dynamics Questions and Answers
11. Machine Design Questions and Answers
12. Machine Kinematics Questions and Answers
13. Machine Tools & Machining Questions and Answers
14. Machine Drawing Questions and Answers
15. Solid State Chemistry Questions and Answers
16. Electromagnetic Theory Questions and Answers
17. Network Theory Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 14/358
9/16/2020 data.html
This set of Automata Theory Interview Questions and Answers focuses on “Deterministic Finite
AutomataIntroduction and Definition”.
Answer: b
Explanation: Bounded information refers to one whose output is limited and it cannot be said what were the
recorded outputs previously until memorized.
advertisement
Answer: b
Explanation: A language for which there is no existence of a deterministic finite automata is always Non
Regular and methods like Pumping Lemma can be used to prove the same.
Answer: d
Explanation: A DFA can be represented in the following formats: Transition Graph, Transition Table,
Transition tree/forest/Any programming Language.
file:///C:/Users/gurun/Desktop/data.html 15/358
9/16/2020 data.html
Answer: a
Explanation: Strings such as {1101,101,10101} are being accepted while {1001,11001} are not. Thus, this
conclusion leads to option a.
advertisement
Answer: c
Explanation: Two states are said to be equivalent if and only if they have same number of states as well as
transitions.
Answer: c
Explanation: The figure represents the initial as well as the final state with an iteration of x.
file:///C:/Users/gurun/Desktop/data.html 16/358
9/16/2020 data.html
a) ababaabaa
b) abbbaa
c) abbbaabb
d) abbaabbaaView Answer
Answer: a
Explanation: All the Strings are getting accepted except ‘ababaabaa’ as it is directed to dumping state.
Dumping state also refers to the reject state of the automata.
advertisement
a) ε
b) 11010
c) 10001010
d) String of letter count 11View Answer
Answer: a
Explanation: As the initial state is not made an acceptance state, thus ε will not be accepted by the given
DFA. For the automata to accept ε as an entity, one should make the initial state as also the final state.
Answer: b
Explanation: Language to accept a palindrome number or string will be non-regular and thus, its DFA cannot
be obtained. Though, PDA is possible.
10. Which of the following is not an example of finite state machine system?
a) Control Mechanism of an elevator
b) Combinational Locks
c) Traffic Lights
d) Digital WatchesView Answer
Answer: d
Explanation: Proper and sequential combination of events leads the machines to work in hand which includes
The elevator, Combinational Locks, Traffic Lights, vending machine, etc. Other applications of Finite
machine state system are Communication Protocol Design, Artificial Intelligence Research, A Turnstile, etc.
advertisement
Recommended Posts:
1. VLSI Questions and Answers
2. Solid State Chemistry Questions and Answers
3. Artificial Intelligence Questions and Answers
4. Ruby Programming Questions and Answers
5. C Algorithms, Problems & Programming Examples
6. C# Questions and Answers
7. Home
8. C Programming Examples on Strings
9. Python Questions and Answers
10. PHP Questions and Answers
11. C# Programming Examples on Strings
12. Electromagnetic Theory Questions and Answers
13. Java Programming Examples on String Handling
14. Theory of Machines Questions and Answers
15. Network Theory Questions and Answers
16. Java Programming Examples on Set & String Problems & Algorithms
17. Compilers Questions and Answers
18. C Programming Examples on Set & String Problems & Algorithms
19. C++ Programming Examples on Set & String Problems & Algorithms 20. Automata Theory
Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 18/358
9/16/2020 data.html
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “DFA Processing
Strings”.
1. The password to the admins account=”administrator”. The total number of states required to make a
password-pass system using DFA would be __________ a) 14 states
b) 13 states
c) 12 states
d) A password pass system cannot be created using DFAView Answer
Answer: a
Explanation: For a string of n characters with no repetitive substrings, the number of states required to pass
the string is n+1.
advertisement
Answer: b
Explanation: The Language can be anonymously checked and thus the answer can be predicted. The
language needs to be accepted by the automata (acceptance state) in order to prove its regularity.
3. Let ∑= {a, b, …. z} and A = {Hello, World}, B= {Input, Output}, then (A*∩B) U (B*∩A) can be
represented as:
a) {Hello, World, Input, Output, ε}
file:///C:/Users/gurun/Desktop/data.html 19/358
9/16/2020 data.html
b) {Hello, World, ε}
c) {Input, Output, ε}
d) {}
View Answer
Answer: d
Explanation: Union operation creates the universal set by combining all the elements of first and second set
while intersection operation creates a set of common elements of the first and the second state.
4. Let the given DFA consist of x states. Find x-y such that y is the number of states on minimization of
DFA?
a) 3
b) 2
c) 1
d) 4
View Answer
Answer: b
Explanation: Use the equivalence theorem or Myphill Nerode theorem to minimize the DFA.
advertisement
5. For a machine to surpass all the letters of alphabet excluding vowels, how many number of states in DFA
would be required? a) 3
b) 2
c) 22
d) 27
View Answer
Answer: a
Explanation:
file:///C:/Users/gurun/Desktop/data.html 20/358
9/16/2020 data.html
Answer: d
Explanation: The string a state receives is the combination of all input alphabets which lie across the path
covered.
Answer: b
Explanation: DFA can be made for infinite language with an infinite length. Thus, dependency over length is
unfruitful.
advertisement
8. Given:
L= {xϵ∑= {0,1} |x=0n1n for n>=1}; Can there be a DFA possible for the language?
a) Yes
b) No View
Answer
Answer: b
Explanation: It is not possible to have a count of equal number of 0 and 1 at any instant in DFA. Thus, It is
not possible to build a DFA for the given Language.
9. δ(A,1) = B, δ(A,0) =A Δ
(B, (0,1)) =C δ(C,0) = A
(Initial state =A)
String=”011001” is transit at which of the states?
a) A
b) C
c) B
d) Invalid StringView Answer
Answer: a
Explanation: It is east and simple to create the table and then the corresponding transition graph in order to
get the result, at which state the given string would be accepted.
« Prev - Automata Theory Questions and Answers – Deterministic Finite Automata-Introduction and
Definition
» Next - Automata Theory Questions and Answers – Simpler Notations
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Deterministic Finite Automata-Introduction and Definition
Automata Theory Questions and Answers – Simpler Notations
advertisement
advertisement
Recommended Posts:
1. Artificial Intelligence Questions and Answers
2. Computer Science Questions and Answers
3. LISP Questions and Answers
4. Solid State Chemistry Questions and Answers
5. Java Programming Examples on Java.Lang
6. Java Programming Examples on String Handling
7. Compilers Questions and Answers
8. Java Programming Examples on Set & String Problems & Algorithms
9. Theory of Machines Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 22/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Simpler
Notations”.
file:///C:/Users/gurun/Desktop/data.html 23/358
representation notate the same?
a)
advertisement
b)
c)
d)
View Answer
Answer: a
Explanation: The states transited has been written corresponding to the transitions as per the row and
column. The row represents the transitions made and the ultimate.
2.Let u=’1101’, v=’0001’, then uv=11010001 and vu= 00011101.Using the given information what is
the identity element for the string? a) u-1
b) v-1
c) u-1v-1
d) ε
View Answer
Answer: d
Explanation: Identity relation: εw = wε = w, thus the one satisfying the given relation will be the identity
element.
advertisement
file:///C:/Users/gurun/Desktop/data.html 24/358
9/16/2020 data.html
a) 0101011
b) 0101010
c) 010100
d) 100001View Answer
Answer: c
Explanation: The given DFA notation accepts the string of even length and prefix ‘01’.
4.Predict the following step in the given bunch of steps which accepts a strings which is of even length and
has a prefix=’01’
δ (q0, ε) =q0 < δ(q0,0) =δ (δ (q0, ε),0) =δ(q0,0) =q1 < _______________
a) δ (q0, 011) =δ (δ (q0,1), 1) =δ (q2, 1) =q3
b) δ (q0, 01) =δ (δ (q0, 0), 1) = δ (q1, 1) =q2
c) δ (q0, 011) =δ (δ (q01, 1), 1) =δ (q2, 0) =q3
d) δ (q0, 0111) =δ (δ (q0, 011), 0) = δ (q3, 1) =q2View Answer
Answer: b
Explanation: Here, δ refers to transition function and results into new state or function when an transition is
performed over its state.
a) Q0
b) Q1
c) Q2
d) No TransitionView Answer
Answer: Q1
Explanation: The tabular representation of DFA is quite readable and can be used to some ore complex
problems. Here, we need to form the transition graph and fill up the given blank.
advertisement
6.Which among the following is the missing transition in the given DFA?
L= {xϵ∑= {a, b} | x starts with a and ends with b}
file:///C:/Users/gurun/Desktop/data.html 25/358
9/16/2020 data.html
a) δ (q0, a) =q0
b) δ (F, a) =q1
c) δ (F, a) =D
d) δ (q1, a) =DView Answer
Answer: b
Explanation: For the given Language, the transition missing is δ (F, a) =q1.
7.The complement of a language will only be defined when and only when the __________ over the
language is defined. a) String
b) Word
c) Alphabet
d) GrammarView Answer
Answer: c
Explanation: It is not possible to define the complement of a language without defining the input alphabets.
Example: A language which does not consist of substring ‘ab’ while the complement would be the language
which does contain a substring ‘ab’.
Answer: Factorial
Explanation: Factorial, here is the most appropriate non-infinite domain. Otherwise, palindrome and reverse
have infinite domains.
9.Which among the following states would be notated as the final state/acceptance state?
L= {xϵ∑= {a, b} | length of x is 2}
file:///C:/Users/gurun/Desktop/data.html 26/358
9/16/2020 data.html
a) q1
b) q2
c) q1, q2
d) q3
View Answer
Answer: b
Explanation: According to the given language, q2 Is to become the final/acceptance state in order to satisfy.
advertisement
10.Which of the following are the final states in the given DFA according to the Language given.?
L= {xϵ∑= {a, b} |length of x is at most 2}
a) q0, q1
b) q0, q2
c) q1, q2
d) q0, q1, q2View Answer
Answer: d
Explanation: According to the given language, the length is at most 2, thus the answer is found accordingly.
file:///C:/Users/gurun/Desktop/data.html 27/358
9/16/2020 data.html
Sanfoundry Global Education & Learning Series – Automata Theory.
To practice all areas of Automata Theory, here is complete set of 1000+ Multiple Choice Questions and
Answers.
Recommended Posts:
1. Information Science Questions and Answers
2. Artificial Intelligence Questions and Answers
3. Computer Science Questions and Answers
4. C# Programming Examples on Strings
5. Java Programming Examples on Set & String Problems & Algorithms
6. Compilers Questions and Answers
7. Solid State Chemistry Questions and Answers
8. C Programming Examples on Strings
9. Java Programming Examples on String Handling
10. Theory of Machines Questions and Answers
11. C++ Programming Examples on Set & String Problems & Algorithms
12. Electromagnetic Theory Questions and Answers
13. C Programming Examples on Set & String Problems & Algorithms
14. Network Theory Questions and Answers
15. Automata Theory Questions and Answers
16. Automata Theory Questions and Answers – Uses of Epsilon-Transitions
17. Automata Theory Questions and Answers – Testing Emptiness and Membership
18. Automata Theory Questions and Answers – Pumping Lemma for Regular Language
19. Automata Theory Questions and Answers – Regular Expression-Introduction 20. Automata Theory
Questions and Answers – Moore Machine
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “The Language of
DFA”
Answer: b
Explanation: Q is the Finite set of states, whose elements i.e. the states constitute the finite automata.
Answer: a
Explanation: δ or the Transition function describes the best, how a DFA behaves on a string where to transit
next, which direction to take.
Answer: b
Explanation: As the question has dot operation, ε will not be a part of the concatenated set. Had it been a
union operation, ε would be a part of the operated set.
advertisement
5. For a DFA accepting binary numbers whose decimal equivalent is divisible by 4, what are all the possible
remainders? a) 0
b) 0,2
c) 0,2,4
d) 0,1,2,3View Answer
Answer: d
Explanation: All the decimal numbers on division would lead to only 4 remainders i.e. 0,1,2,3 (Property of
Decimal division).
6. Which of the following x is accepted by the given DFA (x is a binary string ∑= {0,1})?
file:///C:/Users/gurun/Desktop/data.html 29/358
9/16/2020 data.html
a) divisible by 3
b) divisible by 2
c) divisible by 2 and 3
d) divisible by 3 and 2
View Answer
Answer: d
Explanation: The given DFA accepts all the binary strings such that they are divisible by 3 and 2.Thus, it can
be said that it also accepts all the strings which is divisible by 6.
7. Given:
L1= {xϵ ∑*|x contains even no’s of 0’s}
L2= {xϵ ∑*|x contains odd no’s of 1’s}
No of final states in Language L1 U L2?
a) 1
b) 2
c) 3
d) 4
View Answer
Answer: c
Explanation:
file:///C:/Users/gurun/Desktop/data.html 30/358
9/16/2020 data.html
advertisement
8. The maximum number of transition which can be performed over a state in a DFA?
∑= {a, b, c} a) 1
b) 2
c) 3
d) 4
View Answer
Answer: c
Explanation: The maximum number of transitions which a DFA allows for a language is the number of
elements the transitions constitute.
9. 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) depends on the LanguageView Answer
Answer: d
Explanation: The out degree for a DFA I fixed while the in degree depends on the number of states in the
DFA and that cannot be determined without the dependence over the Language.
10. The sum of minimum and maximum number of final states for a DFA n states is equal to:
a) n+1
b) n
c) n-1
d) n+2View Answer
Answer: a
Explanation: The maximum number of final states for a DFA can be total number of states itself and
minimum would always be 1, as no DFA exits without a final state. Therefore, the solution is n+1.
advertisement
file:///C:/Users/gurun/Desktop/data.html 31/358
9/16/2020 data.html
« Prev - Automata Theory Questions and Answers – Simpler Notations
» Next - Automata Theory Questions and Answers – Finite Automata
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Simpler Notations
Automata Theory Questions and Answers – Finite Automata
advertisement
advertisement
Recommended Posts:
1. Geotechnical Engineering Questions and Answers
2. Artificial Intelligence Questions and Answers
3. Hydraulic Machines Questions and Answers
4. Information Science Questions and Answers
5. Thermodynamics Questions and Answers
6. Computer Science Questions and Answers
7. Simple Java Programs
8. Electric Circuits Questions and Answers
9. Ruby Programming Questions and Answers
10. VLSI Questions and Answers
11. Simple C Programs
12. Discrete Mathematics Questions and Answers
13. Java Programming Examples on Set & String Problems & Algorithms 14. Theory of Machines
Questions and Answers
15. C++ Programming Examples on Set & String Problems & Algorithms
16. Electromagnetic Theory Questions and Answers
17. Compilers Questions and Answers
18. C Programming Examples on Set & String Problems & Algorithms
19. Network Theory Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular Language
& Expression”.
Answer:d
Explanation: Inputs are state and input string output is states.
Answer:a
Explanation: This is minimal finite automata.
Answer:a
Explanation: This takes single state and string of input to produce a state.
5. δ*(q,ya) is equivalent to .
a) δ((q,y),a)
b) δ(δ*(q,y),a)
c) δ(q,ya)
d) independent from δ notationView Answer
Answer:b
Explanation: First it parse y string after that it parse a.
advertisement
Answer:c
Explanation: If automata starts with starting state and after finite moves if reaches to final step then it called
accepted.
7. Languages of a automata is
a) If it is accepted by automata
b) If it halts
c) If automata touch final state in its life time
d) All language are language of automataView Answer
Answer:a
Explanation: If a string accepted by automata it is called language of automata.
file:///C:/Users/gurun/Desktop/data.html 33/358
9/16/2020 data.html
8. Language of finite automata is.
a) Type 0
b) Type 1
c) Type 2
d) Type 3View Answer
Answer:d
Explanation: According to Chomsky classification.
Answer:b
Explanation: Finite automata doesn’t require any stack operation .
advertisement
Answer:d
Explanation: No final state requires.
11. Regular expression for all strings starts with ab and ends with bba is.
a) aba*b*bba
b) ab(ab)*bba
c) ab(a+b)*bba
d) All of the mentionedView Answer
Answer:c
Explanation: Starts with ab then any number of a or b and ends with bba.
12. How many DFA’s exits with two states over input alphabet {0,1} ?
a) 16
b) 26
c) 32
d) 64
View Answer
Answer:d
Explanation: Number of DFA’s = 2n * n(2*n).
13. The basic limitation of finite automata is that
a) It can’t remember arbitrary large amount of information.
b) It sometimes recognize grammar that are not regular.
c) It sometimes fails to recognize regular grammar.
d) All of the mentionedView Answer
Answer:a
file:///C:/Users/gurun/Desktop/data.html 34/358
9/16/2020 data.html
Explanation:Because there is no memory associated with automata.
advertisement
14. Number of states require to simulate a computer with memory capable of storing ‘3’ words each of
length ‘8’. a) 3 * 28
b) 2(3*8)
c) 2(3+8)
d) None of the mentionedView Answer
Answer:b
Explanation: 2(m*n) states requires .
15. FSM with output capability can be used to add two given integer in binary representation. This is
a) True
b) False
c) May be true
d) None of the mentionedView Answer
Answer:a
Explanation: Use them as a flip flop output .
Recommended Posts:
1. Computer Science Questions and Answers
2. C# Programming Examples on Strings
3. C# Programming Examples on Functions
4. R Programming Questions and Answers
5. Ruby Programming Questions and Answers
6. Discrete Mathematics Questions and Answers
7. LISP Questions and Answers
8. C Programming Examples on Strings
9. VLSI Questions and Answers
10. C Questions and Answers
11. C++ Questions and Answers
12. C Algorithms, Problems & Programming Examples
13. Theory of Machines Questions and Answers
14. Compilers Questions and Answers
15. Electromagnetic Theory Questions and Answers
16. Network Theory Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 35/358
9/16/2020 data.html
17. Java Programming Examples on Set & String Problems & Algorithms
18. C++ Programming Examples on Set & String Problems & Algorithms
19. C Programming Examples on Set & String Problems & Algorithms 20. Automata Theory Questions
and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Non Deterministic
Finite Automata – Introduction”
Answer: a
Explanation: Statement 1 and 2 always true for a given Language.
advertisement
Answer: a
Explanation: Construct the DFA and NFA individually, and the attain the difference of states.
Answer: c
Explanation: A transducer is an automaton that produces an output on the basis of what input has been given
currently or previous state.
4. If NFA of 6 states excluding the initial state is converted into DFA, maximum possible number of
states for the DFA is ? a) 64
b) 32
c) 128
d) 127
file:///C:/Users/gurun/Desktop/data.html 36/358
9/16/2020 data.html
View Answer
Answer: c
Explanation: The maximum number of sets for DFA converted from NFA would be not greater than 2n.
Answer: b
Explanation: Non deterministic or deterministic depends upon the definite path defined for the transition
from one state to another or undefined(multiple paths).
advertisement
Answer: b
Explanation: DFA is a specific case of NFA.
Answer: a
Explanation: The individual Transition graphs can be made and the difference of transitions can be
determined.
8. The construction time for DFA from an equivalent NFA (m number of node)is:
a) O(m2)
b) O(2m)
c) O(m)
d) O(log m)View Answer
Answer: b
Explanation: From the coded NFA-DFA conversion.
advertisement
9. If n is the length of Input string and m is the number of nodes, the running time of DFA is x that of
NFA.Find x? a) 1/m2
b) 2m
c) 1/m
file:///C:/Users/gurun/Desktop/data.html 37/358
9/16/2020 data.html
d) log mView Answer
Answer: a
Explanation: Running time of DFA: O(n) and Running time of NFA =O(m 2n).
10. Which of the following option is correct?
a) NFA is slower to process and its representation uses more memory than DFA
b) DFA is faster to process and its representation uses less memory than NFA
c) NFA is slower to process and its representation uses less memory than DFA
d) DFA is slower to process and its representation uses less memory than NFAView Answer
Answer: c
Explanation: NFA, while computing strings, take parallel paths, make different copies of input and goes
along different paths in order to search for the result. This creates the difference in processing speed of DFA
and NFA.
Recommended Posts:
1. Information Science Questions and Answers
2. Computer Science Questions and Answers
3. Java Programming Examples on Set & String Problems & Algorithms
4. Compilers Questions and Answers
5. Theory of Machines Questions and Answers
6. C++ Programming Examples on Set & String Problems & Algorithms
7. C Programming Examples on Set & String Problems & Algorithms
8. Network Theory Questions and Answers
9. Electromagnetic Theory Questions and Answers
10. Automata Theory Questions and Answers
11. Automata Theory Questions and Answers – PDA-Acceptance by Final State
12. Automata Theory Questions and Answers – Regular Expression-Introduction
13. Automata Theory Questions and Answers – Applications of DFA
14. Automata Theory Questions and Answers – Conversion by Eliminating states
15. Automata Theory Questions and Answers – Extended Transition Function
16. Automata Theory Questions and Answers – From PDA to Grammars
17. Automata Theory Questions and Answers – Moore Machine
18. Automata Theory Questions and Answers – Uses of Epsilon-Transitions
19. Automata Theory Questions and Answers – Non Deterministic Polynomial Time
20. Automata Theory Questions and Answers – Non Deterministic Turing Machines
advertisement
file:///C:/Users/gurun/Desktop/data.html 38/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Extended
Transition Function”.
Answer: a
Explanation: For NFA or extended transition function on NFA, the tuple elements remains same i.e. 5.
advertisement
a) Correct
b) Incorrect, Incomplete DFA
c) Wrong proposition
d) May be correctView Answer
Answer: c
Explanation: The given figure is an NFA. The statement contradicts itself.
Answer: c
Explanation: q3 does not belong to Q where Q= set of finite states.
4. If δ is the transition function for a given NFA, then we define the δ’ for the DFA accepting the same
language would be:
Note: S is a subset of Q and a is a symbol.
a) δ’ (S, a) =Upϵs δ (p, a)
b) δ’ (S, a) =Up≠s δ (p, a)
c) δ’ (S, a) =Upϵs δ(p)
d) δ’ (S) =Up≠s δ(p) View Answer
file:///C:/Users/gurun/Desktop/data.html 39/358
9/16/2020 data.html
Answer: a
Explanation: According to subset construction, equation 1 holds true.
5. What is the relation between DFA and NFA on the basis of computational power?
a) DFA > NFA
b) NFA > DFA
c) Equal
d) Can’t be saidView Answer
Answer: c
Explanation: DFA is said to be a specific case of NFA and for every NFA that exists for a given language, an
equivalent DFA also exists.
advertisement
6. If a string S is accepted by a finite state automaton, S=s1s2s3……sn where siϵ∑ and there exists a
sequence of states r0, r1, r2…… rn such that δ(r(i), si+1) =ri+1 for each 0, 1, …n-1, then r(n) is: a)
initial state
b) transition symbol
c) accepting state
d) intermediate stateView Answer
Answer: c
Explanation: r(n) is the final state and accepts the string S after the string being traversed through r(i) other
states where I ϵ 01,2…(n-2).
7. According to the given table, compute the number of transitions with 1 as its symbol but not 0:
a) 4
b) 3
c) 2
d) 1
View Answer
Answer: d
Explanation: The transition graph is made and thus the answer can be found.
a) {q0}
b) {q1} U {q0, q1, q2}
c) {q2, q1}
d) {q3, q1, q2, q0}
View Answer
Answer: b
file:///C:/Users/gurun/Desktop/data.html 40/358
9/16/2020 data.html
a) 6
b) 5
c) 4
d) 7
View Answer
Answer: a
Explanation: According to the question, presence of q2 or q1 would count so it does and the answer
according to the diagram is 6.
advertisement
1.Δ(Q0, ε) ={Q0},
2.Δ(Q0, 01) = {Q0, Q1}
3.δ(Q0, 010) =?
Answer: c
Explanation: According to given table and extended transition state implementation, we can find the state at
which it rests.
file:///C:/Users/gurun/Desktop/data.html 41/358
9/16/2020 data.html
To practice all areas of Automata Theory, here is complete set of 1000+ Multiple Choice Questions and
Answers.
« Prev - Automata Theory Questions and Answers – Non Deterministic Finite Automata – Introduction
» Next - Automata Theory Questions and Answers – The Language of NFA
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Non Deterministic Finite Automata – Introduction
Automata Theory Questions and Answers – The Language of NFA
advertisement
advertisement
Recommended Posts:
1. Discrete Mathematics Questions and Answers
2. Aerodynamics Questions and Answers
3. VLSI Questions and Answers
4. RDBMS Questions and Answers
5. SQL Server Questions and Answers
6. Solid State Chemistry Questions and Answers
7. Theory of Machines Questions and Answers
8. Electromagnetic Theory Questions and Answers
9. Java Programming Examples on Set & String Problems & Algorithms 10. C Programming Examples
on Set & String Problems & Algorithms
11. C++ Programming Examples on Set & String Problems & Algorithms
12. Compilers Questions and Answers
13. Network Theory Questions and Answers
14. Automata Theory Questions and Answers
15. Automata Theory Questions and Answers – Operators of Regular Expression
16. Theory of Computation – Nondeterministic Finite Automata (NFA) – Definitions, Programming,
Examples
17. Automata Theory Questions and Answers – Simpler Notations
18. Automata Theory Questions and Answers -Turing Machine and Halting
19. Compilers Questions and Answers – Finite Automata – 1
20. Automata Theory Questions and Answers – Conversion by Eliminating states
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “The Language of
NFA”.
2. Given Language:
Ln= {xϵ {0,1} * | |x|≥n, nth symbol from the right in x is 1}
How many state are required to execute L3 using NFA? a)
16
b) 15
c) 8
d) 7
View Answer
Answer: b
Explanation: The finite automaton for the given language is made and thus, the answer can be obtained.
Answer: c
Explanation: The given diagram can be analysed and thus the option can be seeked.
4. The number of transitions required to convert the following into equivalents DFA:
a) 2
b) 3
c) 1
d) 0
file:///C:/Users/gurun/Desktop/data.html 43/358
9/16/2020 data.html
View Answer
Answer: a
Explanation:
advertisement
Answer: a
Explanation: If L is a regular Language, Lc and Lr both are regular even.
6. In NFA, this very state is like dead-end non final state:
a) ACCEPT
b) REJECT
c) DISTINCT
d) STARTView Answer
Answer: b
Explanation: REJECT state will be like a halting state which rejects a particular invalid input.
Answer: a
Explanation: We can represent one language in more one FSMs, example for a same language we have a
DFA and an equivalent NFA.
advertisement
Answer: b
Explanation: The production of form non-terminal ->ε is call null production.
Answer: d
Explanation: DFSM’s for the first three option is not possible; hence they aren’t regular.
10. Which of the following recognizes the same formal language as of DFA and NFA?
a) Power set Construction
b) Subset Construction
c) Robin-Scott Construction
d) All of the mentionedView Answer
Answer: d
Explanation: All the three option refers to same technique if distinguishing similar constructions for different
type of automata.
advertisement
Recommended Posts:
1. PHP Questions and Answers
2. Computer Science Questions and Answers
3. Engineering Drawing Questions and Answers
4. C# Programming Examples on Strings
5. Python Programming Examples on Stacks & Queues
6. Java Programming Examples on String Handling
7. Python Questions and Answers
8. Bioprocess Engineering Questions and Answers
9. C# Programming Examples on Data Structures
10. C Programming Examples on Strings
11. Home
12. C# Programming Examples on Functions
13. Java Programming Examples on Set & String Problems & Algorithms 14. Theory of Machines
Questions and Answers
15. C++ Programming Examples on Set & String Problems & Algorithms
16. C Programming Examples on Set & String Problems & Algorithms
17. Electromagnetic Theory Questions and Answers
18. Compilers Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 45/358
9/16/2020 data.html
19. Network Theory Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Equivalence of
NFA and DFA”.
Answer: d
Explanation: NFA is said to be closed under the following operations:
a) Union
b) Intersection
c) Concatenation
d) Kleene
e) Negation
advertisement
2. It is less complex to prove the closure properties over regular languages using
a) NFA
b) DFA
c) PDA
d) Can’t be saidView Answer
Answer: a
Explanation: We use the construction method to prove the validity of closure properties of regular languages.
Thus, it can be observe, how tedious and complex is the construction of a DFA as compared to an NFA with
respect to space.
Answer: d
Explanation: There are many applications of finite automata, mainly in the field of Compiler Design and
Parsers and Search Engines.
4. John is asked to make an automaton which accepts a given string for all the occurrence of ‘1001’ in it.
How many number of transitions would John use such that, the string processing application works? a) 9
b) 11
c) 12
d) 15
file:///C:/Users/gurun/Desktop/data.html 46/358
9/16/2020 data.html
View Answer
Answer: a
Explanation:
advertisement
Answer: c
Explanation: Thompson Construction method is used to turn a regular expression in an NFA by fragmenting
the given regular expression through the operations performed on the input alphabets.
6. Which among the following can be an example of application of finite state machine(FSM)?
a) Communication Link
b) Adder
c) Stack
d) None of the mentionedView Answer
Answer: a
Explanation: Idle is the state when data in form of packets is send and returns if NAK is received else waits
for the NAK to be received.
Answer: d
Explanation: Finite state automation is used in Lexical Analyser, Computer BOT (used in games), State
charts, etc.
advertisement
Answer: a
file:///C:/Users/gurun/Desktop/data.html 47/358
9/16/2020 data.html
Explanation:
9. 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 saidView Answer
Answer: a
Explanation:
10. The total number of states to build the given language using DFA:
L= {w | w has exactly 2 a’s and at least 2 b’s} a) 10
b) 11
c) 12
d) 13
View Answer
Answer: a
Explanation: We need to make the number of a as fixed i.e. 2 and b can be 2 or more. Thus, using this
condition a finite automata can be created using 1 states.
advertisement
Recommended Posts:
1. Computational Fluid Dynamics Questions and Answers
2. Information Science Questions and Answers
3. Numerical Methods Questions and Answers
4. C Algorithms, Problems & Programming Examples
5. C Programming Examples on Strings
6. Computer Science Questions and Answers
7. Prestressed Concrete Structures Questions and Answers
8. VLSI Questions and Answers
9. Java Programming Examples on String Handling
10. Engineering Drawing Questions and Answers
11. C# Programming Examples on Functions
12. Geotechnical Engineering Questions and Answers
13. Theory of Machines Questions and Answers
14. Electromagnetic Theory Questions and Answers
15. Network Theory Questions and Answers
16. Java Programming Examples on Set & String Problems & Algorithms
17. Compilers Questions and Answers
18. C Programming Examples on Set & String Problems & Algorithms
19. C++ Programming Examples on Set & String Problems & Algorithms 20. Automata Theory
Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Applications of
DFA”.
Answer: c
Explanation: The DFA for the given language can be constructed as follows:
file:///C:/Users/gurun/Desktop/data.html 49/358
9/16/2020 data.html
advertisement
Answer: a
Explanation: If the string is divisible by four, it surely ends with the substring ‘100’ while a binary string
divisible by 2 would surely end with the substring ‘10’.
3. Let L be a language whose FA consist of 5 acceptance states and 11 non final states. It further consists of a
dumping state. Predict the number of acceptance states in Lc. a) 16
b) 11
c) 5
d) 6
View Answer
Answer: a
Explanation: If L leads to FA1, then for Lc, the FA can be obtained by exchanging the final and non-final
states.
Answer: d
Explanation: It the closure property of Regular language which lays down the following statement:
If L1, L2 are 2- regular languages, then L1 U L2, L1 ∩ L2, L1C, L1 – L2 are regular language.
advertisement
Answer: a
Explanation: When set operation ‘-‘ is performed between two sets, it points to those values of prior set
which belongs to it but not to the latter set analogous to basic subtraction operation.
6. Which among the following NFA’s is correct corresponding to the given Language?
L= {xϵ {0, 1} | 3rd bit from right is 0}
file:///C:/Users/gurun/Desktop/data.html 50/358
9/16/2020 data.html
a)
b)
file:///C:/Users/gurun/Desktop/data.html 51/358
9/16/2020 data.html
c)
d) None of the mentioned
View Answer
Answer: a
Explanation: The NFA accepts all binary strings such that the third bit from right end is 1 and if not, is send
to Dumping state. Note: It is assumed that the input is given from the right end bit by bit.
Answer: c
Explanation: While the machine runs on some input string, if it has the choice to split, it goes in all possible
way and each one is different copy of the machine. The machine takes subsequent choice to split further
giving rise to more copies of the machine getting each copy run parallel. If any one copy of the machine
accepts the strings, then NFA accepts, otherwise it rejects.
advertisement
Answer: a
Explanation: If K is the number of states in NFA, the DFA simulating the same language would have states
equal to or less than 2k.
9. Let N (Q, ∑, δ, q0, A) be the NFA recognizing a language L. Then for a DFA (Q’, ∑, δ’, q0’, A’),
which among the following is true? a) Q’ = P(Q)
b) Δ’ = δ’ (R, a) = {q ϵ Q | q ϵ δ (r, a), for some r ϵ R}
c) Q’={q0}
d) All of the mentionedView Answer
Answer: d
Explanation: All the optioned mentioned are the instruction formats of how to convert a NFA to a DFA.
10. There exists an initial state, 17 transition states, 7 final states and one dumping state, Predict the
maximum number of states in its equivalent DFA? a) 226
b) 224
c) 225
d) 223
View Answer
Answer: a
Explanation: The maximum number of states an equivalent DFA can comprise for its respective NFA with k
states will be 2k.
file:///C:/Users/gurun/Desktop/data.html 52/358
9/16/2020 data.html
advertisement
« Prev - Automata Theory Questions and Answers – Equivalence of NFA and DFA
» Next - Automata Theory Questions and Answers – Finite Automata with Epsilon Transition
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Equivalence of NFA and DFA
Automata Theory Questions and Answers – Finite Automata with Epsilon Transition
advertisement
advertisement
Recommended Posts:
1. Java Programming Examples on Java.Lang
2. Home
3. C Algorithms, Problems & Programming Examples
4. Ruby Programming Questions and Answers
5. Artificial Intelligence Questions and Answers
6. Bachelor of Computer Applications Questions and Answers
7. Master of Computer Applications Questions and Answers
8. Compilers Questions and Answers
9. Java Programming Examples on Set & String Problems & Algorithms
10. Electromagnetic Theory Questions and Answers
11. Theory of Machines Questions and Answers
12. C Programming Examples on Set & String Problems & Algorithms
13. Network Theory Questions and Answers
14. C++ Programming Examples on Set & String Problems & Algorithms
15. Automata Theory Questions and Answers
16. Automata Theory Questions and Answers – Pumping Lemma for Regular Language
17. Automata Theory Questions and Answers – DFA to Regular Expressions
18. Automata Theory Questions and Answers – Simpler Notations
19. Automata Theory Questions and Answers – Testing Emptiness and Membership 20. Automata
Theory Questions and Answers – DFA Processing Strings
advertisement
This set of Automata Theory test focuses on “Finite Automata with Epsilon Transition”.
1. According to the given transitions, which among the following are the epsilon closures of q1 for the given
NFA?
Δ (q1, ε) = {q2, q3, q4}
file:///C:/Users/gurun/Desktop/data.html 53/358
9/16/2020 data.html
Δ (q4, 1) =q1
Δ (q1, ε) =q1
a) q4
b) q2
c) q1
d) q1, q2, q3, q4View Answer
Answer: d
Explanation: The set of states which can be reached from q using ε-transitions, is called the ε-closure over
state q.
advertisement
Answer: a
Explanation: It is possible to construct an NFA with ε-transitions, presence of no input symbols, and that is
called NFA with ε-moves.
Explanation: ε does not appears on Input tape, ε transition means a transition without scanning a symbol i.e.
without moving the read head.
Answer: c
Explanation: The transition with ε leads to a jump but without any shift in read head. Further, the method can
be called one to introduce hidden non-determinism.
Answer: c
Explanation: ε-closure is defined as the set of states being reached through ε-transitions from a starting state.
advertisement
file:///C:/Users/gurun/Desktop/data.html 54/358
9/16/2020 data.html
6. Predict the total number of final states after removing the ε-moves from the given NFA?
a) 1
b) 2
c) 3
d) 0
View Answer
Answer: c
Explanation: The NFA which would result after eliminating ε-moves can be shown diagramatically.
Answer: a
Explanation: Due to the presence of ε symbol, or rather an epsilon-move, the input alphabets unites with it to
form a set including ε.
9. The automaton which allows transformation to a new state without consuming any input symbols:
a) NFA
b) DFA
c) NFA-l
d) All of the mentionedView Answer
Answer: c
Explanation: NFA-l or e-NFA is an extension of Non deterministic Finite Automata which are usually called
NFA with epsilon moves or lambda transitions.
advertisement
Answer: b
file:///C:/Users/gurun/Desktop/data.html 55/358
9/16/2020 data.html
Explanation: An epsilon move is a transition from one state to another that doesnt require any specific
condition.
11. The __________ of a set of states, P, of an NFA is defined as the set of states reachable from any state
in P following e-transitions. a) e-closure
b) e-pack
c) Q in the tuple
d) None of the mentionedView Answer
Answer: a
Explanation: The e-closure of a set of states, P, of an NFA is defined as the set of states reachable from any
state in P following e-transitions.
Answer: d
Explanation: The languages which are recognized by an epsilon Non deterministic automata are closed under
the following operations: a) Union
b) Intersection
c) Concatenation
d) Negation
e) Star
f) Kleene closure
Sanfoundry Global Education & Learning Series – Automata Theory.
To practice all areas of Automata Theory for tests, here is complete set of 1000+ Multiple Choice Questions
and Answers.
advertisement
Recommended Posts:
1. Computational Fluid Dynamics Questions and Answers
2. C# Programming Examples on Matrix
3. C# Programming Examples on Sorting
4. Java Programming Examples on Set & String Problems & Algorithms
5. C Programming Examples on Trees
6. C++ Programming Examples on Graph Problems & Algorithms
7. C# Programming Examples on Arrays
8. Network Theory Questions and Answers
9. Chemical Engineering Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 56/358
9/16/2020 data.html
10. Electromagnetic Theory Questions and Answers
11. C Programming Examples on Set & String Problems & Algorithms
12. C++ Programming Examples on Set & String Problems & Algorithms
13. Theory of Machines Questions and Answers
14. Solid State Chemistry Questions and Answers
15. CSS Questions and Answers
16. Compilers Questions and Answers
17. Automata Theory Questions and Answers
18. Automata Theory Questions and Answers – Eliminating Epsilon Productions
19. Automata Theory Questions and Answers – Conversions among Representations 20. Automata
Theory Questions and Answers – Moore Machine
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Uses of
EpsilonTransitions”.
1. The automaton which allows transformation to a new state without consuming any input symbols:
a) NFA
b) DFA
c) NFA-l
d) All of the mentioned
View Answer
Answer: c
Explanation: NFA-l or e-NFA is an extension of Non deterministic Finite Automata which are usually called
NFA with epsilon moves or lambda transitions.
advertisement
2. e-transitions are
a) conditional
b) unconditional
c) input dependent
d) none of the mentionedView Answer
Answer: b
Explanation: An epsilon move is a transition from one state to another that doesn’t require any specific
condition.
3. The __________ of a set of states, P, of an NFA is defined as the set of states reachable from any state in
P following e-transitions. a) e-closure
b) e-pack
c) Q in the tuple
d) None of the mentionedView Answer
Answer: a
file:///C:/Users/gurun/Desktop/data.html 57/358
9/16/2020 data.html
Explanation: The e-closure of a set of states, P, of an NFAis defined as the set of states reachable from any
state in P following e-transitions.
Answer: The languages which are recognized by an epsilon Non deterministic automata are closed under the
following operations: a) Union
b) Intersection
c) Concatenation
d) Negation
e) Star
f) Kleene closure
advertisement
5. Is the language preserved in all the steps while eliminating epsilon transitions from a NFA?
a) yes
b) no
View Answer
Answer: a
Explanation: Yes, the language is preserved during the dteps of construction: L(N)=L(N1)=L(N2)=L(3).
Answer: a
Explanation: e-NFA do come up with a convenient feature but nothing new.They do not extend the class of
languages that can be represented.
advertisement
« Prev - Automata Theory Questions and Answers – Finite Automata with Epsilon Transition
» Next - Automata Theory Questions and Answers – Epsilon Closures
Categories Automata Theory MCQs
file:///C:/Users/gurun/Desktop/data.html 58/358
9/16/2020 data.html
Post navigation
Automata Theory Questions and Answers – Finite Automata with Epsilon Transition
Automata Theory Questions and Answers – Epsilon Closures
advertisement
advertisement
Recommended Posts:
1. Java Programming Examples on Set & String Problems & Algorithms
2. Chemical Engineering Questions and Answers
3. C++ Algorithms, Problems & Programming Examples
4. CSS Questions and Answers
5. C++ Programming Examples on Set & String Problems & Algorithms
6. C Algorithms, Problems & Programming Examples
7. C++ Programming Examples on STL
8. Computer Science Questions and Answers
9. C Programming Examples on Set & String Problems & Algorithms
10. Information Science Questions and Answers
11. C Programming Examples on Stacks & Queues
12. Discrete Mathematics Questions and Answers
13. Python Programming Examples on Stacks & Queues
14. Solid State Chemistry Questions and Answers
15. Home
16. Compilers Questions and Answers
17. Electromagnetic Theory Questions and Answers
18. Theory of Machines Questions and Answers
19. Network Theory Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Epsilon Closures”.
1. Which of the following does not belong to input alphabet if S={a, b}* for any language?
a) a
b) b
c) e
d) none of the mentionedView Answer
Answer: c
Explanation: The automaton may be allowed to change its state without reading the input symbol using
epsilon but this does not mean that epsilon has become an input symbol. On the contrary, one assumes that
the symbol epsilon does not belong to any alphabet.
advertisement
Answer: b
Explanation:
Answer: a
Explanation: e-NFA do come up with a convenient feature but nothing new.They do not extend the class of
languages that can be represented.
4. Design a NFA for the language:
L: {an| n is even or divisible by 3}
Which of the following methods can be used to simulate the same.
a) e-NFA
b) Power Construction Method
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: c
Explanation: It is more convenient to simulate a machine using e-NFA else the method of Power
Construction is used from the union-closure of DFA’s.
advertisement 5.
file:///C:/Users/gurun/Desktop/data.html 60/358
9/16/2020 data.html
Answer: b
Explanation: The epsilon closure of the set q is the set that contains q, together with all the states which can
be reached starting at q by following only epsilon transitions.
6. The number of elements present in the e-closure(f2) in the given diagram:
a) 0
b) 1
c) 2
d) 3
View Answer
Answer: c
file:///C:/Users/gurun/Desktop/data.html 61/358
9/16/2020 data.html
Explanation: The epsilon closure set of f2 consist of the elements:{f2, f3}. Thus the count of the element in
the closure set is 2.
7. Which of the steps are non useful while eliminating the e-transitions for the given diagram?
8. Remove all the epsilon transitions in the given diagram and compute the number of a-transitions in the
result?
file:///C:/Users/gurun/Desktop/data.html 62/358
9/16/2020 data.html
a) 5
b) 7
c) 9
d) 6
View Answer
Answer: b
Explanation:
Recommended Posts:
1. Javascript Questions and Answers
2. Computational Fluid Dynamics Questions and Answers
3. VLSI Questions and Answers
4. C Programming Examples on Set & String Problems & Algorithms
5. Information Science Questions and Answers
6. Computer Science Questions and Answers
7. C Algorithms, Problems & Programming Examples
8. Artificial Intelligence Questions and Answers
9. Chemical Engineering Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 63/358
9/16/2020 data.html
10. CSS Questions and Answers
11. C++ Programming Examples on Set & String Problems & Algorithms
12. Discrete Mathematics Questions and Answers
13. Solid State Chemistry Questions and Answers
14. Network Theory Questions and Answers
15. Electromagnetic Theory Questions and Answers
16. Theory of Machines Questions and Answers
17. Compilers Questions and Answers
18. Automata Theory Questions and Answers
19. Automata Theory Questions and Answers – Extended Transition Function 20. Automata Theory
Questions and Answers – Conversion by Eliminating states
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Union, intersection
and complement of Regular Language & Expression”.
Answer:a
Explanation: Regular sets are closed under these three operation.
advertisement
Answer:c
Explanation: String accepted in previous DFA will not be accepted and non accepting string will be accepted
.
Answer:a
Explanation: Regular sets are closed under complement operation.
file:///C:/Users/gurun/Desktop/data.html 64/358
9/16/2020 data.html
4. If L1 and L2 are regular sets then intersection of these two will be
a) Regular
b) Non Regular
c) Recursive
d) Non RecursiveView Answer
Answer:a
Explanation: Regular expression are also colsed under intersection.
Answer:d
Explanation: Regular is closed under difference.
advertisement
Answer:c
Explanation: By making final state as starting state string starting from end will be accepted.
Answer:c
Explanation: This operation replace using a function .
Answer:c
file:///C:/Users/gurun/Desktop/data.html 65/358
9/16/2020 data.html
Explanation: Regular set are closed under homomorphism.
advertisement
Answer:d
Explanation: It is a regular expression.
Answer:d
Explanation: Only d is regular language.
Answer:d
Explanation: It is a regular expression.
Answer:d
Explanation: It is a regular expression.
advertisement
Answer:d
Explanation: It is a regular expression.
Answer:a
Explanation: Given expression accept all string so complement will accept nothing.
Recommended Posts:
1. Java Programming Examples on Utility Classes
2. Information Science Questions and Answers
3. C Programming Examples on Strings
4. Java Questions and Answers
5. PHP Questions and Answers
6. Discrete Mathematics Questions and Answers
7. Computer Science Questions and Answers
8. Python Questions and Answers
9. Java Programming Examples on String Handling
10. Java Programming Examples on Java.Lang
11. LISP Questions and Answers
12. Theory of Machines Questions and Answers
13. C Programming Examples on Set & String Problems & Algorithms
14. C# Programming Examples on Functions
15. Electromagnetic Theory Questions and Answers
16. C++ Programming Examples on Set & String Problems & Algorithms
17. Java Programming Examples on Set & String Problems & Algorithms
18. Network Theory Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular
Expression-Introduction”.
file:///C:/Users/gurun/Desktop/data.html 67/358
9/16/2020 data.html
1. L is a regular Language if and only If the set of __________ classes of IL is finite.
a) Equivalence
b) Reflexive
c) Myhill
d) NerodeView Answer
Answer: a
Explanation: According to Myhill Nerode theorem, the corollary proves the given statement correct for
equivalence classes.
advertisement
2. A language can be generated from simple primitive language in a simple way if and only if
a) It is recognized by a device of infinite states
b) It takes no auxiliary memory
c) Both are correct
d) Both are wrongView Answer
Answer: b
Explanation: A language is regular if and only if it can be accepted by a finite automaton. Secondly, It
supports no concept of auxiliary memory as it loses the data as soon as the device is shut down.
Answer: d
Explanation: The given option represents {0, 01} in different forms using set operations and Regular
Expressions. The operator like ^, v, etc. are logical operation and they form invalid regular expressions when
used.
4. According to the given language, which among the following expressions does it corresponds to?
Language L={xϵ{0,1}|x is of length 4 or less}
a) (0+1+0+1+0+1+0+1)4
b) (0+1)4
c) (01)4
d) (0+1+ε)4 View Answer
Answer: d
Explanation: The extended notation would be (0+1)4 but however, we may allow some or all the factors to be
ε. Thus ε needs to be included in the given regular expression.
advertisement
file:///C:/Users/gurun/Desktop/data.html 68/358
9/16/2020 data.html
Answer: a
Explanation: The given regular expression corresponds to a language of binary strings which is of even
length including a length of 0.
6. If R represents a regular language, which of the following represents the Venn-diagram most correctly?
a) An Irregular Set
b) R*
c) R complement
d) R reverseView Answer
Answer: b
Explanation: The given diagram represents the Kleene operation over the Regular Language R in which the
final states become the initial and the initial state becomes final.
Answer: a
Explanation: The transition states shown are the result of breaking down the given regular expression in
fragments. For dot operation, we change a state, for union (plus) operation, we diverge into two transitions
and for Kleene Operation, we apply a loop.
Answer: b
Explanation: Two operands are said to be performing Concatenation operation AB = A•B = {xy: x A&y
B}.
file:///C:/Users/gurun/Desktop/data.html 69/358
9/16/2020 data.html
advertisement
Answer: b
Explanation: By distributive property (Regular expression identities), we can prove the given identity to be
Ф.
Answer: a
Explanation: RR*=R+ as R+ means the occurrence to be at least once.
« Prev - Automata Theory Questions and Answers – Union, Intersection & Complement
» Next - Automata Theory Questions and Answers – Operators of Regular Expression
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Union, Intersection & Complement
Automata Theory Questions and Answers – Operators of Regular Expression
advertisement
advertisement
Recommended Posts:
1. C Programming Examples on Linked List
2. C Programming Examples without using Recursion
3. C Tutorials
4. C Programming Examples on Graph Problems & Algorithms
5. Database Management System Questions and Answers
6. C Programming Examples on Set & String Problems & Algorithms
7. C++ Programming Examples on Data-Structures
8. C Programming Examples on Strings
9. Data Structure Questions and Answers
10. C# Programming Examples on Data Structures
11. C# Programming Examples on Functions
12. Data Science Questions and Answers
13. RDBMS Questions and Answers
14. Theory of Machines Questions and Answers
15. Python Questions and Answers
16. Network Theory Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 70/358
9/16/2020 data.html
17. Electromagnetic Theory Questions and Answers
18. PHP Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Operators of
Regular Expression”.
Answer: d
Explanation: Type 3 refers to Regular Languages which is accepted by a finite automaton.
advertisement
Answer: d
Explanation: There are few identities over Regular Expressions which include: RФ=ФR=Ф≠R
Answer: a
Explanation: ε+1*(011) *(1*(011) *) *
ε + RR*= ε + R*R= ε + R+= R*
a) Q*P
b) QP*
c) Q*P*
d) (P*O*) *View Answer
Answer: b
file:///C:/Users/gurun/Desktop/data.html 71/358
9/16/2020 data.html
Explanation: The given statement is the Arden’s Theorem and it tends to have a unique solution as QP*.
Let P and Q be regular expressions,
R=Q+RP
R=Q+(Q+RP) P
R=Q+((Q+RP) +RP) +P=Q+QP+RPP+RPP=Q+QP+(Q+RP) PP+(Q+RP)
PP=Q+QP+QPP+RPPP+QPP+RPPP,
If we do this recursively, we get:
R= QP*
advertisement
Answer: c
Explanation: Arden’s theorem strictly assumes the following;
a) No null transitions in the transition diagrams
b) True for only single initial state
6. The difference between number of states with regular expression (a + b) and (a + b) * is:
a) 1
b) 2
c) 3
d) 0
View Answer
Answer: a
Explanation:
7. In order to represent a regular expression, the first step to create the transition diagram is:
a) Create the NFA using Null moves
b) Null moves are not acceptable, thus should not be used
c) Predict the number of states to be used in order to construct the Regular expressiond) None of
the mentioned View Answer
Answer: a
Explanation: Two steps are to be followed while converting a regular expression into a transition diagram:
a) Construct the NFA using null moves.
b) Remove the null transitions and convert it into its equivalent DFA.
Answer: a
Explanation: The regular expression is fragmented and the set of the strings eligible is formed. ‘+’ represents
union while ‘.’ Represents concatenation.
advertisement
file:///C:/Users/gurun/Desktop/data.html 72/358
9/16/2020 data.html
9. The minimum number of states required to automate the following Regular Expression:
(1) *(01+10) (1) *
a) 4
b) 3
c) 2
d) 5
View Answer
Answer: a
Answer: a
Explanation: Regular Expression denote precisely the class of regular language. Given any regular
expression, L(R) is a regular language. Given any regular language L, there is a regular expression R, such
that L(R)=L.
Recommended Posts:
1. RDBMS Questions and Answers
2. Mechanical Behaviour & Testing of Materials Questions and Answers
3. Python Questions and Answers
4. C Tutorials
5. Database Management System Questions and Answers
6. C Programming Examples on Set & String Problems & Algorithms
7. Information Science Questions and Answers
8. Java Programming Examples on Set & String Problems & Algorithms 9. Computer Science
Questions and Answers
10. C++ Programming Examples on Set & String Problems & Algorithms
11. Solid State Chemistry Questions and Answers
12. LISP Questions and Answers
13. PHP Questions and Answers
14. C# Programming Examples on Functions
15. CSS Questions and Answers
16. Theory of Machines Questions and Answers
17. Network Theory Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 73/358
9/16/2020 data.html
18. Electromagnetic Theory Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
Answer: a
Explanation: ε represents a single string in the set namely, the empty string while Statement 2 is also correct.
advertisement
Answer: c
Explanation: If a regular language expression is given, the appropriate order of precedence if the parenthesis
is ignored is: Star or Kleene, Dot or Concatenation, Union or Plus.
Answer: c
Explanation: When we wish to distinguish between a regular expression R and the language it represents; we
write L(R) to be the language of R.
Answer: b
file:///C:/Users/gurun/Desktop/data.html 74/358
9/16/2020 data.html
Explanation: This regular expression can be used to eliminate the answers and get the result. The length can
be even and as well more than 3 when R= (∑∑∑) (∑∑∑) (particular case).
Answer: a
Explanation: The star operation brings together any number of strings from the language to get a string in the
result. If the language is empty, the star operation can put together 0 strings, resulting only the empty string.
advertisement
Answer: a
Explanation: The Regular expression (ab U a) * is converted to NFA in a sequence of stages as it can be
clearly seen in the diagram. This NFA consist of 8 stated while its minimized form only contains 2 states.
7. Which of the following represents a language which has no pair of consecutive 1’s if ∑= {0,1}?
a) (0+10)*(1+ε)
b) (0+10)*(1+ε)*
c) (0+101)*(0+ε)
d) (1+010)*(1+ε)View Answer
Answer: a
Explanation: All the options except ‘a’ accept those strings which comprises minimum one pair of 1’s
together.
Answer: c
Explanation: A finite automaton accepts the languages which are regular and for which a DFA can be
constructed.
9. (a + b*c) most correctly represents:
a) (a +b) *c
b) (a)+((b)*.c)
c) (a + (b*)).c
d) a+ ((b*).c)View Answer
Answer: d
Explanation: Following the rules of precedence, Kleene or star operation would be done first, then
concatenation and finally union or plus operation.
advertisement
file:///C:/Users/gurun/Desktop/data.html 75/358
9/16/2020 data.html
10. Which of the following regular expressions represents the set of strings which do not contain a substring
‘rt’ if ∑= {r, t} a) (rt)*
b) (tr)*
c) (r*t*)
d) (t*r*)
View Answer
Answer: d
Explanation: As Kleene operation is not on the whole of the substring, it will not repeat and maintain the
order of t, r.
11. According to the precedence rules, x-y-z is equivalent to which of the following?
a) (x-y)-z
b) x-(y-z)
c) Both (x-y)-z and x-(y-z)
d) None of the mentionedView Answer
Answer: a
Explanation: In arithmetic, we group two of the same operators from the left, hence x-y-z is equivalent to
(xy)-z and not x-(y—z).
Answer: a
Explanation: Dot operation or concatenation operation means that the two expressions are juxtaposed i.e.
there are no intervening operators in between. In fact, UNIX regular expressions use the dot for an entirely
different purpose: representing any ASCII character.
Answer: d
Explanation: It does not matter in which order we group the expression with the operators as they are
associative. If one gets a chance to group the expression, one should group them from left for convenience.
For instance, 012 is grouped as (01)2.
advertisement
Answer: c
Explanation: Using the rules of precedence on the give expression, c is the appropriate choice with the order
of: Bracket>Kleene>Dot>Union
file:///C:/Users/gurun/Desktop/data.html 76/358
9/16/2020 data.html
Sanfoundry Global Education & Learning Series – Automata Theory.
To practice all areas of Automata Theory for Quizzes, here is complete set of 1000+ Multiple Choice
Questions and Answers.
Recommended Posts:
1. Database Management System Questions and Answers
2. Java Programming Examples on String Handling
3. Information Science Questions and Answers
4. C Programming Examples on Strings
5. Construction & Building Materials Questions and Answers
6. C Tutorials
7. Java Programming Examples on Set & String Problems & Algorithms
8. Java Programming Examples on Utility Classes
9. RDBMS Questions and Answers
10. LISP Questions and Answers
11. C++ Programming Examples on Set & String Problems & Algorithms
12. Theory of Machines Questions and Answers
13. Python Questions and Answers
14. C Programming Examples on Set & String Problems & Algorithms
15. C# Programming Examples on Functions
16. Electromagnetic Theory Questions and Answers
17. PHP Questions and Answers
18. Network Theory Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “DFA to Regular
Expressions”.
file:///C:/Users/gurun/Desktop/data.html 77/358
9/16/2020 data.html
a) (0+1)*001(0+1)*
b) 1*001(0+1)*
c) (01)*(0+0+1)(01)*
d) None of the mentionedView Answer
Answer: a
Explanation: There needs to be 001 together in the string as an essential substring. Thus, the other
components can be anything, 0 or 1 or e.
advertisement
Answer: b
Explanation: Using NFA with e moves, we can represent all the regular expressions as an automata. As
regular expressions include e, we need to use e moves.
3. The total number of states required to automate the given regular expression
(00)*(11)*
a) 3
b) 4
c) 5
d) 6
View Answer
Answer: c
file:///C:/Users/gurun/Desktop/data.html 78/358
9/16/2020 data.html
Explanation:
a) (110+1)*0
b) (11+110)*1
c) (110+11)*0
d) (1+110)*1View Answer
Answer: c
Explanation: There is no state change for union operation, but has two different paths while for
concatenation or dot operation, we have a state change for every element of the string.
advertisement
file:///C:/Users/gurun/Desktop/data.html 79/358
9/16/2020 data.html
a) ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,15}$
b) ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{9,16}$
c) ^(?=.[a-z])(?=.[A-Z])(?=.\d).{8,15}$
d) None of the mentionedView Answer
Answer: a
Explanation: Passwords like abc123, 123XYZ, should not be accepted . If one also wants to include special
characters as one of the constraint, one can use the following regular expression: ^(?=.*[a-z])(?=.*[A-
Z])(?=.*\d)(?=.*[^\da-za-Z]).{8,15}$
Answer: a
Explanation: As the input variables are under Kleene Operation, we need to include e,thus option c is not
correct,thereby option (a) is the right answer.
7. The minimum number of states required in a DFA (along with a dumping state) to check whether the 3rd
bit is 1 or not for |n|>=3 a) 3
b) 4
c) 5
d) 1
View Answer
Answer: c
Explanation:
advertisement
Answer: c
Explanation: Identifiers in C Programming Language follows the following identifiers rule:
a) The name of the identifier should not begin with a digit.
b) It can only begin with a letter or a underscore.
file:///C:/Users/gurun/Desktop/data.html 80/358
9/16/2020 data.html
c) It can be of length 1 or more.
Answer: c
Explanation: (a) and (b) are the general cases where we restrict the acceptance of a string witrh substring 00
but we ignore the case where the string needs to end with 1 which therby, does not allows the acceptance of
e.
10. The minimum number of transitions to pass to reach the final state as per the following regular
expression is: {a,b}*{baaa} a) 4
b) 5
c) 6
d) 3
View Answer
Answer: a
Explanation:
advertisement
file:///C:/Users/gurun/Desktop/data.html 81/358
9/16/2020 data.html
Recommended Posts:
1. Java Questions and Answers
2. Database Management System Questions and Answers
3. Javascript Questions and Answers
4. C Programming Examples on Strings
5. C++ Questions and Answers
6. C Questions and Answers
7. Java Programming Examples on String Handling
8. RDBMS Questions and Answers
9. LISP Questions and Answers
10. Theory of Machines Questions and Answers
11. Python Questions and Answers
12. Java Programming Examples on Set & String Problems & Algorithms
13. C# Programming Examples on Functions
14. Electromagnetic Theory Questions and Answers
15. Network Theory Questions and Answers
16. C Programming Examples on Set & String Problems & Algorithms
17. PHP Questions and Answers
18. C++ Programming Examples on Set & String Problems & Algorithms
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
Answer: c
Explanation: We use this algorithm to simplify a finite automaton to regular expression or vice versa. We
eliminate states while converting a given finite automata to its corresponding regular expression.
advertisement
2. If we have more than one accepting states or an accepting state with an outdegree, which of the following
actions will be taken?
a) addition of new state
b) removal of a state
c) make the newly added state as final
d) more than one option is correctView Answer
Answer: d
file:///C:/Users/gurun/Desktop/data.html 82/358
9/16/2020 data.html
Explanation: If there is more than one accepting state or if the single accepting state as an out degree , add a
new accepting state, make all other states non accepting, and hold an e-transitions from each former
accepting state to the new accepting state.
3. Which of the following is not a step in elimination of states procedure?
a) Unifying all the final states into one using e-transitions
b) Unify single transitions to multi transitions that contains union of input
c) Remove states until there is only starting and accepting states
d) Get the resulting regular expression by direct calculationView Answer
Answer: b
Explanation: While eliminating the states, we unify multiple transitions to one transition that contains union
of input and not the vice versa.
a) Yes
b) NoView Answer
Answer: a
Explanation: The state q2 can be eliminated with ease and the reduced state diagram can be represented as:
advertisement
Answer: a
Explanation: Brzozowski method takes a unique approach to generating regular expressions. We create a
system of regular expressions with one regular expression unknown for each state in M, and then we solve
the system for Rλ where Rλ is the regular expression associated with starting state qλ.
Answer: a
Explanation: For every NFA, there exists an equivalent DFA and vice versa.
advertisement
Answer: d
Explanation: For converting RE to DFA , first we convert RE to NFA (Thompson Construction), and then
NFA is converted into DFA(Subset Construction).
Answer: a
Explanation: For every state which is eliminated, a new regular expression is produced. The newly generated
regular expression act as an input for a state which is next to removed state.
10. Is it possible to obtain more than one regular expression from a given DFA using the state elimination
method? a) Yes
b) No View
Answer
Answer: a
Explanation: Using different sequence of removal of state, we can have different possible solution of regular
expressions. For n-state deterministic finite automata excluding starting and final states, n! Removal
sequences are there. It is very tough to try all the possible removal sequences for smaller expressions.
advertisement
Recommended Posts:
1. Computer Science Questions and Answers
2. Numerical Methods Questions and Answers
3. Java Algorithms, Problems & Programming Examples
4. Java Programming Examples on String Handling
5. C++ Programming Examples on Numerical Problems & Algorithms
6. C Programming Examples on Numerical Problems & Algorithms
7. RDBMS Questions and Answers
8. C# Programming Examples on Functions
9. PHP Questions and Answers
10. Solid State Chemistry Questions and Answers
11. Java Programming Examples on Numerical Problems & Algorithms
12. Python Questions and Answers
13. Java Programming Examples on Set & String Problems & Algorithms
14. C Programming Examples on Set & String Problems & Algorithms
15. Theory of Machines Questions and Answers
16. Electromagnetic Theory Questions and Answers
17. C++ Programming Examples on Set & String Problems & Algorithms
18. Network Theory Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular Language
& Expression”.
Answer: d
Explanation: None.
advertisement
Answer: d
file:///C:/Users/gurun/Desktop/data.html 85/358
9/16/2020 data.html
Explanation: All are equivalent to union operation.
Answer: a
Explanation: None.
Answer: a
Explanation: None.
advertisement
5. a? is equivalent to
a) a
b) a+Φ
c) a+ϵ
d) wrong expressionView Answer
Answer: c
Explanation: Zero or one time repetition of previous character .
6. ϵL is equivalent to
a) ϵ
b) Φ
c) L
d) Lϵ
View Answer
Answer: c,d
Explanation: None.
7. (a+b)* is equivalent to
a) b*a*
b) (a*b*)*
c) a*b*
d) none of the mentionedView Answer
Answer: b
Explanation: None.
advertisement
8. ΦL is equivalent to
a) LΦ
file:///C:/Users/gurun/Desktop/data.html 86/358
9/16/2020 data.html
b) Φ
c) L
d) ϵ
View Answer
Answer: a,b
Explanation: None.
9. Which of the following pair of regular expression are not equivalent?
a) 1(01)* and (10)*1
b) x(xx)* and (xx)*x
c) (ab)* and a*b*
d) x+ and x*x+View Answer
Answer: c
Explanation: (ab)*=(a*b*)*.
Answer: d
Explanation: All are equivalent to (a+b)*.
advertisement
Recommended Posts:
1. C# Programming Examples on Data Structures
2. Java Programming Examples on Collections
3. C++ Programming Examples on Data-Structures
4. Java Programming Examples on Set & String Problems & Algorithms
5. C Programming Examples on Linked List
6. Python Programming Examples on Linked Lists
7. C Programming Examples on Strings
8. Simple C Programs
9. Java Programming Examples on Utility Classes
file:///C:/Users/gurun/Desktop/data.html 87/358
9/16/2020 data.html
10. C Programming Examples on Data-Structures
11. C# Programming Examples on Functions
12. Java Programming Examples on Data-Structures
13. Theory of Machines Questions and Answers
14. Electromagnetic Theory Questions and Answers
15. Network Theory Questions and Answers
16. Compilers Questions and Answers
17. C Programming Examples on Stacks & Queues
18. Home
19. Python Programming Examples on Stacks & Queues
20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular Language
& Expression”.
1. 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
View Answer
Answer: c
Explanation: string of length 0 = Not possible (because y is always present).
string of length 1 = 1 (y) string of length 2 = 3 (xy,yy,ya)
string of length 3 = 8 (xxy,xyy,yxy,yyy,yaa,yab,xya,yya)
advertisement
Answer: d
Explanation: None.
Answer: a
file:///C:/Users/gurun/Desktop/data.html 88/358
9/16/2020 data.html
Explanation: All of above machine can accept regular language but all string accepted by machine is regular
only for DFA.
4. Regular grammar is
a) context free grammar
b) non context free grammar
c) english grammar
d) none of the mentionedView Answer
Answer: a
Explanation: Regular grammar is subset of context free grammar.
advertisement
5. Let the class of language accepted by finite state machine be L1 and the class of languages represented by
regular expressions be L2 then a) L1<L2
b) L1>=L2
c) L1 U L2 = .*
d) L1=L2View Answer
Answer: d
Explanation: Finite state machine and regular expression have same power to express a language.
Answer: b
Explanation: Except b all are regular expression*.
Answer: a
Explanation: According to Chomsky hierarchy .
advertisement
Answer: b
Explanation: None.
Answer: d
Explanation:If L is recursive enumerable and its complement too if and only if L is recursive.
« Prev - Automata Theory Questions and Answers – Regular Language & Expression – 1
» Next - Automata Theory Questions and Answers – Converting Regular Expressions to Automata
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Regular Language & Expression – 1
Automata Theory Questions and Answers – Converting Regular Expressions to Automata
advertisement
advertisement
Recommended Posts:
1. Python Programming Examples on Stacks & Queues
2. C# Programming Examples on Strings
3. Agricultural Engineering Questions and Answers
4. Computer Science Questions and Answers
5. Java Programming Examples on Numerical Problems & Algorithms
6. PHP Questions and Answers
7. Java Programming Examples on Java.Lang
8. C Programming Examples on Strings
9. LISP Questions and Answers
10. Java Programming Examples on String Handling
11. C Tutorials
12. Network Theory Questions and Answers
13. C# Programming Examples on Functions
14. Theory of Machines Questions and Answers
15. Electromagnetic Theory Questions and Answers
16. C++ Programming Examples on Set & String Problems & Algorithms 17. C Programming Examples
on Set & String Problems & Algorithms
18. Java Programming Examples on Set & String Problems & Algorithms
19. Compilers Questions and Answers 20. Automata Theory Questions and
Answers
advertisement
file:///C:/Users/gurun/Desktop/data.html 90/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Converting
Regular Expressions to Automata”.
Answer: d
Explanation: Regexp processors are found in several search engines, seach and replace mechanisms, and text
processing utilities.
Answer: a
Explanation: Many languages come with built in support of regexps like Perl, Javascript, Ruby etc. While
some provide support using standard libraries like .NET, Java, Python, C++, C and POSIX.
Answer: c
Explanation: A regexp processor translates the syntax into internal representation which can be executed and
matched with a string and that internal representation can have several approaches like the ones mentioned.
Answer: a
Explanation: Paranthesis can be used to define the scope and precedence of operators. Thus, both the
expression represents the same pattern.
advertisement
7. Which of the following cannot be used to decide whether and how a given regexp matches a string:
a) NFA to DFA
b) Lazy DFA algorithm
c) Backtracking
d) None of the mentionedView Answer
Answer: d
Explanation: There are at least three algorithms which decides for us, whether and how a regexp matches a
string which included the transformation of Non deterministic automaton to deterministic finite automaton,
The lazy DFA algorithm where one simulates the NFA directly, building each DFA on demand and then
discarding it at the next step and the process of backtracking whose running time is exponential.
Answer: c
Explanation: () groups a series of pattern element to a single element.
When we use pattern in parenthesis, we can use any of ‘$1’, ‘$2’ later to refer to the previously matched
pattern.
advertisement
file:///C:/Users/gurun/Desktop/data.html 92/358
9/16/2020 data.html
What does the symbol /z does?
a) changes line
b) matches the beginning of a string
c) matches the end of a string
d) none of the mentionedView Answer
Answer: c
Explanation: It matches the end of a string and not an internal line.The given segment of code outputs:
Hello World
is a string that ends with ‘d\n’
advertisement
Answer: a
Explanation: Thompson construction algorithm is an algorithm in automata theory used to convert a given
regular expression into NFA. Similarly, Kleene algorithm is used to convert a finite automaton to a regular
expression.
« Prev - Automata Theory Questions and Answers – Regular Language & Expression – 2
» Next - Automata Theory Questions and Answers – Regular Expression in UNIX
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Regular Language & Expression – 2
Automata Theory Questions and Answers – Regular Expression in UNIX
advertisement
advertisement
Recommended Posts:
1. VLSI Questions and Answers
2. Python Programming Examples on Stacks & Queues
3. Cryptography and Network Security Questions and Answers
4. Java Programming Examples on Numerical Problems & Algorithms
5. Java Programming Examples on Utility Classes
6. Neural Networks Questions and Answers
7. LISP Questions and Answers
8. C++ Algorithms, Problems & Programming Examples
9. Java Algorithms, Problems & Programming Examples
10. Theory of Machines Questions and Answers
11. C# Programming Examples on Functions
12. Network Theory Questions and Answers
13. Electromagnetic Theory Questions and Answers
14. Java Programming Examples on String Handling
15. Compilers Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 93/358
9/16/2020 data.html
16. C Programming Examples on Strings
17. C++ Programming Examples on Set & String Problems & Algorithms 18. C Programming Examples
on Set & String Problems & Algorithms
19. Java Programming Examples on Set & String Problems & Algorithms
20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular
Expression in UNIX”.
1. Which among the following is not a UNIX command for regular expressions?
a) ed
b) sed
c) vi
d) none of the mentionedView Answer
Answer: d
Explanation: Regular expressions are used by different commands in Unix like ed, sed, grep, awk, vi, etc.
Sed stands for stream editor which is exclusively used for executing scripts.
advertisement
Answer: b
Explanation: Regular expression provides more flexibility while matching string patterns. Special characters
like ^, $, *, . are very useful.
Answer: d
Explanation: There are few expressions which provide the utility of matching metacharacters including /^$/
for blank lines, / */ for matching one or more spaces, /^.*$/ for matching an entire line whatever it is.
4. For the given syntax of sed, which among the following is not a correct option?
General syntax of sed: /pattern/action a) / are used as delimiters
b) pattern refers to a regular expression
c) pattern refers to the string to be matched
d) action refers to the commandView Answer
file:///C:/Users/gurun/Desktop/data.html 94/358
9/16/2020 data.html
Answer: c
Explanation: In the general syntax of sed, pattern is the regular expression and action refers to the command
given (p: prints the line, d: deletes the line, etc).
advertisement
Answer: b
Explanation: The grep is a standard UNIX utility program that searches through a set of files in search of a
text pattern,specified through a regular expression.
6. State true or false:
Statement: A regular expression is a sequence of characters that represent a pattern.
a) true
b) false
View Answer
Answer: a
Explanation: Such a generated pattern could be a fixed word or describe something like more general.
Answer: a
Explanation: Regular expressions are very much invaluable tools; they can be used to find a particular
segment of line in a file and instruct to take certain actions.
advertisement
Answer: c
Explanation: grep is a command which finds the pattern in a particular text segment.Here, it scans each line
in heroes.txt and looks for an m followed by a and then followed by n.
Answer: b
file:///C:/Users/gurun/Desktop/data.html 95/358
9/16/2020 data.html
Explanation: There are many other common regular expression operators like $, ^, etc. Which have their own
respective purposes.
Answer: d
Explanation: There are many UNIX tools including vi, Emacs, sed, awk and modern programming languages
which support regular expressions.
advertisement
« Prev - Automata Theory Questions and Answers – Converting Regular Expressions to Automata
» Next - Automata Theory Questions and Answers – Lexical Analysis
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Converting Regular Expressions to Automata
Automata Theory Questions and Answers – Lexical Analysis
advertisement
advertisement
Recommended Posts:
1. VLSI Questions and Answers
2. Javascript Questions and Answers
3. C Programming Examples on Strings
4. Java Programming Examples on String Handling
5. C# Programming Examples on Functions
6. RDBMS Questions and Answers
7. PHP Questions and Answers
8. Information Science Questions and Answers
9. Computer Science Questions and Answers
10. Python Questions and Answers
11. Linux Questions and Answers
12. Network Theory Questions and Answers
13. Theory of Machines Questions and Answers
14. C Programming Examples on Set & String Problems & Algorithms
15. C++ Programming Examples on Set & String Problems & Algorithms 16. Electromagnetic Theory
Questions and Answers
17. Java Programming Examples on Set & String Problems & Algorithms
18. Compilers Questions and Answers
19. Unix Questions and Answers
20. Automata Theory Questions and Answers
advertisement
file:///C:/Users/gurun/Desktop/data.html 96/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Lexical Analysis”.
Answer: b
Explanation: A lexeme is a string of characters that form a syntactic unit. It is reasonable to say that is the
sequence of alphanumeric characters in a token.
advertisement
2. If the lexical analyser finds a lexeme with the same name as that of a reserved word,it _________
a) overwrites the word
b) overwrites the functionality
c) generates an error
d) something elseView Answer
Answer: c
Explanation: Reserved words are known as keywords and they are specific and reserved with its
functionality to a language. Thus, getting an input with the same name by the analyzer will generate an error.
3. The methodology to show an error when the analyzer faces a keyword over an user’s input is based on:
a) rule priority
b) longest match rule
c) keyword-out rule
d) none of mentionedView Answer
Answer: a
Explanation: The lexical analyzer follows the rule priority where its prioritizes keywords over an input it gets
with the same name as that of the keyword and thus generates an error.
Answer: b
Explanation: A lexical analyzer reads the source code letter by letter and when it encounters a space or an
operator or any special character, it decides that the word is completed.
Answer: b
Explanation: The Longest Match rule states that the lexeme scanned should be determined on the basis of
longest match among all the token available.
6. The output of the lexical and syntax analyzer can stated as:
a) parse stream, parse tree
b) token tree, parse tree
c) token stream, parse tree
d) all of the mentionedView Answer
Answer: c
Explanation: The lexical analyzer outputs the stream of token which is taken up by syntax analyzer one by
one against the production rule and parse tree is generated.
7. Which among the following is not a tool to construct lexical analyzer from a regular expression?
a) lex
b) flex
c) jflex
d) none of the mentionedView Answer
Answer: d
Explanation: Lexical analysis is done using few tools such as lex, flex and jflex. Jflex is a computer program
that generates lexical analyzers (also known as lexers or scanners) and works apparently like lex and flex.
Lex is commonly used with yacc parser generator.
Answer: d
Explanation: A program which performs lexical analysis is called lexer, scanner or lexer. Nowadays, lexer is
combined with a parser which allows syntactic analysis.
Answer: d
Explanation: Lexers and parsers are most commonly used in compilers, but it has more application elsewhere
like in prettyprinters or linters(application of stylistic formatting conventions to textfiles, source code, etc.).
advertisement
Answer: a
Explanation: The first phase of compilation process is called lexical analysis. It fragments the source code
into token which is the smallest programming unit of a program.
11. Which of the following characters are ignored while lexical analysis?
a) .
b) =
c) #
d) WhiteSpaceView Answer
Answer: d
Explanation: The lexical analyzer ignores all the whitespaces and fragments the program into tokens.
Answer: d
Explanation: oolex, flex, lex, jflex, all are lexical analyzer tools which perform the following function.
13. The action of parsing the source code into proper syntactic classes is known as:
a) Parsing
b) Interpretation analysis
c) Lexicography
d) Lexical AnalysisView Answer
Answer: d
Explanation: Lexical analysis or scanning is the process of parsing the source code into proper syntactic
classes. It gets things ready for the parser with lexemes to built the parse tree.
Answer: a
Explanation: Lexical analysis involves the following task:
a) Building a uniform symbol table
b) Parsing the source code into tokens
c) Building a literal and identifier table
advertisement
Answer: a
file:///C:/Users/gurun/Desktop/data.html 99/358
9/16/2020 data.html
Explanation: A scanner or a lexical analyzer takes a source code as input and outputs a stream of token after
fragmenting the code.
Answer: c
Explanation: Type checking is a process which is performed during Syntax directed translation.
Recommended Posts:
1. MATLAB Questions and Answers
2. Python Programming Examples on Graphs
3. Home
4. C Programming Examples on Linked List
5. C++ Algorithms, Problems & Programming Examples
6. Java Algorithms, Problems & Programming Examples
7. C Programming Examples using Recursion
8. LISP Questions and Answers
9. C# Programming Examples on Data Structures
10. C Programming Examples
11. Python Programming Examples on Trees
12. Electromagnetic Theory Questions and Answers
13. C Programming Examples on Trees
14. C Programming Examples without using Recursion
15. Theory of Machines Questions and Answers
16. Javascript Questions and Answers
17. Structural Analysis Questions and Answers
18. Network Theory Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
file:///C:/Users/gurun/Desktop/data.html 100/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Finding Patterns in
Text,Algebric Laws and Derivatives”.
1. The minimum length of a string {0,1}* not in the language corresponding to the given regular expression:
(0*+1*)(0*+1*)(0*+1*) a) 3
b) 4
c) 5
d) 6
View Answer
Answer: b
Explanation: 0101 or 1010 the strings with minimum length on {0,1}* which does not belong to the
language of the given regular expression.Other strings like 111, 000, 1101, etc are accepted by the language .
advertisement
Answer: a
Explanation: What we observe from the question is that, it includes e and 11 and any number of 1’s then.
Therefore, its simplifies when we write the same reg. Expression as (11+111)*.
3. The minimum number of 1’s to be used in a regular expression of the given language:
R(x): The language of all strings containing exactly 2 zeroes. a) 2
b) 3
c) 0
d) 1
View Answer
Answer: b
Explanation: It is not required to automate the question if asked theoretically.The number of zeroes fixed is
2. Therefore, we can represent the regular expression as 1*01*01*.
4. The given regular language corresponds to which of the given regular language
e+1+(1+0)*0+(0+1)*11
a) The language of all strings that end with 11 or 00
b) The language of all strings that end with 0 or 1
c) The language of all strings which does not end with 01
d) None of the mentionedView Answer
Answer: c
file:///C:/Users/gurun/Desktop/data.html 101/358
9/16/2020 data.html
Explanation: According to the given regular expression, e is accepted by its language and it does not end
with 00 or 11 or 0 or 1. Thus option a and b are eliminated. Further, the regular expression is valid for the
third option.
advertisement
5. Statement: If we take the union of two identical expression, we can replace them by one copy of the
expression.
Which of the following is a correct option for the given statement?
a) Absorption Law
b) Idempotent Law
c) Closure Law
d) Commutative LawView Answer
Answer: b
Explanation: Idempotent Law states that if we take the union of two like expression, we can use a copy of the
expression instead i.e. L+L=L. The common arithmetic operators are not idempotent.
7. Statement: A digit, when used in the CFG notation, will always be used as a terminal.
State true or false? a) True
b) False
View
Answer
Answer: a
Explanation: Lowercase letters near the beginning of an alphabet, a, b and so on are terminal symbols. We
shall also assume that digits and other characters such as + or parenthesis are terminals.
advertisement
8. Choose the incorrect process to check whether the string belongs to the language of certain variable or
not?
a) recursive inference
b) derivations
c) head to body method
d) All of the mentionedView Answer
Answer: d
Explanation: There are two approaches to infer that certain string are in the language of a certain variable.
The most conventional way is to use the rules from body to head, recursive inference. The second approach
is expanding the starting variable using one of its productions whose head is tart symbol and derive a string
consisting entirely of terminals(head to body or derivations).
9. Statement: Left most derivations are lengthy as compared to Right most derivations.
Choose the correct option: a) correct statement
b) incorrect statement
file:///C:/Users/gurun/Desktop/data.html 102/358
9/16/2020 data.html
c) may or may not be correct
d) depends on the language of the grammarView Answer
Answer: c
Explanation: It completely depends on the person who develops the grammar of any language, how to make
use of the tools i.e. leftmost and rightmost derivations.
10. A->aAa|bAb|a|b|e
Which among the following is the correct option for the given production?
a) Left most derivation
b) Right most derivation
c) Recursive Inference
d) None of the mentionedView Answer
Answer: a
Explanation: The given form represents leftmost derivations in which at each step we replace the leftmost
variable by one of its production bodies.
advertisement
Recommended Posts:
1. Java Programming Examples on Classes
2. LISP Questions and Answers
3. C Tutorials
4. C# Questions and Answers
5. Theory of Machines Questions and Answers
6. Ruby Programming Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 103/358
9/16/2020 data.html
7. Java Programming Examples on Utility Classes
8. C# Programming Examples on Functions
9. Network Theory Questions and Answers
10. Electromagnetic Theory Questions and Answers
11. PHP Questions and Answers
12. C# Programming Examples on Strings
13. Python Questions and Answers
14. C++ Programming Examples on Set & String Problems & Algorithms 15. C Programming Examples
on Set & String Problems & Algorithms
16. Java Programming Examples on Set & String Problems & Algorithms
17. C Programming Examples on Strings
18. Java Programming Examples on String Handling
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers focuses on “Properties-Non Regular
Languages”.
1. All the regular languages can have one or more of the following descriptions:
i) DFA ii) NFA iii) e-NFA iv) Regular Expressions
Which of the following are correct?
a) i, ii, iv
b) i, ii, iii
c) i, iv
d) i, ii, iii, iv
View Answer
Answer: d
Explanation: The class of languages known as the regular language has atleast four different descriptions: i)
DFA ii) NFA iii) e-NFA iv) Regular Expressions
advertisement
2. Which of the technique can be used to prove that a language is non regular?
a) Ardens theorem
b) Pumping Lemma
c) Ogden’s Lemma
d) None of the mentionedView Answer
Answer: b
Explanation: We use the powerful technique called Pumping Lemma, for showing certain languages not to
be regular. We use Ardens theorem to find out a regular expression out of a finite automaton.
file:///C:/Users/gurun/Desktop/data.html 104/358
9/16/2020 data.html
i i
c) {a b |i>=1}
d) None of the mentionedView Answer
Answer: b
Explanation: Here, i has limits i.e. the language is finite, contains few elements and can be graphed using a
deterministic finite automata. Thus, it is regular. Others can be proved non regular using Pumping lemma.
Answer: d
Explanation: All of the given languages are regular and finite and thus, can be represented using respective
deterministic finite automata. We can also use mealy or moore machine to represent remainders for option c.
advertisement
5. If L is DFA-regular, L’ is
a) Non regular
b) DFA-regular
c) Non-finite
d) None of the mentionedView Answer
Answer: b
Explanation: This is a simple example of a closure property: a property saying that the set of DFA-regular
languages is closed under certain operations.
Answer: b
Explanation: Let L be a regular language. If ~L has k equivalent classes, then any DFA that recognizes L
must have atleast k states.
Answer: c
Explanation: In automata theory, the Myphill Nerode theorem provides a necessary and sufficient condition
for a language to be regular. The Myphill Nerode theorem can be used to show a language L is regular by
proving that the number of equivalence classes of RL(relation) is finite.
advertisement
file:///C:/Users/gurun/Desktop/data.html 105/358
9/16/2020 data.html
a) Myphill Nerode Theorem
b) State machine
c) Courcelle’s Theorem
d) All of the mentionedView Answer
Answer: d
Explanation: The myphill nerode theorem can be generalized to trees and an application of tree automata
prove an algorithmic meta theorem about graphs.
9. Given languages:
i) {anbn|n>=0} ii)
<div>n</div>n
iii) {w∈{a,b}∗| #a(w)=#b(w)}, # represents occurrences
Which of the following is/are non regular? a) i, iii
b) i
c) iii
d) i, ii, iii
View Answer
Answer: d
Explanation: There is no regular expression that can parse HTML documents. Other options are also
nonregular as they cannot be drawn into finite automaton.
10. Finite state machine are not able to recognize Palindromes because:
a) Finite automata cannot deterministically find the midpoint
b) Finite automata cannot remember arbitarily large amount of data
c) Even if the mid point is known, it cannot find whether the second half matches the firstd) All of the
mentioned View Answer
Answer: d
Explanation: It is the disadvantage or lack of property of a DFA that it cannot remember an arbitrarily such
large amount of data which makes it incapable of accepting such languages like palindrome, reversal, etc.
advertisement
« Prev - Automata Theory Questions and Answers – Finding Patterns in Text,Algebric Laws and Derivatives
» Next - Automata Theory Questions and Answers – Pumping Lemma for Regular Language
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Finding Patterns in Text,Algebric Laws and Derivatives
Automata Theory Questions and Answers – Pumping Lemma for Regular Language
advertisement
advertisement
Recommended Posts:
1. VLSI Questions and Answers
2. Engineering Mathematics Questions and Answers
3. PHP Questions and Answers
4. Java Programming Examples on Set & String Problems & Algorithms
5. Probability and Statistics Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 106/358
9/16/2020 data.html
6. Discrete Mathematics Questions and Answers
7. Computer Science Questions and Answers
8. C++ Programming Examples on Set & String Problems & Algorithms
9. C Programming Examples on Set & String Problems & Algorithms
10. Information Science Questions and Answers
11. Aerodynamics Questions and Answers
12. Theory of Machines Questions and Answers
13. Electromagnetic Theory Questions and Answers
14. Network Theory Questions and Answers
15. Compilers Questions and Answers
16. Automata Theory Questions and Answers
17. Automata Theory Questions and Answers – Pumping Lemma for Context Free Language
18. Automata Theory Questions and Answers – Testing Emptiness and Membership
19. Automata Theory Questions and Answers – Markup Languages
20. Automata Theory Questions and Answers – DPDA and Context Free Languages
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Pumping Lemma
for Regular Language”.
Answer: b
Explanation: Pumping lemma defines an essential property for every regular language in automata theory. It
has certain rules which decide whether a language is regular or not.
advertisement
2. While applying Pumping lemma over a language, we consider a string w that belong to L and fragment it
into _________ parts. a) 2
b) 5
c) 3
d) 6
View Answer
Answer: c
Explanation: We select a string w such that w=xyz and |y|>0 and other conditions. However, there exists an
integer n such that |w|>=n for any wÎL.
3. If we select a string w such that w L, and w=xyz. Which of the following portions cannot be an empty
string? a) x
file:///C:/Users/gurun/Desktop/data.html 107/358
9/16/2020 data.html
b) y
c) z
d) all of the mentionedView Answer
Answer: b
Explanation: The lemma says, the portion y in xyz cannot be zero or empty i.e. |y|>0, this condition needs to
be fulfilled to check the conclusion condition.
4. Let w= xyz and y refers to the middle portion and |y|>0.What do we call the process of repeating y 0 or
more times before checking that they still belong to the language L or not? a) Generating
b) Pumping
c) Producing
d) None of the mentionedView Answer
Answer: b
Explanation: The process of repeatation is called pumping and so, pumping is the process we perform before
we check whether the pumped string belongs to L or not.
advertisement
5. There exists a language L. We define a string w such that w L and w=xyz and |w| >=n for some constant
integer n.What can be the maximum length of the substring xy i.e. |xy|<=? a) n
b) |y|
c) |x|
d) none of the mentionedView Answer
Answer: a
Explanation: It is the first conditional statement of the lemma that states that |xy|<=n, i.e. the maximum
length of the substring xy in w can be n only.
Answer: b
Explanation: Finite languages trivially satisfy the pumping lemma by having n equal to the maximum string
length in l plus 1.
Answer: d
Explanation: Suppose L is a regular language . Then there is an integer n so that for any x L and |x|>=n,
there are strings u,v,w so that x= uvw |uv|<=n
|v|>0 for any m>=0,
uvmw L.
advertisement
file:///C:/Users/gurun/Desktop/data.html 108/358
9/16/2020 data.html
8. If d is a final state, which of the following is correct according to the given diagram?
9. Let w be a string and fragmented by three variable x, y, and z as per pumping lemma. What does these
variables represent? a) string count
b) string
c) both (a) and (b)
d) none of the mentioned View Answer
Answer: a
Explanation: Given: w =xyz. Here, xyz individually represents strings or rather substrings which we compute
over conditions to check the regularity of the language.
10. Which of the following one can relate to the given statement:
Statement: If n items are put into m containers, with n>m, then atleast one container must contain more than
one item.
a) Pumping lemma
b) Pigeon Hole principle
c) Count principle
d) None of the mentionedView Answer
Answer: b
Explanation: Pigeon hole principle states the following example: If there exists n=10 pigeons in m=9 holes,
then since 10>9, the pigeonhole principle says that at least one hole has more than one pigeon.
advertisement
Recommended Posts:
1. Java Questions and Answers
2. Java Programming Examples on String Handling
3. Environmental Engineering Questions and Answers
4. Information Science Questions and Answers
5. LISP Questions and Answers
6. C Programming Examples on Strings
7. Java Programming Examples on Set & String Problems & Algorithms
8. PHP Questions and Answers
9. Strength of Materials Questions and Answers
10. Computer Science Questions and Answers
11. C++ Programming Examples on Set & String Problems & Algorithms
12. Engineering Physics II Questions and Answers
13. C Programming Examples on Set & String Problems & Algorithms
14. C# Programming Examples on Functions
15. Ruby Programming Questions and Answers
16. Electromagnetic Theory Questions and Answers
17. Compilers Questions and Answers
18. Network Theory Questions and Answers
19. Theory of Machines Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Applications of
Pumping Lemma/Pigeonhole principle”.
Answer: a
Explanation: We use the method of proof by contradiction in pumping lemma to prove that a language is
regular or not.
advertisement
Answer: b
Explanation: Given n, there is a string of balanced parentheses that begins with more than p left parentheses,
so that y will contain entirely of left parentheses. By repeating y, we can produce a string that does not
contain the same number of left and right parentheses, and so they cannot be balanced.
Answer: a
Explanation: The converse of the lemma is not true. There may exists some language which satisfy all the
conditions of the lemma and still be non-regular.
Answer: d
Explanation: There are several applications of pigeonhole principle:
Example: The softball team: Suppose 7 people who want to play softball(n=7 items), with a limitation of
only 4 softball teams to choose from. The pigeonhole principle tells us that they cannot all play for different
teams; there must be atleast one team featuring atleast two of the seven players.
advertisement
Answer: c
Explanation: Collisions are inevitable in a hash table because the number of possible keys exceeds the
number of indices in the array.
6. If n objects are distributed over m places, and n < m, then some of the places receive:
a) at least 2 objects
b) at most 2 objects
c) no object
d) none of the mentionedView Answer
Answer: c
Explanation: This is one of the alternative formulations of the pigeon hole principle. As n < m, there will
exist some place which will not receive any of the object.
Answer: c
Explanation: Y Aharonov proved mathematically the violation of pigeon hole principle in Quantum
mechanics and proposed inferometric experiments to test it.
advertisement
Answer: d
Explanation: None of the mentioned are regular language and are an application to the technique Pumping
Lemma. Each one of the mentioned can be proved non regular using the steps in Pumping lemma.
9. Which of the following can refer a language to be non regular?
a) Pumping Lemma
b) Myphill Nerode
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: c
Explanation: On the contrary, the typical way to prove that a language is to construct either a finite state
machine or a regular expression for the language.
Answer: d
Explanation: Pigeon hole principle or Dirichlet’s drawer principle or Dirichlet’s box principle is an example
of counting argument whose field is called Combinatorics.
advertisement
« Prev - Automata Theory Questions and Answers – Pumping Lemma for Regular Language
» Next - Automata Theory Questions and Answers – Closure Properties under Boolean Operations
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Pumping Lemma for Regular Language
Automata Theory Questions and Answers – Closure Properties under Boolean Operations
advertisement
advertisement
file:///C:/Users/gurun/Desktop/data.html 112/358
9/16/2020 data.html
Recommended Posts:
1. Machine Tools & Machining Questions and Answers
2. C Programming Examples on Searching and Sorting
3. Information Science Questions and Answers
4. PHP Questions and Answers
5. Computer Science Questions and Answers
6. Engineering Physics II Questions and Answers
7. Discrete Mathematics Questions and Answers
8. Bachelor of Computer Applications Questions and Answers
9. Master of Computer Applications Questions and Answers
10. Network Theory Questions and Answers
11. Electromagnetic Theory Questions and Answers
12. Compilers Questions and Answers
13. Theory of Machines Questions and Answers
14. Automata Theory Questions and Answers – Context Free Grammar-Derivations and Definitions
15. Discrete Mathematics Questions and Answers – Counting – Pigeonhole Principle
16. Automata Theory Questions and Answers – Operators of Regular Expression
17. Automata Theory Questions and Answers
18. Automata Theory Questions and Answers – Reversal-Homomorphism and Inverse Homomorphism
19. Automata Theory Questions and Answers – The Language of NFA
20. Automata Theory Questions and Answers – Intersection with Regular Languages
advertisement
This set of Automata Theory online test focuses on “Closure Properties under Boolean Operations”.
1. If L1, L2 are regular and op(L1, L2) is also regular, then L1 and L2 are said to be ____________ under an
operation op. a) open
b) closed
c) decidable
d) none of the mentionedView Answer
Answer: b
Explanation: If two regular languages are closed under an operation op, then the resultant of the languages
over an operation op will also be regular.
advertisement
2. Suppose a regular language L is closed under the operation halving, then the result would be:
a) 1/4 L will be regular
b) 1/2 L will be regular
c) 1/8 L will be regular
d) Al of the mentionedView Answer
Answer: d
Explanation: At first stage 1/2 L will be regular and subsequently, all the options will be regular.
file:///C:/Users/gurun/Desktop/data.html 113/358
9/16/2020 data.html
3. If L1′ and L2′ are regular languages, then L1.L2 will be
a) regular
b) non regular
c) may be regular
d) none of the mentionedView Answer
Answer: a
Explanation: Regular language is closed under complement operation. Thus, if L1′ and L2′ are regular so are
L1 and L2. And if L1 and L2 are regular so is L1.L2.
Answer: a
Explanation: If L1 is regular, so is L1′ and if L1′ and L2′ are regular so is L1′ U L2′. Further, regular
languages are also closed under intersection operation.
advertisement
Answer: a
Explanation: If A and B are regular languages, then A Ç B is a regular language and A ∩ B is equivalent to !
(A’ U B’).
6. Which among the following are the boolean operations that under which regular languages are closed?
a) Union
b) Intersection
c) Complement
d) All of the mentionedView Answer
Answer: d
Explanation: Regular languages are closed under the following operations:
a) Regular expression operations
b) Boolean operations
c) Homomorphism
d) Inverse Homomorphism
7. Suppose a language L1 has 2 states and L2 has 2 states. After using the cross product construction method,
we have a machine M that accepts L1 ∩ L2. The total number of states in M: a) 6
b) 4
c) 2
d) 8
View Answer
Answer: 4
Explanation: M is defined as: (Q, S, d, q0, F)
where Q=Q1*Q2 and F=F1*F2
file:///C:/Users/gurun/Desktop/data.html 114/358
9/16/2020 data.html
advertisement
Answer: a
Explanation: (L’)’ is equivalent to L and L U L is subsequently equivalent to L.
Answer: a
Explanation: If L is regular so is its complement, if L’ is regular so is its reverse, if (L’) r is regular so is its
Kleene.
10. Which among the following is the closure property of a regular language?
a) Emptiness
b) Universality
c) Membership
d) None of the mentionedView Answer
Answer: d
Explanation: All the following mentioned are decidability properties of a regular language. The closure
properties of a regular language include union, concatenation, intersection, Kleene, complement , reverse and
many more operations.
advertisement
« Prev - Automata Theory Questions and Answers – Applications of Pumping Lemma/Pigeonhole principle
» Next - Automata Theory Questions and Answers – Reversal-Homomorphism and Inverse Homomorphism
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Applications of Pumping Lemma/Pigeonhole principle
Automata Theory Questions and Answers – Reversal-Homomorphism and Inverse Homomorphism
advertisement
advertisement
Recommended Posts:
1. Database Management System Questions and Answers
2. Software Architecture & Design Questions and Answers
3. C# Questions and Answers
4. C# Programming Examples on Delegates
5. R Programming Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 115/358
9/16/2020 data.html
6. RDBMS Questions and Answers
7. PHP Questions and Answers
8. Discrete Mathematics Questions and Answers
9. Java Programming Examples on Utility Classes
10. Computer Science Questions and Answers
11. C# Programming Examples on Functions
12. Information Science Questions and Answers
13. Theory of Machines Questions and Answers
14. Network Theory Questions and Answers
15. C Programming Examples on Bitwise Operations
16. Electromagnetic Theory Questions and Answers
17. Compilers Questions and Answers
18. Heat Transfer Operations Questions and Answers
19. Mechanical Operations Questions and Answers
20. Automata Theory Questions and Answers – Rice’s Theorem, Properties and PCP
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on
“ReversalHomomorphism and Inverse Homomorphism”.
Answer: c
Explanation: Lr is defined as the reversal of a language. Lr is a set of strings whose reversal is in L.
Example: L={0, 01, 100} Lr={0, 10, 001}
advertisement
Answer: d
Explanation: Lr, L’, L* i.e. reversal, complementation and kleene all are the closure properties of regular
language.
file:///C:/Users/gurun/Desktop/data.html 116/358
9/16/2020 data.html
3. If E=F+G;
Er=?
a) Fr+Gr
b) (F+G)r
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: a
Explanation: If E is a symbol a, e, or f, then Er=E. Other inductive properties include union of reversals,
concatenation and Kleene.
4. If E= FG, Er=?
a) FrGr
b) GrFr
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: b
Explanation: If E= FG, Er=GrFr . Example: (01*)R=(1*)R(0)R
advertisement
Answer: a
Explanation: 01*+10*
ER=(01*)R+(10*)R=>(1*)R0R+(0*)R1R=>1*0+0*1
Answer: d
Explanation: Homomorphism on an aphabet is a function that gives a string for each symbol in that alphabet.
Example: h(0)=ab, etc.
Answer:
file:///C:/Users/gurun/Desktop/data.html 117/358
9/16/2020 data.html
abe*+e(ab)*(Using the identities e=e*, eE=Ee=E)
=ab+(ab)*=> ab will contain inside (ab)*, thus =>(ab)*.
advertisement
Answer: b
Explanation: h-1(L) is the language with two 0’s and any number of 1’s=>(1*01*01*).
9. While proving Inverse Homomorphism, which of the following steps are needed?
a) Start with a DFA Ain L
b) Construct a DFA B for h-1(L)
c) The set of states, initial and final states should be same.
d) All of the mentionedView Answer
Answer: d
Explanation: While constructing DFA B, we need to take care of the following:
a) The same set of states
b) The same start state
c) The same final state
d) Input alphabet = the symbols to which homomorphism h applies.
Answer: b
Explanation: Let h be a homomorphism and L a language whose alphabet is the output language of h.
h-1(L) = {w | h(w) is in L}.
advertisement
« Prev - Automata Theory Questions and Answers – Closure Properties under Boolean Operations
» Next - Automata Theory Questions and Answers – Conversions among Representations
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Closure Properties under Boolean Operations
Automata Theory Questions and Answers – Conversions among Representations
advertisement
advertisement
file:///C:/Users/gurun/Desktop/data.html 118/358
9/16/2020 data.html
Recommended Posts:
1. LISP Questions and Answers
2. Information Science Questions and Answers
3. Computer Science Questions and Answers
4. C# Programming Examples on Strings
5. PHP Questions and Answers
6. Python Questions and Answers
7. C Programming Examples
8. Theory of Machines Questions and Answers
9. C# Programming Examples on Functions
10. Compilers Questions and Answers
11. Network Theory Questions and Answers
12. Electromagnetic Theory Questions and Answers
13. Automata Theory Questions and Answers – Sentential Forms
14. Automata Theory Questions and Answers – Regular Expression-Introduction
15. Automata Theory Questions and Answers – PDA-acceptance by Empty Stack
16. Automata Theory Questions and Answers – Context Free Grammar-Derivations and Definitions
17. Automata Theory Questions and Answers – From Grammars to Push Down Automata
18. Automata Theory Questions and Answers – Deterministic Finite Automata-Introduction and
Definition
19. Automata Theory Questions and Answers – Operators of Regular Expression 20. Automata Theory
Questions and Answers – Finite Automata-Introduction
advertisement
This set of Automata Theory online quiz focuses on “Conversions among Representations”.
Answer: d
Explanation: Each of the four formats of representation of the regular language be it, DFA, NFA, Regular
Expression or e-NFA can be converted to the rest three forms.
advertisement
file:///C:/Users/gurun/Desktop/data.html 119/358
9/16/2020 data.html
Answer: b
Explanation: We must search from each of the n states along all arcs labelled e. If there are n states, there can
be no more than n2 states.
3. For a _________ state DFA, the time taken for DFA-NFA conversion is O(n).
a) n
b) n1/2
c) n2
d) 2n
View Answer
Answer: a
Explanation: The conversion DFA to NFA is simple, and takes O(n) time on an n-state DFA.
4. With reference to Automaton to Regular Expression Conversion, for each of the n rounds, where n is the
number of states of DFA, we can _________ the size of the regular expression constructed. a) double
b) triple
c) quadruple
d) none of the mentionedView Answer
Answer: c
Explanation: We can quadruple the size of the regular expression per round. Thus, we can simply write n3
expressions can take time O(n34n), where n =number of states of the DFA.
advertisement
Answer: a
Explanation: It is possible to parse the expression efficiently, using a technique that takes only O(n) time on
a expression of length n3.
6. The conversion of NFA to DFA can be done in:
a) exponential time
b) linear time
c) logarithmic time
d) all of the mentionedView Answer
Answer: a
Explanation: We can eliminate e-transitions from an n state epsilon-NFA to build an ordinary NFA in O(n3)
time, without changing the number of states.Next, producing to DFA can take exponential time.
Answer: d
file:///C:/Users/gurun/Desktop/data.html 120/358
9/16/2020 data.html
Explanation: Each of the following can expressed in terms of ordinary NFA with different time complexities.
advertisement
Answer: a
Explanation: Powerset or subset construction method is a standard method for converting a non deterministic
finite automata into DFA which recognizes the same formal language.
Answer: b
Explanation: There exists subsequent steps like formation of epsilon-NFA and NFA before the formation of
corresponding DFA.
Answer: a
Explanation: Thompson’s Construction is used to find out a Finite Automaton from a Regular Expression.
We will reduce the regular expression into smallest regular expressions and convert them to NFA and finally
to DFA.
advertisement
« Prev - Automata Theory Questions and Answers – Reversal-Homomorphism and Inverse Homomorphism
» Next - Automata Theory Questions and Answers – Testing Emptiness and Membership Categories
Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Reversal-Homomorphism and Inverse Homomorphism
Best Reference Books – M.Sc. – Anthropology
advertisement
advertisement
Recommended Posts:
1. Electric Drives Questions and Answers
2. Prestressed Concrete Structures Questions and Answers
3. Data Structure Questions and Answers
4. Information Science Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 121/358
9/16/2020 data.html
5. Computer Science Questions and Answers
6. Transformers Questions and Answers
7. Home
8. Engineering Drawing Questions and Answers
9. Theory of Machines Questions and Answers
10. Electromagnetic Theory Questions and Answers
11. Network Theory Questions and Answers
12. C Programming Examples on Set & String Problems & Algorithms
13. Compilers Questions and Answers
14. Java Programming Examples on Set & String Problems & Algorithms
15. C++ Programming Examples on Set & String Problems & Algorithms
16. C# Programming Examples on Conversions
17. Automata Theory Questions and Answers
18. Automata Theory Questions and Answers – Uses of Epsilon-Transitions
19. Automata Theory Questions and Answers – Union, Intersection & Complement 20. Theory of
Computation – Regular Grammars
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Testing Emptiness
and Membership”.
Answer: c
Explanation: A decision property of a language class is an algorithm that takes a formal description of a
language(e.g., a DFA) and tells whether or not some property holds.
advertisement
Answer: d
Explanation: Emptiness, Infiniteness and Membership are the decision properties of any language class.
Example: Is the language L empty? Or Is w, a string belongs to the regular language L?
3. Pick the odd one out of the given properties of a regular language:
a) Kleene
b) Reversal
file:///C:/Users/gurun/Desktop/data.html 122/358
9/16/2020 data.html
c) Homomorphism
d) MembershipView Answer
Answer: d
Explanation: Membership is a decision property of language class while others mentioned like Kleene,
Reversal and Homomorphism are Closure properties of language class.
Answer: d
Explanation: For a given automata, all the formats of representation be it deterministic finite automata or non
deterministic finite automata or non deterministic finite automata with epsilon transitions, all are equivalent
variants.
advertisement
Answer: d
Explanation: It is possible to convert from one specification to another. We can express a regular language in
all the given four variants.
Answer: d
Explanation: To give a solution to the mentioned problems, we require decision properties and for some, we
need additional tools like minimized automaton and Pumping lemma.
7. Which of the following is a function of Closure properties?
a) Helps construct representations
b) Helps show informally described languages not to be in class
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: c
Explanation: Using closure properties we can give a=solution to many problems like :
Is the regular languages L1 and L2 closed on concatenation operation?, etc.
advertisement
8. Suppose there is a string w=abbab, and there exists a DFA which accepts w. How many stepts will
be required to test its membership? a) 2
b) 1
c) 4
d) None of the mentionedView Answer
file:///C:/Users/gurun/Desktop/data.html 123/358
9/16/2020 data.html
Answer: If a string belongs to a language, the number of steps required to test that member ship is equal to
the length of string i.e. 5.
9. If a DFA has n states and the language contains any string of length n or more, the language is termed as:
a) Infinite
b) Empty
c) Non regular
d) None of the mentionedView Answer
Answer: The language is surely finite if it is limited to string of length n or less. This is because there are
atleast n+1 states along the path while traversing w(string).
Answer: a
Explanation: This occurs because there are atleast n+1 states along the path while traversing the string w.
advertisement
Recommended Posts:
1. PHP Questions and Answers
2. Spring Questions and Answers
3. C++ Algorithms, Problems & Programming Examples
4. Solid State Chemistry Questions and Answers
5. Java Programming Examples on Java.Lang
6. Javascript Questions and Answers
7. LISP Questions and Answers
8. Artificial Intelligence Questions and Answers
9. Discrete Mathematics Questions and Answers
10. C Algorithms, Problems & Programming Examples
11. C Programming Examples on Set & String Problems & Algorithms
12. C++ Programming Examples on Set & String Problems & Algorithms
13. Java Programming Examples on Set & String Problems & Algorithms
14. Theory of Machines Questions and Answers
15. Network Theory Questions and Answers
16. Electromagnetic Theory Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 124/358
9/16/2020 data.html
17. C# Programming Examples on Functions
18. Mechanical Behaviour & Testing of Materials Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Context Free
Grammar-Derivations and Definitions”.
Answer: c
Explanation: The entity which accepts a language is termed as Automata while the one which generates it is
called Grammar. Tokens are the smallest individual unit of a program.
advertisement
Answer: c
Explanation: Context Sensitive Language or Type 1 or Linearly Bounded Non deterministic Language has
the production rule where the production is context dependent i.e. aAb->agb.
3. Which of the following statement is false?
a) Context free language is the subset of context sensitive language
b) Regular language is the subset of context sensitive language
c) Recursively ennumerable language is the super set of regular language
d) Context sensitive language is a subset of context free languageView Answer
Answer: d
Explanation: Every regular language can be produced by context free grammar and context free language can
be produced by context sensitive grammar and so on.
file:///C:/Users/gurun/Desktop/data.html 125/358
9/16/2020 data.html
4. The Grammar can be defined as: G=(V, ∑, p,
S) In the given definition, what does S represents?
a) Accepting State
b) Starting Variable
c) Sensitive Grammar
d) None of theseView Answer
Answer: b
Explanation: G=(V, ∑, p, S), here V=Finite set of variables, ∑= set of terminals, p= finite productions, S=
Starting Variable.
advertisement
Answer: d
Explanation: There exists no finite automata to accept the given language i.e. 0n1n. For other options, it is
possible to make a dfa or nfa representing the language set.
Answer: c
Explanation: According to the definition, the starting variable can produce another variable or any terminal
or a variable which leads to terminal.
7. For S->0S1|e for ∑={0,1}*, which of the following is wrong for the language produced?
a) Non regular language
b) 0n1n | n>=0
c) 0n1n | n>=1
d) None of the mentionedView Answer
Answer: d
Explanation: L={e, 01, 0011, 000111, ……0n1n }. As epsilon is a part of the set, thus all the options are
correct implying none of them to be wrong.
advertisement
8. The minimum number of productions required to produce a language consisting of palindrome strings
over ∑={a,b} is a) 3
b) 7
c) 5
d) 6
View Answer
file:///C:/Users/gurun/Desktop/data.html 126/358
9/16/2020 data.html
Answer: c
Explanation: The grammar which produces a palindrome set can be written as:
S-> aSa | bSb | e | a | b
L={e, a, b, aba, abbbaabbba…..}
Answer: a
Explanation: Regular grammar is a subset of context free grammar and thus all regular grammars are context
free.
Answer: a
Explanation: A context free grammar G is ambiguous if there is atleast one string in L(G) which has two or
more distinct leftmost derivations.
advertisement
« Prev - Automata Theory Questions and Answers – Testing Emptiness and Membership
» Next - Automata Theory Questions and Answers – The Language of a Grammar, Inferences and
Ambiguity Categories Automata Theory MCQs
Post navigation
Best Reference Books – M.Sc. – Biochemistry
Automata Theory Questions and Answers – The Language of a Grammar, Inferences and Ambiguity
advertisement
advertisement
Recommended Posts:
1. Engineering Physics II Questions and Answers
2. Java Programming Examples on Set & String Problems & Algorithms
3. C Tutorials
4. Statistical Quality Control Questions and Answers
5. Information Science Questions and Answers
6. PHP Questions and Answers
7. Computer Science Questions and Answers
8. Python Questions and Answers
9. C Programming Examples on Set & String Problems & Algorithms
10. C++ Programming Examples on Set & String Problems & Algorithms
11. Home
12. Theory of Machines Questions and Answers
13. Network Theory Questions and Answers
14. Electromagnetic Theory Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 127/358
9/16/2020 data.html
15. Compilers Questions and Answers
16. Automata Theory Questions and Answers
17. Compilers Questions and Answers – Regular Grammar – 1
18. Automata Theory Questions and Answers – Chomsky Normal Form
19. Automata Theory Questions and Answers – Inferences to Trees, Trees to Derivations 20. Automata
Theory Questions and Answers – DPDA and Ambiguous Grammars
advertisement
This set of Automata Theory Problems focuses on “The Language of a Grammar, Inferences and
Ambiguity”.
Answer: d
Explanation: The following are the notions to express Context free grammars:
a) Recursive Inferences
b) Derivations
c) Sentential form
d) Parse trees
advertisement
Answer: a
Explanation: We apply the productions of CFG to infer that certain strings are in the language of a certain
variable.
3. Which of the following is/are the suitable approaches for inferencing?
a) Recursive Inference
b) Derivations
c) Both Recursive Inference and Derivations
d) None of the mentionedView Answer
Answer: c
Explanation: Two inference approaches:
1. Recursive inference, using productions from body to head
file:///C:/Users/gurun/Desktop/data.html 128/358
9/16/2020 data.html
2. Derivations, using productions from head to body
4. If w belongs to L(G), for some CFG, then w has a parse tree, which defines the syntactic structure of w. w
could be:
a) program
b) SQL-query
c) XML document
d) All of the mentionedView Answer
Answer: d
Explanation: Parse trees are an alternative representation to derivations and recursive inferences. There can
be several parse trees for the same string.
Answer: a
Explanation: Yes, they are equivalent. Both the terminologies represent the two approaches of recursive
inferencing.
advertisement
6. A->aA| a| b
The number of steps to form aab:
a) 2
b) 3
c) 4
d) 5
View Answer
Answer: b
Explanation: A->aA=>aaA=>aab
7. An expression is mentioned as follows. Figure out number of incorrect notations or symbols, such that a
change in those could make the expression correct. L(G)={w in T*|S→*w}
a) 0 Errors
b) 1 Error
c) 2 Error
d) Invalid ExpressionView Answer
Answer: a
Explanation: For the given expression, L(G)={w in T*|S→*w}, If G(V, T, P, S) is a CFG, the language of G,
denoted by L(G), is the set of terminal strings that have derivations from the start symbol.
8. The language accepted by Push down Automaton:
a) Recursive Language
b) Context free language
c) Linearly Bounded language
d) All of the mentionedView Answer
Answer: b
Explanation: Push down automata accepts context free language.
file:///C:/Users/gurun/Desktop/data.html 129/358
9/16/2020 data.html
9. Which among the following is the correct option for the given grammar?
G->X111|G1,X->X0|00 a) {0a1b|a=2,b=3}
b) {0a1b|a=1,b=5}
c) {0a1b|a=b}
d) More than one of the mentioned is correctView Answer
Answer: a
Explanation: Using the recursive approach, we can conclude that option a is the correct answer, and its not
possible for a grammar to have more than one language.
advertisement
Answer: d
Explanation: The given language is neither accepted by a finite automata or a push down automata. Thus, it
is neither a context free language nor a regular language.
a) true
b) partially true
c) false
d) none of the mentionedView Answer
Answer: a
Explanation: We apply the productions of a CFG to infer that certain strings are in a language of certain
variable.
13. Which of the following statements are correct for a concept called inherent ambiguity in CFL?
a) Every CFG for L is ambiguous
b) Every CFG for L is unambiguous
file:///C:/Users/gurun/Desktop/data.html 130/358
9/16/2020 data.html
c) Every CFG is also regular
d) None of the mentionedView Answer
Answer: a
Explanation: A CFL L is said to be inherently ambiguous if every CFG for L is ambiguous.
Answer: a
Explanation: Rohit Parikh in 1961 proved in his MIT research paper that some context free language can
only have ambiguous grammars.
« Prev - Automata Theory Questions and Answers – Context Free Grammar-Derivations and Definitions
» Next - Automata Theory Questions and Answers – Sentential Forms
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Context Free Grammar-Derivations and Definitions
Best Reference Books – M.Sc. – Microbiology
advertisement
advertisement
Recommended Posts:
1. C Programming Examples on Set & String Problems & Algorithms
2. Data Science Questions and Answers
3. Ruby Programming Questions and Answers
4. Artificial Intelligence Questions and Answers
5. Network Theory Questions and Answers
6. Theory of Machines Questions and Answers
7. C Tutorials
8. C# Programming Examples on Data Structures
9. Electromagnetic Theory Questions and Answers
10. Home
11. Compilers Questions and Answers
12. Automata Theory Questions and Answers
13. Automata Theory Questions and Answers – The Language of NFA
14. Automata Theory Questions and Answers – Intersection with Regular Languages
15. Automata Theory Questions and Answers – Pumping Lemma for Regular Language
16. Automata Theory Questions and Answers – The Language of DFA
17. Automata Theory Questions and Answers – CFG-Eliminating Useless Symbols
18. Automata Theory Questions and Answers – Sentential Forms
19. Automata Theory Questions and Answers – PDA-acceptance by Empty Stack 20. Compilers
Questions and Answers – Right Left Linear Grammar – 2
advertisement
file:///C:/Users/gurun/Desktop/data.html 131/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Sentential Forms”.
Answer: a
Explanation: A CFG is said to right linear if each production body has at most one variable, and that variable
is at the right end. That is, all productions of a right linear grammar are of the form A->wB or A->w, where
A and B are variables while w is some terminal.
advertisement
Answer: c
Explanation: Using the derivation approach, we can conclude that the given grammar produces a language
with a set of string which have equal number of a’s and b’s.
3. If L1 and L2 are context free languages, which of the following is context free?
a) L1*
b) L2UL1
c) L1.L2
d) All of the mentionedView Answer
Answer: d
Explanation: The following is a theorem which states the closure property of context free languages which
includes Kleene operation, Union operation and Dot operation.
4. For the given Regular expression, the minimum number of variables including starting variable required to
derive its grammar is: (011+1)*(01)* a) 4
b) 3
c) 5
d) 6
View Answer
Answer: c
Explanation: The grammar can be written as:
S->BC
B->AB|ε
A->011|1 C-
>DC|ε D->01
file:///C:/Users/gurun/Desktop/data.html 132/358
9/16/2020 data.html
advertisement
5. For the given Regular expression, the minimum number of terminals required to derive its grammar is:
(011+1)*(01)* a) 4
b) 3
c) 5
d) 6
View Answer
Answer: b
Explanation: The grammar can be written as:
S->BC
B->AB|ε
A->011|1
C->DC|ε D-
>01
6. A grammar G=(V, T, P, S) is __________ if every production taken one of the two forms: B-
>aC
B->a
a) Ambiguous
b) Regular
c) Non Regular
d) None of the mentionedView Answer
Answer: b
Explanation: The following format of grammar is of Regular grammar and is a part of Context free grammar
i.e. like a specific form whose finite automata can be generated.
Answer: c
Explanation: We can build context free grammar through different approaches, recursively defining the
variables and terminals inorder to fulfil the conditions.
advertisement
8. Which of the following languages are most suitable for implement context free languages ?
a) C
b) Perl
c) Assembly Language
d) None of the mentionedView Answer
Answer: a
Explanation: The advantage of using high level programming language like C and Pascal is that they allow
us to write statements that look more like English.
9. Which among the following is the correct grammar for the given language?
L={x {0,1}*|number of zeroes in x¹number of one’s in x} a) S->
0|SS|1SS|SS1|S1S
b) S-> 1|0S|0SS|SS0|S0S
file:///C:/Users/gurun/Desktop/data.html 133/358
9/16/2020 data.html
c) S-> 0|0S|1SS|SS1|S1S
d) None of the mentionedView Answer
Answer: c
Explanation: L={0, 1, 00, 11, 001, 010,…}
The grammar can be framed as: S-> 0|0S|1SS|SS1|S1S
Answer: a
Explanation: It is just required to put the value in the variables in the question and check if it satisfies or not.
advertisement
« Prev - Automata Theory Questions and Answers – The Language of a Grammar, Inferences and
Ambiguity » Next - Automata Theory Questions and Answers – Construction and Yield of a Parse Tree
Categories Automata Theory MCQs
Post navigation
Best Reference Books – M.Sc. – Microbiology
Best Reference Books – M.Sc. – Applied Geology
advertisement
advertisement
Recommended Posts:
1. C Questions and Answers
2. C# Questions and Answers
3. Spring Questions and Answers
4. Probability and Statistics Questions and Answers
5. C Tutorials
6. Data Science Questions and Answers
7. Javascript Questions and Answers
8. LISP Questions and Answers
9. Ruby Programming Questions and Answers
10. Computer Science Questions and Answers
11. Python Questions and Answers
12. Information Science Questions and Answers
13. Theory of Machines Questions and Answers
14. PHP Questions and Answers
15. Network Theory Questions and Answers
16. Electromagnetic Theory Questions and Answers
17. Compilers Questions and Answers
18. Automata Theory Questions and Answers – Eliminating Unit Productions
19. Automata Theory Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 134/358
9/16/2020 data.html
20. Automata Theory Questions and Answers – CFG-Eliminating Useless Symbols
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Construction and
Yield of a Parse Tree”.
1. The most suitable data structure used to represent the derivations in compiler:
a) Queue
b) Linked List
c) Tree
d) Hash TablesView Answer
Answer: c
Explanation: The tree, known as “Parse tree” when used in a compiler, is the data structure of choice to
represent the source program.
advertisement
Answer: a
Explanation: A node has atmost one parent, drawn above the node, and zero or more children drawn below.
Lines connect parents to children. There is one node, one root, that has no parent; this node appears to be at
the top of the tree. Nodes with no children are called leaves. Nodes that are not leaves are called interior
nodes.
Answer: a
Explanation: The children of a node are ordered from the left and drawn so. If N is to the left of node M, then
all the descendents of N are considered to be to the left of all the descendents of M.
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
View Answer
Answer: b
Explanation:
6. The number of leaves in a parse tree with expression E*(E) where * and () are operators
a) 5
b) 2
c) 4
d) 3
View Answer
Answer: a
Explanation:
7. Which of the following does the given parse tree correspond to?
file:///C:/Users/gurun/Desktop/data.html 136/358
9/16/2020 data.html
a) P->1100
b) P->0110
c) P->1100ε
d) P->0101View Answer
Answer: b
Explanation: The following is a parse tree for the production 0110 over {0,1}*.
advertisement
Answer: b
Explanation: A context free grammar G is ambiguous if there is at least one string in L(G) having two or
more distinct derivation trees or equivalently, two or more distinct leftmost derivations.
Answer: c
Explanation: In order to graphically represent a derivation of a grammar we need to use parse trees.
Answer: Parser or syntax analyzer is the one responsible for checking the grammar and reporting errors. In
this phase, parse tree is generated and syntax is analyzed.
advertisement
Recommended Posts:
1. Electromagnetic Theory Questions and Answers
2. Java Programming Examples on Graph Problems & Algorithms
3. C Programming Examples
4. Compilers Questions and Answers
5. C# Programming Examples on Data Structures
6. Network Theory Questions and Answers
7. Java Programming Examples on Data-Structures
8. C++ Programming Examples on Graph Problems & Algorithms
9. Data Structure Questions and Answers
10. C Programming Examples on Graph Problems & Algorithms
11. C Programming Examples using Recursion
12. Python Programming Examples on Graphs
13. C Programming Examples on Data-Structures
14. C Programming Examples on Linked List
15. C++ Programming Examples on Data-Structures
16. C Programming Examples without using Recursion
17. Python Programming Examples on Linked Lists
18. Python Programming Examples on Trees
19. C Programming Examples on Trees 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Question Bank focuses on “Inferences to Trees, Trees to Derivations”.
file:///C:/Users/gurun/Desktop/data.html 138/358
9/16/2020 data.html
1. A symbol X is ________ if there exists : S->* aXb
a) reachable
b) generating
c) context free
d) none of the mentionedView Answer
Answer: a
Explanation: A symbol X is generating if there exists : X->*w for some w that belongs to T*.
Also, a symbol can never be context free.
advertisement
Answer: c
Explanation: For a symbol X to be useful, it has to be both reachable and generating i.e. S-
>* aXb -> * w where w belongs to T*.
Answer: d
Explanation: G, a CFG is said to be in Chomsky normal form if all its productions are in one of the following
form:
A->BC or A->a
4. Given Checklist:
a) G has no useless symbols
b) G has no unit productions
c) G has no epsilon productions
d) Normal form for production is violated
Is it possible for the grammar G to be in CNF with the following checklisy ?
a) Yes
b) No View
Answer
Answer: b
Explanation: The grammar is not in CNF if it violates the normal form of the productions which is strictly
restricted.
advertisement
Answer: a
file:///C:/Users/gurun/Desktop/data.html 139/358
9/16/2020 data.html
Explanation: It is the parse tree theorem which states:
Given: Suppose we have a parse tree for a string w, according to a CNF grammar, G=(V, T, P, S). Let h be
the height of the parse tree. Now, Implication: |w|<=2h-1.
6. If |w|>=2h, then its parse tree’s height is at least _____
a) h
b) h+1
c) h-1
d) 2h
View Answer
Answer: b
Explanation: It is the basic implication of Parse tree theorem (assuming CNF). If the height of the parse tree
is h, then |w| <=2h-1.
7. If w belongs to L(G), for some CFG, then w has a parse tree, which tell us the ________ structure of w.
a) semantic
b) syntactic
c) lexical
d) all of the mentionedView Answer
Answer: b
Explanation: A parse tree or concrete syntactic tree is an ordered, rooted tree that represents the syntactic
structure of a string according to some context free grammar.
advertisement
Answer: c
Explanation: Both of the mentioned are different from parse trees. Sentence diagrams are pictorial
representations of grammatical structure of a sentence.
Answer: a
Explanation: Ideally, there should be only one parse tree for each string, i.e. the language should be
unambiguous.
Answer: a
file:///C:/Users/gurun/Desktop/data.html 140/358
9/16/2020 data.html
Explanation: It is also true that multiple leftmost or rightmost derivations do cause ambiguity. Unfortunately,
it is not possible to remove the ambiguity always.
advertisement
« Prev - Automata Theory Questions and Answers – Construction and Yield of a Parse Tree
» Next - Automata Theory Questions and Answers – Applications – Parsers
Categories Automata Theory MCQs
Post navigation
Best Reference Books – M.Sc. – Botany
Automata Theory Questions and Answers – Applications – Parsers
advertisement
advertisement
Recommended Posts:
1. C Programming Examples using Recursion
2. Python Programming Examples on Searching and Sorting
3. C Programming Examples on Set & String Problems & Algorithms
4. C++ Programming Examples on Set & String Problems & Algorithms
5. C Programming Examples on Combinatorial Problems & Algorithms
6. C Programming Examples on Data-Structures
7. C Programming Examples without using Recursion
8. Discrete Mathematics Questions and Answers
9. Data Structure Questions and Answers
10. Theory of Machines Questions and Answers
11. Electromagnetic Theory Questions and Answers
12. Java Algorithms, Problems & Programming Examples 13. C Programming Examples
14. C++ Algorithms, Problems & Programming Examples
15. Network Theory Questions and Answers
16. C Algorithms, Problems & Programming Examples
17. Compilers Questions and Answers
18. C Programming Examples on Trees
19. Python Programming Examples on Trees 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Applications –
Parsers”.
Answer: b
Explanation: Parsing is required to check the acceptability of a string. Further, comes the syntactical phase
which is taken care by other phases of compiler.
advertisement
2. Which of the following parser reaches the root symbol of the tree at last?
a) Top down parser
b) Bottom up parser
c) TOP down and Bottom up parser
d) None of the mentionedView Answer
Answer: b
Explanation: Bottom up parser starts from the bottom with the string and comes up to the start symbolusing a
parse tree or a derivation tree.
Answer: c
Explanation: It is a hybrid method which works bottom up along the left edges of each subtree, and top down
on the rest of the parse tree.
Answer: b
Explanation: Bottom up parsing is done by shift reduce parsers like LALR parsers, Operator precedence
parsers, simple precedence parsers, etc.
advertisement
Answer: d
Explanation: The mentioned are the correct and proper functions of a shift reduce parsers. The parsing
methods are most commonly used for parsing programming languages, etc.
Answer:
Explanation: LALR stands for Look ahead left to right parsers. It has more language recognition power than
LR(0) parser.
advertisement
Answer: c
Explanation: YACC is a computer code for UNIX operating system which generates a LALR parser. On the
other hand GNU Bison or Bison can generate LALR and GLR parsers.
Answer: d
Explanation: All the following mentioned are top down parsers and begin their operation from the starting
symbol.
Answer: c
Explanation: Predictive parsing is possible only for the class of LL-grammars, which are the CFG for which
there exists some positive integer k that allows a recursive descent parser to decide which production to use
by examining only the next k tokens of input.
advertisement
« Prev - Automata Theory Questions and Answers – Inferences to Trees, Trees to Derivations
» Next - Automata Theory Questions and Answers – YACC Parser Generator
Categories Automata Theory MCQs
file:///C:/Users/gurun/Desktop/data.html 143/358
9/16/2020 data.html
Post navigation
Automata Theory Questions and Answers – Inferences to Trees, Trees to Derivations
Best Reference Books – M.Sc. – Human Development
advertisement
advertisement
Recommended Posts:
1. C Programming Examples on Set & String Problems & Algorithms
2. Home
3. Bachelor of Computer Applications Questions and Answers
4. Master of Computer Applications Questions and Answers
5. Theory of Machines Questions and Answers
6. Network Theory Questions and Answers
7. Electromagnetic Theory Questions and Answers
8. Compilers Questions and Answers
9. Compilers Questions and Answers – L-Attributed Definition – 2
10. Automata Theory Questions and Answers – The Universal Language-Undecidability
11. Automata Theory Questions and Answers – Regular Language & Expression – 2
12. Automata Theory Questions and Answers – Applications of Pumping Lemma/Pigeonhole principle
13. Automata Theory Questions and Answers – The Language of a Grammar, Inferences and Ambiguity
14. Compilers Questions and Answers – LR Parser – 1
15. Automata Theory Questions and Answers – Equivalence of NFA and DFA
16. Automata Theory Questions and Answers – Finite Automata
17. Automata Theory Questions and Answers – Finite Automata with Epsilon Transition
18. Automata Theory Questions and Answers
19. Automata Theory Questions and Answers – Chomsky Normal Form 20. Compilers Questions and
Answers – Intermediate Code-Generation – 1
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “YACC Parser
Generator”.
Answer: c
Explanation: YACC technique is a computer code for the Unix operating system. It is a LALR parser
generator, generating a parser, the part of a compiler that tries to make syntactic sense of the source code.
advertisement
Answer: c
Explanation: YACC stands for ‘Yet another compiler compiler’ and it was developed by Stephen Johnson in
B programming language later translated to C.
Answer: b
Explanation: The YACC takes C code as input and produces shift reduce parsers in C,also known as Bottom
up parsers which execute C snippets with the associated rule.
Answer: a
Explanation: LALR parser generator is software tool that reads a BNF grammar and creates a LALR parser
which is capable of parsing files written in programming language identified by BNF grammar.
advertisement
Answer: c
Explanation: Stephen Johnson wrote this parser generator in B programming language which was further
modified and written in C, JAVA, Python, etc.
Answer: d
Explanation: B was programming language designed by Dennis Ritchie and Ken Thompson for recursive,
non numeric, system and language softwares. It was a typeless language, everything is a word.
Answer: b
Explanation: The normal form used in Data base normalization is BCNF i.e. Boyce Codd normal form and
NOT Backus Naur Form.
advertisement
Answer: a
Explanation: BNF is a metasyntax used to express context free grammar, moreover a formal way to express
the language.
Answer: d
Explanation: W grammar or van Wijngaarden form is used to define potentially infinite context free
grammars in a finite number of rules. It is an example of larger class of affix grammars. This technique was
used to define the P/L Algol 68.
10. Which of the following version of Unix came up with YACC first?
a) V3
b) V5
c) CB UNIX
d) Unix-RTView Answer
Answer: a
Explanation: Yacc appeared in version 3 of unix, though full description was published by 1975.
advertisement
Recommended Posts:
file:///C:/Users/gurun/Desktop/data.html 146/358
9/16/2020 data.html
1. C++ Algorithms, Problems & Programming Examples
2. Java Algorithms, Problems & Programming Examples
3. Javascript Questions and Answers
4. Master of Computer Applications Questions and Answers
5. C Algorithms, Problems & Programming Examples
6. C Programming Examples on Set & String Problems & Algorithms
7. Ruby Programming Questions and Answers
8. R Programming Questions and Answers
9. LISP Questions and Answers
10. Programming Questions and Answers
11. Unix Questions and Answers
12. Network Theory Questions and Answers
13. Computer Science Questions and Answers
14. Electromagnetic Theory Questions and Answers
15. Theory of Machines Questions and Answers 16. Home
17. Information Science Questions and Answers
18. Linux Questions and Answers
19. Compilers Questions and Answers
20. Automata Theory Questions and Answers – CFL- Closure Properties/Decision Properties
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Markup
Languages”.
Answer: a
Explanation: Generally speaking, a meta language is a language used to describe a language. XML is a
metalanguage that is used to describe a markup language.
advertisement
Answer: b
Explanation: A document type definition (DTD) is a set of markup declarations that define a document type
for an SGML-family markup language (SGML, XML, HTML). A Document Type Definition (DTD) defines
file:///C:/Users/gurun/Desktop/data.html 147/358
9/16/2020 data.html
the legal building blocks of an XML document. It defines the document structure with a list of legal elements
and attributes.
3. Which among the following are true for an Extensible markup language?
a) Human Readable/ Machine Readable
b) Extended from SGML
c) Developed by www consortium
d) All of the mentionedView Answer
Answer: d
Explanation: XML is an open format markup language with a filename extension of .xml.
Answer: d
Explanation: More that hundred of document formats using XML syntax have been developed, including
RSS, Atom, SOAP and XHTML.
advertisement
Answer: b
Explanation: A document type definition defines the legal building blocks of an XML document .
Answer: d
Explanation: There are three categories of electronic markup: presentational, procedural, and descriptive
markup. Examples are XML, HTML, LaTeX, etc.
Answer: b
Explanation: Early examples of computer markup languages can be found in typesetting tools like troff and
nroff in Unix.
advertisement
Answer: a
Explanation: SGML is an acronym for Standard Generalized Markup Language.
Answer: d
Explanation: All the mentioned options are valid HTML5 arguments and executes properly.
advertisement
Recommended Posts:
1. LISP Questions and Answers
2. C Tutorials
3. C++ Programming Examples on STL
4. Spring Questions and Answers
5. Javascript Questions and Answers
6. C# Programming Examples on Networking
7. C Questions and Answers
8. C# Programming Examples on Functions
9. Cryptography and Network Security Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 149/358
9/16/2020 data.html
10. Computer Science Questions and Answers
11. Compilers Questions and Answers
12. C++ Questions and Answers
13. Information Science Questions and Answers
14. HTML Questions and Answers
15. Electromagnetic Theory Questions and Answers
16. Theory of Machines Questions and Answers
17. Network Theory Questions and Answers
18. Automata Theory Questions and Answers
19. Automata Theory Questions and Answers – From Grammars to Push Down Automata 20. Automata
Theory Questions and Answers – Programming Techniques-Storage and Subroutines
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Ambiguous
Grammar”.
1. A CFG is ambiguous if
a) It has more than one rightmost derivations
b) It has more than one leftmost derivations
c) No parse tree can be generated for the CFG
d) None of the mentionedView Answer
Answer: b
Explanation: A context free grammar is ambiguous if it has more than one parse tree generated or more than
one leftmost derivations. An unambiguous grammar is a context free grammar for which every valid string
has a unique leftmost derivation.
advertisement
Answer: a
Explanation: Deterministic CFGs are always unambiguous , and are an important subclass of unambiguous
CFGs; there are non-deterministic unambiguous CFGs, however.
Answer: d
file:///C:/Users/gurun/Desktop/data.html 150/358
9/16/2020 data.html
Explanation: The closure property of a context free grammar does not include iteration or kleene or star
operation.
Answer: a
Explanation: Dangling else problem: In many languages,the else in an if-then-else statement is optional,
which results into nested conditionals being ambiguous, at least in terms of the CFG.
advertisement
Answer: a
Explanation: A context free language for which no unambiguous grammar exists, is called Inherent
ambiguous language.
Answer: b
Explanation: This set is context-free, since the union of two context-free languages is always context free.
advertisement
Answer: a
Explanation: The production can be either itself or an empty string. Thus the empty string has more than one
leftmost derivations, depending on how many times R->R is being used.
file:///C:/Users/gurun/Desktop/data.html 151/358
9/16/2020 data.html
9. In context to ambiguity, the number of times the following programming statement can be interpreted as:
Statement: if R then if T then P else V a) 2
b) 3
c) 4
d) 1
View Answer
Answer: a
Explanation: Dangling else problem if R then (if T then P else V) and if R then (if T then P) else V are
the two ways in which the given if else statement can be parsed.
Answer: CYK algorithm parses the CFG in polynomial time while LR parsers do the same in linear time.
DCFGs are accepted by DPDAs and parsed using LR parsers or CYK algorithm.
advertisement
Recommended Posts:
1. Ruby Programming Questions and Answers
2. C Programming Examples on Set & String Problems & Algorithms
3. Home
4. Theory of Machines Questions and Answers
5. Network Theory Questions and Answers
6. Electromagnetic Theory Questions and Answers
7. Compilers Questions and Answers
8. Automata Theory Questions and Answers – PSPACE
9. Automata Theory Questions and Answers – Inferences to Trees, Trees to Derivations
10. Automata Theory Questions and Answers – Deterministic PDA
11. Automata Theory Questions and Answers – Pumping Lemma for Context Free Language 12.
Automata Theory Questions and Answers – DPDA and Context Free Languages
13. Automata Theory Questions and Answers – CFL- Closure Properties/Decision Properties
14. Automata Theory Questions and Answers
15. Automata Theory Questions and Answers – From PDA to Grammars
16. Automata Theory Questions and Answers – Regular Language & Expression – 2
17. Automata Theory Questions and Answers – Construction and Yield of a Parse Tree
file:///C:/Users/gurun/Desktop/data.html 152/358
9/16/2020 data.html
18. Automata Theory Questions and Answers – YACC Parser Generator
19. Automata Theory Questions and Answers – CFL- Other Normal Forms
20. Automata Theory Questions and Answers – Intersection with Regular Languages
advertisement
This set of Automata Theory Questions and Answers for Entrance exams focuses on “PDA-Acceptance by
Final State”.
Answer: a
Explanation: The term pushdown refers to the fact that the elements are pushed down in the stack and as per
the LIFO principle, the operation is always performed on the top element of the stack.
3. Which of the following allows stacked values to be sub-stacks rather than just finite symbols?
a) Push Down Automaton
b) Turing Machine
c) Nested Stack Automaton
d) None of the mentionedView Answer
Answer: c
Explanation: In computational theory, a nested stack automaton is a finite automaton which makes use of
stack containing data which can be additional stacks.
4. A non deterministic two way, nested stack automaton has n-tuple definition. State the value of n.
a) 5
b) 8
c) 4
d) 10
View Answer
file:///C:/Users/gurun/Desktop/data.html 153/358
9/16/2020 data.html
Answer: d
Explanation: The 10-tuple can be stated as: NSA= ‹Q,Σ,Γ,δ,q0,Z0,F,[,],]›.
advertisement
Answer: b
Explanation: Push down automata is for Context free languages and they are termed as Type 2 languages
according to Chomsky hierarchy.
6. The class of languages not accepted by non deterministic, nonerasing stack automata is _______
a) NSPACE(n2)
b) NL
c) CSL
d) All of the mentionedView Answer
Answer: d
Explanation: NSPACE or non deterministic space is the computational resource describing the memory
space for a non deterministic turing machine.
7. A push down automaton with only symbol allowed on the stack along with fixed symbol.
a) Embedded PDA
b) Nested Stack automata
c) DPDA
d) Counter AutomatonView Answer
Answer: d
Explanation: This class of automata can recognize a set of context free languages like {anbn|n belongs to N}
advertisement
Answer: a, d
Explanation: Push and pop are the operations we perform to operate a stack. A stack follows the LIFO
principle, which states its rule as: Last In First Out.
Answer: c
Explanation: When we reach the acceptance state and find the stack to be empty, we say, the string has been
accepted by the push down automata.
file:///C:/Users/gurun/Desktop/data.html 154/358
9/16/2020 data.html
10. The following move of a PDA is on the basis of:
a) Present state
b) Input Symbol
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: c
Explanation: The next operation is performed by PDA considering three factors: present state,symbol on the
top of the stack and the input symbol.
advertisement
Recommended Posts:
1. C Programming Examples on Data-Structures
2. Computer Science Questions and Answers
3. Discrete Mathematics Questions and Answers
4. C Programming Examples
5. RDBMS Questions and Answers
6. Information Science Questions and Answers
7. Java Programming Examples on Event Handling
8. Java Programming Examples on Exception Handling
9. Theory of Machines Questions and Answers
10. Java Programming Examples on Set & String Problems & Algorithms
11. Network Theory Questions and Answers
12. Electromagnetic Theory Questions and Answers
13. C Programming Examples on Set & String Problems & Algorithms
14. C++ Programming Examples on Set & String Problems & Algorithms
15. Python Programming Examples on Stacks & Queues
16. C Programming Examples on Stacks & Queues
17. Solid State Chemistry Questions and Answers
18. Compilers Questions and Answers
19. C# Programming Examples on Data Structures 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “PDA-acceptance
by Empty Stack”.
1. If two sets, R and T has no elements in common i.e. RÇT=Æ, then the sets are called
a) Complement
b) Union
c) Disjoint
d) ConnectedView Answer
Answer: c
Explanation: Two sets are called disjoint if they have no elements in common i.e. RÇT=Æ.
advertisement
2. Which among the following is not a part of the Context free grammar tuple?
a) End symbol
b) Start symbol
c) Variable
d) ProductionView Answer
Answer: a
Explanation: The tuple definition of context free grammar is: (V, T, P, S) where V=set of variables, T=set of
terminals, P=production, S= Starting Variable.
Answer: c
Explanation: Context free grammar is the set which belongs to the set of context free grammar. Similarly,
Regular grammar is a set which belongs to the the set of Context free grammar.
Answer: d
Explanation: Context free grammars are closed under kleene operation, union and concatenation too.
advertisement
Answer: b
Explanation: Pushdown Automaton uses stack as an auxiliary storage for its operations. Turing machines use
Queue for the same.
file:///C:/Users/gurun/Desktop/data.html 156/358
9/16/2020 data.html
6. Which of the following automata takes queue as an auxiliary storage?
a) Finite automata
b) Push down automata
c) Turing machine
d) All of the mentionedView Answer
Answer: c
Explanation: Pushdown Automaton uses stack as an auxiliary storage for its operations. Turing machines use
Queue for the same.
Answer: c
Explanation: A linearly bounded automata is a restricted non deterministic turing machine which is capable
of accepting ant context free grammar.
advertisement
9. The context free grammar which generates a Regular Language is termed as:
a) Context Regular Grammar
b) Regular Grammar
c) Context Sensitive Grammar
d) None of the mentionedView Answer
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.
Answer: a
Explanation: NPDA stands for non-deterministic push down automata whereas DPDA stands for
deterministic push down automata.
advertisement
Recommended Posts:
1. Java Programming Examples on Set & String Problems & Algorithms
2. Information Science Questions and Answers
3. Computer Science Questions and Answers
4. Python Questions and Answers
5. C++ Programming Examples on Set & String Problems & Algorithms
6. C Programming Examples on Set & String Problems & Algorithms
7. C# Programming Examples on Data Structures
8. Theory of Machines Questions and Answers
9. Network Theory Questions and Answers
10. Electromagnetic Theory Questions and Answers
11. Home
12. Compilers Questions and Answers
13. Automata Theory Questions and Answers – DPDA and Context Free Languages
14. Automata Theory Questions and Answers – The Language of a Grammar, Inferences and Ambiguity
15. Automata Theory Questions and Answers – Chomsky Normal Form
16. Automata Theory Questions and Answers -Turing Machine and Halting
17. Automata Theory Questions and Answers – Intersection with Regular Languages
18. Automata Theory Questions and Answers – The Universal Language-Undecidability
19. Automata Theory Questions and Answers – DPDA and Ambiguous Grammars 20. Automata Theory
Questions and Answers – From Grammars to Push Down Automata
advertisement
This set of Basic Automata Theory Questions and Answers focuses on “From Grammars to Push Down
Automata”.
1. The production of the form A->B , where A and B are non terminals is called
a) Null production
b) Unit production
c) Greibach Normal Form
d) Chomsky Normal FormView Answer
Answer: b
Explanation: A->ε is termed as Null production while A->B is termed as Unit production.
advertisement
file:///C:/Users/gurun/Desktop/data.html 158/358
9/16/2020 data.html
2. Halting states are of two types. They are:
a) Accept and Reject
b) Reject and Allow
c) Start and Reject
d) None of the mentionedView Answer
Answer: a
Explanation: Halting states are the new tuple members introduced in turing machine and is of two types:
Accept Halting State and Reject Halting State.
Answer: a
Explanation:
Answer: d
Explanation: z0 is the initial stack symbol, is an element of G. Other symbols like d represents the transition
function of the machine.
advertisement
5. Which of the following correctly recognize the symbol ‘|-‘ in context to PDA?
a) Moves
b) transition function
c) or/not symbol
d) none of the mentionedView Answer
Answer: a
Explanation: Using this notation, we can define moves and further acceptance of a string by the machine.
Answer: a
file:///C:/Users/gurun/Desktop/data.html 159/358
9/16/2020 data.html
Explanation: If M is a DPDA accepting L by an empty stsck, R and T are distinct strings in L, and R is a
prefix of T, then the sequence of moves M must make in order to accept R leaves the stack empty, since
R L. But then T cannot be accepted, since M cant move with an empty stack.
Answer: d
Explanation: Theorem: The language pal of palindromes over the alphabet {0,1} cannot be accepted by any
finite automaton , and it is therefore not regular.
advertisement
8. For a counter automaton, with the symbols A and Z0, the string on the stack is always in the form of
__________ a) A
b) AnZ0, n>=0
c) Z0An, n>=0
d) None of the mentionedView Answer
Answer: b
Explanation:The possible change in the stack contents is a change in the number of A’s on the stack.
Answer: a
Explanation: The PDA works as follows. Instead of saving excess 0’s or 1’s on the stack, we save *’s and
use two different states to indicate which symbol there is currently a surplus of. The state q0 is the initial
state and the only accepting state.
Answer: d
Explanation: A string is said to be balanced if it consist of equal number of 0’s and 1’s.
advertisement
Recommended Posts:
1. VLSI Questions and Answers
2. Java Programming Examples on Event Handling
3. Java Programming Examples on Set & String Problems & Algorithms
4. Information Science Questions and Answers
5. Cloud Computing Questions and Answers
6. Bioprocess Engineering Questions and Answers
7. Artificial Intelligence Questions and Answers
8. Computer Science Questions and Answers
9. C Programming Examples on Set & String Problems & Algorithms
10. Home
11. C++ Programming Examples on Set & String Problems & Algorithms
12. C Programming Examples on Data-Structures
13. Theory of Machines Questions and Answers
14. Electromagnetic Theory Questions and Answers
15. C Programming Examples on Stacks & Queues
16. Python Programming Examples on Stacks & Queues
17. Network Theory Questions and Answers
18. C# Programming Examples on Data Structures
19. Compilers Questions and Answers
20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “From PDA to
Grammars”.
Answer: d
Explanation: The instantaneous description of a PDA is represented by 3 tuple:
file:///C:/Users/gurun/Desktop/data.html 161/358
9/16/2020 data.html
(q,w,s) where q is the state, w is the unconsumed input and s is the stack
content.
advertisement
Answer: a
Explanation: A turnstile notation is used for connecting pairs od ID’s taht represents one or many moves of a
PDA.
a) {0n1n|n>=0}
b) {0n12n|n>=0}
c) {02n1n|n>=0}
d) None of the mentionedView Answer Answer: a
4. Which of the following correctly resembles the given state diagram?
a) {wwr|w=(a+b)*}
b) ε is called the initial stack symbol
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: a
Explanation: Initially we put a special symbol ‘#’ into the empty stack. At state q1, the w is being read. In
state q2, each 0 or 1 is popped when it matches the input. If any other input is given, the PDA will go to a
dead state. When we reach that special symbol ‘#’, we go to the accepting state q3.
file:///C:/Users/gurun/Desktop/data.html 162/358
9/16/2020 data.html
advertisement
Answer: d
Explanation:
All the assertions mentioned are theorems or corollary.
Answer: d
Explanation: Yes, a PDA can be represented using a transition diagram, transition table and an instantaneous
description.
Answer: a
Explanation: Push down automata is the automaton machine for all the context free grammar or Type 2
languages.
advertisement
Answer: c
Explanation: Geraud proved the equivalence problem decidable for Deterministic PDA .
9. Which of the following are the actions that operates on stack top?
a) Pushing
b) Popping
c) Replacing
d) All of the mentionedView Answer
Answer: d
Explanation: Push, pop and replace are all the basic and only operations that takes place on stack top.
10. A push down automata is said to be _________ if it has atmost one transition around all configurations.
a) Finite
file:///C:/Users/gurun/Desktop/data.html 163/358
9/16/2020 data.html
b) Non regular
c) Non-deterministic
d) DeterministicView Answer
Answer: d
Explanation: DPDA or Deterministic Push down automata has atmost one transition applicable to each
configuration.
advertisement
« Prev - Automata Theory Questions and Answers – From Grammars to Push Down Automata
» Next - Automata Theory Questions and Answers – Deterministic PDA
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – From Grammars to Push Down Automata
Automata Theory Questions and Answers – Deterministic PDA
advertisement
advertisement
Recommended Posts:
1. C# Programming Examples on Exceptions
2. VLSI Questions and Answers
3. Home
4. Cloud Computing Questions and Answers
5. Information Science Questions and Answers
6. Java Programming Examples on Set & String Problems & Algorithms
7. Computer Science Questions and Answers
8. C Programming Examples on Data-Structures
9. Discrete Mathematics Questions and Answers
10. Solid State Chemistry Questions and Answers
11. C Programming Examples on Set & String Problems & Algorithms
12. C Programming Examples on Stacks & Queues
13. C++ Programming Examples on Set & String Problems & Algorithms
14. Theory of Machines Questions and Answers
15. Python Programming Examples on Stacks & Queues
16. Network Theory Questions and Answers
17. Compilers Questions and Answers
18. Electromagnetic Theory Questions and Answers
19. C# Programming Examples on Data Structures
20. Automata Theory Questions and Answers – The Language of NFA
advertisement
1. The transition a Push down automaton makes is additionally dependent upon the:
a) stack
b) input tape
c) terminals
d) none of the mentionedView Answer
Answer: a
Explanation: A PDA is a finite machine which has an additional stack storage. Its transitions are based not
only on input and the correct state but also on the stack.
advertisement
Answer: a
Explanation: A machine configuration is an element of K×Σ*×Γ*.
(p,w,γ) = (current state, unprocessed input, stack content).
Answer: b
Explanation: A string w is accepted by a PDA if and only if (s,w, e) |-* (f, e, e)
4. With reference of a DPDA, which among the following do we perform from the start state with an empty
stack?
a) process the whole string
b) end in final state
c) end with an empty stack
d) all of the mentionedView Answer
Answer: d
Explanation: The empty stack in the end is our requirement relative to finite state automatons.
advertisement
Answer: a
Explanation: A Deterministic Push Down Automata is a Push Down Automata in which no state p has two or
more transitions.
file:///C:/Users/gurun/Desktop/data.html 165/358
9/16/2020 data.html
6. State true or false:
Statement: For every CFL, G, there exists a PDA M such that L(G) = L(M) and vice versa.
a) true
b) false
View Answer
Answer: a
Explanation: There exists two lemma’s such that:
a) Given a grammar G, construct the PDA and show the equivalence
b) Given a PDA, construct a grammar and show the equivalence
7. If the PDA does not stop on an accepting state and the stack is not empty, the string is:
a) rejected
b) goes into loop forever
c) both (a) and (b)
d) none of the mentionedView Answer
Answer: a
Explanation: To accept a string, PDA needs to halt at an accepting state and with a stack empty, else it is
called rejected. Given a PDA M, we can construct a PDA M’ that accepts the same language as M, by both
acceptance criteria.
advertisement
8. A language accepted by Deterministic Push down automata is closed under which of the following?
a) Complement
b) Union
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: a
Explanation: Deterministic Context free languages(one accepted by PDA by final state), are drastically
different from the context free languages. For example they are closed under complementation and not
union.
Answer: a
Explanation: JFLAP is a software for experimenting with formal topics including NFA, NPDA, multi-tape
turing machines and L-systems.
Answer: a
Explanation: The linear encodings of languages accepted by finite nested word automata gives the class of
‘visibly pushdown automata’.
advertisement
file:///C:/Users/gurun/Desktop/data.html 166/358
9/16/2020 data.html
Sanfoundry Global Education & Learning Series – Automata Theory.
To practice all areas of Automata Theory, here is complete set of 1000+ Multiple Choice Questions and
Answers.
Recommended Posts:
1. Terms of Service
2. C# Programming Examples on Threads
3. C Programming Examples on Data-Structures
4. Java Programming Examples on Exception Handling
5. VLSI Questions and Answers
6. CSS Questions and Answers
7. Information Science Questions and Answers
8. Computer Science Questions and Answers
9. Java Programming Examples on Set & String Problems & Algorithms
10. Solid State Chemistry Questions and Answers
11. Theory of Machines Questions and Answers
12. Python Programming Examples on Stacks & Queues
13. C Programming Examples on Stacks & Queues
14. Network Theory Questions and Answers
15. C++ Programming Examples on Set & String Problems & Algorithms
16. Electromagnetic Theory Questions and Answers
17. C Programming Examples on Set & String Problems & Algorithms
18. C# Programming Examples on Data Structures
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular
Languages and D-PDA”.
file:///C:/Users/gurun/Desktop/data.html 167/358
9/16/2020 data.html
Answer: a
Explanation: All regular languages can be accepted by a non deterministic finite automata and all context
free languages can be accepted by a non deterministic push down automata.
advertisement
2. Let T={p, q, r, s, t}. The number of strings in S* of length 4 such that no symbols can be repeated.
a) 120
b) 625
c) 360
d) 36
View Answer
Answer: b
Explanation: Using the permutation rule, we can calculate that there will be total of 625 permutations on 5
elements taking 4 as the length.
Answer: a
Explanation: The chomsky hierarchy lays down the following order: Regular<CFL<CSL<Unrestricted
Answer: c
Explanation: All the regular languages are the subset to context free languages and thus can be accepted
using push down automata.
advertisement
Answer: b
Explanation: e is the identity for concatenation. Thus, eR=R.
6. Which of the following strings do not belong the given regular expression?
(a)*(a+cba) a) aa
b) aaa
c) acba
d) acbacbaView Answer
Answer: d
Explanation: The string acbacba is unacceptable by the regular expression (a)*(a+cba).
file:///C:/Users/gurun/Desktop/data.html 168/358
9/16/2020 data.html
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)*
b) (bbbb+aaaa)*
c) ((a+b)(a+b)(a+b)(a+b))*
d) None of the mentionedView Answer
Answer: c
Explanation: Other mentioned options do not many of the combinations while option c seems most reliable.
advertisement
Answer: d
Explanation: All the given options are generated by the given grammar. Using the methods of left and right
derivations, it is simpler to look for string which a grammar can generate.
Answer: b
Explanation: Here, the first mentioned b is fixed while the other can be zero or can be repeated any number
of time.
Answer: b
Explanation: Ant formal grammar is represented using a 4-tuple definition where V= finite set of variables,
T= set of terminal characters, P=set of productions and S= Starting Variable with certain conditions based on
the type of formal grammar.
advertisement
Recommended Posts:
1. Home
2. C# Programming Examples on Functions
3. LISP Questions and Answers
4. C# Programming Examples on Data Structures
5. C Tutorials
6. Computer Science Questions and Answers
7. C++ Programming Examples on Set & String Problems & Algorithms
8. C Programming Examples on Set & String Problems & Algorithms
9. Java Programming Examples on Utility Classes
10. C Programming Examples on Strings
11. Information Science Questions and Answers
12. Java Programming Examples on Set & String Problems & Algorithms
13. Java Programming Examples on String Handling
14. Python Questions and Answers
15. Theory of Machines Questions and Answers
16. Network Theory Questions and Answers
17. PHP Questions and Answers
18. Electromagnetic Theory Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “DPDA and
Context Free Languages”.
1. Context free grammar is called Type 2 grammar because of ______________ hierarchy.
a) Greibach
b) Backus
c) Chomsky
d) None of the mentionedView Answer
Answer: c
Explanation: Chomsky hierarchy decide four type of language :Type 3- Regular Language, Type 2-Context
free language, Type 1-Context Sensitive Language, Type 0- Unrestricted or Recursively Ennumerable
language.
advertisement
2. a→b
Restriction: Length of b must be atleast as much length of a.
Which of the following is correct for the given assertion?
a) Greibach Normal form
b) Context Sensitive Language
file:///C:/Users/gurun/Desktop/data.html 170/358
9/16/2020 data.html
c) Chomsky Normal form
d) Recursively Ennumerable languageView Answer
Answer: b
Explanation: A context-sensitive grammar (CSG) is a formal grammar in which the left-hand sides and
righthand sides of any production rules may be surrounded by a context of terminal and non terminal
symbols. Context-sensitive grammars are 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 described by CSG.
Answer: a
Explanation: V is the set of non terminal symbols while T is the st of terminal symbols, their intersection
would always be null.
Answer: a
Explanation: Here the production P is from the definition of Context free grammar and thus, has no right or
left context.
6. If the partial derivation tree contains the root as the starting variable, the form is known as:
a) Chomsky hierarchy
b) Sentential form
c) Root form
d) None of the mentionedView Answer
Answer: b
Explanation: Example: For any grammar, productions be:
S->AB
A->aaA| ^
file:///C:/Users/gurun/Desktop/data.html 171/358
9/16/2020 data.html
B->Bb| ^
The partial derivation tree can be drawn as:
7. Find a regular expression for a grammar which generates a language which states :
L contains a set of strings starting wth an a and ending with a b, with something in the middle.
a) a(a*Ub*)b
b) a*(aUb)b*
c) a(a*b*)b
d) None of the mentionedView Answer
Answer: a
Explanation: The grammar for the same language can be stated as :
(1) S → aMb
(2) M → A
(3) M → B
(4) A → e
(5) A → aA
(6) B → e
(7) B → bB
8. Which of the following is the correct representation of grammar for the given regular expression?
a(aUb)*b
a) (1) S → aMb
(2) M → e
(3) M → aM
(4) M → bM
b) (1) S → aMb
(2) M → Mab
(3) M → aM
(4) M → bM
advertisement
c) (1) S → aMb
(2) M → e
(3) M → aMb
(4) M → bMa
Answer: a
Explanation:
file:///C:/Users/gurun/Desktop/data.html 172/358
9/16/2020 data.html
The basic idea of grammar formalisms is to capture the structure of string by
a) using special symbols to stand for substrings of a particular structure
b) using rules to specify how the substrings are combined to form new substrings.
Answer: d
Explanation: A CFG consists of:
a) a set of terminals, which are characters of alphabets that appear in the string generated by the grammar.
b) a set of non terminals, which are placeholders for patterns of terminal symbols that can be generated bythe
nonterminal symbols.
c) a set of productions, which are set of rules to transit from one state to other forming up the string
d) a start symbol, a special non terminal symbol that appears in the initial string generated in the grammar.
10. A CFG for a program describing strings of letters with the word “main” somewhere in the string:
a) -> m a i n
-> | epsilon
-> A | B | … | Z | a | b … | z
b) –> m a i n
–>
–> A | B | … | Z | a | b … | z
advertisement
c) –> m a i n
–> | epsilon
–> A | B | … | Z | a | b … | z
Answer: a
Explanation: None.
« Prev - Automata Theory Questions and Answers – Regular Languages and D-PDA
» Next - Automata Theory Questions and Answers – DPDA and Ambiguous Grammars
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Regular Languages and D-PDA
Automata Theory Questions and Answers – DPDA and Ambiguous Grammars
advertisement
advertisement
Recommended Posts:
file:///C:/Users/gurun/Desktop/data.html 173/358
9/16/2020 data.html
1. Machine Drawing Questions and Answers
2. C# Questions and Answers
3. C Algorithms, Problems & Programming Examples
4. C++ Questions and Answers
5. Java Programming Examples on Java.Lang
6. Theory of Machines Questions and Answers
7. Network Theory Questions and Answers
8. LISP Questions and Answers
9. C# Programming Examples on Functions
10. C Tutorials
11. Electromagnetic Theory Questions and Answers
12. Java Programming Examples on Set & String Problems & Algorithms
13. C++ Programming Examples on Set & String Problems & Algorithms
14. C Programming Examples on Set & String Problems & Algorithms
15. Ruby Programming Questions and Answers
16. Compilers Questions and Answers
17. Automata Theory Questions and Answers
18. Theory of Computation – Eliminating null production from the productions in the Context Free
Grammar
19. Automata Theory Questions and Answers – CFG-Eliminating Useless Symbols 20. Compilers
Questions and Answers – Context Free Grammar – 1
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “DPDA and
Ambiguous Grammars”.
Answer: d
Explanation:
Context-free grammars are strictly more powerful than regular expressions:
1) Any language that can be generated using regular expressions can be generated by a context-
freegrammar.
2) There are languages that can be generated by a context-free grammar that cannot be generated by
anyregular expression.
As a corollary, CFGs are strictly more powerful than DFAs and NDFAs.
advertisement
file:///C:/Users/gurun/Desktop/data.html 174/358
9/16/2020 data.html
Statement: No regular expression exists for the given grammar.
a) true
b) false
View Answer
Answer: a
Explanation: The grammar generates a language L such that L={0n1n|n>=1} which is not regular. Thus, no
regular expression exists for the same.
3. For the given set of code, the grammar representing real numbers in Pascal has error in one of the six lines.
Fetch the error.
(1) ->
(2) -> | epsilon
(3) -> | epsilon
(4) -> ‘E’ | epsilon
(5) -> + | – | epsilon
(6) -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
a) 3
b) 4
c) 2
d) No errorsView Answer
Answer: a
Explanation: –
>
–> | epsilon
–> ‘.’ | epsilon
–> ‘E’ | epsilon
–> + | – | epsilon
–> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Answer: b
Explanation: The root or interms of the grammar, starting variable can not be a terminal.
advertisement
Answer: b
Explanation: The step wise grammar translation can be written as:
file:///C:/Users/gurun/Desktop/data.html 175/358
9/16/2020 data.html
aAS->aSbaA->aabAS->aabbaa
Answer: c
Explanation: One language can more than one grammar. Some can be ambiguous and some cannot.
Answer: d
Explanation: Here are some process used to simplify a CFG but to produce an equivalent grammar:
a) Removal of useless symbols(non terminal) b) Removal of Unit productions and c) Removal of Null
productions.
advertisement
Answer: a
Explanation: None.
Answer: d
Explanation: The language is recursive and every recursive language is a CFL.
10. L->rLt|tLr|t|r
The given grammar produces a language which is:
a) All palindrome
b) All even palindromes
c) All odd palindromes
d) Strings with same begin and end symbolsView Answer
Answer: c
Explanation: As there exists no production for the palindrome set, even palindromes like abba, aabbaa,
baaaaaab, etc will not be generated.
file:///C:/Users/gurun/Desktop/data.html 176/358
9/16/2020 data.html
advertisement
« Prev - Automata Theory Questions and Answers – DPDA and Context Free Languages
» Next - Automata Theory Questions and Answers – CFG-Eliminating Useless Symbols
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – DPDA and Context Free Languages
Best Reference Books – M.Sc – Agriculture – Agronomy
advertisement
advertisement
Recommended Posts:
1. C++ Programming Examples on Set & String Problems & Algorithms
2. Java Programming Examples on Set & String Problems & Algorithms
3. C# Programming Examples on Functions
4. PHP Questions and Answers
5. Information Science Questions and Answers
6. C Tutorials
7. Advanced Machining Processes Questions and Answers
8. Computer Science Questions and Answers
9. Theory of Machines Questions and Answers
10. Network Theory Questions and Answers
11. Ruby Programming Questions and Answers
12. Electromagnetic Theory Questions and Answers
13. Compilers Questions and Answers
14. Automata Theory Questions and Answers
15. Theory of Computation – Regular Grammars
16. Automata Theory Questions and Answers – Finite Automata with Epsilon Transition
17. Automata Theory Questions and Answers – Testing Emptiness and Membership
18. Automata Theory Questions and Answers – Finite Automata
19. Automata Theory Questions and Answers – Pumping Lemma for Context Free Language 20.
Automata Theory Questions and Answers – CFG-Eliminating Useless Symbols
advertisement
This set of Automata Theory Assessment Questions and Answers focuses on “CFG-Eliminating Useless
Symbols”.
1. Suppose A->xBz and B->y, then the simplified grammar would be:
a) A->xyz
b) A->xBz|xyz
file:///C:/Users/gurun/Desktop/data.html 177/358
9/16/2020 data.html
c) A->xBz|B|y
d) none of the mentioned
View Answer
Answer: a
Explanation: For the first step, substitute B in first production as it only produces terminal and remove B
production as it has already been utilized.
We get A->xBz|xyz and now, as B has no production, we eliminate the terms which hold the variable B, thus
the answer remain A->xyz.
advertisement
Answer: d
Explanation: Some derivations are not reachable from the starting variable. As B is not reachable from the
starting variable, it is a useless symbol and thus, can be eliminated.
3. Given:
S->…->xAy->…->w
if ____________, then A is useful, else useless symbol.
a) A is a non terminal
b) A is a terminal
c) w Î L
d) w Ë LView Answer
Answer: c
Explanation: Whatever operation we perform in intermediate stages, if the string produced belongs to the
language, A is termed as useful and if not, not a useful variable.
4. Given: S-
>aSb
S->e
S-> A
A->aA
B->C
C->D
The ratio of number of useless variables to number of useless production is:
a) 1
b) 3/4
c) 2/3
d) 0
View Answer
Answer: a
Explanation: A, B, C, D are the useless symbols in the given grammar as they never tend to lead to a
terminal. The productions S-> A, A->aA, B->C, C->D are also termed as useless production as they will
never produce a string to the grammar.
5. Given grammar G:
file:///C:/Users/gurun/Desktop/data.html 178/358
9/16/2020 data.html
S->aS|A|C
A->a
B->aa
C->aCb
Find the set of variables thet can produce strings only with the set of terminals.
a) {C}
b) {A,B}
c) {A,B,S}
d) None of the mentionedView Answer
Answer: c
Explanation: First step: Make a set of variables that directly end up with a terminal
Second step: Modify the set with variables that produce the elements of above
generated set.
The rest variables are termed as useless.
advertisement
6. Given grammar:
S->aS|A
A->a
B->aa
Find the number of variables reachable from the Starting Variable?
a) 0
b) 1
c) 2
d) None of the mentionedView Answer
Answer: b
Explanation: Use a dependency graph to find which variable is reachable and which is not.
7. Inorder to simplify a context free grammar, we can skip the following operation:
a) Removal of null production
b) Removal of useless symbols
c) Removal of unit productions
d) None of the mentionedView Answer
Answer: d
Explanation: Inorder to simplify the grammar all of the process including the removal of null productions,
unit productions and useless symbols is necessary.
8. Given a Grammar G:
S->aA
A->a
A->B
B->A
B->bb
file:///C:/Users/gurun/Desktop/data.html 179/358
9/16/2020 data.html
Which among the following will be the simplified grammar?
a) S->aA|aB, A->a, B->bb
b) S->aA|aB, A->B, B->bb
c) S->aA|aB, A->a, B->A
d) None of the emntionedView Answer
Answer: a
Explanation: Step 1: Substitute A->B
Step 2: Remove B->B
Step 3: Substitute B->A
Step 4: Remove Repeated productions
Answer: a
Explanation: Using the substitution rules, we can simply eradicate what is useless and thus produce the
simplified result i.e. A-> a| aaA| ababbAc| abbc.
10. In context to the process of removing useless symbols, which of the following is correct?
a) We remove the Nullable variables
b) We eliminate the unit productions
c) We eliminate products which yield no terminals
d) All of the mentionedView Answer
Answer: c
Explanation: In the process of removal of useless symbols, we want to remove productions that can never
take part in any derivation.
« Prev - Automata Theory Questions and Answers – DPDA and Ambiguous Grammars
» Next - Automata Theory Questions and Answers – Eliminating Epsilon Productions
Categories Automata Theory MCQs
Post navigation
Best Reference Books – M.Sc – Agriculture – Agronomy
Automata Theory Questions and Answers – Eliminating Epsilon Productions
advertisement
advertisement
Recommended Posts:
1. Java Programming Examples on Classes
2. Computer Science Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 180/358
9/16/2020 data.html
3. Engineering Physics I Questions and Answers
4. Machine Drawing Questions and Answers
5. Statistical Quality Control Questions and Answers
6. Advanced Machining Processes Questions and Answers
7. Ruby Programming Questions and Answers
8. Theory of Machines Questions and Answers
9. Network Theory Questions and Answers
10. Electromagnetic Theory Questions and Answers
11. Compilers Questions and Answers
12. Automata Theory Questions and Answers
13. Theory of Computation – Chomsky Normal Form
14. Automata Theory Questions and Answers – From Grammars to Push Down Automata
15. Automata Theory Questions and Answers – Finite Automata
16. Automata Theory Questions and Answers – The Language of a Grammar, Inferences and Ambiguity
17. Automata Theory Questions and Answers – Regular Languages and D-PDA
18. Automata Theory Questions and Answers – Conversion by Eliminating states
19. Automata Theory Questions and Answers – PDA-acceptance by Empty Stack
20. Automata Theory Questions and Answers – CFL- Closure Properties/Decision Properties
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Eliminating
Epsilon Productions”.
Answer: a
Explanation: We use the concept of dependency graph inorder to check, whether any of the variable is
reachable from the starting variable or not.
advertisement
Answer: b
Explanation: Any variable A for which the derivation: A->*e is possible is called Nullable.
3. Statement:
file:///C:/Users/gurun/Desktop/data.html 181/358
9/16/2020 data.html
For A-> e ,A can be erased. So whenever it appears on the left side of a production, replace with another
production without the A.
State true or false:
a) true
b) false
View Answer
Answer: b
Explanation: A can be erased. So whenever it appears on the right side of the production, replace with
another production without the A.
Answer: a
Explanation: As X is nullable, we replace every right hand side presence of X with e and produce the
simplified result.
advertisement
Answer: b
Explanation: The modified grammar aftyer the removal of nullable can be shown as: B-
>aAbC| abC
B->bAbA| bbA| bAb| bb
A->bB
6. Let G=(V, T, P, S) be a CFG such that _____________. Then there exists an equivalent grammar
G’ having no e productions. a) e ∈ L(G)
b) w ∉ L(G)
c) e ∉ L(G)
d) w ∈ L(G) View Answer
Answer: c
Explanation: Theorem: Let G = (V, T, S, P) be a CFG such that e ∉ L(G). Then there exists an equivalent
grammar G’ having no e-productions.
file:///C:/Users/gurun/Desktop/data.html 182/358
9/16/2020 data.html
A-> x1x2x3…xn
put into P’ that production as well as all those generated by replacing null variables with e in all possible
combinations. If all x(i) are nullable, a) A->e is put into P’
b) A->e is not put into P’
c) e is a member of G’
d) None of the mentionedView Answer
Answer: b
Explanation: It is an exception that A->e is not put into P’ if all x(i) are nullable variables.
advertisement
Answer: d
Explanation: The grammar after the removal of epsilon production can be shown as: S-
>ABaC| AaC| ABa| Aa| a| aC| Ba| BaC
A->BC| B| C
B->b
C->D
D-> d
Answer: a
Explanation:
P’= S->AB, A->a, B-> b,
V’={S, A, B},
∑’={a, b}
Answer: b
Explanation: We will replace all the nullables wherever they appear in the right hand side of any production.
D will not be erased as we are just removing nullable variables not completely simplifying the grammar.
advertisement
advertisement
Recommended Posts:
1. Rocket Propulsion Questions and Answers
2. Waste Water Engineering Questions and Answers
3. Java Programming Examples on Classes
4. Python Questions and Answers
5. Probability and Statistics Questions and Answers
6. Information Science Questions and Answers
7. Computer Science Questions and Answers
8. Engineering Physics I Questions and Answers
9. Statistical Quality Control Questions and Answers
10. Javascript Questions and Answers
11. C Programming Examples on Bitwise Operations
12. Advanced Machining Processes Questions and Answers
13. C Programming Examples on File Handling
14. C# Programming Examples on Functions
15. Theory of Machines Questions and Answers
16. Network Theory Questions and Answers
17. Electromagnetic Theory Questions and Answers
18. Compilers Questions and Answers
19. Automata Theory Questions and Answers
20. Automata Theory Questions and Answers – Finite Automata with Epsilon Transition
advertisement
Answer: a
Explanation: Any production of the format A-> B where A and B belongs to the V set, is called Unit
production.
advertisement
2. Given Grammar G:
S->aA
A->a| A
B->B
The number of productions to be removed immediately as Unit productions:
a) 0
b) 1
c) 2
d) 3
View Answer
Answer: c
Explanation: The productions in the format A-> A are removed immediately as they produce self and that is
not a terminal or will not lead to a string. Hence, it is removed immediately.
3. Given grammar:
S->aA
A->a
A->B
B-> A
B->bb
Which of the following is the production of B after simplification by removal of unit productions?
a) A
b) bb
c) aA
d) A| bbView Answer
Answer: b
Explanation: The simplified grammar can be presented as follows:
S->aA| aB A->a
B-> bb
4. If grammar G is unambiguous, G’ produced after the removal of Unit production will be:
a) ambiguous
b) unambiguous
c) finite
d) cannot be saidView Answer
Answer: b
file:///C:/Users/gurun/Desktop/data.html 185/358
9/16/2020 data.html
Explanation: With the simplification of Context free grammars, undesirable properties are introduced. It
says, if grammar G, before simplification is unambiguous, after simplification will also be unambiguous.
advertisement
Answer: c
Explanation:
If A-> B is a production, B is called A- derivable.
If C is A-derivable, C->B is a production, and B ¹ A, then B is A -derivable.
No other variables are A-derivable.
7. Given Grammar:
T-> T+R| R
R-> R*V| V
V->(T)| u
When unit productions are deleted we are left with
T-> T+R| _______|(T)| u
R->R*V|(T)| u
V-> (T)| u
Fill in the blank:
a) T*V
b) T+V
c) R*T
d) R*VView Answer
Answer: d
Explanation: The grammar produced after the elimination of unit production is: T-
> T+R| R*V| (T)| u
R->R*V|(T)| u V-
> (T)| u
advertisement
8. Given grammar G:
S-> ABA, A->aA|e, B-> bB|e
Eliminate e and unit productions. State the number of productions the starting variable holds?
a) 6
b) 7
c) 9
file:///C:/Users/gurun/Desktop/data.html 186/358
9/16/2020 data.html
d) 5
View Answer
Answer: b
Explanation: After reduction the grammar looks like:
S->ABA| AB| BA| AA| Aa| a| bB| b
A->aA| a B-
>bB| b
9. Given grammar G:
S-> A| B| C
A-> aAa| B
B-> bB|bb
C->aCaa|D
D->baD|abD|aa
Eliminate e and unit productions and state the number of variables left?
a) 5
b) 4
c) 3
d) 2
View Answer
Answer: 5
Explanation: The reduced production:
S->aAa| bB|bb aCaa| baD| abD| aa, A->aAa| bB| bb, B->bB| bb, C->aCaa| baD| abD| aa, D-> baD| abD| aa
10. Which of the following variables in the given grammar is called live variable?
S->AB A-
>a
a) S
b) A
c) B
d) None of the mentionedView Answer
Answer: b
Explanation: Any variable A for which there is a production A-> x with x Ε Σ* is called live.
advertisement
Recommended Posts:
1. Engineering Physics I Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 187/358
9/16/2020 data.html
2. Information Science Questions and Answers
3. Computer Science Questions and Answers
4. Theory of Machines Questions and Answers
5. Network Theory Questions and Answers
6. Electromagnetic Theory Questions and Answers
7. Compilers Questions and Answers
8. Unit Processes Questions and Answers
9. Automata Theory Questions and Answers
10. Automata Theory Questions and Answers – CFL- Closure Properties/Decision Properties
11. Automata Theory Questions and Answers – Conversion by Eliminating states
12. Automata Theory Questions and Answers – Construction and Yield of a Parse Tree
13. Automata Theory Questions and Answers – Regular Languages and D-PDA
14. Automata Theory Questions and Answers – From Grammars to Push Down Automata
15. Automata Theory Questions and Answers – The Language of a Grammar, Inferences and Ambiguity
16. Automata Theory Questions and Answers – DPDA and Context Free Languages
17. Automata Theory Questions and Answers – CFL- Other Normal Forms
18. Automata Theory Questions and Answers – DPDA and Ambiguous Grammars
19. Automata Theory Questions and Answers – PDA-acceptance by Empty Stack 20. Automata Theory
Questions and Answers – Sentential Forms
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Chomsky Normal
Form”.
Answer: b
Explanation: A context free grammar is in Greibach Normal Form if the right hand sides of all the production
rules start with a terminal, optionally followed by some variables.
advertisement
Answer: b
Explanation: The normal form is of the format:
A->aB where the right hand side production tends to begin with a terminal symbo, thus having no left
recursions.
file:///C:/Users/gurun/Desktop/data.html 188/358
9/16/2020 data.html
3. Every grammar in Chomsky Normal Form is:
a) regular
b) context sensitive
c) context free
d) all of the mentionedView Answer
Answer: c
Explanation: Conversely, every context frr grammar can be converted into Chomsky Normal form and to
other forms.
Answer: d
Explanation: in CNF, the production rules are of the form:
A->BC
A-> a S-
>e
advertisement
5. Given grammar G:
(1)S->AS
(2)S->AAS
(3)A->SA
(4)A->aa
Which of the following productions denies the format of Chomsky Normal Form?
a) 2,4
b) 1,3
c) 1, 2, 3, 4
d) 2, 3, 4
View Answer
Answer: a
Explanation: The correct format: A->BC, A->a, X->e.
Answer: a
Explanation: We can eliminate the options on the 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 variables to
be introduced for the terminals are:
S->ABa
A->aab B-
>Ac
file:///C:/Users/gurun/Desktop/data.html 189/358
9/16/2020 data.html
a) 3
b) 4
c) 2
d) 5
View Answer
Answer: a
Explanation: According to the number of terminals present in the grammar, we need the corresponding that
number of terminal variables while conversion.
advertisement
8. In which of the following, does the CNF conversion find its use?
a) CYK Algorithm
b) Bottom up parsing
c) Preprocessing step in some algorithms
d) All of the mentionedView Answer
Answer: d
Explanation: Besides the theoretical significance of CNF, it conversion scheme is helpful in algorithms as a
preprocessing step, CYK algorithms and the bottom up parsing of context free grammars.
9. Let G be a grammar. When the production in G satisfy certain restrictions, then G is said to be in
___________.
a) restricted form
b) parsed form
c) normal form
d) all of the mentionedView Answer
Answer: c
Explanation: When the production in G satisfy certain restrictions, then G is said to be in ‘normal form’.
Answer: a
Explanation: e is allowed in CNF only if the starting variable does not occur on the right hand side of the
derivation.
advertisement
file:///C:/Users/gurun/Desktop/data.html 190/358
9/16/2020 data.html
Recommended Posts:
1. Probability and Statistics Questions and Answers
2. Engineering Physics II Questions and Answers
3. Information Science Questions and Answers
4. Computer Science Questions and Answers
5. Theory of Machines Questions and Answers
6. Network Theory Questions and Answers
7. Electromagnetic Theory Questions and Answers
8. Compilers Questions and Answers
9. Automata Theory Questions and Answers
10. Automata Theory Questions and Answers – Pumping Lemma for Context Free Language
11. Automata Theory Questions and Answers – YACC Parser Generator
12. Automata Theory Questions and Answers – Eliminating Epsilon Productions
13. Automata Theory Questions and Answers – Finite Automata
14. Automata Theory Questions and Answers – Intersection with Regular Languages
15. Automata Theory Questions and Answers – DPDA and Ambiguous Grammars
16. Automata Theory Questions and Answers – CFG-Eliminating Useless Symbols
17. Automata Theory Questions and Answers – Ambiguous Grammar
18. Automata Theory Questions and Answers – CFL- Closure Properties/Decision Properties
19. Automata Theory Questions and Answers – Regular Language & Expression – 2 20. Automata
Theory Questions and Answers – From Grammars to Push Down Automata
advertisement
This set of Automata Theory Questions and Answers for Campus interviews focuses on “Pumping Lemma
for Context Free Language”.
1. Which of the following is called Bar-Hillel lemma?
a) Pumping lemma for regular language
b) Pumping lemma for context free languages
c) Pumping lemma for context sensitive languages
d) None of the mentionedView Answer
Answer: b
Explanation: In automata theory, the pumping lemma for context free languages, also kmown as the
BarHillel lemma, represents a property of all context free languages.
advertisement
2. Which of the expressions correctly is an requirement of the pumping lemma for the context free
languages?
a) uvnwxny
b) uvnwnxny
c) uv2nwx2ny
d) All of the mentionedView Answer
file:///C:/Users/gurun/Desktop/data.html 191/358
9/16/2020 data.html
Answer: b
Explanation: Let L be a CFL. Then there is an integer n so that for any u that belong to language L satisfying
|t| >=n, there are strings u, v, w, x, y and z
satisfying t=uvwxy |vx|>0
|vwx|<=n For any m>=0, uvnwxny L
3.Let L be a CFL. Then there is an integer n so that for any u that belong to language L satisfying
|t|>=n, there are strings u, v, w, x, y and z satisfying t=uvwxy.
Let p be the number of variables in CNF form of the context free grammar. The value of n in terms of p :
a) 2p
b) 2p
c) 2p+1
d) p2
View Answer
Answer: c
Explanation: This inequation has been derived from derivation tree for t which must have height at least
p+2(It has more than 2p leaf nodes, and therefore its height is >p+1).
4. Which of the following gives a positive result to the pumping lemma restrictions and requirements?
a) {aibici|i>=0}
b) {0i1i|i>=0}
c) {ss|s {a,b}*}
d) None of the mentionedView Answer
Answer: b
Explanation: A positive result to the pumping lemma shows that the language is a CFL and ist contradiction
or negative result shows that the given language is not a Context Free language.
advertisement
5. Using pumping lemma, which of the following cannot be proved as ‘not a CFL’?
a) {aibici|i>=0}
b) {ss|s {a,b}*}
c) The set legal C programs
d) None of the mentionedView Answer
Answer: d
Explanation: There are few rules in C that are context dependent. For example, declaration of a variable
before it can be used.
Answer: b
Explanation: Although the pumping lemma provides some information about v and x that are pumped, it says
little about the location of these substrings in the string t. It can be used whenever the pumping lemma fails.
Example: {apbqcrds|p=0 or q=r=s}, etc.
Answer: c
Explanation: A set of context free language is closed under the following operations:
a) Union
b) Concatenation
c) Kleene
advertisement
Answer: b
Explanation: The pumping lemma is often used to prove that a given language L is non-context-free, by
showing that arbitrarily long strings s are in L that cannot be “pumped” without producing strings outside L.
Answer: a
Explanation: There exists a property of all strings in the language that are of length p, where p is the
constant-called the pumping length .For a finite language L, p is equal to the maximum string length in L
plus 1.
10. Which of the following does not obey pumping lemma for context free languages ?
a) Finite languages
b) Context free languages
c) Unrestricted languages
d) None of the mentionedView Answer
Answer: c
Explanation: Finite languages (which are regular hence context free ) obey pumping lemma where as
unrestricted languages like recursive languages do not obey pumping lemma for context free languages.
advertisement
Recommended Posts:
1. C Programming Examples on Bitwise Operations
2. Java Programming Examples on Set & String Problems & Algorithms
3. C# Programming Examples
4. Ruby Programming Questions and Answers
5. C Tutorials
6. C Programming Examples
7. PHP Questions and Answers
8. Engineering Physics II Questions and Answers
9. C Programming Examples on Strings
10. Computer Science Questions and Answers
11. C++ Programming Examples on Set & String Problems & Algorithms
12. Information Science Questions and Answers
13. Java Programming Examples on String Handling
14. C# Programming Examples on Strings
15. C Programming Examples on Set & String Problems & Algorithms
16. Theory of Machines Questions and Answers
17. Network Theory Questions and Answers
18. Compilers Questions and Answers
19. Electromagnetic Theory Questions and Answers
20. Automata Theory Questions and Answers – Ambiguous Grammar
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “CFL- Closure
Properties/Decision Properties”.
1. The context free languages are closed under:
a) Intersection
b) Complement
c) Kleene
d) None of the mentionedView Answer
Answer: c
Explanation: Context free languages are closed under the following operation: union, kleene and
concatenation. For regular languages, we can add intersection and complement to the list.
advertisement
Answer: a
Explanation:
T->S|R
S->aSb
S->e
R->cRd R-
>e
Answer: d
Explanation: It is a theorem which states that, Context free languages are not closed under operations like
intersection and complement.
Answer: d
Explanation: These properties are termed as decision properties of a CFL and include a set of problems like
infiniteness problem, emptiness problem and membership problem.
advertisement
5. If the start symbol is one of those symbols which produce no terminal through any sequence, the CFL is
said to be
a) nullable
b) empty
c) eliminated
d) none of the mentionedView Answer
Answer: b
Explanation: In the process of removing useless symbols, if the starting symbol is also a part, the CFL can be
then termed as empty; otherwise not.
6. Using the pumping constant n, If there is a string in the language of length between _____ and ____ then
the language is infite else not. a) n, 2n-1
b) 2n, n
file:///C:/Users/gurun/Desktop/data.html 195/358
9/16/2020 data.html
c) n+1, 3n+6
d) 0, n+1View Answer
Answer: a
Explanation: If there is a string in the language of length between n and 2n-1 then the language is infite else
not. The idea is essentially the same for regular languages.
Answer: d
Explanation: CFL is closed under union, kleene and concatenation along with the properties
reversal,homomorphism and inverse homomorphism but not difference and intersection.
advertisement
Answer: c
Explanation: Context free languages are not closed under difference, intersection and complement
operations.
9. A___________ is context free grammar with atmost one non terminal in the right handside of the
production.
a) linear grammar
b) linear bounded grammar
c) regular grammar
d) none of the mentionedView Answer
Answer: a
Explanation: A simple linear grammar is G with N = {S}, Σ = {a, b}, P with start symbol S and rules
S → aSb S → ε
10. There is a linear grammar that generates a context free grammar
a) always
b) never
c) sometimes
d) none of the mentionedView Answer
Answer: c
Explanation: Linear grammar is a subset of context free grammar which has atmost one non terminal symbol
in the right hand side of the production.Thus, there exists some languages which are generated by Linear
grammars.
advertisement
file:///C:/Users/gurun/Desktop/data.html 196/358
9/16/2020 data.html
« Prev - Automata Theory Questions and Answers – Pumping Lemma for Context Free Language
» Next - Automata Theory Questions and Answers – CFL- Other Normal Forms
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Pumping Lemma for Context Free Language
Automata Theory Questions and Answers – CFL- Other Normal Forms
advertisement
advertisement
Recommended Posts:
1. LISP Questions and Answers
2. Mechanical Behaviour & Testing of Materials Questions and Answers
3. Mechanical Operations Questions and Answers
4. Spring Questions and Answers
5. PHP Questions and Answers
6. C Programming Examples on Computational Geometry Problems & Algorithms
7. Engineering Drawing Questions and Answers
8. Java Programming Examples on Utility Classes
9. C++ Algorithms, Problems & Programming Examples
10. R Programming Questions and Answers
11. C Algorithms, Problems & Programming Examples
12. Computer Science Questions and Answers
13. Discrete Mathematics Questions and Answers
14. C# Programming Examples on Functions
15. Information Science Questions and Answers
16. Theory of Machines Questions and Answers
17. Network Theory Questions and Answers
18. Electromagnetic Theory Questions and Answers
19. Compilers Questions and Answers
20. Automata Theory Questions and Answers – Equivalence of NFA and DFA
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “CFL- Other
Normal Forms”.
file:///C:/Users/gurun/Desktop/data.html 197/358
9/16/2020 data.html
c) Kuroda Normal Form
d) None of the mentionedView Answer
Answer: c
Explanation: Linearly Bounded grammar or Kuroda Normal Form allows the following format of
grammatical analysis:
AB->CD
A->BC or
A->B or A-
>a
advertisement
Answer: b
Explanation: Every context sensitive grammar which does not produce an empty string can be generated by a
grammar in Kuroda Normal form.
Answer: a
Explanation: Pentonnen Normal form(for Unrestricted grammars) is a special case where there is a slight
modification in the format of Kuroda Normal form.
AB->AD
A->BC A-
>a
4. Given a grammar in GNF and a derivable string in the grammar with the length n, any ___________will
halt at depth n.
a) top-down parser
b) bottom-up parser
c) multitape turing machine
d) none of the mentionedView Answer
Answer: a
Explanation: Given a grammar in GNF and a derivable string in the grammar with the length n, any topdown
parser will halt at depth n. As the parameter ‘depth’ is mentioned, we will use a top-down parser. Example-
LL parser.
advertisement
file:///C:/Users/gurun/Desktop/data.html 198/358
9/16/2020 data.html
Answer: a
Explanation: Donald Knuth implied a BNF” syntax in which all definitions have such a form may be said to
be in ”Floyd Normal Form”.
A->B|C
A->BC A-
>a
Answer: d
Explanation: We use certain algorithms to parse a context free grammar which include the most popular
CYK algorithm which employs the concept of bottom up parsing and dynamic parsing.
7. The standard version of CYK algorithm operates only on context free grammars in the following form:
a) Greibach Normal form
b) Chomsky Normal form
c) Backus Naur form
d) All of the mentionedView Answer
Answer: b
Explanation: It requires the presence of a context free grammar into Chomsky Normal form to operate.
However, every context free grammar can be converted into CNF for keeping the sense of grammar
equivalent.
advertisement
8. The __________ running time of CYK is O(n3 .|G|) where n is the length of the parse
string and |G| is the size of the context free grammar G. a) worst
b) best
c) average
d) none of the mentionedView Answer
Answer: a
Explanation: This is the worst case running time of CYK and and this makes it one of the most efficient
algorithms for recognizing general context free languages in practice.
Answer: d
Explanation: Valiants algorithm is actually an extention of CYK which even computes the same parsing
table yet he showed another method can be utilized fro performing this operation.
10. Which among the following is a correct option in format for representing symbol and expression in
Backus normal form?
a) <symbol> ->expression
b) <symbol>::=_expression_
file:///C:/Users/gurun/Desktop/data.html 199/358
9/16/2020 data.html
c) <symbol>=<expression>
d) all of the mentionedView Answer
Answer: b
Explanation: <symbol>::=_expression_ is the correct representation where <symbol> is a non terminal, and
expression consist of one or more sequence of symbols, more sequence are separated by |, indicating a
choice.
advertisement
« Prev - Automata Theory Questions and Answers – CFL- Closure Properties/Decision Properties
» Next - Automata Theory Questions and Answers – Intersection with Regular Languages
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – CFL- Closure Properties/Decision Properties
Best Reference Books – M.Sc – Zoology
advertisement
advertisement
Recommended Posts:
1. C++ Algorithms, Problems & Programming Examples
2. Python Programming Examples on Graphs
3. Probability and Statistics Questions and Answers
4. Java Algorithms, Problems & Programming Examples
5. Information Science Questions and Answers
6. Computer Science Questions and Answers
7. Java Programming Examples on Set & String Problems & Algorithms 8. Cryptography and Network
Security Questions and Answers
9. C++ Programming Examples on Set & String Problems & Algorithms
10. C Programming Examples on Set & String Problems & Algorithms
11. Theory of Machines Questions and Answers
12. Network Theory Questions and Answers
13. Electromagnetic Theory Questions and Answers
14. Compilers Questions and Answers
15. Automata Theory Questions and Answers
16. Automata Theory Questions and Answers – Pumping Lemma for Context Free Language
17. Automata Theory Questions and Answers – From PDA to Grammars
18. Automata Theory Questions and Answers – CFG-Eliminating Useless Symbols
19. Automata Theory Questions and Answers – Construction and Yield of a Parse Tree 20. Automata
Theory Questions and Answers – Regular Language & Expression – 2
advertisement
file:///C:/Users/gurun/Desktop/data.html 200/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Intersection with
Regular Languages”.
Answer: c
Explanation: Context free languages are not closed under complement and intersection. Thus, are called
Negative properties.
advertisement
Answer: b
Explanation: If a language L1 is regular and L2 is a context free language, then L1 intersection L2 will result
into a context free language.
b) (a+b)*-{a100b100}
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: c
Explanation: As the language seems to be finite, a dfa can be constructed for the same, thus is regular.
Answer: d
Explanation: {a*b*c*} and (c) are regular languages while option (a) is not context free language.
advertisement
5. Which of the following can be used to prove a language is not context free?
a) Ardens theorem
b) Power Construction method
c) Regular Closure
d) None of the mentionedView Answer
Answer: c
Explanation: We can use the properties of regular closure to prove that a language is not a context free
language. Example: Intersection of context free language and regular language is a context free language.
Proof by contradiction helps here.
file:///C:/Users/gurun/Desktop/data.html 201/358
9/16/2020 data.html
6. Which of the following are valid membership algorithms?
a) CYK algorithm
b) Exhaustive search parser
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: c
Explanation: CYK algorithm is a parsing algorithm for context free grammars, which employs bottom up
parsing and dynamic programming.
Answer: c
Explanation: The empty-language question can be stated as: For context free grammar G find if L(G) =f?
advertisement
Answer: a
Explanation: A triangular table is constructed to facilitate the solution of membership problem using bottom
up parsing and dynamic programming.
9. Which of the following steps are wrong with respect to infiniteness problem?
a) Remove useless variables
b) Remove unit and epsilon production
c) Create dependency graph for variables
d) If there is a loop in the dependency graph the the language is finite else infiniteView Answer
Answer: d
Explanation: If we are able to detect a loop in the formed dependency graph, then the language in infinite.
« Prev - Automata Theory Questions and Answers – CFL- Other Normal Forms
file:///C:/Users/gurun/Desktop/data.html 202/358
9/16/2020 data.html
» Next - Automata Theory Questions and Answers – Turing Machine-Notation and Transition Diagrams
Categories Automata Theory MCQs
Post navigation
Best Reference Books – M.Sc – Zoology
Automata Theory Questions and Answers – Turing Machine-Notation and Transition Diagrams
advertisement
advertisement
Recommended Posts:
1. Engineering Drawing Questions and Answers
2. Java Programming Examples on Computational Geometry Problems & Algorithms
3. Java Programming Examples on Set & String Problems & Algorithms
4. Cryptography and Network Security Questions and Answers
5. Java Programming Examples on Data-Structures
6. C Programming Examples on Stacks & Queues
7. Computer Science Questions and Answers
8. Python Programming Examples on Stacks & Queues
9. C++ Programming Examples on Set & String Problems & Algorithms
10. C Programming Examples on Set & String Problems & Algorithms
11. Information Science Questions and Answers 12. Home
13. Theory of Machines Questions and Answers
14. Network Theory Questions and Answers
15. C++ Programming Examples on STL
16. Java Algorithms, Problems & Programming Examples
17. C++ Algorithms, Problems & Programming Examples
18. Electromagnetic Theory Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Interview Questions and Answers for freshers focuses on “Turing Machine –
Notation and Transition Diagrams”.
1. A turing machine is a
a) real machine
b) abstract machine
c) hypothetical machine
d) more than one option is correctView Answer
Answer: d
Explanation: A turing machine is abstract or hypothetical machine thought by mathematician Alan Turing in
1936 capable of simulating any algorithm, however complicated it is.
advertisement
Answer: b
Explanation: The turing machine operates on an infinite memory tape divided into cells. The machine
positions its head over the cell and reads the symbol.
3. Which of the functions are not performed by the turing machine after reading a symbol?
a) writes the symbol
b) moves the tape one cell left/right
c) proceeds with next instruction or halts
d) none of the mentionedView Answer
Answer: d
Explanation: After the read head reads the symbol from the input tape, it performs the following functions: a)
writes a symbol(some model allow symbol erasure/no writing)
b) moves the tape left or right (some models allows no motion)
c) proceeds with subsequent instruction or goes either into accepting halting state or rejecting halting state.
4. ‘a’ in a-machine is :
a) Alan
b) arbitrary
c) automatic
d) None of the mentionedView Answer
Answer: c
Explanation: The turing machine was invented by Alan turing in 1936. He named it as a-machine(automatic
machine).
advertisement
5. Which of the problems were not answered when the turing machine was invented?
a) Does a machine exists that can determine whether any arbitrary machine on its tape is circular.
b) Does a machine exists that can determine whether any arbitrary machine on its tape is ever prints a
symbolc) Hilbert Entscheidungs problem
d) None of the mentioned
View Answer
Answer: d
Explanation: Invention of turing machine answered a lot of questions which included problems like decision
problem, etc.) . Alan was able to prove the properties of computation using such model.
6. The ability for a system of instructions to simulate a Turing Machine is called _________
a) Turing Completeness
b) Simulation
c) Turing Halting
d) None of the mentionedView Answer
Answer: a
Explanation: Turing Completeness the ability for a system of instructions to simulate a Turing machine. A
programming language that is Turing complete is theoretically capable of expressing all tasks
accomplishable by computers; nearly all programming languages are Turing complete.
file:///C:/Users/gurun/Desktop/data.html 204/358
9/16/2020 data.html
7. Turing machine can be represented using the following tools:
a) Transition graph
b) Transition table
c) Queue and Input tape
d) All of the mentionedView Answer
Answer: d
Explanation: We can represent a turing machine, graphically, tabularly and diagramatically.
advertisement
Answer: d
Explanation: A n abstract machine also known as abstract computer, is a theoretical model of computer or
hardware system in automata theory. Abstraction in computing process usually assumes a discrete time
paradigm.
Answer: d
Explanation: A thought experiment considers some hypothesis, theory or principle for the purpose of
thinking through its consequences.
Answer: a
Explanation: In computer science, Random access machine is an abstract machine in the general class of
register machines. Random access machine should not be confused with Random access memory.
advertisement
« Prev - Automata Theory Questions and Answers – Intersection with Regular Languages
» Next - Automata Theory Questions and Answers – The Language of Turing Machine
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Intersection with Regular Languages
Best Reference Books – M.Sc. – Foods and Nutrition
file:///C:/Users/gurun/Desktop/data.html 205/358
9/16/2020 data.html
advertisement
advertisement
Recommended Posts:
1. C++ Programming Examples on Set & String Problems & Algorithms
2. Java Programming Examples
3. Information Science Questions and Answers
4. Python Programming Examples on Stacks & Queues
5. Java Programming Examples on Data-Structures
6. Home
7. Computer Science Questions and Answers
8. Network Theory Questions and Answers
9. Computer Organization & Architecture Questions and Answers
10. Computer Fundamentals Questions and Answers
11. Electromagnetic Theory Questions and Answers
12. C Programming Examples on Stacks & Queues
13. Machine Kinematics Questions and Answers
14. Machine Design Questions and Answers
15. Machine Dynamics Questions and Answers
16. Machine Tools & Machining Questions and Answers
17. Theory of Machines Questions and Answers
18. Machine Drawing Questions and Answers
19. Compilers Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “The Language of
Turing Machine”.
Answer: b
Explanation: A more mathematically oriented definition with the same universal nature was introduced by
church and turing together called the Church-Turing thesis(formal theory of computation).
advertisement
Answer: d
Explanation: A state register is one which stores the state of the turing machine, one of the finitely many.
Among these is the special start state with which the state register is initialized.
Answer: b
Explanation:
The 7-tuple definition of turing machine: (Q, S, G, d, q0, B, F)
where Q= The finite set of states of finite control
S= The finite set of input symbols G= The complete set of tape symbols d= The
transition function q0= The start state, a member of Q, in which the finite
control is found initially. B= The blank symbol
F= The set of final or accepting states, a subset of Q.
5. If d is not defined on the current state and the current tape symbol, then the machine ______
a) does not halts
b) halts
c) goes into loop forever
d) none of the mentionedView Answer
Answer: b
Explanation: If we reach hA or hR, we say TM halts. Once it has halted, it cannot move further, since d is not
defined at any pair (hA,X) or (hR,X) where hA = accept halting state and hR = reject halting state.
advertisement
Answer: a
Explanation: Inorder to describe formally what a Turing machine does, we need to develop a notation for
configurations or Instantaneous descriptions(ID).
file:///C:/Users/gurun/Desktop/data.html 207/358
9/16/2020 data.html
c) Register machine
d) All of the mentionedView Answer
Answer: d
Explanation: Many machines that might be thought to have more computational capability than a simple
UTM can be shown to have no more power. They might compute faster or use less memory but cannot
compute more powerfully i.e. more mathematical questions.
Answer: d
Explanation: In automata theory, an o- machine or oracle machine is a abstract machine used to study
decision problems. The problem the oracle solves can be of any complexity class. Even undecidable
problems like halting problems can be used.
Answer: b
Explanation: RASP or Random access stored program is an abstract machine that has instances like modern
stored computers.
advertisement
Answer: d
Explanation: In theoretical computer science, the random access stored program( RASP ) machine model is
an abstract machine used for the purpose of algorithm development and algorithm complexity theory.
Answer: a
Explanation: The Rasp is a random access machine model that, unlike the RAM has its program in its
registers together with its input. The registers are unbounded(infinite in capacity); whether the number of
registers is finite is model-specific.
« Prev - Automata Theory Questions and Answers – Turing Machine-Notation and Transition
Diagrams » Next - Automata Theory Questions and Answers – The Language of Turing Machine-2
Categories Automata Theory MCQs
Post navigation
Best Reference Books – M.Sc. – Foods and Nutrition
Automata Theory Questions and Answers – The Language of Turing Machine-2
advertisement
advertisement
Recommended Posts:
1. Hydraulic Machines Questions and Answers
2. DC Machines Questions and Answers
3. C Programming Examples on Combinatorial Problems & Algorithms
4. Java Algorithms, Problems & Programming Examples
5. Electrical Machines Questions and Answers
6. Electromagnetic Theory Questions and Answers
7. VLSI Questions and Answers
8. Machine Drawing Questions and Answers
9. Machine Design Questions and Answers
10. Compilers Questions and Answers
11. Java Programming Examples on Set & String Problems & Algorithms
12. C Algorithms, Problems & Programming Examples
13. Network Theory Questions and Answers
14. Machine Kinematics Questions and Answers
15. Machine Dynamics Questions and Answers
16. Machine Tools & Machining Questions and Answers
17. Theory of Machines Questions and Answers
18. C++ Programming Examples on Set & String Problems & Algorithms
19. C Programming Examples on Set & String Problems & Algorithms 20. Automata Theory Questions
and Answers
advertisement
This set of Automata Theory Questions and Answers for Freshers focuses on ” The Language of Turing
Machine-2″.
Answer: a,b
Explanation: A language L is recursively ennumerable if there is a turing machine that accepts L, and
recursive if there is a TM that recognizes L.(Sometimes these languages are alse called Turing-acceptable
and Turing-decidable respectively).
Answer: c
Explanation: Every recursive language is recursively ennumerable but there exists recursively ennumerable
languages that are not recursive. If L is accepted by a Non deterministic TM T, and every possible sequence
of moves of T causes it to halt, then L is recursive.
Answer: c
Explanation: Both the union and intersection operations preserve the property of recursive
ennumerablity(Theorem).
advertisement
Answer: c
Explanation: If T is a turing machine recognizing L, we can make it recognize L’ by interchanging the two
outputs. And every recursive language is recursively ennumerable.
Answer: d
file:///C:/Users/gurun/Desktop/data.html 210/358
9/16/2020 data.html
Explanation: The closure property of recursive languages include union, intersection and complement
operations.
Answer: c
Explanation: Theorem- If L is a recursively ennumerable language whose complement is recursively
ennumerable, then L is recursive.
advertisement
Answer: d
Explanation:
Answer: a
Explanation: To ennumerate a set means to list the 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
file:///C:/Users/gurun/Desktop/data.html 211/358
9/16/2020 data.html
c) L can be ennumerated by some turing machine
d) None of the mentionedView Answer
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.
advertisement
« Prev - Automata Theory Questions and Answers – The Language of Turing Machine
» Next - Automata Theory Questions and Answers -Turing Machine and Halting
Categories Automata Theory MCQs Post navigation Automata Theory Questions and Answers – The
Language of Turing Machine
Automata Theory Questions and Answers -Turing Machine and Halting
advertisement
advertisement
Recommended Posts:
1. Mechanical Engineering Questions and Answers
2. Computer Fundamentals Questions and Answers
3. Spring Questions and Answers
4. Java Programming Examples on Set & String Problems & Algorithms
5. Agricultural Engineering Questions and Answers
6. Artificial Intelligence Questions and Answers
7. Computer Science Questions and Answers
8. C++ Programming Examples on Set & String Problems & Algorithms
9. Information Science Questions and Answers
10. C Programming Examples on Set & String Problems & Algorithms
11. Compilers Questions and Answers
12. Network Theory Questions and Answers
13. Electromagnetic Theory Questions and Answers
14. Machine Dynamics Questions and Answers
15. Machine Design Questions and Answers
16. Machine Kinematics Questions and Answers
17. Theory of Machines Questions and Answers
18. Machine Drawing Questions and Answers
19. Machine Tools & Machining Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Turing Machine
and Halting”.
file:///C:/Users/gurun/Desktop/data.html 212/358
9/16/2020 data.html
1. Which of the following regular expression resembles the given diagram?
a) {a}*{b}*{a,b}
b) {a,b}*{aba}
c) {a,b}*{bab}
d) {a,b}*{a}*{b}*View Answer
Answer: b
Explanation: The given diagram is a transition graph for a turing machine which accepts the language with
the regular expression {a,b}*{aba}.
advertisement
2. Construct a turing machine which accepts a string with ‘aba’ as its substring.a)
file:///C:/Users/gurun/Desktop/data.html 213/358
9/16/2020 data.html
b)
c)
d)
View Answer
Answer: c
Explanation: The
language consist of
strings with a
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:
file:///C:/Users/gurun/Desktop/data.html 214/358
9/16/2020 data.html
3. The number of states required to automate the last question i.e. {a,b}*{aba}{a,b}* using
finite automata: a) 4
b) 3
c) 5
d) 6
View Answer
Answer: a
Explanation: The finite automata can be represented as:
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
c) goes into loop forever
advertisement
file:///C:/Users/gurun/Desktop/data.html 215/358
9/16/2020 data.html
5. d(q,X)=(r,Y,D) where D cannot be:
a) L
b) R
c) S
d) None of the mentionedView Answer
Answer: c
Explanation: D represents the direction in which automata moves forward as per the queue which surely
cannot be a starting variable.
Answer: c
Explanation: A language generating strings which are palindrome is not regular, thus cannot b represented
using a finite automaton.
Answer: d
Explanation: Different turing machines exist for operations like copying a string, deleting a symbol, inserting
a symbol and accepting palindromes.
advertisement
8. If T1 and T2 are two turing machines. The composite can be represented using the expression:
a) T1T2
b) T1 U T2
c) T1 X T2
d) None of the mentionedView Answer
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 composite TM.
9. The following turing machine acts like:
file:///C:/Users/gurun/Desktop/data.html 216/358
9/16/2020 data.html
a) Copies a string
b) Delete a symbol
c) Insert a symbol
d) None of the mentionedView Answer
Answer: b
Explanation: A turing machine does the deletion by changing the tape contents from yaz to yz, where y
belongs to (S U {#})*.
a) Copies a symbol
b) Reverses a string
c) Accepts a pal
d) None of the mentioned
View Answer
file:///C:/Users/gurun/Desktop/data.html 217/358
9/16/2020 data.html
Answer: c
Explanation: The composite TM accepts the language of palindromes over {a, b} by comparing the input
string to its reverse and accepting if and only if the two are equal.
advertisement
« Prev - Automata Theory Questions and Answers – The Language of Turing Machine-2
» Next - Automata Theory Questions and Answers – Programming Techniques-Storage and Subroutines
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – The Language of Turing Machine-2
Automata Theory Questions and Answers – Programming Techniques-Storage and Subroutines
advertisement
advertisement
Recommended Posts:
1. Home
2. Java Algorithms, Problems & Programming Examples
3. C++ Algorithms, Problems & Programming Examples
4. C Algorithms, Problems & Programming Examples
5. Java Programming Examples on Set & String Problems & Algorithms
6. C Programming Examples on Set & String Problems & Algorithms
7. Network Theory Questions and Answers
8. C++ Programming Examples on STL
9. C Programming Examples on Stacks & Queues
10. Electromagnetic Theory Questions and Answers
11. C++ Programming Examples on Set & String Problems & Algorithms
12. Machine Dynamics Questions and Answers
13. Python Programming Examples on Stacks & Queues
14. Machine Design Questions and Answers
15. Machine Kinematics Questions and Answers
16. Theory of Machines Questions and Answers
17. Machine Drawing Questions and Answers
18. Compilers Questions and Answers
19. Machine Tools & Machining Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Programming
Techniques-Storage and Subroutines”.
file:///C:/Users/gurun/Desktop/data.html 218/358
9/16/2020 data.html
1. A turing machine has ____________ number of states in a CPU.
a) finite
b) infinte
c) May be finite
d) None of the mentionedView Answer
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).
advertisement
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 Arithmetic Register. The number of states the finite machine will hold: a)
2(32*64)
b) 296
c) 96
d) 32
View Answer
Answer: b
Explanation: According to the statistics of the question, we will have a finite machine with 2^96 states.
a) Change a state
b) Write a tape symbol in the cell scanned
c) Move the tape head left or right
d) All of the mentionedView Answer
Answer: d
Explanation: A move of a turing machine is the function of the state of finite control and the tape symbol just
scanned.
Answer: a
Explanation:
file:///C:/Users/gurun/Desktop/data.html 219/358
9/16/2020 data.html
The finite control not only contains state q but also three data, A, B, C. The following technique requires no
extension to the Turing Machine model. Shaping states this way allows to describe transitions in more
systematic way and often to simplify the strategy of the program.
advertisement
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.
6. A multi track turing machine can described as a 6-tuple (Q, X, S, d, q0, F) where X represents:
a) input alphabet
b) tape alphabet
c) shift symbols
d) none of the mentionedView Answer
Answer: b
Explanation: The 6-tuple (Q, X, S, d, q0, F) can be explained as:
Q represents finite set of states,
X represents the tape alphabet,
S represents the input alphabet
d represents the relation on states and the symbols
q0 represents the initial state
F represents the set of final states.
Answer: c
Explanation: In a n-track turing machine, one head reads and writes on all the tracks simultaneously.
advertisement
file:///C:/Users/gurun/Desktop/data.html 220/358
9/16/2020 data.html
Statement: Two track turing machine is equivalent to a standard turing machine.
a) true
b) false
View Answer
Answer: a
Explanation: This can be generalized for n- tracks and can be proved equivalent using ennumerable
languages.
9. Which of the following is/are not true for recursively ennumerable language?
a) partially decidable
b) Turing acceptable
c) Turing Recognizable
d) None of the mentionedView Answer
Answer: d
Explanation: In automata theory, a formal language is called recursively ennumerable language or partially
decidable or semi decidable or turing acceptable or turing recognizable if there exists a turing machine which
will ennumerate all valid strings of the language.
10. According to Chomsky hierarchy, which of the following is adopted by Recursively Ennumerable
language? a) Type 0
b) Type 1
c) Type 2
d) Type 3View Answer
Answer: a
Explanation: Recursively Ennumerable languages are type 0 languages in the Chomsky hierarchy. All
regular, context free, context sensitive languages are recursivelyennumerable language.
advertisement
« Prev - Automata Theory Questions and Answers -Turing Machine and Halting
» Next - Automata Theory Questions and Answers – Multitape Turing Machines
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers -Turing Machine and Halting
Automata Theory Questions and Answers – Multitape Turing Machines
advertisement
advertisement
Recommended Posts:
1. Java Programming Examples on Exception Handling
2. C# Programming Examples on Data Structures
3. Java Programming Examples on Collections
4. C# Programming Examples
5. Java Programming Examples on Java.Lang
6. R Programming Questions and Answers
7. C# Programming Examples on Interfaces
8. C# Programming Examples on Networking
file:///C:/Users/gurun/Desktop/data.html 221/358
9/16/2020 data.html
9. Electromagnetic Theory Questions and Answers
10. Network Theory Questions and Answers
11. SAN – Storage Area Networks Questions & Answers
12. C# Programming Examples on Functions
13. Theory of Machines Questions and Answers
14. Ruby Programming Questions and Answers
15. C Algorithms, Problems & Programming Examples
16. Compilers Questions and Answers
17. Java Programming Examples on Set & String Problems & Algorithms 18. C Programming Examples
on Set & String Problems & Algorithms
19. C++ Programming Examples on Set & String Problems & Algorithms
20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Multitape Turing
Machines”.
Answer: a
Explanation: A multitape turing machine is an ordinary turing machine with multiple tapes. Each tape has its
own head to control the read and write.
advertisement
2. A multitape turing machine is ________ powerful than a single tape turing machine.
a) more
b) less
c) equal
d) none of the mentionedView Answer
Answer: a
Explanation: The multitape turing machine model seems much powerful than the single tape model, but any
multi tape machine, no matter how many tapes, can be simulated by single taped TM.
3. In what ratio, more computation time is needed to simulate multitape turing machines using single tape
turing machines? a) doubly
b) triple
c) quadratically
d) none of the mentionedView Answer
Answer: c
Explanation: Thus, multitape turing machines cannot calculate any more functions than single tape machines.
file:///C:/Users/gurun/Desktop/data.html 222/358
9/16/2020 data.html
4. Which of the following is true for two stack turing machines?
a) one read only input
b) two storage tapes
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: c
Explanation: Two-stack Turing machines have a 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.
advertisement
Answer: c
Explanation: A read only turing machine or 2 way deterministic finite automaton is a class of model of
computability that behaves like a turing machine, and can move in both directions across input, except
cannot write to its input tape.
Answer: a
Explanation: ATM is divide into two sets: an existential state is accepting if some transitions leads to an
accepting state; an universal state is accepting if every transition leads to an accepting state.
Answer: c
Explanation: ‘Is a universal quantum computer sufficient’ is one of the unsolved problem from physics.
advertisement
Answer: b
Explanation: A deterministic turing machine is unambiguous and for every input, there is exactly one
operation possible. It is a subset of non-deterministic Turing machines.
Answer: d
Explanation: Turings a- machine or automatic machine was left ended,right end infinite.Any of finite number
of tape symbols were allowed and the 5 tuples were not in order.
« Prev - Automata Theory Questions and Answers – Programming Techniques-Storage and Subroutines
» Next - Automata Theory Questions and Answers – Equivalence of One-Tape and Multitape TM’s
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Programming Techniques-Storage and Subroutines
Automata Theory Questions and Answers – Equivalence of One-Tape and Multitape TM’s
advertisement
advertisement
Recommended Posts:
1. C# Programming Examples on Events
2. Home
3. Machine Kinematics Questions and Answers
4. Mechatronics Engineering Questions and Answers
5. Machine Tools & Machining Questions and Answers
6. Agricultural Engineering Questions and Answers
7. Mechanical Engineering Questions and Answers
8. Engineering Metrology Questions and Answers
9. C++ Programming Examples on Set & String Problems & Algorithms
10. Computer Fundamentals Questions and Answers
11. Network Theory Questions and Answers
12. C Programming Examples on Set & String Problems & Algorithms
13. Compilers Questions and Answers
14. Electromagnetic Theory Questions and Answers
15. Hydraulic Machines Questions and Answers
16. DC Machines Questions and Answers
file:///C:/Users/gurun/Desktop/data.html 224/358
9/16/2020 data.html
17. Electrical Machines Questions and Answers
18. Design of Electrical Machines Questions and Answers
19. Theory of Machines Questions and Answers
20. Automata Theory Questions and Answers – From PDA to Grammars
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Equivalence of
One-Tape and Multitape TM’s”.
1. Which of the following are related to construction of One Tape turing machines?
a) JFLAP
b) NFLAP
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: a
Explanation: JFLAP is educational software written in java to experiment with the topics in automata theory
and area of formal languages.
advertisement
Answer: d
Explanation: Topics like regular expressions, context free languages and unrestricted grammar including
parsers like LL,SLR parsers can be covered using JFLAPS.
Answer: b
Explanation: Multitape turing machines do have multiple tapes but they they are accessed by separate heads.
Answer: c
file:///C:/Users/gurun/Desktop/data.html 225/358
9/16/2020 data.html
Explanation: A multitape turing machine is an ordinary turing machine which is always abstract.And they do
have their equivalent single tape turing machines.
advertisement
Answer: a
Explanation: Multitrack turing machines are special types of Multitape turing machines. In a standard n-tape
Turing machine, n heads move independently along n-tracks.
6. In a n-track turing machine, _________ head/heads read and write on all tracks simultaneously.
a) one
b) two
c) n
d) infinite
View Answer
Answer: a
Explanation: In a n-track Turing machine, one head reads and writes on all tracks simultaneously. A tape
position in a n-track Turing Machine contains n symbols from the tape alphabet.
Answer: d
Explanation: All of the mentioned are one or the other kind of Turing machines in existence.
advertisement
Answer: b
Explanation: One needs a finite number of tapes. The proofs that show the equivalence between multi-tape
TM and one-band TM rely on the fact that the number of tapes is bounded.
Answer: a
Explanation: Its the theorem that states Every multitape turing machine can be simulated by a single tape
turing machine and the corresponding language can be accepted.
Answer: d
Explanation: Tms can be used as both: language recognizers/Computers. TMs are like universal computing
machines with universal storage.
advertisement
Recommended Posts:
1. Electrical Engineering Questions and Answers
2. C Programming Examples on Set & String Problems & Algorithms
3. Aeronautical Engineering Questions and Answers
4. Machine Dynamics Questions and Answers
5. Home
6. VLSI Questions and Answers
7. Machine Kinematics Questions and Answers
8. Mechatronics Engineering Questions and Answers
9. Compilers Questions and Answers
10. Machine Tools & Machining Questions and Answers
11. Mechanical Engineering Questions and Answers
12. Agricultural Engineering Questions and Answers
13. Hydraulic Machines Questions and Answers
14. DC Machines Questions and Answers
15. Design of Electrical Machines Questions and Answers
16. Network Theory Questions and Answers
17. Electromagnetic Theory Questions and Answers
18. Electrical Machines Questions and Answers
19. Theory of Machines Questions and Answers
20. Automata Theory Questions and Answers – Deterministic Finite Automata-Introduction and
Definition
advertisement
file:///C:/Users/gurun/Desktop/data.html 227/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Non Deterministic
Turing Machines”.
Answer: c
Explanation: Turing machine is known as universal computer. It is denoted by M=(Q,Σ,Ґ ,δ ,q0, B,F)
advertisement
Answer: d
Explanation: A turing machine can have many applications like : Enumerator (A turing machine with an
output printer), function computer, etc.
Answer: a
Explanation: The following mentioned is the difference between 2-way FA and TM. Another instance is that
TM has a read/write tape head while FA doesn’t.
Answer: d
Explanation: The following mentioned are the only possibilities of operating a string through a turing
machine.
Answer: d
Explanation: Except Recursion, all the other options are techniques of Turing Machine construction which
further includes, Checking off symbols and Storage in finite control.
advertisement
6. Which among the following is not true for 2-way infinte TM?
a) tape in both directions
b) Leftmost square not distinguished
c) Any computation that can be performed by 2-way infinite tape can also be performed by standard TM.d)
None of the mentioned View Answer
Answer: d
Explanation: All of the mentioned are correct statements for a two way infinite tape turing machine.
Theorems say the power of such a machine is in no way superior than a standard turing machine.
Answer: a
Explanation: A turing machine can be used as a transducer. The most obvious way to do this is to treat the
entire non blank portion of the initial tape as input, and to treat the entire blank portion of the tape when the
machine halts as output.
Answer: d
Explanation: If the tape contains k-dimentional array of cells infinte in all 2k directions, for some fixed k and
has a finite control, the machine can be called Multidimentional TM.
Answer: a
Explanation: Here, the turing machine can use the printer as an output device to print strings.
Note: There is no input to an enumerator. If it doesn’t halt, it may print an infinite set of strings.
advertisement
Answer: b
Explanation: An enumerator is a turing machine with an output printer. It can use an printer as an output
device to print output strings. As n also holds the value , epsilon will also be a part of the output set.
Answer: a
Explanation: If an Enumerator E enumerates a language L, there is a turing machine M that recognizes
language L. Also, If a turing machine M recognizes a language L, there is an enumerator for L.
« Prev - Automata Theory Questions and Answers – Equivalence of One-Tape and Multitape TM’s
» Next - Automata Theory Questions and Answers – Multistack Machines, Counter Machines
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Equivalence of One-Tape and Multitape TM’s
Automata Theory Questions and Answers – Multistack Machines, Counter Machines
advertisement
advertisement
Recommended Posts:
1. Computer Science Questions and Answers
2. Machine Tools & Machining Questions and Answers
3. C# Programming Examples on Interfaces
4. Home
5. R Programming Questions and Answers
6. C++ Questions and Answers
7. Artificial Intelligence Questions and Answers
8. Java Programming Examples on Set & String Problems & Algorithms 9. C Questions and Answers
10. C++ Programming Examples on Set & String Problems & Algorithms
11. C Programming Examples on Set & String Problems & Algorithms
12. Hydraulic Machines Questions and Answers
13. Compilers Questions and Answers
14. DC Machines Questions and Answers
15. Design of Electrical Machines Questions and Answers
16. Network Theory Questions and Answers
17. Electrical Machines Questions and Answers
18. Electromagnetic Theory Questions and Answers
19. Theory of Machines Questions and Answers 20. Automata Theory Questions and Answers
advertisement
file:///C:/Users/gurun/Desktop/data.html 230/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Multistack
Machines, Counter Machines”.
1. Can a single tape turing machine be simulated using deterministic 2-stack turing machine?
a) Yes
b) No
c) Cannot be said
d) none of the mentionedView Answer
Answer: a
Explanation: The symbols to left of the head of turing macine being simulated can be stored on the stack
while the symbols on the right of the head can be placed on another stack. On each stack, symbols closer to
the TM’s head are placed closer to the top of the stack than symbols farther from the TM’s head.
advertisement
2. A ___________ is a multi tape turing machine whose input tape is read only.
a) Counter Machine
b) Multi-stack
c) Alternating Turing machine
d) None of the mentionedView Answer
Answer: a
Explanation: Counter machines are offline(a multitape turing machine whose input is read only) whose
storage tapes are semi-infinite and whose tape symbols contains only two symbols Z and a blank symbol B.
3. Instantaneous description of a counter machine can be described using:
a) the input tape contents
b) position of the input head
c) distance of storage heads from symbol Z
d) all of the mentionedView Answer
Answer: d
Explanation: Instantaneous description of a counter machine can be described by the state, the input tape
contents, the position of input head, and the distance of storage heads from the symbol Z. The counter
machine can really store a count on each tape and tell if the count is zero.
Answer: d
Explanation: Another procedure to restrict a turing machine is to limit the size of tape alphabet or reduce the
number of states. If the tape alphabets, number of tapes or number of states are limited, then there is only a
finite number of different turing machine, so the restricted model is more powerful than the original one.
advertisement
Answer: b
Explanation: Linear Bounded Automaton is a type of Turing Machine where tape is not allowed to move off
the portion of the tape containing the input. It is a Turing machine with limited amount of memory.
Answer: true
Explanation: A TM with a semi-infinite tape means that there are no cells to the left of the initial head
position. A TM with a semi infinite tape simulates a TM with an infinite tape by using a two-track tape.
7. Which of the following is true with reference to semi-infinite tape using a two track tape?
a) Can simulate a two way tape
b) Upper track represents the head-right cells
c) Lower track represents the head-left cells
d) All of the mentionedView Answer
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.
advertisement
Answer: a
Explanation: Both the statements are true. Both the statements are properties of Multistack machines.
9. A two-way infinite tape turing machine is ________ superior than the basic model of the turing machine
in terms of power. a) more
b) less
c) no way
d) none of the mentionedView Answer
Answer: c
Explanation: A two way infinite tape turing machine is a turing machine with its input tape infinte in both
directions, the other component being the same as the basic model.
Answer: d
Explanation: For a basic TM, there exists a 2-counter, 3-counter and 4-counter machines
We can prove them using Deterministic two stack turing machine.
Counter machine:
advertisement
« Prev - Automata Theory Questions and Answers – Non Deterministic Turing Machines
» Next - Automata Theory Questions and Answers – Simulation of Turing Machine
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Non Deterministic Turing Machines
Automata Theory Questions and Answers – Simulation of Turing Machine
advertisement
advertisement
Recommended Posts:
1. Java Programming Examples on Exception Handling
2. Python Programming Examples on Linked Lists
3. C Programming Examples on Linked List
4. C# Programming Examples on Data Structures
5. Ruby Programming Questions and Answers
6. Machine Tools & Machining Questions and Answers
7. Mechatronics Engineering Questions and Answers
8. Machine Drawing Questions and Answers
9. Agricultural Engineering Questions and Answers
10. Mechanical Engineering Questions and Answers
11. C Programming Examples on Stacks & Queues
12. Python Programming Examples on Stacks & Queues
13. Network Theory Questions and Answers
14. Electromagnetic Theory Questions and Answers
15. Design of Electrical Machines Questions and Answers
16. DC Machines Questions and Answers
17. Electrical Machines Questions and Answers
18. Hydraulic Machines Questions and Answers
19. Theory of Machines Questions and Answers
20. Automata Theory Questions and Answers – Finite Automata-Introduction
advertisement
file:///C:/Users/gurun/Desktop/data.html 233/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Simulation of
Turing Machine”.
Answer: d
Explanation: Computationally Universal or Turing Complete is a set of data manipulation rules if it can be
used to simulate a single-taped turing machine.
advertisement
Answer: d
Explanation: Most of the programming languages, conventional or unconventional are turing complete.
Functional languages like Lisp and Haskell are also turing complete.
3. Let two machines be P and Q. The state in which P can simulate Q and Q can simulate P is called:
a) Turing Equivalence
b) State Equivalence
c) Universal Turing Machine
d) None of the mentionedView Answer
Answer: a
Explanation: It is a closely related concept with Turing complete. It says, two computers P and Q are called
equivalent if P can simulate Q and Q can simulate P.
Answer: c
Explanation: The following conclusion is laid down from the Church-Turing thesis:
Any function whose values can be computed by an algorithm, can be computed by a Turing machine. If any
real world computer can be simulated by a turing machine, it is Turing equivalent to a Turing Machine.
advertisement
file:///C:/Users/gurun/Desktop/data.html 234/358
9/16/2020 data.html
5. Which of the following can be used to simulate any turing machine?
a) Finite State Automaton
b) Universal Turing Machine
c) Counter machines
d) All of the mentionedView Answer
Answer: b
Explanation: The computational aspect of any possible real world computer can be simulated using an
Universal Turing Machine so can be any turing machine.
Answer: a
Explanation: Yes it is. For instance, an imperative language is called Turing complete if it tends to have
conditional branching and an ability to maintain an arbitrary number of symbols.
Answer: d
Explanation: Real computers which are manufactured till date, all are similar to single taped turing machine.
However, they have limited physical resources so they are linearly bounded complete on the contrary.
advertisement
Answer: d
Explanation: All of the following mentioned are the conclusions of automata theory or computability theory.
Answer: d
Explanation: Many games fall under the category og turing complete:
a) Minecraft
b) Minesweeper
c) Dwarf Fortress
d) Conway’s Game of Life
file:///C:/Users/gurun/Desktop/data.html 235/358
9/16/2020 data.html
e) Pokemon Yellow, etc.
Answer: There exists some computational languages which are not turing complete. Regular language which
is accepted by finite automata tops the list. Other examples are pixel shader languages embedded in Direct3D
and OpenGL extensions.
advertisement
« Prev - Automata Theory Questions and Answers – Multistack Machines, Counter Machines
» Next - Automata Theory Questions and Answers – The Diagonalization Languages
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Multistack Machines, Counter Machines
Automata Theory Questions and Answers – The Diagonalization Languages
advertisement
advertisement
Recommended Posts:
1. Java Programming Examples on Set & String Problems & Algorithms
2. Computer Science Questions and Answers
3. C++ Programming Examples on Set & String Problems & Algorithms
4. C# Programming Examples on Functions
5. C Programming Examples on Mathematical Functions
6. Information Science Questions and Answers
7. C# Programming Examples on Networking
8. C Programming Examples on Set & String Problems & Algorithms
9. Computer Fundamentals Questions and Answers
10. C# Programming Examples on Events
11. Compilers Questions and Answers
12. Electromagnetic Theory Questions and Answers
13. Machine Design Questions and Answers
14. Machine Kinematics Questions and Answers
15. Network Theory Questions and Answers
16. Machine Drawing Questions and Answers
17. Machine Dynamics Questions and Answers
18. Machine Tools & Machining Questions and Answers
19. Theory of Machines Questions and Answers 20. Automata Theory Questions and Answers
advertisement
file:///C:/Users/gurun/Desktop/data.html 236/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “The
Diagonalization Languages”
1. Which of the following technique is used to find whether a natural language isnt recursive ennumerable?
a) Diagonalization
b) Recursive Induction
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: a
Explanation: To find a non recursively ennumerable language, we use the technique of diagonalization.
advertisement
Answer: c
Explanation: Diagonalization is a technique we use for the following operations:
a) To find a non recursively ennumerable language.
b) To prove undecidablility of halting problem.
Answer: c
Explanation: In contrast we can put up an algorithm for checking whether two FA’s are equivalent and this
program can be implemented as a program.
Answer: d
Explanation: Example: Does a graph G has a Hamilton cycle?
=>Each undirected graph is an instance of Hamilton cycle problem.
Answer: a
Explanation: An algorithm is a TM that halts on all inputs,accepted or not. Putting other way, decidable
problems are recursive languages.
advertisement
Answer: d
Explanation: All of the mentioned problems are undecidable.
Answer: d
Explanation: We can proof A to be undecidable using the contradiction method.
Answer: b
Explanation: Any recursive ennumerable language is not closed under complementation.
advertisement
Answer: c
file:///C:/Users/gurun/Desktop/data.html 238/358
9/16/2020 data.html
Explanation: Halting problem: Does a given Turing machine M halt on a given input w?
Answer: a
Explanation: When turing machines are coded as Binary strings, we are restricted to take any input alphabet
except {0,1}.
12. With reference ti enumeration of binary strings, the conversion of binary strings to integer is possible by
treating the resulting string as a base ____ integer. a) 2
b) 8
c) 16
d) All of the mentionedView Answer
Answer: a
Explanation: It makes sense to talk about the i-th binary string” and about “the i-th Turing machine. If i
makes no sense as a TM, assume the i-th TM accepts nothing.
Recommended Posts:
1. C++ Programming Examples on Graph Problems & Algorithms
2. Java Programming Examples on Graph Problems & Algorithms
3. C Programming Examples without using Recursion
4. Dynamic Programming Problems and Solutions
5. C Programming Examples on Graph Problems & Algorithms
6. Artificial Intelligence Questions and Answers
7. C Programming Examples using Recursion
8. Simple C Programs
9. C++ Algorithms, Problems & Programming Examples
10. Java Algorithms, Problems & Programming Examples
11. C Algorithms, Problems & Programming Examples
12. C++ Programming Examples on Set & String Problems & Algorithms
13. Python Programming Examples on Trees
14. Compilers Questions and Answers
15. C Programming Examples on Trees
file:///C:/Users/gurun/Desktop/data.html 239/358
9/16/2020 data.html
16. C Programming Examples on Set & String Problems & Algorithms
17. Electromagnetic Theory Questions and Answers
18. Theory of Machines Questions and Answers
19. Network Theory Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Questions and Answers for Experienced people focuses on “The Universal
Language-Undecidability”.
Answer: c
Explanation: The decision problem requires checking of input (string) has some property or not. That is a
string to boolean transaction.
advertisement
2. A language L is said to be ____________ if there is a turing machine M such that L(M)=L and M halts at
every point.
a) Turing acceptable
b) decidable
c) undecidable
d) none of the mentioned
View Answer
Answer: b
Explanation: Decidability refers to the decision problem and existence of a effective method for determining
membership, and return true and false accordingly rather that going into a loop forever.
Answer: d
Explanation: Tarski and Mostowski in 1949, established that the first order theory of natural numbers with
addition, multiplication, and equality is an undecidable theory. Others mentioned are decidable theories.
Answer: b
Explanation: Under decidablity of regular language properties we have the following lemma which states
that A DFA which recognizes an input w is decidable.
Answer: d
Explanation: All are the properties of regular languages and all are decidable languages.
advertisement
Answer: c
Explanation: The language accepted by Turing machines are called recursively ennumerable (RE), and the
subset of RE languages that are accepted by a turing machine that always halts are called recursive.
Answer: a
Explanation: We can refer to languages as ‘recursive’ and problems as ‘decidable’. If a language is not
recursive , then we call the problem expressed by that language undecidable.
8. The problems which have no algorithm, regardless of whether or not they are accepted by a turing
machine that fails to halts on some input are referred as: a) Decidable
b) Undecidable
c) Computable
d) None of the mentionedView Answer
Answer: b
Explanation: The problems that can be solved by a turing machine can divided into two classes:
a) Those that have an algorithm
b) Intractable problems: Those that are only solved by a turing machine that may run forever on inputs they
do not accept.
10. A problem is called __________ if its has an efficient algorithm for itself.
a) tractable
b) intractable
c) computational
d) none of the mentionedView Answer
Answer: a
Explanation: A problem is called intractable iff there is an efficient (i.e. polynomial time) algorithm that
solves it. A problem is called intractable iff there exists no efficient algorithm that solves it.
Answer: d
Explanation: A formal language is called recursive if it is a recursive subset of the set of all possible finite
sequences over the alphabet of the language.
Answer: a
Explanation: R is the set of all recursive languages, a class of decision problems solvable by turing machines.
Although, R is also used for the class RP.
advertisement
Recommended Posts:
1. Data Structures & Algorithms II – Questions and Answers
2. Cryptography and Network Security Questions and Answers
3. C Programming Examples on Numerical Problems & Algorithms
4. Dynamic Programming Problems and Solutions
5. Java Programming Examples on Numerical Problems & Algorithms
6. C Algorithms, Problems & Programming Examples
7. Computer Fundamentals Questions and Answers
8. Java Programming Examples on Graph Problems & Algorithms
9. Artificial Intelligence Questions and Answers
10. C Programming Examples on Graph Problems & Algorithms
11. C++ Programming Examples on Graph Problems & Algorithms
12. Java Algorithms, Problems & Programming Examples
13. C++ Algorithms, Problems & Programming Examples
14. Theory of Machines Questions and Answers
15. Java Programming Examples on Set & String Problems & Algorithms
16. Electromagnetic Theory Questions and Answers
17. Network Theory Questions and Answers
18. C Programming Examples on Set & String Problems & Algorithms
19. C++ Programming Examples on Set & String Problems & Algorithms 20. Automata Theory
Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Rice’s Theorem,
Properties and PCP”.
file:///C:/Users/gurun/Desktop/data.html 243/358
9/16/2020 data.html
1. According to the rice’s theorem, If P is a non trivial property, Lp is :
a) infinite
b) decidable
c) undecidable
d) none of the mentionedView Answer
Answer: c
Explanation: Rice’s theorem states that ‘Any non trivial property about the language recognized by a turing
machine is undecidable’.
advertisement
Answer: a
Explanation: A property of partial functions is called trivial if it holds for all partial computable functions or
for none, and an effective decision method is called general if it decides correctly for every algorithm.
Answer: c
Explanation: According to rice theorem, it is undecidable to determine whether the language recognized by
an arbitrary turing machine lies in S.
Answer: d
Explanation: According to Rice’s theorem, if there exists atleast one computable function in a particular class
C of computable functions and another computable function not in C then the problem deciding whether a
particular program computes a function in C is undecidable.
advertisement
Answer: d
Explanation: All of the following mentioned are immediate results of Rice’s theorem and thus, undecidable.
file:///C:/Users/gurun/Desktop/data.html 244/358
9/16/2020 data.html
6. Post Correspondence problem is
a) decidable decision problem
b) undecidable decision problem
c) not a decision problem
d) none of the mentionedView Answer
Answer: b
Explanation: Post Correspondence problem is an undecidable decision problem that was introduced by Emil
Post in 1946. Being simpler than halting problem, it can be used in proofs of undecidability.
Answer: a
Explanation: The MPCP is : Given lists A and B of K strings ,say A = w1 ,w2, …wk and B= x1, x2,…..xk
does there exists a sequence of integers i1,i2,…ir such that w1wi1wi2…..wir = x1xi1xi2…xir?
advertisement
Answer: a
Explanation: PCP or Post Correspondence problem is an undecidable decision problem.
10. Consider three decision problem A, B, C. A is decidable and B is not. Which of the following is a correct
option?
a) C is undecidable if C is reducible to B
b) C is undecidable if B is reducible to C
c) C is decidable if A is reducible to C
d) C is decidable if C is reducible to B’s complement.View Answer
Answer: b
Explanation: As B is undecidable and it can be reduced to C, C is also an undecidable problem.
advertisement
file:///C:/Users/gurun/Desktop/data.html 245/358
9/16/2020 data.html
» Next - Automata Theory Questions and Answers – Problem Solvable in Polynomial Time
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – The Universal Language-Undecidability
Best Reference Books – B.Sc. – Agriculture
advertisement
advertisement
Recommended Posts:
1. Object Oriented Programming Questions and Answers
2. Ruby Programming Questions and Answers
3. Spring Questions and Answers
4. Thermodynamics Questions and Answers
5. C++ Questions and Answers
6. C Questions and Answers
7. PHP Questions and Answers
8. Signals & Systems Questions and Answers
9. Engineering Mathematics Questions and Answers
10. Java Programming Examples on Hard Graph Problems & Algorithms
11. Discrete Mathematics Questions and Answers
12. C Programming Examples on Hard Graph Problems & Algorithms
13. C++ Programming Examples on Hard Graph Problems & Algorithms
14. R Programming Questions and Answers
15. Probability and Statistics Questions and Answers
16. Electromagnetic Theory Questions and Answers
17. Theory of Machines Questions and Answers
18. C# Programming Examples on Functions
19. Network Theory Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Interview Questions and Answers for Experienced people focuses on “Problem
Solvable in Polynomial Time”.
1. If the number of steps required to solve a problem is O(nk), then the problem is said to be solved in:
a) non-polynomial time
b) polynomial time
c) infinite time
d) none of the mentionedView Answer
Answer: b
Explanation: Most of the operations like addition, subtraction, etc as well as computing functions including
powers, square roots and logarithms can be performed in polynomial time. In the given question, n is the
complexity of the input and k is some non negative integer.
file:///C:/Users/gurun/Desktop/data.html 246/358
9/16/2020 data.html
advertisement
Answer: a
Explanation: The value of such constants can be calculated using algorithms which have time complexity in
terms if O(nk) i.e polynomial time.
3. Which of the following cannot be solved using polynomial time?
a) Linear Programming
b) Greatest common divisor
c) Maximum matching
d) None of the mentionedView Answer
Answer: d
Explanation: In graph theory, a matching or independent edge set in a graph G is a set of edges without
common vertices. Given a graph (V, E), a matching M in G is a set of pairwise non adjacent edges i.e. no
two edges share a common vertex.
4. The complexity class P consist of all the decision problems that can be solved by ___________using
polynomial amount of computation time.
Answer: d
Explanation: All the decision problems that can be solved using a Deterministic turing machine using
polynomial time to compute, all belong to the complexity class P.
advertisement
Answer: c
Explanation: P is a specific case of NP class, which is the class of decidable problems decidable by a non
deterministic turing machine that runs in polynomial time.
6. Which of the following options are correct with reference to P-complete problems?
a) used for the problems which are difficult to solve in limited space
b) every problem in P can be reduced to it using proper reductions
c) complete problem for complexity class P
d) all of the mentionedView Answer
Answer: d
Explanation:
file:///C:/Users/gurun/Desktop/data.html 247/358
9/16/2020 data.html
The notion of P-complete decision problems is useful in the analysis of:
a) which problems are tough to parallelize effectively
b) which problems are difficult to solve in limited space
7. A problem X belongs to P complexity class if there exist ________ algorithm to solve that problem, such
that the number of steps of the algorithms bounded by a polynomial in n, where n is the length of the input.
a) 1
b) 2
c) 3
d) all of the mentionedView Answer
Answer: d
Explanation: A problem X belongs to P complexity class if there exist atleast 1 algorithm to solve that
problem, such that the number of steps of the algorithms bounded by a polynomial in n, where n is the length
of the input. Thus, all the options are correct.
Answer: d
Explanation: Given a context free grammar and a string, can the string be generated by the grammar? Such
problems fall in the category of P-complete.
advertisement
Answer: a
Explanation: If we can parallelize a general simulation of a sequential computer, then we will be able to
parallelize any program that runs on that computer. If this problem is in NC, then so every other problem in
P.
10. In the above problem, if the input is binary, the class the problem belongs?
a) EXPSPACE
b) DLOGTIME
c) EXPTIME-complete
d) All of the mentionedView Answer
Answer: c
Explanation: It is the set of all decision problems that have exponential run time i.e. solvable by deterministic
turing machine in O(2p(n)) time, where p(n) is a polynomial function of n.
Sanfoundry Global Education & Learning Series – Automata Theory.
To practice all areas of Automata Theory for Interviews, here is complete set of 1000+ Multiple Choice
Questions and Answers.
« Prev - Automata Theory Questions and Answers – Rice’s Theorem, Properties and PCP
file:///C:/Users/gurun/Desktop/data.html 248/358
9/16/2020 data.html
» Next - Automata Theory Questions and Answers – Non Deterministic Polynomial Time
Categories Automata Theory MCQs
Post navigation
Best Reference Books – B.Sc. – Agriculture
Automata Theory Questions and Answers – Non Deterministic Polynomial Time
advertisement
advertisement
Recommended Posts:
1. C++ Algorithms, Problems & Programming Examples
2. Information Science Questions and Answers
3. Agricultural Engineering Questions and Answers
4. Computer Science Questions and Answers
5. C++ Programming Examples on Combinatorial Problems & Algorithms
6. Machine Tools & Machining Questions and Answers
7. C Algorithms, Problems & Programming Examples
8. C++ Programming Examples on Hard Graph Problems & Algorithms
9. Cryptography and Network Security Questions and Answers
10. Artificial Intelligence Questions and Answers
11. Java Programming Examples on Hard Graph Problems & Algorithms
12. C Programming Examples on Hard Graph Problems & Algorithms
13. Theory of Machines Questions and Answers
14. Compilers Questions and Answers
15. Electromagnetic Theory Questions and Answers
16. Network Theory Questions and Answers
17. Java Programming Examples on Set & String Problems & Algorithms
18. C++ Programming Examples on Set & String Problems & Algorithms
19. C Programming Examples on Set & String Problems & Algorithms 20. Automata Theory Questions
and Answers – From PDA to Grammars
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Non Deterministic
Polynomial Time”.
1. What does NP stands for in complexity classes theory?
a) Non polynomial
b) Non-deterministic polynomial
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: b
Explanation: NP is said to be one of the most fundamental complexity classes. NP is an acronym for Non
deterministic polynomial time.
advertisement
file:///C:/Users/gurun/Desktop/data.html 249/358
9/16/2020 data.html
2. The hardest of NP problems can be:
a) NP-complete
b) NP-hard
c) P
d) None of the mentionedView Answer
Answer: a
Explanation: NP class contains many important problems, the hardest of which is NP-complete, whose
solution is sufficient to deal with any other NP problem in polynomial time.
Answer: c
Explanation: It is sufficient to construct a PSPACE machine that loops over all proof strings and feeds each
one to a polynomial time verifier. It is also contained in EXPTIME, since the same algorithm operates in
exponential time.
Answer: b
Explanation: Travelling Salesman Problem: Given an input matrix of distances between n cities, this problem
is to determine if there is a route visiting all cities with total distance less than k.
Answer: a
Explanation: This is just a commutative property of NP complexity class where a problem is said to be in NP
if it can be solved using an algorithm which was used to solve another NP problem in polynomial amount of
time.
advertisement
Answer: a
Explanation: A problem is said to be NP Hard if an algorithm for solving the problem can be translated from
for solving any other problem. It is easier to show a problem NP than showing it Np Hard.
Answer: d
Explanation: Primality testing is a simple example. To decide whether a number is prime or not, one simply
selects non deterministically a number checks whether factors exist for the number or not.
8. In terms of NTIME, NP problems are the set of decision problems which can be solved using a non
deterministic machine in _______ time. a) O(n)
b) O(n1/2)
c) O(nk), k N
d) None of the mentionedView Answer
Answer: c
Explanation: The complexity class NP can be defined in terms of NTIME as:
NP=O(nk) for k N.
Answer: c
Explanation: NP can be defined using deterministic turing machines as verifiers.
advertisement
Answer: d
Explanation: This is a list of some problems which are in NP:
a) All problems in P
b) Decision version of Integer factorization method
c) Graph Isomorphism Problem
d) All NP complete problems, etc.
11. Which of the following does not belong to the closure properties of NP class?
a) Union
b) Concatenation
c) Reversal
d) ComplementView Answer
Answer: d
Explanation: It is unknown about the closure property-complement for the complexity class NP. The
question is so called NP versus co-NP problem.
file:///C:/Users/gurun/Desktop/data.html 251/358
9/16/2020 data.html
Sanfoundry Global Education & Learning Series – Automata Theory.
To practice all areas of Automata Theory, here is complete set of 1000+ Multiple Choice Questions and
Answers.
« Prev - Automata Theory Questions and Answers – Problem Solvable in Polynomial Time
» Next - Automata Theory Questions and Answers – Node-Cover Problem, Hamilton Circuit Problem
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Problem Solvable in Polynomial Time
Best Reference Books – B.Sc. – Aquaculture
advertisement
advertisement
Recommended Posts:
1. C Programming Examples on Computational Geometry Problems & Algorithms
2. Information Science Questions and Answers
3. Python Programming Examples on Graphs
4. C Algorithms, Problems & Programming Examples
5. C++ Programming Examples on Combinatorial Problems & Algorithms
6. Data Structures & Algorithms II – Questions and Answers
7. Computer Science Questions and Answers
8. Java Programming Examples on Combinatorial Problems & Algorithms
9. C Programming Examples on Combinatorial Problems & Algorithms
10. Compilers Questions and Answers
11. Java Algorithms, Problems & Programming Examples
12. Java Programming Examples on Set & String Problems & Algorithms
13. Theory of Machines Questions and Answers
14. C++ Algorithms, Problems & Programming Examples
15. Electromagnetic Theory Questions and Answers
16. Cryptography and Network Security Questions and Answers
17. C++ Programming Examples on Set & String Problems & Algorithms
18. Network Theory Questions and Answers
19. C Programming Examples on Set & String Problems & Algorithms 20. Automata Theory Questions
and Answers – PDA-Acceptance by Final State
advertisement
This set of Automata Theory Questions and Answers for Aptitude test focuses on “Node-Cover Problem,
Hamilton Circuit Problem”.
Answer: d
Explanation: There exists a set of 21 problems that are NP-complete and the set is called Karp’s 21
NPcomplete problems.
Answer: a
Explanation: Exact cover is a decision problem in computer science to determine if an exact cover exists.
Answer: c
Explanation: The relation ‘contains’ can be represented using a bipartite graph. The vertices of the graph can
be divided into two disjoint sets, one representing the subset S and the other representing the elements of P
and one edge for each subset in S;each node is included in exactly one of the edges forming the cover.
advertisement
5. For which of the following, greedy algorithm finds a minimal vertex cover in polynomial time?
a) tree graphs
b) bipartite graphs
c) both (a) and (b)
d) none of the mentionedView Answer
Answer: a
Explanation: For bipartite graphs, Konigs theorem allows the bipartite vertex problem to be solved in
polynomial time.
6. Hamilton circuit problem can have the following version/s as per the input graph:
a) directed
b) undirected
c) both (a) and (b)
d) none of the mentionedView Answer
Answer: c
Explanation: Hamilton circuit problem is a problem determining whether a Hamiltonian path(a path in an
undirected or directed graph that visits each vertex exactly once) exists in a graph(directed or undirected).
file:///C:/Users/gurun/Desktop/data.html 253/358
9/16/2020 data.html
7. Hamilton Circuit problem is a special case of ____________
a) travelling salesman problem
b) halting problem
c) hitting set
d) none of the mentionedView Answer
Answer: a
Explanation: Hamilton circuit problem is a special case of travelling salesman problem, obtained by setting
the distance between two cities to one if they are adjacent and two otherwise, and verifying that the total
distance travelled is equal to n (if so, the route is a Hamiltonian circuit; if there is no Hamiltonian circuit then
the shortest route will be longer).
advertisement
Answer: d
Explanation: Using Inclusion-exclusion principle, Andreas showed how to solve Hamilton Circuit problem
in arbitrary n-vertex graphs by a Monte Carlo algorithm in time O(1.657n).
Answer: a
Explanation: Handshaking lemma states that ‘Every finite undirected graph has an even number of vertices
with odd degree.
Answer: b
Explanation: Enumerative combinatorics is the most classical area of combinatorics and concentrates on
counting the number of certain combinatorial objects. Fibonacci series is a basic example of Enumerative
Combinatorics.
advertisement
« Prev - Automata Theory Questions and Answers – Non Deterministic Polynomial Time
» Next - Automata Theory Questions and Answers – PSPACE
Categories Automata Theory MCQs
Post navigation
file:///C:/Users/gurun/Desktop/data.html 254/358
9/16/2020 data.html
Best Reference Books – B.Sc. – Aquaculture
Automata Theory Questions and Answers – PSPACE
advertisement
advertisement
Recommended Posts:
1. Theory of Machines Questions and Answers
2. Java Programming Examples on Combinatorial Problems & Algorithms 3. C
Programming Examples on Set & String Problems & Algorithms
4. C++ Programming Examples on Combinatorial Problems & Algorithms
5. C Programming Examples on Combinatorial Problems & Algorithms
6. Data Structures & Algorithms II – Questions and Answers
7. Discrete Mathematics Questions and Answers
8. Electromagnetic Theory Questions and Answers
9. Java Algorithms, Problems & Programming Examples
10. Network Theory Questions and Answers
11. C Algorithms, Problems & Programming Examples
12. Java Programming Examples on Graph Problems & Algorithms
13. C++ Programming Examples on Graph Problems & Algorithms
14. C Programming Examples on Graph Problems & Algorithms
15. C++ Algorithms, Problems & Programming Examples
16. Java Programming Examples on Hard Graph Problems & Algorithms 17. Python Programming
Examples on Graphs
18. C++ Programming Examples on Hard Graph Problems & Algorithms
19. C Programming Examples on Hard Graph Problems & Algorithms 20. Automata
Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “PSPACE”.
1. All set of polynomial questions which can be solved by a turing machine using a polynomial amount of
space:
a) PSPACE
b) NPSPACE
c) EXPSPACE
d) None of the mentionedView Answer
Answer: a
Explanation: PSPACE is the problem class which contains all set of decision problems which can be solved
using a turing machine taking polynomial amount of space.
advertisement
Answer: c
Explanation: Membership of a string in a language defined by an arbitrary context sensitive grammar, or by
an arbitrary determinisic context sensitive grammar, is a PSPACE -complete problem.
Answer: a
Explanation: Some important conclusions of Savitch theorem includes:
a) PSPACE=NPSPACE: square of a polynomial function is still a polynomial function.
b) NL L2
Answer: d
Explanation: The closure property of PSPACE class includes :- Union, Concatenation and Kleene operation.
advertisement
Answer: c
Explanation: The given order is the only correct order and further PSPACE belongs to EXPTIME class and
subsequently occurs EXPSPACE class.
6. NL PSPACE EXPSPACE
The given relation involves which of the following theorems?
a) Space hierarchy theorem
b) Savitch’s theorem
c) Both (a) and (b)
d) None of the mentionedView Answer
Answer: c
Explanation: From space hierarchy theorem: NL NPSPACE, from Savitch’s theorem: NPSPACE=
PSPACE.
Answer: a
Explanation: PSPACE-complete problems are the most difficut problems is PSPACE. Finding a simple
solution to PSPACE-complete means simple solution to all other problems in PSPACE because all PSPACE
problems can be reduced to PSPACE-complete problems.
advertisement
8. Without needing extra __________ we can simulate non deterministic turing machine using deterministic
turing machine. a) time
b) space
c) both time and space
d) none of the mentionedView Answer
Answer: b
Explanation: Though it may use extra time, but as PSPACE=NPSPACE from savitch’s theorem, we can say
that space taken is same for both the machins, deterministic as well as non-deterministic.
Answer: a
Explanation: The complement of all the problems in PSPACE are also in PSPACE, meaning co-PSPACE=
PSPACE.
Answer: d
Explanation: An alternative characterization of PSPACE is a set of problems decidable by a turing machine
in polynomial time, sometimes called, APTIME or AP.
advertisement
« Prev - Automata Theory Questions and Answers – Node-Cover Problem, Hamilton Circuit Problem
» Next - Automata Theory Questions and Answers – Randomized Algorithm
Categories Automata Theory MCQs
Post navigation
Automata Theory Questions and Answers – Node-Cover Problem, Hamilton Circuit Problem
Automata Theory Questions and Answers – Randomized Algorithm
advertisement
advertisement
Recommended Posts:
file:///C:/Users/gurun/Desktop/data.html 257/358
9/16/2020 data.html
1. Engineering Mechanics Questions and Answers
2. Machine Tools & Machining Questions and Answers
3. Signals & Systems Questions and Answers
4. Structural Analysis Questions and Answers
5. Engineering Mathematics Questions and Answers
6. C++ Programming Examples on Set & String Problems & Algorithms
7. Java Algorithms, Problems & Programming Examples
8. Aerodynamics Questions and Answers
9. Discrete Mathematics Questions and Answers
10. C++ Algorithms, Problems & Programming Examples
11. C Algorithms, Problems & Programming Examples
12. C Programming Examples on Set & String Problems & Algorithms
13. Artificial Intelligence Questions and Answers
14. Compilers Questions and Answers
15. Cryptography and Network Security Questions and Answers
16. Probability and Statistics Questions and Answers
17. Theory of Machines Questions and Answers
18. Electromagnetic Theory Questions and Answers
19. Network Theory Questions and Answers
20. Automata Theory Questions and Answers – Mealy Machine
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Randomized
Algorithm”
1. A randomized algorithm uses random bits as input inorder to achieve a _____________ good performance
over all possible choice of random bits. a) worst case
b) best case
c) average case
d) none of the mentionedView Answer
Answer: c
Explanation: A randomized algorithm is an algorithm that employs a degree of randomness as a part of its
logic using random bits as inputs and in hope of producing average case good performace.
advertisement
Answer: a
file:///C:/Users/gurun/Desktop/data.html 258/358
9/16/2020 data.html
Explanation: The other type of algorithms are probabalistic algorithms, which depending upon the random
input, have a chance of producing incorrect results or fail to produce a result.
Answer: d
Explanation: Monte Carlo algorithms are very vast, but only probably correct. On thr other side, Las Vegas
algorithms are always correct, but probably fast.
Answer: c
Explanation: The atlantic city algorithms which are bounded polynomial time algorithms are probably
correct and probably fast. It is correct more than 75% of the times.
Answer: a
Explanation: Prisonner’s dilemma is a standard example of a game analysed in game theory where rational
cooperative behaviour is judged on the basis of rewards and punishment.
advertisement
Answer: a
Explanation: Quicksort is the method of choice in many applications( Unix sort command) with O(nlogn) in
worst case.
file:///C:/Users/gurun/Desktop/data.html 259/358
9/16/2020 data.html
8. For the given algorithm, find the probability of finding after k iterations:
find_a(array A, n,
k) begin i=0
repeat
Randomly select one element out of n elements
i=i+1 until
i=k or a is found end
a) (1/2)k
b) (1-(1/3))k
c) 1-(1/2)k
d) None of the mentionedView Answer
Answer: c
Explanation: The given is known as Monte Carlo Algorithm. If a is fount, the algorithm succeeds, else the
algorith fails. The algorithm doesn not guarantee success but the run time is bounded.
advertisement
Answer: d
Explanation: There exists a list of unsolved problems in computational theory which includes many problems
including the ones given.
Answer: d
Explanation: Freivalds algorithm is a probabalistic randomized algorithm we use to verify matrix
multiplication. On the other hand, Randomness can be useful in quicksort. If the algorithm selects pivot
element uniformaly at random, it has a probably high probabilty of finishing the work in O(nlogn) time
regardless of the input.
file:///C:/Users/gurun/Desktop/data.html 260/358
9/16/2020 data.html
Recommended Posts:
1. Network Theory Questions and Answers
2. Electromagnetic Theory Questions and Answers
3. Data Structures & Algorithms II – Questions and Answers
4. C++ Programming Examples on Numerical Problems & Algorithms
5. C++ Programming Examples on Graph Problems & Algorithms
6. C++ Programming Examples on Set & String Problems & Algorithms
7. Java Programming Examples on Numerical Problems & Algorithms
8. C Programming Examples on Graph Problems & Algorithms
9. C Programming Examples on Numerical Problems & Algorithms
10. Java Programming Examples on Graph Problems & Algorithms
11. C Programming Examples on Set & String Problems & Algorithms
12. C# Programming Examples on Sorting
13. C++ Programming Examples on Combinatorial Problems & Algorithms 14. C++ Algorithms,
Problems & Programming Examples
15. Java Programming Examples on Combinatorial Problems & Algorithms
16. C Programming Examples on Searching and Sorting
17. C Programming Examples on Combinatorial Problems & Algorithms
18. Java Algorithms, Problems & Programming Examples
19. Python Programming Examples on Searching and Sorting 20. Automata Theory Questions and
Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Complexity
Classes,Class RP and ZPP”.
Answer: b
Explanation:
2n2=5000
n2+3n+7=2567
n3=125000
2n=1.13*1015
advertisement
Answer: c
Explanation: If there exists an input string of length n that causes T to use an infinite number of tape squares,
the space complexity of the turing machine is undefined.
Answer: One way to reduce the run time can be to increase the number of tapes. Sometimes, using two tapes
can be used to avoid back and forth motions altogether.
4. Which of the following are basic complexity classes for a function f:N->N?
a) Ntime(f)
b) Nspace(f)
c) Space(f)
d) All of the mentionedView Answer
Answer: d
Explanation: Ntime(f): is a set of languages that can be accepted by a NTM T with non deterministic time
complexity function t <=f. In all four cases, the machines are allowed to be multitape TM’s.
5. A function f is called __________ if there exists a TM T so that for any n and any input string of length n,
T halts in exactly f(n) moves. a) Step function
b) Step counting function
c) Inplace functions
d) None of the mentionedView Answer
Answer: b
Explanation: If f is a step counting function, T is a TM halting in f(n) moves where n is the length of input
string.
advertisement
6. Let f: N->N be a step counting function. Then for some constant C, Time(f) is a proper subset of
Time(_______) a) O(nf)
b) O(n+f)
c) O(n2f2)
d) None of the mentionedView Answer
Answer: c
Explanation: Using the encoding function, it is possible to show that if the function f is a step counting
function, then the function Cn2(f(n))2 is the total number of moves required.
7. Which among the following is false? If
f=O(h) and g=O(k) for f,g,h,k:N->N, then
a) f+g = O(h+k)
b) fg = O(hk)
c) fg=O(hk)
d) None of the mentionedView Answer
file:///C:/Users/gurun/Desktop/data.html 262/358
9/16/2020 data.html
Answer: c
Explanation: f,g,h,k are partial functions and each is defined at all but a finite number of points.
Answer: b
Explanation: ZPP is zero error probabalistic polynomial time complexity class which run in polynomial time,
returns an answer: yes, no or do not know.
Answer: a
Explanation: A probabalistic turing machine is a non deterministic turing machine which randomly chooses
between the available transitions at each point according to some probability distribution.
advertisement
10. ZPP is exactly equal to the ____________of the classes RP and co-RP.
a) Union
b) Intersection
c) Concatenation
d) DifferenceView Answer
Answer: b
Explanation: To prove the following statement, we need to take in note that every problem in RP and co-RP
has a Las-Vegas algorithm.
11. Suppose we have a las vegas algorithm C to prove ZPP is contained in RP and co-RP. Run C for double
its expected running time.
By Markov’s inequality, the chance that it will answer before we stop is:
a) 1/2
b) 1/4
c) 1/3
d) none of the mentionedView Answer
Answer: a
Explanation: This means the chance we’ll give the wrong answer on a YES instance, by stopping and
yielding NO, is only 1/2, fitting the definition of an RP algorithm.
Answer: a
Explanation: ZPP is said to be closed under complement function i.e. ZPP=co-ZPP.
file:///C:/Users/gurun/Desktop/data.html 263/358
9/16/2020 data.html
Sanfoundry Global Education & Learning Series – Automata Theory.
To practice all areas of Automata Theory, here is complete set of 1000+ Multiple Choice Questions and
Answers.
advertisement
Recommended Posts:
1. Agricultural Engineering Questions and Answers
2. Machine Kinematics Questions and Answers
3. Python Programming Examples on Linked Lists
4. Computer Science Questions and Answers
5. C++ Programming Examples on Combinatorial Problems & Algorithms
6. Machine Tools & Machining Questions and Answers
7. Data Structures & Algorithms II – Questions and Answers
8. C Programming Examples on Bitwise Operations
9. C Programming Examples on Combinatorial Problems & Algorithms
10. Java Programming Examples on Combinatorial Problems & Algorithms
11. C++ Programming Examples on Set & String Problems & Algorithms 12. Probability and Statistics
Questions and Answers
13. Java Programming Examples on Set & String Problems & Algorithms
14. Compilers Questions and Answers
15. C Programming Examples on Set & String Problems & Algorithms
16. Discrete Mathematics Questions and Answers
17. Electromagnetic Theory Questions and Answers
18. Theory of Machines Questions and Answers
19. Network Theory Questions and Answers 20. Automata Theory Questions and Answers
advertisement
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Applications of
NFA”.
Answer: d
Explanation: NFA is said to be closed under the following operations:
a) Union
b) Intersection
c) Concatenation
d) Kleene
e) Negation.
advertisement
2. It is less complex to prove the closure properties over regular languages using:
a) NFA
b) DFA
c) PDA
d) Can’t be saidView Answer
Answer: a
Explanation: None.
Answer: d
Explanation: There are many applications of finite automata, mainly in the field of Compiler Design and
Parsers and Search Engines.
4. John is asked to make an automaton which accepts a given string for all the occurrence of ‘1001’ in it.
How many number of transitions would John use such that, the string processing application works? a) 9
b) 11
c) 12
d) 15
View Answer
Answer: a
Explanation: None.
advertisement
Answer: c
Explanation: Thompson Construction method is used to turn a regular expression in an NFA by fragmenting
the given regular expression through the operations performed on the input alphabets.
6. Which among the following can be an example of application of finite state machine(FSM)?
a) Communication Link
b) Adder
c) Stack
file:///C:/Users/gurun/Desktop/data.html 265/358
9/16/2020 data.html
d) None of the mentionedView Answer
Answer: a
Explanation: Idle is the state when data in form of packets is send and returns if NAK is received else waits
for the NAK to be received.
Answer: d
Explanation: Finite state automation is used in Lexical Analyser, Computer BOT (used in games), State
charts, etc.
advertisement
Answer: a
Explanation: None.
9. 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 saidView Answer
Answer: a
Explanation: None.
10. The total number of states to build the given language using DFA:
L= {w | w has exactly 2 a’s and at least 2 b’s} a) 10
b) 11
c) 12
d) 13
View Answer
Answer: a
Explanation: We need to make the number of a as fixed i.e. 2 and b can be 2 or more. Thus, using this
condition a finite automata can be created using 1 states.
advertisement
file:///C:/Users/gurun/Desktop/data.html 266/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Finite Automata-
Introduction”.
1. Assume the R is a relation on a set A, aRb is partially ordered such that a and b are _____________
a) reflexive
b) transitive
c) symmetric
View Answer
Answer: d
Explanation: A partially ordered relation refers to one which is Reflexive, Transitive and Antisymmetric.
advertisement
2. The non- Kleene Star operation accepts the following string of finite length over set A = {0,1} | where
string s contains even number of 0 and 1 a) 01,0011,010101
b) 0011,11001100
c) ε,0011,11001100
d) ε,0011,11001100
View Answer
Answer: b
Explanation: The Kleene star of A, denoted by A*, is the set of all strings obtained by concatenating zero or
more strings from A.
3. A regular language over an alphabet ∑ is one that cannot be obtained from the basic languages using the
operation
a) Union
b) Concatenation
c) Kleene*
View Answer
Answer: d
Explanation: Union, Intersection, Concatenation, Kleene*, Reverse are all the closure properties of Regular
Language.
4. Statement 1: A Finite automata can be represented graphically; Statement 2: The nodes can be its states;
Statement 3: The edges or arcs can be used for transitions Hint: Nodes and Edges are for trees and forests
too.
View Answer
Answer: d
Explanation: It is possible to represent a finite automaton graphically, with nodes for states, and arcs for
transitions.
5. The minimum number of states required to recognize an octal number divisible by 3 are/is a) 1
b) 3
c) 5
d) 7
View Answer
Answer: b
Explanation: According to the question, minimum of 3 states are required to recognize an octal number
divisible by 3.
advertisement
a) Input alphabet
b) Transition function
c) Initial State
d) Output Alphabet
View Answer
Answer: d
Explanation: A FA can be represented as FA= (Q, ∑, δ, q0, F) where Q=Finite Set of States, ∑=Finite Input
Alphabet, δ=Transition Function, q0=Initial State, F=Final/Acceptance State).
7. If an Infinite language is passed to Machine M, the subsidiary which gives a finite solution to the infinite
input tape is ______________ a) Compiler
b) Interpreter
View Answer
file:///C:/Users/gurun/Desktop/data.html 268/358
9/16/2020 data.html
Answer: a
Explanation: A Compiler is used to give a finite solution to an infinite phenomenon. Example of an infinite
phenomenon is Language C, etc.
8. The number of elements in the set for the Language L={xϵ(∑r) *|length if x is at most 2} and ∑={0,1}
is_________ a) 7
b) 6
c) 8
d) 5
View Answer
Answer: a
9. For the following change of state in FA, which of the following codes is an incorrect option? a) δ (m, 1) =n
b) δ (0, n) =m
c) δ (m,0) =ε
View Answer
Answer: b
Explanation: δ(QX∑) = Q1 is the correct representation of change of state. Here, δ is called the Transition
function.
advertisement
View Answer
Answer: b
Explanation: ∑* represents any combination of the given set while ∑x represents the set of combinations
with length x where x ϵ I.
View Answer
Answer: b
Explanation: Finite automaton with an output is categorize din two parts: Moore M/C and Mealy M/C.
advertisement
b) states
c) Both
View Answer
Answer: b
Explanation: Moore machine produces an output over the change of transition states while mealy machine
does it so for transitions itself.
3. For a give Moore Machine, Given Input=’101010’, thus the output would be of length: a) |Input|+1
b) |Input|
c) |Input-1|
d) Cannot be predicted
View Answer
Answer: a
Explanation: Initial state, from which the operations begin is also initialized with a value.
Statement 2: There are more than 5-Tuples in the definition of Moore Machine.
View Answer
Answer: a
5. The total number of states and transitions required to form a moore machine that will produce residue mod
3. a) 3 and 6
b) 3 and 5
c) 2 and 4
d) 2 and 5
View Answer
Answer: a Explanation:
advertisement
Present State
Q0
Q1
Q2
Q1
Q2
Q2
Q0
a) Q0, Q2, 0
b) Q0, Q2, 1
c) Q1, Q2, 1
file:///C:/Users/gurun/Desktop/data.html 271/358
9/16/2020 data.html
d) Q1, Q0, 0
View Answer
Answer: a
advertisement
Language: A set of strings over ∑= {a, b} is taken as input and it prints 1 as an output “for every occurrence
of a, b as its substring. (INPUT: abaaab) a) 0010001
b) 0101010
c) 0111010
d) 0010000
View Answer
Answer: a
a) δ
b) ∆
c) ∑
View Answer
Answer: b
Explanation: Source-The tuple definition of Moore and mealy machine comprises one new member i.e.
output alphabet as these are finite machines with output.
9. The O/P of Moore machine can be represented in the following format: a) Op(t)=δ(Op(t))
b) Op(t)=δ(Op(t)i(t))
c) Op(t): ∑
View Answer
Answer: a
Explanation: Op(t)=δ(Op(t)) is the defined definition of how the output is received on giving a specific input
to Moore machine.
View Answer
Answer: a
Explanation: Statement a and b is correct while c is false. Finite machines with output have no accepting
states and can be converted within each other.
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Mealy Machine”.
a) State
b) Previous State
d) Only Input
View Answer
Answer: c
advertisement
View Answer
Answer: c
Explanation: Finite Automaton with Output has a common definition for both the categories.
a) 9’s Complement
file:///C:/Users/gurun/Desktop/data.html 273/358
9/16/2020 data.html
b) 2’s Complement
c) 1’s Complement
d) 10’s Complement
View Answer
Answer: b
Explanation: The input can be taken in form of a binary string and can be verified.
4. The O/P of Mealy machine can be represented in the following format: a) Op(t)= δ(Op(t))
b) Op(t)= δ(Op(t)i(t))
c) Op(t): ∑
View Answer
Answer: b
Explanation: The output of mealy machine depends on the present state as well as the input to that state.
advertisement
5.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
View Answer
Answer: a
Explanation: The number of output here follows the transitions in place of states as in Moore machine.
a) Inducers
b) Transducers
c) Turing Machines
View Answer
Answer: b
file:///C:/Users/gurun/Desktop/data.html 274/358
9/16/2020 data.html
a) Output Variations
b) Input Variations
c) Both
View Answer
Answer: a
Explanation: Mealy and Moore machine vary over how the outputs depends on prior one (transitions) and on
the latter one(states).
advertisement
View Answer
Answer: a
Explanation: Being an input dependent and output capable FSM, Mealy machine reacts faster to inputs.
a) 9’s Complement
b) 2’s Complement
c) 1’s Complement
d) 10’s Complement
View Answer
Answer: c
A mealy machine
a) produces a language
file:///C:/Users/gurun/Desktop/data.html 275/358
9/16/2020 data.html
b) produces a grammar
View Answer
Answer: d
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Mealy Machine-
II”.
1. Which of the following does not belong to input alphabet if S={a, b}* for any language? a) a
b) b
c) e
View Answer
Answer: c
Explanation: The automaton may be allowed to change its state without reading the input symbol using
epsilon but this does not mean that epsilon has become an input symbol. On the contrary, one assumes that
the symbol epsilon does not belong to any alphabet.
advertisement
2. The number of final states we need as per the given language? Language L: {an| n is even or divisible by
3} a) 1
b) 2
c) 3
d)View Answer 4
Answer: b
Explanation:
a) Quadruple
b) Quintuple
file:///C:/Users/gurun/Desktop/data.html 276/358
9/16/2020 data.html
c) Triple
View Answer
Answer: b
Statement: Both NFA and e-NFA recognize exactly the same languages. a) true
b) false
View Answer
Answer: a
Explanation: e-NFA do come up with a convenient feature but nothing new.They do not extend the class of
languages that can be represented.
advertisement
Which of the following methods can be used to simulate the same. a) e-NFA
View Answer
Answer: c
Explanation: It is more convenient to simulate a machine using e-NFA else the method of Power
Construction is used from the union-closure of DFA’s.
c) {f1, f2}
View Answer
Answer: b
file:///C:/Users/gurun/Desktop/data.html 277/358
9/16/2020 data.html
Explanation: The epsilon closure of the set q is the set that contains q, together with all the states which can
be reached starting at q by following only epsilon transitions.
a) 0
b) 1
c) 2
d) 3
View Answer
Answer: c
Explanation: The epsilon closure set of f2 consist of the elements:{f2, f3}. Thus the count of the element in
the closure set is 2.
advertisement
8. Which of the steps are non useful while eliminating the e-transitions for the given diagram?
b) Add an arc a to f1 labelled a if there is an arc labelled a in N from some state in ECLOSE(a) to f1c)
Delete all arcs labelled as e
View Answer
Answer: d
Explanation: The given are the steps followed while eliminating epsilon transitions from a NFA or
converting an e-NFA to just NFA.
9. Is the language preserved in all the steps while eliminating epsilon transitions from a NFA? a) yes
b) no
View Answer
Answer: a
Explanation: Yes, the language is preserved during the dteps of construction: L(N)=L(N1)=L(N2)=L(3).
10. Remove all the epsilon transitions in the given diagram and compute the number of a-transitions in the
result?
a) 5
b) 7
file:///C:/Users/gurun/Desktop/data.html 278/358
9/16/2020 data.html
c) 9
d) 6
View Answer
Answer: b
Explanation:
Automata Theory Questions and Answers – Deterministic Finite Automata-Introduction and Definition
This set of Automata Theory Interview Questions and Answers focuses on “Deterministic Finite Automata-
Introduction and Definition”.
View Answer
Answer: b
Explanation: Bounded information refers to one whose output is limited and it cannot be said what were the
recorded outputs previously until memorized.
advertisement
a) Regular Language
b) Non-Regular Language
c) May be Regular
d) Cannot be said
View Answer
Answer: b
Explanation: A language for which there is no existence of a deterministic finite automata is always Non
Regular and methods like Pumping Lemma can be used to prove the same.
a) Transition graph
b) Transition Table
file:///C:/Users/gurun/Desktop/data.html 279/358
9/16/2020 data.html
c) C code
View Answer
Answer: d
Explanation: A DFA can be represented in the following formats: Transition Graph, Transition Table,
Transition tree/forest/Any programming Language.
View Answer
Answer: a
Explanation: Strings such as {1101,101,10101} are being accepted while {1001,11001} are not. Thus, this
conclusion leads to option a.
advertisement
View Answer
Answer: c
Explanation: Two states are said to be equivalent if and only if they have same number of states as well as
transitions.
d) Insufficient Data
file:///C:/Users/gurun/Desktop/data.html 280/358
9/16/2020 data.html
View Answer
Answer: c
Explanation: The figure represents the initial as well as the final state with an iteration of x.
a) ababaabaa
b) abbbaa
c) abbbaabb
d) abbaabbaa
View Answer
Answer: a
Explanation: All the Strings are getting accepted except ‘ababaabaa’ as it is directed to dumping state.
advertisement
a) ε
b) 11010
c) 10001010
View Answer
Answer: a
Explanation: As the initial state is not made an acceptance state, thus ε will not be accepted by the given
DFA. For the automata to accept ε as an entity, one should make the initial state as also the final state.
a) Yes
b) No
d) Can’t be determined
View Answer
Answer: b
file:///C:/Users/gurun/Desktop/data.html 281/358
9/16/2020 data.html
Explanation: Language to accept a palindrome number or string will be non-regular and thus, its DFA cannot
be obtained. Though, PDA is possible.
10. Which of the following is not an example of finite state machine system?
b) Combinational Locks
c) Traffic Lights
d) Digital Watches
View Answer
Answer: d
Explanation: Proper and sequential combination of events leads the machines to work in hand which includes
The elevator, Combinational Locks, Traffic Lights, vending machine, etc. Other applications of Finite
machine state system are Communication Protocol Design, Artificial Intelligence Research, A Turnstile, etc.
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “DFA Processing
Strings”.
1. The password to the admins account=”administrator”. The total number of states required to make a
password-pass system using DFA would be __________ a) 14 states
b) 13 states
c) 12 states
View Answer
Answer: a
Explanation: For a string of n characters with no repetitive substrings, the number of states required to pass
the string is n+1.
advertisement
View Answer
file:///C:/Users/gurun/Desktop/data.html 282/358
9/16/2020 data.html
Answer: b
Explanation: The Language can be anonymously checked and thus the answer can be predicted. The
language needs to be accepted by the automata (acceptance state) in order to prove its regularity.
3. Let ∑= {a, b, …. z} and A = {Hello, World}, B= {Input, Output}, then (A*∩B) U (B*∩A) can be
represented as:
b) {Hello, World, ε}
c) {Input, Output, ε}
d) {}
View Answer
Answer: d
Explanation: Union operation creates the universal set by combining all the elements of first and second set
while intersection operation creates a set of common elements of the first and the second state.
4. Let the given DFA consist of x states. Find x-y such that y is the number of states on minimization of
DFA?
a) 3
b) 2
c) 1
d) 4
View Answer
Answer: b
Explanation: Use the equivalence theorem or Myphill Nerode theorem to minimize the DFA.
advertisement
5. For a machine to surpass all the letters of alphabet excluding vowels, how many number of states in DFA
would be required? a) 3
b) 2
c) 22
d) 27
View Answer
Answer: a
Explanation:
file:///C:/Users/gurun/Desktop/data.html 283/358
9/16/2020 data.html
View Answer
Answer: d
Explanation: The string a state receives is the combination of all input alphabets which lie across the path
covered.
Which of the following property satisfy the regularity of the given language? a) Regularity is dependent upon
the length of the string
View Answer
Answer: b
Explanation: DFA can be made for infinite language with an infinite length. Thus, dependency over length is
unfruitful.
advertisement
8. Given:
L= {xϵ∑= {0,1} |x=0n1n for n>=1}; Can there be a DFA possible for the language? a) Yes
b) No
View Answer
Answer: b
Explanation: It is not possible to have a count of equal number of 0 and 1 at any instant in DFA. Thus, It is
not possible to build a DFA for the given Language.
file:///C:/Users/gurun/Desktop/data.html 284/358
9/16/2020 data.html
b) C
c) B
d) Invalid String
View Answer
Answer: a
Explanation: It is east and simple to create the table and then the corresponding transition graph in order to
get the result, at which state the given string would be accepted.
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Simpler
Notations”.
1.Given Language: L= {xϵ∑= {a, b} |x has a substring ‘aa’ in the production}. Which of the corresponding
representation notate the same? a)
advertisement b)
c)
d)
View Answer
Answer: a
Explanation: The states transited has been written corresponding to the transitions as per the row and column.
The row represents the transitions made and the ultimate.
2.Let u=’1101’, v=’0001’, then uv=11010001 and vu= 00011101.Using the given information what is the
identity element for the string? a) u-1
b) v-1
c) u-1v-1
d) ε
View Answer
Answer: d
file:///C:/Users/gurun/Desktop/data.html 285/358
9/16/2020 data.html
Explanation: Identity relation: εw = wε = w, thus the one satisfying the given relation will be the identity
element.
advertisement
a) 0101011
b) 0101010
c) 010100
d) 100001
View Answer
Answer: c
Explanation: The given DFA notation accepts the string of even length and prefix ‘01’.
4.Predict the following step in the given bunch of steps which accepts a strings which is of even length and
has a prefix=’01’
δ (q0, ε) =q0 < δ(q0,0) =δ (δ (q0, ε),0) =δ(q0,0) =q1 < _______________ a) δ (q0, 011) =δ (δ (q0,1), 1) =δ
(q2, 1) =q3
View Answer
Answer: b
Explanation: Here, δ refers to transition function and results into new state or function when an transition is
performed over its state.
Language L= {xϵ∑= {0,1} |x accepts all the binary strings not divisible by 3}
a) Q0
b) Q1
c) Q2
d) No Transition
View Answer
Answer: Q1
file:///C:/Users/gurun/Desktop/data.html 286/358
9/16/2020 data.html
Explanation: The tabular representation of DFA is quite readable and can be used to some ore complex
problems. Here, we need to form the transition graph and fill up the given blank.
6.Which among the following is the missing transition in the given DFA? L= {xϵ∑= {a, b} | x starts with a
and ends with b}
a) δ (q0, a) =q0
b) δ (F, a) =q1
c) δ (F, a) =D
d) δ (q1, a) =D
View Answer
Answer: b
Explanation: For the given Language, the transition missing is δ (F, a) =q1.
advertisement
7.The complement of a language will only be defined when and only when the __________ over the
language is defined. a) String
b) Word
c) Alphabet
d) Grammar
View Answer
Answer: c
Explanation: It is not possible to define the complement of a language without defining the input alphabets.
Example: A language which does not consist of substring ‘ab’ while the complement would be the language
which does contain a substring ‘ab’.
a) Palindrome
b) Reverse
c) Factorial
d) L={ab}*
View Answer
Answer: Factorial
Explanation: Factorial, here is the most appropriate non-infinite domain. Otherwise, palindrome and reverse
have infinite domains.
9.Which among the following states would be notated as the final state/acceptance state? L= {xϵ∑= {a, b} |
length of x is 2}
file:///C:/Users/gurun/Desktop/data.html 287/358
9/16/2020 data.html
a) q1
b) q2
c) q1, q2
d) q3
View Answer
Answer: b
Explanation: According to the given language, q2 Is to become the final/acceptance state in order to satisfy.
10.Which of the following are the final states in the given DFA according to the Language given.?
a) q0, q1
b) q0, q2
c) q1, q2
d) q0, q1, q2
View Answer
Answer: d
Explanation: According to the given language, the length is at most 2, thus the answer is found accordingly.
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “The Language of
DFA”
a) countably infinite
b) countably finite
c) uncountable finite
d) uncountable infinite
View Answer
Answer: d
Explanation: A language over an alphabet R is a set of strings over A which is uncountable and infinite.
advertisement
file:///C:/Users/gurun/Desktop/data.html 288/358
9/16/2020 data.html
2. According to the 5-tuple representation i.e. FA= {Q, ∑, δ, q, F}
View Answer
Answer: b
Explanation: Q is the Finite set of states, whose elements i.e. the states constitute the finite automata.
View Answer
Answer: a
Explanation: δ or the Transition function describes the best, how a DFA behaves on a string where to transit
next, which direction to take.
4. Which of the following option is correct? A= {{abc, aaba}. {ε, a, bb}} a) abcbb ₵ A
b) ε₵A
d) abca ₵ A
View Answer
Answer: b
Explanation: As the question has dot operation, ε will not be a part of the concatenated set. Had it been a
union operation, ε would be a part of the operated set.
advertisement
5. For a DFA accepting binary numbers whose decimal equivalent is divisible by 4, what are all the possible
remainders? a) 0
b) 0,2
c) 0,2,4
d) 0,1,2,3
file:///C:/Users/gurun/Desktop/data.html 289/358
9/16/2020 data.html
View Answer
Answer: d
Explanation: All the decimal numbers on division would lead to only 4 remainders i.e. 0,1,2,3 (Property of
Decimal division).
6. Which of the following x is accepted by the given DFA (x is a binary string ∑= {0,1})?
a) divisible by 3
b) divisible by 2
c) divisible by 2 and 3
d) divisible by 3 and 2
View Answer
Answer: d
Explanation: The given DFA accepts all the binary strings such that they are divisible by 3 and 2.Thus, it can
be said that it also accepts all the strings which is divisible by 6.
7. Given:
L2= {xϵ ∑*|x contains odd no’s of 1’s} No of final states in Language L1 U L2? a) 1
b) 2
c) 3
d) 4
View Answer
Answer: c Explanation:
advertisement
8. The maximum number of transition which can be performed over a state in a DFA? ∑= {a, b, c} a) 1
b) 2
c) 3
d) 4
View Answer
Answer: c
Explanation: The maximum number of transitions which a DFA allows for a language is the number of
elements the transitions constitute.
file:///C:/Users/gurun/Desktop/data.html 290/358
9/16/2020 data.html
9. 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
View Answer
Answer: d
Explanation: The out degree for a DFA I fixed while the in degree depends on the number of states in the
DFA and that cannot be determined without the dependence over the Language.
10. The sum of minimum and maximum number of final states for a DFA n states is equal to: a) n+1
b) n
c) n-1
d) n+2
View Answer
Answer: a
Explanation: The maximum number of final states for a DFA can be total number of states itself and
minimum would always be 1, as no DFA exits without a final state. Therefore, the solution is n+1.
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular Language
& Expression”.
a) 4
b) 5
c) 6
d) unlimited
View Answer
Answer:b
advertisement
a) Σ * Q -> Σ
file:///C:/Users/gurun/Desktop/data.html 291/358
9/16/2020 data.html
b) Q * Q -> Σ
c) Σ * Σ -> Q
d) Q * Σ -> Q
View Answer
Answer:d
b) 2
c) 1
d) can’t be represented.
View Answer
Answer:a
a) Q * Σ* -> Q
b) Q * Σ -> Q
c) Q* * Σ* -> Σ
d) Q * Σ -> Σ
View Answer
Answer:a
Explanation: This takes single state and string of input to produce a state.
5. δ*(q,ya) is equivalent to .
a) δ((q,y),a)
b) δ(δ*(q,y),a)
c) δ(q,ya)
View Answer
Answer:b
file:///C:/Users/gurun/Desktop/data.html 292/358
9/16/2020 data.html
a) δ*(q,x) E A
b) δ(q,x) E A
c) δ*(Q0,x) E A
d) δ(Q0,x) E A
View Answer
Answer:c
Explanation: If automata starts with starting state and after finite moves if reaches to final step then it called
accepted.
advertisement
7. Languages of a automata is
a) If it is accepted by automata
b) If it halts
View Answer
Answer:a
a) Type 0
b) Type 1
c) Type 2
d) Type 3
View Answer
Answer:d
a) 1
b) 0
c) 2
View Answer
file:///C:/Users/gurun/Desktop/data.html 293/358
9/16/2020 data.html
Answer:b
a) 1
b) 2
c) 3
View Answer
Answer:d
11. Regular expression for all strings starts with ab and ends with bba is.
a) aba*b*bba
b) ab(ab)*bba
c) ab(a+b)*bba
View Answer
Answer:c
Explanation: Starts with ab then any number of a or b and ends with bba.
12. How many DFA’s exits with two states over input alphabet {0,1} ?
a) 16
b) 26
c) 32
d) 64
View Answer
Answer:d
advertisement
file:///C:/Users/gurun/Desktop/data.html 294/358
9/16/2020 data.html
c) It sometimes fails to recognize regular grammar.
View Answer
Answer:a
14. Number of states require to simulate a computer with memory capable of storing ‘3’ words each of length
‘8’. a) 3 * 28
b) 2(3*8)
c) 2(3+8)
View Answer
Answer:b
15. FSM with output capability can be used to add two given integer in binary representation. This is a) True
b) False
c) May be true
View Answer
Answer:a
Automata Theory Questions and Answers – Non Deterministic Finite Automata – Introduction
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Non Deterministic
Finite Automata – Introduction”
Statement 2: The final state of DFA will be every combination of final state of NFA. a) Statement 1 is true
and Statement 2 is true
View Answer
file:///C:/Users/gurun/Desktop/data.html 295/358
9/16/2020 data.html
Answer: a
advertisement
If X is the minimum number of states for a DFA and Y is the number of states to construct the NFA, |X-Y|=?
a) 2
b) 3
c) 4
d) 1
View Answer
Answer: a
Explanation: Construct the DFA and NFA individually, and the attain the difference of states.
3. An automaton that presents output based on previous state or current input: a) Acceptor
b) Classifier
c) Transducer
View Answer
Answer: c
Explanation: A transducer is an automaton that produces an output on the basis of what input has been given
currently or previous state.
4. If NFA of 6 states excluding the initial state is converted into DFA, maximum possible number of states
for the DFA is ? a) 64
b) 32
c) 128
d) 127
View Answer
Answer: c
Explanation: The maximum number of sets for DFA converted from NFA would be not greater than 2n.
View Answer
Answer: b
Explanation: Non deterministic or deterministic depends upon the definite path defined for the transition
from one state to another or undefined(multiple paths).
advertisement
View Answer
Answer: b
Find the difference of transitions made in constructing a DFA and an equivalent NFA? a) 2
b) 3
c) 4
d) Cannot be determined.
View Answer
Answer: a
Explanation: The individual Transition graphs can be made and the difference of transitions can be
determined.
8. The construction time for DFA from an equivalent NFA (m number of node)is: a) O(m2)
b) O(2m)
c) O(m)
d) O(log m)
View Answer
Answer: b
file:///C:/Users/gurun/Desktop/data.html 297/358
9/16/2020 data.html
Explanation: From the coded NFA-DFA conversion.
9. If n is the length of Input string and m is the number of nodes, the running time of DFA is x that of
NFA.Find x? a) 1/m2
b) 2m
c) 1/m
d) log m
View Answer
Answer: a
Explanation: Running time of DFA: O(n) and Running time of NFA =O(m2n).
advertisement
a) NFA is slower to process and its representation uses more memory than DFA
b) DFA is faster to process and its representation uses less memory than NFA
c) NFA is slower to process and its representation uses less memory than DFA
d) DFA is slower to process and its representation uses less memory than NFA
View Answer
Answer: c
Explanation: NFA, while computing strings, take parallel paths, make different copies of input and goes
along different paths in order to search for the result. This creates the difference in processing speed of DFA
and NFA.
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Extended
Transition Function”.
b) 6
c) 7
d) 4
View Answer
Answer: a
Explanation: For NFA or extended transition function on NFA, the tuple elements remains same i.e. 5.
file:///C:/Users/gurun/Desktop/data.html 298/358
9/16/2020 data.html
advertisement
Statement: The DFA shown represents all strings which has 1 at second last position.
a) Correct
c) Wrong proposition
d) May be correct
View Answer
Answer: c
View Answer
Answer: c
4. If δ is the transition function for a given NFA, then we define the δ’ for the DFA accepting the same
language would be:
View Answer
Answer: a
5. What is the relation between DFA and NFA on the basis of computational power? a) DFA > NFA
d) Can’t be said
View Answer
Answer: c
Explanation: DFA is said to be a specific case of NFA and for every NFA that exists for a given language, an
equivalent DFA also exists.
advertisement
6. If a string S is accepted by a finite state automaton, S=s1s2s3……sn where siϵ∑ and there exists a
sequence of states r0, r1, r2…… rn such that δ(r(i), si+1) =ri+1 for each 0, 1, …n-1, then r(n) is: a) initial
state
b) transition symbol
c) accepting state
d) intermediate state
View Answer
Answer: c
Explanation: r(n) is the final state and accepts the string S after the string being traversed through r(i) other
states where I ϵ 01,2…(n-2).
7. According to the given table, compute the number of transitions with 1 as its symbol but not 0:
a) 4
b) 3
c) 2
d) 1
View Answer
Answer: d
Explanation: The transition graph is made and thus the answer can be found.
a) {q0}
c) {q2, q1}
file:///C:/Users/gurun/Desktop/data.html 300/358
9/16/2020 data.html
View Answer
Answer: b
a) 6
b) 5
c) 4
d) 7
View Answer
Answer: a
Explanation: According to the question, presence of q2 or q1 would count so it does and the answer
according to the diagram is 6.
1.Δ(Q0, ε) ={Q0},
advertisement
b) {Q0, Q1}
c) {Q0, Q2}
d) {Q1, Q2}
View Answer
Answer: c
Explanation: According to given table and extended transition state implementation, we can find the state at
which it rests.
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “The Language of
NFA”.
d) ε-NFA to NFA
View Answer
Answer: a
Explanation: The conversion of a non-deterministic automata into a deterministic one is a process we call
subset construction or power set construction.
advertisement
2. Given Language:
Ln= {xϵ {0,1} * | |x|≥n, nth symbol from the right in x is 1} How many state are required to execute L3 using
NFA? a) 16
b) 15
c) 8
d) 7
View Answer
Answer: b
Explanation: The finite automaton for the given language is made and thus, the answer can be obtained.
View Answer
Answer: c
Explanation: The given diagram can be analysed and thus the option can be seeked.
4. The number of transitions required to convert the following into equivalents DFA:
a) 2
b) 3
c) 1
file:///C:/Users/gurun/Desktop/data.html 302/358
9/16/2020 data.html
d) 0
View Answer
Answer: a Explanation:
advertisement
a) Accepted by NFA
b) Rejected by NFA
d) Cannot be said
View Answer
Answer: a
a) ACCEPT
b) REJECT
c) DISTINCT
d) START
View Answer
Answer: b
Explanation: REJECT state will be like a halting state which rejects a particular invalid input.
a) TRUE
b) FALSE
c) May be true
d) Cannot be said
View Answer
Answer: a
Explanation: We can represent one language in more one FSMs, example for a same language we have a
DFA and an equivalent NFA.
advertisement
file:///C:/Users/gurun/Desktop/data.html 303/358
9/16/2020 data.html
8. The production of form non-terminal -> ε is called:
a) Sigma Production
b) Null Production
c) Epsilon Production
View Answer
Answer: b
c) Palindrome string
View Answer
Answer: d
Explanation: DFSM’s for the first three option is not possible; hence they aren’t regular.
10. Which of the following recognizes the same formal language as of DFA and NFA? a) Power set
Construction
b) Subset Construction
c) Robin-Scott Construction
View Answer
Answer: d
Explanation: All the three option refers to same technique if distinguishing similar constructions for different
type of automata.
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Equivalence of
NFA and DFA”.
a) Negation
b) Kleene
file:///C:/Users/gurun/Desktop/data.html 304/358
9/16/2020 data.html
c) Concatenation
View Answer
Answer: d
b) Intersection
c) Concatenation
d) Kleene
e) Negation
advertisement
2. It is less complex to prove the closure properties over regular languages using a) NFA
b) DFA
c) PDA
d) Can’t be said
View Answer
Answer: a
Explanation: We use the construction method to prove the validity of closure properties of regular languages.
Thus, it can be observe, how tedious and complex is the construction of a DFA as compared to an NFA with
respect to space.
a) Compiler Design
b) Grammar Parsers
c) Text Search
View Answer
Answer: d
Explanation: There are many applications of finite automata, mainly in the field of Compiler Design and
Parsers and Search Engines.
4. John is asked to make an automaton which accepts a given string for all the occurrence of ‘1001’ in it.
How many number of transitions would John use such that, the string processing application works? a) 9
b) 11
c) 12
file:///C:/Users/gurun/Desktop/data.html 305/358
9/16/2020 data.html
d) 15
View Answer
Answer: a Explanation:
advertisement
View Answer
Answer: c
Explanation: Thompson Construction method is used to turn a regular expression in an NFA by fragmenting
the given regular expression through the operations performed on the input alphabets.
6. Which among the following can be an example of application of finite state machine(FSM)? a)
Communication Link
b) Adder
c) Stack
View Answer
Answer: a
Explanation: Idle is the state when data in form of packets is send and returns if NAK is received else waits
for the NAK to be received.
a) Lexical Analyser
b) BOT
c) State charts
View Answer
Answer: d
Explanation: Finite state automation is used in Lexical Analyser, Computer BOT (used in games), State
charts, etc.
file:///C:/Users/gurun/Desktop/data.html 306/358
9/16/2020 data.html
advertisement
Given ∑= {t, r}, The difference of the minimum number of states required to form L1 and L2? a) 0
b) 1
c) 2
d) Cannot be said
View Answer
Answer: a
Explanation:
9. 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
View Answer
Answer: a
Explanation:
10. The total number of states to build the given language using DFA: L= {w | w has exactly 2 a’s and at
least 2 b’s} a) 10
b) 11
c) 12
d) 13
View Answer
Answer: a
Explanation: We need to make the number of a as fixed i.e. 2 and b can be 2 or more. Thus, using this
condition a finite automata can be created using 1 states.
file:///C:/Users/gurun/Desktop/data.html 307/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Applications of
DFA”.
The total number of final states to be assumed in order to pass the number constituting {0, 1} is a) 0
b) 1
c) 2
d) 3
View Answer
Answer: c
Explanation: The DFA for the given language can be constructed as follows:
advertisement
a) 100
b) 1000
c) 1100
d) 0011
View Answer
Answer: a
Explanation: If the string is divisible by four, it surely ends with the substring ‘100’ while a binary string
divisible by 2 would surely end with the substring ‘10’.
3. Let L be a language whose FA consist of 5 acceptance states and 11 non final states. It further consists of a
dumping state. Predict the number of acceptance states in Lc. a) 16
b) 11
c) 5
d) 6
View Answer
Answer: a
Explanation: If L leads to FA1, then for Lc, the FA can be obtained by exchanging the final and nonfinal
states.
b) L1 – L2
file:///C:/Users/gurun/Desktop/data.html 308/358
9/16/2020 data.html
c) L1 ∩ L2
View Answer
Answer: d
Explanation: It the closure property of Regular language which lays down the following statement:
If L1, L2 are 2- regular languages, then L1 U L2, L1 ∩ L2, L1C, L1 – L2 are regular language.
advertisement
5. Predict the analogous operation for the given language: A: {[p, q] | p ϵ A1, q does not belong to A2} a)
A1-A2
b) A2-A1
c) A1.A2
d) A1+A2
View Answer
Answer: a
Explanation: When set operation ‘-‘ is performed between two sets, it points to those values of prior set
which belongs to it but not to the latter set analogous to basic subtraction operation.
6. Which among the following NFA’s is correct corresponding to the given Language? L= {xϵ {0, 1} | 3rd bit
from right is 0} a)
b)
c)
View Answer
Answer: a
Explanation: The NFA accepts all binary strings such that the third bit from right end is 1 and if not, is send
to Dumping state. Note: It is assumed that the input is given from the right end bit by bit.
Which among the following options are most appropriate? a) Statement 1 is true while 2 is not
file:///C:/Users/gurun/Desktop/data.html 309/358
9/16/2020 data.html
c) Statement 1 and 2, both are true
View Answer
Answer: c
Explanation: While the machine runs on some input string, if it has the choice to split, it goes in all possible
way and each one is different copy of the machine. The machine takes subsequent choice to split further
giving rise to more copies of the machine getting each copy run parallel. If any one copy of the machine
accepts the strings, then NFA accepts, otherwise it rejects.
advertisement
Statement: If K is the number of states in NFA, the DFA simulating the same language would have states less
than 2k. a) True
b) False
View Answer
Answer: a
Explanation: If K is the number of states in NFA, the DFA simulating the same language would have states
equal to or less than 2k.
9. Let N (Q, ∑, δ, q0, A) be the NFA recognizing a language L. Then for a DFA (Q’, ∑, δ’, q0’, A’), which
among the following is true? a) Q’ = P(Q)
c) Q’={q0}
View Answer
Answer: d
Explanation: All the optioned mentioned are the instruction formats of how to convert a NFA to a DFA.
10. There exists an initial state, 17 transition states, 7 final states and one dumping state, Predict the
maximum number of states in its equivalent DFA? a) 226
b) 224
c) 225
d) 223
View Answer
Answer: a
Explanation: The maximum number of states an equivalent DFA can comprise for its respective NFA with k
states will be 2k.
file:///C:/Users/gurun/Desktop/data.html 310/358
9/16/2020 data.html
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Applications of
NFA”.
a) Negation
b) Kleene
c) Concatenation
View Answer
Answer: d
b) Intersection
c) Concatenation
d) Kleene
e) Negation.
advertisement
2. It is less complex to prove the closure properties over regular languages using: a) NFA
b) DFA
c) PDA
d) Can’t be said
View Answer
Answer: a
Explanation: None.
a) Compiler Design
b) Grammar Parsers
c) Text Search
View Answer
Answer: d
file:///C:/Users/gurun/Desktop/data.html 311/358
9/16/2020 data.html
Explanation: There are many applications of finite automata, mainly in the field of Compiler Design and
Parsers and Search Engines.
4. John is asked to make an automaton which accepts a given string for all the occurrence of ‘1001’ in it.
How many number of transitions would John use such that, the string processing application works? a) 9
b) 11
c) 12
d) 15
View Answer
advertisement
View Answer
Answer: c
Explanation: Thompson Construction method is used to turn a regular expression in an NFA by fragmenting
the given regular expression through the operations performed on the input alphabets.
6. Which among the following can be an example of application of finite state machine(FSM)? a)
Communication Link
b) Adder
c) Stack
View Answer
Answer: a
Explanation: Idle is the state when data in form of packets is send and returns if NAK is received else waits
for the NAK to be received.
a) Lexical Analyser
b) BOT
c) State charts
Answer: d
Explanation: Finite state automation is used in Lexical Analyser, Computer BOT (used in games), State
charts, etc.
advertisement
Given ∑= {t, r}, The difference of the minimum number of states required to form L1 and L2? a) 0
b) 1
c) 2
d) Cannot be said
View Answer
Answer: a
Explanation: None.
9. 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
View Answer
Answer: a
Explanation: None.
10. The total number of states to build the given language using DFA: L= {w | w has exactly 2 a’s and at
least 2 b’s} a) 10
b) 11
c) 12
d) 13
View Answer
Answer: a
Explanation: We need to make the number of a as fixed i.e. 2 and b can be 2 or more. Thus, using this
condition a finite automata can be created using 1 states.
file:///C:/Users/gurun/Desktop/data.html 313/358
9/16/2020 data.html
b) 5
c) 6
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular Language
& Expression”.
d) unlimited
View Answer
Answer:b
a) Σ * Q -> Σ
b) Q * Q -> Σ
c) Σ * Σ -> Q
Answer:d
a) 3
b) 2
c) 1
d) can’t be represented.
View Answer
Answer:a
a) Q * Σ* -> Q
b) Q * Σ -> Q
c) Q* * Σ* -> Σ
Answer:a
file:///C:/Users/gurun/Desktop/data.html 314/358
9/16/2020 data.html
Explanation: This takes single state and string of input to produce a state.
5. δ*(q,ya) is equivalent to .
a) δ((q,y),a)
b) δ(δ*(q,y),a)
c) δ(q,ya)
Answer:b
a) δ*(q,x) E A
b) δ(q,x) E A
c) δ*(Q0,x) E A
d) δ(Q0,x) E A
View Answer
Answer:c
Explanation: If automata starts with starting state and after finite moves if reaches to final step then it called
accepted.
7. Languages of a automata is
a) If it is accepted by automata
b) If it halts
Answer:a
a) Type 0
b) Type 1
c) Type 2
d) Type 3
View Answer
Answer:d
file:///C:/Users/gurun/Desktop/data.html 315/358
9/16/2020 data.html
Explanation: According to Chomsky classification.
b) 0
c) 2
Answer:b
a) 1
b) 2
c) 3
Answer:d
11. Regular expression for all strings starts with ab and ends with bba is.
a) aba*b*bba
b) ab(ab)*bba
c) ab(a+b)*bba
Answer:c
Explanation: Starts with ab then any number of a or b and ends with bba.
12. How many DFA’s exits with two states over input alphabet {0,1} ?
a) 16
b) 26
c) 32
d) 64View Answer
Answer:d
file:///C:/Users/gurun/Desktop/data.html 316/358
9/16/2020 data.html
b) It sometimes recognize grammar that are not regular.
View Answer
Answer:a
14. Number of states require to simulate a computer with memory capable of storing ‘3’ words each of length
‘8’.
a) 3 * 2^8
b) 2^(3*8)
c) 2^(3+8)
Answer:b
15. FSM with output capability can be used to add two given integer in binary representation. This is a) True
b) False
c) May be true
Answer:a
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “The Language of
DFA”
a) countably infinite
b) countably finite
c) uncountable finite
Answer: d
Explanation: A language over an alphabet R is a set of strings over A which is uncountable and infinite.
file:///C:/Users/gurun/Desktop/data.html 317/358
9/16/2020 data.html
Statement 1: q ϵ Q’; Statement 2: FϵQ
Answer: b
Explanation: Q is the Finite set of states, whose elements i.e. the states constitute the finite automata.
Answer: a
Explanation: δ or the Transition function describes the best, how a DFA behaves on a string where to transit
next, which direction to take.
4. Which of the following option is correct? A= {{abc, aaba}. {ε, a, bb}} a) abcbb ₵ A
b) ε₵A
Answer: b
Explanation: As the question has dot operation, ε will not be a part of the concatenated set. Had it been a
union operation, ε would be a part of the operated set.
5. For a DFA accepting binary numbers whose decimal equivalent is divisible by 4, what are all the possible
remainders? a) 0
b) 0,2
c) 0,2,4
d) 0,1,2,3View Answer
Answer: d
Explanation: All the decimal numbers on division would lead to only 4 remainders i.e. 0,1,2,3 (Property of
Decimal division).
6. Which of the following x is accepted by the given DFA (x is a binary string ∑= {0,1})?
file:///C:/Users/gurun/Desktop/data.html 318/358
9/16/2020 data.html
a) divisible by 3
b) divisible by 2
c) divisible by 2 and 3
Answer: d
Explanation: The given DFA accepts all the binary strings such that they are divisible by 3 and 2.Thus, it can
be said that it also accepts all the strings which is divisible by 6.
7. Given:
L1= {xϵ ∑*|x contains even no’s of 0’s} L2= {xϵ ∑*|x contains odd no’s of 1’s} No of final states in
Language L1 U L2? a) 1
b) 2
c) 3
d) 4
View Answer
Answer: c
Explanation:
8. The maximum number of transition which can be performed over a state in a DFA? ∑= {a, b, c} a) 1
b) 2
c) 3
d) 4
View Answer
Answer: c
Explanation: The maximum number of transitions which a DFA allows for a language is the number of
elements the transitions constitute.
9. 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
Answer: d
Explanation: The out degree for a DFA I fixed while the in degree depends on the number of states in the
DFA and that cannot be determined without the dependence over the Language.
file:///C:/Users/gurun/Desktop/data.html 319/358
9/16/2020 data.html
10. The sum of minimum and maximum number of final states for a DFA n states is equal to: a) n+1
b) n
c) n-1
d) n+2View Answer
Answer: a
Explanation: The maximum number of final states for a DFA can be total number of states itself and
minimum would always be 1, as no DFA exits without a final state. Therefore, the solution is n+1
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Non Deterministic
Finite Automata-Introduction”
Statement 2: The final state of DFA will be every combination of final state of NFA. a) Statement 1 is true
and Statement 2 is true
Answer: a
If X is the minimum number of states for a DFA and Y is the number of states to construct the
NFA, |X-Y|=? a) 2
b) 3
c) 4
d) 1
View Answer
Answer: a
Explanation: Construct the DFA and NFA individually, and the attain the difference of states.
3. An automaton that presents output based on previous state or current input: a) Acceptor
b) Classifier
c) Transducer
Explanation: A transducer is an automaton that produces an output on the basis of what input has been given
currently or previous state.
4. If NFA of 6 states excluding the initial state is converted into DFA, maximum possible number of states
for the DFA is ? a) 64
b) 32
c) 128
d) 127View Answer
Answer: c
Explanation: The maximum number of sets for DFA converted from NFA would be not greater than 2n.
Answer: b
Explanation: Non deterministic or deterministic depends upon the definite path defined for the transition
from one state to another or undefined(multiple paths).
Answer: b
Find the difference of transitions made in constructing a DFA and an equivalent NFA? a) 2
b) 3
c) 4
Explanation: The individual Transition graphs can be made and the difference of transitions can be
determined.
8. The construction time for DFA from an equivalent NFA (m number of node)is: a) O(m2)
b) O(2m)
c) O(m)
Answer: b
9. If n is the length of Input string and m is the number of nodes, the running time of DFA is x
b) 2m
c) 1/m
Answer: a
Explanation: Running time of DFA: O(n) and Running time of NFA =O(m2n).
a) NFA is slower to process and its representation uses more memory than DFA
b) DFA is faster to process and its representation uses less memory than NFA
c) NFA is slower to process and its representation uses less memory than DFA
d) DFA is slower to process and its representation uses less memory than NFAView Answer
Answer: c
Explanation: NFA, while computing strings, take parallel paths, make different copies of input and goes
along different paths in order to search for the result. This creates the difference in processing speed of DFA
and NFA
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Simpler
Notations”.
1.Given Language: L= {xϵ∑= {a, b} |x has a substring ‘aa’ in the production}. Which of the corresponding
representation notate the same?
a)
b)
file:///C:/Users/gurun/Desktop/data.html 322/358
9/16/2020 data.html
c)
d)
View Answer
Answer: a
Explanation: The states transited has been written corresponding to the transitions as per the row and column.
The row represents the transitions made and the ultimate.
2.Let u=’1101’, v=’0001’, then uv=11010001 and vu= 00011101.Using the given information what is the
identity element for the string? a) u-1
b) v-1
c) u-1v-1
d) ε
View Answer
Answer: d
Explanation: Identity relation: εw = wε = w, thus the one satisfying the given relation will be the identity
element.
a) 0101011
b) 0101010
c) 010100
d) 100001
View Answer
Answer: c
Explanation: The given DFA notation accepts the string of even length and prefix ‘01’.
4.Predict the following step in the given bunch of steps which accepts a strings which is of even length and
has a prefix=’01’
δ (q0, ε) =q0 < δ(q0,0) =δ (δ (q0, ε),0) =δ(q0,0) =q1 < _______________ a) δ (q0, 011) =δ (δ (q0,1), 1) =δ
(q2, 1) =q3
Answer: b
Explanation: Here, δ refers to transition function and results into new state or function when an transition is
performed over its state.
Language L= {xϵ∑= {0,1} |x accepts all the binary strings not divisible by 3}
a) Q0
b) Q1
c) Q2
d) No TransitionView Answer
Answer: Q1
Explanation: The tabular representation of DFA is quite readable and can be used to some ore complex
problems. Here, we need to form the transition graph and fill up the given blank.
6.Which among the following is the missing transition in the given DFA? L= {xϵ∑= {a, b} | x starts with a
and ends with b}
a) δ (q0, a) =q0
b) δ (F, a) =q1
c) δ (F, a) =D
d) δ (q1, a) =D
View Answer
Answer: b
Explanation: For the given Language, the transition missing is δ (F, a) =q1.
7.The complement of a language will only be defined when and only when the __________ over the
language is defined. a) String
b) Word
c) Alphabet
d) Grammar
View Answer
Answer: c
file:///C:/Users/gurun/Desktop/data.html 324/358
9/16/2020 data.html
Explanation: It is not possible to define the complement of a language without defining the input alphabets.
Example: A language which does not consist of substring ‘ab’ while the complement would be the language
which does contain a substring ‘ab’.
a) Palindrome
b) Reverse
c) Factorial
d) L={ab}*
View Answer
Answer: Factorial
Explanation: Factorial, here is the most appropriate non-infinite domain. Otherwise, palindrome and reverse
have infinite domains.
9.Which among the following states would be notated as the final state/acceptance state? L= {xϵ∑= {a, b} |
length of x is 2}
a) q1
b) q2
c) q1, q2
d) q3
View Answer
Answer: b
Explanation: According to the given language, q2 Is to become the final/acceptance state in order to satisfy.
10.Which of the following are the final states in the given DFA according to the Language given.?
a) q0, q1
b) q0, q2
c) q1, q2
d) q0, q1, q2
View Answer
Answer: d
Explanation: According to the given language, the length is at most 2, thus the answer is found accordingly.
file:///C:/Users/gurun/Desktop/data.html 325/358
9/16/2020 data.html
Automata Theory Questions and Answers – Extended Transition Function
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Extended
Transition Function”.
b) 6
c) 7
d) 4
View Answer
Answer: a
Explanation: For NFA or extended transition function on NFA, the tuple elements remains same i.e.
5.
Statement: The DFA shown represents all strings which has 1 at second last position.
a) Correct
c) Wrong proposition
Answer: c
Answer: c
4. If δ is the transition function for a given NFA, then we define the δ’ for the DFA accepting the same
language would be:
file:///C:/Users/gurun/Desktop/data.html 326/358
9/16/2020 data.html
b) δ’ (S, a) =Up≠s δ (p, a)
View Answer
Answer: a
5. What is the relation between DFA and NFA on the basis of computational power? a) DFA > NFA
c) Equal
Answer: c
Explanation: DFA is said to be a specific case of NFA and for every NFA that exists for a given language, an
equivalent DFA also exists.
6. If a string S is accepted by a finite state automaton, S=s1s2s3……sn where siϵ∑ and there exists a
sequence of states r0, r1, r2…… rn such that δ(r(i), si+1) =ri+1 for each 0, 1, …n-1, then r(n) is:
a) initial state
b) transition symbol
c) accepting state
Answer: c
Explanation: r(n) is the final state and accepts the string S after the string being traversed through r(i) other
states where I ϵ 01,2…(n-2).
7. According to the given table, compute the number of transitions with 1 as its symbol but not 0:
a) 4
b) 3
c) 2
d) 1
View Answer
Answer: d
Explanation: The transition graph is made and thus the answer can be found.
a) {q0}
c) {q2, q1}
Answer: b
a) 6
b) 5
c) 4
d) 7
View Answer
Answer: a
Explanation: According to the question, presence of q2 or q1 would count so it does and the answer
according to the diagram is 6.
1.Δ(Q0, ε) ={Q0},
b) {Q0, Q1}
c) {Q0, Q2}
Answer: c
Explanation: According to given table and extended transition state implementation, we can find the state at
which it rests
QNo1.What is the difference between the strings and the words of a language? Answer:A string is any
combination of the letters of an alphabet where as the words of a language are the strings that are always
made according to certain rules used to define that language.For example if we take
file:///C:/Users/gurun/Desktop/data.html 328/358
9/16/2020 data.html
Alphabet Σ = { a , b } Here a , b are the letters of this alphabet.
As you can see we can make a lot of strings from these letters a and b.
But when we define a language over this alphabet having no a’s and only odd number ofb’s. Then the words
of this language would have only those strings that have only odd number of b’s and no a’s.some example
words of our defined language are
So we can say that all the words are strings but all the strings may not be the words of a language.Hence
strings are any combination of letters of an alphabet and the words of a language are strings made according
to some rule.
QNo.2 What is the difference between an Alphabet and an element of a set. Whether Alphabet is an element
of a set or it is a set itself?
Answer:An Alphabet is a set in itself. The elements of an Alphabet are called letters .
For example
Binary Alphabet is very important because it the Alphabet used by the computer.
N={1,2,3,4,5,…………………………………..}
It is denoted by (Small Greek letter Lambda) λ or (Capital Greek letter Lambda) Λ, is called an empty string
or null string.
The capital lambda will mostly be used to denote the empty string, in further discussion.
Answer:The language consisting of Λ (Null String) and the strings s defined over an Alphabet Σ such that
Rev(s)=s.
As Rev(aa) = aa aba
file:///C:/Users/gurun/Desktop/data.html 329/358
9/16/2020 data.html
As Rev( bbbaaabbb ) = bbbaaabbb
Answer:While defining an alphabet of letters consisting of more than one symbols, no letter should be started
with any other the letter of the same alphabet i.e. one letter should not be the prefix of another. However, a
letter may be ended in the letter of same alphabet i.e. one letter may be the suffix of another. Σ= { a , b } (
Valid Alphabet)
Answer:ALGOL (ALGOrithmic Language) is one of several high level languages designed specifically for
programming scientific computations. It started out in the late 1950’s, first formalized in a report titled
ALGOL 58, and then progressed through reports ALGOL 60, and ALGOL 68. It was designed by an
international committee to be a universal language. Their original conference, which took place in Zurich,
was one of the first formal attempts to address the issue of software portability. ALGOL’s machine
independence permitted the designers to be more creative, but it made implementation much more difficult.
Although ALGOL never reached the level of commercial popularity of FORTRAN and COBOL, it is
considered the most important language of its era in terms of its influence on later language development.
ALGOL’s lexical and syntactic structures became so popular that virtually all languages designed since have
been referred to as “ALGOL – like”; that is they have been hierarchical in structure with nesting of both
environments and control structures.
Answer:Sequencing Operators:
Sequencing operators
QNo 8.What is Non-Determinism and Determinism and what is the difference between them ?
Answer:Determinism means that our computational model (machine) knows what to do for every possible
inputs. Non determinism our machine may or may not know what it has to do on all possible inputs.
As you can conclude from above definition that Non-Deterministic machine can not be implemented ( used )
on computer unless it is converted in Deterministic machine.
Answer:FA’s that accept the same set of languages are called Equivalent FA’s.
QNo 10. What is the difference between Palindrome and Reverse function?
file:///C:/Users/gurun/Desktop/data.html 330/358
9/16/2020 data.html
Reverse =w
Example: Σ={a,b},
If a is a word in some language L, then reverse (a) is the same string of letters spelled backwards, called the
reverse of a.
e.g reverse (xxx) = xxx reverse (623) = 326 reverse (140) = 041
Answer:Given Σ, then the Kleene Star Closure of the alphabet Σ, denoted by Σ*, is the collection of all
strings defined over Σ, including Λ
It is to be noted that Kleene Star Closure can be defined over any set of strings.
Examples
If Σ = {x}
If Σ = {0,1}
If Σ = {aaB, c}
Note:
Languages generated by Kleene Star Closure of set of strings, are infinite languages. (By infinite language, it
is supposed that the language contains infinite many words, each of finite length)
QNo12.Valid/In-Valid alphabets?
Answer:Any alphabet is valid if any of its letter does not appear in the start of any other letter otherwise it is
invalid.
Answer:Alphabet provides only a set of symbols. A string is a concatenation of these symbols. Reverse of
the string means to write the string in reverse order. It has no effect on alphabet. Alphabet will remain same.
Answer:Given Σ, then the Kleene Star Closure of the alphabet Σ, denoted by Σ*, is the collection of all
strings defined over Σ, including Λ.
Plus Operation is same as Kleene Star Closure except that it does not generate Λ (null string), automatically.
You can use other symbol for alphabet but we are mostly use sigma symbol.
Answer:Regular Expression is the generalized form of any regular language through which you can construct
any string related to that language.
file:///C:/Users/gurun/Desktop/data.html 331/358
9/16/2020 data.html
Take an example from your handouts
L1 = {Λ, a, aa, aaa, …} and L2 = {a, aa, aaa, aaaa, …} can simply be expressed by a* and a+, respectively.
so a* and a+ are the generalized form of Languages L1, L2.
And a* and a+ are called the regular expressions (RE) for L1 and L2 respectively.
Automata Theory FAQ’s about Lectures 6 to 10Q No.1 What is the concept of FA also known as FSM (
Finite State Machine) ?
FA (Finite Automaton) is a finite state machine that recognizes a regular language. In computer science, a
finite-state machine (FSM) or finite-state automaton (FSA) is an abstract machine that has only a finite,
constant amount of memory. The internal states of the machine carry no further structure. This kind of model
is very widely used in the study of computation and languages.
In every FA, we mark transitions with single letter of the given alphabet but in TG transitions can be marked
with letters or strings (combination of letters).
In every FA, every state shows transition for all letters of given alphabet but in any TG it is not necessary to
show all transition for all letters of given alphabet. In TG, we may or may not show all letter transitions
according to requirement. We can also show transitions on reading any strings in TGs but it is not possible in
FA’s. In GTG Directed edges connecting some pair of states are labeled with regular expressions . It may be
noted that in GTG, the labels of transition edges are corresponding regular expressions. In TG we write
strings and in GTG we are bound to write RE. Every FA is also a TG but not every TG is FA.
Q No.3 What is the difference between FA’s and TG’s .Why we need TG’s when we have FA’s?
Can read more than one letter (words of the language they are accepting) along the transition edges at a time.
We have been given more freedom in TG’s. But this freedom is on the cost of more memory and processing
power it means that if we implement TG’s on computer using some programming language it will need more
memory and processing power of computer than used in the implementation of FA’s.
When we take Union of two FA’s it means that resultant FA’s should accept all the words that were accepted
by the two FA’s individually. It is like taking union of two sets, the resultant set contain members of both
sets.
B = {0,2,4,6,8,10} then, A U B = { 0,1,2,3,4,5,6,7,8,9,10 } you can see that A U B contain elements of both
sets similar is the case with FA’s.
file:///C:/Users/gurun/Desktop/data.html 332/358
9/16/2020 data.html
Q No.5 What is the difference between is TG and GTG ?
In TG, there are letter transitions for the strings. While in GTG, one can write whole RE as a transition from
one state to another one.
First thing about RE and FA is that there is no hard and fast formula or method to generate these. One can
generate them by its mental approach. And this mental approach can be acquired through only PRACTICE.
Let our language consist of the words of length three exactly over alphabet Σ= {a,b} then it consists of the
words
RE = aaa + aab + aba + abb + baa + bab + bba + bbb which simply means that our language consists of only
these words.
So we can make RE for a finite language by writing its all words with + operator between them.
We should also keep the null string in our mind. If our language generates null string than our RE should also
generate it)
For example language having all the words of even length has null string in it as well so we can write its RE
as follows
RE = ((a+b)(a+b))*
If a language generates all strings starting with a. then strings will be of type a , aa, ab, aab, aaa, aba, abb,….
Here RE should start with ‘a’ and then all strings including null. So this will be (a + b)* and complete RE is a
(a+ b)*.
Q No.7 What is the diagrammatically difference between FA’s and TG’s? The main differences between
FA’s and TG’s are as follows
Q No.9 What is difference between FA’s and NFA’s. Are they opposite to each other ?
file:///C:/Users/gurun/Desktop/data.html 333/358
9/16/2020 data.html
FA stands for finite automata while NFA stands for non-deterministic finite automata
In FA there must be a transition for each letter of the alphabet from each state. So in FA number of
transitions must be equal to (number of states * number of letter in alphabet).
While in NFA there may be more than one transition for a letter from a state. And finally every FA is an
NFA while every NFA may be an FA or not.
(a + b) = Represents either a or b.
Q No.1 What is the difference between how’s FA and TG .Why we need TG’s when we have FA’s? The
Transition Graphs (TG) differ from FA in the following areas
We have been given more freedom in TG’s. But this freedom is on the cost of more memory and processing
power it means that if we implement TG’s on computer using some programming language it will need more
memory and processing power of computer than used in the implementation of FA’s.
When we take Union of two FA’s it means that resultant FA’s should accept all the words that were accepted
by the two FA’s individually. It is like taking union of two sets the resultant set contain members of both
sets.
B = {0,2,4,6,8,10} then, A U B = { 0,1,2,3,4,5,6,7,8,9,10 } you can see that A U B contain elements of both
sets similar is the case with FA’s.
In TG, there are transitions for the strings. While in GTG, one can write whole RE as a transition from one
state to another one.
Regular expression is used to express the infinite or finite language, these RE are made in such a way that
these can generate the strings of that unique language also for the cross check that the defined RE is of a
specified language that RE should accept all the string of that language and all language strings should be
accepted by that RE.
It depends upon the question how many states involve in a FA. There is not any formal procedure to design
FA for a language. This ability just improves with time and practice. Every FA is also a TG but not every TG
is FA. In every FA, every state shows transition of all letters of given alphabet but in any TG it is not must.
In TG, we may or may not show all letters transition according to requirement. We can also show transitions
on reading any strings in TGs but it is not possible in FAs.
file:///C:/Users/gurun/Desktop/data.html 334/358
9/16/2020 data.html
First thing about RE and FA is that there is no hard and fast formula or method to generate these. One can
generate them by their mental approach. And this mental approach can be acquired through only
PRACTICE.
If we have a finite language then it will always be regular and will not have * in RE.
e.g. L={aaa, aba, bb}. L language generates given three strings then its RE will be
(aaa + aba + bb}. So in finite language + of all strings can be it’s RE.
For practice just try to create RE of simple languages. Don’t try to confuse yourself with complex languages.
For example if a language generates all strings starting with a. then strings will be of type a , aa, ab, aab, aaa,
aba, abb,….
Here RE should start with ‘a’ and then all strings including null. So this will be (a + b)* and complete RE is a
(a+ b)*.
I hope now you will be able to generate the RE of simpler languages. Gradually, increase the complexity of
languages to become a perfect in RE’s.
Now as similar to RE, FA of finite language will not have any loop in it.
If language is infinite then there will always be at least one loop in its FA.
From RE, if you want to generate its FA, then first get the smallest strings and generate their FA and then
gradually get the strings of bigger length and keep amending the created FA. After some practice, you will be
able to generate the FA’s.
And the last thing nobody can do the new task accurately for the first time. Practice is the key to success. In
the start you will have lot of mistakes but after practice you will be able to clear all of them.
There are two or three big differences between FA’s and TG’s.
In FA there can be maximum one initial or starting state while in TG there may be more than one initial state.
In FA there can be transition for letters only while in TG transitions from a state to another one can be for
strings.
In FA there must be transition from each state for each letter (deterministic) while in TG there may be no
transition for specific letter from a state and there may be more than one path for a string or letter from a
state.
Definition:
file:///C:/Users/gurun/Desktop/data.html 335/358
9/16/2020 data.html
Finite number of states, having one initial and some (maybe none) final states.
Finite set of input letters (Ó) from which input strings are formed.
Finite set of transitions i.e. for each state and for each input letter there is a transition showing how to move
from one state to another.
In TG, there are transitions for the strings. While in GTG, one can write whole RE as a transition from one
state to another one.
FA stands for finite automata while NFA stands for non-deterministic finite automata
In FA there must be a transition for each letter of the alphabet from each state. So in FA number of
transitions must be equal to (number of states * number of letter in alphabet).
While in NFA there may be a transition for a letter from a state. In NFA there may be more than one
transition for a letter from a state. And finally every FA is an NFA while every NFA may be an FA.
FA:
NFA:
Firstly we know that an FA is used to describe a language. Now a language consists of strings. FA will
describe the specific language only if it accepts all the strings of that particular language and all the strings
generated by the FA are in the language. So confirmation is of two ways.
Now, how to traverse the FA. It is very easy. Every FA has one initial state (state with -sign). From every
state of FA there is one transition for every letter of the alphabet. Read the string letter by letter and move
according to transitions from state to state. If the string ends in the final state (state with a + sign), that
particular string will be accepted otherwise rejected.
So, every string ending in final state will be accepted by FA and will be a word of the language.
For NFA, there may be no path or more than one path for a letter from a specific state. As similar to FA just
start traversing from the initial state and if the string ends in the final state, it will be accepted.
Remember, as there may be more than one path for a letter from a state. So any path can be used. Goal is to
reach the final state. Remaining theory is same to the FA.
Practice is the key to success. Just try simple FA’s and NFA’s in the start.
file:///C:/Users/gurun/Desktop/data.html 336/358
9/16/2020 data.html
Nondeterminism plays a key role in the theory of computing. A nondeterministic finite state automaton is
one in which the current state of the machine and the current input do not uniquely determine the next state.
This just means that a number of subsequent states
(zero or more) are possible next states of the automaton at every step of a computation.Of course,
nondeterminism is not realistic, because in real life, computers must be deterministic. Still, we can simulate
nondeterminism with deterministic programs. Furthermore, as a mathematical tool for understanding
computability, nondeterminism is invaluable.
As with deterministic finite state automata, a nondeterministic finite state automaton has five components.
· a set of states
· a transition function that describes how the automaton changes states as it processes an input string
The only difference lies in the transition function, which can now target subsets of the states of the
automaton rather than a single next state for each state, input pair.
Q No 2. If a language can be expressed in the form of FA than why it is needed to use NFA ?
NFA stands for non-deterministic FA and this sort of structure has relaxation compared with FA. So it is
rather more easy to represent a language using NFA.
We have methods to convert NFA into FA’s so sometimes it is easier to build NFA of a given language and
than convert its NFA into FA using these methods rather than directly building an FA for a language which
may be very difficult.
While generating NFA corresponding to closure of an FA one should take care of the null string. Simple way
to accept null string is declare initial state, final as well. But in this way a lot of other strings will also be
accepted. Therefore, accurate way is draw another state. Declare the new state initial as well as final.
Connect the new state with the states originally connected with the old start state with the same transitions as
the old start state. Newly drawn diagram will be an NFA representing the language closure of the given FA
Q No 4.What is the difference between Union of two FA’s , Concatenation of two FA’s and closure of two
FA’s ? Consider two FA’s given below a a b b a b a b
Y2+
Y1-
X2+
X1FA1
FA2
Here FA1 accepts all strings ending in a and FA2 accepts all strings ending b.
An FA corresponding to FA1UFA2 will accept all the strings ending in a or ending in b. for example,
aba,bbaaab,bbb
file:///C:/Users/gurun/Desktop/data.html 337/358
9/16/2020 data.html
An FA corresponding to FA1FA2 will accept all the strings whose first substring belongs to FA1 and second
substring belongs to FA2. for example, ababab, bbabbb.
An FA corresponding to FA1* will accepts all the strings of FA1 including null string. if FA1 represents RE
r1 then FA1* will correspond to RE r1*.
Automata Theory FAQ’s about Lectures 21 to 25Q No 1.How Moore and Mealy machine works in
Computer Memory what is their importance in Computing ?
Mealy & Moore Machines work in computing as incrementing machine & 1’s complement machine etc.
These operations as basic computer operations so these machines are very important.
Sequential Circuit:
The memory component provides a state input. A flip-flop is often used as a memory component.
The state variable indicates the states of the sequential machine, i.e. the status or stage or progress of the
whole event.
The state of a sequential circuit is indicated by the output of a flip-flop. A single flip-flop can be used to
indicate two states (q=0 and q=1). When there are more than two states, additional flip-flops are used. Given
n flip-flops, a total of 2n states can be represented.
In other words, a sequential machine can be put into a number of different states depending on the particular
inputs given.
The output is a function of both the Present Inputs and the Present States.
In addition to the outputs, the circuit must also generate an update to the memory components so that the
state of the machine can also be changed with respect to the new inputs. The update is called the Next State
Function and is also a function of the Present Inputs and the Present States.
Both the output functions and the Next State Functions are combinational circuits.
Z=f(X,St)
S=g(X,St)
The superscript t indicates the present time period while the superscript (t+1) indicates the next time period.
The characteristic of a sequential circuit is completely defined by a state transition diagram that enumerates
all possible transitions for every possible input combination.
Q No 1.What is the concept of Pumping Lemma I and II and what is the difference between pumping Lemma
1 and pumping Lemma 2 ?In fact PLI & PLII are same (A way to recognize Non Regular language). The
only difference is that the conditions in pumping lemma II are more stricter than Pumping Lemma I some
language that are difficult to proof Non Regular by Pumping Lemma I are proved Non Regular by pumping
Lemma II easily.
Further mare in pumping lemma I we have to generate all words to of a language but in Pumping Lemma II
we have to generate a single word to prove a language non regular.
file:///C:/Users/gurun/Desktop/data.html 338/358
9/16/2020 data.html
Explanation:
Some languages like PALINDROME that are proved to be regular by first version due to some of their
symmetrical words when we pump these words they remain to be the parts of the language like
bbabb
By pumping lemma 1
Let y = a
That is also a valid word of PALINDROME so by pumping lemma I PALINDROME can not be proved non
regular, so there was the need of pumping lemma version version 2. Now consider for the word bbabb if we
take N=2
bbbbabb
That word is in PALINDROME. So be careful in taking total no of states of the FA and also the repeating
factor (y) to prove an infinite language non regular you need to prove only one word that is not part of the
language.
The significance of 2nd version of ‘pumping lemma’ is that there are some infinite non regular languages
like PALINDROME we can built FA that can accept there certain words but if we increase the length of their
words that FA don’t accept these words so by pumping lemma version I it is very difficult to prove them non
regular but with the second version we can prove that a language is Non regular even it’s some words may be
accepted by some FA’s.
1. In order to run a string on a Mealy or Moore machine, you can take directions from transition table.
Running string on Mealy or Moore machine is similar to running string on a FA. For example, if want to run
abba on the machine, take start from initial state. Check what is the transition for a, what state it goes. After
that check what is the path of b from that state and so on. In this way you will be able to run whole of the
string. Note that there is no final state in Mealy or Moore machine. So there is no case of acceptance or
rejection of string. You just have to determine what the output is. I hope that will clear your mind for further
clarification please listens to your lecture carefully.
2. The string is taken for the testing purposes. You can take any sort of string and determine its output
using machine.
file:///C:/Users/gurun/Desktop/data.html 339/358
9/16/2020 data.html
Q No 1.What is the difference between semiword and word please also give an example regarding this?
Word:
Semiword:
A semiword is a string of terminals (may be none) concatenated with exactly one nonterminal on the right i.e.
a semi word, in general, is of the following form
A Derivation tree is the one that shows how to derive any specific word of the language described by CFG
but Total Language Tree shows all words of the Language described by CFG on it
When we say that a Language is closed it is always with respect to certain operation.
A simple example may be that the set of integers is closed under addition. It means when we take two
numbers from set of integers say 3, 7 the result of their addition would also be in the set of integers.
Similarly if the result of an operation on the words of a language results in the word of the same language we
say that the language is closed under that operation.
Productions are the grammatical rules and regulations. These rules express the behavior of CFG. Using
production in CFG terminals are converted into non-terminals and when all the terminals are converted using
productions, a word is acquired.
Q No 4.What is the difference between concatenation and intersection of two FA’s also what is the difference
among Union of two FA’s and addition of them?
In intersection of two FA’s only those strings are accepted which are independently accepted by both FA’s,
while in concatenation of two FA’s only those strings will be accepted in which first part of string is accepted
by first FA and remaining part of string is accepted by the second FA.
While taking union of two FA’s one can represent it using + sign. So (FA1 U FA2) and (FA + FA2) both are
same. There is no difference between them.
Q No 1.What is the Difference between Nullable and Null production? How to make eliminate Nullable and
for Null Productions from the CFG ?
Example:
S ® aA|bB|L, A ® aa|L, B ® aS
file:///C:/Users/gurun/Desktop/data.html 340/358
9/16/2020 data.html
Here S ® L and A ® L are null productions.
A production is called nullable production there is a derivation that starts at Non Terminal and leads to L i.e.
S ———–> aA | bB | aa
A————-> C | bb
C————–> L
Here A nullable Non Terminal due to Nullable production A—————> C as C leads to null.
Example:
B ®Ba|Bb|L.
Here A ® L and B ® L are null productions, while Z ® AB, W ® Z are nullable productions.
Method:
Delete all the Null productions and add new productions e.g.
Consider the following productions of a certain CFG X ® aNbNa, N ® L, delete the production N ® L and
using the production
Thus the new CFG will contain the following productions X ® Nba|abNa|aba| aNbNa
Note: It is to be noted that X ® aNbNa will still be included in the new CFG.
Method:
B ®Ba|Bb|L.
Here A ® L and B ® L are null productions, while Z ® AB, W ® Z are nullable productions. The new CFG
after, applying the method, will be
S ® XY
X ® Zb|b
Y ® bW|b
Z ® AB|A|B
W®Z
A ® aA|a|bA|b
file:///C:/Users/gurun/Desktop/data.html 341/358
9/16/2020 data.html
B ®Ba|a|Bb|b
Note: While adding new productions all Nullable productions should be handled with care. All Nullable
productions will be used to add new productions, but only the Null production will be deleted
Q No 2. Is it possible to make CFG for infix and postfix expression’s using derivation tree ?
Derivation tree is only used to derive words of language that is described by a CFG. Yes, we can create CFG
for languages infix expressions, postfix expressions.
PDA is just an enhancement in FAs. i.e Memory is attached with machine that recognizes some language. FA
is basic structure for most advanced electronic machines such as computer etc.
Q No 4 What is difference between PUSH DOWN STACK and PUSH DOWN STORE ?
No difference at all. Both terms are used to describe memory structure attached with FAs to store some
characters in it.
If a CFG has only productions of the form nonterminal ———à string of two nonterminals or
Thus if the given CFG is in the form specified above it will be called in CNF.
Q No 6.What is meant by the terms stack consistence and input tape consistence ?
Term Stack consistent means we can pop any character from the top of the stack only. PDA should not be
able to pop any character other than that is present on the top of the stack.
Term Tape consistent means we can read only the first letter on the tape not any other letter of the tape after
the first one.
Q No 7 What is the concept of unit production ? The productions of the form one Nonterminal ——–à one
Nonterminal
For example
A——–à a | b
S —-à a | b
Context Free Grammars are called context free because the words of the languages of Context Free
Grammars have words like “aaabbb”(PALINDROME). In these words the value of letters (a , b) is the same
file:///C:/Users/gurun/Desktop/data.html 342/358
9/16/2020 data.html
on whatever position they appear. On the other hand in context sensitive grammars their value depend on the
position they appear in the word a simple example may be as follows
Suppose we have a decimal number 141 in our language . When compiler reads it, it would be in the form of
string. The compiler would calculate its decimal equivalent so that we can perform mathematical functions
on it. In calculating its decimal value , weight of first “1” is different than the second “1” it means it is
context sensitive (depends on in which position the “1” has appeared).
i.e.
That is not the case with the words of Context Free Languages. (The value of “a” is always same in whatever
position “a” appears).
It is a method of generation of strings from a CFG starting from left most letter of the string.
Q No 1.Give a example of converting a CFG to CNF?Consider the CFG given below S→ ABC
A→ aa | b
B→ c
C→d
S→ DC
D → AB
A→ EE | b
E→a B→c
C→d
Q No 2.In the lecture 41 ‘s example, we have converted PDA to conversion form and a word ‘aaaabb’ is
derived from this conversion form PDA. What are the derivation steps.
The PDA converted to conversion form has some specific features that are important to understand first.
These features are
The states named START, READ, HERE and ACCEPT are called joints of the machine.
With the help of the conversion form we have been able to achieve that POP state has only one path out of it
and the path taking (multiple paths) decisions take place only on the READ state.
file:///C:/Users/gurun/Desktop/data.html 343/358
9/16/2020 data.html
The word ‘aaaabb’ is generated as follows from the PDA
START-POP4-PUSH $
This step pops $ and then pushes it to ensure that stack contains $ at the beginning.
READ1-POP6-PUSH $-PUSH a
As first time after reading “a” there is $ at the top of stack so we will follow path segment READ1-POP6-
PUSH $-PUSH a
READ1-POP5-PUSH a-PUSH a
READ1-POP5-PUSH a-PUSH a
READ1-POP5-PUSH a-PUSH a
READ1-POP1- HERE-POP2
READ2-POP3-ACCEPT.
When we derive a word in Top down parsing beginning with the starting Non Terminal the branches of the
tree that do not lead to our required word are left aside these branches are called unwanted branches.
S—–>AA
A—–>a | b
If we want to generate the word “aa” we will leave the branch generated by the production A——>b.
Intersection of two languages will consist of all those words which are in both languages while union of two
languages will consist of all those words which are present in at least one language.
Q No 5.What is the difference between Context free languages and regular languages?
Regular languages can be represented by FA’s because we do not need any memory to recognize (accept or
reject them on FA) them but there is another class of languages that can not be represented by FA’s because
these languages require that we have some memory (with the help of memory we can store letters of the
string we are checking so that we can compare them with next coming letters in the string).
file:///C:/Users/gurun/Desktop/data.html 344/358
9/16/2020 data.html
For example language anbn requires that we must store a’s and then compare their count with next coming
b’s so that we can check whether a’s are equal to b’s or not.
Due to this reason we use Context Free Grammars to represent them because we can5t write RE’s for them.
So Context Free Languages represent a broader category this category also include regular languages as
subcategory. It means that context free languages include regular languages as well as some other languages.
In Mealy Machine we read input string letters and generate output while moving along the paths from one
state to another while in Moore machine we generate output on reaching the state so the output pattern of
Moore machine contains one extra letter because we generated output for state q0 where we read nothing.
i. STACK Consistent ii. Y-able Paths iii. Working string iv. Semi Word means
Stack consistence means that in the PDA converted in the conversion form, when we follow a path segment
(which is formed by combining start, read or here state with next read, here or accept state on the path) along
the PDA its pop state should have the path for the same letter that is present on the top of the stack at that
stage. If this doesn’t happen our PDA will crash because in conversion form of the PDA the pop state has
only one letter path, so if we could not be able to find that letter on the top of the stack our PDA will crash (if
will not find path where to go from that state)
Y-able Paths means that when we follow a certain sequence of rows from the row table to generate a path for
a word form start state to accept state. The path (sequence of rows) should be stack as well as joint consistent
it means that rows should end at the same read or here state (join consistency ) and the rows should be able to
pop the letter from the top that is indicated in the pop state of the row.
Semi word is the string of terminals it may be null string ending with a Non terminals on the right. For
example some semi words are aaS aabbA
Automata theory is the study of abstract computing devices, or “machines”. This topic goes back to the days
before digital computers and describes what is possible to compute using an abstract machine.These ideas
directly apply to creating compilers, programming languages, and designing applications. They also provide
a formal framework to analyze new types of computing devices, e.g. biocomputers or quantum computers
What are practical Examples of the implications of Automata Theory and the formal Languages?
Grammars and languages are closely related to automata theory and are the basis of many important software
components like:
· Text searching
· System verification
file:///C:/Users/gurun/Desktop/data.html 345/358
9/16/2020 data.html
· Finite Automata
· Regular Languages
· Linear-bounded Automata
· Push-Down Automata
· Turing Machines
· Arrays of Automata
Question: What is the difference between the alphabet and an element of a set?
Answer: Alphabets is a set of letters nothing else but a set of strings (elements) can have more than one
letters in one string.
Answer: The language consisting of Λ and the strings s defined over Σ such that Rev(s)=s.It is to be
denoted that the words of PALINDROME are called palindromes.
Reverse =w
Example: Σ={a,b},
file:///C:/Users/gurun/Desktop/data.html 346/358
9/16/2020 data.html
If a is a word in some language L, then reverse (a) is the same string of letters spelled backwards, called the
reverse of a.
e.g
aaabb, ababababababababab,……………}
Answer: Concatenation of finite letters from the alphabet is called a string.Sometimes a string with no
symbol at all is used, denoted by (Small Greek letter Lambda) λ or (Capital Greek letter Lambda) Λ, is called
an empty string or null string.
Answer: Any combination of letters of alphabet that follows rules of language is called a word.
Question: There are as many palindromes of length 2n as there are of length 2n1, please explain?
Answer: If we try to create palindromes then middle elements (2 in even palindromes & 1 in odd
palindrome) does not cause any change in no. of palindromesDefining the language PALINDROME, of
length 2n and 2n-1 defined over S = {a,b} e.g if we take n= 2 for 2n
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular Language
& Expression”.
1. A regular language over an alphabet a is one that can be obtained from a) union
file:///C:/Users/gurun/Desktop/data.html 347/358
9/16/2020 data.html
b) concatenation
c) kleene
Answer : d
Explanation : None.
a) 0U1
b) 0/1
c) 0+1
Answer : d
b) .,*,+
c) .,+,*
d) +,a,*
View Answer
Answer : a
Explanation : None.
a) ϵ
b) Φ
c) 0
d) 1
View Answer
Answer : a
Explanation : None.
5. a? is equivalent to
a) a
b) a+Φ
file:///C:/Users/gurun/Desktop/data.html 348/358
9/16/2020 data.html
c) a+ϵ
Answer : c
6. ϵL is equivalent to
a) ϵ
b) Φ
c) L
d) Lϵ
View Answer
7. (a+b)* is equivalent to
a) b*a*
b) (a*b*)*
c) a*b*
Answer : b
Explanation : None.
8. ΦL is equivalent to
a) LΦ
b) Φ
c) L
d) ϵ
View Answer
Answer : a,b
Explanation : None.
file:///C:/Users/gurun/Desktop/data.html 349/358
9/16/2020 data.html
d) x+ and x*x+View Answer
Answer : c
Explanation : (ab)*=(a*b*)*.
Which of the following statements is correct a) i,ii are equal and ii,iii are not
Answer : d
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular Language
& Expression”.
1. 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
View Answer
Answer : d
a) (01)*0 = 0(10)*
b) (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*
c) (0+1)*01(0+1)*+1*0* = (0+1)*
Answer : d
Explaination : None.
a) accepted by DFA
file:///C:/Users/gurun/Desktop/data.html 350/358
9/16/2020 data.html
b) accepted by PDA
c) accepted by LBA
Answer : a
Explanation : All of above machine can accept regular language but all string accepted by machine is regular
only for DFA.
4. Regular grammar is
c) english grammar
Answer : a
5. Let the class of language accepted by finite state machine be L1 and the class of languages represented by
regular expressions be L2 then a) L1=L2
c) L1 U L2 = .*
d) L1=L2View Answer
Answer : d
Explanation : Finite state machine and regular expression have same power to express a language.
a) [(a+b)*-(aa+bb)]*
b) [(0+1)-(0b+a1)*(a+b)]*
c) (01+11+10)*
d) (1+2+0)*(1+2)*View Answer
Answer : b
a) Type 0 language
b) Type 1 language
c) Type 2 language
file:///C:/Users/gurun/Desktop/data.html 351/358
9/16/2020 data.html
Answer : a
View Answer
Answer : b
Explanation : None.
a) Regular
b) Context free
c) Context sensitive
d) RecursiveView Answer
Answer : d
Explanation :If L is recursive enumerable and its complement too if and only if L is recursive.
a) Union
b) Intersection
c) Kleen star
Answer : d
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular
Expression-Introduction”.
1. L is a regular Language if and only If the set of __________ classes of IL is finite. a) Equivalence
b) Reflexive
c) Myhill
d) NerodeView Answer
file:///C:/Users/gurun/Desktop/data.html 352/358
9/16/2020 data.html
Answer: a
Explanation: According to Myhill Nerode theorem, the corollary proves the given statement correct for
equivalence classes.
2. A language can be generated from simple primitive language in a simple way if and only if
Answer: b
Explanation: A language is regular if and only if it can be accepted by a finite automaton. Secondly, It
supports no concept of auxiliary memory as it loses the data as soon as the device is shut down.
3. Which of the following does not represents the given language? Language: {0,01} a) 0+01
b) {0} U {01}
c) {0} U {0}{1}
Answer: d
Explanation: The given option represents {0, 01} in different forms using set operations and Regular
Expressions. The operator like ^, v, etc. are logical operation and they form invalid regular expressions when
used.
4. According to the given language, which among the following expressions does it corresponds to?
a) (0+1+0+1+0+1+0+1)4
b) (0+1)4
c) (01)4
Answer: d
Explanation: The extended notation would be (0+1)4 but however, we may allow some or all the factors to
be ε. Thus ε needs to be included in the given regular expression.
((0+1). (0+1)) *
Answer: a
Explanation: The given regular expression corresponds to a language of binary strings which is of even
length including a length of 0.
6. If R represents a regular language, which of the following represents the Venn-diagram most correctly?
a) An Irregular Set
b) R*
c) R complement
d) R reverseView Answer
Answer: b
Explanation: The given diagram represents the Kleene operation over the Regular Language R in which the
final states become the initial and the initial state becomes final.
Answer: a
Explanation: The transition states shown are the result of breaking down the given regular expression in
fragments. For dot operation, we change a state, for union (plus) operation, we diverge into two transitions
and for Kleene Operation, we apply a loop.
b) Dot
c) Kleene
Answer: b
Explanation: Two operands are said to be performing Concatenation operation AB = A•B = {xy: x A & y
B}.
a) R
b) Ф
file:///C:/Users/gurun/Desktop/data.html 354/358
9/16/2020 data.html
c) R.Ф
View Answer
Answer: b
Explanation: By distributive property (Regular expression identities), we can prove the given identity to be
Ф.
a) R+
b) R-
c) R+ U R-
d) RView Answer
Answer: a
This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “DFA to Regular
Expressions”.
a) (0+1)*001(0+1)*
b) 1*001(0+1)*
c) (01)*(0+0+1)(01)*
Answer: a
Explanation: There needs to be 001 together in the string as an essential substring. Thus, the other
components can be anything, 0 or 1 or e.
a) Every language defined by any of the automata is also defined by a regular expression
c) Every language defined by a regular expression can be represented using NFA with e moves
d) Regular expression is just another representation for any automata definitionView Answer
Answer: b
file:///C:/Users/gurun/Desktop/data.html 355/358
9/16/2020 data.html
Explanation: Using NFA with e moves, we can represent all the regular expressions as an automata. As
regular expressions include e, we need to use e moves.
3. The total number of states required to automate the given regular expression (00)*(11)*
a) 3
b) 4
c) 5
d) 6
View Answer
Answer: c
Explanation:
a) (110+1)*0
b) (11+110)*1
c) (110+11)*0
d) (1+110)*1View Answer
Answer: c
Explanation: There is no state change for union operation, but has two different paths while for concatenation
or dot operation, we have a state change for every element of the string.
Password Validation: String should be 8-15 characters long. String must contain a number, an Uppercase
letter and a Lower case letter. a) ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,15}$
b) ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{9,16}$
c) ^(?=.[a-z])(?=.[A-Z])(?=.\d).{8,15}$
Answer: a
Explanation: Passwords like abc123, 123XYZ, should not be accepted . If one also wants to include special
characters as one of the constraint, one can use the following regular expression: ^(?=.*[a-z])(?=.*[A-
Z])(?=.*\d)(?=.*[^\da-za-Z]).{8,15}$
6. Generate a regular expression for the following problem statement: P(x): String of length 6 or less for
å={0,1}* a) (1+0+e)6
b) (10)6
file:///C:/Users/gurun/Desktop/data.html 356/358
9/16/2020 data.html
c) (1+0)(1+0)(1+0)(1+0)(1+0)(1+0)
Answer: a
Explanation: As the input variables are under Kleene Operation, we need to include e,thus option c is not
correct,thereby option (a) is the right answer.
7. The minimum number of states required in a DFA (along with a dumping state) to check whether the 3rd
bit is 1 or not for |n|>=3 a) 3
b) 4
c) 5
d) 1
View Answer
Answer: c
Explanation:
8. Which of the regular expressions corresponds to the given problem statement: P(x): Express the identifiers
in C Programming language l=letters d=digits
a) (l+_)(d+_)*
b) (l+d+_)*
c) (l+_)(l+d+_)*
d) (_+d)(l+d+_)*View Answer
Answer: c
Explanation:
Identifiers in C Programming Language follows the following identifiers rule: a) The name of the identifier
should not begin with a digit.
9. Generate a regular expression for the given language:l L(x): {xÎ{0,1}*| x ends with 1 nd does not contain a
substring 01} a) (0+01)*
b) (0+01)*1
c) (0+01)*(1+01)
Answer: c
file:///C:/Users/gurun/Desktop/data.html 357/358
9/16/2020 data.html
Explanation: (a) and (b) are the general cases where we restrict the acceptance of a string witrh substring 00
but we ignore the case where the string needs to end with 1 which therby, does not allows the acceptance of
e.
10. The minimum number of transitions to pass to reach the final state as per the following regular
expression is: {a,b}*{baaa} a) 4
b) 5
c) 6
d) 3
View Answer
Answer: a
Explanation:
isement
file:///C:/Users/gurun/Desktop/data.html 358/358