  I tackle the problem of partitioning a sequence into homogeneous segments,
where homogeneity is defined by a set of Markov models. The problem is to study
the likelihood that a sequence is divided into a given number of segments.
Here, the moments of this likelihood are computed through an efficient
algorithm. Unlike methods involving Hidden Markov Models, this algorithm does
not require probability transitions between the models. Among many possible
usages of the likelihood, I present a maximum \textit{a posteriori} probability
criterion to predict the number of homogeneous segments into which a sequence
can be divided, and an application of this method to find CpG islands.
