How many composite functions from $(f \circ f)(1) = 2$

141 Views Asked by At

Let $S = \{1,2,3,4\}$. Let $F$ be sets of all functions from $S$ to $S$.

How many $f\in F$ are there so that $(f \circ f)(1) = 2$ ?

How I see it, is through a diagram and so that there is $4*4*4*4$ ways for the first $f$ to make all of it's outputs and then there is $4$ to connect these outputs to $2$ because either $1$ or $2$ or $3$ or $4$ arrows must connect to $2$.

So $4^4*4$ is the answer?

2

There are 2 best solutions below

4
On BEST ANSWER

Juan Diego Rojas' answer preceded mine.

I agree with Juan Diego Rojas' reasoning. Since the OP asked for a count of the number of functions, I will piggyback off of Juan's reasoning.

If f(1) = 2, then f(2) must = 2. There are $4^2$ functions that will do this (i.e. f(3) can be anything and f(4) can be anything).

If f(1) = 3, then f(3) must = 2. Again there are $4^2$ functions.
If f(1) = 4, then f(4) must = 2. Again there are $4^2$ functions.

So the total number of satisfying functions is $3\times 4^2 = 48.$

0
On

By no means, since $|S^S| = 4^4$. Hint: You need that $f(f(1)) = 2$. We only need to restrict a value of the function $f(1) = k \in \{2,3,4\}$, because, if $f(1) = 1$, then $f(f(1)) = 1$.