Math paradoxes

Hotelling's beach Two ice cream sellers share one beach. Where will they stand?In the middle, back to back.

A beach is 1 km long, holidaymakers lie evenly from end to end, and everyone walks to the nearest kiosk for ice cream. Prices are the same. Each morning the two sellers may move their kiosk anywhere. The fair split would be one at 250 m and the other at 750 m, so nobody walks more than 250 m. Where will the sellers really end up?

Every step towards the middle takes customers from the rival, so the sellers creep closer until they stand side by side exactly in the middle. Each still gets half the customers, but now the farthest holidaymaker walks 500 m instead of 250, and the average walk doubles: 250 m instead of 125.

Make a guess
250 maverage walk with both in the middle
125 mif they stood at 250 and 750 m
50 / 50customers either way
The puzzle

A kilometre of beach, a thousand holidaymakers, two kiosks

In 1929 the American statistician and economist Harold Hotelling described how two sellers share customers spread along one street. Later his model came to be told as a story about ice cream on a beach.

  1. 1

    The beach

    The beach is straight and 1,000 m long. There are 1,000 holidaymakers on it, spread evenly from end to end: about one person per metre.

  2. 2

    The customers

    Each holidaymaker wants one ice cream a day and walks to the nearest kiosk for it. The ice cream and the price are the same at both kiosks, so only distance matters. If the kiosks stand in the same spot, the customers split half and half.

  3. 3

    The sellers

    Two sellers each want to sell as much as possible. The kiosk is on wheels, so each morning either of them can move it. They can't make deals with each other.

  4. 4

    The first morning

    The beach office placed the kiosks at 250 m and at 750 m. Each gets half the beach, 500 customers, and nobody walks more than 250 m for ice cream.

  5. 5

    The question

    The sellers move their kiosks, each for their own good, until neither wants to change anything. Where will the kiosks stand then?

Intuition says

"It pays them to split the beach in half and each stand in the middle of their half"

That split is best for the holidaymakers, but it doesn't hold: whoever steps towards the centre first takes some of the rival's customers. The rival answers in kind, and both end up in the middle.

Assumptions

  • Holidaymakers are equally keen on ice cream however far the kiosk is: all that matters is which one is nearer.
  • Prices are the same and never change.
  • A seller counts only their own customers. How far people walk is not their concern.
  • We look for the answer where neither seller gains any more by moving alone.
Round 1 · Guess

Where will the kiosks end up?

For a few weeks the sellers have moved their kiosks, each for their own good, and now neither wants to change anything. Pick what you see on the beach.

Your answer

A breakdown of your answer will appear here.

Hints

Hard to decide? Open the hints one at a time: the easy one first, then stronger ones.

Round 2 · Game

Ten days on the beach: you against a bot

You sell ice cream from the blue kiosk, the bot from the orange one. Each morning you move your kiosk first, no more than 100 m, then the bot moves its own to wherever it gets the most customers. You don't know how far it can go in a morning: somewhere from 40 to 100 m. Sell more ice cream than the bot in 10 days.

your kiosk day by day the bot's kiosk
Day1
You sold0
Bot sold0

Customers are counted in ice creams: 1,000 holidaymakers buy one each. The border between your customers and the bot's lies exactly halfway between the kiosks.

Round 3 · Simulation

2,000 beaches: where the kiosks meet

On each of 2,000 beaches two sellers start in random spots. Taking turns, each moves the kiosk within their step to wherever they get the most customers. The histogram shows where the kiosks stand after each move, and the chart shows how far a holidaymaker walks on average.

average walk of a customer 125 m: kiosks at 250 and 750 m 250 m: both in the middle
Average walk at the start
–
Average walk at the end
–
Beaches with both kiosks at 500 m
–
Check: 100,000 holidaymakers
–

Kiosk spots are taken in steps of 10 m. The share of customers and the average walk on each beach are computed exactly: customers left of the midpoint between the kiosks go to the left one, those to the right go to the right one. In the last tile we separately drop 100,000 random holidaymakers on a beach with the kiosks where they ended the simulation and measure their walk.

Round 4 · Explanations

Why the sellers meet and who pays for it

Neither seller makes a mistake. Each counts only their own customers, and nobody counts the steps the holidaymakers have to walk because of it.

In plain wordspictures, analogies, small numbers

“In plain words” is hidden on all puzzles.

A step to the middle

Whoever moves towards the rival takes the rival's customers

This explanation is incomplete, but it has the core: everyone to the left of the blue kiosk is its customer anyway, because it's their nearest one. So by moving towards the middle blue loses none of them, and the border between the customers shifts right by half its step. Orange does the same from the other side, and so on until there is nowhere left to move.

Who pays

The sellers break even, the holidaymakers walk twice as far

Kiosks at 250 and 750 m125 mon average, at most 250 m
Both at 500 m250 mon average, at most 500 m

With the kiosks at 250 and 750 m, every holidaymaker lies within 250 m of a kiosk, and the distances are spread evenly from 0 to 250 m. So the is half of that, 125 m. With both kiosks in the middle, distances spread from 0 to 500 m, and the average is 250 m. The sellers sell just as much, 500 ice creams each, and people walk twice as far.

Rigoroustables, charts, formulas

“Rigorous” is hidden on all puzzles.

Nash equilibrium

The middle: the only place nobody gains by leaving

KiosksCustomersAverage walkStable?
250 and 750 m500 / 500125 mno
350 and 750 m550 / 450132.5 mno
500 and 500 m500 / 500250 myes

In 1950 John Nash called an equilibrium a state of a game that no player gains by leaving alone. Here there is exactly one. If the kiosks stand in different spots, each gains by moving closer to the rival. If they share a spot that isn't the middle, either one gains by stepping to the side with more beach: there lies more than half of the customers. Only 500 and 500 m is left: from there any step gives less than half.

Equilibrium versus optimum

The same mechanism as in Braess's paradox

If the kiosks were placed by someone who cares about the holidaymakers' comfort, they would choose 250 and 750 m: that gives the shortest average walk, 125 m. The sellers lose nothing under that split either, but it doesn't hold, because each one alone gains by breaking it. The equilibrium gives 250 m, twice as bad as the optimum.

The same thing happens in Braess's paradox: each driver picks the fastest road for themselves and doesn't count the time they take from others, and everyone drives longer. There the drivers pay; here it's the holidaymakers, who don't even play the game.

For formula lovers

Customer shares and the average walk

The beach has length 1 (kilometre), the kiosks stand at a < b. The border between customers lies halfway, at (a + b)/2.

Sa=a+b2,Sb=1−a+b2

The left share grows with a while a < b, so each wants to move up to the rival. When a = b = x, a step aside gives x or 1 − x, so only x = 1/2 holds.

∂Sa∂a=12>0,max(x,1−x)≤12⇔x=12

The average walk: at the ends people walk to the nearest kiosk, and between the kiosks a gap of length d gives an average of d/4.

W(a,b)=a22+(b−a)24+(1−b)22 W(14,34)=132+116+132=18,W(12,12)=18+18=14

The minimum of W: the derivatives in a and b vanish only at a = 1/4, b = 3/4. With the kiosks placed at random, the average walk is 5/24 km ≈ 208 m on average.

∂W∂a=a−b−a2=0,∂W∂b=b−a2−(1−b)=0⇒a=14,b=34
Deepergeneralisations, theory, history

“Deeper” is hidden on all puzzles.

Hotelling, 1929

A street, cider and churches

In "Stability in Competition" Hotelling took two sellers on a line along which buyers live evenly. He showed that the sellers gain by standing close together and carried the idea over from distance to the goods themselves: producers make them too much alike. As he quipped, Methodist and Presbyterian churches are too much alike, and cider is too homogeneous.

Near the end of the paper he saw the same in politics: Republicans and Democrats in the USA try to make their platforms as much alike as they can, because any sharp difference would cost votes.

When sellers set prices

Prices can push the sellers apart

In our puzzle prices are fixed. In Hotelling's paper the sellers chose both a place and a price. In 1979 Claude d'Aspremont, Jean Gabszewicz and Jacques-François Thisse showed that in such a model sellers standing close together find no stable prices: either one can undercut and grab all the rival's buyers. And if the walk costs a buyer in proportion to the square of the distance, the sellers move all the way to the ends so as not to fight over prices.

So "stand next to your rival" works when the price is fixed and the competition is only over place or how similar the product is.

Round 5 · Scaling up

Three kiosks, an uneven beach and elections

Hotelling's beach leads into three worlds. In mathematics it turns out that with just three sellers there may be no equilibrium at all. In logic it is the median voter theorem. And in practice you can see how many steps such competition costs the holidaymakers.

Mathematics

Three kiosks that can't stop

Three, four, five

With three sellers there is no stable spot

Each move, the seller with the smallest share moves to wherever they get the most. When the two outer sellers press in on the middle one, it is left with a thin strip and jumps outside. Then the new middle one is squeezed, and it all repeats. We checked every placement of three kiosks in steps of 25 m: in none of them do all three gain nothing by moving. And in none of 2,000 random runs did the kiosks stop within 300 moves.

With four sellers there is an equilibrium again: two back-to-back pairs at 250 and 750 m. The average walk is then 125 m, while the best layout, at 125, 375, 625 and 875 m, would give 62.5 m. Twice as bad again. Curtis Eaton and Richard Lipsey worked through these cases in detail in 1975.

An uneven beach: they meet at the median

The kiosks meet at–
People's average spot–

The median, not the mean

What matters is where half the people are on each side

The crowd is thickest by the entrance and thins out away from it. The sellers again meet at one point, but not in the middle of the beach: where exactly half the people are on each side. That point is called the median. Whoever stands off the median lets the rival stand next to them on the bigger side and take more than half the customers.

People's average spot is usually different: a few far-off holidaymakers pull the mean towards themselves, while the median doesn't care how far away they lie.

And on a round lake with no ends there is no middle at all. Two sellers in any two spots split the shore in half, and neither gains by moving. There similar kiosks can stand far apart.

Logic

Two candidates and nine voters

The median voter theorem

The winner is whoever is nearer the middle voter

Replace the beach with a scale of views from left to right, the holidaymakers with voters and the kiosks with candidates. Each votes for the nearer one. To win a majority, the two candidates move towards the voter in the middle of the line: as many voters on the left as on the right. In 1948 Duncan Black proved that in this setting the position of this median voter wins. In 1957 Anthony Downs carried Hotelling's model over to parties in his book "An Economic Theory of Democracy".

The logic: if a position loses a vote against some other one, it pays to leave it, so the only stable position is one that can't be beaten. But there are many conditions: views have to fit on a single scale, everyone votes, there are two candidates, and voters believe them wherever they move.

Practice

How many extra kilometres the beach walks

Extra walking a day, there and back–
Over a summer, 90 days–

Where to look for Hotelling

Similar products, party platforms, neighbouring petrol stations

It is easy to check: each holidaymaker walks 125 m further on average, and as much back. For 1,000 customers that is 1,000 · 125 · 2 = 250,000 m, or 250 km a day. So a beach office that hands out kiosk spots can simply fix them at 250 and 750 m, as in our puzzle.

The same force is seen in rivals' similar products aimed at the "average" customer and in party platforms drifting to the centre before an election. But Hotelling doesn't explain everything. Petrol stations and pharmacies cluster also because that's where the flow of cars and people is, where zoning rules allow them, and because buyers like to compare several shops in one place. And parties don't always meet in the centre: voters don't vote only for the nearest position, and not everyone turns out.

Bonus · Fun facts

Things to tell your friends

1929

Hotelling's paper

"Stability in Competition" appeared in the British Economic Journal, volume 39, pages 41–57. There is no beach and no ice cream in it: Hotelling wrote about sellers on one street. The ice cream beach story came later, as a way to teach the model.

2 churches

Churches and cider

Hotelling carried the idea from distances over to goods: sellers gain by making their product like the rival's. As examples of excessive sameness he named Methodist and Presbyterian churches, and cider.

p. 54

Parties

Back in 1929, in the same paper, Hotelling wrote that US Republicans and Democrats don't set their platforms apart but make them as alike as they can, because any sharp difference would cost votes.

1948

The median voter

The Scottish economist Duncan Black published "On the Rationale of Group Decision-making" in the Journal of Political Economy. In it he showed that when views lie on one scale, the median voter's position wins.

1957

Downs

In his book "An Economic Theory of Democracy" Anthony Downs carried Hotelling's model over to parties competing for voters on a left–right scale. The "spatial" theory of voting grew from there.

1979

A correction 50 years on

In "On Hotelling's 'Stability in Competition'" in Econometrica, d'Aspremont, Gabszewicz and Thisse found a flaw in Hotelling's original analysis, where the sellers also set prices: when the kiosks are close, there are no stable prices.

Discussion

What do you think?

Share your own explanation, an objection or a variant of the puzzle. You need a GitHub account to comment.

Is “For everyone” the right level for this puzzle?

Thank you! This helps set the levels right.

Newsletter

New puzzles, explanations and discussions

I keep adding new puzzles, new ways to explain them and write-ups of the discussions they start. Leave your email and I'll write when something new is out. No spam, one-click unsubscribe.

The sign-up form will appear here soon.