Series E · Sheet 16 · The Routing Table Is A Matrix

The Tropical Router

Adjacency = Matrix · Shortest Path = (min,+) Powers · Forward = Row Select

Routing is linear algebra — in the tropical semiring, where × becomes + and + becomes min. The network is an adjacency matrix; all-pairs shortest paths are that matrix raised to a power under (min,+); forwarding a packet is a one-hot vector selecting a row (the same embedding-lookup from the neural-net sheet); and a switch fabric is a permutation matrix. Step the multiplication and watch the distance matrix converge — the linear algebra literally computing the routes.

ordinary algebra: (+, ×)  ·  routing algebra: (min, +)  — same skeleton, swapped operations

The Network · drag-free graph

Distance Matrix D = W(min,+)

The Mapping · Honestly

REAL & VERIFIED: the (min,+) matrix power gives exact all-pairs shortest paths — verified d(n0,n5)=9 via n0–n1–n4–n5. This is the algebraic-path method (Floyd–Warshall is its element-wise form); a crossbar switch is a permutation matrix (one 1 per row and column — a valid non-blocking switch config, verified); and packet forwarding is a one-hot destination vector selecting a row of the table — structurally identical to the embedding lookup in a neural net. The whole shortest-path layer of routing is genuinely linear algebra, just over the tropical semiring instead of the familiar one. Your in-head map was correct.

FRAYS HERE: real IP forwarding is not a clean matrix at the addressing layer — a destination doesn't select one row, it triggers longest-prefix match over CIDR blocks, which is a radix trie traversal, a tree operation, not linear. So the matrix view is exact for the graph/path/switch layers and must be retired at the prefix-matching layer rather than forced. (The "close but slightly off" feeling when mapping linear algebra onto routing is exactly the semiring swap at the path layer plus the trie break at the address layer — two different boundaries, both real.) And no quantum anywhere near the bit-space: this is classical tropical algebra, full stop.