If the first person makes a choice out of m colours, the next person can choose between m-1 colours, the third person between m-2 for there can be no repetition.
According to the definition of injectivity in this scenario: [itex]x_1 \neq x_2 \Rightarrow f(x_1) \neq f(x_2)[/itex], therefore the number of injections is:
[tex]\prod_{i = 0}^{n-1} (m-i) \colon m \geq n[/tex]
so we have m(m-1)(m-2)(m-3)...(m-(n-1)). [itex]m \geq n[/itex], because if [itex]m < n \Rightarrow \exists x_1, x_2\in X\colon x_1 \neq x_2 \Rightarrow f(x_1) = f(x_2)[/itex]
If m = n, then there is one specific setup for the colours, however, their respective originals (the people) can vary, therefore we have m! = n! injections (also bijections)
According to surjectivity: [itex]\forall y \in Y, \exists x \in X \colon f(x) = y[/itex]
All of the available colours have to be picked, at least, once.
Let's try with a simple example:
[itex]f\colon \{x_1, x_2, x_3\}\to \{y_1,y_2\}[/itex]
there exist 6 surjections out of 8 total possible functions, but since I showed that in case of injections [itex]m \geq n[/itex]there can exist no injections, hence no bijections.
[itex]f\colon \{x_1, x_2\}\to \{y_1,y_2,y_3\}[/itex] there should be 9 different functions.
Since [itex]m \geq n[/itex], we should have 6 injections. There can be no bijections since only 2 people choose between 3 colours. If there are no bijections, then none of the 6 injections can be surjective at the same time, which leaves only 3 possible surjections.
Trying to generate them, however, leads nowhere
f1: f(x1) = y1, f(x2) = y2 and there is no argument left to make a surjection, which leaves y3 without original. No surjections are possible. Hypothesis: surjection exists iff [itex]m\leq n[/itex], if m = n, then it's also an injection, hence a bijection.
IS it correct to assume that bijections only exist when m = n, in which case the number of bijections is m! (it would make sense, since the word bijection itself means 1:1). I showed that there can not exist injections when [itex]m < n[/itex] and I assumed that bijections also do not exist when [itex]m > n[/itex].
If [itex]m > n[/itex], there can exist injections. Now we have to show that none of those injections are surjective. Assuming when [itex]m > n.\ \forall y\in Y,\exists x\in X: \forall x_1,x_2 \in X, x_1 \neq x_2 \Rightarrow f(x_1) \neq f(x_2)[/itex].. and now I'm a bit stuck. How to show this leads to contradiction?
As for the number of surjections, in case of n=3, m=2, there are 6 surjections. if m = n, there are m! surjections and if m > n, there can be no surjections.
This feels like permutation with repetition. We can distribute m different colours between the n people such that we satisfy surjectivity and then we can have any number of colours between the rest of the people. If [itex]m \leq n[/itex], then there are [itex](\binom{n}{m})![/itex] possibilities to create the so-called base of surjectivity. We are left with m colours, now to be distributed between n-m people and then apply the rule of product: if [itex]m \leq n[/itex], there are [itex](\binom{n}{m})!\cdot (\binom{m}{n-m})![/itex] surjections? Mhh, what about when m=1, n=9? [itex]\binom{1}{8}[/itex]?