Can a set of rules sort faster than you?
Eight cards, two rules, 28 checks or 17. Inside one of our lab problems, plus a card game that shows why some rules work smarter.

Here is a problem we give teams in our labs: design a machine, out of cardboard and rules, that sorts a mixed pile faster than a person can.
It sounds like a craft project. It is really a question about thinking: can a set of rules do a job better than you? Children usually say no at first. A person can glance at a pile and just see where things go. A rule can't see anything. It can only do the next small step it has been told to do.
That gap, between knowing how to do something and writing it down so that something without eyes can do it, is where a lot of maths and computer science lives. Here is what sits inside the problem, and a version you can play at the kitchen table.
Why "just sort it" is not a rule
Ask a child to sort eight shuffled number cards and they will do it in a few seconds. Ask them to write down exactly what they did, so that a younger sibling could follow it word for word, and things slow down.
"Put the small ones first" is not a rule. Small compared with what? Which card do you look at first? What do you do when two cards are the same? A machine needs answers to all of these, because it will do exactly what it is told and nothing else.
Most children who try this end up inventing one of two rules, without knowing their names.
Rule one: find the smallest, again and again
The first rule most people write is this: look through the whole pile, find the smallest card, put it at the front. Then do the same with what is left.
It works every time. But count the checks. A check is one look at two cards to see which is bigger. To find the smallest of 8 cards you need 7 checks. Then 6 for the 7 that are left, then 5, and so on down to 1. That is 7 + 6 + 5 + 4 + 3 + 2 + 1 = 28 checks, every single time, even if the pile was nearly sorted to begin with.

Rule two: split, then merge
The second rule feels lazier, and it is far faster. Split the 8 cards into four pairs and sort each pair. That is 4 checks. Now merge two sorted pairs into a sorted four: compare the front cards of each pair, take the smaller one, repeat. Merging two pairs never takes more than 3 checks, so making two fours costs at most 6. Merging the two fours into one sorted eight takes at most 7.
Add it up: 4 + 6 + 7 = at most 17 checks, against 28.
That gap grows fast. With 100 cards, the find-the-smallest rule needs 4,950 checks. Split and merge needs no more than 573. Computer scientists call these two rules selection sort and merge sort, and the difference between them is one of the first big ideas in the subject: the same job, with two correct rules, can take wildly different amounts of work.
There is maths for your child here too. Adding 7 + 6 + 5 + 4 + 3 + 2 + 1 quickly is the same trick as pairing 7 with 1, 6 with 2, and so on. Ask them why the number of checks for 100 cards is 99 + 98 + ... + 1, and how to add that up without a calculator.
The biggest sorting machine in India
India already runs a sorting machine made of rules, and most of us write it down without thinking: the PIN code.
The six-digit Postal Index Number was introduced on 15 August 1972 by Shriram Bhikaji Velankar, then an additional secretary in the Government of India's Ministry of Communications. Each digit narrows the search. The first digit is the zone: there are nine, eight for regions of the country and one for the Army. The second digit is the sub-zone. The first three digits together name the sorting district, and the last three name the post office.

Notice what this rule does differently. Nobody sorting letters ever compares two letters with each other. They read one digit and drop the letter in a bin. Then the next person reads the next digit. A rule that never compares at all can beat both rules above, as long as everyone agrees on the code. That is a design decision made in 1972 that still saves time on every parcel delivered today.
Does playing with rules on paper help children think?
Activities like this, where children work out step-by-step rules without a computer, are often called "unplugged" computing. A team led by Peng Chen of Capital Normal University in Beijing, with colleagues at Beijing Normal University, Helwan University in Egypt and the University of Helsinki, reviewed 49 studies of unplugged activities in schools and ran a meta-analysis on 13 of them, published in the International Journal of STEM Education in 2023.
The pooled effect on children's computational thinking was large (Hedges's g of about 1.0). That sounds impressive, and it should be read with care. The meta-analysis rests on only 13 studies, many of them small, and their results varied a great deal. Studies that found nothing may never have been published. The fair reading is that writing and testing rules by hand looks like a promising way to build this kind of thinking, not a proven shortcut.
What we can say with more confidence is simpler. Writing a rule that works for someone else forces a child to notice every step they normally skip. It is the same habit that helps them check an answer instead of trusting it.
What children take away
In our labs, we hand teams the problem and the materials and let them argue their way to a machine. The interesting moment is rarely the first machine. It is when a team counts its own checks, sees another team's rule do the same job in half the work, and wants to know why.
You do not need cardboard for that moment. A pack of cards and a pencil will do.
Sources
- Pramaan for schools: project 'Invent a sorting machine' (Can a set of rules do the job better than you?)
- Chen, P., Yang, D., Metwally, A. H. S., Lavonen, J. and Wang, X., Capital Normal University, Beijing Normal University, Helwan University and University of Helsinki, International Journal of STEM Education 10, 47, 2023 (review of 49 studies, meta-analysis of 13 studies with 16 effect sizes; Hedges's g = 1.028)
- Postal Index Number: introduced 15 August 1972 by Shriram Bhikaji Velankar, Ministry of Communications; six digits, nine zones (Wikipedia)
- Business Standard, 'What is a PIN code' (digit meanings and the nine postal zones)