Yesterday at midnight was the deadline of El País math challenge which consisted in finding the Hamiltonian path of a given graph (or to give a demonstration it hadn’t any as it was the case). A friend of mine told me a simple and elegant demonstration based on graph coloration, which is the one explained in the video (the video is in Spanish but it’s my bet there are more demonstrations like this in English on the internet). If you can understand Spanish, I encourage you to watch the video. It’s really short, entertaining and easy to understand.

This tiny python program finds a Hamiltonian path for a given graph and prints the solution (or None if it doesn’t exist, as it happens in this math challenge).