hw5_solutions - CS 173: Discrete Structures, Fall 2010...

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: 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 { , 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 doesnt cover anything like all of R , so its 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 { , 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....
View Full Document

This note was uploaded on 11/08/2010 for the course CS 173 taught by Professor Fleck@shaffer during the Spring '08 term at University of Illinois at Urbana–Champaign.

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 Right Arrow Icon
Ask a homework question - tutors are online