An algorithm is an effetive method expressed as a finite list of well-defined instructions for calculating a function, Starting from an initial state and intial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state.