Source: https://members.loria.fr/CPierrot/papers/Telecom_apprentis_td1.pdf