Revision as of 14:10, 10 March 2008 editCBM (talk | contribs)Extended confirmed users, File movers, Pending changes reviewers, Rollbackers55,390 edits →Classification by computing power: primitive recursive functions correspond to another subrecursive class← Previous edit | Latest revision as of 23:37, 12 January 2025 edit undoGorillaWarfare (talk | contribs)Edit filter managers, Autopatrolled, Oversighters, Administrators119,402 editsm Reverted edits by 2600:100C:B218:6BFF:E863:F0C5:1228:6C5C (talk) (HG) (3.4.12)Tags: Huggle Rollback | ||
Line 1: | Line 1: | ||
{{Short description|Sequence of operations for a task}} | |||
]s are often used to graphically represent algorithms.]] | |||
{{Redirect|Algorithms|the subfield of computer science|Analysis of algorithms|other uses|Algorithm (disambiguation)}} | |||
{{redirect|Algorythm|the album|Beyond Creation}} | |||
{{Use mdy dates|date=September 2017}} | |||
{{Multiple issues| | |||
{{Copyedit|date=April 2024}} | |||
{{Essay|date=April 2024}} | |||
}} | |||
] of number ''r'' and ''s''|alt=In a loop, subtract the larger number against the smaller number. Halt the loop when the subtraction will make a number negative. Assess two numbers, whether one of them is equal to zero or not. If yes, take the other number as the greatest common divisor. If no, put the two numbers in the subtraction loop again.]] | |||
In ] and ], an '''algorithm''' ({{IPAc-en|audio=en-us-algorithm.ogg|ˈ|æ|l|ɡ|ə|r|ɪ|ð|əm}}) is a finite sequence of ] instructions, typically used to solve a class of specific ]s or to perform a ].<ref name=":0">{{Cite web|url=https://www.merriam-webster.com/dictionary/algorithm|title=Definition of ALGORITHM|work=Merriam-Webster Online Dictionary |language=en |access-date=2019-11-14 |archive-url=https://web.archive.org/web/20200214074446/https://www.merriam-webster.com/dictionary/algorithm |archive-date=February 14, 2020|url-status=live}}</ref> Algorithms are used as specifications for performing ]s and ]. More advanced algorithms can use ]s to divert the code execution through various routes (referred to as ]) and deduce valid ]s (referred to as ]). | |||
In contrast, a ] is an approach to solving problems that do not have well-defined correct or optimal results.<ref name=":2">David A. Grossman, Ophir Frieder, ''Information Retrieval: Algorithms and Heuristics'', 2nd edition, 2004, {{isbn|1402030045}}</ref> For example, although social media ]s are commonly called "algorithms", they actually rely on heuristics as there is no truly "correct" recommendation. | |||
In ], ], ] and related disciplines, an '''algorithm''' is a type of ] in which a definite list of well-defined instructions for completing a task, when given an initial state, will proceed through a well-defined series of successive states, eventually terminating in an end-state. The transition from one state to the next is not necessarily ]; some algorithms, known as ], incorporate randomness. | |||
As an ], an algorithm can be expressed within a finite amount of space and time<ref name=":3">"Any classical mathematical algorithm, for example, can be described in a finite number of English words" (Rogers 1987:2).</ref> and in a well-defined ]<ref name=":4">Well defined concerning 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).</ref> for calculating a ].<ref>"an algorithm is a procedure for computing a ''function'' (concerning some chosen notation for integers) ... this limitation (to numerical functions) results in no loss of generality", (Rogers 1987:1).</ref> Starting from an initial state and initial input (perhaps ]),<ref>"An algorithm has ] or more inputs, i.e., ] which are given to it initially before the algorithm begins" (Knuth 1973:5).</ref> the instructions describe a computation that, when ]d, proceeds through a finite<ref>"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).</ref> number of well-defined successive states, eventually producing "output"<ref>"An algorithm has one or more outputs, i.e., quantities which have a specified relation to the inputs" (Knuth 1973:5).</ref> and terminating at a final ending state. The transition from one state to the next is not necessarily ]; some algorithms, known as ]s, incorporate random input.<ref>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 analog devices ... carried forward deterministically, without resort to random methods or devices, e.g., dice" (Rogers 1987:2).</ref> | |||
The concept of an algorithm originated as a means of recording procedures for solving mathematical problems such as finding the common ] of two numbers or multiplying two numbers; such algorithms were in use by the ]ns as early as ]. | |||
== Etymology == | |||
A partial formalization of the concept began with attempts to solve the ] (the "decision problem") that ] posed in 1928. Subsequent formalizations were framed as attempts to define "]"(Kleene 1943:274) or "effective method" (Rosser 1939:225); those formalizations included the Gödel-Herbrand-Kleene ]s of 1930, 1934 and 1935, ]'s ] of 1936, ]'s "Formulation I" of 1936, and ]'s ] of 1936-7 and 1939. | |||
Around 825 AD, Persian scientist and polymath ] wrote ''kitāb al-ḥisāb al-hindī'' ("Book of Indian computation") and ''kitab al-jam' wa'l-tafriq al-ḥisāb al-hindī'' ("Addition and subtraction in Indian arithmetic").<ref name=":0" /> In the early 12th century, Latin translations of said al-Khwarizmi texts involving the ] and ] appeared, for example ''Liber Alghoarismi de practica arismetrice'', attributed to ], and ''Liber Algorismi de numero Indorum'', attributed to ].<ref name=":1">Blair, Ann, Duguid, Paul, Goeing, Anja-Silvia and Grafton, Anthony. Information: A Historical Companion, Princeton: Princeton University Press, 2021. p. 247</ref> Hereby, ''alghoarismi'' or ''algorismi'' is the ] of Al-Khwarizmi's name; the text starts with the phrase ''Dixit Algorismi'', or "Thus spoke Al-Khwarizmi".<ref name=":2" /> Around 1230, the English word '']'' is attested and then by ] in 1391, English adopted the French term.<ref name=":3" /><ref name=":4" />{{Clarification needed|date=April 2024}} In the 15th century, under the influence of the Greek word ἀριθμός (''arithmos'', "number"; ''cf.'' "arithmetic"), the Latin word was altered to ''algorithmus''.{{Citation needed|date=April 2024}} | |||
== |
== Definition == | ||
{{For|a detailed presentation of the various points of view on the definition of "algorithm"|Algorithm characterizations}} | |||
], ] ] and ], wrote a ] in ] in 825 AD, ''On Calculation with Hindu Numerals''. (See ]). It was translated into ] in the 12th century as ''Algoritmi de numero Indorum'' (al-Daffa 1977), which title was likely intended to mean " Algoritmus on the numbers of the Indians", where "Algoritmi" was the translator's rendition of the author's name in the genitive case; but people misunderstanding the title treated ''Algoritmi'' as a Latin plural and this led to the word "algorithm" (Latin ''algorismus'') coming to mean "calculation method". The intrusive "th" is most likely due to a ] with the ] αριθμος (''arithmos'') meaning "number". | |||
One informal definition is "a set of rules that precisely defines a sequence of operations",<ref>Stone 1973:4</ref>{{request quotation | reason = Stone (1972) suggests on page 4: "...any sequence of instructions that a robot can obey, is called an algorithm"|date=July 2020}} which would include all ]s (including programs that do not perform numeric calculations), and any prescribed ] procedure<ref> | |||
== Why algorithms are necessary: an informal definition == | |||
{{cite book |last1=Simanowski |first1=Roberto |author-link1=Roberto Simanowski |url=https://books.google.com/books?id=RJV5DwAAQBAJ |title=The Death Algorithm and Other Digital Dilemmas |date=2018 |publisher=MIT Press |isbn=9780262536370 |series=Untimely Meditations |volume=14 |location=Cambridge, Massachusetts |page=147 |translator1-last=Chase |translator1-first=Jefferson |quote= the next level of abstraction of central bureaucracy: globally operating algorithms. |access-date=27 May 2019 |archive-url=https://web.archive.org/web/20191222120705/https://books.google.com/books?id=RJV5DwAAQBAJ |archive-date=December 22, 2019 |url-status=live}} | |||
</ref> | |||
or ] ].<ref> | |||
{{cite book |last1=Dietrich |first1=Eric |url=https://books.google.com/books?id=-wt1aZrGXLYC |title=The MIT Encyclopedia of the Cognitive Sciences |publisher=MIT Press |year=1999 |isbn=9780262731447 |editor1-last=Wilson |editor1-first=Robert Andrew |series=MIT Cognet library |location=Cambridge, Massachusetts |publication-date=2001 |page=11 |chapter=Algorithm |quote=An algorithm is a recipe, method, or technique for doing something. |access-date=22 July 2020 |editor2-last=Keil |editor2-first=Frank C.}} | |||
</ref> In general, a program is an algorithm only if it stops eventually<ref>Stone requires that "it must terminate in a finite number of steps" (Stone 1973:7–8).</ref>—even though ]s may sometimes prove desirable. {{Harvtxt|Boolos|Jeffrey|1974, 1999|ref=CITEREFBoolosJeffrey1999}} define an algorithm to be an explicit set of instructions for determining an output, that can be followed by a computing machine or a human who could only carry out specific elementary operations on symbols''.''<ref>Boolos and Jeffrey 1974, 1999:19</ref> | |||
Most algorithms are intended to be ]ed as ]s. However, algorithms are also implemented by other means, such as in a ] (for example, the ] performing ] or an insect looking for food), in an ], or a mechanical device. | |||
No generally accepted ''formal'' definition of "algorithm" exists yet. We can, however, derive clues to the issues involved and an informal meaning of the word from the following quotation from {{Harvtxt|Boolos|Jeffrey|1974, 1999}} (boldface added): | |||
== History == | |||
<blockquote>No human being can write fast enough, or long enough, or small enough to list all members of an enumerably infinite set by writing out their names, one after another, in some notation. But humans can do something equally useful, in the case of certain enumerably infinite sets: They can give '''explicit instructions for determining the nth member of the set''', for arbitrary finite n. Such instructions are to be given quite explicitly, in a form in which '''they could be followed by a computing machine''', or by a '''human who is capable of carrying out only very elementary operations on symbols''' {{Harv|Boolos|Jeffrey|1974, 1999|p=19}}</blockquote> | |||
{{Missing information|1=section|2=20th and 21st century development of computer algorithms|date=October 2023}} | |||
=== Ancient algorithms === | |||
The words "enumerably infinite" mean "countable using integers perhaps extending to infinity". Thus Boolos and Jeffrey are saying that an algorithm ''implies'' instructions for a process that "creates" output integers from an ''arbitrary'' "input" integer or integers that, in theory, can be chosen from 0 to infinity. Thus we might expect an algorithm to be an algebraic equation such as '''y = m + n''' — two arbitrary "input variables" '''m''' and '''n''' that produce an output '''y'''. As we see in ] — the word algorithm implies much more than this, something on the order of (for our addition example): | |||
Step-by-step procedures for solving mathematical problems have been recorded since antiquity. This includes in ] (around 2500 BC),<ref name="Springer Science & Business Media">{{cite book |last1=Chabert |first1=Jean-Luc |title=A History of Algorithms: From the Pebble to the Microchip |date=2012 |publisher=Springer Science & Business Media |isbn=9783642181924 |pages=7–8}}</ref> ] (around 1550 BC),<ref name="Springer Science & Business Media" /> ] (around 800 BC and later),<ref name=":6">{{cite book |last1=Sriram |first1=M. S. |editor1-last=Emch |editor1-first=Gerard G. |editor2-last=Sridharan |editor2-first=R. |editor3-last=Srinivas |editor3-first=M. D. |title=Contributions to the History of Indian Mathematics |date=2005 |publisher=Springer |isbn=978-93-86279-25-5 |page=153 |chapter-url=https://books.google.com/books?id=qfJdDwAAQBAJ&pg=PA153 |language=en |chapter=Algorithms in Indian Mathematics}}</ref><ref>Hayashi, T. (2023, January 1). . Encyclopedia Britannica.</ref> the Ifa Oracle (around 500 BC),<ref>{{Cite journal |last=Zaslavsky |first=Claudia |date=1970 |title=Mathematics of the Yoruba People and of Their Neighbors in Southern Nigeria |url=https://www.jstor.org/stable/3027363 |journal=The Two-Year College Mathematics Journal |volume=1 |issue=2 |pages=76–99 |doi=10.2307/3027363 |jstor=3027363 |issn=0049-4925}}</ref> ] (around 240 BC),<ref name="Cooke2005">{{cite book|last=Cooke|first=Roger L.|title=The History of Mathematics: A Brief Course|date=2005|publisher=John Wiley & Sons|isbn=978-1-118-46029-0}}</ref> ],<ref>{{Cite journal |date=1999 |editor-last=Chabert |editor-first=Jean-Luc |title=A History of Algorithms |url=https://link.springer.com/book/10.1007/978-3-642-18192-4 |journal=SpringerLink |language=en |doi=10.1007/978-3-642-18192-4|isbn=978-3-540-63369-3 }}</ref> and ] (around 800 AD).<ref name="Dooley">{{cite book |last1=Dooley |first1=John F. |title=A Brief History of Cryptology and Cryptographic Algorithms |date=2013 |publisher=Springer Science & Business Media |isbn=9783319016283 |pages=12–3}}</ref> | |||
:Precise instructions (in language understood by "the computer") for a "fast, efficient, good" ''process'' that specifies the "moves" of "the computer" (machine or human, equipped with the necessary internally-contained information and capabilities) to find, decode, and then munch arbitrary input integers/symbols '''m''' and '''n''', symbols '''+''' and '''=''' ... and (reliably, correctly, "effectively") produce, in a "reasonable" ], output-integer '''y''' at a specified place and in a specified format. | |||
The earliest evidence of algorithms is found in ancient ]n mathematics. A ]ian clay tablet found in ] near ] and dated to {{Circa|2500 BC}} describes the earliest ].<ref name="Springer Science & Business Media" /> During the ] {{Circa|1800|1600 BC|lk=no}}, ]n clay tablets described algorithms for computing formulas.<ref>{{cite journal |last1=Knuth |first1=Donald E. |date=1972 |title=Ancient Babylonian Algorithms |url=http://steiner.math.nthu.edu.tw/disk5/js/computer/1.pdf |url-status=dead |journal=Commun. ACM |volume=15 |issue=7 |pages=671–677 |doi=10.1145/361454.361514 |issn=0001-0782 |s2cid=7829945 |archive-url=https://web.archive.org/web/20121224100137/http://steiner.math.nthu.edu.tw/disk5/js/computer/1.pdf |archive-date=2012-12-24}}</ref> Algorithms were also used in ]. Babylonian clay tablets describe and employ algorithmic procedures to compute the time and place of significant astronomical events.<ref>{{cite book |last=Aaboe |first=Asger |author-link=Asger Aaboe |title=Episodes from the Early History of Astronomy |date=2001 |publisher=Springer |isbn=978-0-387-95136-2 |place=New York |pages=40–62}}</ref> | |||
The concept of ''algorithm'' is also used to define the notion of ]. That notion is central for explaining how ]s come into being starting from a small set of ]s and rules. In ], the time that an algorithm requires to complete cannot be measured, as it is not apparently related with our 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. | |||
Algorithms for arithmetic are also found in ancient ], dating back to the ] {{Circa|1550 BC|lk=no}}.<ref name="Springer Science & Business Media" /> Algorithms were later used in ancient ]. Two examples are the ], which was described in the '']'' by ],<ref>{{cite web |last=Ast |first=Courtney |title=Eratosthenes |url=http://www.math.wichita.edu/history/men/eratosthenes.html |url-status=live |archive-url=https://web.archive.org/web/20150227150653/http://www.math.wichita.edu/history/men/eratosthenes.html |archive-date=February 27, 2015 |access-date=February 27, 2015 |publisher=Wichita State University: Department of Mathematics and Statistics}}</ref><ref name="Cooke2005" />{{rp|Ch 9.2}} and the ], which was first described in '']'' ({{circa|300 BC|lk=no}}).<ref name="Cooke2005" />{{rp|Ch 9.1}}Examples of ancient Indian mathematics included the ], the ], and the ].<ref name=":6" /> | |||
:''For a detailed presentation of the various points of view around the definition of "algorithm" see ]. For examples of simple addition algorithms specified in the detailed manner described in ], see ].'' | |||
The first cryptographic algorithm for deciphering encrypted code was developed by ], a 9th-century Arab mathematician, in ''A Manuscript On Deciphering Cryptographic Messages''. He gave the first description of ] by ], the earliest codebreaking algorithm.<ref name="Dooley" /> | |||
== Formalization of algorithms == | |||
Algorithms are essential to the way ]s process information, because a ] is essentially an algorithm that tells the computer what specific steps to perform (in what specific order) in order to carry out a specified task, such as calculating employees’ paychecks or printing students’ report cards. Thus, an algorithm can be considered to be any sequence of operations that can be performed by a ] system. Authors who assert this thesis include Savage (1987) and Gurevich (2000): | |||
=== Computers === | |||
<blockquote>...Turing's informal argument in favor of his thesis justifies a stronger thesis: every algorithm can be simulated by a Turing machine (Gurevich 2000:1)...according to Savage , an algorithm is a computational process defined by a Turing machine. (Gurevich 2000:3)</blockquote> | |||
==== Weight-driven clocks ==== | |||
Typically, when an algorithm is associated with processing information, data are read from an input source or device, written to an output sink or device, and/or stored for further processing. Stored data are regarded as part of the internal state of the entity performing the algorithm. In practice, the state is stored in a ], but an algorithm requires the internal data only for specific operation sets called ]s. | |||
Bolter credits the invention of the weight-driven clock as "the key invention ]]," specifically the ] mechanism<ref>Bolter 1984:24</ref> producing the tick and tock of a mechanical clock. "The accurate automatic machine"<ref>Bolter 1984:26</ref> led immediately to "mechanical ]" in the 13th century and "computational machines"—the ] and ]s of ] and ] in the mid-19th century.<ref>Bolter 1984:33–34, 204–206.</ref> Lovelace designed the first algorithm intended for processing on a computer, Babbage's analytical engine, which is the first device considered a real ] computer instead of just a ]. Although a full implementation of Babbage's second device was not realized for decades after her lifetime, Lovelace has been called "history's first programmer". | |||
==== Electromechanical relay ==== | |||
For any such computational process, the algorithm must be rigorously defined: specified in the way it applies in all possible circumstances that could arise. That is, any conditional steps must be systematically dealt with, case-by-case; the criteria for each case must be clear (and computable). | |||
Bell and Newell (1971) write that the ], a precursor to ]s (punch cards), and "telephone switching technologies" led to the development of the first computers.<ref>Bell and Newell diagram 1971:39, cf. Davis 2000</ref> By the mid-19th century, the ], the precursor of the telephone, was in use throughout the world. By the late 19th century, the ] ({{circa|1870s}}) was in use, as were Hollerith cards (c. 1890). Then came the ] ({{circa|1910|lk=no}}) with its punched-paper use of ] on tape. | |||
Telephone-switching networks of ] were invented in 1835. These led to the invention of the digital adding device by ] in 1937. While working 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".<ref>Melina Hill, Valley News Correspondent, ''A Tinkerer Gets a Place in History'', Valley News West Lebanon NH, Thursday, March 31, 1983, p. 13.</ref><ref>Davis 2000:14</ref> | |||
Because an algorithm is a precise list of precise steps, the order of computation will almost always be critical to the functioning of the algorithm. Instructions are usually assumed to be listed explicitly, and are described as starting "from the top" and going "down to the bottom", an idea that is described more formally by '']''. | |||
=== Formalization === | |||
So far, this discussion of the formalization of an algorithm has assumed the premises of ]. This is the most common conception, and it attempts to describe a task in discrete, "mechanical" means. Unique to this conception of formalized algorithms is the ], setting the value of a variable. It derives from the intuition of "]" as a scratchpad. There is an example below of such an assignment. | |||
]'s diagram from "]", the first published computer algorithm]] | |||
In 1928, a partial formalization of the modern concept of algorithms began with attempts to solve the ''] ''(decision problem) posed by ]. Later formalizations were framed as attempts to define "]"<ref>Kleene 1943 in Davis 1965:274</ref> or "effective method".<ref>Rosser 1939 in Davis 1965:225</ref> Those formalizations included the ]–]–] recursive functions of 1930, 1934 and 1935, ]'s ] of 1936, ]'s ] of 1936, and ]'s ] of 1936–37 and 1939. | |||
For some alternate conceptions of what constitutes an algorithm see ] and ] . | |||
== |
==Representations== | ||
Algorithms can be expressed in many kinds of notation, including ], ], ]s, ]s, ] or ]s (processed by ]s). Natural language expressions of algorithms tend to be verbose and ambiguous and are rarely used for complex or technical algorithms. Pseudocode, flowcharts, drakon-charts, and control tables are structured expressions of algorithms that avoid common ambiguities of natural language. Programming languages are primarily for expressing algorithms in a computer-executable form, but are also used to define or document algorithms. | |||
Some writers restrict the definition of ''algorithm'' to procedures that eventually finish. In such a category Kleene places the "''decision procedure'' or ''decision method'' or ''algorithm'' for the question" (Kleene 1952:136). Others, including Kleene, include procedures that could run forever without stopping; such a procedure has been called a "computational method" (Knuth 1997:5) or "''calculation procedure'' or ''algorithm''" (Kleene 1952:137); however, Kleene notes that such a method must eventually exhibit "some object" (Kleene 1952:137). | |||
=== Turing machines === | |||
Minsky makes the pertinent observation, in regards to determining whether an algorithm will eventually terminate (from a particular starting state): | |||
There are many possible representations and ] programs can be expressed as a sequence of machine tables (see ], ], and ] for more), as flowcharts and drakon-charts (see ] for more), as a form of rudimentary ] or ] called "sets of quadruples", and more. Algorithm representations can also be classified into three accepted levels of Turing machine description: high-level description, implementation description, and formal description.<ref name=":5">Sipser 2006:157</ref> A high-level description describes qualities of the algorithm itself, ignoring how it is implemented on the Turing machine.<ref name=":5" /> 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 does not give exact states.<ref name=":5" /> In the most detail, a formal description gives the exact state table and list of transitions of the Turing machine.<ref name=":5" /> | |||
<blockquote>But if the length of the process is not known in advance, then 'trying' it may not be decisive, because if the process does go on forever — then at no time will we ever be sure of the answer (Minsky 1967:105).</blockquote> | |||
=== Flowchart representation === | |||
As it happens, no other method can do any better, as was shown by ] with his celebrated result on the undecidability of the so-called ]. There is no algorithmic procedure for determining of arbitrary algorithms whether or not they terminate from given starting states. The analysis of algorithms for their likelihood of termination is called ]. | |||
The graphical aid called a ] offers a way to describe and document an algorithm (and a computer program corresponding to it). It has four primary symbols: arrows showing program flow, rectangles (SEQUENCE, GOTO), diamonds (IF-THEN-ELSE), and dots (OR-tie). Sub-structures can "nest" in rectangles, but only if a single exit occurs from the superstructure. | |||
== Algorithmic analysis == | |||
See the examples of (im-)"proper" subtraction at ] for more about what can happen when an algorithm fails for certain of its input numbers — e.g., (i) non-termination, (ii) production of "junk" (output in the wrong format to be considered a number) or no number(s) at all (halt ends the computation with no output), (iii) wrong number(s), or (iv) a combination of these. Kleene proposed that the production of "junk" or failure to produce a number is solved by having the algorithm detect these instances and produce e.g., an error message (he suggested "0"), or preferably, force the algorithm into an endless loop (Kleene 1952:322). Davis does this to his subtraction algorithm — he fixes his algorithm in a second example so that it is proper subtraction (Davis 1958:12-15). Along with the logical outcomes "true" and "false" Kleene also proposes the use of a third logical symbol "u" — undecided (Kleene 1952:326) — thus an algorithm will always produce ''something'' when confronted with a "proposition". The problem of wrong answers must be solved with an independent "proof" of the algorithm e.g., using induction: | |||
{{Main|Analysis of algorithms}} | |||
<blockquote>We normally require auxiliary evidence for this (that the algorithm correctly defines a ]), e.g., in the form of an inductive proof that, for each argument value, the computation terminates with a unique value (Minsky 1967:186).</blockquote> | |||
It is often important to know how much time, storage, or other cost an algorithm may require. 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 {{tmath|O(n)}}, using ]. The algorithm only needs to remember two values: the sum of all the elements so far, and its current position in the input list. If the space required to store the input numbers is not counted, it has a space requirement of {{tmath|O(1)}}, otherwise {{tmath|O(n)}} is required. | |||
=== Expressing algorithms === | |||
Algorithms can be expressed in many kinds of notation, including ]s, ], ]s, and ]s. Natural language expressions of algorithms tend to be verbose and ambiguous, and are rarely used for complex or technical algorithms. Pseudocode and flowcharts are structured ways to express algorithms that avoid many of the ambiguities common in natural language statements, while remaining independent of a particular implementation language. Programming languages are primarily intended for expressing algorithms in a form that can be executed by a ], but are often used as a way to define or document algorithms. | |||
Different algorithms may complete the same task with a different set of instructions in less or more time, space, or ']' than others. For example, a ] algorithm (with cost {{tmath|O(\log n)}}) outperforms a sequential search (cost {{tmath|O(n)}} ) when used for ]s on sorted lists or arrays. | |||
There is a wide variety of representations possible and one can express a given ] program as a sequence of machine tables (see more at ] and ]), as flowcharts (see more at ]), or as a form of rudimentary ] or ] called "sets of quadruples" (see more at ]). | |||
===Formal versus empirical=== | |||
Sometimes it is helpful in the description of an algorithm to supplement small "flow charts" (state diagrams) with natural-language and/or arithmetic expressions written inside "]s" to summarize what the "flow charts" are accomplishing. | |||
{{Main|Empirical algorithmics|Profiling (computer programming)|Program optimization}} | |||
The ]s is a discipline of ]. Algorithms are often studied abstractly, without referencing any specific ] or implementation. Algorithm analysis resembles other mathematical disciplines as it focuses on the algorithm's properties, not implementation. ] is typical for analysis as it is a simple and general representation. Most algorithms are implemented on particular hardware/software platforms and their ] is tested using real code. The efficiency of a particular algorithm may be insignificant for many "one-off" problems but it may be critical for algorithms designed for fast interactive, commercial or long life scientific usage. Scaling from small n to large n frequently exposes inefficient algorithms that are otherwise benign. | |||
Representations of algorithms are generally classed into three accepted levels of Turing machine description (Sipser 2006:157): | |||
*'''1 High-level description''': | |||
:: "...prose to describe an algorithm, ignoring the implementation details. At this level we do not need to mention how the machine manages its tape or head" | |||
*'''2 Implementation description''': | |||
:: "...prose used to define the way the Turing machine uses its head and the way that it stores data on its tape. At this level we do not give details of states or transition function" | |||
*'''3 Formal description''': | |||
:: Most detailed, "lowest level", gives the Turing machine's "state table". | |||
Empirical testing is useful for uncovering unexpected interactions that affect performance. ]s may be used to compare before/after potential improvements to an algorithm after program optimization. | |||
:''For an example of the simple algorithm "Add m+n" described in all three levels see ].'' | |||
Empirical tests cannot replace formal analysis, though, and are non-trivial to perform fairly.<ref name="KriegelSchubert2016">{{cite journal|last1=Kriegel|first1=Hans-Peter|author-link=Hans-Peter Kriegel|last2=Schubert|first2=Erich|last3=Zimek|first3=Arthur|author-link3=Arthur Zimek|title=The (black) art of run-time evaluation: Are we comparing algorithms or implementations?|journal=Knowledge and Information Systems|volume=52|issue=2|year=2016|pages=341–378|issn=0219-1377|doi=10.1007/s10115-016-1004-2|s2cid=40772241}}</ref> | |||
=== |
=== Execution efficiency === | ||
{{Main|Algorithmic efficiency}} | |||
Most algorithms are intended to be implemented as ]. However, algorithms are also implemented by other means, such as in a biological ] (for example, the ] implementing ] or an insect looking for food), in an ], or in a mechanical device. | |||
To illustrate the potential improvements possible even in well-established algorithms, a recent significant innovation, relating to ] algorithms (used heavily in the field of image processing), can decrease processing time up to 1,000 times for applications like medical imaging.<ref>{{cite web| title=Better Math Makes Faster Data Networks| author=Gillian Conahan| date=January 2013| url=http://discovermagazine.com/2013/jan-feb/34-better-math-makes-faster-data-networks| publisher=discovermagazine.com| access-date=May 13, 2014| archive-url=https://web.archive.org/web/20140513212427/http://discovermagazine.com/2013/jan-feb/34-better-math-makes-faster-data-networks| archive-date=May 13, 2014| url-status=live}}</ref> In general, speed improvements depend on special properties of the problem, which are very common in practical applications.<ref name="Hassanieh12">Haitham Hassanieh, ], Dina Katabi, and Eric Price, " {{webarchive|url=https://web.archive.org/web/20130704180806/http://siam.omnibooksonline.com/2012SODA/data/papers/500.pdf |date=July 4, 2013 }}, Kyoto, January 2012. See also the {{Webarchive|url=https://web.archive.org/web/20120221145740/http://groups.csail.mit.edu/netmit/sFFT/ |date=February 21, 2012 }}.</ref> Speedups of this magnitude enable computing devices that make extensive use of image processing (like digital cameras and medical equipment) to consume less power. | |||
== Example == | |||
One of the simplest algorithms is to find the largest number in an (unsorted) list of numbers. The solution necessarily requires looking at every number in the list, but only once at each. From this follows a simple algorithm, which can be stated in a high-level description ] prose, as: | |||
== Design == | |||
'''High-level description:''' | |||
{{See also|Algorithm#By design paradigm}} | |||
# Assume the first item is largest. | |||
# Look at each of the remaining items in the list and if it is larger than the largest item so far, make a note of it. | |||
# The last noted item is the largest in the list when the process is complete. | |||
Algorithm design is a method or mathematical process for problem-solving and engineering algorithms. The design of algorithms is part of many solution theories, such as ] or ] within ]. Techniques for designing and implementing algorithm designs are also called algorithm design patterns,<ref>{{cite book |last1=Goodrich |first1=Michael T. |author1-link=Michael T. Goodrich |url=http://ww3.algorithmdesign.net/ch00-front.html |title=Algorithm Design: Foundations, Analysis, and Internet Examples |last2=Tamassia |first2=Roberto |author2-link=Roberto Tamassia |publisher=John Wiley & Sons, Inc. |year=2002 |isbn=978-0-471-38365-9 |access-date=June 14, 2018 |archive-url=https://web.archive.org/web/20150428201622/http://ww3.algorithmdesign.net/ch00-front.html |archive-date=April 28, 2015 |url-status=live}}</ref> with examples including the template method pattern and the decorator pattern. One of the most important aspects of algorithm design is resource (run-time, memory usage) efficiency; the ] is used to describe e.g., an algorithm's run-time growth as the size of its input increases.<ref>{{Cite web |title=Big-O notation (article) {{!}} Algorithms |url=https://www.khanacademy.org/computing/computer-science/algorithms/asymptotic-notation/a/big-o-notation |access-date=2024-06-03 |website=Khan Academy |language=en}}</ref> | |||
'''(Quasi-)formal description:''' | |||
Written in prose but much closer to the high-level language of a computer program, the following is the more formal coding of the algorithm in ] or ]: | |||
=== Structured programming === | |||
{{algorithm-begin|name=LargestNumber}} | |||
Per the ], any algorithm can be computed by any ] model. Turing completeness only requires four instruction types—conditional GOTO, unconditional GOTO, assignment, HALT. However, Kemeny and Kurtz observe that, while "undisciplined" use of unconditional GOTOs and conditional IF-THEN GOTOs can result in "]", 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".<ref>] and ] 1985 ''Back to Basic: The History, Corruption, and Future of the Language'', Addison-Wesley Publishing Company, Inc. Reading, MA, {{ISBN|0-201-13433-0}}.</ref> Tausworthe augments the three ]:<ref>Tausworthe 1977:101</ref> SEQUENCE, IF-THEN-ELSE, and WHILE-DO, with two more: DO-WHILE and CASE.<ref>Tausworthe 1977:142</ref> An additional benefit of a structured program is that it lends itself to ]s using ].<ref>Knuth 1973 section 1.2.1, expanded by Tausworthe 1977 at pages 100ff and Chapter 9.1</ref> | |||
Input: A non-empty list of numbers ''L''. | |||
Output: The ''largest'' number in the list ''L''. | |||
''largest'' ← ''L''<sub>0</sub> | |||
'''for each''' ''item'' '''in''' the list ''L<sub>≥1</sub>'', '''do''' | |||
'''if''' the ''item'' > ''largest'', '''then''' | |||
''largest'' ← the ''item'' | |||
'''return''' ''largest'' | |||
{{algorithm-end}} | |||
== Legal status == | |||
For a more complex example of an algorithm, see ] for the ], one of the earliest algorithms known. | |||
{{see also|Software patent}} | |||
By themselves, algorithms 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 '']''). However practical applications of algorithms are sometimes patentable. For example, in '']'', the application of a simple ] algorithm to aid in the curing of ] was deemed patentable. The ] is controversial,<ref>{{Cite news |date=2013-05-16 |title=The Experts: Does the Patent System Encourage Innovation? |url=https://www.wsj.com/articles/SB10001424127887323582904578487200821421958 |access-date=2017-03-29 |work=] |issn=0099-9660}}</ref> and there are criticized patents involving algorithms, especially ] algorithms, such as ]'s ]. Additionally, some cryptographic algorithms have export restrictions (see ]). | |||
=== Algorithm analysis === | |||
As it happens, it is important to know how much of a particular resource (such as time or storage) is required for a given algorithm. Methods have been developed for the ] to obtain such quantitative answers; for example, the algorithm above has a time requirement of O(''n''), using the ] with ''n'' as the length of the list. At all times the algorithm only needs to remember two values: the largest number found so far, and its current position in the input list. Therefore it is said to have a space requirement of ''O(1)'', if the space required to store the input numbers is not counted, or O (log ''n'') if it is counted. | |||
== Classification == | |||
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, given two different recipes for making potato salad, one may have ''peel the potato'' before ''boil the potato'' while the other presents the steps in the reverse order, yet they both call for these steps to be repeated for all potatoes and end when the potato salad is ready to be eaten. <!-- poor example ... who would boil each potato separately? and making a salad in general requires no cooking ... and the algorithms aren't even truly equivalent, as the flavor and texture changes if the potatoes are peeled before boiling! --> | |||
=== By implementation === | |||
; Recursion | |||
: A ] invokes itself repeatedly until meeting a termination condition, and is a common ] method. ] algorithms use repetitions such as ]s or data structures like ]s to solve problems. Problems may be suited for one implementation or the other. The ] is a puzzle commonly solved 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 on serial computers. Serial algorithms are designed for these environments, unlike ] or ] algorithms. Parallel algorithms take advantage of computer architectures where multiple processors can work on a problem at the same time. Distributed algorithms use multiple machines connected via a computer network. Parallel and distributed algorithms divide the problem into subproblems and collect the results back together. Resource consumption in these 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 non-deterministic | |||
: ]s solve the problem with exact decision at every step; whereas ]s solve problems via guessing. Guesses are typically made more accurate through the use of ]. | |||
; Exact or approximate | |||
: While many algorithms reach an exact solution, ]s seek an approximation that is close to the true solution. Such algorithms have practical value for many hard problems. For example, the ], where there is a set of items and the 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.<ref>{{Cite book|url=https://www.springer.com/us/book/9783540402862|title=Knapsack Problems {{!}} Hans Kellerer {{!}} Springer|language=en|isbn=978-3-540-40286-2|publisher=Springer|year=2004|doi=10.1007/978-3-540-24777-7|access-date=September 19, 2017|archive-url=https://web.archive.org/web/20171018181055/https://www.springer.com/us/book/9783540402862|archive-date=October 18, 2017|url-status=live|last1=Kellerer|first1=Hans|last2=Pferschy|first2=Ulrich|last3=Pisinger|first3=David|s2cid=28836720 }}</ref> | |||
; Quantum algorithm | |||
: ]s run on a realistic model of ]. The term is usually used for those algorithms which seem inherently quantum or use some essential feature of ] such as ] or ]. | |||
=== By design paradigm === | |||
The ] is a discipline of ], and is often practiced abstractly without the use of a specific ] 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. | |||
Another way of classifying algorithms is by their design methodology or ]. Some common paradigms are: | |||
; ] or exhaustive search | |||
== Classes == | |||
: Brute force is a problem-solving method of systematically trying every possible option until the optimal solution is found. This approach can be very time-consuming, testing every possible combination of variables. It is often used when other methods are unavailable or too complex. Brute force can solve a variety of problems, including finding the shortest path between two points and cracking passwords. | |||
There are various ways to classify algorithms, each with its own merits. | |||
; Divide and conquer | |||
: A ] repeatedly reduces a problem to one or more smaller instances of itself (usually ]) until the instances are small enough to solve easily. ] is an example of divide and conquer, where an unordered list can be divided into segments containing one item and sorting of entire list can be obtained by merging the segments. A simpler variant of divide and conquer is called a ''decrease-and-conquer algorithm'', which solves one smaller instance of itself, and uses the solution 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.{{Citation needed|date=October 2024}} An example of a decrease and conquer algorithm is the ]. | |||
; Search and enumeration | |||
: Many problems (such as playing ]s) can be modelled as problems on ]s. A ] specifies rules for moving around a graph and is useful for such problems. This category also includes ]s, ] enumeration, and ]. | |||
;] | |||
: Such algorithms make some choices randomly (or pseudo-randomly). They find approximate solutions when finding exact solutions may be impractical (see heuristic method below). For some problems the fastest approximations must involve some ].<ref>For instance, the ] of a ] (described using a membership oracle) can be approximated to high accuracy by a randomized polynomial time algorithm, but not by a deterministic one: see {{cite journal | |||
| last1 = Dyer | first1 = Martin | |||
| last2 = Frieze | first2 = Alan | |||
| last3 = Kannan | first3 = Ravi | |||
| date = January 1991 | |||
| doi = 10.1145/102782.102783 | |||
| issue = 1 | |||
| journal = J. ACM | |||
| pages = 1–17 | |||
| title = A Random Polynomial-time Algorithm for Approximating the Volume of Convex Bodies | |||
| volume = 38| citeseerx = 10.1.1.145.4600| s2cid = 13268711 | |||
}}</ref> Whether randomized algorithms with ] can be the fastest algorithm for some problems is an open question known as the ]. There are two large classes of such algorithms: | |||
# ]s return a correct answer with high probability. E.g. ] is the subclass of these that run in ]. | |||
# ]s always return the correct answer, but their running time is only probabilistically bound, e.g. ]. | |||
; ] | |||
: This technique transforms difficult problems into better-known problems solvable with (hopefully) ] algorithms. The goal is to find a reducing algorithm whose ] is not dominated by the resulting reduced algorithms. For example, one ] finds the median of an unsorted list by first sorting the list (the expensive portion), then pulling out the middle element in the sorted list (the cheap portion). This technique is also known as '']''. | |||
; ] | |||
: 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 ]s 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: | |||
One way to classify algorithms is by implementation means. | |||
; ] | |||
* '''Recursion''' or '''iteration''': A ] is one that invokes (makes reference to) itself repeatedly until a certain condition matches, which is a method common to ]. ] algorithms use repetitive constructs like ] and sometimes additional data structures like ] to solve the given problems. Some problems are naturally suited for one implementation or the other. For example, ] is well understood in recursive implementation. Every recursive version has an equivalent (but possibly more or less complex) iterative version, and vice versa. | |||
: When searching for optimal solutions to a linear function bound by linear equality and inequality constraints, the constraints can be used directly to produce optimal solutions. There are algorithms that can solve any problem in this category, such as the popular ].<ref> | |||
] and Mukund N. Thapa. 2003. ''Linear Programming 2: Theory and Extensions''. Springer-Verlag.</ref> Problems that can be solved with linear programming include the ] for directed graphs. If a problem also requires that any of the unknowns be ]s, then it is classified in ]. 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. | |||
; ] | |||
: When a problem shows optimal substructures—meaning the optimal solution can be constructed from optimal solutions to subproblems—and ]s, meaning the same subproblems are used to solve many different problem instances, a quicker approach called ''dynamic programming'' avoids recomputing solutions. For example, ], the shortest path between a start and goal vertex in a weighted ] can be found using the shortest path to the goal from all adjacent vertices. Dynamic programming and ] go together. Unlike divide and conquer, dynamic programming subproblems often overlap. The difference between dynamic programming and simple recursion is the caching or memoization of recursive calls. When subproblems are independent and do not repeat, memoization does not help; hence dynamic programming is not applicable to all complex problems. Using memoization dynamic programming reduces the complexity of many problems from exponential to polynomial. | |||
; The greedy method | |||
: ]s, similarly to a dynamic programming, work by examining substructures, in this case not of the problem but of a given solution. Such algorithms start with some solution and improve it by making small modifications. For some problems they always find the optimal solution but for others they may stop at ]. The most popular use of greedy algorithms is finding minimal spanning trees of graphs without negative cycles. ], ], ], ] are greedy algorithms that can solve this optimization problem. | |||
;The heuristic method | |||
:In ]s, ]s find solutions close to the optimal solution when finding the optimal solution is impractical. These algorithms get 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. They can ideally find a solution very close to the optimal solution in a relatively short time. These algorithms include ], ], ], and ]s. Some, like simulated annealing, are non-deterministic algorithms while others, like tabu search, are deterministic. When a bound on the error of the non-optimal solution is known, the algorithm is further categorized as an ]. | |||
== Examples == | |||
* '''Logical''': An algorithm may be viewed as controlled ]. This notion may be expressed as: '''Algorithm = logic + control''' (Kowalski 1979). The logic component expresses the axioms that may be used in the computation and the control component determines the way in which deduction is applied to the axioms. This is the basis for the ] paradigm. In pure logic programming languages the control component is fixed and algorithms are specified by supplying only the logic component. The appeal of this approach is the elegant ]: a change in the axioms has a well defined change in the algorithm. | |||
{{Further|List of algorithms}} | |||
One of the simplest algorithms finds 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 described in plain English as: | |||
* '''Serial''' or '''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 ]s or ]. Parallel algorithms take advantage of computer architectures where several processors can work on a problem at the same time, whereas distributed algorithms utilise multiple machines connected with a ]. Parallel or distributed algorithms divide the problem into more symmetrical or asymmetrical subproblems and collect the results back together. The resource consumption in such algorithms is not only processor cycles on each processor but also the communication overhead between the processors. Sorting algorithms can be parallelized efficiently, but their communication overhead is expensive. Iterative algorithms are generally parallelizable. Some problems have no parallel algorithms, and are called inherently serial problems. | |||
''High-level description:'' | |||
* '''Deterministic''' or '''non-deterministic''': ]s solve the problem with exact decision at every step of the algorithm whereas ] solve problems via guessing although typical guesses are made more accurate through the use of ]. | |||
# If a set of numbers is empty, then there is no highest number. | |||
# Assume the first number in the set is the largest. | |||
# For each remaining number in the set: if this number is greater than the current largest, it becomes the new largest. | |||
# When there are no unchecked numbers left in the set, consider the current largest number to be the largest in the set. | |||
''(Quasi-)formal description:'' | |||
* '''Exact''' or '''approximate''': While many algorithms reach an exact solution, ]s seek an approximation that is close to the true solution. Approximation may use either a deterministic or a random strategy. Such algorithms have practical value for many hard problems. | |||
Written in prose but much closer to the high-level language of a computer program, the following is the more formal coding of the algorithm in ] or ]: | |||
{{algorithm-begin|name=LargestNumber}} | |||
=== Classification by design paradigm === | |||
Input: A list of numbers ''L''. | |||
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 will include many different types of algorithms. Some commonly found paradigms include: | |||
Output: The largest number in the list ''L''. | |||
'''if''' ''L.size'' = 0 '''return''' null | |||
* '''Divide and conquer'''. A ] repeatedly reduces an instance of a problem to one or more smaller instances of the same problem (usually ]), until the instances are small enough to solve easily. One such example of divide and conquer is ]. Sorting can be done on each segment of data after dividing data into segments and sorting of entire data can be obtained in conquer phase by merging them. A simpler variant of divide and conquer is called '''decrease and conquer algorithm''', that 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 conquer stage will be more complex than decrease and conquer algorithms. An example of decrease and conquer algorithm is ]. | |||
''largest'' ← ''L'' | |||
* ''']'''. When a problem shows ], meaning the optimal solution to a problem can be constructed from optimal solutions to subproblems, and ], 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, the shortest path to a goal from a vertex in a weighted ] can be found by using the shortest path to the goal from all adjacent vertices. Dynamic programming and ] 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 ] of subproblems already solved, dynamic programming reduces the exponential nature of many problems to polynomial complexity. | |||
'''for each''' ''item'' '''in''' ''L'', '''do''' | |||
* '''The greedy method'''. A ] is similar to a ], but the difference is that solutions to the subproblems do not have to be known at each stage; instead a "greedy" choice can be made of what looks best for the moment. The greedy method extends the solution with the best possible decision (not all feasible decisions) at an algorithmic stage based on the current local optimum and the best decision (not all possible decisions) made in previous stage. It is not exhaustive, and does not give accurate answer to many problems. But when it works, it will be the fastest method. The most popular greedy algorithm is finding the minimal spanning tree as given by ]. | |||
'''if''' ''item'' > ''largest'', '''then''' | |||
* '''Linear programming'''. When solving a problem using ], specific ] involving the inputs are found and then an attempt is made to maximize (or minimize) some linear function of the inputs. Many problems (such as the ] for directed ]) can be stated in a linear programming way, and then be solved by a 'generic' algorithm such as the ]. A more complex variant of linear programming is called integer programming, where the solution space is restricted to the ]. | |||
''largest'' ← ''item'' | |||
* ''']'''. This technique involves solving a difficult problem by transforming it into a better known problem for which we have (hopefully) ] algorithms. The goal is to find a reducing algorithm whose ] is not dominated by the resulting reduced algorithm's. For example, one ] 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''. | |||
'''return''' ''largest'' | |||
* '''Search and enumeration'''. Many problems (such as playing ]) can be modeled as problems on ]. A ] specifies rules for moving around a graph and is useful for such problems. This category also includes ]s, ] enumeration and ]. | |||
{{algorithm-end}} | |||
* '''The probabilistic and heuristic paradigm'''. Algorithms belonging to this class fit the definition of an algorithm more loosely. | |||
# ]s are those that make some choices randomly (or pseudo-randomly); for some problems, it can in fact be proven that the fastest solutions must involve some ]. | |||
# ]s attempt to find solutions to problems by mimicking biological ]ary processes, with a cycle of random mutations yielding successive generations of "solutions". Thus, they emulate reproduction and "survival of the fittest". In ], this approach is extended to algorithms, by regarding the algorithm itself as a "solution" to a problem. | |||
# ] algorithms, whose general purpose is not to find an optimal solution, but an approximate solution where the time or resources are limited. They are not practical to find perfect solutions. An example of this would be ], ], or ] algorithms, a class of heuristic probabilistic algorithms that vary the solution of a problem by a random amount. The name "]" alludes to the metallurgic term meaning the heating and cooling of metal to achieve freedom from defects. The purpose of the random variance is to find close to globally optimal solutions rather than simply locally optimal ones, the idea being that the random element will be decreased as the algorithm settles down to a solution. | |||
== See also == | |||
=== Classification by field of study === | |||
{{Portal|Mathematics|Computer programming}} | |||
{{Seealso|List of algorithms}} | |||
{{div col|colwidth=22em}} | |||
Every field of science has its own problems and needs efficient algorithms. Related problems in one field are often studied together. Some example classes are ]s, ]s, ]s, ], ], ], ], ], ], ], ] algorithms and ]. | |||
Fields tend to overlap with each other, and algorithm advances in one field may improve those of other, sometimes completely unrelated, fields. For example, dynamic programming was originally invented for optimization of resource consumption in industry, but is now used in solving a broad range of problems in many fields. | |||
=== Classification by complexity === | |||
{{See also|Complexity class}} | |||
Algorithms can be classified by the amount of time they need to complete compared to their input size. There is a wide variety: some algorithms complete in linear time relative to input size, some do so in an exponential amount of time or even worse, and some never halt. Additionally, some problems may have multiple algorithms of differing complexity, while other problems might have no algorithms or no known efficient algorithms. There are also mappings from some problems to other problems. Owing to this, it was found to be more suitable to classify the problems themselves instead of the algorithms into equivalence classes based on the complexity of the best possible algorithms for them. | |||
=== Classification by computing power === | |||
Another way to classify algorithms is by computing power. This is typically done by considering some collection (class) of algorithms. A '''recursive class of algorithms''' is one that includes algorithms for all Turing computable functions. Looking at classes of algorithms allows for the possibility of restricting the available computational resources (time and memory) used in a computation. A '''subrecursive class of algorithms''' is one in which not all Turing computable functions can be obtained. For example, the algorithms that run in ] suffice for many important types of computation but do not exhaust all Turing computable functions. The class algorithms implemented by ]s is another subrecursive class. | |||
Burgin (2005, p. 24) uses a generalized definition of algorithms that relaxes the common requirement that the output of the algorithm that computes a function must be determined after a finite number of steps. He defines a a '''super-recursive class of algorithms''' as "a class of algorithms in which it is possible to compute functions not computable by any Turing machine" (Burgin 2005, p. 107). This is closely related to the study of methods of ]. | |||
== Legal issues == | |||
:''See also: ] for a general overview of the patentability of software, including computer-implemented algorithms.'' | |||
Algorithms, by themselves, are not usually patentable. In the ], a claim consisting solely of simple manipulations of abstract concepts, numbers, or signals do not constitute "processes" (USPTO 2006) and hence algorithms are not patentable (as in ]). However, practical applications of algorithms are sometimes patentable. For example, in ], the application of a simple ] algorithm to aid in the curing of ] was deemed patentable. The ] is highly controversial, and there are highly criticized patents involving algorithms, especially ] algorithms, such as ]' ]. | |||
Additionally, some cryptographic algorithms have export restrictions (see ]). | |||
{{sect-stub}} | |||
== History: Development of the notion of "algorithm" == | |||
=== Origin of the word === | |||
{{Seealso|Timeline of algorithms}} | |||
The word ''algorithm'' comes from the name of the 9th century ] mathematician ] whose works introduced Indian numerals and algebraic concepts. He worked in ] at the time when it was the centre of scientific studies and trade. The word '']'' originally referred only to the rules of performing ] using ] but evolved via European Latin translation of al-Khwarizmi's name into ''algorithm'' by the 18th century. The word evolved to include all definite procedures for solving problems or performing tasks. | |||
=== Discrete and distinguishable symbols === | |||
'''Tally-marks''': To keep track of their flocks, their sacks of grain and their money the ancients used tallying: accumulating stones or marks scratched on sticks, or making discrete symbols in clay. Through the Babylonian and Egyptian use of marks and symbols, eventually ] and the ] evolved (Dilson, p.16–41). Tally marks appear prominently in ] arithmetic used in ] and ] computations. | |||
=== Manipulation of symbols as "place holders" for numbers: algebra === | |||
The work of the ancient Greek geometers, Persian mathematician ] (often considered as the "father of ]"), and Western European mathematicians culminated in ]'s notion of the ] (ca 1680): | |||
:"A good century and a half ahead of his time, Leibniz proposed an algebra of logic, an algebra that would specify the rules for manipulating logical concepts in the manner that ordinary algebra specifies the rules for manipulating numbers" (Davis 2000:1) | |||
=== Mechanical contrivances with discrete states === | |||
'''The clock''': Bolter credits the invention of the weight-driven ] as “The key invention ", in particular the ]< (Bolter 1984:24) that provides us with the tick and tock of a mechanical clock. “The accurate automatic machine” (Bolter 1984:26) led immediately to "mechanical ]" beginning in the thirteenth century and finally to “computational machines" – the ] and ]s of ] and Countess ] (Bolter p.33–34, p.204–206). | |||
'''Jacquard loom, Hollerith punch cards, telegraphy and telephony — the electromechanical relay''': Bell and Newell (1971) indicate that the ] (1801), precursor to ] (punch cards, 1887), and “telephone switching technologies” were the roots of a tree leading to the development of the first computers (Bell and Newell diagram p. 39, cf Davis 2000). By the mid-1800s the ], 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 1800s the ] (ca 1870s) was in use, as was the use of ] in the 1890 U.S. census. Then came the ] (ca 1910) with its punched-paper use of ] on tape. | |||
Telephone-switching networks of electromechanical ]s (invented 1835) was behind the work of ] (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". (Valley News, p. 13). | |||
Davis (2000) observes the particular importance of the electromechanical relay (with its two "binary states" ''open'' and ''closed''): | |||
: It was only with the development, beginning in the 1930s, of electromechanical calculators using electrical relays, that machines were built having the scope Babbage had envisioned." (Davis, p. 14). | |||
=== Mathematics during the 1800s up to the mid-1900s === | |||
'''Symbols and rules''': In rapid succession the mathematics of ] (1847, 1854), ] (1879), and ] (1888–1889) reduced arithmetic to a sequence of symbols manipulated by rules. Peano's ''The principles of arithmetic, presented by a new method'' (1888) was "the first attempt at an axiomatization of mathematics in a symbolic language" (van Heijenoort:81ff). | |||
But Heijenoort gives Frege (1879) this kudos: Frege’s is "perhaps the most important single work ever written in logic. ... in which we see a " 'formula language', that is a ''lingua characterica'', a language written with special symbols, "for pure thought", that is, free from rhetorical embellishments ... constructed from specific symbols that are manipulated according to definite rules" (van Heijenoort:1). The work of Frege was further simplified and amplified by ] and ] in their ] (1910–1913). | |||
'''The paradoxes''': At the same time a number of disturbing paradoxes appeared in the literature, in particular the ] (1897), the ] (1902–03), and the ] (Dixon 1906, cf Kleene 1952:36–40). The resultant considerations led to ]’s paper (1931) — he specifically cites the paradox of the liar — that completely reduces rules of ] to numbers. | |||
'''Effective calculability''': In an effort to solve the ] defined precisely by Hilbert in 1928, mathematicians first set about to define what was meant by an "effective method" or "effective calculation" or "effective calculability" (i.e., a calculation that would succeed). In rapid succession the following appeared: ], ] and ]'s ], (cf footnote in ] 1936a:90, 1936b:110) a finely-honed definition of "general recursion" from the work of Gödel acting on suggestions of ] (cf Gödel's Princeton lectures of 1934) and subsequent simplifications by Kleene (1935-6:237ff, 1943:255ff). Church's proof (1936:88ff) that the ] was unsolvable, ]'s definition of effective calculability as a worker mindlessly following a list of instructions to move left or right through a sequence of rooms and while there either mark or erase a paper or observe the paper and make a yes-no decision about the next instruction (cf "Formulation I", Post 1936:289-290). ]'s proof of that the Entscheidungsproblem was unsolvable by use of his "a- machine"(Turing 1936-7:116ff) -- in effect almost identical to Post's "formulation", ]'s definition of "effective method" in terms of "a machine" (Rosser 1939:226). ]'s proposal of a precursor to "]" that he called "Thesis I" (Kleene 1943:273–274), and a few years later Kleene's renaming his Thesis "Church's Thesis" (Kleene 1952:300, 317) and proposing "Turing's Thesis" (Kleene 1952:376). | |||
=== Emil Post (1936) and Alan Turing (1936-7, 1939)=== | |||
Here is a remarkable coincidence of two men not knowing each other but describing a process of men-as-computers working on computations — and they yield virtually identical definitions. | |||
] (1936) described the actions of a "computer" (human being) as follows: | |||
:"...two concepts are involved: that of a ''symbol space'' in which the work leading from problem to answer is to be carried out, and a fixed unalterable ''set of directions''. | |||
His symbol space would be | |||
:"a two way infinite sequence of spaces or boxes... The problem solver or worker is to move and work in this symbol space, being capable of being in, and operating in but one box at a time.... a box is to admit of but two possible conditions, i.e., being empty or unmarked, and having a single mark in it, say a vertical stroke. | |||
:"One box is to be singled out and called the starting point. ...a specific problem is to be given in symbolic form by a finite number of boxes being marked with a stroke. Likewise the answer is to be given in symbolic form by such a configuration of marked boxes.... | |||
:"A set of directions applicable to a general problem sets up a deterministic process when applied to each specific problem. This process will terminate only when it comes to the direction of type (C ) ." (U p. 289–290) See more at ] | |||
]’s work (1936, 1939:160) preceded that of Stibitz (1937); it is unknown whether Stibitz knew of the work of Turing. Turing’s biographer believed that Turing’s use of a typewriter-like model derived from a youthful interest: “Alan had dreamt of inventing typewriters as a boy; Mrs. Turing had a typewriter; and he could well have begun by asking himself what was meant by calling a typewriter 'mechanical'" (Hodges, p. 96). Given the prevalence of Morse code and telegraphy, ticker tape machines, and Teletypes we might conjecture that all were influences. | |||
Turing — his model of computation is now called a ] — begins, as did Post, with an analysis of a human computer that he whittles down to a simple set of basic motions and "states of mind". But he continues a step further and creates a machine as a model of computation of numbers (Turing 1936-7:116). | |||
:"Computing is normally done by writing certain symbols on paper. We may suppose this paper is divided into squares like a child's arithmetic book....I assume then that the computation is carried out on one-dimensional paper, i.e., on a tape divided into squares. I shall also suppose that the number of symbols which may be printed is finite.... | |||
:"The behavior of the computer at any moment is determined by the symbols which he is observing, and his "state of mind" at that moment. We may suppose that there is a bound B to the number of symbols or squares which the computer can observe at one moment. If he wishes to observe more, he must use successive observations. We will also suppose that the number of states of mind which need be taken into account is finite... | |||
:"Let us imagine that the operations performed by the computer to be split up into 'simple operations' which are so elementary that it is not easy to imagine them further divided" (Turing 1936-7:136). | |||
Turing's reduction yields the following: | |||
:"The simple operations must therefore include: | |||
::"(a) Changes of the symbol on one of the observed squares | |||
::"(b) Changes of one of the squares observed to another square within L squares of one of the previously observed squares. | |||
"It may be that some of these change necessarily invoke a change of state of mind. The most general single operation must therefore be taken to be one of the following: | |||
::"(A) A possible change (a) of symbol together with a possible change of state of mind. | |||
::"(B) A possible change (b) of observed squares, together with a possible change of state of mind" | |||
:"We may now construct a machine to do the work of this computer." (Turing 1936-7:136) | |||
A few years later, Turing expanded his analysis (thesis, definition) with this forceful expression of it: | |||
:"A function is said to be "effectivey calculable" if its values can be found by some purely mechanical process. Although it is fairly easy to get an intuitive grasp of this idea, it is neverthessless desirable to have some more definite, mathematical expressible definition . . . . . . We may take this statement literally, understanding by a purely mechanical process one which could be carried out by a machine. It is possible to give a mathematical description, in a certain normal form, of the structures of these machines. The development of these ideas leads to the author's definition of a computable function, and to an identification of computability † with effective calculability . . . . | |||
::"† We shall use the expression "computable function" to mean a function calculable by a machine, and we let "effectively calculabile" refer to the intuitive idea without particular identification with any one of these definitions."(Turing 1939:160) | |||
=== J. B. Rosser (1939) and S. C. Kleene (1943) === | |||
''']''' boldly defined an ‘effective method’ in the following manner (boldface added): | |||
:"'Effective method' is used here in the rather special sense of a method each step of which is precisely determined and which is certain to produce the answer in a finite number of steps. With this special meaning, three different precise definitions have been given to date. . The simplest of these to state (due to Post and Turing) says essentially that '''an effective method of solving certain sets of problems exists if one can build a machine which will then solve any problem of the set with no human intervention beyond inserting the question and (later) reading the answer'''. All three definitions are equivalent, so it doesn't matter which one is used. Moreover, the fact that all three are equivalent is a very strong argument for the correctness of any one." (Rosser 1939:225–6) | |||
Rosser's footnote #5 references the work of (1) Church and Kleene and their definition of λ-definability, in particular Church's use of it in his ''An Unsolvable Problem of Elementary Number Theory'' (1936); (2) Herbrand and Gödel and their use of recursion in particular Gödel's use in his famous paper ''On Formally Undecidable Propositions of Principia Mathematica and Related Systems I'' (1931); and (3) Post (1936) and Turing (1936-7) in their mechanism-models of computation. | |||
''']''' defined as his now-famous "Thesis I" known as "the ]". But he did this in the following context (boldface in original): | |||
:"12. '''Algorithmic theories'''... In setting up a complete algorithmic theory, what we do is to describe a procedure, performable for each set of values of the independent variables, which procedure necessarily terminates and in such manner that from the outcome we can read a definite answer, "yes" or "no," to the question, "is the predicate value true?”"(Kleene 1943:273) | |||
=== History after 1950 === | |||
A number of efforts have been directed toward further refinement of the definition of "algorithm", and activity is on-going because of issues surrounding, in particular, ] (especially the ]) and ] (especially arguments around ]). For more, see ]. | |||
==See also== | |||
{{wiktionarypar|algorithm}} | |||
{{wikibooks|Algorithms}} | |||
<div style="-moz-column-count:2; column-count:2;"> | |||
* ] | * ] | ||
* ] | |||
* ] | |||
* ] | |||
* ] | * ] | ||
* ] | * ] | ||
* ] | * ] | ||
* ] | * ] | ||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* ] | * ] | ||
* ] | |||
* ] | |||
* ] | |||
* ] | |||
* '']'' (textbook) | |||
* ] | |||
* ] | * ] | ||
* ] | * ] | ||
* ] | |||
* ] | |||
* ] | * ] | ||
* ] | |||
* ] | * ] | ||
** ] | |||
* ], book | |||
** ] | |||
</div> | |||
{{div col end}} | |||
== |
== Notes == | ||
{{Reflist}} | |||
== Bibliography == | |||
* Axt, P. (1959) On a Subrecursive Hierarchy and Primitive Recursive Degrees, ''Transactions of the American Mathematical Society'' 92, pp. 85-105 | |||
{{refbegin|30em}} | |||
*{{citation|author1-link=Andreas Blass|first1=Andreas|last1=Blass|author2-link=Yuri Gurevich|first2=Yuri|last2=Gurevich|year=2003|url=http://research.microsoft.com/~gurevich/Opera/164.pdf|title=Algorithms: A Quest for Absolute Definitions|journal= Bulletin of European Association for Theoretical Computer Science|volume= 81}}. Includes an excellent bibliography of 56 references. | |||
* {{cite journal | last1 = Axt | first1 = P | year = 1959 | title = On a Subrecursive Hierarchy and Primitive Recursive Degrees | journal = Transactions of the American Mathematical Society | volume = 92 | issue = 1| pages = 85–105 | doi=10.2307/1993169| jstor = 1993169 | doi-access = free}} | |||
*{{citation|last1=Boolos|first1= George|last2=Jeffrey|first2= Richard|author1-link=George Boolos|author2-link=Richard Jeffrey|title=Computability and Logic|edition=First Edition|publisher=Cambridge University Press, London|year=1974, 1999|date=1974, 1980, 1989, 1999|edition=4th|isbn=0-521-20402-X}}: cf. Chapter 3 ''Turing machines'' where they discuss "certain enumerable sets not effectively (mechanically) enumerable". | |||
* Bell, C. Gordon and Newell, Allen (1971), ''Computer Structures: Readings and Examples'', McGraw–Hill Book Company, New York. {{ISBN|0-07-004357-4}}. | |||
* Burgin, M. ''Super-recursive algorithms'', Monographs in computer science, Springer, 2005. ISBN 0387955690 | |||
* {{Cite journal|author1-link=Andreas Blass|first1=Andreas|last1=Blass|author2-link=Yuri Gurevich|first2=Yuri|last2=Gurevich|year=2003|url=http://research.microsoft.com/~gurevich/Opera/164.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://research.microsoft.com/~gurevich/Opera/164.pdf |archive-date=2022-10-09 |url-status=live|title=Algorithms: A Quest for Absolute Definitions|journal= Bulletin of European Association for Theoretical Computer Science|volume= 81}} Includes a bibliography of 56 references. | |||
* 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 | |||
* {{cite book| last = Bolter| first = David J.| title = Turing's Man: Western Culture in the Computer Age| edition = 1984| year = 1984| publisher = The University of North Carolina Press|location= Chapel Hill, NC| isbn = 978-0-8078-1564-9 }}, {{ISBN|0-8078-4108-0}} | |||
*{{cite journal|last=Church|first=Alonzo|authorlink=Alonzo Church|title=An Unsolvable Problem of Elementary Number Theory|journal=The American Journal Of Mathematics|volume=58|pages= 345–363|year=1936a}} 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. | |||
* {{cite book| last1 = Boolos| first1 = George| last2 = Jeffrey| first2 = Richard| title = Computability and Logic| url = https://archive.org/details/computabilitylog0000bool_r8y9| url-access = registration| edition = 4th| orig-year = 1974| year = 1999| publisher = Cambridge University Press, London| isbn = 978-0-521-20402-6| author1-link = George Boolos| author2-link = Richard Jeffrey }}: cf. Chapter 3 ''Turing machines'' where they discuss "certain enumerable sets not effectively (mechanically) enumerable". | |||
*{{cite journal|last=Church|first=Alonzo|authorlink=Alonzo Church|title=A Note on the Entscheidungsproblem|journal=Journal of Symbolic Logic|volume=1 no. 1 and volume 1 no. 3|year=1936b}} Reprinted in ''The Undecidable'', p. 110ff. Church shows that the Entscheidungsproblem is unsolvable in about 3 pages of text and 3 pages of footnotes. | |||
*{{cite book|last= |
* {{cite book| last = Burgin| first = Mark| title = Super-Recursive Algorithms| year = 2004| publisher = Springer| isbn = 978-0-387-95569-8 }} | ||
* Campagnolo, M.L., ], 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 | |||
*{{cite book|last=Davis|first=Martin|authorlink=Martin Davis|title=The Undecidable: Basic Papers On Undecidable Propostions, Unsolvable Problems and Computable Functions|publisher=Raven Press|location=New York|year=1965}} Davis gives commentary before each article. Papers of ], ], ], ], ], and ] are included; those cited in the article are listed here by author's name. | |||
* {{Cite journal|last=Church|first=Alonzo|author-link=Alonzo Church|title=An Unsolvable Problem of Elementary Number Theory|journal=American Journal of Mathematics|volume=58|pages= 345–363|year=1936|doi=10.2307/2371045|issue=2|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. | |||
*{{cite book|last=Davis|first=Martin|authorlink=Martin Davis|title=Engines of Logic: Mathematicians and the Origin of the Computer|publisher=W. W. Nortion|location=New York|year=2000}} Davis offers concise biographies of ], ], ], ], ], ] and ] with ] as the show-stealing villain. Very brief bios of ], ], ], ], ], etc. | |||
* {{Cite journal|last=Church|first=Alonzo|author-link=Alonzo Church|title=A Note on the Entscheidungsproblem|journal=The Journal of Symbolic Logic|volume=1|year=1936|pages=40–41|doi=10.2307/2269326|issue=1|jstor=2269326|s2cid=42323521 }} {{cite journal|last=Church|first=Alonzo|title=Correction to a Note on the Entscheidungsproblem|journal=The Journal of Symbolic Logic|volume=1|year=1936|pages=101–102|doi=10.2307/2269030|issue=3|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. | |||
* {{cite book| last = Daffa'| first = Ali Abdullah al-| title = The Muslim contribution to mathematics| year = 1977| publisher = Croom Helm| location = London| isbn = 978-0-85664-464-1 }} | |||
* {{cite book| last = Davis| first = Martin| author-link = Martin Davis (mathematician)| title = The Undecidable: Basic Papers On Undecidable Propositions, Unsolvable Problems and Computable Functions| url = https://archive.org/details/undecidablebasic0000davi| url-access = registration| year = 1965| publisher = Raven Press| location = New York| isbn = 978-0-486-43228-1 }} Davis gives commentary before each article. Papers of ], ], ], ], ], and ] are included; those cited in the article are listed here by author's name. | |||
* {{cite book| last = Davis| first = Martin| author-link = Martin Davis (mathematician)| title = Engines of Logic: Mathematicians and the Origin of the Computer| year = 2000| publisher = W.W. Nortion| location = New York| isbn = 978-0-393-32229-3 }} Davis offers concise biographies of ], ], ], ], ], Gödel and Turing with ] as the show-stealing villain. Very brief bios of ], ], ], ], ], etc. | |||
* {{DADS|algorithm|algorithm}} | * {{DADS|algorithm|algorithm}} | ||
* {{cite journal|title= Evolution and moral diversity |author=Dean, Tim |journal=Baltic International Yearbook of Cognition, Logic and Communication|year=2012|volume=7|doi=10.4148/biyclc.v7i0.1775 |doi-access=free}} | |||
*{{cite book|last=Dennett|first=Daniel|authorlink=Daniel Dennett|title=Darwin's Dangerous Idea|publisher=Touchstone/Simon & Schuster|location=New York|year=1995}} | |||
* {{cite book| last = Dennett| first = Daniel| author-link = Daniel Dennett| title = Darwin's Dangerous Idea| pages = –36| year = 1995| publisher = Touchstone/Simon & Schuster| location = New York| isbn = 978-0-684-80290-9| url = https://archive.org/details/darwinsdangerous0000denn| url-access = registration}} | |||
*], , ACM Transactions on Computational Logic, Vol 1, no 1 (July 2000), pages 77–111. Includes bibliography of 33 sources. | |||
* {{cite book| last = Dilson| first = Jesse| title = The Abacus| edition = (1968, 1994)| year = 2007| publisher = St. Martin's Press, NY| isbn = 978-0-312-10409-2| url = https://archive.org/details/abacusworldsfirs0000dils}}, {{ISBN|0-312-10409-X}} | |||
*{{cite journal|last=Kleene C.|first=Stephen|authorlink=Stephen Kleene |title=General Recursive Functions of Natural Numbers|journal=Mathematische Annalen|volume=Band 112, Heft 5|pages=727-742|year=1936}} Presented to the American Mathematical Society, September 1935. Reprinted in ''The Undecidable'', p. 237ff. Kleene's definition of "general recursion" (known now as mu-recursion) 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). | |||
* ], , ACM Transactions on Computational Logic, Vol 1, no 1 (July 2000), pp. 77–111. Includes bibliography of 33 sources. | |||
*{{cite journal|last=Kleene C.|first=Stephen|authorlink=Stephen Kleene |title= Recursive Predicates and Quantifiers|journal=American Mathematical Society Transactions|volume= Volume 54, No. 1 |pages=41-73|year=1943}} 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 ]). | |||
* {{cite book| last = van Heijenoort| first = Jean| author-link = Jean van Heijenoort| title = From Frege to Gödel, A Source Book in Mathematical Logic, 1879–1931| edition = (1967)| year = 2001| publisher = Harvard University Press, Cambridge| isbn = 978-0-674-32449-7 }}, 3rd edition 1976, {{ISBN|0-674-32449-8}} (pbk.) | |||
*{{cite book|last=Kleene|first=Stephen C.|authorlink=Kleene|title=Introduction to Metamathematics|edition=Tenth Edition 1991|publisher=North-Holland Publishing Company|year=First Edition 1952}} Excellent — accessible, readable — reference source for mathematical "foundations". | |||
* {{cite book| last = Hodges| first = Andrew| author-link = Andrew Hodges| title = Alan Turing: The Enigma| year = 1983| publisher = ]| location = New York| isbn = 978-0-671-49207-6| title-link = Alan Turing: The Enigma}}, {{ISBN|0-671-49207-1}}. Cf. Chapter "The Spirit of Truth" for a history leading to, and a discussion of, his proof. | |||
*{{cite book|last=Knuth|first=Donald|authorlink=Donald Knuth|title=Fundamental Algorithms, Third Edition|publisher=Addison-Wesley|location=Reading, Massachusetts|year=1997|ISBN 0-201-89683-4}} | |||
* {{Cite journal|last=Kleene|first=Stephen C.|author-link=Stephen Kleene|title=General Recursive Functions of Natural Numbers|journal=Mathematische Annalen|volume=112|pages=727–742|url=http://gdz.sub.uni-goettingen.de/index.php?id=11&PPN=GDZPPN002278499&L=1|year=1936|doi=10.1007/BF01565439|issue=5|s2cid=120517999|access-date=September 30, 2013|archive-url=https://web.archive.org/web/20140903092121/http://gdz.sub.uni-goettingen.de/index.php?id=11&PPN=GDZPPN002278499&L=1|archive-date=September 3, 2014|url-status=dead}} Presented to the American Mathematical Society, September 1935. Reprinted in ''The Undecidable'', p. 237ff. Kleene's definition of "general recursion" (known now as mu-recursion) 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). | |||
* Kosovsky, N. K. ''Elements of Mathematical Logic and its Application to the theory of Subrecursive Algorithms'', LSU Publ., Leningrad, 1981 | |||
* {{Cite journal|last=Kleene|first=Stephen C.|author-link=Stephen Kleene |title= Recursive Predicates and Quantifiers|journal= Transactions of the American Mathematical Society|volume=53|pages=41–73|year=1943 |doi= 10.2307/1990131|issue=1|jstor=1990131|doi-access=free}} 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 ]). | |||
*{{cite journal|last=Kowalski|first=Robert|authorlink=Robert Kowalski|title=Algorithm=Logic+Control|journal=Communications of the ACM|volume=22|issue=7|pages=424–436|publisher= ACM Press|year=1979|id=ISSN 0001-0782|doi=10.1145/359131.359136}} | |||
* {{cite book| last = Kleene| first = Stephen C.| author-link = Kleene| title = Introduction to Metamathematics| edition = Tenth|year= 1991| orig-year = 1952| publisher = North-Holland Publishing Company| isbn = 978-0-7204-2103-3 }} | |||
*] (1954) ''Theory of algorithms''. Imprint Moscow, Academy of Sciences of the USSR, 1954 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. | |||
* {{cite book| last = Knuth| first = Donald| author-link = Donald Knuth| title = Fundamental Algorithms, Third Edition| year = 1997| publisher = Addison–Wesley| location = Reading, Massachusetts| isbn = 978-0-201-89683-1 }} | |||
*{{cite book|last=Minsky|first=Marvin|authorlink=Marvin Minsky|title=Computation: Finite and Infinite Machines|edition=First|publisher=Prentice-Hall, Englewood Cliffs, NJ|year=1967}} Minsky expands his "...idea of an algorithm — an effective procedure..." in chapter 5.1 ''Computability, Effective Procedues and Algorithms. Infinite machines." | |||
* {{Cite book|last=Knuth|first=Donald|author-link=Donald Knuth|title=Volume 2/Seminumerical Algorithms, The Art of Computer Programming First Edition|publisher=Addison–Wesley|location=Reading, Massachusetts|year=1969}} | |||
*{{cite journal|last=Post|first=Emil|authorlink=Emil Post|title=Finite Combinatory Processes, Formulation I|journal=The Journal of Symbolic Logic|volume=1|year=1936|pages=pp.103–105}} Reprinted in ''The Undecidable'', p. 289ff. Post defines a simple algorithmic-like 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 so-called ]. | |||
* Kosovsky, N.K. ''Elements of Mathematical Logic and its Application to the theory of Subrecursive Algorithms'', LSU Publ., Leningrad, 1981 | |||
*{{cite journal|last=Rosser|first=J.B.|authorlink=J.B. Rosser|title=An Informal Exposition of Proofs of Godel's Theorem and Church's Theorem|journal=Journal of Symbolic Logic|volume= 4 |year=1939}} 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'') | |||
* {{Cite journal|last=Kowalski|first=Robert|author-link=Robert Kowalski|title=Algorithm=Logic+Control|journal=]|volume=22|issue=7|pages=424–436|year=1979|doi=10.1145/359131.359136|s2cid=2509896|doi-access=free}} | |||
*{{cite book|last=Sipser|first=Michael|title=Introduction to the Theory of Computation|publisher=PWS Publishing Company|year=2006}} | |||
* ] (1954) ''Theory of algorithms''. Imprint Moscow, Academy of Sciences of the USSR, 1954 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. | |||
*{{cite book|last=Stone|first=Harold S.|title=Introduction to Computer Organization and Data Structures|edition=1972|publisher=McGraw-Hill, New York}} 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). | |||
* {{cite book| last = Minsky| first = Marvin| author-link = Marvin Minsky| title = Computation: Finite and Infinite Machines| url = https://archive.org/details/computationfinit0000mins| url-access = registration| edition = First| year = 1967| publisher = Prentice-Hall, Englewood Cliffs, NJ| isbn = 978-0-13-165449-5 }} Minsky expands his "...idea of an algorithm – an effective procedure..." in chapter 5.1 ''Computability, Effective Procedures and Algorithms. Infinite machines.'' | |||
*{{cite journal|last=Turing|first=Alan M.|authorlink=A. M. Turing|title=On Computable Numbers, With An Application to the Entscheidungsproblem|journal=Proceedings of the London Mathematical Society|volume= series 2, volume 42|pages= 230-265 |year=1936-7 }}. 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. | |||
* {{Cite journal|last=Post|first=Emil|author-link=Emil Post|title=Finite Combinatory Processes, Formulation I |journal=The Journal of Symbolic Logic |volume=1 |year=1936 |pages=103–105 |doi=10.2307/2269031 |issue=3 |jstor=2269031|s2cid=40284503 }} Reprinted in ''The Undecidable'', pp. 289ff. Post defines a simple algorithmic-like 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 so-called ]. | |||
*{{cite journal|last=Turing|first=Alan M.|authorlink=A. M. Turing|title=Systems of Logic Based on Ordinals|journal=Proceedings of the London Mathematical Society|volume= series 2, volume 45|pages=161-228|year=1939}} Reprinted in ''The Undecidable'', p. 155ff. Turing's paper that defined "the oracle" was his PhD thesis while at Princeton USA. | |||
* {{Cite book|last=Rogers|first=Hartley Jr.|title=Theory of Recursive Functions and Effective Computability|publisher=The MIT Press|year=1987|isbn=978-0-262-68052-3}} | |||
*] (2006), , Manual of Patent Examining Procedure (MPEP). Latest revision August 2006 | |||
* {{Cite journal|last=Rosser|first=J.B.|author-link=J. B. Rosser|title=An Informal Exposition of Proofs of Godel's Theorem and Church's Theorem|journal=Journal of Symbolic Logic|volume= 4 |issue=2|year=1939|doi=10.2307/2269059|pages=53–60|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'') | |||
=== Secondary references === | |||
* {{cite book |last=Santos-Lang |first=Christopher |editor1-first=Simon |editor1-last=van Rysewyk |editor2-first=Matthijs |editor2-last=Pontier |title=Machine Medical Ethics |volume=74 |publisher=Springer | location=Switzerland | pages=111–127 | chapter=Moral Ecology Approaches to Machine Ethics| chapter-url=http://grinfree.com/MoralEcology.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://grinfree.com/MoralEcology.pdf |archive-date=2022-10-09 |url-status=live | doi=10.1007/978-3-319-08108-3_8|series=Intelligent Systems, Control and Automation: Science and Engineering |date=2015 |isbn=978-3-319-08107-6 }} | |||
*{{cite book|last=Bolter|first=David J.|authorlink=Bolter|title=Turing's Man: Western Culture in the Computer Age|edition=(1984)|publisher=The University of North Carolina Press, Chapel Hill NC}}, ISBN 0-8078-4108-0 pbk. | |||
*{{ |
* {{Cite book|last=Scott|first=Michael L.|title=Programming Language Pragmatics |edition=3rd |publisher=Morgan Kaufmann Publishers/Elsevier|year=2009|isbn=978-0-12-374514-9}} | ||
* {{cite book| last = Sipser| first = Michael| title = Introduction to the Theory of Computation| year = 2006| publisher = PWS Publishing Company| isbn = 978-0-534-94728-6| url = https://archive.org/details/introductiontoth00sips}} | |||
*{{cite book|last=van Heijenoort|first=Jean|authorlink=van Heijenoort|title=From Frege to Gödel, A Source Book in Mathematical Logic, 1879–1931|edition=(1967)|publisher=Harvard University Press, Cambridge, MA}}, 3rd edition 1976, ISBN 0-674-32449-8 (pbk.) | |||
* {{cite book |last1=Sober |first1=Elliott |last2=Wilson |first2=David Sloan |year=1998 |title=Unto Others: The Evolution and Psychology of Unselfish Behavior |url=https://archive.org/details/untoothersevolut00sobe |url-access=registration |location=Cambridge |publisher=Harvard University Press|isbn=9780674930469 }} | |||
*{{cite book|last=Hodges|first=Andrew|authorlink=Hodges|title=Alan Turing: The Enigma|edition=(1983)|publisher=Simon and Schuster, New York}}, ISBN 0-671-49207-1. Cf Chapter "The Spirit of Truth" for a history leading to, and a discussion of, his proof. | |||
* {{Cite book|last=Stone|first=Harold S.|title=Introduction to Computer Organization and Data Structures|edition=1972|publisher=McGraw-Hill, New York|isbn=978-0-07-061726-1|year=1972}} 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). | |||
* {{cite book| last = Tausworthe| first = Robert C| title = Standardized Development of Computer Software Part 1 Methods| year = 1977| publisher = Prentice–Hall, Inc.| location = Englewood Cliffs NJ| isbn = 978-0-13-842195-3 }} | |||
* {{Cite journal|last=Turing|first=Alan M.|author-link=A. M. Turing|title=On Computable Numbers, With An Application to the Entscheidungsproblem|journal=]|series=Series 2|volume=42|pages= 230–265 |year=1936–37|doi=10.1112/plms/s2-42.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. | |||
* {{Cite journal|last=Turing|first=Alan M.|author-link=A. M. Turing|title=Systems of Logic Based on Ordinals|journal=Proceedings of the London Mathematical Society|volume=45|pages=161–228|year=1939|doi=10.1112/plms/s2-45.1.161|hdl=21.11116/0000-0001-91CE-3|hdl-access=free}} Reprinted in ''The Undecidable'', pp. 155ff. Turing's paper that defined "the oracle" was his PhD thesis while at Princeton. | |||
* ] (2006), , Manual of Patent Examining Procedure (MPEP). Latest revision August 2006 | |||
{{refend|30em}} | |||
* Zaslavsky, C. (1970). Mathematics of the Yoruba People and of Their Neighbors in Southern Nigeria. The Two-Year College Mathematics Journal, 1(2), 76–99. https://doi.org/10.2307/3027363 | |||
==Further reading== | |||
== External links == | |||
{{refbegin}} | |||
* {{cite book |last=Bellah |first=Robert Neelly |year=1985 |author-link=Robert N. Bellah |title=Habits of the Heart: Individualism and Commitment in American Life |location=Berkeley |isbn=978-0-520-25419-0 |publisher=University of California Press |url=https://books.google.com/books?id=XsUojihVZQcC }} | |||
* {{cite book |last=Berlinski |first=David |title=The Advent of the Algorithm: The 300-Year Journey from an Idea to the Computer |year=2001 |publisher=Harvest Books |isbn=978-0-15-601391-8 |url=https://archive.org/details/adventofalgorith0000berl }} | |||
* {{cite book |last=Chabert |first=Jean-Luc |title=A History of Algorithms: From the Pebble to the Microchip |year=1999 |publisher=Springer Verlag |isbn=978-3-540-63369-3}} | |||
* {{cite book |author1=Thomas H. Cormen |author2=Charles E. Leiserson |author3=Ronald L. Rivest |author4=Clifford Stein |title=Introduction To Algorithms |edition=3rd |year=2009 |publisher=MIT Press |isbn=978-0-262-03384-8}} | |||
* {{cite book |author=Harel, David |author2=Feldman, Yishai |title=Algorithmics: The Spirit of Computing |year=2004 |publisher=Addison-Wesley |isbn=978-0-321-11784-7}} | |||
* {{cite book |last1=Hertzke |first1=Allen D. |last2=McRorie |first2=Chris |year=1998 |editor1-last=Lawler |editor1-first=Peter Augustine |editor2-last=McConkey |editor2-first=Dale |chapter=The Concept of Moral Ecology |title=Community and Political Thought Today |location=Westport, CT |publisher=] }} | |||
* Jon Kleinberg, Éva Tardos(2006): ''Algorithm Design'', Pearson/Addison-Wesley, ISBN 978-0-32129535-4 | |||
* ] (2000). '' {{Webarchive|url=https://web.archive.org/web/20170701190647/http://www-cs-faculty.stanford.edu/~uno/aa.html |date=July 1, 2017 }}''. Stanford, California: Center for the Study of Language and Information. | |||
* Knuth, Donald E. (2010). '' {{Webarchive|url=https://web.archive.org/web/20170716225848/http://www-cs-faculty.stanford.edu/~uno/da.html |date=July 16, 2017 }}''. Stanford, California: Center for the Study of Language and Information. | |||
* {{Cite book |first1=Wendell |last1=Wallach |first2=Colin |last2=Allen |date=November 2008 |title=Moral Machines: Teaching Robots Right from Wrong |isbn=978-0-19-537404-9 |publisher=Oxford University Press |location=US }} | |||
* {{cite book |author=Bleakley, Chris |title=Poems that Solve Puzzles: The History and Science of Algorithms |year=2020 |publisher=Oxford University Press |isbn=978-0-19-885373-2 |url=https://books.google.com/books?id=3pr5DwAAQBAJ }} | |||
{{refend}} | |||
==External links== | |||
{{wiktionary}} | |||
{{wikibooks|Algorithms}} | |||
{{Wikiversity department}} | |||
{{Commons category|Algorithms}} | |||
* {{springer|title=Algorithm|id=p/a011780|mode=cs1}} | |||
* {{MathWorld | urlname=Algorithm | title=Algorithm}} | * {{MathWorld | urlname=Algorithm | title=Algorithm}} | ||
* – ] | |||
* | |||
; Algorithm repositories | |||
* {{dmoz|Computers/Algorithms/|Algorithms}} | |||
* – ] | |||
* – ] | |||
* {{Webarchive|url=https://web.archive.org/web/20151206222112/http://www-cs-staff.stanford.edu/%7Eknuth/sgb.html |date=December 6, 2015 }} – ] | |||
{{Industrial and applied mathematics}} | |||
] | |||
{{Algorithmic paradigms}} | |||
] | |||
{{Authority control}} | |||
] | |||
] | |||
] | |||
] | ] | ||
] | ] | ||
] | |||
{{Link FA|sr}} | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] | |||
] |
Latest revision as of 23:37, 12 January 2025
Sequence of operations for a task "Algorithms" redirects here. For the subfield of computer science, see Analysis of algorithms. For other uses, see Algorithm (disambiguation). "Algorythm" redirects here. For the album, see Beyond Creation.
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
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. 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 decision-making) and deduce valid inferences (referred to as automated reasoning).
In contrast, a heuristic is an approach to solving problems that do not have well-defined correct or optimal results. For example, although social media recommender systems are commonly called "algorithms", they actually rely on heuristics as there is no truly "correct" recommendation.
As an effective method, an algorithm can be expressed within a finite amount of space and time and in a well-defined formal language for calculating a function. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" 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.
Etymology
Around 825 AD, Persian scientist and polymath Muḥammad ibn Mūsā al-Khwārizmī wrote kitāb al-ḥisāb al-hindī ("Book of Indian computation") and kitab al-jam' wa'l-tafriq al-ḥisāb al-hindī ("Addition and subtraction in Indian arithmetic"). In the early 12th century, Latin translations of said al-Khwarizmi 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. Hereby, alghoarismi or algorismi is the Latinization of Al-Khwarizmi's name; the text starts with the phrase Dixit Algorismi, or "Thus spoke Al-Khwarizmi". Around 1230, the English word algorism is attested and then by Chaucer in 1391, English adopted the French term. In the 15th century, under the influence of the Greek word ἀριθμός (arithmos, "number"; cf. "arithmetic"), the Latin word was altered to algorithmus.
Definition
For a detailed presentation of the various points of view on the definition of "algorithm", see Algorithm characterizations.One informal definition is "a set of rules that precisely defines a sequence of operations", which would include all computer programs (including programs that do not perform numeric calculations), and any prescribed bureaucratic procedure or cook-book recipe. In general, a program is an algorithm only if it stops eventually—even though infinite loops may sometimes prove desirable. Boolos, Jeffrey & 1974, 1999 define an algorithm to be an explicit set of instructions for determining an output, that can be followed by a computing machine or a human who could only carry out specific elementary operations on symbols.
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 performing arithmetic or an insect looking for food), in an electrical circuit, or a mechanical device.
History
This section is missing information about 20th and 21st century development of computer algorithms. Please expand the section to include this information. Further details may exist on the talk page. (October 2023) |
Ancient algorithms
Step-by-step procedures for solving mathematical problems have been recorded since antiquity. This includes in Babylonian mathematics (around 2500 BC), Egyptian mathematics (around 1550 BC), Indian mathematics (around 800 BC and later), the Ifa Oracle (around 500 BC), Greek mathematics (around 240 BC), Chinese mathematics (around 200 BC and later), and Arabic mathematics (around 800 AD).
The earliest evidence of algorithms is found in ancient Mesopotamian mathematics. A Sumerian clay tablet found in Shuruppak near Baghdad and dated to c. 2500 BC describes the earliest division algorithm. During the Hammurabi dynasty c. 1800 – c. 1600 BC, Babylonian clay tablets described algorithms for computing formulas. 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.
Algorithms for arithmetic are also found in ancient Egyptian mathematics, dating back to the Rhind Mathematical Papyrus c. 1550 BC. 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, and the Euclidean algorithm, which was first described in Euclid's Elements (c. 300 BC).Examples of ancient Indian mathematics included the Shulba Sutras, the Kerala School, and the Brāhmasphuṭasiddhānta.
The first cryptographic algorithm for deciphering encrypted code was developed by Al-Kindi, a 9th-century Arab mathematician, in A Manuscript On Deciphering Cryptographic Messages. He gave the first description of cryptanalysis by frequency analysis, the earliest codebreaking algorithm.
Computers
Weight-driven clocks
Bolter credits the invention of the weight-driven clock as "the key invention ," specifically the verge escapement mechanism producing the tick and tock of a mechanical clock. "The accurate automatic machine" led immediately to "mechanical automata" in the 13th century and "computational machines"—the difference and analytical engines of Charles Babbage and Ada Lovelace in the mid-19th century. Lovelace designed the first algorithm intended for processing on a computer, Babbage's analytical engine, which is the first device considered a real Turing-complete computer instead of just a calculator. Although a full implementation of Babbage's second device was not realized for decades after her lifetime, Lovelace has been called "history's first programmer".
Electromechanical relay
Bell and Newell (1971) write that the Jacquard loom, a precursor to Hollerith cards (punch cards), and "telephone switching technologies" led to the development of the first computers. By the mid-19th century, the telegraph, the precursor of the telephone, was in use throughout the world. By the late 19th century, the ticker tape (c. 1870s) was in use, as were Hollerith cards (c. 1890). Then came the teleprinter (c. 1910) with its punched-paper use of Baudot code on tape.
Telephone-switching networks of electromechanical relays were invented in 1835. These led to the invention of the digital adding device by George Stibitz in 1937. While working 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".
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" or "effective method". 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, drakon-charts, 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, drakon-charts, and control tables are structured expressions of algorithms that avoid common ambiguities of natural language. Programming languages are primarily for expressing algorithms in a computer-executable form, but are also used to define or document algorithms.
Turing machines
There are many possible representations and Turing machine programs can be expressed as a sequence of machine tables (see finite-state machine, state-transition table, and control table for more), as flowcharts and drakon-charts (see state diagram for more), as a form of rudimentary machine code or assembly code called "sets of quadruples", and more. Algorithm representations can also be classified into three accepted levels of Turing machine description: high-level description, implementation description, and formal description. A high-level description describes qualities of the algorithm itself, ignoring how it is implemented on the Turing machine. 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 does not give exact states. In the most detail, a formal description gives the exact state table and list of transitions of the Turing machine.
Flowchart representation
The graphical aid called a flowchart offers a way to describe and document an algorithm (and a computer program corresponding to it). It has four primary symbols: arrows showing program flow, rectangles (SEQUENCE, GOTO), diamonds (IF-THEN-ELSE), and dots (OR-tie). Sub-structures can "nest" in rectangles, but only if a single exit occurs from the superstructure.
Algorithmic analysis
Main article: Analysis of algorithmsIt is often important to know how much time, storage, or other cost an algorithm may require. 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. The algorithm only needs to remember two values: the sum of all the elements so far, and its current position in the input list. If the space required to store the input numbers is not counted, it has a space requirement of , otherwise is required.
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
Main articles: Empirical algorithmics, Profiling (computer programming), and Program optimizationThe analysis, and study of algorithms is a discipline of computer science. Algorithms are often studied abstractly, without referencing any specific programming language or implementation. Algorithm analysis resembles other mathematical disciplines as it focuses on the algorithm's properties, not implementation. Pseudocode is typical for analysis as it is a simple and general representation. Most algorithms are implemented on particular hardware/software platforms and their algorithmic efficiency is tested using real code. The efficiency of a particular algorithm may be insignificant for many "one-off" problems but it may be critical for algorithms designed for fast interactive, commercial or long life scientific usage. Scaling from small n to large n frequently exposes inefficient algorithms that are otherwise benign.
Empirical testing is useful for uncovering 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 non-trivial to perform fairly.
Execution efficiency
Main article: Algorithmic efficiencyTo illustrate the potential improvements possible even in well-established 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. In general, speed improvements depend on special properties of the problem, which are very common in practical applications. 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
See also: Algorithm § By design paradigmAlgorithm design is a method or mathematical process for problem-solving and engineering algorithms. The design of algorithms is part of many solution theories, such as divide-and-conquer or dynamic programming within operation research. Techniques for designing and implementing algorithm designs are also called algorithm design patterns, with examples including the template method pattern and the decorator pattern. One of the most important aspects of algorithm design is resource (run-time, memory usage) efficiency; the big O notation is used to describe e.g., an algorithm's run-time growth as the size of its input increases.
Structured programming
Per the Church–Turing thesis, any algorithm can be computed by any Turing complete model. Turing completeness only requires four instruction types—conditional GOTO, unconditional GOTO, assignment, HALT. However, Kemeny and Kurtz observe that, while "undisciplined" use of unconditional GOTOs and conditional IF-THEN 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". Tausworthe augments the three Böhm-Jacopini canonical structures: SEQUENCE, IF-THEN-ELSE, and WHILE-DO, with two more: DO-WHILE and CASE. An additional benefit of a structured program is that it lends itself to proofs of correctness using mathematical induction.
Legal status
See also: Software patentBy themselves, algorithms 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, 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
By implementation
- Recursion
- A recursive algorithm invokes itself repeatedly until meeting a termination condition, and is a common functional programming method. Iterative algorithms use repetitions such as loops or data structures like stacks to solve problems. Problems may be suited for one implementation or the other. The Tower of Hanoi is a puzzle commonly solved 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 on serial computers. Serial algorithms are designed for these environments, unlike parallel or distributed algorithms. Parallel algorithms take advantage of computer architectures where multiple processors can work on a problem at the same time. Distributed algorithms use multiple machines connected via a computer network. Parallel and distributed algorithms divide the problem into subproblems and collect the results back together. Resource consumption in these 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 non-deterministic
- Deterministic algorithms solve the problem with exact decision at every step; whereas non-deterministic algorithms solve problems via guessing. Guesses are typically 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 close to the true solution. Such algorithms have practical value for many hard problems. For example, the Knapsack problem, where there is a set of items and the 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.
- 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. Some common paradigms are:
- Brute-force or exhaustive search
- Brute force is a problem-solving method of systematically trying every possible option until the optimal solution is found. This approach can be very time-consuming, testing every possible combination of variables. It is often used when other methods are unavailable or too complex. Brute force can solve a variety of problems, including finding the shortest path between two points and cracking passwords.
- Divide and conquer
- A divide-and-conquer algorithm repeatedly reduces a problem to one or more smaller instances of itself (usually recursively) until the instances are small enough to solve easily. Merge sorting is an example of divide and conquer, where an unordered list can be divided into segments containing one item and sorting of entire list can be obtained by merging the segments. A simpler variant of divide and conquer is called a decrease-and-conquer algorithm, which solves one smaller instance of itself, and uses the solution 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 modelled 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 pseudo-randomly). They find approximate solutions when finding exact solutions may be impractical (see heuristic method below). For some problems the fastest approximations must involve some randomness. 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 high probability. 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 transforms difficult problems into better-known problems solvable with (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 finds the median of an unsorted list by first sorting the list (the expensive portion), 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 by linear equality and inequality constraints, the constraints can be used directly to produce optimal solutions. There are algorithms that can solve any problem in this category, such as the popular simplex algorithm. Problems that can be solved with linear programming include the maximum flow problem for directed graphs. If a problem also requires that any of the unknowns be integers, 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 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. For example, Floyd–Warshall algorithm, the shortest path between a start and goal vertex in a weighted graph can be found using the shortest path to the goal from all adjacent vertices. Dynamic programming and memoization go together. Unlike divide and conquer, dynamic programming subproblems often overlap. The difference between dynamic programming and simple recursion is the caching or memoization of recursive calls. When subproblems are independent and do not repeat, memoization does not help; hence dynamic programming is not applicable to all complex problems. Using memoization dynamic programming reduces the complexity of many problems from exponential to polynomial.
- The greedy method
- Greedy algorithms, similarly to a dynamic programming, work by examining substructures, in this case not of the problem but of a given solution. Such algorithms start with some solution and improve it by making small modifications. For some problems they always find the optimal solution but for others they may stop at local optima. The most popular use of greedy algorithms is finding minimal spanning trees of graphs without negative cycles. Huffman Tree, Kruskal, Prim, Sollin are greedy algorithms that can solve this optimization problem.
- The heuristic method
- In optimization problems, heuristic algorithms find solutions close to the optimal solution when finding the optimal solution is impractical. These algorithms get 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. They can ideally find a solution very close to the optimal solution in a relatively short time. These algorithms include local search, tabu search, simulated annealing, and genetic algorithms. Some, like simulated annealing, are non-deterministic algorithms while others, like tabu search, are deterministic. When a bound on the error of the non-optimal solution is known, the algorithm is further categorized as an approximation algorithm.
Examples
Further information: List of algorithmsOne of the simplest algorithms finds 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 described in plain English as:
High-level description:
- If a set of numbers is empty, then there is no highest number.
- Assume the first number in the set is the largest.
- For each remaining number in the set: if this number is greater than the current largest, it becomes the new largest.
- When there are no unchecked numbers left in the set, consider the current largest number to be the largest in the set.
(Quasi-)formal description: Written in prose but much closer to the high-level 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 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
- Computational mathematics
- Garbage in, garbage out
- Introduction to Algorithms (textbook)
- Government by algorithm
- List of algorithms
- List of algorithm general topics
- Medium is the message
- Regulation of algorithms
- Theory of computation
Notes
- ^ "Definition of ALGORITHM". Merriam-Webster Online Dictionary. Archived from the original on February 14, 2020. Retrieved November 14, 2019.
- ^ David A. Grossman, Ophir Frieder, Information Retrieval: Algorithms and Heuristics, 2nd edition, 2004, ISBN 1402030045
- ^ "Any classical mathematical algorithm, for example, can be described in a finite number of English words" (Rogers 1987:2).
- ^ Well defined concerning 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 (concerning 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 analog devices ... carried forward deterministically, without resort to random methods or devices, e.g., dice" (Rogers 1987:2).
- Blair, Ann, Duguid, Paul, Goeing, Anja-Silvia and Grafton, Anthony. Information: A Historical Companion, Princeton: Princeton University Press, 2021. p. 247
- 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
- ^ Chabert, Jean-Luc (2012). A History of Algorithms: From the Pebble to the Microchip. Springer Science & Business Media. pp. 7–8. ISBN 9783642181924.
- ^ 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 978-93-86279-25-5.
- Hayashi, T. (2023, January 1). Brahmagupta. Encyclopedia Britannica.
- Zaslavsky, Claudia (1970). "Mathematics of the Yoruba People and of Their Neighbors in Southern Nigeria". The Two-Year College Mathematics Journal. 1 (2): 76–99. doi:10.2307/3027363. ISSN 0049-4925. JSTOR 3027363.
- ^ Cooke, Roger L. (2005). The History of Mathematics: A Brief Course. John Wiley & Sons. ISBN 978-1-118-46029-0.
- Chabert, Jean-Luc, ed. (1999). "A History of Algorithms". SpringerLink. doi:10.1007/978-3-642-18192-4. ISBN 978-3-540-63369-3.
- ^ 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 0001-0782. 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 978-0-387-95136-2.
- 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
- ^ Sipser 2006:157
- Kriegel, Hans-Peter; Schubert, Erich; Zimek, Arthur (2016). "The (black) art of run-time evaluation: Are we comparing algorithms or implementations?". Knowledge and Information Systems. 52 (2): 341–378. doi:10.1007/s10115-016-1004-2. ISSN 0219-1377. 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, "ACM-SIAM 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 978-0-471-38365-9. Archived from the original on April 28, 2015. Retrieved June 14, 2018.
- "Big-O 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, Addison-Wesley Publishing Company, Inc. Reading, MA, ISBN 0-201-13433-0.
- 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 0099-9660. Retrieved March 29, 2017.
- Kellerer, Hans; Pferschy, Ulrich; Pisinger, David (2004). Knapsack Problems | Hans Kellerer | Springer. Springer. doi:10.1007/978-3-540-24777-7. ISBN 978-3-540-40286-2. 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 Polynomial-time 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. Springer-Verlag.
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 0-07-004357-4.
- 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 978-0-8078-1564-9., ISBN 0-8078-4108-0
- Boolos, George; Jeffrey, Richard (1999) . Computability and Logic (4th ed.). Cambridge University Press, London. ISBN 978-0-521-20402-6.: cf. Chapter 3 Turing machines where they discuss "certain enumerable sets not effectively (mechanically) enumerable".
- Burgin, Mark (2004). Super-Recursive Algorithms. Springer. ISBN 978-0-387-95569-8.
- 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". 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 978-0-85664-464-1.
- Davis, Martin (1965). The Undecidable: Basic Papers On Undecidable Propositions, Unsolvable Problems and Computable Functions. New York: Raven Press. ISBN 978-0-486-43228-1. 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 978-0-393-32229-3. Davis offers concise biographies of Leibniz, Boole, Frege, Cantor, Hilbert, Gödel and Turing with von Neumann as the show-stealing villain. Very brief bios of Joseph-Marie 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 978-0-684-80290-9.
- Dilson, Jesse (2007). The Abacus ((1968, 1994) ed.). St. Martin's Press, NY. ISBN 978-0-312-10409-2., ISBN 0-312-10409-X
- 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 978-0-674-32449-7., 3rd edition 1976, ISBN 0-674-32449-8 (pbk.)
- Hodges, Andrew (1983). Alan Turing: The Enigma. New York: Simon and Schuster. ISBN 978-0-671-49207-6., ISBN 0-671-49207-1. 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 mu-recursion) 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) . Introduction to Metamathematics (Tenth ed.). North-Holland Publishing Company. ISBN 978-0-7204-2103-3.
- Knuth, Donald (1997). Fundamental Algorithms, Third Edition. Reading, Massachusetts: Addison–Wesley. ISBN 978-0-201-89683-1.
- 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. Imprint Moscow, Academy of Sciences of the USSR, 1954 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.
- Minsky, Marvin (1967). Computation: Finite and Infinite Machines (First ed.). Prentice-Hall, Englewood Cliffs, NJ. ISBN 978-0-13-165449-5. 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 algorithmic-like 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 so-called Church–Turing thesis.
- Rogers, Hartley Jr. (1987). Theory of Recursive Functions and Effective Computability. The MIT Press. ISBN 978-0-262-68052-3.
- 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)
- Santos-Lang, 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/978-3-319-08108-3_8. ISBN 978-3-319-08107-6. Archived (PDF) from the original on October 9, 2022.
- Scott, Michael L. (2009). Programming Language Pragmatics (3rd ed.). Morgan Kaufmann Publishers/Elsevier. ISBN 978-0-12-374514-9.
- Sipser, Michael (2006). Introduction to the Theory of Computation. PWS Publishing Company. ISBN 978-0-534-94728-6.
- 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.). McGraw-Hill, New York. ISBN 978-0-07-061726-1. 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 978-0-13-842195-3.
- 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/s2-42.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/s2-45.1.161. hdl:21.11116/0000-0001-91CE-3. 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 Two-Year 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 978-0-520-25419-0.
- Berlinski, David (2001). The Advent of the Algorithm: The 300-Year Journey from an Idea to the Computer. Harvest Books. ISBN 978-0-15-601391-8.
- Chabert, Jean-Luc (1999). A History of Algorithms: From the Pebble to the Microchip. Springer Verlag. ISBN 978-3-540-63369-3.
- Thomas H. Cormen; Charles E. Leiserson; Ronald L. Rivest; Clifford Stein (2009). Introduction To Algorithms (3rd ed.). MIT Press. ISBN 978-0-262-03384-8.
- Harel, David; Feldman, Yishai (2004). Algorithmics: The Spirit of Computing. Addison-Wesley. ISBN 978-0-321-11784-7.
- 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.
- Jon Kleinberg, Éva Tardos(2006): Algorithm Design, Pearson/Addison-Wesley, ISBN 978-0-32129535-4
- 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 978-0-19-537404-9.
- Bleakley, Chris (2020). Poems that Solve Puzzles: The History and Science of Algorithms. Oxford University Press. ISBN 978-0-19-885373-2.
External links
- "Algorithm". Encyclopedia of Mathematics. EMS Press. 2001 .
- 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
Data structures and algorithms | |
---|---|
Data structures | |
Algorithms and algorithmic paradigms | |