pset7_soln

pset7_soln - 6.042/18.062J Mathematics for Computer Science...

Info iconThis preview shows pages 1–3. 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: 6.042/18.062J Mathematics for Computer Science March 29, 2005 Srini Devadas and Eric Lehman Problem Set 7 Solutions Due: Monday, April 4 at 9 PM Problem 1. Every function has some subset of these properties: injective surjective bijective Determine the properties of the functions below, and briey explain your reasoning. x (a) The function f : R R defined by f ( x ) = e . Solution. This function is injective, since e x takes on each nonnegative real value for exactly one x . However, the function is not surjective, because e x never takes on negative values. Therefore, the function is not bijective either. x (b) The function f : R R + defined by f ( x ) = e . Solution. The function e x takes on every nonnegative value for exactly one x , so it is injective, surjective, and bijective. (c) The function f : R R defined by f ( x ) = ( x + 1) x ( x 1) . Solution. This function is surjective, since it is continuous, it tends to + for large positive x , and tends to for large negative x . Thus, the function takes on each real value for at least one x . However, this function is not injective, since it takes on the value at x = 1 , x = 0 , and x = 1 . Therefore, the function is not bijective either. (d) Let S be the set of all 20-bit sequences. Let T be the set of all 10-bit sequences. Let f : S T map each 20-bit sequence to its first 10 bits. For example: f (11110110101101010010) = 1111011010 Solution. This function is surjective since the sequence b 1 b 2 . . . b 10 is mapped to by b 1 b 2 . . . b 10 00 . . . , for example. However, the function is not injective, because this sequence is also mapped to by b 1 b 2 . . . b 10 11 . . . 1 . Consequently, the function is not bijective either. Problem 2. There are 20 books arranged in a row on a shelf. 2 Problem Set 7 (a) Describe a bijection between ways of choosing 6 of these books so that no two adjacent books are selected and 15-bit sequences with exactly 6 ones. Solution. There is a bijection from 15-bit sequences with exactly six 1s to valid book selections: given such a sequence, map each zero to a non-chosen book, each of the first five 1s to a chosen book followed by a non-chosen book, and the last 1 to a chosen book. For example, here is a configuration of books and the corresponding binary sequence: 1 1 1 1 1 1 Selected books are darkened. Notice that the first fives ones are mapped to a chosen book and an non-chosen book in order to ensure that the binary sequence maps to a valid selection of books. (b) How many ways are there to select 6 books so that no two adjacent books are selected? Solution. By the Bijection Rule, this is equal to the number of 15-bit sequences with exactly 6 ones, which is equal to 15! 15 = 6! 9! 6 by the Bookkeeper Rule....
View Full Document

This note was uploaded on 02/08/2011 for the course EECS 6.042 taught by Professor Dr.ericlehman during the Spring '11 term at MIT.

Page1 / 9

pset7_soln - 6.042/18.062J Mathematics for Computer Science...

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

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