Hidden Markov Model and Viterbi algorithm: Understanding the Casino Problem? I am deeply struggling with understanding how to apply the Viterbi algorithm. From my course notes, I have the following simple(I'm told) example:


If the sequence HH was observed, what is the most likely sequence in
  which Fair and Biased coins were used ?

Following table was generated as part of solution:

and the answer was given as O-Biased-Fair with probability 0.2025.
Can someone explain this answer in much detail and simplest way possible ? Thanks.
 A: Not entirely sure I understand the notation, but here's the way I would approach it:  we look at the list of all $2$-toss scenarios.  Restrict to those in which $HH$ is observed and compute the probabilities of each.  
Case I:  Start with $B$.
Then you get that first $H$ with probability $.9$
Case $B-B$  you stay with coin $B$, probability $.1$
Then you get the second $H$ with probability $.9$.
Hence Case $B-B$ has probability $.9*.1*.9=\fbox {.081}$
Case $B-F$  you switch to coin $F$, probability $.9$
Then you get the second $H$ with probability $.5.
Hence Case $B-F$ has probability $.9*.9*.5=\fbox {.405}$
Case II:  You start with $F$  Then you get that first $H$ with probability $.5$
Case $F-F$  you stay with coin $F$, probability $.9$
Then you get the second $H$ with probability $.5$.
Hence Case $F-F$ has probability $.5*.9*.5=\fbox {.225}$
Case $F-B$  you switch to coin $B$, probability $.1$
Then you get the second $H$ with probability $.9$.
Hence Case $F-B$ has probability $.5*.1*.9=\fbox {.045}$
Visibly, the case $B-F$ is by far the most probable (it takes up $53.57\%$ of the scenarios in which we observe $HH$.
Note: as mentioned in the comments, if you imagine that the decision to start with $B$ or $F$ is itself probabilistic (probability $\frac 12$ for each), then each of these probabilities should be divided by $2$...that matches the $.2025$ in the table.  I don't understand the other values in that table.
