Cmps104a-2007q4-exam - CMPS-104A Compiler Design I Fall 2007 Test#1 $Id cmps104a-2007q4-exam1.mm,v 7.86 16:04:30-08 $ page 1 of 3 page 1 page 2

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPS-104A • Compiler Design I • Fall 2007 • Test #1 page 1 of 3 $Id: cmps104a-2007q4-exam1.mm,v 7.86 2007-12-18 16:04:30-08 - - $ page 1 page 2 page 3 Please PRINT using keyboard letters : Name : Login : @ucsc.edu Total / 30 No books ;Nocalculator ; No computer ;Noemail ; No internet ;Nonotes ; No phone. Neatness counts!Do your scratchwork elsewhere and enter only your final answer into the spaces provided. 1. Giventhe following NFAthat was created by Thompson’ sconstruction. Note that Σ= { a , b , c } ,and that the symbol ‘‘ ε ’’ isthe Greek letter ε ’` ψιλο ´ ν . [6 ] (a) What is the original regular expression ? Express your answer using only letters and the metacharacters ‘‘ ( ’’ ,‘‘ ) ’’ ,‘‘ | ’’ ,and ‘‘ * ’’. (b) Fill in the table showing the ε -closure for each state. (c) Using the subset construction, drawthe DFA. Do not minimize. Do not showdead states. Inside each DFAstate showthe corresponding NFAstates. Label each of your DFAstates with a capital letter. (d) Do scratch work elsewhere and then drawaminimized DFA. Again, do not showdead states. state s ε -closure (s) 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 ε a ε b ε ε ε
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/28/2010 for the course CMPS 104A taught by Professor Mackey during the Spring '08 term at University of California, Santa Cruz.

Page1 / 3

Cmps104a-2007q4-exam - CMPS-104A Compiler Design I Fall 2007 Test#1 $Id cmps104a-2007q4-exam1.mm,v 7.86 16:04:30-08 $ page 1 of 3 page 1 page 2

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online