We present very fast algorithms for the exact computation of estimators for time series, based on complexity penalized log-likelihood or M-functions. The algorithms apply to a wide range of functionals with morphological constraints, in particular to Potts or Blake-Zisserman functionals. The latter are the discrete versions of the celebrated Mumford-Shah functionals. All such functionals contain model parameters. Our algorithms allow for optimization not only for each separate parameter, but even for all parameters simultaneously. This allows for the examination of the models in the sense of a family approach. The algorithms are accompanied by a series of illustrative examples from molecular biology.