# Let convert be the function that on input an even

• Notes
• ProfessorResolvePartridge10091
• 2

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

simplicity, we will consider words of length just 2 bits. Let convert be the function that on input an even length string w , breaks the input into pairs of bits w 1 w 2 , w 3 w 4 , etc., and the replace each pair as follows: 01 is mapped to a , 10 is mapped to b , 00 is mapped to c and 11 is mapped to d . E.g., convert (10010111) = baad . If the input string has odd length, then convert appends a 0 to it before converting it. So, convert maps binary strings to strings over the alphabet { a, b, c, d } . Prove that regular languages are closed under conversion, i.e., if L is a regular language over the binary alphabet, then { convert ( w ): w L } is also a regular language (this time over the alphabet { a, b, c, d } . Then consider the regular expression (0+1)(01) * 1(101) * , and use your method to convert it into a regular expression R for the corresponding language over { a, b, c, d } . As part of this problem you should submit a brief explanation of your proof that regular languages are closed under this conversion, and a jflap file containing the regular expression R . In the solution of this problem you can use jflap as much as you want, to convert between automata, regular expression, etc., remove nondeterminism, simplify automata, etc. Problem 4 Let f be a function that on input a string w of odd length, removes the symbol in the middle of w . If the input string has even length, then f ( w ) = w leaves the input unchanged. E.g., f (10010) = 1010 , f (0011) = 0011 , f (1110111) = 111111 . Prove that regular languages are not closed under f , i.e., there is a regular language L such that { f ( w ): w L } is not regular. [In the solution to this problem you can use any closure property proved in class, from the textbook, previous homework assignment, or even problem 3 above. You can also use the fact that the language { a n b n : n 0 } is not regular, as proved in class. Hint: these are two big hints hidden in the list of things we told you can use.]
This is the end of the preview. Sign up to access the rest of the document.
• Fall '10
• CS
• css, Formal language, Regular expression, Regular language, Theory of Comptuation, Daniele Micciancio

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern