What is an algorithm?
Computer Science · Key Stage 1 · The School
A precise plan
An algorithm is a set of steps for doing something. The steps must be exact. The steps must be in the right order. Follow the same algorithm twice and you get the same result both times. That is what makes it an algorithm and not just a rough idea.
Algorithms without computers
A recipe is an algorithm. It has exact steps, in order, for making a cake. Tying your shoelaces is an algorithm too. So is a knitting pattern. None of these need a computer at all. Algorithms are older than computers by thousands of years.
Turning an algorithm into a program
A PROGRAM is an algorithm written in a way a computer can follow. The algorithm for adding two numbers stays the same. But it gets written differently for a computer than it would be explained to a person. The steps are identical. Only the words change.
The shoelace algorithm, written down
Write the steps to tie a shoelace. One: cross the laces. Two: tuck one under and pull. Three: make a loop with one lace. Four: wrap the other lace around it. Five: push it through the gap and pull tight. Miss out step three and nothing works. That is the algorithm for tying a shoelace, and it works the same way every single time.
Spotting algorithms around you
Look for algorithms all day. Brushing your teeth is one. A board game's rules are one. A dance routine is one. Once you know the word, you notice algorithms everywhere, not just on a screen. Try spotting three more algorithms today.