Source: https://www.lix.polytechnique.fr/~liberti/teaching/isic/isc612-06/exercises-solutions.pdf