Problem

Source: Romanian National Olympiad 2017, grade x, p. 4

Tags: function, algebra, combinatorics, identity



Find the number of functions $ A\stackrel{f}{\longrightarrow } A $ for which there exist two functions $ A\stackrel{g}{\longrightarrow } B\stackrel{h}{\longrightarrow } A $ having the properties that $ g\circ h =\text{id.} $ and $ h\circ g=f, $ where $ B $ and $ A $ are two finite sets.