{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw5-solutions

# hw5-solutions - CS 381 Homework 5 Solutions Fall 2006 1 The...

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

CS 381 Homework 5 Solutions Fall 2006 September 29, 2006 1: The set consists of strings of blocks of 0’s and 1’s where each block is separated by a 2; each block can have any combination of 0’s and 1’s; the length of each successive block is one greater than the previous block; the first block is of length 1; the strings end in a 2; there are an even number of blocks; there are a minimum of 2 blocks. 2: We assume that the alphabet of L and M are disjoint. If they are not disjoint, we can simply do a homomorphism to the alphabet of one of the languages and add hats for example. Then we just do the corresponding inverse homomorphism at the end to remove these hats. We define the homomorphism h 1 as follows: L a a a h Σ = ) ( 1 M b b h Σ =∈ ) ( 1 Then ) ( 1 1 L h is the language containing strings in L with symbols from the alphabet of M arbitrarily inserted. Similarly define the homomorphism h2 as: M b b b h Σ = ) ( 2 L a a h Σ =∈ ) ( 2 Therefore the desired language alt(L,M) is obtained as: * ) ( ) ( ) ( ) , ( 1 2 1 1 M L M h L h M L alt Σ

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.
• Fall '06
• HOPCROFT
• Formal language, Regular expression, Regular language, Nondeterministic finite state machine, Pumping lemma for regular languages

{[ snackBarMessage ]}

### Page1 / 3

hw5-solutions - CS 381 Homework 5 Solutions Fall 2006 1 The...

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

View Full Document
Ask a homework question - tutors are online