  Given a numerical semigroup S = <a_0, a_1, a_2,..., a_t> and n in S, we
consider the factorization n = c_0 a_0 + c_1 a_1 + ... + c_t a_t where c_i >=
0. Such a factorization is maximal if c_0 + c_1 + ... + c_t is a maximum over
all such factorizations of n. We provide an algorithm for computing the maximum
number of maximal factorizations possible for an element in S, which is called
the maximal denumerant of S. We also consider various cases that have
connections to the Cohen-Macualay and Gorenstein properties of associated
graded rings for which this algorithm simplifies.
