This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECE 468 Problem Set 2: Regular expressions and Finite Automata [ Solutions ] 1. Give a nondeterministic finite automaton for the following regular expression: (( a * b ) * ( bc * ) * ) Answer: We will build this NFA up in pieces. First, let us build NFAs for a * and c * (assume that the leftmost state is the start state): a c Now let us build a * b and bc * : a c b b Now we build ( a * b ) * and ( bc * ) * : 1 a c b b And now we concatenate them by attaching the final state of the first NFA to the start state of the second. Ive numbered the states for convenience in solving the next problem: 4 3 2 a 8 7 c b 6 b 1 5 2. Give a deterministic version of the finite 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: 2 We will build the DFA using the subset construction. Recall that every time we see a transition, we will split our pointer and have one pointer take the transition...
View
Full
Document
This note was uploaded on 02/19/2012 for the course ECE 468 taught by Professor Test during the Fall '08 term at Purdue UniversityWest Lafayette.
 Fall '08
 TEST

Click to edit the document details