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

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

View Full Document Right Arrow Icon
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 Σ
Background image of page 1

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

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

This note was uploaded on 09/04/2008 for the course CS 381 taught by Professor Hopcroft during the Fall '06 term at Cornell University (Engineering School).

Page1 / 3

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

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