This preview shows pages 1–2. 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: 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 onetoone. If the image is awkward to describe exactly, give an approximate highlevel description rather than (say) copying the function definition into setbuilder 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 oneto 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 onetoone, 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 onetoone. (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 onetoone, 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.
 Spring '08
 FLECK@SHAFFER

Click to edit the document details