In mathematics and computer science, an algorithm (/ˈælɡərɪðəm/ ) is a finite sequence of mathematically rigorous instructions, typically used to solve a class of specific problems or to perform a computation.^{[1]} Algorithms are used as specifications for performing calculations and data processing. More advanced algorithms can use conditionals to divert the code execution through various routes (referred to as automated decisionmaking) and deduce valid inferences (referred to as automated reasoning), achieving automation eventually. Using human characteristics as descriptors of machines in metaphorical ways was already practiced by Alan Turing with terms such as "memory", "search" and "stimulus".^{[2]}
In contrast, a heuristic is an approach to problemsolving that may not be fully specified or may not guarantee correct or optimal results, especially in problem domains where there is no welldefined correct or optimal result.^{[3]} For example, social media recommender systems rely on heuristics in such a way that, although widely characterized as "algorithms" in 21stcentury popular media, cannot deliver correct results due to the nature of the problem.
As an effective method, an algorithm can be expressed within a finite amount of space and time^{[4]} and in a welldefined formal language^{[5]} for calculating a function.^{[6]} Starting from an initial state and initial input (perhaps empty),^{[7]} the instructions describe a computation that, when executed, proceeds through a finite^{[8]} number of welldefined successive states, eventually producing "output"^{[9]} and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.^{[10]}
YouTube Encyclopedic

1/5Views:2 756 3101 753 1302 501 1941 415 477134 716

Why algorithms are called algorithms  BBC Ideas

Intro to Algorithms: Crash Course Computer Science #13

What's an algorithm?  David J. Malan

How AI Discovered a Faster Matrix Multiplication Algorithm

What Is An Algorithm?  What Exactly Is Algorithm?  Algorithm Basics Explained  Simplilearn
Transcription
Etymology
Around 825 AD, Persian scientist and polymath Muḥammad ibn Mūsā alKhwārizmī wrote kitāb alḥisāb alhindī ("Book of Indian computation") and kitab aljam' wa'ltafriq alḥisāb alhindī ("Addition and subtraction in Indian arithmetic").^{[1]} In the early 12th century, Latin translations of said alKhwarizmi texts involving the Hindu–Arabic numeral system and arithmetic appeared, for example Liber Alghoarismi de practica arismetrice, attributed to John of Seville, and Liber Algorismi de numero Indorum, attributed to Adelard of Bath.^{[2]} Hereby, alghoarismi or algorismi is the Latinization of AlKhwarizmi's name; the text starts with the phrase Dixit Algorismi, or "Thus spoke AlKhwarizmi".^{[3]} Around 1230, the English word algorism is attested and then by Chaucer in 1391, English adopted the French term.^{[4]}^{[5]}^{[clarification needed]} In the 15th century, under the influence of the Greek word ἀριθμός (arithmos, "number"; cf. "arithmetic"), the Latin word was altered to algorithmus.^{[citation needed]}
Definition
One informal definition is "a set of rules that precisely defines a sequence of operations",^{[11]}^{[need quotation to verify]} which would include all computer programs (including programs that do not perform numeric calculations), and (for example) any prescribed bureaucratic procedure^{[12]} or cookbook recipe.^{[13]} In general, a program is an algorithm only if it stops eventually^{[14]}—even though infinite loops may sometimes prove desirable. Boolos, Jeffrey & 1974, 1999 define an algorithm to be a set of instructions for determining an output, given explicitly, in a form that can be followed by either a computing machine or a human who could only carry out specific elementary operations on symbols.^{[15]}
The concept of algorithm is also used to define the notion of decidability—a notion that is central for explaining how formal systems come into being starting from a small set of axioms and rules. In logic, the time that an algorithm requires to complete cannot be measured, as it is not apparently related to the customary physical dimension. From such uncertainties, that characterize ongoing work, stems the unavailability of a definition of algorithm that suits both concrete (in some sense) and abstract usage of the term.
Most algorithms are intended to be implemented as computer programs. However, algorithms are also implemented by other means, such as in a biological neural network (for example, the human brain implementing arithmetic or an insect looking for food), in an electrical circuit, or in a mechanical device.
History
Ancient algorithms
Since antiquity, stepbystep procedures for solving mathematical problems have been attested. This includes in Babylonian mathematics (around 2500 BC),^{[16]} Egyptian mathematics (around 1550 BC),^{[16]} Indian mathematics (around 800 BC and later),^{[17]}^{[18]} The Ifa Oracle (around 500 BC), Greek mathematics (around 240 BC),^{[19]} and Arabic mathematics (around 800 AD).^{[20]}
The earliest evidence of algorithms is found in the Babylonian mathematics of ancient Mesopotamia (modern Iraq). A Sumerian clay tablet found in Shuruppak near Baghdad and dated to c. 2500 BC described the earliest division algorithm.^{[16]} During the Hammurabi dynasty c. 1800 – c. 1600 BC, Babylonian clay tablets described algorithms for computing formulas.^{[21]} Algorithms were also used in Babylonian astronomy. Babylonian clay tablets describe and employ algorithmic procedures to compute the time and place of significant astronomical events.^{[22]}
Algorithms for arithmetic are also found in ancient Egyptian mathematics, dating back to the Rhind Mathematical Papyrus c. 1550 BC.^{[16]} Algorithms were later used in ancient Hellenistic mathematics. Two examples are the Sieve of Eratosthenes, which was described in the Introduction to Arithmetic by Nicomachus,^{[23]}^{[19]}^{: Ch 9.2 } and the Euclidean algorithm, which was first described in Euclid's Elements (c. 300 BC).^{[19]}^{: Ch 9.1 }Examples of ancient Indian mathematics included the Shulba Sutras, the Kerala School, and the Brāhmasphuṭasiddhānta.^{[17]}
The first cryptographic algorithm for deciphering encrypted code was developed by AlKindi, a 9thcentury Arab mathematician, in A Manuscript On Deciphering Cryptographic Messages. He gave the first description of cryptanalysis by frequency analysis, the earliest codebreaking algorithm.^{[20]}
Computers
Weightdriven clocks
Bolter credits the invention of the weightdriven clock as "The key invention [of Europe in the Middle Ages]". In particular, he credits the verge escapement mechanism^{[24]} that provides us with the tick and tock of a mechanical clock. "The accurate automatic machine"^{[25]} led immediately to "mechanical automata" beginning in the 13th century and finally to "computational machines"—the difference engine and analytical engines of Charles Babbage and Countess Ada Lovelace, mid19th century.^{[26]} Lovelace is credited with the first creation of an algorithm intended for processing on a computer—Babbage's analytical engine, the first device considered a real Turingcomplete computer instead of just a calculator—and is sometimes called "history's first programmer" as a result, though a full implementation of Babbage's second device would not be realized until decades after her lifetime.
Electromechanical relay
Bell and Newell (1971) indicate that the Jacquard loom (1801), a precursor to Hollerith cards (punch cards, 1887), and "telephone switching technologies" were the roots of a tree leading to the development of the first computers.^{[27]} By the mid19th century the telegraph, the precursor of the telephone, was in use throughout the world, its discrete and distinguishable encoding of letters as "dots and dashes" a common sound. By the late 19th century, the ticker tape (c. 1870s) was in use, as was the use of Hollerith cards in the 1890 U.S. census. Then came the teleprinter (c. 1910) with its punchedpaper use of Baudot code on tape.
Telephoneswitching networks of electromechanical relays (invented 1835) was behind the work of George Stibitz (1937), the inventor of the digital adding device. As he worked in Bell Laboratories, he observed the "burdensome' use of mechanical calculators with gears. "He went home one evening in 1937 intending to test his idea... When the tinkering was over, Stibitz had constructed a binary adding device".^{[28]} The mathematician Martin Davis supported the particular importance of the electromechanical relay.^{[29]}
Formalization
In 1928, a partial formalization of the modern concept of algorithms began with attempts to solve the Entscheidungsproblem (decision problem) posed by David Hilbert. Later formalizations were framed as attempts to define "effective calculability"^{[30]} or "effective method".^{[31]} Those formalizations included the Gödel–Herbrand–Kleene recursive functions of 1930, 1934 and 1935, Alonzo Church's lambda calculus of 1936, Emil Post's Formulation 1 of 1936, and Alan Turing's turing machines of 1936–37 and 1939.
Representations
Algorithms can be expressed in many kinds of notation, including natural languages, pseudocode, flowcharts, drakoncharts, programming languages or control tables (processed by interpreters). Natural language expressions of algorithms tend to be verbose and ambiguous and are rarely used for complex or technical algorithms. Pseudocode, flowcharts, drakoncharts, and control tables are structured ways to express algorithms that avoid many of the ambiguities common in statements based on natural language. Programming languages are primarily intended for expressing algorithms in a form that can be executed by a computer, but they are also often used as a way to define or document algorithms.
Turing machines
There is a wide variety of representations possible and one can express a given Turing machine program as a sequence of machine tables (see finitestate machine, statetransition table, and control table for more), as flowcharts and drakoncharts (see state diagram for more), or as a form of rudimentary machine code or assembly code called "sets of quadruples" (see Turing machine for more). Representations of algorithms can also be classified into three accepted levels of Turing machine description: highlevel description, implementation description, and formal description.^{[32]} A highlevel description describes qualities of the algorithm itself, ignoring how it is implemented on the Turing machine.^{[32]} An implementation description describes the general manner in which the machine moves its head and stores data in order to carry out the algorithm, but doesn't give exact states.^{[32]} In the most detail, a formal description gives the exact state table and list of transitions of the Turing machine.^{[32]}
Flowchart representation
The graphical aid called a flowchart offers a way to describe and document an algorithm (and a computer program corresponding to it). Like the program flow of a Minsky machine, a flowchart always starts at the top of a page and proceeds down. Its primary symbols are only four: the directed arrow showing program flow, the rectangle (SEQUENCE, GOTO), the diamond (IFTHENELSE), and the dot (ORtie). The Böhm–Jacopini canonical structures are made of these primitive shapes. Substructures can "nest" in rectangles, but only if a single exit occurs from the superstructure. The symbols and their use to build the canonical structures are shown in the diagram.^{[33]}
Algorithmic analysis
It is frequently important to know how much of a particular resource (such as time or storage) is theoretically required for a given algorithm. Methods have been developed for the analysis of algorithms to obtain such quantitative answers (estimates); for example, an algorithm that adds up the elements of a list of n numbers would have a time requirement of , using big O notation. At all times the algorithm only needs to remember two values: the sum of all the elements so far, and its current position in the input list. Therefore, it is said to have a space requirement of , if the space required to store the input numbers is not counted, or if it is counted.
Different algorithms may complete the same task with a different set of instructions in less or more time, space, or 'effort' than others. For example, a binary search algorithm (with cost ) outperforms a sequential search (cost ) when used for table lookups on sorted lists or arrays.
Formal versus empirical
The analysis, and study of algorithms is a discipline of computer science, and is often practiced abstractly without the use of a specific programming language or implementation. In this sense, algorithm analysis resembles other mathematical disciplines in that it focuses on the underlying properties of the algorithm and not on the specifics of any particular implementation. Usually, pseudocode is used for analysis as it is the simplest and most general representation. However, ultimately, most algorithms are usually implemented on particular hardware/software platforms and their algorithmic efficiency is eventually put to the test using real code. For the solution of a "oneoff" problem, the efficiency of a particular algorithm may not have significant consequences (unless n is extremely large) but for algorithms designed for fast interactive, commercial or long life scientific usage it may be critical. Scaling from small n to large n frequently exposes inefficient algorithms that are otherwise benign.
Empirical testing is useful because it may uncover unexpected interactions that affect performance. Benchmarks may be used to compare before/after potential improvements to an algorithm after program optimization. Empirical tests cannot replace formal analysis, though, and are not trivial to perform in a fair manner.^{[34]}
Execution efficiency
To illustrate the potential improvements possible even in wellestablished algorithms, a recent significant innovation, relating to FFT algorithms (used heavily in the field of image processing), can decrease processing time up to 1,000 times for applications like medical imaging.^{[35]} In general, speed improvements depend on special properties of the problem, which are very common in practical applications.^{[36]} Speedups of this magnitude enable computing devices that make extensive use of image processing (like digital cameras and medical equipment) to consume less power.
Design
Algorithm design refers to a method or a mathematical process for problemsolving and engineering algorithms. The design of algorithms is part of many solution theories, such as divideandconquer or dynamic programming within operation research. Techniques for designing and implementing algorithm designs are also called algorithm design patterns,^{[37]} with examples including the template method pattern and the decorator pattern. One of the most important aspects of algorithm design is resource (runtime, memory usage) efficiency; the big O notation is used to describe e.g., an algorithm's runtime growth as the size of its input increases.^{[38]}
Structured programming
Per the Church–Turing thesis, any algorithm can be computed by a model known to be Turing complete. In fact, it has been demonstrated that Turing completeness requires only four instruction types—conditional GOTO, unconditional GOTO, assignment, HALT. However, Kemeny and Kurtz observe that, while "undisciplined" use of unconditional GOTOs and conditional IFTHEN GOTOs can result in "spaghetti code", a programmer can write structured programs using only these instructions; on the other hand "it is also possible, and not too hard, to write badly structured programs in a structured language".^{[39]} Tausworthe augments the three BöhmJacopini canonical structures:^{[40]} SEQUENCE, IFTHENELSE, and WHILEDO, with two more: DOWHILE and CASE.^{[41]} An additional benefit of a structured program is that it lends itself to proofs of correctness using mathematical induction.^{[42]}
Legal status
Algorithms, by themselves, are not usually patentable. In the United States, a claim consisting solely of simple manipulations of abstract concepts, numbers, or signals does not constitute "processes" (USPTO 2006), so algorithms are not patentable (as in Gottschalk v. Benson). However practical applications of algorithms are sometimes patentable. For example, in Diamond v. Diehr, the application of a simple feedback algorithm to aid in the curing of synthetic rubber was deemed patentable. The patenting of software is controversial,^{[43]} and there are criticized patents involving algorithms, especially data compression algorithms, such as Unisys's LZW patent. Additionally, some cryptographic algorithms have export restrictions (see export of cryptography).
Classification
There are various ways to classify algorithms, each with its own merits.
By implementation
One way to classify algorithms is by implementation means.
int gcd(int A, int B) {
if (B == 0)
return A;
else if (A > B)
return gcd(AB,B);
else
return gcd(A,BA);
}

Recursive C implementation of Euclid's algorithm from the above flowchart 
 Recursion
 A recursive algorithm is one that invokes (makes reference to) itself repeatedly until a certain condition (also known as termination condition) matches, which is a method common to functional programming. Iterative algorithms use repetitive constructs like loops and sometimes additional data structures like stacks to solve the given problems. Some problems are naturally suited for one implementation or the other. For example, towers of Hanoi is well understood using recursive implementation. Every recursive version has an equivalent (but possibly more or less complex) iterative version, and vice versa.
 Serial, parallel or distributed
 Algorithms are usually discussed with the assumption that computers execute one instruction of an algorithm at a time. Those computers are sometimes called serial computers. An algorithm designed for such an environment is called a serial algorithm, as opposed to parallel algorithms or distributed algorithms. Parallel algorithms are algorithms that take advantage of computer architectures where multiple processors can work on a problem at the same time. Distributed algorithms are algorithms that use multiple machines connected to a computer network. Parallel and distributed algorithms divide the problem into more symmetrical or asymmetrical subproblems and collect the results back together. For example, a CPU would be an example of a parallel algorithm. The resource consumption in such algorithms is not only processor cycles on each processor but also the communication overhead between the processors. Some sorting algorithms can be parallelized efficiently, but their communication overhead is expensive. Iterative algorithms are generally parallelizable, but some problems have no parallel algorithms and are called inherently serial problems.
 Deterministic or nondeterministic
 Deterministic algorithms solve the problem with exact decision at every step of the algorithm whereas nondeterministic algorithms solve problems via guessing although typical guesses are made more accurate through the use of heuristics.
 Exact or approximate
 While many algorithms reach an exact solution, approximation algorithms seek an approximation that is closer to the true solution. The approximation can be reached by either using a deterministic or a random strategy. Such algorithms have practical value for many hard problems. One of the examples of an approximate algorithm is the Knapsack problem, where there is a set of given items. Its goal is to pack the knapsack to get the maximum total value. Each item has some weight and some value. The total weight that can be carried is no more than some fixed number X. So, the solution must consider weights of items as well as their value.^{[44]}
 Quantum algorithm
 Quantum algorithms run on a realistic model of quantum computation. The term is usually used for those algorithms which seem inherently quantum, or use some essential feature of Quantum computing such as quantum superposition or quantum entanglement.
By design paradigm
Another way of classifying algorithms is by their design methodology or paradigm. There is a certain number of paradigms, each different from the other. Furthermore, each of these categories includes many different types of algorithms. Some common paradigms are:
 Bruteforce or exhaustive search
 Brute force is a method of problemsolving that involves systematically trying every possible option until the optimal solution is found. This approach can be very timeconsuming, as it requires going through every possible combination of variables. However, it is often used when other methods are not available or too complex. Brute force can be used to solve a variety of problems, including finding the shortest path between two points and cracking passwords.
 Divide and conquer
 A divideandconquer algorithm repeatedly reduces an instance of a problem to one or more smaller instances of the same problem (usually recursively) until the instances are small enough to solve easily. One such example of divide and conquer is merge sorting. Sorting can be done on each segment of data after dividing data into segments and sorting of entire data can be obtained in the conquer phase by merging the segments. A simpler variant of divide and conquer is called a decreaseandconquer algorithm, which solves an identical subproblem and uses the solution of this subproblem to solve the bigger problem. Divide and conquer divides the problem into multiple subproblems and so the conquer stage is more complex than decrease and conquer algorithms. An example of a decrease and conquer algorithm is the binary search algorithm.
 Search and enumeration
 Many problems (such as playing chess) can be modeled as problems on graphs. A graph exploration algorithm specifies rules for moving around a graph and is useful for such problems. This category also includes search algorithms, branch and bound enumeration, and backtracking.
 Randomized algorithm
 Such algorithms make some choices randomly (or pseudorandomly). They can be very useful in finding approximate solutions for problems where finding exact solutions can be impractical (see heuristic method below). For some of these problems, it is known that the fastest approximations must involve some randomness.^{[45]} Whether randomized algorithms with polynomial time complexity can be the fastest algorithm for some problems is an open question known as the P versus NP problem. There are two large classes of such algorithms:
 Monte Carlo algorithms return a correct answer with highprobability. E.g. RP is the subclass of these that run in polynomial time.
 Las Vegas algorithms always return the correct answer, but their running time is only probabilistically bound, e.g. ZPP.
 Reduction of complexity
 This technique involves solving a difficult problem by transforming it into a betterknown problem for which we have (hopefully) asymptotically optimal algorithms. The goal is to find a reducing algorithm whose complexity is not dominated by the resulting reduced algorithms. For example, one selection algorithm for finding the median in an unsorted list involves first sorting the list (the expensive portion) and then pulling out the middle element in the sorted list (the cheap portion). This technique is also known as transform and conquer.
 Back tracking
 In this approach, multiple solutions are built incrementally and abandoned when it is determined that they cannot lead to a valid full solution.
Optimization problems
For optimization problems there is a more specific classification of algorithms; an algorithm for such problems may fall into one or more of the general categories described above as well as into one of the following:
 Linear programming
 When searching for optimal solutions to a linear function bound to linear equality and inequality constraints, the constraints of the problem can be used directly in producing the optimal solutions. There are algorithms that can solve any problem in this category, such as the popular simplex algorithm.^{[46]} Problems that can be solved with linear programming include the maximum flow problem for directed graphs. If a problem additionally requires that one or more of the unknowns must be an integer then it is classified in integer programming. A linear programming algorithm can solve such a problem if it can be proved that all restrictions for integer values are superficial, i.e., the solutions satisfy these restrictions anyway. In the general case, a specialized algorithm or an algorithm that finds approximate solutions is used, depending on the difficulty of the problem.
 Dynamic programming
 When a problem shows optimal substructures—meaning the optimal solution to a problem can be constructed from optimal solutions to subproblems—and overlapping subproblems, meaning the same subproblems are used to solve many different problem instances, a quicker approach called dynamic programming avoids recomputing solutions that have already been computed. For example, Floyd–Warshall algorithm, the shortest path to a goal from a vertex in a weighted graph can be found by using the shortest path to the goal from all adjacent vertices. Dynamic programming and memoization go together. The main difference between dynamic programming and divide and conquer is that subproblems are more or less independent in divide and conquer, whereas subproblems overlap in dynamic programming. The difference between dynamic programming and straightforward recursion is in caching or memoization of recursive calls. When subproblems are independent and there is no repetition, memoization does not help; hence dynamic programming is not a solution for all complex problems. By using memoization or maintaining a table of subproblems already solved, dynamic programming reduces the exponential nature of many problems to polynomial complexity.
 The greedy method
 A greedy algorithm is similar to a dynamic programming algorithm in that it works by examining substructures, in this case not of the problem but of a given solution. Such algorithms start with some solution, which may be given or have been constructed in some way, and improve it by making small modifications. For some problems they can find the optimal solution while for others they stop at local optima, that is, at solutions that cannot be improved by the algorithm but are not optimum. The most popular use of greedy algorithms is for finding the minimal spanning tree where finding the optimal solution is possible with this method. Huffman Tree, Kruskal, Prim, Sollin are greedy algorithms that can solve this optimization problem.
 The heuristic method
 In optimization problems, heuristic algorithms can be used to find a solution close to the optimal solution in cases where finding the optimal solution is impractical. These algorithms work by getting closer and closer to the optimal solution as they progress. In principle, if run for an infinite amount of time, they will find the optimal solution. Their merit is that they can find a solution very close to the optimal solution in a relatively short time. Such algorithms include local search, tabu search, simulated annealing, and genetic algorithms. Some of them, like simulated annealing, are nondeterministic algorithms while others, like tabu search, are deterministic. When a bound on the error of the nonoptimal solution is known, the algorithm is further categorized as an approximation algorithm.
Examples
One of the simplest algorithms is to find the largest number in a list of numbers of random order. Finding the solution requires looking at every number in the list. From this follows a simple algorithm, which can be stated in a highlevel description in English prose, as:
Highlevel description:
 If there are no numbers in the set, then there is no highest number.
 Assume the first number in the set is the largest number in the set.
 For each remaining number in the set: if this number is larger than the current largest number, consider this number to be the largest number in the set.
 When there are no numbers left in the set to iterate over, consider the current largest number to be the largest number of the set.
(Quasi)formal description: Written in prose but much closer to the highlevel language of a computer program, the following is the more formal coding of the algorithm in pseudocode or pidgin code:
Algorithm LargestNumber Input: A list of numbers L. Output: The largest number in the list L.
if L.size = 0 return null largest ← L[0] for each item in L, do if item > largest, then largest ← item return largest
 "←" denotes assignment. For instance, "largest ← item" means that the value of largest changes to the value of item.
 "return" terminates the algorithm and outputs the following value.
See also
 Abstract machine
 ALGOL
 Algorithm aversion
 Algorithm engineering
 Algorithm characterizations
 Algorithmic bias
 Algorithmic composition
 Algorithmic entities
 Algorithmic synthesis
 Algorithmic technique
 Algorithmic topology
 Garbage in, garbage out
 Introduction to Algorithms (textbook)
 Government by algorithm
 List of algorithms
 List of algorithm general topics
 Regulation of algorithms
 Theory of computation
 Computational mathematics
Notes
 ^ ^{a} ^{b} "Definition of ALGORITHM". MerriamWebster Online Dictionary. Archived from the original on February 14, 2020. Retrieved November 14, 2019.
 ^ ^{a} ^{b} Blair, Ann, Duguid, Paul, Goeing, AnjaSilvia and Grafton, Anthony. Information: A Historical Companion, Princeton: Princeton University Press, 2021. p. 247
 ^ ^{a} ^{b} David A. Grossman, Ophir Frieder, Information Retrieval: Algorithms and Heuristics, 2nd edition, 2004, ISBN 1402030045
 ^ ^{a} ^{b} "Any classical mathematical algorithm, for example, can be described in a finite number of English words" (Rogers 1987:2).
 ^ ^{a} ^{b} Well defined with respect to the agent that executes the algorithm: "There is a computing agent, usually human, which can react to the instructions and carry out the computations" (Rogers 1987:2).
 ^ "an algorithm is a procedure for computing a function (with respect to some chosen notation for integers) ... this limitation (to numerical functions) results in no loss of generality", (Rogers 1987:1).
 ^ "An algorithm has zero or more inputs, i.e., quantities which are given to it initially before the algorithm begins" (Knuth 1973:5).
 ^ "A procedure which has all the characteristics of an algorithm except that it possibly lacks finiteness may be called a 'computational method'" (Knuth 1973:5).
 ^ "An algorithm has one or more outputs, i.e. quantities which have a specified relation to the inputs" (Knuth 1973:5).
 ^ Whether or not a process with random interior processes (not including the input) is an algorithm is debatable. Rogers opines that: "a computation is carried out in a discrete stepwise fashion, without the use of continuous methods or analogue devices ... carried forward deterministically, without resort to random methods or devices, e.g., dice" (Rogers 1987:2).
 ^ Stone 1973:4
 ^
Simanowski, Roberto (2018). The Death Algorithm and Other Digital Dilemmas. Untimely Meditations. Vol. 14. Translated by Chase, Jefferson. Cambridge, Massachusetts: MIT Press. p. 147. ISBN 9780262536370. Archived from the original on December 22, 2019. Retrieved May 27, 2019.
[...] the next level of abstraction of central bureaucracy: globally operating algorithms.
 ^
Dietrich, Eric (1999). "Algorithm". In Wilson, Robert Andrew; Keil, Frank C. (eds.). The MIT Encyclopedia of the Cognitive Sciences. MIT Cognet library. Cambridge, Massachusetts: MIT Press (published 2001). p. 11. ISBN 9780262731447. Retrieved July 22, 2020.
An algorithm is a recipe, method, or technique for doing something.
 ^ Stone requires that "it must terminate in a finite number of steps" (Stone 1973:7–8).
 ^ Boolos and Jeffrey 1974,1999:19
 ^ ^{a} ^{b} ^{c} ^{d} Chabert, JeanLuc (2012). A History of Algorithms: From the Pebble to the Microchip. Springer Science & Business Media. pp. 7–8. ISBN 9783642181924.
 ^ ^{a} ^{b} Sriram, M. S. (2005). "Algorithms in Indian Mathematics". In Emch, Gerard G.; Sridharan, R.; Srinivas, M. D. (eds.). Contributions to the History of Indian Mathematics. Springer. p. 153. ISBN 9789386279255.
 ^ Hayashi, T. (2023, January 1). Brahmagupta. Encyclopedia Britannica.
 ^ ^{a} ^{b} ^{c} Cooke, Roger L. (2005). The History of Mathematics: A Brief Course. John Wiley & Sons. ISBN 9781118460290.
 ^ ^{a} ^{b} Dooley, John F. (2013). A Brief History of Cryptology and Cryptographic Algorithms. Springer Science & Business Media. pp. 12–3. ISBN 9783319016283.
 ^ Knuth, Donald E. (1972). "Ancient Babylonian Algorithms" (PDF). Commun. ACM. 15 (7): 671–677. doi:10.1145/361454.361514. ISSN 00010782. S2CID 7829945. Archived from the original (PDF) on December 24, 2012.
 ^ Aaboe, Asger (2001). Episodes from the Early History of Astronomy. New York: Springer. pp. 40–62. ISBN 9780387951362.
 ^ Ast, Courtney. "Eratosthenes". Wichita State University: Department of Mathematics and Statistics. Archived from the original on February 27, 2015. Retrieved February 27, 2015.
 ^ Bolter 1984:24
 ^ Bolter 1984:26
 ^ Bolter 1984:33–34, 204–206.
 ^ Bell and Newell diagram 1971:39, cf. Davis 2000
 ^ * Melina Hill, Valley News Correspondent, A Tinkerer Gets a Place in History, Valley News West Lebanon NH, Thursday, March 31, 1983, p. 13.
 ^ Davis 2000:14
 ^ Kleene 1943 in Davis 1965:274
 ^ Rosser 1939 in Davis 1965:225
 ^ ^{a} ^{b} ^{c} ^{d} Sipser 2006:157
 ^ cf Tausworthe 1977
 ^ Kriegel, HansPeter; Schubert, Erich; Zimek, Arthur (2016). "The (black) art of runtime evaluation: Are we comparing algorithms or implementations?". Knowledge and Information Systems. 52 (2): 341–378. doi:10.1007/s1011501610042. ISSN 02191377. S2CID 40772241.
 ^ Gillian Conahan (January 2013). "Better Math Makes Faster Data Networks". discovermagazine.com. Archived from the original on May 13, 2014. Retrieved May 13, 2014.
 ^ Haitham Hassanieh, Piotr Indyk, Dina Katabi, and Eric Price, "ACMSIAM Symposium On Discrete Algorithms (SODA) Archived July 4, 2013, at the Wayback Machine, Kyoto, January 2012. See also the sFFT Web Page Archived February 21, 2012, at the Wayback Machine.
 ^ Goodrich, Michael T.; Tamassia, Roberto (2002). Algorithm Design: Foundations, Analysis, and Internet Examples. John Wiley & Sons, Inc. ISBN 9780471383659. Archived from the original on April 28, 2015. Retrieved June 14, 2018.
 ^ "BigO notation (article)  Algorithms". Khan Academy. Retrieved June 3, 2024.
 ^ John G. Kemeny and Thomas E. Kurtz 1985 Back to Basic: The History, Corruption, and Future of the Language, AddisonWesley Publishing Company, Inc. Reading, MA, ISBN 0201134330.
 ^ Tausworthe 1977:101
 ^ Tausworthe 1977:142
 ^ Knuth 1973 section 1.2.1, expanded by Tausworthe 1977 at pages 100ff and Chapter 9.1
 ^ "The Experts: Does the Patent System Encourage Innovation?". The Wall Street Journal. May 16, 2013. ISSN 00999660. Retrieved March 29, 2017.
 ^ Kellerer, Hans; Pferschy, Ulrich; Pisinger, David (2004). Knapsack Problems  Hans Kellerer  Springer. Springer. doi:10.1007/9783540247777. ISBN 9783540402862. S2CID 28836720. Archived from the original on October 18, 2017. Retrieved September 19, 2017.
 ^ For instance, the volume of a convex polytope (described using a membership oracle) can be approximated to high accuracy by a randomized polynomial time algorithm, but not by a deterministic one: see Dyer, Martin; Frieze, Alan; Kannan, Ravi (January 1991). "A Random Polynomialtime Algorithm for Approximating the Volume of Convex Bodies". J. ACM. 38 (1): 1–17. CiteSeerX 10.1.1.145.4600. doi:10.1145/102782.102783. S2CID 13268711.
 ^ George B. Dantzig and Mukund N. Thapa. 2003. Linear Programming 2: Theory and Extensions. SpringerVerlag.
Bibliography
 Axt, P (1959). "On a Subrecursive Hierarchy and Primitive Recursive Degrees". Transactions of the American Mathematical Society. 92 (1): 85–105. doi:10.2307/1993169. JSTOR 1993169.
 Bell, C. Gordon and Newell, Allen (1971), Computer Structures: Readings and Examples, McGraw–Hill Book Company, New York. ISBN 0070043574.
 Blass, Andreas; Gurevich, Yuri (2003). "Algorithms: A Quest for Absolute Definitions" (PDF). Bulletin of European Association for Theoretical Computer Science. 81. Archived (PDF) from the original on October 9, 2022. Includes a bibliography of 56 references.
 Bolter, David J. (1984). Turing's Man: Western Culture in the Computer Age (1984 ed.). Chapel Hill, NC: The University of North Carolina Press. ISBN 9780807815649., ISBN 0807841080
 Boolos, George; Jeffrey, Richard (1999) [1974]. Computability and Logic (4th ed.). Cambridge University Press, London. ISBN 9780521204026.: cf. Chapter 3 Turing machines where they discuss "certain enumerable sets not effectively (mechanically) enumerable".
 Burgin, Mark (2004). SuperRecursive Algorithms. Springer. ISBN 9780387955698.
 Campagnolo, M.L., Moore, C., and Costa, J.F. (2000) An analog characterization of the subrecursive functions. In Proc. of the 4th Conference on Real Numbers and Computers, Odense University, pp. 91–109
 Church, Alonzo (1936). "An Unsolvable Problem of Elementary Number Theory". The American Journal of Mathematics. 58 (2): 345–363. doi:10.2307/2371045. JSTOR 2371045. Reprinted in The Undecidable, p. 89ff. The first expression of "Church's Thesis". See in particular page 100 (The Undecidable) where he defines the notion of "effective calculability" in terms of "an algorithm", and he uses the word "terminates", etc.
 Church, Alonzo (1936). "A Note on the Entscheidungsproblem". The Journal of Symbolic Logic. 1 (1): 40–41. doi:10.2307/2269326. JSTOR 2269326. S2CID 42323521. Church, Alonzo (1936). "Correction to a Note on the Entscheidungsproblem". The Journal of Symbolic Logic. 1 (3): 101–102. doi:10.2307/2269030. JSTOR 2269030. S2CID 5557237. Reprinted in The Undecidable, p. 110ff. Church shows that the Entscheidungsproblem is unsolvable in about 3 pages of text and 3 pages of footnotes.
 Daffa', Ali Abdullah al (1977). The Muslim contribution to mathematics. London: Croom Helm. ISBN 9780856644641.
 Davis, Martin (1965). The Undecidable: Basic Papers On Undecidable Propositions, Unsolvable Problems and Computable Functions. New York: Raven Press. ISBN 9780486432281. Davis gives commentary before each article. Papers of Gödel, Alonzo Church, Turing, Rosser, Kleene, and Emil Post are included; those cited in the article are listed here by author's name.
 Davis, Martin (2000). Engines of Logic: Mathematicians and the Origin of the Computer. New York: W.W. Nortion. ISBN 9780393322293. Davis offers concise biographies of Leibniz, Boole, Frege, Cantor, Hilbert, Gödel and Turing with von Neumann as the showstealing villain. Very brief bios of JosephMarie Jacquard, Babbage, Ada Lovelace, Claude Shannon, Howard Aiken, etc.
 This article incorporates public domain material from Paul E. Black. "algorithm". Dictionary of Algorithms and Data Structures. NIST.
 Dean, Tim (2012). "Evolution and moral diversity". Baltic International Yearbook of Cognition, Logic and Communication. 7. doi:10.4148/biyclc.v7i0.1775.
 Dennett, Daniel (1995). Darwin's Dangerous Idea. New York: Touchstone/Simon & Schuster. pp. 32–36. ISBN 9780684802909.
 Dilson, Jesse (2007). The Abacus ((1968, 1994) ed.). St. Martin's Press, NY. ISBN 9780312104092., ISBN 031210409X
 Yuri Gurevich, Sequential Abstract State Machines Capture Sequential Algorithms, ACM Transactions on Computational Logic, Vol 1, no 1 (July 2000), pp. 77–111. Includes bibliography of 33 sources.
 van Heijenoort, Jean (2001). From Frege to Gödel, A Source Book in Mathematical Logic, 1879–1931 ((1967) ed.). Harvard University Press, Cambridge. ISBN 9780674324497., 3rd edition 1976[?], ISBN 0674324498 (pbk.)
 Hodges, Andrew (1983). Alan Turing: The Enigma. New York: Simon and Schuster. ISBN 9780671492076., ISBN 0671492071. Cf. Chapter "The Spirit of Truth" for a history leading to, and a discussion of, his proof.
 Kleene, Stephen C. (1936). "General Recursive Functions of Natural Numbers". Mathematische Annalen. 112 (5): 727–742. doi:10.1007/BF01565439. S2CID 120517999. Archived from the original on September 3, 2014. Retrieved September 30, 2013. Presented to the American Mathematical Society, September 1935. Reprinted in The Undecidable, p. 237ff. Kleene's definition of "general recursion" (known now as murecursion) was used by Church in his 1935 paper An Unsolvable Problem of Elementary Number Theory that proved the "decision problem" to be "undecidable" (i.e., a negative result).
 Kleene, Stephen C. (1943). "Recursive Predicates and Quantifiers". Transactions of the American Mathematical Society. 53 (1): 41–73. doi:10.2307/1990131. JSTOR 1990131. Reprinted in The Undecidable, p. 255ff. Kleene refined his definition of "general recursion" and proceeded in his chapter "12. Algorithmic theories" to posit "Thesis I" (p. 274); he would later repeat this thesis (in Kleene 1952:300) and name it "Church's Thesis"(Kleene 1952:317) (i.e., the Church thesis).
 Kleene, Stephen C. (1991) [1952]. Introduction to Metamathematics (Tenth ed.). NorthHolland Publishing Company. ISBN 9780720421033.
 Knuth, Donald (1997). Fundamental Algorithms, Third Edition. Reading, Massachusetts: Addison–Wesley. ISBN 9780201896831.
 Knuth, Donald (1969). Volume 2/Seminumerical Algorithms, The Art of Computer Programming First Edition. Reading, Massachusetts: Addison–Wesley.
 Kosovsky, N.K. Elements of Mathematical Logic and its Application to the theory of Subrecursive Algorithms, LSU Publ., Leningrad, 1981
 Kowalski, Robert (1979). "Algorithm=Logic+Control". Communications of the ACM. 22 (7): 424–436. doi:10.1145/359131.359136. S2CID 2509896.
 A.A. Markov (1954) Theory of algorithms. [Translated by Jacques J. SchorrKon and PST staff] Imprint Moscow, Academy of Sciences of the USSR, 1954 [i.e., Jerusalem, Israel Program for Scientific Translations, 1961; available from the Office of Technical Services, U.S. Dept. of Commerce, Washington] Description 444 p. 28 cm. Added t.p. in Russian Translation of Works of the Mathematical Institute, Academy of Sciences of the USSR, v. 42. Original title: Teoriya algerifmov. [QA248.M2943 Dartmouth College library. U.S. Dept. of Commerce, Office of Technical Services, number OTS 6051085.]
 Minsky, Marvin (1967). Computation: Finite and Infinite Machines (First ed.). PrenticeHall, Englewood Cliffs, NJ. ISBN 9780131654495. Minsky expands his "...idea of an algorithm – an effective procedure..." in chapter 5.1 Computability, Effective Procedures and Algorithms. Infinite machines.
 Post, Emil (1936). "Finite Combinatory Processes, Formulation I". The Journal of Symbolic Logic. 1 (3): 103–105. doi:10.2307/2269031. JSTOR 2269031. S2CID 40284503. Reprinted in The Undecidable, pp. 289ff. Post defines a simple algorithmiclike process of a man writing marks or erasing marks and going from box to box and eventually halting, as he follows a list of simple instructions. This is cited by Kleene as one source of his "Thesis I", the socalled Church–Turing thesis.
 Rogers, Hartley Jr. (1987). Theory of Recursive Functions and Effective Computability. The MIT Press. ISBN 9780262680523.
 Rosser, J.B. (1939). "An Informal Exposition of Proofs of Godel's Theorem and Church's Theorem". Journal of Symbolic Logic. 4 (2): 53–60. doi:10.2307/2269059. JSTOR 2269059. S2CID 39499392. Reprinted in The Undecidable, p. 223ff. Herein is Rosser's famous definition of "effective method": "...a method each step of which is precisely predetermined and which is certain to produce the answer in a finite number of steps... a machine which will then solve any problem of the set with no human intervention beyond inserting the question and (later) reading the answer" (p. 225–226, The Undecidable)
 SantosLang, Christopher (2015). "Moral Ecology Approaches to Machine Ethics" (PDF). In van Rysewyk, Simon; Pontier, Matthijs (eds.). Machine Medical Ethics. Intelligent Systems, Control and Automation: Science and Engineering. Vol. 74. Switzerland: Springer. pp. 111–127. doi:10.1007/9783319081083_8. ISBN 9783319081076. Archived (PDF) from the original on October 9, 2022.
 Scott, Michael L. (2009). Programming Language Pragmatics (3rd ed.). Morgan Kaufmann Publishers/Elsevier. ISBN 9780123745149.
 Sipser, Michael (2006). Introduction to the Theory of Computation. PWS Publishing Company. ISBN 9780534947286.
 Sober, Elliott; Wilson, David Sloan (1998). Unto Others: The Evolution and Psychology of Unselfish Behavior. Cambridge: Harvard University Press. ISBN 9780674930469.
 Stone, Harold S. (1972). Introduction to Computer Organization and Data Structures (1972 ed.). McGrawHill, New York. ISBN 9780070617261. Cf. in particular the first chapter titled: Algorithms, Turing Machines, and Programs. His succinct informal definition: "...any sequence of instructions that can be obeyed by a robot, is called an algorithm" (p. 4).
 Tausworthe, Robert C (1977). Standardized Development of Computer Software Part 1 Methods. Englewood Cliffs NJ: Prentice–Hall, Inc. ISBN 9780138421953.
 Turing, Alan M. (1936–37). "On Computable Numbers, With An Application to the Entscheidungsproblem". Proceedings of the London Mathematical Society. Series 2. 42: 230–265. doi:10.1112/plms/s242.1.230. S2CID 73712.. Corrections, ibid, vol. 43(1937) pp. 544–546. Reprinted in The Undecidable, p. 116ff. Turing's famous paper completed as a Master's dissertation while at King's College Cambridge UK.
 Turing, Alan M. (1939). "Systems of Logic Based on Ordinals". Proceedings of the London Mathematical Society. 45: 161–228. doi:10.1112/plms/s245.1.161. hdl:21.11116/0000000191CE3. Reprinted in The Undecidable, pp. 155ff. Turing's paper that defined "the oracle" was his PhD thesis while at Princeton.
 United States Patent and Trademark Office (2006), 2106.02 **>Mathematical Algorithms: 2100 Patentability, Manual of Patent Examining Procedure (MPEP). Latest revision August 2006
 Zaslavsky, C. (1970). Mathematics of the Yoruba People and of Their Neighbors in Southern Nigeria. The TwoYear College Mathematics Journal, 1(2), 76–99. https://doi.org/10.2307/3027363
Further reading
 Bellah, Robert Neelly (1985). Habits of the Heart: Individualism and Commitment in American Life. Berkeley: University of California Press. ISBN 9780520254190.
 Berlinski, David (2001). The Advent of the Algorithm: The 300Year Journey from an Idea to the Computer. Harvest Books. ISBN 9780156013918.
 Chabert, JeanLuc (1999). A History of Algorithms: From the Pebble to the Microchip. Springer Verlag. ISBN 9783540633693.
 Thomas H. Cormen; Charles E. Leiserson; Ronald L. Rivest; Clifford Stein (2009). Introduction To Algorithms (3rd ed.). MIT Press. ISBN 9780262033848.
 Harel, David; Feldman, Yishai (2004). Algorithmics: The Spirit of Computing. AddisonWesley. ISBN 9780321117847.
 Hertzke, Allen D.; McRorie, Chris (1998). "The Concept of Moral Ecology". In Lawler, Peter Augustine; McConkey, Dale (eds.). Community and Political Thought Today. Westport, CT: Praeger.
 Knuth, Donald E. (2000). Selected Papers on Analysis of Algorithms Archived July 1, 2017, at the Wayback Machine. Stanford, California: Center for the Study of Language and Information.
 Knuth, Donald E. (2010). Selected Papers on Design of Algorithms Archived July 16, 2017, at the Wayback Machine. Stanford, California: Center for the Study of Language and Information.
 Wallach, Wendell; Allen, Colin (November 2008). Moral Machines: Teaching Robots Right from Wrong. US: Oxford University Press. ISBN 9780195374049.
 Bleakley, Chris (2020). Poems that Solve Puzzles: The History and Science of Algorithms. Oxford University Press. ISBN 9780198853732.
External links
 "Algorithm". Encyclopedia of Mathematics. EMS Press. 2001 [1994].
 Algorithms at Curlie
 Weisstein, Eric W. "Algorithm". MathWorld.
 Dictionary of Algorithms and Data Structures – National Institute of Standards and Technology
 Algorithm repositories
 The Stony Brook Algorithm Repository – State University of New York at Stony Brook
 Collected Algorithms of the ACM – Associations for Computing Machinery
 The Stanford GraphBase Archived December 6, 2015, at the Wayback Machine – Stanford University