Given: A string x, followed by the alphabet Σ from which x was constructed, followed by the states States, transition matrix Transition, and emission matrix Emission of an HMM (Σ, States, Transition, Emission).

Return: The probability Pr(π_{i} = k|x) that the HMM was in state k at step i (for each state k and each step i).

Sample Dataset

zyxxxxyxzz
--------
x y z
--------
A B
--------
A B
A 0.911 0.089
B 0.228 0.772
--------
x y z
A 0.356 0.191 0.453
B 0.04 0.467 0.493