Find the number of increasing functions from $\{ 1,2,3,4,5\}$ to $\{ 6,7,8,9,10\}$. Find the number of increasing functions (not strictly increasing) from $\{ 1,2,3,4,5\}$ to $\{ 6,7,8,9,10\}$. 
There is only one strictly increasing function possible. How do I calculate the others? In all my attempts I was eventually listing down the cases and then adding up all of them, only to get the wrong answer. Is there a nice method?
 A: A hint: You can encode each such function as a binary word containing five stars and four bars, like so:
$$*\>|\ |**\>|**|\quad.$$
A: This may help understanding the other answers. Consider how the $5$ squares and $4$ pluses generate all possible non-decreasing functions.
$$
\begin{array}{c}
\square&\square&\square&\square&\square&+&+&+&+\\
6&6&6&6&6\\\hline
\end{array}
$$
$$
\begin{array}{c}
\square&+&\square&+&\square&+&\square&+&\square\\
6&&7&&8&&9&&10\\\hline
\end{array}
$$
$$
\begin{array}{c}
+&+&+&+&\square&\square&\square&\square&\square\\
&&&&10&10&10&10&10\\\hline
\end{array}
$$
$$
\begin{array}{c}
+&+&\square&\square&\square&+&\square&\square&+\\
&&8&8&8&&9&9
\end{array}
$$
Then count the number of ways to arrange $5$ squares and $4$ pluses.
A: Assume that your imege of the function is $6,8,9$ and you know that $6$ and $9$ have two sources. Then it must be that the sources of $6$ are $1,2$ and the sources of $9$ are $4,5$.
From here you should understand that this is in fact a problem of aranging $5$ identical balls in $5$ cells.
Hence you have 
$$\binom{9}{5}$$
functions.
