Вы находитесь на странице: 1из 1

CSC 333, Spring 2014

Homework 4 Due Friday, February 7 at 5:00 PM Total points = 18

page 1 of 1

1. Do Exercise 1.20(b) on page 86. In addition, give a simple English description of this language. Your English description should be easier to interpret than the regular expression. For example, an English expression for 1.20(e) would be contains aba as a subsequence. 2. Do the same for Exercise 1.20(h) as for the previous problem. 3. Construct an NFA based on the regular expression (ab) a. Follow the mechanical construction of Lemma 1.55 exactly even though you could easily design a smaller NFA. 4. (+) Create a DFA from the NFA constructed in the previous problem. Follow the mechanical construction of Theorem 1.39 exactly, except that you should include only the reachable states (like we did with examples in class). For full credit, you need to provide the condition, the L(q ), for each state. In this case you are allowed to use a regular expression to describe L(q ) but your expression must have a star height 1 at most one. 5. (+) Design a DFA that accepts the set of strings that end with b, where = {a, b}. Then use the construction of Lemma 1.60 on pages 6976 to convert your DFA to a regular expression. You must show each step. And you must explain why your nal regular expression is correct by describing what each part matches. 6. (+) Give a regular expression for {w | w does not contain aab as a substring }. This regular expression should be considerably simpler than one that would result from Lemma 1.60. In particular, it should have star height no more than two (there is a solution with star height one). 7. Do Problem 1.64(a) on page 92.

1 The star height of a regular expression is the maximum depth of nested expressions involving *s, analogous to the maximum number of nested loops in a program. More formally, an expression with no *s has star height 0; an expression of the form (r) , where r has star height h, has star height h + 1. For example 0 1 has star height one and (0 1) has star height two.

Вам также может понравиться