Number of weakly increasing functions $g: \{1,2,3,....m\} \rightarrow \{1,2,3,....m\}$

53 Views Asked by At

How to find the number of weakly increasing functions of $g: \{1,2,3,....m\} \rightarrow \{1,2,3,....m\}$? Here weakly increasing means that $x < y$ implies $g(x) \le g(y)$.

Attempt: The first element $1$ has $m$ choices(including $1$), second element has $m-1$ choices .....
So I get $m!$ , is this right?