Home5ClosureAndPumping

Home5ClosureAndPumping - CS 341 Automata Theory Elaine Rich...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 341 Automata Theory Elaine Rich Homework 5 Due Thursday, Oct. 5 at 11:00 1) Using the definitions of maxstring and mix presented in class, describe each of the following languages: a) maxstring (A n B n ) b) maxstring ( a i b j c k , 1 k j i ) c) mix (( aba )*) d) mix ( a * b *) 2) Prove that the regular languages are closed under maxstring . 3) Prove that the regular languages are not closed under mix . 4) For each of the following languages, state whether or not the language is regular and prove your answer: a) L = { xyzy R x : x, y, z { a , b }*}. b) L = { a i b j : 0 i < j < 2000}. c) L = { w { a , b }* : w contains at least one a and at most one b }. d) L = { w {0, 1}* : # 0 ( w ) # 1 ( w )}. e) L = { w { a , b }* : 5 x { a , b } + ( w = x x R x )}. f) L = { a n b m : n l m } g) L = { w { a , b }* : w contains exactly two more b 's than a 's}. 5) Prove or disprove the following statement: If L 1 and L 2 are not regular languages, then L 1 L 2 is not regular. 6) Let Σ = { a , b }. Let α be a regular expression. Is there a decision procedure that determines whether the language generated by α contains all the even length strings in Σ *. Prove your answer.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 341 Automata Theory Elaine Rich Homework 5 Answers 1) Using the definitions of maxstring and mix presented in class, describe each of the following languages: a) maxstring (A n B n ) = { a n b n : n >0}. (Note: ε max (A n B n ) because each element of A n B n can be concatenated to ε to generate a string in A n B n . But, given any other string in A n B n (e.g., aabb ), there is nothing except ε that can be added to make a string in A n B n .) b) maxstring ( a i b j c k , 1 k j i ) = ( a i b j c j , 1 j i ) c) mix (( aba )*) = ( abaaba )* d) mix ( a * b *): This one is tricky. To come up with the answer, consider the following elements of a * b * and ask what elements they generate in mix ( a * b *): aaa , aab , aaaa , bbbb , aaabbb , aaaabb , aabbbb mix ( a * b *) = ( aa )* ( bb )* { a i b j , i j and i + j is even} { w : | w | = n , n is even, w = a i b j a k , i = n /2} 2) Prove that the regular languages are closed under maxstring . The proof is by construction.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/03/2009 for the course CS 341 taught by Professor Rich during the Fall '08 term at University of Texas.

Page1 / 5

Home5ClosureAndPumping - CS 341 Automata Theory Elaine Rich...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online