Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Inverse Function - Discrete Mathematics - Solved Homework, Slides of Discrete Mathematics

During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Inverse Function, Define Function, Register Multiple Classes, Multiple Elements, Domain to Codomain, Graph of Original Function, Well-Defined Function, Non-Negative Value, Simple Translation, Indirect Proof

Typology: Slides

2012/2013

Uploaded on 04/27/2013

atmaja
atmaja 🇮🇳

4.2

(45)

182 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS173: Discrete Mathematical Structures
Spring 2006
Homework #4
Due Sun 12/02/06, 8AM.
54 points
1) Let S be the set of all UIUC CS students and C the set of all courses offered in
Department of Computer Science for spring 2006.
a) For
x S
and
y C
, we say
( )
y f x
=
if and only if student x has registered course
y. Does :
f S C
define a function? Why or why not?
b) For
x S
and
y P
(
C
P
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 C
define a function?
Why or why not?
c) For
x S
and
y P
(
C
P
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 C
define 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.
2) Which of the followings are functions from the domain to the codomain given?
Which functions are one-to-one? Which functions are onto? If it is a bijection,
describe its inverse function.
a)
: Z Z
f
where f is defined by
2
( )
f x x
=
b)
: Z Z
f
where f is defined by
2
( ) ( )
f x x
=
c)
: R R
f
+ +
where f is defined by
( ) log( 1)
f x x
= +
d)
: Z N
f
where f is defined by ( )
x
f x
x
=
e)
: R R R R {0}
f+
× × Uwhere f is defined by
2 2 2
( , , )
f x y z x y z
= + +
f)
: R R R R
f
× ×
where f is defined by
( , ) ( 1, 1)
f x y x y
= + +
Docsity.com
pf3
pf4

Partial preview of the text

Download Inverse Function - Discrete Mathematics - Solved Homework and more Slides Discrete Mathematics in PDF only on Docsity!

CS173: Discrete Mathematical Structures

Spring 2006

Homework

Due Sun 12/02/06, 8AM.

54 points

  1. Let S be the set of all UIUC CS students and C the set of all courses offered in Department of Computer Science for spring 2006.

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.

  1. Which of the followings are functions from the domain to the codomain given? Which functions are one-to-one? Which functions are onto? If it is a bijection, describe its inverse function.

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

  1. Why is it onto? Think of ( ,x y z , )as a point in R 3 space. x 2 + y 2 + z^2 then becomes the distance between this point and the origin. Obviously, the distance can take any non-negative value.

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)

  1. (^2 )

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

  1. 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

C

C

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.