Braid Words & the Bracket

A second route to the same invariant
Demo 2 · Building on Demo 1
Recap from Demo 1

In Demo 1 we introduced the Kauffman bracket — a polynomial invariant that tells knots apart. The recipe was: take a knot diagram with n crossings, resolve each crossing as either an A-smoothing or B-smoothing, count the resulting loops, and sum a weighted contribution from all 2n states. That state sum gives the bracket ⟨K⟩, a Laurent polynomial in A.

The state sum works, but it has an exponential cost: 2n states for n crossings. Demo 1 encoded knots using planar diagram (PD) notation — a list of arc labels at each crossing. This demo introduces a completely different way to describe knots — using braids — and shows that the same bracket falls out when we compute the state sum on the braid closure.

Contents
1. What is a braid? 2. Braid closure: from braids to knots 3. Braid words as data 4. Resolving crossings on braids 5. Counting loops with union-find 6. Chirality: the mirror test 7. Toward the matrix approach 8. What the C code does 9. Interactive explorer

1. What is a braid?

Imagine n vertical strands hanging from a bar, like threads on a loom. Now let some of those strands cross over each other — always moving downward, never looping back up. The result is a braid: a set of intertwined strands that go from a row of n points at the top to a row of n points at the bottom, crossing each other along the way.

The simplest interesting braid has just 2 strands. There is one elementary move: strand 1 crosses over strand 2 (a positive crossing, written σ₁), or strand 2 crosses over strand 1 (a negative crossing, written σ₁⁻¹). With 3 strands there are two generators: σ₁ (strands 1 and 2 cross) and σ₂ (strands 2 and 3 cross). In general, an n-strand braid has generators σ₁ through σn−1, each with a positive and negative version.

Left: the positive generator σ₁ on 2 strands. Center: three generators stacked — σ₁ · σ₁ · σ₁ (the trefoil braid). Right: a 3-strand braid σ₁ · σ₂⁻¹ · σ₁ · σ₂⁻¹ (figure-eight braid).

A braid is a sequence of these elementary crossings, read from top to bottom. Mathematically, braids form a group — you can compose them (by stacking one below another), and every braid has an inverse (the same braid reflected upside-down, which undoes all the crossings). This algebraic structure makes braids a powerful language for describing knots.

2. Braid closure: from braids to knots

A braid has free ends — strands come in at the top and go out at the bottom. To make a knot (which is a closed loop), we need to join those ends. The standard way is the braid closure: connect each strand at the bottom to the corresponding strand at the top by arcing around the right side. Strand k at the bottom connects to strand k at the top.

The braid σ₁³ on 2 strands (left) and its closure (right) — which produces the trefoil knot.

A remarkable theorem due to Alexander (1923) guarantees that every knot or link can be represented as the closure of some braid. This means braids are a completely general language for describing knots — any knot you can draw has a braid word that produces it.

Moreover, Markov's theorem (1935) tells us exactly when two braid words give the same knot: they must be related by a specific set of moves (conjugation and stabilization). This is the algebraic counterpart to the Reidemeister moves on knot diagrams.

3. Braid words as data

Where Demo 1 used PD notation (lists of arc labels at each crossing), Demo 2 uses braid words: a sequence of integers, where +i means "strand i crosses over strand i+1" (σi) and −i means the reverse (σi⁻¹).

Trefoil  =  [+1, +1, +1] on 2 strands  →  σ₁³
Figure-eight  =  [+1, −2, +1, −2] on 3 strands  →  σ₁ σ₂⁻¹ σ₁ σ₂⁻¹
Hopf link  =  [+1, +1] on 2 strands  →  σ₁²

This is more compact than PD notation — the trefoil needs just three numbers instead of twelve arc labels. The tradeoff is that the topological structure (which arcs connect where) is implicit rather than explicit. We recover it by tracking how strands weave through the crossings.

The writhe is easy to read off a braid word: it is just the sum of the signs. Positive crossings contribute +1, negative crossings contribute −1. So the trefoil [+1, +1, +1] has writhe +3, and the figure-eight [+1, −2, +1, −2] has writhe 0 (two positive, two negative).

4. Resolving crossings on braids

The state-sum computation is fundamentally the same as Demo 1: for each of the 2c states (where c is the number of crossings in the braid word), we resolve every crossing as either an A-smoothing or a B-smoothing, count loops, and accumulate the weighted contribution.

The only subtlety is what "A-smoothing" and "B-smoothing" look like on a braid. For a positive crossing σi:

The two strands at positions i and i+1 get cupped together — they join at both the top and bottom of the crossing, forming two caps. The strands no longer continue through; they turn back. This is the "cup-cap" resolution.

The two strands simply pass straight through — no crossing, no joining. Each strand continues from its top position directly to the corresponding bottom position.

For a negative crossing σi⁻¹, the smoothings are swapped: the A-smoothing goes straight, and the B-smoothing cups.

A positive crossing σ₁ and its two resolutions. A-smoothing: strands cup together. B-smoothing: strands pass straight through.

After resolving all crossings and adding the closure arcs, we count connected components — the loops. The weight is exactly as before: A(#A−#B) · d(loops−1) where d = −A² − A⁻².

5. Counting loops with union-find

In Demo 1, loop counting worked by tracing arc connections around the smoothed diagram. With braids, we use a different but equivalent strategy: union-find.

Think of the braid as a stack of levels. Between each pair of adjacent levels sits one crossing. At each level, there are n positions (one per strand). We create a node for every (level, position) pair — giving us (c+1) × n nodes total.

At each crossing, depending on the resolution: if straight, connect node(level, p) to node(level+1, p) for all positions. If cup, join positions i and i+1 at both the top and bottom of the crossing, and pass all other strands straight through. Finally, the closure arcs connect node(0, k) to node(c, k) for each strand.

Union-find is a classic data structure for tracking connected components. We start with every node in its own component. As we process each crossing and the closure arcs, we merge components. At the end, the number of remaining distinct components is exactly the loop count. This gives us the same information as Demo 1's arc-tracing algorithm, just organized differently to suit the braid structure.

6. Chirality: the mirror test

Braids make one property of knots especially visible: chirality. The mirror image of a knot is what you get by switching every over-crossing to an under-crossing and vice versa. In braid language, this is simply negating every generator: σi ↔ σi⁻¹. The mirror of braid word [+1, +1, +1] is [−1, −1, −1].

A knot is called amphichiral if it is equivalent to its own mirror image. Most knots are not amphichiral — the trefoil, for instance, is distinct from its mirror. The Kauffman bracket detects this: the bracket of the mirror is obtained by replacing A with A⁻¹ (reversing all exponents). If the original and reversed brackets differ, the knot is genuinely chiral.

The figure-eight knot is amphichiral — its bracket is palindromic (reads the same forwards and backwards in terms of powers of A), which means it equals its own mirror. This is an extraordinary topological fact, and the bracket proves it algebraically.

The right-handed trefoil σ₁³ and its mirror σ₁⁻³. Their brackets differ (the knot is chiral). The figure-eight's bracket is palindromic (the knot is amphichiral).

7. Toward the matrix approach

The state sum still costs 2c — the same exponential as Demo 1. But braids open the door to something better. The Temperley-Lieb algebra provides a representation where each braid generator σi maps to a matrix, and the bracket can (in principle) be extracted from the product of those matrices.

For the simplest case — 2 strands — the representation is 1-dimensional (a scalar). Each positive crossing maps to:

ρ(σ₁)  =  A + A−1 · δ  =  A + A−1(−A2A−2)  =  −A−3

And each negative crossing maps to ρ(σ₁⁻¹) = −A³. Notice the mirror symmetry: positive and negative crossings give expressions related by AA⁻¹. This is the algebraic heart of chirality.

For more strands, the matrices grow (dimension equals the relevant Catalan number), but the computation becomes a polynomial-time matrix multiplication instead of an exponential state sum. The full Markov trace construction — which recovers the bracket from the trace of the matrix product — is the subject of Demo 3.

8. What the C code does

The same Poly type from Demo 1 — arrays of integer coefficients with a lowest exponent — is reused identically. Addition and multiplication follow standard polynomial algebra with negative exponents.

A Braid stores the number of strands, the length, and an array of signed integers (the braid word). Positive means σi, negative means σi⁻¹. Five test braids are hard-coded: the right-handed trefoil (σ₁³ on 2 strands), the left-handed trefoil (σ₁⁻³), the figure-eight (σ₁σ₂⁻¹σ₁σ₂⁻¹ on 3 strands), the Hopf link (σ₁²), and the trefoil on 3 strands (σ₁σ₂σ₁).

For a given braid and resolution state, the code creates (len+1) × n nodes. Each crossing either passes strands straight through or cups positions i and i+1 (depending on the smoothing and the crossing sign). Closure arcs are added. Connected components are counted — that is the loop count.

The bracket is computed by the same state sum as Demo 1, just applied to the braid closure. Results are verified against Demo 1's known values: the trefoil, figure-eight, and Hopf link brackets all match exactly. Additionally, the code verifies chirality (the right-handed and left-handed trefoil have mirror brackets) and palindromicity (the figure-eight bracket).

For 2-strand braids, the code computes ρ(σ₁) = A + A⁻¹δ = −A⁻³ and ρ(σ₁⁻¹) = −A³, verifying the representation algebraically. This is the seed for Demo 3's full matrix trace approach.

The interactive tool below is a direct JavaScript port of this C code — the same union-find loop counting, the same polynomial arithmetic, the same braid definitions. Results match exactly.


Interactive Explorer

Choose a braid, toggle smoothings, verify against Demo 1
Right-handed trefoil: σ₁³ on 2 strands. Writhe = +3.
Click crossings to toggle AB smoothing. Click state table rows to jump to states. Compare brackets with Demo 1 results.
Crossings — click to toggle smoothing
Resulting loops for this state
Kauffman Bracket ⟨K⟩ from braid closure
Jones f-polynomial = (−A³)−w⟨K⟩
Verification against Demo 1
braid word A-smoothing B-smoothing loops bracket