  We present a method for the exact diagonalization of the $\mathrm{SU}(N)$
Heisenberg interaction Hamiltonian, using Young tableaux to work directly in
each irreducible representation of the global $\mathrm{SU}(N)$ group. This
generalized scheme is applicable to chains consisting of several particles per
site, with any $\mathrm{SU}(N)$ symmetry at each site. Extending some of the
key results of substitutional analysis, we demonstrate how basis states can be
efficiently constructed for the relevant $\mathrm{SU}(N)$ subsector, which,
especially with increasing values of $N$ or numbers of sites, has a much
smaller dimension than the full Hilbert space. This allows us to analyze
systems of larger sizes than can be handled by existing techniques. We apply
this method to investigate the presence of edge states in $\mathrm{SU}(N)$
Heisenberg and AKLT Hamiltonians.
