# Is my understanding of what an algorithm is correct? [closed]

1. My definition of an algorithm is a finite sequence of operations provided by an abstract machine, where the operations are executed one after another in the order specified by the sequence.
2. Different machines may provide different sets of operations, so the definition of an algorithm depends on the abstract machine and can be different on different abstract machines.

Thanks.

• I asked a related question here cs.stackexchange.com/questions/32533/…
– Tim
Commented Nov 2, 2014 at 0:54
• The machine is not necessarily abstract : computers use algorithms, our brains use algorithms, etc.. It is abstract when you formalize it. Commented Jul 16, 2015 at 15:42

While very vague, I don't see anything inherently wrong with your "definition", nor do I know strictly better ones.

One of my professors gave us this definition of algorithms when he was about to introduce Turing Machines:

An algorithm is a finite sequence of instructions which always terminates and gives us a result.

Therefore an algorithm requires termination as well as the production of a result, otherwise it is nothing more than a procedure which is a sequence of operations/instructions.

A procedure may be effectively calculable by pen/paper method, but an algorithm is effectively computable by a Turing machine.

• Welcome to Computer Science Stack Exchange. May be you should relate more your answer to the question asked. In what way does your definition differ from that given by the OP of the question. That might shed some light as to what issues may be. For example, you require termination, which he does not. Does that have implications? Just having one assertion/definition against another is not much help to readers. Answers should motivated, or at least defended or discussed, or compared in some way. Commented Jul 16, 2015 at 9:36
• Tried to improve on the answer. Hope it is better. Commented Jul 16, 2015 at 9:46
• Actually, the Turing machine was designed to be the mechanical equivalent of the pen and paper method. It was considered adequate by mathematicians expert in those issues. So I doubt it is reasonable to attempt to distinguish them in two separate definitions. But I actually made a mistake: your only difference with the question is about the prodution of a result, which seems reasonable. Actually, these definitions correspond to halting turing machines. People sometimes call it semi-algorithm when the computation does not terminate on some inputs. Commented Jul 16, 2015 at 10:08
• True. Let's see whether OP accepts this defintion. Commented Jul 16, 2015 at 10:26
• @babou: what do you mean by " prodution of a result"? When an abstract machine executes a sequence of operations, it will do something whether that something is desired or not and whether that something is null or not. So by "a result", do you mean the desired one only?
– Tim
Commented Jul 16, 2015 at 13:44