Source: https://www.cril.univ-artois.fr/~konieczny/enseignement/DIP.pdf