Content deleted Content added
m markup |
Isis~enwiki (talk | contribs) adding intro to remove "Computer-science bias" 203.192.202.140 pointed out on talk page |
||
Line 1:
[[de:Algorithmus]][[eo:Algoritmo]][[fr:Algorithme]][[pl:Algorytm]][[nl:algoritme]]
Generally, an '''algorithm''' is a list of instructions for accomplishing some task, and the task can be anything that has a recognizable end-point (or result). Often some of the specific steps in the procedure are to be repeated until the task is done. A recipe is one kind of algorithm, and there can be different algorithms for accomplishing the same task: Some recipes for making potato salad, for example, have "peel the potato" before "boil the potato", while some have the "boil" step before the "peel" step (and others leave out the "peel" step entirely), but they all call for those steps to be repeated for however many potatoes there are, and they all end when the potato salad is ready to eat.
An '''algorithm''' is a well-defined method or procedure for solving a problem, usually a problem in [[mathematics]] or otherwise relating to the manipulation of [[information]]. Typically, an algorithm is described as a series of actions that have to be done plus an indication of whether and when they are to be repeated. Some people restrict the definition of ''algorithm'' to procedures that eventually finish, while others also include procedures that run forever without stopping. Algorithms are often implemented as [[computer program]]s but can also be implemented as [[electric circuit]]s or even performed directly by [[human]]s. ▼
▲
As an example of an algorithm, here is one given to us by [[Euclid]], and thus known as the [[Euclidean algorithm]], for finding the [[greatest common divisor]] (GCD) of two positive [[integer]]s A and B:
|