{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cmps104a-2007q4-exam1

# cmps104a-2007q4-exam1 - CMPS-104A Compiler Design I Fall...

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

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 ; No calculator ; No computer ; No email ; No internet ; No notes ; No phone. Neatness counts ! Do your scratch work elsewhere and enter only your final answer into the spaces provided. 1. Given the following NFA that was created by Thompson’s construction. Note that Σ = { a , b , c }, and that the symbol ‘‘ ε ’’ is the 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, draw the DFA. Do not minimize. Do not show dead states. Inside each DFA state show the corresponding NFA states. Label each of your DFA states with a capital letter. (d) Do scratch work elsewhere and then draw a minimized DFA. Again, do not show dead 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 ε ε ε c ε ε ε 2. Draw deterministic finite αυ το ´

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern