What is an algorithm?


by Miriam Tocino

what is an algorithm

You, humans, use code to tell us, computers, what to do.

That's how you 'talk' to computers, but here's something to remember before writing any code for us. First of all, you need a plan for it, also known as an algorithm.

An algorithm is a list of rules or steps to follow when you're solving a problem.

There are usually different ways to solve the same problem. But, some of them are better than others.

We especially like it when humans make their algorithms as simple as possible. That makes our work easier, and we can also complete tasks faster.

what is an algorithm

Brainstorming ideas for your algorithms is always worth it. With a simple plan, following the steps will be no brainer!

How do you use algorithms in your daily life?

Here's the secret about algorithms, human. They're already a big part of your day! Let's look at one example together in the kitchen.

A recipe is an algorithm because it tells you what to do, step by step. It takes 'inputs' (ingredients) and produces an 'output' (the completed dish).

There may be many recipes to make a particular dish. But even when they look different, the dish ends up tasting the same when it's done.

Some recipes will be better than others.

Imagine that for one of them, you need ingredients that are hard to find in your supermarket. That would make things complicated...

You like your recipes to be simple, and that's how computers like your algorithms to be!

History time

what is an algorithm

This 175 year-old book contains the world's first computer algorithm by Ada Lovelace. She was a mathematician and daughter of Lord Byron.

In the book, Lovelace describes an algorithm for the Analytical Engine to compute Bernoulli numbers. It's considered the first published algorithm written for a computer.

Ada Lovelace was the first programmer in the history of computers!

Exploration time

In this video, you'll be playing some algorithms' games. Get ready and look at home for:

  • An egg board
  • Some of your smallest toys
  • 6 color cups

You'll also need a set of cards with instructions.
Download here your set of cards »

Let's get playing! 

Algorithms' Games

  • 1:35 Game 1: Design an algorithm to bring the girl to the cat.
  • 4:50 Game 2: Follow an algorithm to build a tower of cups.
Watch this video in SPANISH »

    Horray-bits, you just learned what an algorithm is, how to design your own algorithm and how to follow one!

    Remember, understanding computers is a SUPERPOWER.
    So, keep on learning!

    Lots of Megas from the Binary World, 👋
    Zerus & Ona

    PS. Keep on learning with what a computer bug is, what a bottleneck is, and some binary magic.

    Notes

    Materials

    Resources

    • Words and pictures by Miriam Tocino
    • Video by Elena Escudier
    • Photo Credits: Moore, Allen & Innocent

    Behind-the-scenes