Source: https://igm.univ-mlv.fr/ens/Master/M1/2007-2008/InfoGen/cours/BlinGuillaume-InfoGen-Cours5-4x2.pdf