Content deleted Content added
No edit summary |
"Algorithm" is not the same as "computer program"! |
||
Line 32:
: Kragen, have a look at the [[:pseudocode|pseudocode]] page, we thrashed out a "standard pseudocode" for Wikipedia a while ago (though feel free to make suggestions/improvements). The trouble with providing actual implementations of algorithms in real languages is that the trees start to get in the way of the forest. This is less of a problem in Python and Scheme, of course. --[[:Robert Merkel|Robert Merkel]]
----
An algorithm is not a rough form of a computer program. This is an example (among many) of the distinct Computer-science bias of the Wikipedia.
Not every computer program is an algorithm either, at least according to some of the definitions of algorithm.
I don't have a reference handy, but I have seen '''algorithm''' defined to mean, roughly, a finite set of rules that is supposed to produce an answer in a finite number of steps. Therefore, infinite loops (which can occur in computer programs) cannot occur in algorithms according to this definition.
This is, by the way, one of the motivations for the study of the [[halting problem]]. How do you prove that a certain method is in fact an algorithm?
|