no. of Strictly monotonic function in $f:\{1,2,3,4\}\rightarrow \{5,6,7,8,9\}$ Of all the mapping that can be defined from $f:\{1,2,3,4\}\rightarrow \{5,6,7,8,9\}$ a mapping is
randomly selected. The chance that the selected mapping is strictly monotonic, is
My Try: Total no. of function from $A$ to $B$ in $f:A\rightarrow B$, is $n^m$
where $A$ contain $m-$elements and $B$ contain $n-$ elements.
So Total no. of function is $5^4$.
Now Total cases for Strictly monotonic function
(Means function which is either Strictly Increasing Increasing function or Strictly Decreasing functions.)
Strictly Increasing function: Means $f(1)<f(2)<f(3)<f(4)$
where values of $f(i)\in \{5,6,7,8,9\}, \forall  i=1,2,3,4$
Similarly 
Strictly Decreasing function: Means $f(1)>f(2)>f(3)>f(4)$
where values of $f(i)\in \{5,6,7,8,9\}, \forall  i=1,2,3,4$
Now I did not understand How we can count Strictly Increasing and Strictly Decreasing function.
Help Required
Thanks
 A: To count strictly increasing functions, consider some subset $S \subset \{5,6,7,8,9\}$ with four elements. There is extactly one strictly increasing function that maps onto $S$, so the number of such functions is the same that the numbers of subsets with $4$ elements, that is, $\binom 54$. Same reasoning for strictly decreasing functions.
A: Yes: the total number of functions is $5^4$, and now let's count the number of increasing functions and decreasing ones.


*

*Strictly increasing functions: there is a straightforward way to count the number of these functions. Put the $y$ values ${5,6,7,8,9}$ in increasing order, then if you cross out any of the five numbers, you obtain only a function: e.g. cross out the $8 \Rightarrow f(1) = 5, f(2) = 6, f(3) = 7 \text{ and } f(4) = 9$. So there are $5$ possible increasing functions.

*Strictly decreasing functions: you can solve this case with the previous reasoning.


Finally, chance that the selected mapping is strictly monotonic $ = \frac{5+5}{5^4} = \frac{2}{5^3} = 0.016 \text{%} $
