This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: MATH 239 ASSIGNMENT 4 Sample Solutions 1. 12 marks For each of the following sets, write down a decomposition that uniquely creates the elements of that set. (a) The { , 1 }strings that have no substring of 1s with length 3, and no substrings of 0s of length 2. Solution: Since we want to modify both the allowed lengths of strings of 1 and strings of 0s, let us start with the block decomposition { } * ( { 1 }{ 1 } * { }{ } * ) * { 1 } * = { , , 00 ,... } ( { 1 , 11 , 111 ,... }{ , 00 , 000 ,..., } ) * { , 1 , 11 , 111 ,... } and remove all strings of 1s of length 3 or more, and remove all strings of 0s of length 2 or more. This leaves us with { , } ( { 1 , 11 }{ } ) * { , 1 , 11 } . One could also have started with the other block decomposition and arrived at { , 1 , 11 } ( { }{ 1 , 11 } ) * { , . (b) The { , 1 }strings that have no blocks of 0s of size 2, and no blocks of 1s of size 3. Solution: Since we want to modify both the allowed lengths of blocks of 1 and blocks of 0s, let us start with the block decomposition { } * ( { 1 }{ 1 } * { }{ } * ) * { 1 } * = { , , 00 ,... } ( { 1 , 11 , 111 ,... }{ , 00 , 000 ,..., } ) * { , 1 , 11 , 111 ,... } and remove all the blocks of 1s of length 3, and remove all blocks of 0s of length 2. This leaves us with { , , 000 ,... } ( { 1 , 11 , 1111 ,... }{ , 000 ,..., } ) * { , 1 , 11 , 1111 ,... } which can also be rewritten more compactly as ( { } * \{ 00 } )(( { 1 }{ 1 } * \{ 111 } )( { }{ } * \{ 00 } )) * ( { 1 } * \{ 111 } ) . A similar solution is possible starting with the other block decomposition. (c) The set of { , 1 }strings in which the substring 0111 does not occur. Solution: We start with the block decomposition where in the middle section the 0blocks precede the 1blocks (i.e. { 1 } * ( { }{ } * { 1 }{ 1 } * ) * { } * ) and omit the 1blocks of length 3 or more. This gives us { 1 } * ( { }{ } * { 1 , 11 } ) * { } * . Alternatively, we could start with the 0decomposition and remove all strings of 1s of length 3 or more that follow a 0. This gives us { 1 } * ( { }{ , 1 , 11 } ) * . 1 (d) The set of { , 1 }strings in which the substring 0110 does not occur....
View Full
Document
 Spring '09
 M.PEI
 Combinatorics, Sets

Click to edit the document details