Markov Models for Pattern Recognition: From Theory to Applications