OER.ai

← Sorting Networks (CS Unplugged)

Kindergarten–Grade 1 reading level

Sorting Networks (CS Unplugged)

Adapted with AI from the original open resource by CS Unplugged. Nothing is invented — only the reading level changes.

Beat the Clock—Sorting Networks

What Is This About?

Computers are fast.
But even fast computers have limits.
One way to go faster is fun.
Use many computers at once!
Each one does a little bit of the work.

In this game, we sort numbers.
We use something called a sorting network.
It helps put numbers in order fast.

What You Need

This is an outside game.
You need:

  • Chalk
  • Two sets of six cards
  • A stopwatch

Get Ready

Use chalk to draw lines on the ground.
Make the sorting network shape.
Draw circles where paths meet.

How to Play

This game shows how computers put numbers in order.

  1. Get into groups of six.

Only one group plays at a time.

  1. Each person gets a number card.
  1. Stand in a square.

Stand on the left side.
This is the IN side.
Your numbers should be all mixed up.

  1. Walk along the lines.

When you reach a circle, stop.
Wait for another player.

  1. When someone else comes to your circle, compare cards.

Who has the smaller number?
That person goes left.
Who has the bigger number?
That person goes right.

  1. Now walk to the other end.

Are all the numbers in order now?

If you make a mistake, start over.
Remember: small number goes left.
Big number goes right.

Try This Too

  1. Time your team with a stopwatch.

How fast can you finish?

  1. Try bigger numbers.

Big numbers take more time to compare.

  1. Try really big numbers.

Or try words instead of numbers!
Put the words in ABC order.

Think About It

What if we switched the sides?
Small numbers go right.
Big numbers go left.
Now the numbers come out backwards!

What if we ran the network backwards?
Sometimes it does not work right.
Can you find an example where it fails?

Can you make new networks?
Try making a small network.
It could sort just three numbers.

Which network is faster?
Some networks do things one at a time.
This is called serial — one after another.
Some networks do things at the same time.
This is called parallel — many things together.
Parallel networks are usually faster!

Can you make a bigger network?
Try it and see!

Can a network find the smallest number?
Yes! Some networks are built just for that.
They take many numbers.
Only the smallest one comes out.

Think about everyday jobs.
Some jobs go faster with more helpers.
Cooking a meal is one example.
More cooks means more food cooks at once!

But some jobs don't work that way.
What jobs can many people help with?
What jobs can only one person do at a time?

Why Does This Matter?

We want computers to work fast.
One way is to write shorter programs.
Another way is teamwork!

Many computers can work together.
Each one solves a small piece.
They all work at the same time.

In our six-number network:
There are 12 comparisons to make.
But some happen at the same time!
So it only takes 5 steps, not 12.
That means it's more than twice as fast!

But not every job gets faster this way.
Think about digging a ditch.

If the ditch is long, ten people can help.
Each person digs one part.
The job goes much faster!

But if the ditch is deep, this doesn't work.
You can't dig the bottom first.
You must dig the top part first.
One person must finish before the next can start.

Computer scientists still work on this problem.
They try to find good ways to share work.
This helps computers solve problems faster together.

Original licensed under CC BY-NC-SA 4.0. This adaptation is provided free by OER.ai.