2

I am working on a combinatoric proving that the number of surjective functions $f\colon [n]\to [3]$ is equal to $1/2(3^{n-1}-2^n+1)$

I approached the problem as below Let’s consider that we have a set $\{1,2,3,\ldots,n\}$ and $\{A,B,C\}$ and we are trying to count the number of surjections by treating $A,B,C$ like buckets to fill with $1,2,3,\ldots,n$ such that no bucket should remain empty. So we can proceed by noticing that there are $3^n$ functions altogether, and $2^n$ from these functions are from $\{1,2,3\,\ldots,n\}$ to $\{A,B\}$ missing $C$ so we should not count those. Similarly we will have to remove the functions from $\{1,2,3,\ldots,n\}$ to $\{B,C\}$ missing $A$ and from $\{1,2,3\ldots,n\}$ to $\{A,C\}$ missing $B$. Each of which is $2^n$. So we are left with $3^n-3(2^n)$ but this way we have removed each of the elements $A,B,C$ thrice so need to include these again which would give us the adjusted count as $3(3^{n-1}-2^n+1)$.

but missing how to get the half instead of three times.

N. F. Taussig
  • 79,074
Asif DanS
  • 21
  • 3
  • There are six permutations of the 3-element set, and you seem to be overcounting by a factor of six. Maybe start thinking along those lines? – SlipEternal May 02 '19 at 20:35
  • 4
    The given answer is wrong. Consider for example the case of $n=3$. There are exactly $6$ surjective functions. But $(1/2)(3^2-2^3+1) = (1/2)(9-8+1) = 1$. Whereas your count gives $3(3^2-2^3+1) = 3(9-8+1) = 6$, the correct number. – Arturo Magidin May 02 '19 at 20:36
  • Thanks for the approach shared i will recheck the statement and share here accordingly... – Asif DanS May 03 '19 at 00:55

0 Answers0