hw6 - that the class of languages recognized by NFAs is not...

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

View Full Document Right Arrow Icon
CSC236H: Introduction to the Theory of Computation Bonus Homework Due on Tuesday April 6, 2010 (in review session, see announcements) Note that this assignment is for extra credit. If you do not want the extra credit, you do not have to hand in this assignment. As mentioned in class, the grading rules are more strict for this assignment. There is no partial credit for any problem; you either get it right and get the full mark, or you get zero. For problems that have several parts, this rule applies to each part, and not the whole problem. 1. If L 1 and L 2 are context-free language, then prove that (a) L 1 L 2 is a context-free language. (b) L 1 L 2 is a context-free language. (c) L * 1 is a context-free language. Hint: There are very short arguments for each of the three parts of this problem. 2. Show by giving an example that, if M is an NFA that recognizes language C , swapping the accept and non- accept state in M does not necessarily yield a new NFA that recognizes the complement of C . Does this mean
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: that the class of languages recognized by NFAs is not closed under complement? 3. Using the Pumping Lemma, prove that following languages are not regular: (a) L = { n 1 m | m,n 0 and m leaves a remainder of 3 when divided by n . } (b) L 1 = { n 1 m | n,m 0 and n 6 = m } . (c) L 2 = { w | w { , 1 } * and w is not a palindrome } . 4. Let CFG G be: S aSb | Y b | Y a Y bY | aY | Prove that L ( G ) = { a,b } + . 5. For a language L , let Init ( L ) = { x | xy L for some y * } . Let r , s , r I and s I be regular expressions for the languages R , S , Init ( R ), and Init ( S ) respectively. Using only these regular expressions and the operations +, concatenation, and * , give expressions for the following languages and briey justify your answers (Be careful! Contemplate your answers.): (a) (3 points) Init ( R S ). (b) (3 points) Init ( RS ) . (c) (3 points) Init ( R * ). 1...
View Full Document

Ask a homework question - tutors are online