The primary goals for algorithm design are correctness and efficiency. An algorithm is said to be CORRECT if, for every input, it halts with the correct output. Contrary to what one might expect, incorrect algorithms can sometimes be useful if their error rate can be controlled. Developing a generic method with which to analyze algorithms and to compared their use of resources with each other will usually separate efficient algorithms from inferior algorithms. The inferior algorithms may still be correct and solve the given problem, however using more time and memory than more efficient algorithms. Algorithms are one of the core technologies of computer science. Usefulness of algorithms is independent of languages and technologies.