  Let $\mathcal S \subseteq \mathbb Z^m \oplus T$ be a finitely generated and
reduced monoid. In this paper we develop a general strategy to study the set of
elements in $\mathcal S$ having at least two factorizations of the same length,
namely the ideal $\mathcal L_{\mathcal S}$. To this end, we work with a certain
(lattice) ideal associated to the monoid $\mathcal S$. Our study can be seen as
a new approach generalizing \cite{chapman:2011}, which only studies the case of
numerical semigroups. When $\mathcal S$ is a numerical semigroup we give three
main results: (1) we compute explicitly a set of generators of the ideal
$\mathcal L_{\mathcal S}$ when $\mathcal S$ is minimally generated by an almost
arithmetic sequence; (2) we provide an infinite family of numerical semigroups
such that $\mathcal L_{\mathcal S}$ is a principal ideal; (3) we classify the
computational problem of determining the largest integer not in $\mathcal
L_{\mathcal S}$ as an $\mathcal{NP}$-hard problem.
