Assignment 2: Implementing Viterbi algorithm for HMM

In this assignment you have to work on HMM. For this week implement the Viterbi algorithm on the URN problem described in the class. An HMM is defined by three probability matrices A(Transition Probabilities),B(Emission Probabilities) and pi(Initial state probabilities).

The algorithm should be generic. Later this assignment may be extended to include training an HMM i.e to learn the probability values.