Homework_6

Homework_6 - taaatcccccte 2 Show that INIT and MIN preserve...

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

View Full Document Right Arrow Icon
Theory of Computing Homework 6 CS 3810, Fall 2009 Due Friday, October 9 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. Consider a book of mathematics which contains all theorems along with their proofs. The book is written in an alphabet Σ that contains two special symbols p for proof and t for theorem . The remaining symbols all come from the alphabet { } , S t p = Σ - . The format of the book is tS*pS*tS*pS*….tS*pS*. Using h, h -1 and intersections with regular sets, how would you erase all proofs and have a book that looked like tS*tS*…tS* containing just the theorems. For example taaapbbtcccccpddddddddtepff would be converted to
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: taaatcccccte. 2. Show that INIT and MIN preserve regular sets by using the fact that the class of regular sets is closed under h, h inverse and intersection. (hint: for MIN, think about valid computations for regular sets.) 3. Rearrange( 1 2 n a a a L ) is the set consisting of all strings obtained by rearranging the order of symbols in the string 1 2 n a a a L . For example, rearrange(0011)={0011, 0101, 0110, 1001, 1010, 1100}. Rearrange(L)={y|y is in rearrange(x) for some x in L}. Prove that rearrange does not preserve regular sets. 4. Write a context-free grammar for the language { } * | 1 n n L a b c n = ≥ . 5. Write a context-free grammar for the complement of { } * | 1 n n L a b c n = ≥ . Do not forget the strings which are of the wrong format, i.e. not of the form a*b*c*. 6. Write a context-free grammar for the language { } | either i j or j k i j k L a b c = ≠ ≠ ....
View Full Document

This note was uploaded on 11/07/2009 for the course CS 3810 taught by Professor Hopcroft during the Fall '07 term at Cornell.

Ask a homework question - tutors are online