Source: https://lamsade.dauphine.fr/~mayag/tp1_2011-12.pdf