Source: https://www.irif.fr/~vjuge/af4/automates-1.pdf