{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework_4

Homework_4 - R R L x x = where R x stands for x reversed 4...

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

Theory of Computing Homework 4 CS 3810, Fall 2009 Due Friday, September 25 General guidelines: You may work with other people, as long as you write up your solution in your own words and understand everything you turn in. Make sure to justify your answers—they should be clear and concise, with no irrelevant information. Each problem should be submitted on a separate piece of paper. Please put your netid on your homework! 1. Describe the set ( 29 ( 29 { } ( 29 ( 29 ( 29 { } ( 29 ( 29 1 1 0 1 2 0 1 2 | 1 * 0 1 2 0 1 2 0 1 2 | 1 * 0 1 *2 n n n n n n ε + + + + + + + + + I . 2. Prove that the following set is regular: The sets of all strings of 0’s and 1’s not containing all strings of length three as substrings. The string 1110100010100 is in the set since it does not contain the substring 011, 0111111 is in the set since it does not contain the substring 000. A clear explanation in good English is satisfactory. 3. Given a regular expression for a set L, explain how to write a regular expression for the set { } is in L
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: R R L x x = where R x stands for x reversed. 4. 4.2.1 Suppose h is the homomorphism from the alphabet {0,1,2} to the alphabet {a,b} defined by: h(0)=a, h(1)=ab, and h(2)=ba. a) What is h(0120)? b) What is h(21120)? c) If L is the language L(01*2), what is h(L)? d) If L is the language L(0+12), what is h(L)? e) Suppose L is the language {ababa}, that is, the language consisting of only the one string ababa. What is h-1 (L)? f) If L is the language L(a(ba)*), what is h-1 (L)? 5. 4.2.7 by machine construction. If 1 2 n w a a a = L and 1 2 n x bb b = L are strings of the same length, define alt(w,x) to be the string in which the symbols of w and x alternate, starting with w , that is, 1 1 2 2 n n a b a b a b L . If L and M are languages, define alt(L,M) to be the set of strings of the form alt(w,x), where w is any string in L and x is any string in M of the same length. Prove that if L and M are regular, so is alt(L,M)....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online