add question3 Viterbi algorithm