November 13, 1995 cs330 - Discrete Structures =========================== Fall 1995 Homework #5 Due: November 22 Exercise Points ---------------------- 1 20 2 15 3 30 4 20 5 5 6 15 ---------------------- Total 105 1) Let L={E, abb, b} and M={bba, ba, b}. Evaluate the following language expressions. a) LM b) ML c) L^2 d) M^3 2) Use your wits to find the unknown language L in each of the following language equations. a) {E, a, ab}L = {b, ab, ba, aba, abb, abba} b) L{a, b} = {a, baa, b, bab} c) L{E, a} = {E, a, b, ab, ba, aba} 3. Describe the language for each of the following regular expressions. a) a + b b) a + bc c) a + b* d) ab* + c e) ab* + bc* f) a*bc* + ac 4. Find a regular expression to describe each of the following languages. a) {a, b, c} b) {a, aaa, aaaaa, aaaaaaa, ...} odd number of a c) (a^m)b(c^n) with m and n natural numbers d) {E, a, b, c, aa, bb, cc, aaa, bbb, ccc, .., a^n, b^n, c^n, ...} 5) Find a regular expressin over the alphabet {0, 1} to describe the set of all binary numerals without a leading 0 (except for 0 itself). 6) Find a regular expression for over the alphabet {a, b} to describe each of the following languages. a) strings with even length b) strings containing the substring aba c) strings with an odd number of a's. Please remember to print your name on the front page of your work, together with your SSN.