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: x_1 \neq x_2 \Rightarrow f(x_1) \neq f(x_2), therefore the number of injections is:
\prod_{i = 0}^{n-1} (m-i) \colon m \geq n
so we have m(m-1)(m-2)(m-3)...(m-(n-1)). m \geq n, because if m < n \Rightarrow \exists x_1, x_2\in X\colon x_1 \neq x_2 \Rightarrow f(x_1) = f(x_2)
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: \forall y \in Y, \exists x \in X \colon f(x) = y
All of the available colours have to be picked, at least, once.
Let's try with a simple example:
f\colon \{x_1, x_2, x_3\}\to \{y_1,y_2\}
there exist 6 surjections out of 8 total possible functions, but since I showed that in case of injections m \geq nthere can exist no injections, hence no bijections.
f\colon \{x_1, x_2\}\to \{y_1,y_2,y_3\} there should be 9 different functions.
Since m \geq n, 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 m\leq n, 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 m < n and I assumed that bijections also do not exist when m > n.
If m > n, there can exist injections. Now we have to show that none of those injections are surjective. Assuming when 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).. 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 m \leq n, then there are (\binom{n}{m})! 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 m \leq n, there are (\binom{n}{m})!\cdot (\binom{m}{n-m})! surjections? Mhh, what about when m=1, n=9? \binom{1}{8}?