CS 390 Solutions to Unit 17 Exercises



pp. 194 - 195

5.20(c): To distinguish two strings   0m   and   0n,   m n,   select a string   0i1j   such that   i m - 2n   and   j = i + m.
Then   0m0i1j = 0i + m1j   is in L since   j = i + m.   However,   0n0i1j = 0i + n1j   is not in L, because   j i + n   and   j (= i + m) 2(i + n)   either.

5.26(f): Not necessarily true. For example L1 = {a, b}* is regular and L2 = {anbn | n N }, where N is the set of natural numbers, is non-regular.
However, L1 L2 = L1 is regular.

5.27(b): Let us consider the complement of the language. If a language can not contain any strings with substrings of the form ww, then aa or bb among others can not be substrings of its strings. The largest language whose strings do not contain substrings aa or bb is { , a, b, aba, bab }. Let us denote this language by W. Since W is regular, its complement is also regular. The language of this question is the complement of W. Hence it is regular.