Ways to merge $n$ indistinguishable objects into $m$ indistinguishable objects My question is closely related to this one. Suppose you have $n$ indistinguishable objects and and you want to merge them into $m$   indistinguishable objects. You may merge any number of objects into one at a given step. How many ways are there to merge them ? 
I am not very familiar with combinatorics, I would really appreciate a detailed 
answer. Thanks!   
 A: The searched number is equal to the total number of ways in which the difference $n-m \,$    can be expressed as a sum of positive integers. This corresponds to the number of compositions of $n-m \,$, which is $2^{n-m-1}$. 
Accordingly, the example with $n=5$ and $m=2 \,$ stated in the comments leads to $2^{5-2-1}=4 \, \,$ possible ways. 
A: Anatoly has answered this, but I think it's worth expanding on how the answer is obtained.  Since the objects are indistinguishable, it is impossible to say which objects get merged into which at each step. You can only say by how much the number of objects has been reduced in a given step.  For a total reduction from five objects to two objects, as in your example in the comments, the number of objects needs to be reduced by three.  This can be done (1) in one step, (2) by reducing first by $2$ and then by $1$, (3) by reducing first by $1$ and then by $2$, or (4) by reducing by $1$ in each of three separate steps.  These correspond to the representations of $3$ as a sum of one or more non-zero integers:
$$
\begin{aligned}
3&=3\\
&=1+2\\
&=2+1\\
&=1+1+1
\end{aligned}
$$
These correspond to the dot patterns below.
$$
\begin{aligned}
&{\bullet}{\circ}{\circ}\\
&{\bullet}{\bullet}{\circ}\\
&{\bullet}{\circ}{\bullet}\\
&{\bullet}{\bullet}{\bullet}
\end{aligned}
$$
The rule for associating dot patterns with sums is that a new term in the sum starts with each solid dot.  For a sum of $n$, there will be $n$ dots. The first dot is always solid.  There are therefore $2^{n-1}$ dot patterns, and hence $2^{n-1}$ sums.
Added: There was a question in the comments about whether the set of compositions of $n$ has any sort of group structure.  This answer improves on what was said in the comments.  In the comments I made the unfortunate decision to define a poset and then a group using a diagram that appears in the Wikipedia article on compositions.  Things would have worked much more neatly had I turned the diagram upside-down.  In this answer I will do this—essentially redoing everything from scratch.  The main changes are reversing the definition of less-than and reversing the identification of solid and open dots with $0$s and $1$s.
The set of compositions of $n$, ordered by refinement, is a poset.  Given compositions $p$ and $q$, we say that $p<q$ if $q$ is a refinement of $p$, that is, if $q$ is obtained from $p$ by replacing one or more of the terms in $p$ by compositions of those terms.  So we would say that $(1+1+3)>(2+3)$ since $(1+1+3)$ is obtained from $(2+3)$ by replacing $2$ with $1+1$. Similarly $(3+1+4+2+1+1)>(4+4+4)$ since the former is obtained from the latter by replacing the first $4$ with $3+1$ and the last $4$ with $2+1+1$.  The refinement order relation is a partial but not a total order because some compositions are not comparable. For example $(1+2+1)$ is neither greater nor less than $(2+2)$.
As is usual with posets, we say that $y$ covers $x$ if $y>x$ and there is no $z$ in the poset such that $y>z>x$.  The Hasse diagram of the poset is the graph in which the vertices are poset elements and edges are drawn between all $x$ and $y$ for which $y$ covers $x$.  An example is shown below for the compositions of $4$.  The diagram in the top left uses the standard representation of compositions; the one in the bottom left uses the dot representation; the one in the bottom right removes the first dot, which is always solid, and replaces solid and open dots in the remaining positions with $1$s and $0$s.

Focusing on the diagram in the bottom right, a group stucture becomes apparent.  We can regard the diagram as the Cayley diagram of a group whose elements are patterns of $n-1$ bits and whose operation is exclusive or.  The group has $n-1$ generators, corresponding to performing the exclusive or with the bit patterns $100\ldots0$, $010\ldots0$, $\ldots$, $000\ldots1$.  The Cayley diagram is an $(n-1)$-dimensional hypercube, and the $n-1$ edge directions correspond to the generators of the group.  The group is isomorphic to
$$
(\mathbf{Z}/2\mathbf{Z})\times(\mathbf{Z}/2\mathbf{Z})\times\ldots\times(\mathbf{Z}/2\mathbf{Z}),
$$
where there are $n-1$ factors in the direct product and $\mathbf{Z}/2\mathbf{Z}$ is the cyclic group of order $2$.
To understand the group structure in terms of compositions, we use an alternative representation of compositions in terms of their partial sums.  The partial sums of a composition $p_1+p_2+\ldots+p_k=n$ are $0$, $p_1$, $p_1+p_2$, $p_1+p_2+p_3$, $\ldots$, $n$.  Since the partial sums $0$ and $n$ occur in every composition of $n$, we omit these.  We now identify a composition with the set of its remaining partial sums:
$$
p_1+p_2+\ldots+p_k\leftrightarrow\{p_1,p_1+p_2,\ldots, p_1+p_2+\ldots+p_{k-1}\}.
$$
The Hasse diagram for the poset in terms of this representation is shown in the upper right above.  This is seen to be the poset of subsets of $\{1,2,\ldots,n-1\}$, orderd by inclusion.  It can also be interpreted as the Cayley diagram of a group, where the group operation is the symmetric difference of two sets,
$$
A\Delta B=(B\setminus A)\cup(A\setminus B)=(B\cap A’)\cup(A\cap B’).
$$
In words, if a given partial sum is either present in both of two compositions or absent in both, then it will be absent in their symmetric difference; if it is present in one and absent in the other, then it will be present in their symmetric difference.  The generators of the group are the operations of taking the symmetric difference with the singleton sets $\{1\}$, $\{2\}$, $\ldots$, $\{n-1\}$.
