Sie sind auf Seite 1von 2

CSC240 Winter 2014 Homework Assignment 5

Due Friday, April 4

1. Let L be the language over alphabet {a, b} associated with the regular expression r = ab aa + bba ab. Find a nondeterministic nite automaton that is assosiated with L. Hint: Theorem 3.1 from the book An introduction to formal languages and automata might be particularly helpful. You may use -transitions (the book calls them -transitions) if you like.

2. Let (Q, , , s, F ) be a deterministic nite automaton associated with the language L . In other words, (Q, , , s, F ) accepts a string x if and only if x L. Let L = {y : x L.|x| = |y |}. In other words, a string y is in L if and only if y has the same length as some string in L. In particular note that L L . Show that there is a nondeterministic nite automaton (Q , , , S , F ) that is associated with L .

3. For a string x and a natural number k , we write xk for the string x concatenated with itself k times. For example, x0 = and x1 = x for all strings x. Let be any nite alphabet and h : P ( ) P ( ) be the function such that for all L we have h(L) = {x|x| : x L}. Show that there is a regular language L such that h(L) is not regular. Hint: Youll probably need the pumping lemma to answer this question. We will be talking about this lemma on Wednesday, but it is also in the reading in case you want to read ahead.

4. Consider the deterministic nite automaton A shown below (the alphabet is = {a, b, c})

(a) Describe in English the language associated with the automaton A (b) Let L1 be the language of strings that lead to state q1 . In other words, L1 = {x : (q0 , x) = q1 }. Write a regular expression describing L1 . Briey justify your answer. (c) Let La be the language of strings that lead to state qa . In other words, La = {x : (q0 , x) = qa }. Write a regular expression describing La . Hint: You can easily come up with an automaton that is associated with La . Theorem 7.23 in the course notes states that any language associated with an automaton can be associated with a regular expression. Example 7.22 illustrates how to do it.

Das könnte Ihnen auch gefallen