Source: https://dmo.econ.msu.ru/Teaching/L2/TrDemo/Exercices_Transition_corr.pdf