1

Consider the sets $A:= \{1, 2, 3, 4\}$ and $B:= \{1,2,3\}$. It is not hard to count the number of surjections $A \to B$, namely $36$, by subtracting the number of non-surjections from $81$.

But I'm not sure where exactly the following naive approach goes wrong.

Pick one of the four elements of $A$ to be mapped to $1$. Then select one of the three remaining elements to be mapped to $2$. Then select one of the remaining two to be mapped to $3$. Then for the last element, select one of the three elements of $B$ to be its image. In total, we get $4*3*2*3 = 72$ surjections.

Could someone please point out the mistake in reasoning?

CuriousKid7
  • 4,134

1 Answers1

7

Suppose in one instance you chose $1 \mapsto 1, 2 \mapsto 2, 3 \mapsto 3$ and then $4 \mapsto 1$. Then in another instance you chose the following $4 \mapsto 1, 2 \mapsto 2, 3 \mapsto 3$ and then $1 \mapsto 1$. But they are the same function. So you are overcounting.

Anurag A
  • 41,067