calculate also the initial prob distribution when calculate the transition matrix