3

Is there a simple formula for finding the number of surjective mappings from a set of cardinality m to a set of cardinality n with m > n ?

shadow kh
  • 953
  • 5
  • 15
  • Maybe this helps: http://math.stackexchange.com/questions/716886/number-of-surjections-from-1-m-into-1-n – bob Jan 31 '17 at 09:45
  • 2
    I have seen it but on computing the value from a set of m=4 to a set of n=3, I get 36 as the answer. But the answer says it is 69. Can u show me how 69 occurs? – shadow kh Jan 31 '17 at 10:11

2 Answers2

3

Yes there is a formula, the number of surjective functions from a set $X$ of cardinality $k$ to a set $Y$ of cardinality $n$, is given by $|surj(k,n)|=n! S_{k,n}$ where $S_{k,n}$ are the Stirling numbers of the second kind.

Hamilcar
  • 594
2

A function $f:X \to Y$ is called surjective when each of its preimages isn't empty. They form a partition of $Y$ into $k=|X|$ "blocks". On the other hand each partition from $Y$ into $k$ "blocks" lead to $n!$ surjective functions from $X$ to $Y$. Let denote $S_{n,k}$ they number of these partitions. They are basically the Stirling numbers of the second kind.

You can calculate the Stirling numbers by the following recursion: $S_{n,k} = S_{n-1,k-1}+ k S_{n-1,k}$. This can be seen in the following way:

The set of all partitions of the Set $Y:=[n]$ with $[n]=\{1,2,3,...,n\}$ decay in two disjoint subsets.

  1. all partitions with $n \in Y$ is an own "block" of the partition
  2. all partitions with $n \in Y$ isn't an own "block" of the partition

ad 1) you can remove the the "block" {n} and this leads to a partition of $[n-1]$ into $k-1$ blocks and that is given by $S_{n-1,k-1}$.

ad 2) you can remove $n$ from his corresponding "block" and this leads to a partition of $[n-1]$ into $k$ "blocks" but from each such partition you can make $k$ partitions of $[n]$ when u put the element $n$ back to one "block". Therefore we have $k S_{n-1,k}$.

When you solve this recursion this leads to

$S_{n,k} = \frac{1}{k!} \sum_{i=0}^{k} \binom{k}{i} (-1)^{k-i} i^n$

Hamilcar
  • 594