interactive · Baxter permutations ↔ mosaic floorplans
Type any permutation. If it's Baxter, this reconstructs the actual mosaic floorplan (via Ackerman–Barequet–Pinter's direct O(n) construction), the Bonichon–Bousquet-Mélou–Fusy bipolar-orientation graph, and its vertex connectivity — live, all in your browser.
Room k is the k-th room removed by bottom-left corner deletion. Colors match the graph edges at right. Every maximal vertical wall segment is a vertex of the same graph, seen a different way: every room is a directed edge from its left wall to its right wall.
Each vertex sits at its literal BBF coordinate w
Baxter's own 1964 definition, geometrically. π (n rooms, ● filled) is first
completed to a length-(2n−1) complete Baxter permutation by inserting n−1
connector points (○ hollow) — one between each pair of consecutive values i, i+1,
at the unique split position required by Chung–Graham–Hoggatt–Kleitman's 1978
characterization §"THE FIRST RECURRENCE". Then
ℓ
Dulucq–Guibert's 1998 bijection. Insert π's values one at a time as an ordinary binary search tree (compare by value, no rebalancing): reading π left→right gives TL, reading it right→left gives TR. Every node's missing child is a "canopy" mark — empty left child, empty right child — and π is Baxter exactly when these two canopies are complementary: opposite at every one of the n−1 interior positions. Verified exhaustively for every Baxter permutation of length 2–7 (0/2618 mismatches).
Room k is exactly black vertex b