In December 1985, a manager at Digital Equipment Corporation handed Radia Perlman a problem he considered probably unsolvable — possibly to be rid of the question. Ethernet networks were fragile: redundant connections were necessary for reliability, but they caused broadcast storms that could bring entire networks down. She went home. She woke in the night with the solution. The next day she wrote it up. The spec was complete enough that engineers implemented it without further questions. She also wrote the poem.
The Spanning Tree Protocol is now embedded in virtually every ethernet switch manufactured since 1990. It runs silently, continuously, without anyone in charge — distributed machines reaching consensus through small messages, the lowest ID elected root, least-cost paths traced, all other connections held dormant as sleeping backups. Perlman spent more time on the poem than on the algorithm. The constraint of verse forced her to state each step precisely, in the right order, without ambiguity. This is, she has noted, also what good code does.
She had almost not been there. A teacher brought her undergraduate class to a computing demonstration at Stevens Institute of Technology. She felt she couldn't keep up with the other students and came home discouraged. A teaching assistant at MIT, where she later enrolled, asked her to help with a physics project. When she said she didn't know how to program, he replied: "Yes, I know. That's why I'm asking you. You're obviously bright, so I'm sure you can learn." She stayed.
Perlman received no royalties. For years the protocol was credited to others. She has been called "the Mother of the Internet," a title she finds reductive and slightly annoying. She would prefer you understood what the problem actually was, and what the solution did. Networks that self-organize without central authority are a design choice, not a natural condition. The consequences of that choice are still accumulating.
a graph more lovely than a tree.
A network is a graph — nodes connected by edges in all directions, with loops and redundant paths. This redundancy is by design: ARPA built the internet to survive a nuclear strike. But redundancy creates catastrophe. A message splits at every junction, copies multiply, the network drowns in its own echoes. A tree — a graph with no loops — is the solution.
is loop-free connectivity.
Two requirements, stated precisely: no loops and full connectivity. Every node reachable. No message circling forever. These two constraints together define the spanning tree problem — one of the foundational problems in graph theory, solved here in a single line of verse.
so packets can reach every LAN.
"Span" is a precise mathematical term: a spanning tree touches every single node in a network without creating loops. LAN — local area network — grounds the abstraction in physical reality. This must work in practice, on real machines, inside real buildings. The poem moves from theory to engineering in one couplet.
By ID it is elected.
The algorithm begins. Every switch has a unique ID. They exchange small messages and the switch with the lowest ID becomes the root. No human decides. No central authority. The machines vote autonomously and reach consensus. This is distributed computing — order emerging from conversation, like a flock of birds, not a railway timetable.
In the tree these paths are placed.
From the elected root, the algorithm traces the cheapest path to every other node. "Cost" can mean distance, speed, or reliability. These paths become the active connections — all others fall dormant, sleeping backups ready to wake if something fails. The spanning tree is assembled.
then bridges find a spanning tree.
The final couplet is the most honest. Engineers like Perlman build the redundant mesh — all those backup connections, all that expensive cable. Then the algorithm finds the tree within it. Human work creates the raw material; distributed computation finds the order. The poem ends where it began: with the tree, now earned.