Follow Tangyuan back to Weekly Puzzle
The Farmyard Puzzle (Heads and Legs!)
Some chickens and rabbits share Grandma's pen. Count the heads, count the legs — can you work out how many of each?
Welcome to Puzzle #1 of our weekly series — and we are starting with one of the most famous puzzles in the world. It comes from a Chinese math book, the Sunzi Suanjing, written about 1,500 years ago. There it starred 35 heads and 94 legs! Farmers everywhere have been scratching their heads over it ever since. Here we shrink the numbers — the thinking stays exactly the same.
The Puzzle
Grandma keeps some chickens and some rabbits in the same pen. Counting heads from above, there are 12 heads. Counting legs from below, there are 34 legs.
Every animal is exactly one of these: a chicken has 2 legs, a rabbit has 4. No heads missing, no legs extra.
Think First, Peek Later
Don't rush to the answer. Stuck is fine — each hint you open takes you one step closer:
Hint 1: What if all 12 were chickens?
Hint 2: Swap one chicken for one rabbit. What changes?
The full solution (think first, read after)
Method 1: Make a list
Start from "all chickens" and swap one rabbit in at a time. Every swap adds 2 legs, until we hit exactly 34:
| Chickens | Rabbits | Legs |
|---|---|---|
| 12 | 0 | 24 |
| 9 | 3 | 30 |
| 7 | 5 | 34 ✓ |
Method 2: The lifting-legs trick
Imagine a whistle blows and every animal lifts 2 legs: each chicken plops down on the ground, while each rabbit still stands on 2 legs. The legs still touching the ground are 34 − 12 × 2 = 10 — and every one of them belongs to a rabbit.
Check
So the pen holds 7 chickens and 5 rabbits.
For Parents
The treasure here is not the answer — it is the idea of making an assumption: suppose everything is a chicken, then ask where the difference came from. It is often a child's first taste of thinking "algebra-style" before algebra has a name. Younger kids do great with the list method — careful trying-out is real mathematics; older kids can aim for the lifting-legs trick.
Solved it? Offer the original from the Sunzi Suanjing as a boss level — 35 heads and 94 legs. (Answer: 23 chickens and 12 rabbits.)
Liked it? Come back next week for Puzzle #2. To warm up first, try the free Multiplication Starter Course or play a practice round.
Tangyuan Math