Fall 98, CSE 468: Solution of Assignment 3

Exercise 1

  1. The regular expression is: (aba)*
  2. The equivalence classes associated to the indistinguishability relation are:
  3. M is not the minimum FA for L(M). The minimum FA for L(M), M', has four states only. M' can be constructed either on the basis of the partition given above, or by applying the Algorithm 5.1 in Martin's book to M. We give here the solution based on the first technique: The states of M' are: {[lambda],[a],[ab],[b]}. The initial state is [lambda], and [lambda] is also the only acceptance state. The transition relation is:
       Delta([lambda],a) = [a]   Delta([lambda],b) = [b] 
       Delta([a],a) = [b]        Delta([a],b) = [ab] 
       Delta([ab],a) = [lambda]  Delta([ab],b) = [b] 
       Delta([b],a) = [b]        Delta([b],b) = [b] 
    

Exercise 2

The problem is decidable. One possible decision algorithm is the following: The answer to the question "Is L(E) = L(M) ?" is "yes" if M' and N' are isomorphic, "no" otherwise.

Exercise 3

The language is not regular. This can be proved either by using the Myhill-Nerode theorem, or by using the pumping lemma. We give here the solution based on the first approach.

Consider the strings am and an, with m different from n. These two strings are distinguishable, in fact for z = bm+1c amz is in L while anz is not in L. Therefore there are infinitely many different equivalence classes associated to (the indistinguishability relation given by) L, and therefore there cannot be any FA recognizing L.

Exercise 4

  1. L is not representable as a regular expression, because it is not a regular language. To show this, we can use again the Myhill-Nerode theorem (note that the pumping lemma is not useful here): Consider the strings (m and (n, with m different from n. Observe that (ma1)m is in L while (na1)m is not in L. As before, we conclude that there is no FA accepting L.
  2. A possible grammar with the required properties is the following:
     
       E -> E + T | T
       T -> FT | F
       F -> F* 
          | (E) 
          | Lambda 
          | Emptyset
          | a1 | a2 | ... | an