Algorithm: Difference between revisions

Content deleted Content added
merge to Example
No edit summary
Line 1:
{{Use mdy dates|date=June 2013}}
 
[[Image:Euclid flowchart 1.png|thumb|lright| [[Flow chart]] of1of an algorithm ([[Euclid's algorithm]]) for calculating the greatest common divisor (g.c.d.) of two numbers ''a'' and ''b'' in locations named A and B. The algorithm proceeds by successive subtractions in two loops: IF the test B ≥ A yields "yes" (or true) (more accurately the ''number'' ''b'' in ___location B is greater than or equal to the ''number'' ''a'' in ___location A) THEN, the algorithm specifies B ← B − A (meaning the number ''b'' − ''a'' replaces the old ''b''). Similarly, IF A > B, THEN A ← A − B. The process terminates when (the contents of) B is 0, yielding the g.c.d. in A. (Algorithm derived from Scott 2009:13; symbols and drawing style from Tausworthe 1977).]]
 
In [[mathematics]] and [[computer science]], an '''algorithm''' ({{IPAc-en|audio=en-us-algorithm.ogg|ˈ|æ|l|ɡ|ə|r|ɪ|ð|əm}} {{respell|AL|gə-ri-dhəm}}) is a step-by-step procedure for calculations. Algorithms are used for [[calculation]], [[data processing]], and [[automated reasoning]].