I've come across a challenging problem in my test review:

Givenf = {(a, b), (b, a), (c, b)}, a function fromX = {a, b, c} to X:

(a) Writef o fandf o f o fas sets of ordered pairs.

(b) Definef^n = f o f o ... o fto be then-fold composition offwith itself. Writef^9andf^623as sets of ordered pairs.

I have no idea how to approach this. I know thatf o fandf o f o faref(f)andf(f(f)), but I can't see how I can compose that. Where infcan I insertf? Part (b) also looks daunting.

Any help would be appreciated!