Source: http://www.cmap.polytechnique.fr/~bansaye/CoursTD2.pdf