# Thread: Composition as a Sets of Ordered Pairs

1. ## Composition as a Sets of Ordered Pairs

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

Given f = {(a, b), (b, a), (c, b)}, a function from X = {a, b, c} to X:

(a) Write f o f and f o f o f as sets of ordered pairs.
(b) Define f^n = f o f o ... o f to be the n-fold composition of f with itself. Write f^9 and f^623 as sets of ordered pairs.

I have no idea how to approach this. I know that f o f and f o f o f are f(f) and f(f(f)), but I can't see how I can compose that. Where in f can I insert f? Part (b) also looks daunting.

Any help would be appreciated!

2. I think I've figured out (a):

f(a) = b; f(b) = a; f(c) = b, so

f(f) = {(b, a), (a, b), (b, a)}, and
f(f(f)) = {(a, b), (b, a), (c, a)}

But I'd love for someone to confirm this.

I'm still having trouble with part (b) also. Thanks for any help!

3. You need ti rethink the whole problem.
Here is how it works.
$f \circ f(a) = f(f(a)) = f(b) = a\, \Rightarrow \,(a,a) \in f \circ f$

$\begin{gathered}
f \circ f = \left\{ {(a,a),(b,b),(c,a)} \right\} \hfill \\
f \circ f \circ f = \left\{ {(a,b),(b,a),(c,b)} \right\} \hfill \\
f \circ f \circ f \circ f = \left\{ {(a,a),(b,b),(c,a)} \right\} \hfill \\
\end{gathered}$