Skip to content
Tactiverge

Learning Rooms/◇ Level 1 · Explorer/Computing and algorithms

What's an algorithm? - David J. Malan

TED-Ed · Length: see YouTube · captions on YouTube · nothing loads until you press play

By the end you can…

  • Define an algorithm as an exact, ordered, finite list of steps.
  • Explain why machines need far more precise instructions than people.
  • Write a short algorithm that a literal robot can follow.
?Predict▶Watch✓Practise⚙Build

Watch it all: no segment has been checked by hand for this video yet.

1.Predict before you press play

You tell a robot: 'Go to the flag.' The robot only understands Forward 1, Turn left and Turn right. What does it do?

Pick one before you press play. A wrong guess is fine: it is what makes the video stick.

2.See the idea first

Play with this diagram for a minute. It gives you something to hang the video on.

Loading the interactive…

Can't use the diagram? Read a description instead

The grid robot can be replaced by this description: a 6-by-6 grid, robot at the bottom-left square (0, 0) facing north, flag at (4, 4), walls at (1, 1), (2, 1), (3, 1), (3, 3) and (2, 4). One safe program is: Forward, Forward, Turn right, Forward, Forward, Forward, Forward, Turn left, Forward, Forward (10 instructions).

3.Watch, actively

Counting a room full of people two at a time shows how a clever, exact procedure beats a slow one.

Length: see YouTube · captions on YouTube · source

Nothing loads from YouTube until you press play.

Watch for…

  • → Notice how each step is exact enough that anyone, or anything, would get the same answer by following it.
  • → Notice how each step of the counting method is exact enough for anyone to repeat, and how a cleverer algorithm does the same job in far fewer steps.

Pause whenever you like. Rewatching a hard minute is a good habit, not a failure.

Can't stream it? Read the idea instead

An algorithm is a list of steps exact enough that anyone, or any machine, following it gets the same answer. Two algorithms can solve the same problem with very different amounts of work: counting people in pairs takes about half the steps of counting one at a time.

What the video covers (our own note, written when we verified it): Counting a room full of people two at a time shows how a clever, exact procedure beats a slow one.

Written by Tactiverge in our own words, not a transcript. The full lessons below explain the idea without the video.

Jot down one thing that surprised you and one question you still have.

Private: saved only on this device, never sent to Tactiverge.

4.Practise what you just saw

These come from the lessons that use this video and are checked on the server. Wrong answers get a hint and another try.

Practice 1

Which of these is NOT a good algorithm for a robot?

Practice 2

Why do engineers decompose a big job before coding it?

Practice 3

'Step 1: Forward 1. Step 2: go back to step 1.' What is wrong with this as an algorithm?

Practice 4

A step says 'Open the valve until moisture reaches 45 %'. What is the safest improvement?

5.Try it yourself

No simulation models this idea yet. The lessons below have an interactive diagram instead.

6.Build something with it

Follow-up project

Write an algorithm a robot could follow to tidy three books onto a shelf, using only these steps: move to (place), pick up, put down, turn. Swap with a friend and act it out exactly as written. Where did they have to guess?

Where this video lives

In the course catalogue: CSE-101 Algorithms without code · CSE-210 Python for engineers

The video is by TED-Ed, embedded from YouTube with privacy-enhanced mode and never autoplayed. The room around it (prompts, notes, practice, projects) is Tactiverge's, written with AI assistance and checked by automated tests only.