# hw1_sol - Formal Languages and Theory of Computation...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Formal Languages and Theory of Computation Homework 1 Solutions 2009.10.20 1.3. Here is the state diagram. 1.6. a. The formal description of the DFA is M = ( { q 1 ,q 2 ,q 3 ,q 4 } , { , 1 } ,δ,q 1 , { q 4 } ), where δ is given by following table. 1 q 1 q 2 q 3 q 2 q 2 q 2 q 3 q 4 q 3 q 4 q 4 q 3 Then, we show that L ( M ) = { w | w begins with a 1 and ends with a 0 } . First, ob- serve that any string which begins with a 0 will leave M in state q 2 , so it is rejected. On the other hand, any string which begins with a 1 and ends with a 1 will leave M in state q 3 , while any string which begins with a 1 and ends with a 0 will leave M in state q 4 . Since the set of accept states is { q 4 } , we complete the proof. i. The DFA is M = ( Q, Σ ,δ,q ,F ), where 1. Q = { q ,q 1 ,q 2 ,q 3 } , 2. Σ = { , 1 } , 3. δ is 1 q { q 3 } { q 1 } q 1 { q 2 } { q 2 } q 2 { q 3 } { q 1 } q 3 { q 3 } { q 3 } 4. q is the start state, and 5. F = { q 1 ,q 2 } (p.s. Show that L ( M ) = { w | every odd position of w is a 1 } .) 1 k. The DFA is ( Q,...
View Full Document

## This note was uploaded on 11/25/2009 for the course FORMAL formal taught by Professor Pro during the Spring '09 term at National Cheng Kung University.

### Page1 / 4

hw1_sol - Formal Languages and Theory of Computation...

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

View Full Document
Ask a homework question - tutors are online