An algorithm is a set of very specific instructions.
How to bake a cake, find the sum of two plus two, or even run a country according to the U.S. Constitution are all examples of algorithms. Why? Because, according to Domingos, the definition of an algorithm is “a sequence of instructions.” That’s it!
Today, an algorithm usually refers to “a sequence of instructions that tells a computer what to do.” A computer program is an algorithm, written in a computer programming language, that a computer can understand and execute.
Algorithms are written for computers also have to be extremely precise, often using the instructions “if,” “then,” and “else.” For example, a self-driving car might run on an algorithm for navigating that says “IF the directions say turn left, THEN turn left.” See how specific you have to be to make a computer follow a seemingly simple set of instructions?
In the popular imagination, [removed] have come to dominate our idea of what an algorithm is. That is, when many people think about or refer to algorithms, they’re referencing something like what TV show Netflix thinks you might like, or which international travelers [removed] . While these are extremely complicated algorithms, at their hearts, they’re still just a set of instructions a computer follows to complete a specified task.
“With computers, the algorithm can get vastly more complex,” Domingos said. “Addition is an algorithm that's defined in a few lines of text. Computers can have algorithms that take millions of lines to define.”
Today, you can find algorithms everywhere.
What is your experience with algorithms?
A step-by-step solution. Each step has clear instructions. Like a recipe.
For example, one algorithm for adding two-digit numbers is:
1. add the tens
2. add the ones
3. add the numbers from steps 1 and 2
So to add 15 and 32 using that algorithm:
1. add 10 and 30 to get 40
2. add 5 and 2 to get 7
3. add 40 and 7 to get 47
Long Division is another example of an algorithm: when you follow the steps you get the answer.
Computers use algorithms all the time."Algorithm" is named after the 9th-century Persian mathematician Al-Khwarizmi.