let A ={1,2,3,4,5} and B={6,7,8,9,10}
then how many non decreasing functions are possible from A to B?
Well... the total number of functions from A to B minus the number of decreasing functions from A to B.
The total number of functions from A to B is $\displaystyle 5^5=3125$ and the number of decreasing functions from A to B is $\displaystyle \binom{5+5-1}{5}=\binom{9}{5}=126$.
First, I think the answer in reply #2 is incorrect.
Suppose that you selected ten numbers from set B allowing repeated memberships.
Here is an example of such a multiset: [9,6,8,6,8].
I can rearrange that selection this way: [6,6,8,8,9].
That can be thought of as a non-decreasing function from $\displaystyle A\to B$.
Written in permutation notation: $\displaystyle \sigma=\binom{1~2~3~4~5}{6~6~8~8~9}$ so $\displaystyle \sigma(3)=8$.
So any multi-selection of five from set B corresponds to non-decreasing function from $\displaystyle A\to B$.
There are $\displaystyle \binom{5+5-1}{5}$ such selections.
Another way to look at it would be:
A non-decreasing function could hit 1, 2, 3, 4, or all 5 of the values in $\displaystyle B$. So, if it hits only 1 value, there are $\displaystyle 5$ functions that would do that.
If it hits two values, there are $\displaystyle \binom{5}{2}$ different choices for the two values. Since $\displaystyle \sigma(1)$ must go to the lesser number, there are $\displaystyle 4$ possible choices for numbers $\displaystyle n$ such that $\displaystyle \sigma(n)$ is the least element of $\displaystyle A$ that goes to the higher element of $\displaystyle B$.
If it hits three values, there are $\displaystyle \binom{5}{3}$ different choices for the three values, then $\displaystyle \binom{4}{2}$ choices for the two elements in $\displaystyle A$ that will map to the higher two elements.
If it hits four values, there are $\displaystyle \binom{5}{4}$ different choices for four values, then $\displaystyle \binom{4}{3}$ choices for the three elements in $\displaystyle A$ that will map to the higher three elements.
Finally, if it hits all five values, there is one possible function that will map it.
So, adding them all up, we get: $\displaystyle 5 + (10)(4) + (10)(6) + (5)(4) + 1 = 126$ just as Plato got. (In case you are not familiar with multi-set permutations).