Card 07/ 08

ExerciseDifficulty: Advanced2 min

Practice: Counting the Links an Air Traffic Tower Removes

Eight aircraft talking to each other, against eight talking to one tower.

An air traffic control tower is the classic picture of a mediator: aircraft near an airport do not agree among themselves who lands next, they each talk to the tower. This exercise asks you to count what the tower removes and say what it now owns. Work out your answers before opening the solution.

Eight aircraft are approaching one runway.

  1. If every aircraft had to coordinate directly with every other, counting each pair once, how many links would there be?
  2. How many links are there when each aircraft talks only to the tower?
  3. What does the tower now own that the aircraft no longer do?
  4. Where does the picture break, compared with the pattern in code?
Show a solution
Eight aircraft, with and without a tower

Directlyone link per pair

8 × 7 / 2 = 28 links. Each aircraft must know the other seven.

Through the towerone link per aircraft

8 links. Each aircraft knows only the tower.

py
from math import comb

for n in (3, 5, 8, 20):
    print(f"{n:>2} colleagues: {comb(n, 2):>3} links directly, {n:>2} through a mediator")
OutputRan with python:3.12-slim (Python 3.12.13)
 3 colleagues:   3 links directly,  3 through a mediator
 5 colleagues:  10 links directly,  5 through a mediator
 8 colleagues:  28 links directly,  8 through a mediator
20 colleagues: 190 links directly, 20 through a mediator
The direct count is n(n-1)/2, and it grows much faster than n.

The tower now owns the landing order, the spacing between aircraft, and what happens when one declares an emergency. Those rules used to be spread across every pair of pilots; now they are in one place, which is also the single point everything depends on.

The picture breaks on what the colleagues can hear. Pilots on the same radio frequency hear each other's calls, so they are not fully isolated. In code, a colleague that holds only the mediator has no way to reach another colleague at all.