 The optimal match is denoted by the match that satisfies all the restrictions and the rules and that has the minimal cost, where the cost is computed as the sum of absolute differences, for each matched pair of indices, between their values.A hidden Markov model can be represented as the simplest dynamic Bayesian network.The goal of the algorithm is to estimate a hidden variable x(t) given a list of observations y(t).