Professional Documents
Culture Documents
Assignment 1 (60 Points)
Assignment 1 (60 Points)
1 (10 points) The formal description of a DFA M is ({q1 , q2 , q3 , q4 , q5 }, {u, d}, δ, q3 , {q3 }),
where δ is given by the following table. Let L(M ) be the language of this machine M .
Answer the following questions:
u d
q1 q1 q2
q2 q1 q3
q3 q2 q4
q4 q3 q5
q5 q4 q5
2 (10 points) Let Σ = {0, 1} and let v(w) be the value of w in decimal where w is a
string of unsigned binary. For examples, v(0010) = 2 and v(011010) = 26. Note that
v(ε) is undefined. Let
For example,
• 0100 – accept since v(0100) = 4,
• 0000110 – reject since v(0000110) = 6,
• 1101 – reject since v(1101) = 13 and
• 000000011 – accept since v(000000011) = 3.
Create a state diagram of a machine that recognizes A.
3 (10 points) Let Σ = {0, 1}. Give state diagrams of a DFA recognizing the languages:
{w | w begins with a 1 and ends with a 0}