Find the number of injective functions $f\colon\{1,2,\ldots,n\}\to\{1,2,\ldots,m\}$ such that $f(i)>f(i+1)$ Let $n$ and $m$ be two natural numbers, $m\ge n\ge 2$ . Find the number of injective functions
$f\colon\{1,2,\ldots,n\}\to\{1,2,\ldots,m\}$
such that there exists a unique number
$i\in\{1,2,\ldots,n-1\}$ for which $f(i)>f(i+1)$
My Attempt
Number of injective functions should be $\binom{m}{n}(n!)$. But the question asks for number of injective functions such that for some specific $i$ we have $f(i)>f(i+1)$
 A: Let's first focus on the case $m = n $:
We're then equivalently looking for bijections $f$ of $[n] := \{1,2,\dots, n\}$ with that ordering condition.
We can (uniquely) construct each of these $f$ in the following way:

*

*Select the specific $i \in [n-1]$.

As $i$ should be unique, we have
$$f(1) < f(2) < \dots < f(i-1) < f(i) > f(i+1) < f(i+2) < \dots < f(n).$$
So, $f(i)$ needs to be bigger than $1, \dots, i$ for this to be true, therefore:


*Select $f(i) := j \in \{i+1, \dots, n\}$.

The values of $f(1), f(2), \dots, f(i-1)$ need to be smaller than $j$, so they're in $[j-1]$.
By the ordering above, each subset of size $i-1$ of $[j-1]$ thus characterizes $f$ uniquely. (Why?)
Putting all of this together, the number of such bijections is
$$\sum_{i = 1}^{n-1} \sum_{j = i+1}^{n} \binom{j-1}{i-1} = \sum_{j = 1}^n \sum_{i =1}^{j-1} \binom{j-1}{i-1} = \sum_{j = 1}^n (2^{j-1} - 1)  = 2^n - n -1.$$
For the general $m \geq n$ case, we first choose the subset of size $n$ of $[m]$ at the beginning on which you want to map onto.
So the number of injective functions with that ordering property is
$$\binom{m}{n} (2^n - n -1).$$
Edit:
For the $m = n$ case, you could also (more elegantly) just consider the injection
$$f \mapsto \{f(1), f(2), \dots, f(i_f) \}$$
($i_f$ denoting the unique index of $f$ with $f(i) > f(i+1)$) between the desired functions and subsets of $[n]$.
By our observations above, it should be clear that this is indeed an injective function. It should also be clear that the only subsets of $[n]$ which are not mapped onto are exactly $\emptyset, [1], [2], \dots, [n]$. So in the $m =n$ case the number of the desired functions is
$$2^n - (n+1) = 2^n - n - 1.$$
