Theory of algorithms