Source: https://downloads.tuxfamily.org/mathcluses/2013-14/termES1-spe/cours/graphes2.pdf