CSI131 - Discrete Structures I Tutorial on Functions
STUDENT COPY WITH NO SOLUTIONS
Attempt All questions
Duration: 2 hours
0.1 (2 from 2.3)
2. determine whether f is a function from Z to R if:
(a) f (n) = ±n
√
(b) f (n) = n2 + 1
1
(c) f (n) = n2 −4
1
(d) f (n) = n
0.2 (6 from 2.3)
2. Find the domain and range of these functions:
a. The function that assigns to each pair of positive integers the first integer of the
pair.
c. The function that assigns to each bit string the number of ones minus the number
of zero’s in the string.
0.3 (8 from 2.3)
8. Find the values of:
(a) b1.1c
(b) d1.1e
(c) b−0.1c
(d) d−0.1e
(e) d2.99e
(f) d−2.99e
(g) b 21 + d 12 ec
(h) db 12 c + d 12 e + 12 e
1
0.4 (10 from 2.3)
10. Determine whether each of these functions from {a, b, c, d} to itself is one-to-one.
(a) f (a) = b, f (b) = a, f (c) = c, f (d) = d
(b) f (a) = b, f (b) = b, f (c) = d, f (d) = c
(c) f (a) = d, f (b) = b, f (c) = c, f (d) = d
0.5 (12 from 2.3)
12. Determine whether each of these functions from Z to Z is one-to-one.
(a) f (n) = n − 1
(b) f (n) = n2 + 1
(c) f (n) = n3
(d) f (n) = d n2 e
0.6 (14 from 2.3)
14. Determine whether f : ZXZ → Z is onto if:
(a) f (m, n) = 2m − n
(b) f (m, n) = m2 − n2
(c) f (m, n) = m + n + 1
(d) f (m, n) = |m| − |n|
(e) f (m, n) = m2 − 4
0.7 (16 from 2.3)
16. Give an example of a function from N to N that is:
a. one-to-one, but not onto.
b. onto, but not one-to-one.
d. neither one-to-one nor onto.
2
0.8 (18 from 2.3)
18. Determine whether each of these functions is a bijection from R to R that is:
(a) f (x) = −3x + 4
(b) f (x) = −3x2 + 7
(x+1)
(c) f (x) = (x+2)
(d) f (x) = x5 + 1
0.9 (58 from 2.3)
Draw a graph for the function f (n) = 1 − n2 from Z to Z
0.10 (60 from 2.3)
Draw a graph for the function f (x) = b x2 c from R to R
0.11 (65 from 2.3)
Find the inverse of f (x) = x3 + 1