Inference in Hid-den Markov Models