In theoretical computer science, correctness of an algorithm is asserted when it is said that the algorithm is correct with respect to a specification.