Minimization of Dynamical Systems over Monoids