Given a markov model, which has a start state named S
and an exit state named F
, and this model can be represented as a directed graph, with some constraints:
Every edge has some weight falls in the range (0,1] as the transition probability.
Weights of the edges coming out from each node sum to 1.
The question is how to rank the paths between start state and exit state? Or, more precisely, how to find out the path with highest probability?
On one hand, the weights are probabilities, so the longer the path, the smaller would the products be, so one heuristic strategy is to pick shorter path and bigger weight candidates; but can this problem be converted into shortest path problem or using some tailored Viterbi algorithm or some DP algorithm to solve?