Home2LangsAndStrings

# Home2LangsAndStrings - CS 341 Automata Theory Elaine Rich...

This preview shows pages 1–2. Sign up to view the full content.

CS 341 Automata Theory Elaine Rich Homework 2 Due Thursday, September 14 at 11:00 1) For each of the following languages L , give a simple English description of L . Show two strings that are in L and two that are not (unless there are fewer than two strings in L or two not in L , in which case show as many as possible). a) L = { w { a , b }* : exactly one prefix of w ends in a }. b) L = { w { a , b }* : all prefixes of w end in a }. c) L = { w { a , b }* : 5 x { a , b } + ( w = a x a )}. 2) Are the following sets closed under the following operations? Prove your answer. If a set is not closed under the operation, what is its closure under the operation? a) The odd length strings over the alphabet { a , b } under concatenation b) L = { w { a , b }*} under reverse c) L = { w { a , b }* : w starts with a } under reverse d) L = { w { a , b }* : w ends in a } under the function odds. Odds ( s ) = the string that is formed by concatenating together all of the odd numbered characters of s . (Start numbering the characters at 1.) For example, Odds ( ababbbb ) = aabb . e) FIN (the set of finite languages) under the function OddsL , where OddsL is a function from the set of languages to the set of languages defined as: OddsL ( L ) = { w : 5 x L ( w = Odds ( x ) ) } f) INF (the set of infinite languages) under the function OddsL . 3) For each of the following statements, state whether it is True or False . Prove your answer. a) 2200 L 1 , L 2 ( L 1 = L 2 iff L 1 * = L 2 *) b) ( *) ( ¬∅ – ( ∅∅ *)) = (where ¬∅ is the complement of ) c) Every infinite language is the complement of a finite language. 4)

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

View Full Document
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 / 3

Home2LangsAndStrings - CS 341 Automata Theory Elaine Rich...

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

View Full Document
Ask a homework question - tutors are online