Source: https://arnaud.jobin.pro/Informatique/ECE_2/TP/Chaines_Markov.pdf