Content deleted Content added
streamline first para; Turing link |
m wikify |
||
Line 1:
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
The word ''algorithm'' is a corruption of the word ''algorism'' which came from the name of [[al-Khwarizmi|Abu Ja'far Mohammed ibn Musa al-Khwarizmi]] (ca. [[780]] - ca. [[850]]). He was the author of the book "''Kitab al-jabr w'al-muqabala''" (''Rules of Restoration and Reduction'') which introduced [[Algebra|algebra]] to people in [[the West]]. The word ''[[algebra]]'' itself originates from ''al-Jabr'' from the book title. The word "algorism" originally referred only to the rules of performing [[arithmetic]] using [[Arabic numerals]], but evolved into "algorithm" by the
The lack of mathematical rigor in the "well-defined procedure" definition of algorithm posed some difficulties for mathematicians and
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
# Let A be the greater number of A and B, and B the lesser.
Line 11:
# Repeat steps 1 and 2 until A and B are equal, this number will then be the greatest common divisor of the original numbers.
Algorithms come in different flavours. A [[greedy algorithm]] works by making a series of simple decisions that are never reconsidered. A [[divide-and-conquer algorithm]] [[recursion|recursively]] reduces an instance of a problem to one or more smaller instances of the same problem, until the instances are small enough. A [[dynamic programming algorithm]] works bottom-up by building progressively larger solutions to subproblems arising from the original problem, and then uses those solutions to obtain the final result. Many problems (such as playing [[chess]]) can be modeled as problems on [[graph theory|graphs]]. A [[graph exploration algorithm]] specifies rules for moving around a graph and is useful for such problems. [[Probabilistic algorithm]]s are those that make some choices randomly.
Usually one is not only concerned with how to perform the work but also wishes to know how much of particular resources (such as time or storage) will be needed. Methods have been developed for the [[analysis of algorithms]] to obtain such quantitative answers.
|