Source: https://perso.liris.cnrs.fr/aline.parreau/Teaching/RO/Exam2018.pdf