{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Exercise1 - SICS2133Exercise1 Exercise 1.1 A number-string...

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

View Full Document Right Arrow Icon
Introduction to compiler design SICS 2133 – Exercise 1 Exercise 1.1 A number-string is a non-empty sequence of decimal digits, i.e., something in the language defined by the regular expression [0-9] + . The value of a number-string is the usual interpretation of a number- string as an integer number. Note that in the following leading, zeroes are allowed. Make for each of the following languages a regular expression that describes that language. a) All number-strings that have the value 42. b) All number-strings that do not have the value 42. c) All number-strings that have a value that is strictly greater than 42. Exercise 1.2 Given the regular expression a*(a|b)aa: a) Construct an equivalent NFA using the method in section 2.5. b) Convert this NFA to a DFA using algorithm 2.3. Exercise 1.3 Given the regular expression ((a|b)(a|bb))*: a) Construct an equivalent NFA using the method in section 2.5. b) Convert this NFA to a DFA using algorithm 2.3.
Background image of page 1

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

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

{[ snackBarMessage ]}