Home6ClosureAndPumping

Home6ClosureAndPumping - CS 341 Automata Theory Elaine Rich...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 341 Automata Theory Elaine Rich Homework 6 Due Thursday, October 12 at 11:00 1) Show that the regular languages are closed under each of the following operations: a) pref ( L ) = { w ∈ Σ * : x = wy for some x ∈ L , y ∈ Σ *} (The prefixes of L ) b) suf ( L ) = { w ∈ Σ * : x = yw for some x ∈ L , y ∈ Σ *} (The suffixes of L ) c) reverse(L) = { x ∈ Σ * : x = w R for some w ∈ L } d) letter substitution (as defined in Section 8.3) 2) Define a decision procedure for each of the following. Argue that each of your decision procedures gives the correct answer and terminates. a) Given two DFSMs M 1 and M 2 , is L ( M 1 ) = L ( M 2 ) R ? b) Given a regular grammar G and a regular expression α , is L ( G ) = L ( α )? 3) For each of the following languages, state whether or not the language is regular and prove your answer: a) L = { x # y : x , y ∈ {0, 1}* and | x | ⋅ | y | ≡ 5 0}. (where ⋅ means integer multiplication). b) L = { xy : x , y ∈ { a , b }* and | x | = | y | and # a ( x ) ≥ # a ( y )} c) L = { w { a , b }* : w = xyz , | x | = |y| = | z |, and z = x with every a replaced by b and every b replaced by a }. Example: abbbabbaa ∈ L , with x = abb , y = bab , and z = baa . 4) Prove or disprove the following statements: a) The union of an infinite number of regular languages must be regular. b) The union of an infinite number of regular languages is never regular. c) The intersection of a regular language and a nonregular language must be regular. d) The intersection of a regular language and a nonregular language must not be regular. e) The intersection of two nonregular languages must not be regular. f) The concatenation of two nonregular languages may be regular. g) (Hard) Every nonregular language can be described as the intersection of an infinite number of regular languages. 5) Give an algorithm to construct a regular grammar G from an NDFSM M such that L ( G ) = L ( M ). 6) Construct a deterministic finite state transducer over { a , b } for each of the following tasks: a) On input w produce a n , where n is the number of occurrences of the substring ab in w . b) On input w produce a n , where n is the number of occurrences of the substring aba in w . 7) Extend the description of the Soundex FSM that was started in the book so that it can assign a code to the name Pfifer. Remember that you must take into account the fact that every Soundex code is made up of exactly four characters. 8) Real bar code systems are more complex than the one we sketched in the book. They must be able to encode all ten digits, for example. There are several industry-standard formats for bar codes, including the common UPC code l found on nearly everything we buy. Describe a finite state transducer that reads the bars and outputs the corresponding decimal number....
View Full 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 / 6

Home6ClosureAndPumping - CS 341 Automata Theory Elaine Rich...

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

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