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