Source: http://ses-perso.telecom-paristech.fr/bourreau/files/Exercices_Cours01_Correction.pdf