Composition of groups Let's say we have a system of interacting particles that can divided into two populations. The symmetry group of each population is $G$, and the two populations are identical, so that I can exchange them and the system remains invariant (see figure). I think the symmetry under exchange of the two populations should be described by the symmetric group $S_2$, see here.

My question is: what is the symmetry group of the whole system? Intuitively it should be some kind of composition between $S_2$ and $G$, but which one?
 A: If I understand your question correctly, you have two systems $A$ and $B$, on both of which a symmetry group $G$ acts, so we have mappings
$$G\times A\to A,\ \ \ (g,a)\mapsto ga$$
and
$$G\times B\to B,\ \ \ (g,b)\mapsto gb$$
If the composed system is $A\times B$, then it symmetry group obviously includes $G\times G$ by $(g,h)(a,b) = (ga, hb)$. We have an additional symmetry: 
$$S_2\times (A\times B)\to A\times B,\ \ \ (\sigma, (a,b))\mapsto (b,a)$$
where $\sigma$ is the generator of $S_2$. Now what happens with the composition?
$$\sigma(g,h)(a,b) = (hb,ga)$$
while 
$$(g,h)\sigma(a,t) = (gb,ha)$$
If we define the automorphism $\phi_\sigma$ of $G\times G$ by $\phi_\sigma(g,h) = (h,g)$, then we have 
$$(g,h)\sigma(a,b) = (gb,ha) = \sigma\phi_\sigma(g,h)(a,b)$$
showing that your full symmetry group is (or rather contains) the semidirect product
$$(G\times G)\rtimes_\phi S_2$$
In the quantum mechanical context, $A$ and $B$ are vector spaces, and the combined system is something like $A\otimes B$, on which we also have the action of $G\times G$ and of $S_2$ and the final result is the same.
