Galois Theory of Algorithms