Number of monotonic functions satisfying the given conditions

combinatoricsfunctions

Number of monotonic functions which are either only increasing or only decreasing from the set {$1,2,3,4,5,6,7$} to itself should be $2* \binom{13}{6}$ , but what about the those functions for which $f(x) \leq x$ for all $x$ or $f(x) \geq x$ for all $x$ ? I think its should be done recursively but i am not getting it properly. My method was checking small cases like 2 numbers it would be $f(1) = 1$ ,$f(2)=2$ , or $f(1)=2$ ,$f(2)= 2$ for case of $f(x) \geq x$.

Best Answer

First, let us deal with the functions $f:\{1,\dots,7\}\to \{1,\dots,7\}$ which are weakly increasing and satisfy $f(x)\le x$. Imagine graphing such in the Cartesian plane, meaning we plot the seven points of the form $(x,f(x))$ for $x\in \{1,\dots,7\}$. All of the points will lie in the right triangle $T$, whose vertices are $(1,1)$, $(7,1)$, and $(7,7)$.

There is another kind of famous combinatorial problem involving the lower half of a square in a rectangular grid. It is well known that the Catalan numbers count the number of lattice paths, where each step is one unit up or one unit to the right, from $(1,1)$ to $(n,n)$, such that the path stays weakly below the line $y=x$. You can find a bijection from the set of such lattice paths from $(1,1)$ to $(7,7)$, to the set of functions $f:\{1,\dots,7\}\to \{1,\dots,7\}$ under the given conditions.

Here is an example of the bijection I had in mind when $7$ is reduced to $3$. I am writing the functions $f:\{1,2,3\}\to \{1,2,3\}$ as a list, $(f(1),f(2),f(3))$.

Paths:

     |       |     _|       |       _|
     |      _|    |      _ _|     _|
_ _ _|  _ _|   _ _|    _|       _|

Functions:

$$ (1,1,1)\quad (1,1,2)\quad(1,1,3)\quad(1,2,2)\quad(1,2,3) $$


Finally, what happens when you change the condition $f(x)\le x$ to the condition $f(x)\ge x$? This time, the graph of $f$ will lie in the triangle $U$ whose vertices are $(1,1)$, $(1,7)$ and $(7,7)$. This is congruent to triangle $T$, and there is a simple bijection taking the graph of a function which fits in $T$ to the graph of a function that fits in $U$; just rotate it $180^\circ$ around the midpoint of the long edge of $T$. You should plot all of the functions for the smaller $\{1,2,3\}$, once for the $f(x)\le x$, once for the $f(x)\ge x$ version, to convince yourself they really are $180^\circ$ rotations of each other. Therefore, the two variants have the same solution.

Related Question