Toc Question
Toc Question
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
Explanation: A partially ordered relation is reflexive, transitive, and antisymmetric. So
at minimum, it must be reflexive and transitive.
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
Explanation: Non-Kleene Star here refers to finite strings only (not including ε). We want
strings with even number of 0s and 1s. Only option b satisfies this.
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
Explanation: The question is a bit tricky. These are actually the closure properties of
regular languages, so none of them are operations that "cannot be used". Hence, the
correct answer here is d, though the statement is awkwardly phrased.
a) 1
b) 3
c) 5
d) 7
Explanation: To recognize divisibility by 3 (mod 3), we use 3 states representing
remainders 0, 1, and 2.
a) Input alphabet
b) Transition function
c) Initial State
d) Output Alphabet
Explanation: A DFA/NFA is defined as (Q, ∑, δ, q₀, F). Output alphabet is used in Moore
and Mealy machines, not in standard finite automata.
a) Compiler
b) Interpreter
c) Loader and Linkers
d) None of the mentioned
Explanation: This is a vague question, but by convention, compilers translate infinite or
complex codebases into finite machine-level code. Hence, a is chosen.
8. The number of elements in the set for the Language L = {x ∈ (∑r)* | length of x is at most
2} and ∑ = {0,1} is _________
a) 7
b) 6
c) 8
d) 5
Answer: a
Explanation: ∑ = {0,1}, so strings of length ≤2 are:
• Length 0: ε
• Length 1: 0, 1
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)
cpp
CopyEdit
Explanation: In δ (0, n) = m, 'n' is being used as input, which is not valid (input symbols
must come from ∑ like 0 or 1).
a) transitions
b) states
c) all of the mentioned
d) none of the mentioned
Explanation: In a Moore machine, output is associated with states, not transitions.
3. For a given Moore Machine, if Input = '101010', the output would be of length:
a) |Input| + 1
b) |Input|
c) |Input - 1|
d) Cannot be predicted
Explanation: Since output is tied to states, and the machine starts in an initial state
(before input is processed), the output length is 1 more than input.
4.
• Statement 1 is true because the initial state's output is produced even for empty
input.
a) 3 and 6
b) 3 and 5
c) 2 and 4
d) 2 and 5
Explanation:
For residue mod 3, we need 3 states (for remainder 0, 1, 2) and 2 transitions per state (for
binary input: 0 and 1), so total 3 × 2 = 6 transitions.
diff
CopyEdit
----------------|------------|-------
Q0 | Q1 |?
Q1 | Q2 |?
Q2 | Q0 |?
a) Q0, Q2, 0
b) Q0, Q2, 1
c) Q1, Q2, 1
d) Q1, Q0, 0
Explanation: Based on Moore machine behavior and expected outputs, option a
correctly fits the state transitions and output.
a) δ
b) ∆
c) ∑
d) None of the mentioned
Explanation: In Moore machines, the output alphabet is denoted by ∆, and the output
function maps states to output symbols in ∆.
a) Op(t) = δ(Op(t))
b) Op(t) = δ(Op(t), i(t))
c) Op(t) : ∑
d) None of the mentioned
Explanation: Output is a function of the current state only in Moore machine, so Op(t) =
δ(Op(t)) is correct.
• Moore and Mealy machines do not have accepting states since they are not
acceptors but transducers.
• Conversion is possible both ways, although Moore may need more states during
conversion.
1. Which of the following does not belong to input alphabet if S = {a, b}*?
a) a
b) b
c) e
d) none of the mentioned
Answer: c
Explanation: Epsilon (ε) is used for transitions without input but is not part of the
input alphabet.
2. How many final states are needed for the language L = {aⁿ | n is even or divisible by
3}?
a) 1
b) 2
c) 3
d) 4
Answer: b
Explanation: Only 2 final states are sufficient to capture "even" and "divisible by 3"
conditions.
4. State true or false: NFA and ε-NFA recognize the same languages.
a) true
b) false
Answer: a
Explanation: ε-NFA just adds convenience, not new expressive power.
5. Which method(s) can be used to simulate the NFA for L = {aⁿ | n even or divisible
by 3}?
a) ε-NFA
b) Power Construction
c) Both a and b
d) None
Answer: c
Explanation: Both methods are valid. ε-NFA is simpler to use.
6. What is the epsilon-closure of 'a' if reachable states are {a, f1, f2, f3}?
a) {f1, f2, f3}
b) {a, f1, f2, f3}
c) {f1, f2}
d) none of the mentioned
Answer: b
Explanation: Epsilon-closure includes the state itself and all ε-reachable states.