Source: https://lipn.univ-paris13.fr/~rozenknop/Cours/L1PI2/exercicesCorriges.pdf