Question 1: 8 Marks
Suppose $A = \{a, b, c, d, e, f\}$ and $R$ is the relation on $A$ defined by
$R = \{(a, e), (b, d), (c, c), (d, a), (e, b)\}$.
State, with reason, whether the relation is:
(1.1) A function from $A$ to $A$.
(1.2) An everywhere defined function.
(1.3) An onto function.
(1.4) A one-to-one function.
Question 2: 10 Marks
Let $f: A \to B$ and $g: B \to C$ be functions. Show that if:
(2.1) $f$ and $g$ are onto, then $g \circ f$ is onto.
(2.2) $f$ and $g$ are one-to-one, then $g \circ f$ is one-to-one.
Question 3: 16 Marks
(3.1) Use the definition of $O(f)$ to show that $n^2$ is $O(n^2 \log n)$.
(3.2) Is $n^2 \log n$ also $O(n^2)$? Prove your answer.
Question 4: 16 Marks
Use the rules (and if necessary, the definition) for ordering $\Theta$-classes to arrange the following in order from lowest to highest:
$\lg n$; $(1.0001)^n$; $\lg n^2$; $(\lg n)^2$; $n^3 + 4$; $24n^3 + 16n$; $n^2 + 5n$.
1 of 3