ps1-sol

# ps1-sol - 1 State a b c Final New state name 1 2 4 2 5 3 7...

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

Problem Set 1: Regular expressions and Finite Automata 1. Give a non-deterministic ﬁnite automaton for the following regular expression: (( a * bc * ) | ( ab * c )) Answer: Here is one possible NFA—yours may look diﬀerent. 1 is the start state. 2 a 3 b c 4 5 a b 6 c 1 7 λ λ λ λ 2. Give a deterministic version of the ﬁnite automaton, using the construction we de- scribed in class. Provide both the graphical representation of the automaton as well as the state transition diagram. Answer: Here is the state transition table, as built through the subset construction:

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: 1 State a b c Final? New state name 1, 2, 4 2, 5 3, 7 Error No 1 2, 5 2 3, 5, 7 6, 7 No 2 3, 7 Error Error 3, 7 Yes 3 2 2 3, 7 Error No 4 3, 5, 7 Error 5 3, 6, 7 Yes 5 6, 7 Error Error Error Yes 6 5 Error 5 6, 7 No 7 3, 6, 7 Error Error 3, 7 Yes 8 The graphical representation can be derived easily from here. 3. Derive the reduced DFA. Provide both the graphical representation of the automaton as well as the state transition diagram. Answer: New states 3 and 8 can be merged. No others can be merged. 2...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

ps1-sol - 1 State a b c Final New state name 1 2 4 2 5 3 7...

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

View Full Document
Ask a homework question - tutors are online