I think that I shall never see
a graph more lovely than a tree.
A tree whose crucial property
is loop-free connectivity.
A tree which must be sure to span
so packets can reach every LAN.
First the root must be selected.
By ID it is elected.
Least cost paths from root are traced.
In the tree these paths are placed.
A mesh is made by folks like me,
then bridges find a spanning tree.
Network Protocol  ·  December 1985

Spanning Tree Protocol

Radia Perlman · 1951—
Digital Equipment Corporation

The protocol that prevents the internet from collapsing under its own echoes — written in one night, expressed as a poem, still running invisibly inside every ethernet switch on the planet.

Lesson 9

In December 1985, a manager at Digital Equipment Corporation gave Radia Perlman a problem he considered probably unsolvable. Ethernet networks were choking on their own redundancy: every backup connection that made them reliable also made them catastrophically fragile. Radia Perlman went home. She woke in the night with the solution fully formed. The next morning she wrote up the specification and, almost as an afterthought, the poem. The poem is twelve lines. It describes, completely and correctly, a protocol that now runs silently inside every ethernet switch on the planet.

I think that I shall never see
a graph more lovely than a tree.
Problem Statement

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.

A tree whose crucial property
is loop-free connectivity.
The Constraint

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.

A tree which must be sure to span
so packets can reach every LAN.
The Scope

"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.

First the root must be selected.
By ID it is elected.
Step One — Election

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.

Least cost paths from root are traced.
In the tree these paths are placed.
Step Two — The Tree

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.

A mesh is made by folks like me,
then bridges find a spanning tree.
The Closing — Human and Machine

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.

When her teacher brought her 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 few years later, a teaching assistant at MIT asked her to help with a physics project. She said she didn't know how to program, he then replied: "Yes, I know. That's why I'm asking you. You're obviously bright, so I'm sure you can learn." She stayed.

The Spanning Tree Protocol is now embedded in virtually every ethernet switch manufactured since 1990. It runs silently, continuously, without anyone in charge. It allows distributed machines to reach consensus through small messages, with no need for central decisions. 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.

Minimum spanning tree — an interactive demonstration of the algorithm Perlman encoded in verse. Mike Bostock, Observable.
Open on Observable →
VAX 11-780, Digital Equipment Corporation
VAX 11-780, Digital Equipment Corporation, c. 1980. The machine on which the Spanning Tree Protocol was first implemented. Dr. Bernd Gross, CC BY-SA 4.0.

Digital Equipment Corporation (DEC) where she was working at the time was not a research lab. It was a minicomputer company and she was solving a production problem for commercial customers, with a standard built by a competitor (Xerox). None of this had anything to do with poetry.

Perlman received no royalties. For years the protocol was credited to others. When she finally gained recognition decades after, she was 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. She had to imagine it and finds the correct ways to express it, with consequences that as today are still ongoing.

Radia Perlman
Radia Perlman
Born
December 18, 1951 Portsmouth, Virginia
Written
One night, December 1985 Digital Equipment Corp.
Still running
Every ethernet switch manufactured since 1990
Earlier work
TORTIS — Logo for children aged 3½, MIT
Other interests
Piano, French horn, poetry, writing
01

It demonstrated that a complex distributed problem — machines reaching consensus without any central authority — could be solved elegantly, and expressed completely in twelve lines of verse.

02

It is one of the earliest and clearest examples of an algorithm written first as poetry — form and function unified. The poem is not a metaphor for the algorithm. It is the algorithm.

03

Perlman's career — from making code accessible to toddlers, to building invisible infrastructure — is a consistent argument that the most important code is code nobody notices. Elegance is what disappears.

  1. Perlman, Radia (1999). Interconnections: Bridges, Routers, Switches, and Internetworking Protocols. 2nd ed. Addison-Wesley. — Her own book. The clearest technical account of the problem she solved, written by the person who solved it.
  2. Seibel, Peter (2009). Coders at Work: Reflections on the Craft of Programming. Apress. — Includes a long interview with Perlman. The closest thing to hearing her think aloud about the work.
  3. Perlman, Radia (1985). 'An Algorithm for Distributed Computation of a Spanning Tree in an Extended LAN.' ACM SIGCOMM Computer Communication Review, 15(4), 44–53. — The original paper.
  4. Perlman, Radia. 'Radia Perlman: Don't Call Me the Mother of the Internet.' Recorded talk, available on YouTube. — Her own account of the work, the attribution, and why the title bothers her.

Write the algorithm you use to make a decision — any decision — as a short poem. No more than six couplets. Each couplet is one step.

Perlman spent more time on the poem than on the algorithm itself. The constraint of verse forced her to state each step precisely, in the right order, without ambiguity. That is also what good code does. You are not writing poetry about a decision. You are writing the decision as poetry. Bring your poem to the session. We will read them aloud.

Earlier
TORTIS — Logo for Children

Perlman's first project: a version of Papert's Logo that children as young as three could use to command a robot turtle. Code before keyboards.

Parallel
ARM Instruction Set — Sophie Wilson

Another woman, same decade, building invisible infrastructure inside every device. The architecture that runs every smartphone was designed in 1985.

Later
10 PRINT

One line of Commodore 64 BASIC, infinite output, no author. The constraint tradition Perlman's poem belongs to — democratised, anonymous, running in every living room.