A regular expression denotes:
a) Type-0 languages
b) Type-2 languages
c) Type-3 languages
d) Type-1 languages
✅ Answer: (c) Type-3 languages (Regular)
The Kleene Star operator is represented by:
a) ?
b) +
c) *
d) |
✅ Answer: (c) *
Which of the following regular expressions denotes the set of all strings over {a, b} that contain
at least one ‘a’?
a) (a + b)* a (a + b)*
b) b*
c) (a + b)*
d) a
✅ Answer: a) (a + b)* a (a + b)*
If we have r*, it denotes:
a) r repeated zero or more times
b) r repeated once or more
c) r is optional
d) r is negated
✅ Answer: (a) r repeated zero or more times
If we have r+, it denotes:
a) r repeated zero or more times
b) r repeated once or more
c) r is optional
d) r is negated
✅ Answer: (b) r repeated once or more
If we have r?, it denotes:
a) r is negated
b) r is optional
c) r repeated once or more
d) r repeated zero or more
✅ Answer: (b) r is optional
The operator “|” denotes:
a) Kleene Star
b) Positive Closure
c) OR (Union)
d) Concatenate
✅ Answer: (c) OR (Union)
Concatenate means:
a) Alternate
b) Combine directly
c) Repeat
d) None
✅ Answer: (b) Combine directly
If L(r₁) = {a, b} and L(r₂) = {c}, then L(r₁r₂) = ?
a) {ac, bc}
b) {a, bc}
c) {ac}
d) {abc}
✅ Answer: (a) {ac, bc}
If r₁ denotes L(r₁)= {a} and r₂ denotes L(r₂)= {b}, then r₁|r₂ denotes:
a) {ab}
b) {a, b}
c) {}
d) {ε}
✅ Answer: (b) {a, b}
Kleene Star of ∅ is:
a) ∅
b) {ε}
c) {∅}
d) undefined
✅ Answer: (b) {ε}
Which of the following is not a regular language?
a) Strings with even number of 1s
b) Palindromes over {a, b}
c) Strings ending with “01”
d) Strings with at most 3 a’s
✅ Answer: b) Palindromes over {a, b}
Kleene Star of {ε} is:
b) ∅
a) {ε}
c) {ε, εε, εεε,...}
d) undefined
✅ Answer: (a) {ε}
The literal symbol in a regular expression is:
a) Kleene
b) Union
c) Concatenate
d) An alphabet character
✅ Answer: (d) An alphabet character
The empty set is represented by:
b) ∅
a) ε
c) {}
d) λ
✅ Answer: (b) ∅
a) ∅
The empty string is represented by:
b) ε
c) {}
d) λ
✅ Answer: (b) ε (or λ)
a) L₁ ∪ L₂
If r denotes L(r)=L₁ and s denotes L(s)=L₂, then r+s denotes:
b) L₁ ⋅ L₂ (Concatenate)
c) L₁*
d) (L₁)*
✅ Answer: (a) L₁ ∪ L₂
a) L₁ ∪ L₂
If r denotes L(r)=L₁ and s denotes L(s)=L₂, then r.s denotes:
b) L₁ ⋅ L₂ (Concatenate)
c) L₁*
d) (L₁)*
✅ Answer: (b) L₁ ⋅ L₂ (Concatenate)
a) L₁ ∪ {ε}
If r denotes L(r)=L₁, then r* denotes:
b) L₁ concatenated to itself zero or more times
c) L₁ concatenated once or more
d) L₁ reversed
✅ Answer: (b) L₁ concatenated to itself zero or more times
Which operation is not closed for context-free languages?
a) Union
b) Concatenation
c) Intersection
d) Kleene Star
✅ Answer: c) Intersection
If r denotes L(r)=L₁, then r+ denotes:
a) L₁*
b) L₁* minus ε
d) L₁ ∪ {ε}
c) L₁ concatenated at least once
✅ Answer: (c) L₁ concatenated at least once
a) L₁ ∪ {ε}
If r denotes L(r)=L₁, then r? denotes:
b) L₁*
c) L₁+
d) L₁|L₁
✅ Answer: (a) L₁ ∪ {ε}
The expression (a|b)* denotes:
a) All strings of a's and b's
b) All strings starting with a or b
c) All non-empty strings of a's and b's
d) Alternate a's and b's
✅ Answer: (a) All strings of a's and b's (including empty)
(ab)* denotes:
a) All strings composed of repeated “ab”
b) All strings of a's and b's
c) All non-empty strings starting with a and ending with b
d) All strings with a immediately followed by b
✅ Answer: (a) All strings composed of repeated “ab”
ab denotes:
a) Zero or more a's followed by a single b
b) An a followed by zero or more b's
c) At most a then b*
d) All words with a's and b's
✅ Answer: (a) Zero or more a's followed by a single b
(a|b)+ denotes:
a) At least 1 symbol, a or b
b) Zero or more a or b
c) Exactly 1 symbol
d) All words starting with a or b
✅ Answer: (a) At least 1 symbol, a or b
If r₁ and r₂ are regular expressions, then r₁|r₂ is:
a) Union
b) Concatenate
c) Kleene
d) Positive closure
✅ Answer: (a) Union
If r₁ and r₂ are regular expressions, then r₁r₂ denotes:
a) Union
b) Kleene
c) Concatenate
d) Positive closure
✅ Answer: (c) Concatenate
If r is a regular expression, r* denotes:
a) Kleene Star
b) Positive Closure
c) Optional
d) Union
✅ Answer: (a) Kleene Star
If r is a regular expression, r+ denotes:
a) Kleene Star
b) Positive Closure
c) Optional
d) Union
✅ Answer: (b) Positive Closure
If r is a regular expression, r? denotes:
a) Kleene Star
b) Positive Closure
c) Optional
d) Union
✅ Answer: (c) Optional
The following expresses:
a* | b*
a) All strings of a's or all strings of b's
b) All combinations of a's and b's
c) All non-empty strings
d) All words starting with a or b
✅ Answer: (a) All strings of a's or all strings of b's
Which of the following statements about regular languages is true?
a) All finite languages are regular
b) Regular languages are closed under union
c) Regular languages are closed under complement
d) All of the above
✅ Answer: d) All of the above
(a|b)* denotes:
a) All strings made of a and b in any combination
b) All words starting with a or b
c) All non-empty strings made of a or b
d) All words ending with a or b
✅ Answer: (a) All strings made of a and b in any combination
The expression (a*)* is equivalent to:
a) a*
b) (a*)*
c) a+
d) (a*)+
✅ Answer: (a) a*
The expression (r*)* reduces to:
a) r*
b) r+
c) r??
d) r
✅ Answer: (a) r*
The expression r | r is equivalent to:
a) r
b) r*
c) r+
d) r??
✅ Answer: (a) r
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
✅ Answer: a) 4 + 4
The expression r r* is equivalent to:
a) r+
b) r*
c) r??
d) r
✅ Answer: (a) r+
The expression (ab)* denotes:
a) An arbitrary number of "ab" concatenated together
b) An arbitrary number of a's or b's
c) All non-empty strings starting with a and ending with b
d) All words with a's and b's in any order
✅ Answer: (a) An arbitrary number of "ab" concatenated together
The expression a(a|b)* denotes:
a) All strings starting with a
b) All strings ending with a
c) All non-empty strings
d) All strings with a somewhere
✅ Answer: (a) All strings starting with a
The expression (a|b)*b denotes:
a) All strings over {a,b} that end in b
b) All strings starting with b
c) All non-empty strings
d) All strings with b somewhere
✅ Answer: (a) All strings over {a,b} that end in b
The maximum number of transitions which can be performed over a state in a DFA? ∑ = {a, b,
c}
a) 1
b) 2
c) 3
d) 4
✅ Answer: c) 3
If we apply Kleene plus to ∅:
a) ∅
b) {ε}
c) undefined
d) {∅}
✅ Answer: (a) ∅
If we apply Kleene plus to {ε}:
b) ∅
a) {ε}
c) {ε, εε, …}
d) {ε}*
✅ Answer: (a) {ε}
The operator Kleene plus (+) guarantees:
a) At least 1 occurrence
b) At most 1 occurrence
c) Exactly 1 occurrence
d) 0 or more
✅ Answer: (a) At least 1 occurrence
The symbol “|” in a regular expression denotes:
a) Kleene Star
b) Positive Closure
c) Union
d) Concatenate
✅ Answer: (c) Union
The Kleene Star “*” means:
a) At most 1
b) 1 or more
c) 0 or more
d) Exactly 1
✅ Answer: (c) 0 or more
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
✅ Answer: a) 0
The Positive Closure “+” means:
a) At most 1
b) 1 or more
c) 0 or more
d) Exactly 1
✅ Answer: (b) 1 or more
The Optional “?” means:
a) At most 1 or 0
b) At least 1
c) 0 or more
d) 1 or more
✅ Answer: (a) At most 1 or 0
Concatenate means:
a) OR
b) Combine directly
c) Repeat
d) Alternate
✅ Answer: (b) Combine directly
The expression (a|b)* denotes:
a) All strings of a’s or b’s
b) All non-empty strings of a’s and b’s
c) All strings starting with a or b
d) All words with a at the center
✅ Answer: (a) All strings of a’s or b’s
The number of elements in the set for the Language L = {x ∈ (∑)* | length of x is at most 2} and
∑ = {0,1} is __________
a) 7
b) 6
c) 8
d) 5
✅ Answer: a) 7
The expression a+ denotes:
a) At most 1 a
b) At least 1 a
c) 0 or more a’s
d) All a’s or nothing
✅ Answer: (b) At least 1 a
The expression a? denotes:
a) At most 1 a
b) At least 1 a
c) 0 or more a’s
d) All a’s or nothing
✅ Answer: (a) At most 1 a
To match literal “” in a pattern, we use:
a) *
b) \
c) []
d) ()
✅ Answer: (b) \*
To match literal “|” in a pattern, we use:
a) |
b) [|]
c) \|
d) (|)
✅ Answer: (c) \|
To match literal “.” in a pattern, we use:
a) \.
b) .
c) [.]
d) (.)
✅ Answer: (a) \.
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
✅ Answer: d) None of the mentioned
a) L₁ ∪ L₂
If r denotes L(r)=L₁ and s denotes L(s)=L₂ then r|s denotes:
b) L₁ ∩ L₂
d) L₁ ⋅ L₂
c) L₁ \ L₂
✅ Answer: (a) L₁ ∪ L₂
If r and s are two expressions, r s denotes:
a) Union
b) Intersection
c) Concatenate
d) Difference
✅ Answer: (c) Concatenate
If r denotes L(r)=L₁ then r* denotes:
a) 0 or more copies of L₁
b) 1 or more copies of L₁
c) At most 1 of L₁
d) Exactly 1 of L₁
✅ Answer: (a) 0 or more copies of L₁
If r denotes L(r)=L₁ then r+ denotes:
a) 0 or more copies of L₁
b) At least 1 or more copies of L₁
c) At most 1
d) Exactly 1
✅ Answer: (b) At least 1 or more copies of L₁
Regular expressions can describe:
a) All context-free languages
b) All context-sensitive languages
c) All Type-3 (Regular) languages
d) All Type-0 (Turing) languages
✅ Answer: (c) All Type-3 (Regular) languages
The minimum number of states required to recognize an octal number divisible by 3 are/is
a) 1
b) 3
c) 5
d) 7
✅ Answer: b) 3
The alphabet is represented by:
a) Set of terminal symbols
b) Set of non-terminal symbols
c) Set of states
d) Stack symbols
✅ Answer: (a) Set of terminal symbols
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
✅ Answer: d) All of the mentioned
Concatenate r₁ and r₂ means:
a) Union of r₁ and r₂
b) Sequence r₁ then r₂
c) Loop r₁ or r₂
d) Alternate r₁ and r₂
✅ Answer: (b) Sequence r₁ then r₂
To match literal backslash “\” we use:
a) \
b) \
c) \\
d) []
✅ Answer: (a) \
Empty set is represented by:
b) ∅
a) {}
c) λ
d) ''
✅ Answer: (b) ∅
Empty string is represented by:
a) {}
c) ∅
b) λ or ε
d) ''
✅ Answer: (b) λ or ε
Regular expressions do not have the power to match:
a) Balanced brackets
b) Repeating patterns
c) All literal alphabets
d) Kleene closures
✅ Answer: (a) Balanced brackets
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
✅ Answer: c) ε, 0011, 11001100
How many strings match “a|b”?
a) 0
b) 1
c) 2
d) Infinity
✅ Answer: (c) 2
How many strings match “a*”?
a) 0
b) 1
c) 2
d) Infinity
✅ Answer: (d) Infinity
How many strings match “a+”?
a) 0
b) 1
c) 2
d) Infinity
✅ Answer: (d) Infinity
How many strings match “a?”?
a) 0
b) 1
c) 2
d) Infinity
✅ Answer: (c) 2
How many components are there in “(a|b)*”?
a) Kleene, Union, literal
b) Kleene, Concatenate, literal
c) Union, Kleene
d) Kleene, literal
✅ Answer: (c) Union, Kleene
Expression to match a literal “+” is:
a) +
b) +
c) (+)
d) [+]
✅ Answer: (b) +
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
✅ Answer: d) reflexive and transitive
Expression to match 3 a's in a row is:
a) a{3}
b) aaa
c) a*3
d) a+3
✅ Answer: (b) aaa
Expression matching zero or more “ab” is:
a) (ab)*
b) a|b*
c) ab
d) (a|b)*
✅ Answer: (a) (ab)*
Expression matching “a or ab” is:
a) a|ab
b) (a|ab)*
c) a*|b*
d) (a|b)*
✅ Answer: (a) a|ab
Expression matching literal “?” is:
a) ?
b) ?
c) [?]
d) (?)
✅ Answer: (b) ?
Expression matching at most 1 of “ab” is:
a) (ab)*
b) (ab)?
c) (ab)+
d) (ab){1}
✅ Answer: (b) (ab)?
Regular expressions define the language of strings ending in aa or bb.
a) (a+b)aa + (a+b)bb.
b) (a+b)(aa+bb)(a+b).
c) Both a and b.
d) None of them.
✅ Answer: a) (a+b)*aa + (a+b)*bb.
Expression matching at least 1 of “ab” is:
a) (ab)*
b) (ab)?
c) (ab)+
d) (ab){1}
✅ Answer: (c) (ab)+
Expression matching literal “{” is:
a) {
b) {
c) {{
d) [{]
✅ Answer: (b) {
Expression matching literal “}” is:
a) }
b) }
c) [}]
d) ))
✅ Answer: (b) }
Expression matching literal “(” is:
a) (
b) (
c) [(]
d) (/)
✅ Answer: (b) (
Expression matching literal “)” is:
a) )
b) )
c) [)]
d) (/)
✅ Answer: (b) )
Regular expression of language L = {aa, abba, abbbba, abbbbbba, abbbbbbbba,...}
a) a(b)a.
b) aabba
c) a(bb)a.
d) (a+b).
✅ Answer: a) a(b)*a.
Expression matching literal “.” is:
a) .
b) [.]
c) \
d) (+)
✅ Answer: (a) .
Expression matching literal “$” is:
a) $
b) $
c) [$]
d) ($)
✅ Answer: (b) $
Expression matching literal “^” is:
a) ^
b) ^
c) [^]
d) (^)
✅ Answer: (b) ^
Expression matching literal “[” is:
a) [
b) [
c) (/[/)
d) [[]
✅ Answer: (b) [
Expression matching literal “]” is:
a) ]
b) ]
c) (/]/)
d) []]
✅ Answer: (b) ]
Expression matching literal “-” is:
a) -
b) -
c) [-]
d) (/-/)
✅ Answer: (a) -
Expression matching literal “” is:
a) _
b) _
c) (//)
d) [_]
✅ Answer: (a) _
DFA stands for:
a) Determistic Finite Automaton
b) Deterministic Free Automaton
c) Determining Final Automaton
d) Directed Finite Automaton
✅ Answer: (a) Determistic Finite Automaton
DFA consists of:
a) 5-tuple
b) 6-tuple
c) 4-tuple
d) 3-tuple
✅ Answer: (a) 5-tuple
DFA's 5-tuple comprises:
a) Q, ∑, δ, q₀, F
b) Q, ∑, q₀, F
c) Q, ∑, F, T
d) Q, T, F, q₀
✅ Answer: (a) Q, ∑, δ, q₀, F
Q in 5-tuple denotes:
a) Final state
b) Initial state
c) Set of states
d) Input symbol
✅ Answer: (c) Set of states
∑ in 5-tuple denotes:
a) Stack
b) Tape
c) Input alphabet
d) Final state
✅ Answer: (c) Input alphabet
δ in 5-tuple denotes:
a) Transition function
b) Initial state
c) Final state
d) Tape symbol
✅ Answer: (a) Transition function
q₀ in 5-tuple denotes:
a) Final state
b) Initial state
c) Dead state
d) None of these
✅ Answer: (b) Initial state
F in 5-tuple denotes:
a) Final state(s)
b) Initial state
c) Tape head
d) Stack
✅ Answer: (a) Final state(s)
How many initial states does a DFA have?
a) 0
b) 1
c) 2
d) Multiple
✅ Answer: (b) 1
How many final states can a DFA have?
a) 0
b) 1
c) 2
d) Multiple
✅ Answer: (d) Multiple
For each state and symbol in a DFA, there is __________.
a) At most 1 transition
b) At most 2 transitions
c) Exactly 1 transition
d) None
✅ Answer: (c) Exactly 1 transition
A Deterministic Finite Automaton (DFA) can have:
a) Multiple initial states
b) Multiple final states
c) Epsilon (ε) transitions
d) Non-deterministic transitions
✅ Answer: b) Multiple final states
DFA is a __________ machine.
a) Non-deterministic
b) Deterministic
c) Pushdown
d) Turing
✅ Answer: (b) Deterministic
DFA cannot handle languages which are __________.
a) Regular
b) Context-free
c) Type-3
d) Type-1
✅ Answer: (b) Context-free
DFA accepts a string if it reaches __________ after consuming all symbols.
a) Initial state
b) Final state
c) Dead state
d) None
✅ Answer: (b) Final state
DFA has __________ memory.
a) Infinite
b) Stack
c) Tape
d) Limited
✅ Answer: (d) Limited
DFA is a __________ automaton.
a) Pushdown
b) Finite-state
c) Turing
d) Tape
✅ Answer: (b) Finite-state
DFA can be represented by:
a) Transition table
b) Transition graph
c) 5-tuple
d) All of these
✅ Answer: (d) All of these
DFA's transitions are labeled by:
a) Stack symbols
b) Tape symbols
c) Input alphabets
d) Final states
✅ Answer: (c) Input alphabets
DFA is a special case of:
a) NFA
b) PDA
c) Turing Machine
d) Pushdown Automaton
✅ Answer: (a) NFA
Every NFA can be converted to:
a) PDA
b) Turing Machine
c) DFA
d) Pushdown Automaton
✅ Answer: (c) DFA
DFA cannot have:
a) Multiple initial states
b) Final states
c) Loop transitions
d) Dead state
✅ Answer: (a) Multiple initial states
DFA's computational power is __________ NFA's.
a) Less than
b) Equal to
c) More than
d) Uncomparable
✅ Answer: (b) Equal to
DFA accepts __________.
a) Type-0 languages
b) Type-1 languages
c) Type-2 languages
d) Type-3 languages
✅ Answer: (d) Type-3 (Regular) languages
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 ∪ L2 = .*.
b) L1 >= L2.
d) L1 = L2.
✅ Answer: d) L1 = L2.
DFA cannot perform:
a) Union
b) Intersection
c) Complement
d) Stack operations
✅ Answer: (d) Stack operations
DFA's transitions do not have:
a) Loop
b) Deterministic path
c) Epsilon transitions
d) Final state
✅ Answer: (c) Epsilon transitions
DFA's move depends only on:
a) Current state
b) Input symbol
c) Stack
d) (a) and (b)
✅ Answer: (d) (a) and (b)
DFA will halt when:
a) Tape is finished
b) Stack is empty
c) Final state is reached immediately
d) None
✅ Answer: (a) Tape is finished
DFA processing starts from:
a) Initial state
b) Final state
c) Stack
d) Tape
✅ Answer: (a) Initial state
The language is defined, describing the conditions imposed on its________.
a) Numbers.
b) Regular Expression.
c) Words.
d) Alphabet.
✅ Answer: c) Words.
DFA performs __________.
a) Backtrack
b) Lookahead
c) Deterministic move
d) Nondeterministic move
✅ Answer: (c) Deterministic move
DFA can be represented by:
a) Graph or table
b) Pushdown stack
c) Tape
d) Register
✅ Answer: (a) Graph or table
DFA has __________ stack.
a) 0
b) 1
c) 2
d) Unbounded
✅ Answer: (a) 0
DFA is more efficient than NFA in:
a) Conversion
b) Implementation
c) Operations
d) Definition
✅ Answer: (b) Implementation
Which one of the following can be identified this string BababB.
a) {B, aB, bab, d}.
b) {B, Ba, bab, d}.
c) {B, Ba, baabb, d}.
d) {B, Ba, bab, e, f, g}.
✅ Answer: b) {B, Ba, bab, d}.
How much time does a DFA take to process a string of length n?
a) O(1)
b) O(log n)
c) O(n)
d) O(n^2)
✅ Answer: (c) O(n)
DFA is a:
a) Recognizer
b) Transducer
c) Parser
d) Code generator
✅ Answer: (a) Recognizer
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 ∪ L2 = .*.
d) L1 = L2.
✅ Answer: d) L1 = L2.
a) {a^nb^n | n ∈ ℕ}
DFA cannot recognize:
b) (a|b)*
c) ab
d) (ab)*
✅ Answer: (a) {a^nb^n | n ∈ ℕ}
DFA's structure is:
a) Parallel
b) Serial
c) Stack-like
d) Tape-like
✅ Answer: (b) Serial
DFA has __________ transitions from each state.
a) Few
b) Exactly |∑|
c) At most |∑|
d) Unspecified
✅ Answer: (b) Exactly |∑|
DFA is closed under:
a) Union
b) Intersection
c) Complement
d) All of these
✅ Answer: (d) All of these
The language is defined, describing the conditions imposed on its________.
a) Numbers.
b) Regular Expression.
c) Words.
d) Alphabet.
✅ Answer: c) Words.
DFA minimizes by:
a) Merging equivalent states
b) Adding new states
c) Removing transitions
d) Loop removal
✅ Answer: (a) Merging equivalent states
Minimized DFA is __________.
a) Uniquely defined
b) Multiple possibilities
c) Unresolved
d) Nondeterministic
✅ Answer: (a) Uniquely defined
Two DFAs are equivalent if:
a) They have the same initial state
b) They have the same number of states
c) They accept the same set of strings
d) The alphabets match
✅ Answer: (c) They accept the same set of strings
DFA's main limitation is:
a) Stack
b) Tape
c) Memory
d) Register
✅ Answer: (c) Memory
NFA stands for:
a) Nondeterministic Free Automaton
b) Nondeterministic Finite Automaton
c) Nonfunctional Automaton
d) None of these
✅ Answer: (b) Nondeterministic Finite Automaton
Which one of the following can be identified this string BababB.
a) {B, aB, bab, d}.
b) {B, Ba, bab, d}.
c) {B, Ba, baabb, d}.
d) {B, Ba, bab, e, f, g}.
✅ Answer: b) {B, Ba, bab, d}.
NFA is a __________.
a) Deterministic Machine
b) Pushdown Automaton
c) Turing Machine
d) Nondeterministic Machine
✅ Answer: (d) Nondeterministic Machine
NFA's 5-tuple comprises:
a) Q, ∑, δ, q₀, F
b) Q, ∑, F, T
c) Q, ∑, Stack, F, q₀
d) Q, Tape, F, q₀
✅ Answer: (a) Q, ∑, δ, q₀, F
Q denotes:
a) Final state
b) Initial state
c) Set of states
d) Input symbol
✅ Answer: (c) Set of states
∑ denotes:
a) Stack
b) Tape
c) Input alphabet
d) Final state
✅ Answer: (c) Input alphabet
All ______ are strings, but not all strings are _______.
a) Numbers.
b) Regular Expression.
c) Words.
d) Alphabet.
✅ Answer: c) Words.
δ denotes:
a) Transition function
b) Final state
c) Initial state
d) Stack
✅ Answer: (a) Transition function
q₀ denotes:
a) Final state
b) Initial state
c) Tape symbol
d) Stack
✅ Answer: (b) Initial state
F denotes:
a) Final state(s)
b) Initial state
c) Tape
d) Stack
✅ Answer: (a) Final state(s)
Which of the following cannot be represented by a finite automaton?
a) L = {a^n b^n | n ≥ 0}
b) L = {w | w ends in ab}
c) L = {w | w has even number of 0’s}
d) L = {w | w contains substring ‘101’}
✅ Answer: a) L = {a^n b^n | n ≥ 0}
NFA may move to __________ states from a state on an input.
a) At most 1
b) Exactly 1
c) 0 or more
d) None
✅ Answer: (c) 0 or more
NFA can have __________ transitions.
a) Epsilon
b) Tape
c) Pushdown
d) Deterministic
✅ Answer: (a) Epsilon
A finite non-empty set of symbols (letters), is called a/an
a) String.
b) Letters.
c) Character.
d) Alphabet.
✅ Answer: d) Alphabet.
Epsilon transitions are transitions on:
a) Input symbol
b) Stack
c) Tape
d) Empty string
✅ Answer: (d) Empty string
NFA is more __________ than DFA in representation.
a) Complicated
b) Concise
c) Large
d) Slower
✅ Answer: (b) Concise
Every NFA has a __________ equivalent.
a) Pushdown Automaton
b) Turing Machine
c) Determistic Finite Automaton
d) Stack Machine
✅ Answer: (c) Determistic Finite Automaton
Subset or Powerset Construction converts __________.
a) NFA to PDA
b) NFA to Turing Machine
c) NFA to DFA
d) NFA to Stack Machine
✅ Answer: (c) NFA to DFA
L = language of words containing exact odd number of a’s. Regular Expression is
a) (a+b)aa(a+b).
b) (b+aba).
c) a+bbaaba.
d) (a+b)ab(a+b).
✅ Answer: d) (a+b)ab(a+b).
Epsilon closure is the set of states that can be reached by __________.
a) Consuming a symbol
b) Stack operations
c) Epsilon transitions
d) Tape movement
✅ Answer: (c) Epsilon transitions
NFA with epsilon is called:
a) ε-NFA
b) NFA-D
c) E-DFA
d) NPD
✅ Answer: (a) ε-NFA
NFA's main advantage is __________.
a) Faster than DFA
b) Less states in representation
c) Less power
d) Stack usage
✅ Answer: (b) Less states in representation
How much memory does NFA use to compute?
a) Stack
b) Tape
c) Register
d) Finite
✅ Answer: (d) Finite
_____________ is obviously infinite language.
a) Equal-Equal.
b) Even-Even.
c) Palindrome.
d) Factorial.
✅ Answer: c) Palindrome.
NFA's transitions from a state can be represented by:
a) Set of states
b) Pushdown stack
c) Tape
d) Register
✅ Answer: (a) Set of states
NFA accepts a string if __________.
a) All paths lead to final state
b) At least 1 path reaches final state
c) Stack is not empty
d) Tape is filled
✅ Answer: (b) At least 1 path reaches final state
NFA can be in __________ states at once.
a) 0
b) 1
c) Multiple
d) All
✅ Answer: (c) Multiple
DFA is a special case of __________.
a) Pushdown Automaton
b) Turing Machine
c) NFA
d) Stack Machine
✅ Answer: (c) NFA
Epsilon moves do not consume __________.
a) Tape
b) Stack
c) Input symbol
d) Final state
✅ Answer: (c) Input symbol
L = {a,b} then the string produce from this language are (Λ, a, b, aa, bb, aaa, bbb….).
a) L*.
b) L+
c) (L*)*.
d) Both a and c.
✅ Answer: d) Both a and c.
Subset Construction converts NFA to a:
a) PDA
b) Turing Machine
c) Deterministic FA
d) Pushdown Stack
✅ Answer: (c) Deterministic FA
NFA's formal definition is __________.
a) Q, ∑, δ, q₀, F
b) Q, Tape, F
c) Q, Stack, Push, F
d) Q, Turing, Machine
✅ Answer: (a) Q, ∑, δ, q₀, F
NFA performs __________.
a) Backtrack
b) Lookahead
c) Parallel transitions
d) Stack operations
✅ Answer: (c) Parallel transitions
NFA's computational power is __________ to DFA's.
a) Less
b) Equal
c) More
d) Uncomparable
✅ Answer: (b) Equal
NFA is more __________ in representation.
a) Verbose
b) Concise
c) Complicated
d) Large
✅ Answer: (b) Concise
E-NFA stands for:
a) Enhanced NFA
b) Ejected NFA
c) Epsilon NFA
d) Ending NFA
✅ Answer: (c) Epsilon NFA
NFA can move without consuming a symbol; this move is called:
a) Deterministic move
b) Stack move
c) Epsilon move
d) Tape move
✅ Answer: (c) Epsilon move
E-closure of a state comprises:
a) Itself and all states it reaches through epsilon
b) All final states
c) All initial states
d) Stack symbols
✅ Answer: (a) Itself and all states it reaches through epsilon
To construct DFA from NFA, we use:
a) Conversion graph
b) Stack algorithm
c) Powerset Construction
d) Pushdown
✅ Answer: (c) Powerset Construction
Subset Construction converts Q (set of NFA states) into Q’ (set of subsets).
✅ (True)
Every NFA corresponds to a unique DFA.
❌ (False)
NFA's transitions might be undefined for some combinations.
✅ (True)
DFA's transitions are defined for all combinations.
✅ (True)
NFA's size grows __________ than its equivalent DFA.
a) Faster
b) Slower
c) Exponentially
d) Linearly
✅ Answer: (c) Exponentially
NFA is not closed under:
a) Union
b) Kleene Star
c) Complement
d) Concatenate
✅ Answer: (c) Complement
NFA accepts a language if a path to final state __________.
a) May exist
b) Must exist for all
c) Does not exist
d) Is unique
✅ Answer: (a) May exist
DFA has a __________ transition for each symbol in alphabet.
a) Optional
b) Exactly 1
c) At most 1
d) Multiple
✅ Answer: (b) Exactly 1
Subset Construction results in __________ states in worst case.
a) n
b) n^2
c) 2^n
d) n!
✅ Answer: (c) 2^n
NFA is helpful in designing __________.
a) Lexical Analyzers
b) Pushdown Automata
c) Turing Machine
d) All of these
✅ Answer: (a) Lexical Analyzers
NFA's main limitation is __________ during implementation.
a) Backtrack
b) Stack
c) Parallel simulation
d) Tape
✅ Answer: (c) Parallel simulation
Subset Construction merges states into a __________.
a) Stack
b) Tape
c) Set
d) Register
✅ Answer: (c) Set
NFA is a powerful formalism for __________.
a) Recognizing languages
b) Parsing context-free
c) Pushdown operations
d) Turing completeness
✅ Answer: (a) Recognizing languages