This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: a. a = 0 # OUTPUT = puts a++ = #{a+1} if a puts a b. b = [ 1, 2, 3 ] # OUTPUT = b.each { c puts c } c. if route66 =~ /([^az]+)/ puts $1 # OUTPUT = puts $2 else puts None end 2. (6 pts) Construct a NFA for the regular expression xy*. You must use the algorithm described in class for full credit. 3. (8 pts) Convert the following NFA into a DFA by applying the subset construction algorithm discussed in class. Be sure to list the NFA states represented by each DFA state. a 1 a 3 2 a 4...
View
Full
Document
This note was uploaded on 01/13/2012 for the course CMSC 330 taught by Professor Staff during the Fall '08 term at Maryland.
 Fall '08
 staff

Click to edit the document details