Algorithm: Difference between revisions

Content deleted Content added
Reverted 1 edit by YDaantje1234 (talk): Redundant / unsourced
Undid revision 1298501550 by 2.196.141.187 (talk) Editor seems to have misunderstood what ticker tape is
 
(8 intermediate revisions by 8 users not shown)
Line 40:
 
=== Ancient algorithms ===
Step-by-step procedures for solving mathematical problems have been recorded since antiquity. This includes in [[Babylonian mathematics]] (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> [[Egyptian mathematics]] (around 1550 BC),<ref name="Springer Science & Business Media" /> [[Indian mathematics]] (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). [https://www.britannica.com/biography/Brahmagupta Brahmagupta]. 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|url-access=subscription }}</ref> [[Greek mathematics]] (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> [[Chinese mathematics|Chinese mathematics (around 200 BC and later)]],<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 |url-access=subscription }}</ref> and [[Arabic mathematics]] (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>
 
The earliest evidence of algorithms is found in ancient [[Mesopotamia]]n mathematics. A [[Sumer]]ian clay tablet found in [[Shuruppak]] near [[Baghdad]] and dated to {{Circa|2500 BC}} describes the earliest [[division algorithm]].<ref name="Springer Science & Business Media" /> During the [[First Babylonian dynasty|Hammurabi dynasty]] {{Circa|1800|1600 BC|lk=no}}, [[Babylonia]]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 astronomy]]. 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>
Line 92:
To illustrate the potential improvements possible even in well-established algorithms, a recent significant innovation, relating to [[Fast Fourier transform|FFT]] 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, [[Piotr Indyk]], Dina Katabi, and Eric Price, "[http://siam.omnibooksonline.com/2012SODA/data/papers/500.pdf ACM-SIAM Symposium On Discrete Algorithms (SODA)] {{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 [http://groups.csail.mit.edu/netmit/sFFT/ sFFT Web Page] {{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.
 
==== Best Case and Worst Case ====
{{Main|Best, worst and average case}}
The best case of an algorithm refers to the scenario or input for which the algorithm or data structure takes the least time and resources to complete its tasks.<ref>{{Cite web |title=Best Case |url=https://xlinux.nist.gov/dads/HTML/bestcase.html |access-date=29 May 2025 |website=Dictionary of Algorithms and Data Structures |publisher=National Institute of Standards and Technology (NIST) |agency=National Institute of Standards and Technology}}</ref> The worst case of an algorithm is the case that causes the algorithm or data structure to consume the maximum period of time and computational resources.<ref>{{Cite web |title=worst case |url=https://xlinux.nist.gov/dads/HTML/worstcase.html |access-date=29 May 2025 |website=Dictionary of Algorithms and Data Structures |publisher=National Institute of Standards and Technology (NIST) |agency=National Institute of Standards and Technology (NIST)}}</ref>
 
Line 284 ⟶ 285:
{{wikibooks|Algorithms}}
{{Wikiversity department}}
{{Commons category|Algorithms}}
* {{springer|title=Algorithm|id=p/a011780|mode=cs1}}
* {{MathWorld | urlname=Algorithm | title=Algorithm}}