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 = [1,2,3] # Output = b = a.collect { x #{x1}! } puts b 2. (6 pts) Consider the regular expression ab*. Recall * has higher precedence than concatenation. a. (1 pt) Does it accept the string a? Circle one: Yes No b. (5 pts) Create a NFA for ab*, using the algorithm discussed in class. 3. (12pts) Consider the following NFA. 1 3 2 & 4 a & a b a. (2 pts) Does it accept the string aa? List a possible sequence of state transitions (e.g., 1,3,4) leading to acceptance / rejection of aa. b. (10 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
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