Source: http://www.info2.uqam.ca/~makarenkov_v/Cours8.pdf