The problem of finding a maximum likelihood trajectory in a Markov chain of a given length is considered.
A decomposition of the Markov chain, seen as a directed weighted graph, is proposed based on the mean-weight cycle analysis.
The proposed decomposition makes it possible to design a polynomial-time algorithm to address the above problem.