HMM discrete case