4. Let A be the set of all functions f : N -> N. Note that if f, g E A, then f = g if and only if

f(n) = g(n) for all n E N.

(a) (5 points) Prove from the definitions in Section 7.1 that for all f,g E A, f(n) is in

n(g(n)) if and only if g(n) is in O(f (n)).

(b) (5 points) Prove from the definitions in Section 7.1 that for all f, 9, h E A, if f(n) is in

O(g(n)) and g(n) is in O(h(n)), then f(n) is in O(h(n)).

(c) (5 points) We define the relation R on A by (f, g) E R if and only if f(n) is in O(g(n)).

Prove that R is reflexive and transitive but not symmetric or antisymmetric. (Hint: you

may assume the results of parts (a) and (b).)

(d) (5 points) We define the relation S on A to be the set of ordered pairs (f, g) such that

f(n) is in O(g(n)). Prove that for all f, g E A, (f,g) E S if and only if (f, g) E R and

(g, f) E R, where R is defined in part (c). Use this to prove that S is an equivalence

relation. (Hint: you may assume the results in parts (a), (b) and (c).)

(e) (5 points) We define the set B = {If]s | f E A} of the equivalence classes of the

equivalence relation S (from part (d)). We define a relation T on B consisting of all

pairs ([f]s, [g]s) such that (f, g) E R, where R is the relation defined in part (c). Prove

that T is a partial order on B. (Hint: you may assume the results in parts (a), (b), (c), (d).)