nfa-sol

# nfa-sol - ECE 573 Problem Set 1 Solutions 1 We first define...

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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE 573 Problem Set 1: Solutions 1. We first define a few helper expressions, which we will use to construct the larger regular expression. D , [0- 9] All digits, 0 through 9 E , [0 , 2- 9] All digits except 1 F , [2- 9] All digits except 0 and 1 We can now define the regular expression for phone numbers: F ( ED | 1 E ) D 4 In English, the number should start with a digit other than 0 or 1. The number should then should continue with a two digit number which is not 11 (which we represent by a number that either does not start with 1, or does start with 1 but is not 11). Finally, the number should end with 4 digits, which can be anything. 2. The DFA accepting this regular expression is given below. F 1 E E D D D D D 3. We begin by building the NFAs for each of the components of the regular expression. Note that for brevity, we have omitted the incoming arrow for the start state. Unless otherwise specified, the left-most state is the start state....
View Full Document

• Fall '08
• TEST
• Numerical digit, Formal languages, Regular expression, Regular language, Nondeterministic finite state machine, Automata theory

{[ snackBarMessage ]}

### Page1 / 4

nfa-sol - ECE 573 Problem Set 1 Solutions 1 We first define...

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

View Full Document
Ask a homework question - tutors are online