How does one compute the branching rules for $SU(3)\to SU(2)\times U(1)$.?
In particular, I do not know how to put the abelian charges.
Take for example the adjoint $\mathbf{8}$ of $SU(3)$.
I can see it decomposes as $\mathbf{8}\to\mathbf{3}+2\cdot\mathbf{2}+\mathbf{1}$.
But how do I figure out the representations of the $U(1)$ factor?
Furtheremore, does a general procedure, or a specific computer program exist in order to compute these branching rules? For example, how would one go with computing the branching rules of $SU(5)$?