Assignment 1
Assignment 1
Q1. Define the following terms with suitable examples: Alphabet, Symbol, String, Formal
Language.
Q2. Discuss the equivalence of DFA and NFA. How can any NFA be converted into a DFA?
Q3. Design a DFA over the alphabet {a, b} that accepts all strings ending with "ab".
Q4. Construct an NFA that accepts the language consisting of strings over {0,1} where the
third symbol from the right is '1'.
Q5. Convert the following NFA into an equivalent DFA:
States: {q0, q1},
Alphabet: {0,1},
Start state: q0,
Accepting state: q1,
Transitions:
o δ(q0, 0) = {q0},
o δ(q0, 1) = {q0, q1},
o δ(q1, 1) = {q1}
Q6. Construct an ε-NFA for the regular expression (a|b)*abb.
Q7. Eliminate ε-transitions from the following ε-NFA:
States: {q0, q1, q2},
Alphabet: {a},
Start state: q0,
Accepting state: q2,
Transitions:
o δ(q0, ε) = {q1},
o δ(q1, ε) = {q2},
o δ(q2, a) = {q2}
Q8. What do you mean by Mealy Machine, explain with example? Differentiate between
Mealy and Moore machine.
Q9. Convert the given Mealy Machine into an equivalent Moore Machine.