


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



a) For x ∈ Sand y ∈ C, we say y = f ( )x if and only if student x has registered course y. Does f :S → Cdefine a function? Why or why not? b) For x ∈ Sand y ∈ PC( PC is the power set of C), we say y = f ( )x if and only if student x has registered every course in set y. Does f :S → Cdefine a function? Why or why not? c) For x ∈ Sand y ∈ PC( PC is the power set of C), we say y = f ( )x if and only if student x has registered for every course in set y and for no course in set C − y. Does f :S → Cdefine a function? Why or why not?
3 points each part. 1 point for correct answer, 1 point for explanation, 1 point for saying anything meaningful at all.
Solution: a) No. Since one student can register multiple classes (an element in the domain can map to multiple elements in the codomain), it is not a function. b) No. Counterexample: x takes class a and class b, then x maps to {a}, {b}, and {a, b}. This contradicts the definition of a function. c) Yes. It ensures that one student maps to exactly one set of classes. This is well-defined and unique.
a) f : Z → Zwhere f is defined by f ( )x = x^2 b) f : Z → Zwhere f is defined by f ( )x =( x)^2 c) f : R +^ → R+where f is defined by f ( )x = log( x+1)
d) f : Z → Nwhere f is defined by ( ) x f x x
e) f : R × R × R → R +U {0}where f is defined by f ( ,x y z , )= x 2 + y^2 +z^2 f) f : R × R → R × Rwhere f is defined by f ( ,x y ) = ( x +1, y+1)
Solution:
(22 points total)
a) Function. Not one-to-one. Not onto. Not one-to-one is because x and –x maps to the same value in the codomain. Not onto is because the value of f(x) is non-negative.
3 points, one for each response.
b) Not a function. Note that it is only valid when x ≥ 0 , so x cannot take negative elements in the domain.
3 points, one for each response. 2 points for “not a function,” and one point for any attempt.
c) Function. One-to-one. Onto. Inverse function: f −^1 ( )x = 2 x− 1,x ∈ R+. This is quite obvious when you draw the graph of the original function.
5 points, one for each response, and one for inverse function.
d) Not a function. This is because x cannot be zero. Note that you cannot take it for granted that f ( )x = 1 because this simplification is only valid when it is already a well-defined function.
3 points, one for each response. 2 points for “not a function,” and one point for any attempt.
e) Function. Not one-to-one. Onto. This is not one-to-one because different triples ( ,x y z , ) may map to the same value. For example (1,0,0) and (0,0,1) both map to
3 points, one for each response.
f) Function. One-to-one. Onto. Inverse: f −^1 ( ,x y ) = ( x − 1, y− 1), ( ,x y )∈ R × R. Again, ( ,x y )is a point on a plane ( R 2 space). It is just a simple translation of the point on the plane.
5 points, one for each response, and one for inverse function.
c) Show that if f ( )x is O(log (^) bx) where b > 1 , then f ( )x is O(log (^) ax )where a > 1.
Solution:
a) x^3 is O x ( 4 ): There are constants C=1 and k=1 such that | x^3 | ≤ C | x^4 |. x^4 is not O x ( 3 ): Indirect proof: Suppose x 4 = O x ( 3 ). There must be a constant C such that x^4 ≤ Cx^3 , whenever x > k(we set k > 0 so the absolute symbol is dropped). This implies x ≤ C. This condition, however, cannot hold for all large x, no matter what the value of the constant C. Therefore, we conclude that x^4 cannot be O x ( 3 ).
4 points: 2 points for showing each part. Full credit should be awarded for perfect response, 1 point for reasonable attempt.
b)
log! ( log ) ( ) (log )
n O n n f n O n n n
2 2 2 1/ 2 3/ 2 3/ 2
log 1 ( ) ( ) ( ) ( ) 3 2 4 ( )
n n n O n f n O n O n n n O n
f n( ) = log (log 2 2 n n) = log ( 2 n log 2 n ) = log 2 n + log log 2 2 n =O(log 2 n)
2 4 2 n
f n = + + + + < Therefore, it has a constant growth rate, i.e.,
f n ( ) =O(1) Since O n( a)(a>0) is faster than O (log n) , and both are faster than O(1) , (2) has the fastest growth rate.
10 points: 2 points for showing each part, plus 2 points for the fastest growth rate. Full credit should be awarded for perfect response, 1 point for reasonable attempt.
c) Since f ( )x = O(log (^) bx), there are constants Cb and k such that| f ( ) |x ≤ Cb | log (^) bx|,
whenever x > k. Note that we also have | log | | log | | log |
a b a
x x b
= , we conclude that there
are | log |
b a a
b
= and k such that| f ( ) |x ≤ Ca | log (^) ax|, whenever x > k.
3 points: 3 points for perfect, 2 points for minor error, 1 point for reasonable attempt, 0 points for no attempt.