Question 45
Let $A$ and $B$ be two finite sets. Find the number of functions $f : A \to A$ satisfying the property that there exist two functions $g : A \to B$ and $h : B \to A$ such that $g(h(x)) = x$, $\forall x \in B$, and $h(g(x)) = f(x)$, $\forall x \in A$.