{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw5_solutions - CS 173 Discrete Structures Fall 2010...

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

CS 173: Discrete Structures, Fall 2010 Homework 5 Solutions This homework contains 5 problems worth a total of 50 points. It is due on Friday, October 8th at 4pm. 1. Functions [8 points] For each of the following functions, state what its image is, whether the function is onto, and whether it is one-to-one. If the image is awkward to describe exactly, give an approximate high-level description rather than (say) copying the function definition into set-builder notation. (a) f : Z Z such that f ( k ) = k mod 7. Solution: The image of f is { 0 , 1 , 2 , 3 , 4 , 5 , 6 } . This function is neither one-to- one, nor onto. (b) g : R 2 R such that g ( x,y ) = x + y . Solution: The image of g is R . This function is not one-to-one, but it is onto. (c) h : ( Z + ) 2 R such that h ( p,q ) = 2 p + 1 q , where Z + is the positive integers. Solution: The image of h is a really wierd set. It consists of a little sequence of numbers near each positive power of two. The offset (from the power of 2) starts off with 1 and then continues with a set of increasingly small fractions. Because all the values in the image are clustered near powers of two, the image doesn’t cover anything like all of R , so it’s not onto. The offsets are small enough that the numbers associated with one power of two are separated from those associated with other powers of two, so this function is one-to-one. (d) k : Z Z such that k ( x ) = 2 x 2 + x . Solution: The image of k is { 0 , 1 , 3 , 6 , 10 , 15 , 21 ,... } . Notice that the difference between the numbers in the list increases by one each time and the gaps eventually become large. So there are many integers not included in this set. This function is one-to-one, but not onto.

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.

{[ snackBarMessage ]}

### Page1 / 5

hw5_solutions - CS 173 Discrete Structures Fall 2010...

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

View Full Document
Ask a homework question - tutors are online