Hw4-sol - CSC236 Homework 4 Question 1 Part(a The automaton accepts words over cfw_a b where the number of as is congurent to the number of bs

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

View Full Document Right Arrow Icon
CSC236: Homework 4 March 17, 2010 Question 1 Part (a) The automaton accepts words over { a,b } * where the number of a s is congurent to the number of b s modulo 3. Part (b) A B C Part (c) Prove by induction that: The new DFA is in state A i± the old DFA is in one of the states 1 , 5 , 9; The new DFA is in state B i± the old DFA is in one of the states 2 , 6 , 7; The new DFA is in state C i± the old DFA is in one of the states 3 , 4 , 8. The induction base is true since the initial states are A and 1. The induction step follows by considering all the possible transitions. Finally, note that the new DFA accepts i± it is in state A , which happens i± the old DFA is is one of the states 1 , 5 , 9, which happens i± the old DFA accepts. Thus the two DFAs recognize the same language. 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Question 2 Here is the DFA: O A 0 A 1 R 0 R 1 0 1 1 0 0 1 0 1 1 0 Here are the semantics of the di±erent states: 1. State O captures the empty string. 2. States
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/11/2010 for the course CSC CSC236 taught by Professor Farzanazadeh during the Spring '10 term at University of Toronto- Toronto.

Page1 / 3

Hw4-sol - CSC236 Homework 4 Question 1 Part(a The automaton accepts words over cfw_a b where the number of as is congurent to the number of bs

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

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