Source: https://www.math.univ-toulouse.fr/~msablik/Cours/MathDiscretes/Slide2-FonctionsApplications.pdf