On the computation of transition matrix