MCQ Automata Unit-1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 61

8/27/2019 Finite Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Finite Automata-


Introduction

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
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
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*
d) All of the mentioned
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.

https://www.sanfoundry.com/automata-theory-questions-answers-finite-automata-introduction/ 1/3
8/27/2019 Finite Automata Theory Questions and Answers - Sanfoundry

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
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

6. Which of the following is a not a part of 5-tuple finite automata?


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
c) Loader and Linkers
d) None of the mentioned
View Answer
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.

https://www.sanfoundry.com/automata-theory-questions-answers-finite-automata-introduction/ 2/3
8/27/2019 Finite Automata Theory Questions and Answers - Sanfoundry

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
Explanation: ∑r= {1,0} and a Kleene* operation would lead to the following
set=COUNT{ε,0,1,00,11,01,10} =7.

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;
View Answer
Answer: b
Explanation: δ(QX∑) = Q1 is the correct representation of change of state. Here, δ is called the
Transition function.

10. Given: ∑= {a, b}


L= {xϵ∑*|x is a string combination}
∑4 represents which among the following?

advertisement

a) {aa, ab, ba, bb}


b) {aaaa, abab, ε, abaa, aabb}
c) {aaa, aab, aba, bbb}
d) All of the mentioned
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.

https://www.sanfoundry.com/automata-theory-questions-answers-finite-automata-introduction/ 3/3
8/27/2019 Moore Machine - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Moore Machine

This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Moore
Machine”.

1. Moore Machine is an application of:


a) Finite automata without input
b) Finite automata with output
c) Non- Finite automata with output
d) None of the mentioned
View Answer
Answer: b
Explanation: Finite automaton with an output is categorize din two parts: Moore M/C and Mealy M/C.

advertisement

2. In Moore machine, output is produced over the change of:


a) transitions
b) states
c) Both
d) None of the mentioned
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.

4. Statement 1: Null string is accepted in Moore Machine.


Statement 2: There are more than 5-Tuples in the definition of Moore Machine.

Choose the correct option:


a) Statement 1 is true and Statement 2 is true
b) Statement 1 is true while Statement 2 is false

https://www.sanfoundry.com/automata-theory-questions-answers-moore-machine/ 1/4
8/27/2019 Moore Machine - Automata Theory Questions and Answers - Sanfoundry

c) Statement 1 is false while Statement 2 is true


d) Statement 1 and Statement 2, both are false
View Answer
Answer: a
Explanation: Even ε, when passed as an input to Moore machine produces an output.

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

6. Complete the given table according to the given Moore machine.

Present State
Next State
Output

0
1

https://www.sanfoundry.com/automata-theory-questions-answers-moore-machine/ 2/4
8/27/2019 Moore Machine - Automata Theory Questions and Answers - Sanfoundry

Q0
Q1
Q2
1
Q1
Q2

1
Q2

Q0

a) Q0, Q2, 0
b) Q0, Q2, 1
c) Q1, Q2, 1
d) Q1, Q0, 0
View Answer
Answer: a
Explanation: The table can be filled accordingly seeing the graph.

advertisement

7. What is the output for the given language?


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
Explanation: The outputs are as per the input, produced.

8. The output alphabet can be represented as:


a) δ
b) ∆
c) ∑
d) None of the mentioned
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.

https://www.sanfoundry.com/automata-theory-questions-answers-moore-machine/ 3/4
8/27/2019 Moore Machine - Automata Theory Questions and Answers - Sanfoundry

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): ∑
d) None of the mentioned
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.

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 mentioned
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.

https://www.sanfoundry.com/automata-theory-questions-answers-moore-machine/ 4/4
8/27/2019 Mealy Machine - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Mealy Machine

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 Input
View Answer
Answer: c
Explanation: Definition of Mealy Machine.

advertisement

2. Which of the given are correct?


a) Moore machine has 6-tuples
b) Mealy machine has 6-tuples
c) Both Mealy and Moore has 6-tuples
d) None of the mentioned
View Answer
Answer: c
Explanation: Finite Automaton with Output has a common definition for both the categories.

3. The following mealy machine outputs which of the following?

a) 9’s Complement
b) 2’s Complement
c) 1’s Complement
d) 10’s Complement
View Answer

https://www.sanfoundry.com/automata-theory-questions-answers-mealy-machine/ 1/3
8/27/2019 Mealy Machine - Automata Theory Questions and Answers - Sanfoundry
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): ∑
d) None of the mentioned
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
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.

6. Mealy and Moore machine can be categorized as:


a) Inducers
b) Transducers
c) Turing Machines
d) Linearly Bounder Automata
View Answer
Answer: b
Explanation: They are collectively known as Transducers.

7. The major difference between Mealy and Moore machine is about:


a) Output Variations
b) Input Variations
c) Both
d) None of the mentioned
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).

https://www.sanfoundry.com/automata-theory-questions-answers-mealy-machine/ 2/3
8/27/2019 Mealy Machine - Automata Theory Questions and Answers - Sanfoundry
advertisement

8. Statement 1: Mealy machine reacts faster to inputs.


Statement 2: Moore machine has more circuit delays.
Choose the correct option:
a) Statement 1 is true and Statement 2 is true
b) Statement 1 is true but Statement 2 is false
c) Statement 1 is false and Statement 2 is true
d) None of the mentioned is true
View Answer
Answer: a
Explanation: Being an input dependent and output capable FSM, Mealy machine reacts faster to
inputs.

9. Which of the following does the given Mealy machine represents?

a) 9’s Complement
b) 2’s Complement
c) 1’s Complement
d) 10’s Complement
View Answer
Answer: c
Explanation: Inputs can be taken and can be verified.

10. Which one among the following is true?


A mealy machine
a) produces a language
b) produces a grammar
c) can be converted to NFA
d) has less circuit delays
View Answer
Answer: d
Explanation: It does not produce a language or a grammar or can be converted to a NF

https://www.sanfoundry.com/automata-theory-questions-answers-mealy-machine/ 3/3
8/27/2019 Mealy Machine Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Mealy Machine-II

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 mentioned
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) 4
View Answer
Answer: b
Explanation:

https://www.sanfoundry.com/automata-theory-questions-answers-mealy-machine-1/ 1/5
8/27/2019 Mealy Machine Questions and Answers - Sanfoundry

3. An e-NFA is ___________ in representation.


a) Quadruple
b) Quintuple
c) Triple
d) None of the mentioned
View Answer
Answer: b
Explanation: An e-NFA consist of 5 tuples: A=(Q, S, d, q0. F)
Note: e is never a member of S.

4. State true or false:


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

5. 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 mentioned
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.

6. Which of the following belongs to the epsilon closure set of a?

https://www.sanfoundry.com/automata-theory-questions-answers-mealy-machine-1/ 2/5
8/27/2019 Mealy Machine Questions and Answers - Sanfoundry

a) {f1, f2, f3}


b) {a, f1, f2, f3}
c) {f1, f2}
d) none of the mentioned
View Answer
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.
https://www.sanfoundry.com/automata-theory-questions-answers-mealy-machine-1/ 3/5
8/27/2019 Mealy Machine Questions and Answers - Sanfoundry

advertisement

8. Which of the steps are non useful while eliminating the e-transitions for the given diagram?

a) Make a as accepting state of N’ if ECLOSE(p) contains an accepting state of N


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 f1
c) Delete all arcs labelled as e
d) None of the mentioned
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?

https://www.sanfoundry.com/automata-theory-questions-answers-mealy-machine-1/ 4/5
8/27/2019 Mealy Machine Questions and Answers - Sanfoundry

a) 5
b) 7
c) 9
d) 6
View Answer
Answer: b
Explanation:

https://www.sanfoundry.com/automata-theory-questions-answers-mealy-machine-1/ 5/5
8/27/2019 Automata Theory Interview Questions and Answers - Sanfoundry

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”.

1. Which of the following not an example Bounded Information?


a) fan switch outputs {on, off}
b) electricity meter reading
c) colour of the traffic light at the moment
d) none of the mentioned
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

2. A Language for which no DFA exist is a________


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.

3. A DFA cannot be represented in the following format


a) Transition graph
b) Transition Table
c) C code
d) None of the mentioned
View Answer
Answer: d
Explanation: A DFA can be represented in the following formats: Transition Graph, Transition Table,
Transition tree/forest/Any programming Language.

4. What the following DFA accepts?

https://www.sanfoundry.com/automata-theory-interview-questions-answers/ 1/5
8/27/2019 Automata Theory Interview Questions and Answers - Sanfoundry

a) x is a string such that it ends with ‘101’


b) x is a string such that it ends with ‘01’
c) x is a string such that it has odd 1’s and even 0’s
d) x is a strings such that it has starting and ending character as 1
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

5. When are 2 finite states equivalent?


a) Same number of transitions
b) Same number of states
c) Same number of states as well as transitions
d) Both are final states
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.

6. What does the following figure most correctly represents?

https://www.sanfoundry.com/automata-theory-interview-questions-answers/ 2/5
8/27/2019 Automata Theory Interview Questions and Answers - Sanfoundry

a) Final state with loop x


b) Transitional state with loop x
c) Initial state as well as final state with loop x
d) Insufficient Data
View Answer
Answer: c
Explanation: The figure represents the initial as well as the final state with an iteration of x.

7. Which of the following will not be accepted by the following DFA?

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.
Dumping state also refers to the reject state of the automata.

advertisement

https://www.sanfoundry.com/automata-theory-interview-questions-answers/ 3/5
8/27/2019 Automata Theory Interview Questions and Answers - Sanfoundry

8. Which of the following will the given DFA won’t accept?

a) ε
b) 11010
c) 10001010
d) String of letter count 11
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.

9. Can a DFA recognize a palindrome number?


a) Yes
b) No
c) Yes, with input alphabet as ∑*
d) Can’t be determined
View Answer

https://www.sanfoundry.com/automata-theory-interview-questions-answers/ 4/5
8/27/2019 Automata Theory Interview Questions and Answers - Sanfoundry
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 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.

https://www.sanfoundry.com/automata-theory-interview-questions-answers/ 5/5
8/27/2019 DFA Processing Strings - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – DFA Processing Strings

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 DFA
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

2. Which of the following is the corresponding Language to the given DFA?

a) L= {x ϵ {0, 1} * | x ends in 1 and does not contain substring 01}


b) L= {x ϵ {0,1} * |x ends in 1 and does not contain substring 00}
c) L= {x ϵ {0,1} |x ends in 1 and does not contain substring 00}
d) L= {x ϵ {0,1} * |x ends in 1 and does not contain substring 11}
View Answer
Answer: b
Explanation: The Language can be anonymously checked and thus the answer can be predicted. The
https://www.sanfoundry.com/automata-theory-questions-answers-dfa-processing-strings/ 1/5
8/27/2019 DFA Processing Strings - Automata Theory Questions and Answers - Sanfoundry
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, ε}
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

https://www.sanfoundry.com/automata-theory-questions-answers-dfa-processing-strings/ 2/5
8/27/2019 DFA Processing Strings - Automata Theory Questions and Answers - Sanfoundry

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:

6. For the DFA given below compute the following:


Union of all possible combinations at state 7,8 and 9.

https://www.sanfoundry.com/automata-theory-questions-answers-dfa-processing-strings/ 3/5
8/27/2019 DFA Processing Strings - Automata Theory Questions and Answers - Sanfoundry

a) {aba, ac, cc, ca, cb, bc, bab, ca}


b) {bab, bc, ac, aba, ca, aac, ccb}
c) {cc, ca, cb, aba, bab, ac}
d) {aba, ac, cc, ca, cb, bc, bab, caa}
View Answer
Answer: d
Explanation: The string a state receives is the combination of all input alphabets which lie across the
path covered.

7. Given L= {Xϵ∑*= {a, b} |x has equal number of a, s and b’s}.


Which of the following property satisfy the regularity of the given language?
a) Regularity is dependent upon the length of the string
b) Regularity is not dependent upon the length of the string
c) Can’t be said for a particular string of a language
d) It may depend on 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.

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 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.

https://www.sanfoundry.com/automata-theory-questions-answers-dfa-processing-strings/ 4/5
8/27/2019 DFA Processing Strings - Automata Theory Questions and Answers - Sanfoundry

https://www.sanfoundry.com/automata-theory-questions-answers-dfa-processing-strings/ 5/5
8/27/2019 Simpler Notations - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Simpler Notations

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
Explanation: Identity relation: εw = wε = w, thus the one satisfying the given relation will be the identity
element.
https://www.sanfoundry.com/automata-theory-questions-answers-simpler-notations/ 1/5
8/27/2019 Simpler Notations - Automata Theory Questions and Answers - Sanfoundry

advertisement

3.Which of the following substring will the following notation result?

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
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) =q2
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.

5. Fill the missing blank in the given Transition Table:


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

https://www.sanfoundry.com/automata-theory-questions-answers-simpler-notations/ 2/5
8/27/2019 Simpler Notations - Automata Theory Questions and Answers - Sanfoundry
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.

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’.

https://www.sanfoundry.com/automata-theory-questions-answers-simpler-notations/ 3/5
8/27/2019 Simpler Notations - Automata Theory Questions and Answers - Sanfoundry

8.Which among the following is not notated as infinite language?


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.?
L= {xϵ∑= {a, b} |length of x is at most 2}

https://www.sanfoundry.com/automata-theory-questions-answers-simpler-notations/ 4/5
8/27/2019 Simpler Notations - Automata Theory Questions and Answers - Sanfoundry

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.

https://www.sanfoundry.com/automata-theory-questions-answers-simpler-notations/ 5/5
8/27/2019 DFA Language - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – The Language of DFA

This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “The
Language of DFA”

1. How many languages are over the alphabet R?


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

2. According to the 5-tuple representation i.e. FA= {Q, ∑, δ, q, F}


Statement 1: q ϵ Q’; Statement 2: FϵQ
a) Statement 1 is true, Statement 2 is false
b) Statement 1 is false, Statement 2 is true
c) Statement 1 is false, Statement 2 may be true
d) Statement 1 may be true, Statement 2 is false
View Answer
Answer: b
Explanation: Q is the Finite set of states, whose elements i.e. the states constitute the finite automata.

3. δˆ tells us the best:


a) how the DFA S behaves on a word u
b) the state is the dumping state
c) the final state has been reached
d) Kleene operation is performed on the set
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

https://www.sanfoundry.com/automata-theory-questions-answers-the-language-dfa/ 1/4
8/27/2019 DFA Language - Automata Theory Questions and Answers - Sanfoundry

c) ε may not belong to 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
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

https://www.sanfoundry.com/automata-theory-questions-answers-the-language-dfa/ 2/4
8/27/2019 DFA Language - Automata Theory Questions and Answers - Sanfoundry
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:

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.

https://www.sanfoundry.com/automata-theory-questions-answers-the-language-dfa/ 3/4
8/27/2019 DFA Language - Automata Theory Questions and Answers - Sanfoundry

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 Language
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.

https://www.sanfoundry.com/automata-theory-questions-answers-the-language-dfa/ 4/4
8/27/2019 Finite Automata Interview Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Finite Automata

This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Regular
Language & Expression”.

1. There are ________ tuples in finite state machine.


a) 4
b) 5
c) 6
d) unlimited
View Answer
Answer:b
Explanation: States, input symbols,initial state,accepting state and transition function.

advertisement

2. Transition function maps.


a) Σ * Q -> Σ
b) Q * Q -> Σ
c) Σ * Σ -> Q
d) Q * Σ -> Q
View Answer
Answer:d
Explanation: Inputs are state and input string output is states.

3. Number of states require to accept string ends with 10.


a) 3
b) 2
c) 1
d) can’t be represented.
View Answer
Answer:a
Explanation: This is minimal finite automata.

4. Extended transition function is .


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.
https://www.sanfoundry.com/automata-theory-mcqs-finite-automata/ 1/4
8/27/2019 Finite Automata Interview Questions and Answers - Sanfoundry

5. δ*(q,ya) is equivalent to .
a) δ((q,y),a)
b) δ(δ*(q,y),a)
c) δ(q,ya)
d) independent from δ notation
View Answer
Answer:b
Explanation: First it parse y string after that it parse a.

6. String X is accepted by finite automata if .


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
c) If automata touch final state in its life time
d) All language are language of automata
View Answer
Answer:a
Explanation: If a string accepted by automata it is called language of automata.

8. Language of finite automata is.


a) Type 0
b) Type 1
c) Type 2
d) Type 3
View Answer
Answer:d
Explanation: According to Chomsky classification.

https://www.sanfoundry.com/automata-theory-mcqs-finite-automata/ 2/4
8/27/2019 Finite Automata Interview Questions and Answers - Sanfoundry

9. Finite automata requires minimum _______ number of stacks.


a) 1
b) 0
c) 2
d) None of the mentioned
View Answer
Answer:b
Explanation: Finite automata doesn’t require any stack operation .

10. Number of final state require to accept Φ in minimal finite automata.


a) 1
b) 2
c) 3
d) None of the mentioned
View Answer
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 mentioned
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
Explanation: Number of DFA’s = 2n * n(2*n).

advertisement

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.

https://www.sanfoundry.com/automata-theory-mcqs-finite-automata/ 3/4
8/27/2019 Finite Automata Interview Questions and Answers - Sanfoundry

c) It sometimes fails to recognize regular grammar.


d) All of the mentioned
View Answer
Answer:a
Explanation:Because there is no memory associated with automata.

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 mentioned
View 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 mentioned
View Answer
Answer:a
Explanation: Use them as a flip flop output .

https://www.sanfoundry.com/automata-theory-mcqs-finite-automata/ 4/4
8/27/2019 Non Deterministic Finite Automata Theory Questions and Answers - Sanfoundry

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”

1. Which of the following options is correct?


Statement 1: Initial State of NFA is Initial State of DFA.
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
b) Statement 1 is true and Statement 2 is false
c) Statement 1 can be true and Statement 2 is true
d) Statement 1 is false and Statement 2 is also false
View Answer
Answer: a
Explanation: Statement 1 and 2 always true for a given Language.

advertisement

2. Given Language: L= {ab U aba}*


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
d) None of the mentioned.
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.

https://www.sanfoundry.com/automata-theory-questions-answers-non-deterministic-finite-automata-introduction/ 1/4
8/27/2019 Non Deterministic Finite Automata Theory Questions and Answers - Sanfoundry

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.

5. NFA, in its name has ’non-deterministic’ because of :


a) The result is undetermined
b) The choice of path is non-deterministic
c) The state to be transited next is non-deterministic
d) All of the mentioned
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

6. Which of the following is correct proposition?


Statement 1: Non determinism is a generalization of Determinism.
Statement 2: Every DFA is automatically an NFA

a) Statement 1 is correct because Statement 2 is correct


b) Statement 2 is correct because Statement 2 is correct
c) Statement 2 is false and Statement 1 is false
d) Statement 1 is false because Statement 2 is false
View Answer
Answer: b
Explanation: DFA is a specific case of NFA.

7. Given Language L= {xϵ {a, b}*|x contains aba as its substring}


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.

https://www.sanfoundry.com/automata-theory-questions-answers-non-deterministic-finite-automata-introduction/ 2/4
8/27/2019 Non Deterministic Finite Automata Theory Questions and Answers - Sanfoundry

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.

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

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 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.

https://www.sanfoundry.com/automata-theory-questions-answers-non-deterministic-finite-automata-introduction/ 3/4
8/27/2019 Non Deterministic Finite Automata Theory Questions and Answers - Sanfoundry

https://www.sanfoundry.com/automata-theory-questions-answers-non-deterministic-finite-automata-introduction/ 4/4
8/27/2019 Extended Transition Function - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Extended Transition


Function

This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Extended
Transition Function”.

1. The number of tuples in an extended Non Deterministic Finite Automaton:


a) 5
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.

advertisement

2. Choose the correct option for the given statement:


Statement: The DFA shown represents all strings which has 1 at second last position.

a) Correct
b) Incorrect, Incomplete DFA
c) Wrong proposition
d) May be correct
View Answer
Answer: c
Explanation: The given figure is an NFA. The statement contradicts itself.

3. What is wrong in the given definition?


Def: ({q0, q1, q2}, {0,1}, δ, q3, {q3})
a) The definition does not satisfy 5 Tuple definition of NFA
b) There are no transition definition
c) Initial and Final states do not belong to the Graph
d) Initial and final states can’t be same
View Answer
Answer: c
Explanation: q3 does not belong to Q where Q= set of finite states.

https://www.sanfoundry.com/automata-theory-questions-answers-extended-transition-function/ 1/4
8/27/2019 Extended Transition Function - Automata Theory Questions and Answers - Sanfoundry

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
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 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

https://www.sanfoundry.com/automata-theory-questions-answers-extended-transition-function/ 2/4
8/27/2019 Extended Transition Function - Automata Theory Questions and Answers - Sanfoundry

c) 2
d) 1
View Answer
Answer: d
Explanation: The transition graph is made and thus the answer can be found.

8. From the given table, δ*(q0, 011) =?

a) {q0}
b) {q1} U {q0, q1, q2}
c) {q2, q1}
d) {q3, q1, q2, q0}
View Answer
Answer: b
Explanation: δ*(q0,011) = Urϵδ*(q0,01) δ (r, 1) = {q0, q1, q2}.

9. Number of times the state q3 or q2 is being a part of extended 6 transition state is

a) 6
b) 5

https://www.sanfoundry.com/automata-theory-questions-answers-extended-transition-function/ 3/4
8/27/2019 Extended Transition Function - Automata Theory Questions and Answers - Sanfoundry

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.

10. Predict the missing procedure:

1.Δ(Q0, ε) ={Q0},
2.Δ(Q0, 01) = {Q0, Q1}
3.δ(Q0, 010) =?

advertisement

a) {Q0, Q1, Q2}


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.

https://www.sanfoundry.com/automata-theory-questions-answers-extended-transition-function/ 4/4
8/27/2019 NFA Language - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – The Language of NFA

This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “The
Language of NFA”.

1. Subset Construction method refers to:


a) Conversion of NFA to DFA
b) DFA minimization
c) Eliminating Null references
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.

3. Which of the following does the given NFA represent?

https://www.sanfoundry.com/automata-theory-questions-answers-the-language-nfa/ 1/4
8/27/2019 NFA Language - Automata Theory Questions and Answers - Sanfoundry

a) {11, 101} * {01}


b) {110, 01} * {11}
c) {11, 110} * {0}
d) {00, 110} * {1}
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
d) 0
View Answer
Answer: a
Explanation:

advertisement

5. If L is a regular language, Lc and Lr both will be:


a) Accepted by NFA
b) Rejected by NFA
c) One of them will be accepted
d) Cannot be said
View Answer
Answer: a
Explanation: If L is a regular Language, Lc and Lr both are regular even.

https://www.sanfoundry.com/automata-theory-questions-answers-the-language-nfa/ 2/4
8/27/2019 NFA Language - Automata Theory Questions and Answers - Sanfoundry

6. In NFA, this very state is like dead-end non final state:


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.

7. We can represent one language in more one FSMs, true or false?


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

8. The production of form non-terminal -> ε is called:


a) Sigma Production
b) Null Production
c) Epsilon Production
d) All of the mentioned
View Answer
Answer: b
Explanation: The production of form non-terminal ->ε is call null production.

9. Which of the following is a regular language?


a) String whose length is a sequence of prime numbers
b) String with substring wwr in between
c) Palindrome string
d) String with even number of Zero’s
View Answer
Answer: d
Explanation: DFSM’s for the first three option is not possible; hence they aren’t regular.

https://www.sanfoundry.com/automata-theory-questions-answers-the-language-nfa/ 3/4
8/27/2019 NFA Language - Automata Theory Questions and Answers - Sanfoundry

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 mentioned
View Answer
Answer: d
Explanation: All the three option refers to same technique if distinguishing similar constructions for
different type of automata.

https://www.sanfoundry.com/automata-theory-questions-answers-the-language-nfa/ 4/4
8/27/2019 Equivalence of NFA & DFA - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Equivalence of NFA and


DFA

This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Equivalence
of NFA and DFA”.

1. Under which of the following operation, NFA is not closed?


a) Negation
b) Kleene
c) Concatenation
d) None of the mentioned
View Answer
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 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.

3. Which of the following is an application of Finite Automaton?


a) Compiler Design
b) Grammar Parsers
c) Text Search
d) All of the mentioned
View Answer
Answer: d
Explanation: There are many applications of finite automata, mainly in the field of Compiler Design and
Parsers and Search Engines.

https://www.sanfoundry.com/automata-theory-questions-answers-equivalence-nfa-dfa/ 1/4
8/27/2019 Equivalence of NFA & DFA - Automata Theory Questions and Answers - Sanfoundry

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:

advertisement

5. Which of the following do we use to form an NFA from a regular expression?


a) Subset Construction Method
b) Power Set Construction Method
c) Thompson Construction Method
d) Scott Construction Method
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
d) None of the mentioned
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.

7. Which among the following is not an application of FSM?


a) Lexical Analyser
b) BOT

https://www.sanfoundry.com/automata-theory-questions-answers-equivalence-nfa-dfa/ 2/4
8/27/2019 Equivalence of NFA & DFA - Automata Theory Questions and Answers - Sanfoundry

c) State charts
d) None of the mentioned
View Answer
Answer: d
Explanation: Finite state automation is used in Lexical Analyser, Computer BOT (used in games), State
charts, etc.

advertisement

8. L1= {w | w does not contain the string tr }


L2= {w | w does contain the string tr}
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

https://www.sanfoundry.com/automata-theory-questions-answers-equivalence-nfa-dfa/ 3/4
8/27/2019 Equivalence of NFA & DFA - Automata Theory Questions and Answers - Sanfoundry

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.

https://www.sanfoundry.com/automata-theory-questions-answers-equivalence-nfa-dfa/ 4/4
8/27/2019 DFA Applications - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Applications of DFA

This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Applications
of DFA”.

1. Given Language: {x | it is divisible by 3}


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

2. A binary string is divisible by 4 if and only if it ends with:


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 non-
final states.

https://www.sanfoundry.com/automata-theory-questions-answers-aplications-dfa/ 1/4
8/27/2019 DFA Applications - Automata Theory Questions and Answers - Sanfoundry

4. If L1 and L2 are regular languages, which among the following is an exception?


a) L1 U L2
b) L1 – L2
c) L1 ∩ L2
d) All of the mentioned
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)

https://www.sanfoundry.com/automata-theory-questions-answers-aplications-dfa/ 2/4
8/27/2019 DFA Applications - Automata Theory Questions and Answers - Sanfoundry

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.

7. Statement 1: NFA computes the string along parallel paths.


Statement 2: An input can be accepted at more than one place in an NFA.
Which among the following options are most appropriate?
a) Statement 1 is true while 2 is not
b) Statement 1 is false while is not
c) Statement 1 and 2, both are true
d) Statement 1 and 2, both are false
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.

https://www.sanfoundry.com/automata-theory-questions-answers-aplications-dfa/ 3/4
8/27/2019 DFA Applications - Automata Theory Questions and Answers - Sanfoundry
advertisement

8. Which of the following options is correct for the given statement?


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)
b) Δ’ = δ’ (R, a) = {q ϵ Q | q ϵ δ (r, a), for some r ϵ R}
c) Q’={q0}
d) All of the mentioned
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 .

https://www.sanfoundry.com/automata-theory-questions-answers-aplications-dfa/ 4/4
8/27/2019 NFA Applications - Automata Theory Questions and Answers - Sanfoundry

Automata Theory Questions and Answers – Applications of NFA

This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “Applications
of NFA”.

1. Under which of the following operation, NFA is not closed?


a) Negation
b) Kleene
c) Concatenation
d) None of the mentioned
View Answer
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 said
View Answer
Answer: a
Explanation: None.

3. Which of the following is an application of Finite Automaton?


a) Compiler Design
b) Grammar Parsers
c) Text Search
d) All of the mentioned
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

https://www.sanfoundry.com/automata-theory-questions-answers-applications-nfa/ 1/3
8/27/2019 NFA Applications - Automata Theory Questions and Answers - Sanfoundry

b) 11
c) 12
d) 15
View Answer
Answer: a
Explanation: None.

advertisement

5. Which of the following do we use to form an NFA from a regular expression?


a) Subset Construction Method
b) Power Set Construction Method
c) Thompson Construction Method
d) Scott Construction Method
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
d) None of the mentioned
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.

7. Which among the following is not an application of FSM?


a) Lexical Analyser
b) BOT
c) State charts
d) None of the mentioned
View Answer
Answer: d
Explanation: Finite state automation is used in Lexical Analyser, Computer BOT (used in games), State
charts, etc.

advertisement

https://www.sanfoundry.com/automata-theory-questions-answers-applications-nfa/ 2/3
8/27/2019 NFA Applications - Automata Theory Questions and Answers - Sanfoundry

8. L1= {w | w does not contain the string tr }


L2= {w | w does contain the string tr}
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.

https://www.sanfoundry.com/automata-theory-questions-answers-applications-nfa/ 3/3

You might also like