0

I got this question from one of my friends:

Let $X$ be a set with exactly $5$ elements and $Y$ be a set with exactly $7$ elements. If $α$ is the number of one-one functions from $X$ to $Y$ and $β$ is the number of onto functions from $Y$ to $X$, then the value of $\frac{(β-α)}{5!}$ is ___


I get it that the value of $α$ will be $^7\mathit C _5\cdot5!$, Because number of one-one functions is just the total no of functions from $A$ to $B$ in which every $x\in X$ has a single image in $Y$. How do I calculate $β$?

[Forgive the grammatical errors, if any, English is not my first Language]

N. F. Taussig
  • 76,571

1 Answers1

1

I believe that you are looking for the following


Proposition:

Let $n\geq m>0$ be natural numbers. Then the number of surjections from $\{1,\dots,n\}$ to $\{1,\dots,m\}$ equals $$\sum_{k=0}^m(-1)^k {m\choose k} (m-k)^n.$$


Proof: For $1\leq i \leq m$, let $B_i:=\left\{f:[n]\to [m]\backslash\{i\}\right\}$, where $[N]:=\{1,\dots,N\}$.

Then the number $S$ of surjections from $[n]$ to $[m]$ is given by the cardinality of $$\left(B_1 \cup \dots \cup B_m\right)^C,$$ i.e. the complement of $B_1 \cup \dots \cup B_m$ in the set of all maps from $[n]$ to $[m]$.

Hence $$S=\#\left(B_1 \cup \dots \cup B_m\right)^C=m^n-\#\left(B_1 \cup \dots \cup B_m\right),$$ where we used that the number of maps from $[n]$ to $[m]$ equals $m^n$.

Next, using the principal of inclusion-exclusion, we can replace $\#\left(B_1 \cup \dots \cup B_m\right)$ by

$$\sum_{k=1}^m(-1)^{k-1}\sum_{1\leq i_1<i_2<\dots<i_k\leq m}\#\bigcap_{l=1}^k B_{i_l}=-\sum_{k=1}^m(-1)^k\sum_{1\leq i_1<i_2<\dots<i_k\leq m}(m-k)^n.$$

This leaves us with $$S=m^n+\sum_{k=1}^m(-1)^k\sum_{1\leq i_1<i_2<\dots<i_k\leq m}(m-k)^n.$$

Lastly, $m^n$ can be taken into the first sum, and the second sum just adds up $m\choose k$ times the term $(m-k)^n$, hence the simplification $$S=\sum_{k=0}^m(-1)^k {m\choose k} (m-k)^n.$$


For you, it suffices to replace $n$ by $7$ and $m$ by $5$ in the Proposition's formula.

Zuy
  • 4,656