# Functions

1. A function is said to be ______________ if and only if f(a) = f(b) implies that a = b for all a and b in the domain of f.
a) One-to-many
b) One-to-one
c) Many-to-many
d) Many-to-one

.

2. The function f(x)=x+1 from the set of integers to itself is onto. Is it True or False?
a) True
b) False

.

3. The value of 1/2.5/2 is ______________
a) 1
b) 2
c) 3
d) 0.5

Explanation: The value of ⌊5/2⌋ is 2 so, the value of ⌊1/2.2⌋ is 1.

4. Which of the following function f: Z X Z → Z is not onto?
a) f(a, b) = a + b
b) f(a, b) = a
c) f(a, b) = |b|
d) f(a, b) = a – b

5. The domain of the function that assign to each pair of integers the maximum of these two integers is ___________
a) N
b) Z
c) Z +
d) Z+ X Z+

6. Let f and g be the function from the set of integers to itself, defined by f(x) = 2x + 1 and g(x) = 3x + 4. Then the composition of f and g is ____________
a) 6x + 9
b) 6x + 7
c) 6x + 6
d) 6x + 8

7. __________ bytes are required to encode 2000 bits of data.
a) 1
b) 2
c) 3
d) 8

Explanation: Two bytes are required to encode 2000 (actually with 2 bytes you can encode up to and including 65,535.

8. The inverse of function f(x) = x3 + 2 is ____________
a) f -1 (y) = (y – 2) 1/2
b) f -1 (y) = (y – 2) 1/3
c) f -1 (y) = (y) 1/3
d) f -1 (y) = (y – 2)

9. The function f(x) = x3 is bijection from R to R. Is it True or False?
a) True
b) False

10. The g -1({0}) for the function g(x)= x is ___________
a) {x | 0 ≤ x < 1}
b) {x | 0 < x ≤ 1}
c) {x | 0 < x < 1}
d) {x | 0 ≤ x ≤ 1}