On the structure of hidden Markov models