Function with some property A function $f$ is defined on the set $\{0,1,2,3,…,n-1\}$ to itself. This is such a function that if you take any $k$ from the set $\{0,1,2,3,…,n-1\}$ then $f^m (k)=0$ for some natural number $m$. 
There are exactly $n^{n-1}$ many functions with the said property.
Next question is how many of the functions (with the property) are there, which are monotonically decreasing? 
Example: for $n=3$, $f(0)=0,f(1)=0$ and $f(2)=1$. 

For $f$ to be monotonoically decreasing and have the property that $f^m(x) = 0$ for some $m$ and all $x$, it is necessary and sufficient for $f(x) < x$ (except, obviously, $f(0) = 0$).
This reduces to a combinatorics problem: $f(n-1)$ can map to any of $n-1$ elements ($0$ through $n-2$), $f(n-2)$ can map to any of $n-2$ elements, etc.  So the total number of functions that satisfy your properties is $(n-1)(n-2)(n-3)...(3)(2)(1) = (n-1)!$
