Source: https://dpt-info.di.unistra.fr/~stella/enseignement/BD/cours/chap1_2016_2017.pdf