sfake3do1 - 6.045J/18.400J: Automata, Computability and...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: 6.045J/18.400J: Automata, Computability and Complexity Prof. Nancy Lynch Homework FAKE 3.1: Solutions Due: NEVER Elena Grigorescu Problem 1 : Algorithms for finite automata (From Sipser Problem 4.11) Design: (a) An algorithm that determines, for any DFA M with alphabet { , 1 } , whether or not M accepts any string containing an odd number of 1s. (b) An algorithm that determines for any DFA M with alphabet { , 1 } , whether or not M accepts all strings containing an odd number of 1s. Solution 1.a: 1. Create a DFA D for { w ∈ { , 1 } * | w contains an odd number of 1s } . 2. Use the product construction to create a DFA T recognizing L ( M ) ∩ L ( D ) (i.e., all strings in L ( M ) that contain an odd number of 1s). 3. Run E DFA (Theorem 4.4 on page 168 of Sipser) to test if T recognizes the empty language, and return the opposite of what E DFA returns. Solution 1.b: 1. Create a DFA D for { w ∈ { , 1 } * | w contains an odd number of 1s } ....
View Full Document

This note was uploaded on 08/12/2009 for the course CS 430 taught by Professor Nancylynch during the Spring '07 term at New Mexico Junior College.

Page1 / 2

sfake3do1 - 6.045J/18.400J: Automata, Computability and...

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