  We propose a framework for the connection between local symmetries of
discrete Hamiltonians and the design of compact localized states. Such compact
localized states are used for the creation of tunable, local symmetry-induced
bound states in an energy continuum and flat energy bands for periodically
repeated local symmetries in one- and two-dimensional lattices. The framework
is based on very recent theorems in graph theory which are here employed to
obtain a block partitioning of the Hamiltonian induced by the symmetry of a
given system under local site permutations. The diagonalization of the
Hamiltonian is thereby reduced to finding the eigenspectra of smaller matrices,
with eigenvectors automatically divided into compact localized and extended
states. We distinguish between local symmetry operations which commute with the
Hamiltonian, and those which do not commute due to an asymmetric coupling to
the surrounding sites. While valuable as a computational tool for versatile
discrete systems with locally symmetric structures, the approach provides in
particular a unified, intuitive, and efficient route to the flexible design of
compact localized states at desired energies.
