Assignment 1
Assignment 1
ASSIGNMENT – I
Question 1
Construct finite automata over = {0,1} for following languages :
a) Set of all strings with a substring 01.
b) Set of all strings of even length and begins with 0.
c) Set of all strings such that every sequence of four consecutive characters contains a 1.
d) Set of all strings whose last five bits include a 1.
Question 2
Design a DFA equivalent to the NFA given below and minimize it:
State a b
q0 (initial state) q0,q1 q0,q2
q1 - q3
q2 q0,q1 q1
q3 (final state) q2 -
Question 3
Study the automaton given in figure below and state whether the Statements a) to i) are true or false:
a) M is a nondeterministic automaton.
b) δ (q1, 1) is defined.
c) 0100111 is accepted by M.
d) 010101010 is not accepted by M.
e) δ (q0. 01001) = {q1}
f) δ (q0, 011000) = {q0, q1, q2}
g) δ (q2, w) = q2 for any string wϵ{0, 1}*.
h) δ (q1, 11001) = ϕ
i) A string having an even number of 0's is accepted by M.
Question 4
Construct a Mealy machine which can output 0, 1, and 2 as remainder of decimal input after dividing it
by 3. Convert it into Moore machine.