sol4 - MATH 239 Fall 2008 Assignment 4 Solutions Total 20...

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: MATH 239 Fall 2008 Assignment 4 Solutions Total 20 marks 1. (a) (1 marks) Let A = { 1 } * { }{ } * { 1 } * and B = { } * { 1 }{ 1 } * { } * . Are the elements of AB uniquely created? Solution. No, the elements are not uniquely created. For example, the elements 0 A and 11 B concatenate to 011, as do the elements 01 A and 1 B . (b) (2 marks) Let A = { }{ } * { 1 }{ } * and B = { 1 } * { }{ 1 }{ 1 } * . Are the elements of AB uniquely created? Solution. Yes, the elements are uniquely created. We will give a proof by contradiction. Suppose a 1 , a 2 A and b 1 , b 2 B are strings, with a 1 n = a 2 , satisfying the property that a 1 b 1 = a 2 b 2 . Without loss of generality, suppose that a 1 is longer than a 2 . The string a 1 ends in either a 1 or a block of zeros. If a 1 ends in a 1, then a 2 contains no occurrences of 1, since a 2 is a prex of a 1 , and a 1 contains only one occurrence 1, in the last digit. The fact that a 2 contains no occurrences of 1 is a contradiction, since all elements of A contain exactly one occurrence of 1. If a 1 ends in a block of zeros, then b 2 necessarily contains one of those zeros. But then b 2 contains at least two occurrences of zero, one taken from a 1 and one taken from b 1 . This is likewise a contradiction, since all elements of B contain exactly one occurrence of 0. 2. For each of the following sets, nd the generating function for the set. (a) (1 marks) The set of all binary strings such that every block of ones has length divisible by 3. Solution. A decomposition for this set in which the elements are uniquely created is { } * ( { 111 }{ 111 } * { }{ } * ) * { 111 } * , and the generating function is 1 1 x 1 1 ( x 3 1-x 3 x 1-x ) 1 1 x 3 = 1 1 x x 3 ....
View Full Document

Page1 / 5

sol4 - MATH 239 Fall 2008 Assignment 4 Solutions Total 20...

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