2.6 Algorithmically speaking
We often use the word “algorithm” generically to mean “something a computer does.” Quantitative analysts employ financial market algorithms to calculate the exact moment and price to sell a stock or bond. They are used in artificial intelligence to find patterns in data to understand natural language, construct responses in human conversation, find manufacturing anomalies, detect financial fraud, and even create new spice mixtures for cooking.
Informally, an algorithm is a recipe. Like a food recipe, an algorithm states what inputs you need (water, flour, butter, eggs, etc.), the expected outcome (for example, bread), the sequence of steps you take, the subprocesses you should use (stir, knead, bake, cool), and what to do when a choice presents itself (“if the dough is too wet, add more flour”).
We call each step an operation and give it a name as above: “stir,” “bake,&...