...how many maps \(f\) are there with \(g \circ f = 1_{\set{0,1}}\text{?...}\)
Solution.
Let’s begin by reproducing the internal diagram of \(g\text{:}\)
Since I want \(g \circ f = 1_{\set{0,1}}\text{,}\) I know that \(f\) needs to send each element of \(\set{0,1}\) to something that will return to that value after applying \(g\text{.}\) It seems reasonable to assume that the "possible arrows" for \(f\) must come from the reversed arrows of \(g\) as shown here:
Since there are three options for where \(f\) sends \(0\text{,}\) two options for where it sends \(1\text{,}\) and these choices are independent of each other, the total number of possibilities is the product: \(3 \times 2 = 6\text{.}\) This lends them nicely to a 3x2 grid where the column is the choice of where to send \(0\) and row is the choice of where to send \(1\text{.}\)
Now, that we’ve drawn all possible choices for \(f\text{,}\) let’s choose one and see how many options we might have for \(g\) with the same property \(g \circ f = 1_{\set{0,1}}\text{.}\) I’ll start by taking a single one:
Like before, I know my map \(g\) must contain the reverse of the arrows from my chosen map \(f\text{,}\) but fixing those arrows still leaves 3 points that are unaccounted for in the map. For each of those 3 possible sources, there are two possible destinations.
Since those choices are independent of each other, that means the total number of combinations is \(2 \times 2 \times 2 = 2^3 = 8\text{.}\)
With that, we’ve completed the exercise (and then some).