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: 2. (4 pts) Ruby features What is the output (if any) of the following Ruby programs? Write FAIL if code does not execute. a. a = [ ] a[1] = b a[2] = 3 a.each{ x puts x } 3. (4 pts) Regular expressions and finite automata Give a regular expression equivalent to the following finite automaton. 1 1 1 4 2 3 4. (6 pts) Regular expression to NFA Create a NFA for the regular expression a(bc)* using construction method from class. 5. (10 pts) NFA to DFA Apply the subset construction algorithm to convert the following NFA to a DFA. Be sure to list the NFA states represented by each DFA state. 1 2 3 a 4 5 6 b 7 8...
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