It is given that there are two sets of real numbers $A = \{a_1, a_2, ..., a_{100}\}$ and $B= \{b_1, b_2, ..., b_{50}\}.$ If there is a mapping $f$ from $A$ to $B$ such that every element in $B$ has an inverse image and $f(a_1)\leq f(a_2) \leq ...\leq f(a_{100})$ Then, what is the number of such mappings?
I have started tackling the problem by supposing that $b_1<b_2<...<b_{50}$ and dividing elements $a_1, a_2, ..., a_{100}$ in $A$ into $50$ nonempty groups according to their order. Now the problem is... How do I compute the number of mappings defined as $f: A\rightarrow B$ given the observations above?
EDIT:My idea is to do an order-preserving partition of the set {$1,2,..,100$} into 50 parts, e.g., (1,2,3), (4,5,6,7,..10),..., (98, 99,100). Then every number in the i-th part would map to $a_i$. I think this takes care of all maps.
This is a matter of balls-in-boxes , i.e., of finding the number of solutions to $x_1+x_2+.....+x_{50}=100; x_i \geq 0$, i.e.,it is a matter of counting the number of ordered partitions of the se $a_1, a_2,...,a_{100}$ into $50$ parts, and then $x_1$ is the number of preimages of $b_1$, and $x_i$ is the number of preimages of $b_i$. So, using the fact that the number of solutions to $$x_1+x_2+....+x_k=n $$ is $(n+k-1)C(k-1)$ , the number of solutions is $$(49+100-1)C(99)=148C99 $$.