hw3a - Copy (2)

Hw3a Copy(2) - c ’s It is possible that there are no a ’s b ’s or c ’s However is not in the set a b c ∪ a b c ∪ a b c 4(Sudkamp

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
MCS4653, Theory of Computation Homework Assignment 3, Due 9/29/03 Name Student ID Page 1 1. (Sudkamp Problem 2.10, Page 49) Let X = { aa,bb } and Y = { λ,b,ab } . a) List the strings in the set XY . aa, bb, aab, aaab, bb, bbb, bbab b) List the strings of the set Y * of length 3 or less. λ , b, bb, ab, bbb, bab, abb c) How many strings of length 6 are there in X * ? 2 3 = 8 2. (Sudkamp Problem 2.11, Page 50) Let L 1 = { aaa } * , L 2 = { a,b }{ a,b }{ a,b }{ a,b } , and L 3 = L * 2 . Describe the strings that are in the languages a) L 2 all strings of length 4 b) L 3 all strings of length w | w is divisible by 4 c) L 1 L 3 strings of a of length divisible by 3 × 4 = 12 3. (Sudkamp Problem 2.13, Page 50) Give a regular expression that represents the set of strings over { a,b,c } in which all the a ’s precede all the b ’s, which in turn precede all the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: c ’s. It is possible that there are no a ’s, b ’s or c ’s. However, λ is not in the set. ( a + b * c * ) ∪ ( a * b + c * ) ∪ ( a * b * c + ) 4. (Sudkamp Problem 2.22, Page 50) Give a regular expression that represents the set of strings over { a,b,c } that begin with a , contain exactly two b ’s, and end with cc . a ( a ∪ c ) * b ( a ∪ c ) * b ( a ∪ c ) * cc 5. (Sudkamp Problem 2.34, Page 50) Give a regular expression that represents the set of strings over { a,b,c } with an odd number of occurrences of the substring ab . Let the strings without ab be w = b * ( a ∪ cb * ) * . Then the desired set is ( wabwab ) * wabw...
View Full Document

This note was uploaded on 09/26/2011 for the course TOC 1345 taught by Professor Joe during the Spring '11 term at HDM Stuttgart.

Ask a homework question - tutors are online