Let $[n] = \{1,2,\ldots,n\}$. A function $f: [n] \rightarrow [n]$ is called monotone if for $1 \le i < n, f(i) \le f(i+1)$.
Consider the following monotone function $f: [n] \rightarrow [n]$, such that where $\forall a,b \in [n], f(a) = b$ is at most $m$ times. How may $f$ functions are there? But how to formally proof such a problem?
Although I noticed that $f$ is somewhat a surjective function, it has a constraint on how many images to be mapped. So I've tried to solve the problem by considering a sample case with $n=5,m=2$ and manually count the individual cases, namely for $2 \le k \le n$, I count the different combinations $\displaystyle \binom{n}{k}$ where each image is mapped at most twice. I also noticed that some cases overlap.
- "f is monotone" - you are basically saying $f(n) \leq f(n+1)$, right?
- for any value of $b$, there are at most $m$ possible sulutions for $f(x)=b$, right?
– Anderson Torres Sep 09 '20 at 02:36