Source: http://researchers.lille.inria.fr/~mitton/documents/presentations/exercices_RT.pdf