Under the Hood

The King's Wheat and Your Delivery Routes

A 1,000-year-old riddle explains why optimizing even a modest delivery run is one of the hardest problems in mathematics — and why we need Google-grade algorithms to solve it.

5 min readJuly 2025

A Humble Request

There's an old story about a peasant who invented the game of chess and brought it to his king as a gift. Delighted, the king offered the peasant any reward he wished. The peasant thought for a moment, then made what seemed like an absurdly modest request.

"Your Majesty, I ask for nothing but wheat. Place one grain on the first square of this chessboard, two on the second, four on the third — doubling each time, all the way to the 64th square. That is all I need."

The king laughed. Wheat? Of all things — wheat! He agreed immediately, probably feeling a little sorry for the man's lack of ambition.

His stewards began filling the board. The first few squares were laughably small — a handful of grains you could carry in your pocket. By square 10, they had 512 grains. Square 20 gave them about half a million. Still embarrassingly modest.

Then the numbers started doing something unexpected.

By the 30th square, stewards were carrying sacks. By the 40th, granaries were being emptied. By the 50th, they had moved 25 million metric tons — more than Germany's entire annual wheat harvest.

King and peasant with growing wheat piles on a chessboard

And then came the 55th square.

Grains of wheat per chessboard square (each square doubles the previous)

SquareGrainsWeightContext
110.00005 gA single grain
105120.02 gA pinch
20524,28824 gA handful
30537 million24 tonnesA full truck
40550 billion24,700 tonnesA small port shipment
50562 trillion25 million tonnesGermany's entire annual harvest
5518 quadrillion810 million tonnes⚠️ More than all wheat produced on Earth in a year
649.2 quintillion415 billion tonnes1,064 years of world production — total board

A single square — the 55th out of 64 — required 810 million metric tons of wheat. The entire world produces about 780 million metric tons per year. The king couldn't pay. Not even close. The total across all 64 squares? That's 1,064 years of the world's entire wheat output. The peasant, apparently, had planned ahead.

So What Does This Have to Do With Delivery Routes?

Everything. Because your delivery stops have exactly the same problem. The technical name for it is the Travelling Salesman Problem — and it belongs to a class of mathematical challenges where the number of possible solutions doesn't just grow with scale, it explodes.

Aerial view of city delivery routes with multiple couriers and stops

Possible route combinations vs. brute-force computation time (at 1 trillion checks/second)

StopsPossible routesComputation time (brute-force)
524Instant
10362,880Instant
1587 billion87 seconds
20121 quadrillion~1.4 days
25620 septillion~19,700 years
308.8 nonillion~280 billion years

25 delivery stops. A courier with 25 stops on a Tuesday morning. A computer checking one trillion route combinations per second — faster than anything commercially available — would still need 19,700 years to evaluate every possibility and find the guaranteed best route.

30 stops? 280 billion years. The universe is about 13.8 billion years old. We'd need roughly 20 universes' worth of time. And remember: this is the chessboard problem in disguise. Every stop you add doesn't just add one more option — it multiplies all the previous options by the new number. Exactly like doubling the wheat.

♟️
Chessboard
264 grains
= 1,064 years of wheat
🚚
30 delivery stops
29! routes
= 280 billion years

Why Smart Algorithms Actually Matter

This is why "intelligent route optimization" isn't marketing language. It's a genuine mathematical necessity. Brute-force isn't just slow for large delivery problems — it's fundamentally impossible at any real-world scale.

EfiRoute uses the Google Cloud Route Optimization API — a fleet-grade engine that applies advanced combinatorial algorithms to find near-optimal solutions in seconds, even for hundreds of stops across multiple couriers simultaneously.

These algorithms don't check every combination. They're designed to navigate the vast space of possibilities intelligently — pruning branches that can't possibly lead to better solutions, learning from partial solutions, and converging toward optimality without ever needing to visit every leaf of that impossibly large decision tree.

  • Multi-courier routing with time windows and work-hour constraints
  • Simultaneous optimization across all couriers — not one at a time
  • Handles hundreds of stops without breaking a sweat
  • Seconds to a result — not decades

See the Algorithm in Action

Add your stops, set your constraints, and let Google's fleet-routing engine handle the combinatorics. Free plan — no credit card required.

Try EfiRoute Free