A1 - Assignment 1: solution set Jalaj Upadhyay 1 Question 1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment 1: solution set Jalaj Upadhyay 1 Question 1 Let M := (Σ ,Q,S,F,δ ) be an automaton defined over the alphabet set Σ using the transition table δ , where S is the set of the starting states, Q is the set of all states, and F is the set of accepting states. For this question, we assume Σ = { 0 , 1 } . (a) Q := { q 0 ,q 1 } , S := { q 0 } and F = Q . δ ( q 0 , 0) = q 0 , δ ( q 0 , 1) = q 1 , and δ ( q 1 , 1) = q 1 . In order to prove the correctness of the above NFA, we prove both the direction. First, to see that all words in L are accepted by L ( M ) , note that we can break L as a union of ± 0 + 1 + 0 + 1 + . The first part of this union is trivial, the second part is accepted by F = q 0 , the third part by a transition from q 0 to q 1 and then staying thereafter in q 1 . For the last part, we first loop in q 0 and then make a transition of the previous form on seeing the first 1 . To show the converse, we prove the contrapositive. Any words in the complement of L has a substring of the form 10 . Now, notice that once the NFA is fed in 1 , it moves to q 1 , hence forth any encounter with 0 will result in crashing of NFA. Hence, if w ¯ L , it is not accepted by M , proving the result. (b) Q := { q 0 ,q 1 ,q 2 ,q 3 ,q 4 ,q 5 } , S := { q 0 } and F = { q 2 ,q 5 } . The transition table is as follows: δ ( q 0 , 0) = q 1 δ ( q 0 , 1) = q 3 δ ( q 1 , 0) = q 2 δ ( q 1 , 1) = q 4 δ ( q 2 , 0) = q 2 δ ( q 2 , 0) = q 5 δ ( q 3 , 0) = q 4 δ ( q 4 , 0) = q 5 δ ( q 5 , 0) = q 5 . Note that there is encountering a
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/14/2012 for the course CS 360 taught by Professor Johnwatrous during the Winter '08 term at Waterloo.

Page1 / 3

A1 - Assignment 1: solution set Jalaj Upadhyay 1 Question 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online