This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: # Output = puts $1 puts $2 end 2. (8 pts) Create a NFA for a*a, using the algorithm discussed in class. 3. (18 pts) Consider the following NFA. b a ± 1 2 3 4 ± a a. (3 pts) Does it accept the string “aa”? List a possible sequence of state transitions (e.g., 1,2,3) leading to acceptance / rejection of “aa”. b. (15 pts) Convert the NFA to a DFA using the subset construction algorithm discussed in class. Be sure to label each state in the DFA with the corresponding state(s) in the NFA....
View Full Document
- Fall '08
- pts, University of Maryland, College Park, A Closed Book, following Ruby program