An algorithm is a computational procedure. It takes some input(s) and produces some output(s).
```mermaid
flowchart LR
A["input(s)"] --> B{algorithm}-->C["output(s)"]
```
Algorithms have been around as long as we know. Babylonian tablets recorded algorithms for mathematical procedures, often ending with the phrase "this is the procedure" [^1]. The word "algorithm" is derived from the latinized name of Abū Ja‘far Muhammad ibn Mūsa al-Khowarizmi (this latter part, which was latinized as al-Gorithmi), a ninth-century Persian mathematician, but wasn't used widely in English until the nineteenth century [^2].
Historically, mathematicians did not consider their algorithms to be as important as the theorems or proofs that resulted, and so they did not publish them. With the advent of the modern computer, we now recognize the importance of algorithms. Algorithms can be thought of as a form of technology--advancements in algorithmic design help drive advancements in what we can accomplish with computing.
[[Don Knuth]] started a project in the 1970s to collect common algorithms in his book [[The Art of Computer Programming]] and has published six volumes since. It is considered the "bible" of computer programming by computer scientists.
The textbook [[Introduction to Algorithms]] by Cormen, Leiserson, Rivest and Stein, commonly referred to as CLRS, is the classic text for learning algorithms and a useful reference for looking up algorithms as needed.
The first step in developing or identifying an algorithm for a computation problem is to specify the problem well. If the problem can be specified in a general way that has been solved by existing algorithms, the most computationally efficient algorithm can be found in a reference. For example, sorting problems are a common type of problem with many efficient algorithms available. Your instance of the sorting problem may be solved by selecting one of these algorithms that is best suited to your requirements.
With modern multicore computers, an added challenge is to design algorithms that can be run in parallel.
Online algorithms are a class of algorithms that receive input over time, and so must make some decisions under uncertainty.
Alan Turing, in the 1930s, came up with the [[model of computation]]. The [[Church-Turing thesis]] states that any computer that can be built is as powerful as a [[Turing Machine]].
> [!Tip]- Additional Resources
> - [Grokking Algorithms](https://www.manning.com/books/grokking-algorithms) by Aditya Y. Bhargava
> - [Algorithms](https://jeffe.cs.illinois.edu/teaching/algorithms/) by Jeff Erickson
[^1]: [[The Information]]
[^2]: [How did we get here? The story of algorithms.](https://towardsdatascience.com/how-did-we-get-here-the-story-of-algorithms-9ee186ba2a07)