Teaching objectives
A planner spreads the traffic so that everyone arrives as soon as possible; drivers, each on their own, end up with a different split, and a worse one. How much worse? This upper-secondary lab compares the planner’s optimum with the drivers’ equilibrium and measures the gap with the price of anarchy, the ratio between the average time of the one and of the other. It starts from Pigou’s network, moves on to Braess’s paradox —a new road that makes everyone’s journey longer— and ends with round-based games, alone or with the whole class: the El Farol bar, the common pasture, the cobra effect and rush hour.
What you learn
The core idea: when everyone chooses what is best for themselves, the result for the group can be worse than a coordinated split, and you can measure how much worse.
- Pigou: planner and drivers (rooms 1-4). The student splits 100 cars between a 60 min motorway and a road that clogs up (60 on the motorway and 40 on the road: an average of 48 min) and sees that the minimum is the vertex of a parabola. With no planner, each driver switches as long as it pays, and the traffic reaches an equilibrium in which the road saves nobody a minute (an average of 60 min). The ratio of the two averages is the price of anarchy (60/48 = 1.25 at 0.75 min per car) and, for linear times, it never exceeds 4/3; with sharper times (the BPR function, with exponent 4) the bound no longer holds.
- Braess (rooms 5-11). With 4000 cars and two identical routes, the equilibrium is 2000 and 2000, at 65 min. When a 2 min shortcut opens, everyone uses it and everyone takes 82 min, more than before, and nobody gains by leaving it. The lab studies how the equilibrium changes with the shortcut’s time, the price of anarchy with the shortcut (82 / 64.89 ≈ 1.264), the toll of 21.5 min that brings drivers to the planner’s split, and why closing a road sometimes improves traffic. The same paradox appears in a system of springs and strings (cut a string and the weight rises) and in induced demand: widening a road only changes how many people use it.
- Round-based games and the cobra (rooms 12-15). Four situations where what is rational for each goes badly for all. El Farol (8 rounds): the bar is pleasant if at most 60% of the group go, and nobody can predict well if everyone uses the same prediction. The common pasture (20 days): bringing 5 sheep wins over 3 days, but the pasture only carries 2 per herder and after 20 days it loses. The cobra effect: with a reward for each cobra, breeding them pays (starting from 400 cobras, from €8 up), and when the reward is withdrawn they are released. Rush hour in class: the Braess network played in rounds, with a shortcut that opens halfway through and raises the group’s average from about 65 to about 80 min.
Rooms 12, 13 and 15 are played alone against bots or with the whole class. In class, the teacher closes the rounds from their panel (and in rush hour also opens the shortcut); the bots make up the group.
Key mathematical ideas
- Equilibrium versus optimum: a split is an equilibrium if nobody improves by changing on their own, and all the routes in use take the same time; the optimum minimises the average time. In general they do not coincide.
- Price of anarchy: the average time at the equilibrium divided by the optimal average time. It is a ratio of times, with no units, and never falls below 1.
- The 4/3 bound (Roughgarden and Tardos, 2002): if the time on each section has the form a + bx, the price of anarchy is at most 4/3 in any network, and Pigou’s network with d = 1 reaches it. With other functions, such as BPR, there is no such guarantee.
- Braess’s paradox: adding a road can make everyone’s time worse at the equilibrium, because each driver who uses it saves time but delays those who share the sections it loads.
- Pigou’s toll: charging each driver for the delay they cause to others makes the equilibrium coincide with the planner’s split; the money is collected, not lost time.
- The tragedy of the commons: one more sheep gives all its wool to its owner and spreads the damage over everyone; it pays each herder to add it even if the pasture is used up. Elinor Ostrom studied communities that avoid this by agreeing on rules.
- El Farol (Brian Arthur, 1994): a prediction that everyone believes stops coming true, so there can be no common predictor that is always right; attendance hovers around 60%.
Room-by-room contents
Room 1 · You are the planner
A hundred cars go from S to T by a motorway of a fixed 60 min or by a road that takes 0.75 min for every car using it. The student splits the cars so that the AVERAGE time is as small as possible (60 on the motorway and 40 on the road: 48 min, 12 less than with everyone on the motorway). Then the road becomes a single lane (1.5 min per car) and the student looks for the split without seeing the average. The theory explains that the minimum is the vertex of a parabola.
Student tasks
- Split the 100 cars to minimise the average time.
- Repeat it with the single-lane road, without seeing the average.
Room 2 · Every driver for themselves
No planner: each driver chooses the route that suits them best. The student predicts where the traffic will go, and an animation shows drivers switching one by one (from 60/40 to 20/80). The equilibrium is defined (nobody gains by changing route on their own) and found for the single-lane road: with whole cars there are two neighbouring splits, 39 or 40 on the road. Moral: at the equilibrium the road does not save anyone a single minute.
Student tasks
- Predict, and watch where the traffic moves when everyone looks after themselves.
- Find the equilibrium with the single-lane road.
Room 3 · The price of anarchy
Definition: the average at the equilibrium divided by the optimal average, with a Planner / Drivers switch that animates the change of split. With the road at 0.75 min per car the averages are 48 and 60 min (ratio 1.25); at 1.2 min per car, 52.5 and 60 (8/7). The ratio stays hidden while the student works it out. It closes with a question: can it be less than 1?
Student tasks
- Work out the price of anarchy with k = 0.75 and with k = 1.2.
- Explain what 1.25 means and why it never drops below 1.
Room 4 · How much can it cost?
Pigou with a road whose time is T·(x/100)^d. With a slider for T and a selector for d, the student sees the graph of the price being drawn from what they explore. With d = 1 the maximum is 4/3, at T = 60. The theory states the Roughgarden–Tardos theorem (linear times: never more than 4/3) and the BPR function, with exponent 4. Students bet on whether d = 4 goes above 4/3 and work out the case d = 3, T = 60 by hand (≈ 1.90).
Student tasks
- Find the value of T that makes the price greatest with d = 1.
- Bet, and check what happens with d = 4; work out d = 3 by hand.
Room 5 · Two routes from A to B
The Braess network without a shortcut: 4000 cars, two identical routes (A-Y-B and A-X-B), with yellow sections of x/100 min and red motorways of 45 min. The student finds the equilibrium (2000 and 2000, 65 min), checks that the planner cannot improve on it (they coincide) and works out the time of a route under a different split.
Student tasks
- Find the equilibrium of the network without the shortcut.
- Work out the time of a route under a different split.
Room 6 · We build a shortcut
A one-way road from Y to X, of 2 min, is opened. Before seeing it, the student bets; then an animation moves the cars onto the shortcut 100 at a time until all 4000 go by A-Y-X-B and everyone takes 82 min, against 65 before. This is Braess’s paradox. Challenges: the time of A-X-B for a driver who switched back (85 min), why nobody does, and what happens when the shortcut is closed (65).
Student tasks
- Bet, and see what happens when the shortcut opens.
- Explain why nobody leaves the shortcut even though everyone takes longer.
Room 7 · How long does the shortcut take?
A slider changes the shortcut’s time c (from 0 to 40 min) and the network shows the equilibrium. With c = 10 not everyone uses the shortcut: the three routes are balanced with a split of 500 / 3000 / 500 and all three take 80 min. A graph of its own is drawn from the points the student explores.
Student tasks
- Run through c with the slider and note when the equilibrium gets worse.
- Work out the equilibrium split for a given c.
Room 8 · The shortcut in the planner’s hands
With three routes and groups of 50 cars, the student looks for the split with the least average time: with a 0 min shortcut it is 1750 / 500 / 1750 (64.69 min), and with c = 5 the planner no longer uses the shortcut. They work out the price of anarchy with c = 2 (82 / 64.89 ≈ 1.264). Last challenge: Pigou’s toll on the shortcut. With a slider, the student looks for the toll of 21.5 min with which drivers, looking only at their own time plus the toll, end up at the planner’s split. The theory adds real examples of urban tolls (Singapore, London, Stockholm).
Student tasks
- Find the split of least average time with the shortcut and see when it stops being used.
- Work out the price of anarchy with c = 2.
- Find the toll that brings the equilibrium to the planner’s split.
Room 9 · Closing a road
If adding a road can make traffic worse, closing one can make it better. The student taps the sections of two networks of 600 cars to close or open them, and the cars resettle until the new equilibrium. In the first (Braess’s diamond in disguise) only closing A→B lowers the time, from 46 to 39 min; in the second only B→C does, from 90 to 80.
Student tasks
- In each network, find the one section whose closure improves the equilibrium.
- Check that closing other sections leaves the time the same or makes it worse.
Room 10 · Springs and strings
Braess’s paradox in mechanics (Cohen and Horowitz, 1991): two springs in series with a short string and two slack safety strings. When the middle string is cut, the weight RISES. The theory recalls Hooke’s law and why two paths in parallel each carry half the load.
Student tasks
- Predict what happens to the weight when the middle string is cut.
- Explain the result with springs in series and in parallel.
Room 11 · More lanes, the same jam
Each person chooses between car and train. The train takes a fixed time; the road takes a time that grows with the number of cars and falls with the number of lanes. At the equilibrium, as long as someone takes the train, the road takes the same time as the train: widening it only changes how many people use it.
Student tasks
- Widen the road and watch how it rebalances.
- Explain why the equilibrium time does not go down.
Room 12 · The El Farol bar
An 8-round game (Brian Arthur, 1994). Each round, go to the bar or stay at home: if at most 60% of the group go, those who go gain +1; if more go, they lose 1; staying scores 0. The bots use simple predictors and attendance hovers around 60%. It is played alone against bots or with the whole class; in class, the teacher closes the rounds from their panel. Challenges: how many more people could have fitted in one of your rounds, what happens if everyone uses the same predictor, how many more points the group would have scored, and why attendance ends up near 60%.
Student tasks
- Play the 8 rounds, deciding each time whether to go or stay.
- Explain why a prediction that everyone believes stops coming true.
Room 13 · The common pasture
The tragedy of the commons over 20 days. Each herder chooses how many sheep (0 to 5) to bring on days 1, 2 and 3, and a fourth, fixed decision applies to days 4 to 20. Each sheep per herder, on average, eats 5% of the pasture, and what is left regrows by 0.4·r·(1−r). Each day is animated (the sheep graze, the wool comes out, the grass regrows). Bringing 5 pays best at first (after 3 days, 15 wool against 6), but the pasture can carry at most 2 sheep per herder: after 20 days the planner wins 40 to 27.7. It is played alone against bots or with the whole class, with the teacher closing the rounds.
Student tasks
- Decide how many sheep to bring and see how the pasture changes.
- Work out how many sheep the pasture can carry each day with the herders in your game.
- Explain why selfishness wins at 3 days and loses at 20.
Room 14 · The cobra effect
A council pays for every cobra handed in, and breeding cobras turns out to pay. A slider changes the price per head and two graphs show the year (wild cobras, bred ones and the total) and the student’s attempts. It starts from 400 cobras: the smallest whole price for which there are more than 400 after a year is €8. Then the reward is withdrawn and the breeders release their cobras. It closes with “Hoy no circula” (Mexico City, 1989) and a note that the Delhi story has no firm source.
Student tasks
- Find the smallest whole price with which there are more cobras than at the start.
- Explain what happens when the reward is withdrawn.
Room 15 · Rush hour in class
The Braess network of rooms 5-8, normalised, over 7 rounds. Each player has 5 cars and in each round splits how many go by A-Y-B, A-X-B and, once the shortcut is open, A-Y-X-B. Yellow sections: 40 · (cars on the section / total cars) min; red, 45 min; shortcut, 2 min. The score is the average time of your 5 cars. The first 3 rounds have no shortcut; it opens from round 4 (when playing alone, by itself; in class the teacher opens it from their panel, which also closes the rounds). The group average goes from about 65 min to about 80 when the shortcut opens. Challenges use the data from your own game.
Student tasks
- Play the rounds without and with the shortcut and compare the average.
- Work out how much longer one of your cars would take if it changed route.
- Explain why the average gets worse when the shortcut opens (17 min more per car at the equilibrium: 82 against 65).
Rooms to project
The most striking ones to show and discuss in class.