{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cs381-fall02-final

# cs381-fall02-final - b The class of context-free languages...

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

CS381 Final Exam Thursday Dec 19, 2002 Fall 2002 Location Olin 155 12:00-2:30pm This is a 2 and ½ hour in class closed book exam. All questions are straightforward and you should have no trouble doing them. Please show all work and write legibly. Thank you. 1. Let * ) ( b a R + be a regular set. Consider the set consisting of all strings that can be obtained from strings in R by deleting two b’s. Is this set regular? Give rigorous proof of your answer. 2. Let * ) ( c b a R + + be a regular set. Rearrange the symbols in each string of R so that all a ’s appear first, then the b ’s and then the c ’s. a) Is the resulting set regular? b) Is it context free? 3. Prove or disprove that { } l j or k i either d c b a l k j i = = | is a context-free language. 4. Prove or disprove each of the following: a) The class of context-free languages is closed under intersection.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b) The class of context-free languages is closed under homomorphism. c) The class of context-free languages is closed under inverse homomorphism. 5. Prove that the halting problem for Turing machines, } | ) , {( x input on halts M x M , is undecidable. 6. For each of the following conditions, give an example of a set or prove that no such set exists. a) Both the set and its complement are recursive. b) The set is recursive but its complement is not. c) The set is recursively enumerable and its complement is recursive. d) The set is recursively enumerable and its complement is also recursively enumerable. e) The set is recursively enumerable but its complement is not recursively enumerable. f) Neither the set nor its complement are recursively enumerable....
View Full Document

{[ snackBarMessage ]}