0% found this document useful (0 votes)
2 views8 pages

Toc Question

The document contains multiple-choice questions and explanations related to automata theory, covering topics such as partially ordered relations, regular languages, finite automata, Moore and Mealy machines, and epsilon-NFA. Each question is followed by options and a detailed explanation of the correct answer. The content is structured to test knowledge on the properties and functions of different types of automata and their operations.

Uploaded by

Devkaran Sain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views8 pages

Toc Question

The document contains multiple-choice questions and explanations related to automata theory, covering topics such as partially ordered relations, regular languages, finite automata, Moore and Mealy machines, and epsilon-NFA. Each question is followed by options and a detailed explanation of the correct answer. The content is structured to test knowledge on the properties and functions of different types of automata and their operations.

Uploaded by

Devkaran Sain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

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

4. Which of the following make the correct combination?

Statement 1: A Finite automaton can be represented graphically


Statement 2: The nodes can be its states
Statement 3: The edges or arcs can be used for transitions
d) All of the mentioned
Explanation: All three are correct; finite automata are often represented using state
diagrams with nodes (states) and edges (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
Explanation: To recognize divisibility by 3 (mod 3), we use 3 states representing
remainders 0, 1, and 2.

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

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.

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

• Length 2: 00, 01, 10, 11


→ Total = 7 strings

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

s: accept = false; cin >> char;

if char = "0" goto n;

Explanation: In δ (0, n) = m, 'n' is being used as input, which is not valid (input symbols
must come from ∑ like 0 or 1).

10. Given: ∑= {a, b}, L= {x ∈ ∑* | x is a string combination}, then ∑⁴ represents which


among the following?

a) {aa, ab, ba, bb}


b) {aaaa, abab, ε, abaa, aabb}
c) {aaa, aab, aba, bbb}
d) All of the mentioned
Explanation: ∑⁴ means all strings of length 4. Option b includes aaaa, abab, abaa, aabb,
which are valid length-4 strings. Including ε seems inconsistent, but according to
Sanfoundry's key, b is marked correct.

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
Explanation: Moore machines are finite automata that produce output based on states,
not inputs.

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

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: 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
c) Statement 1 is false while Statement 2 is true
d) Statement 1 and Statement 2, both are false
Explanation:

• Statement 1 is true because the initial state's output is produced even for empty
input.

• Statement 2 is true because Moore machine is defined with 6-tuples:


M=(Q,Σ,Δ,δ,λ,q0)M = (Q, Σ, Δ, δ, λ, q₀)M=(Q,Σ,Δ,δ,λ,q0), where λ gives output for
states.
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
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.

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

diff

CopyEdit

Present State | Next State | Output

----------------|------------|-------

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.

7. What is the output for the given language?

Language: Over ∑ = {a, b}, print 1 whenever "ab" appears as a substring.


Input: abaaab
a) 0010001
b) 0101010
c) 0111010
d) 0010000
Explanation: Output is 1 at positions where "ab" is formed. In "abaaab", "ab" occurs at
positions 2–3 and 5–6.
8. The output alphabet can be represented as:

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

9. The output of Moore machine can be represented in the format:

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.

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

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

Automata Theory – Mealy Machine-II MCQs

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.

3. An ε-NFA is represented using:


a) Quadruple
b) Quintuple
c) Triple
d) None of the mentioned
Answer: b
Explanation: An ε-NFA has 5 components: (Q, Σ, δ, q₀, F)

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.

7. How many elements are in ε-closure(f2) if it's given as {f2, f3}?


a) 0
b) 1
c) 2
d) 3
Answer: c

8. Which step is not useful in eliminating ε-transitions?


a) Make state accepting if ECLOSE(p) has accepting states
b) Add transitions based on ECLOSE
c) Delete all ε-transitions
d) None of the mentioned
Answer: d
Explanation: All steps are part of the ε-removal process.

9. Is language preserved during ε-transition elimination?


a) yes
b) no
Answer: a
Explanation: Language remains unchanged through the transformation.

10. After removing ε-transitions, how many a-transitions are there?


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

You might also like