Webring Winding Number (WWN)
Table of Contents
The Webring Winding Number (WWN) tracks how many times a visitor has traversed a webring. Traditional webrings are stateless — click "next" and you arrive with no memory of your journey. WWN encodes the traversal state in the URL itself: how many complete circuits (\(w\)), how many direction reversals (\(t\)), and which way you're going (\(d\)). This gives every URL a coordinate on a topological surface.
A webring with \(\text{ord}\) members and next/prev navigation has topology determined by how \(w\) is handled at boundaries:
| Design | \(w\) space | Topology | \(\pi_1\) |
|---|---|---|---|
| Unbounded | \(\mathbb{Z}\) | Cylinder (infinite) | \(\mathbb{Z}\) |
| Clamped | \([-N, N]\) | Cylinder (finite, capped) | \(\mathbb{Z}\) |
| Wrapped | \(\mathbb{Z}_{2N+1}\) | Torus | \(\mathbb{Z} \times \mathbb{Z}\) |
We implement wrapped: \(w\) wraps at \(\pm 8191\) (\(2^{13}-1\), Mersenne prime), giving \(w \in \mathbb{Z}_{16383}\). The state space is a discrete torus \(\mathbb{Z}_{\text{ord}} \times \mathbb{Z}_{16383}\) with \(\pi_1(T^2) \cong \mathbb{Z} \times \mathbb{Z}\). The hole is real. Bot crawlers trace torus knots whose homotopy class fingerprints their behavior.
State: \(\mathcal{C} = \langle \text{ord}, k, w, t, d \rangle\)
| Parameter | Domain | Description |
|---|---|---|
| ord | \(\mathbb{N}^+\) | Order of cyclic group \(\vert\mathbb{Z}_{\text{ord}}\vert\) |
| k | \(\mathbb{Z}_{\text{ord}}\) | Element in cyclic group (1-indexed) |
| w | \(\mathbb{Z}_{16383}\) | Winding number (wraps at \(\pm 8191\)) |
| t | \(\mathbb{N}\) | Turning count (direction reversals) |
| d | \(\{+, -\}\) | Direction (+ = positive, default) |
The Winding Number
From Wikipedia:
The winding number of a closed curve in the plane around a given point is an integer representing the total number of times that the curve travels counterclockwise around the point. The winding number depends on the orientation of the curve, and is negative if the curve travels around the point clockwise.
Integral Formula
For a closed curve \(\gamma\) around point \(z_0\) in the complex plane:
\begin{equation} \text{Ind}_\gamma(z_0) = \frac{1}{2\pi i} \oint_\gamma \frac{d\zeta}{\zeta - z_0} \in \mathbb{Z} \end{equation}This integer-valued result is a *topological invariant*—it doesn't change under continuous deformation of the path. The formula connects complex analysis (Cauchy integral) with algebraic topology.
Fundamental Group of the Circle
The set of homotopy classes of loops on the circle forms a group:
\begin{equation} \pi_1(S^1) \cong \mathbb{Z} \end{equation}Every loop on the circle is characterized by a single integer: its winding number. Two loops are homotopic (continuously deformable into each other) if and only if they have the same winding number. Counterclockwise is positive, clockwise is negative.
Winding vs Turning Number
From Wikipedia's example:
This curve has total curvature 6π, turning number 3, though it only has winding number 2 about p.
For a WebRing with ord=7 sites, consider a user navigating:
site₁ ←──── site₇
↓ ↑
site₂ site₆ Ring<ord=7>
↓ ↑
site₃ ────→ site₅ User path: 1→2→3→2→3→4→5→6→7→1
↘ ↗
site₄
Path analysis for 1→2→3→2→3→4→5→6→7→1:
- Winding (w): 1 — completed one full circuit
- Turning (t): 1 — reversed direction once (at site 3)
- Total steps: 9 — but that's not tracked
The distinction:
- Winding: Complete circuits around the ring (crossing the 7→1 boundary)
- Turning: Direction reversals (changing from next to prev or vice versa)
State after this path: \(\mathcal{C} = \langle \text{ord}=7, k=1, w=1, t=1, d=+ \rangle\)
Formal Definition
For a WebRing \(\mathcal{R}\) with \(\text{ord}\) sites (order of cyclic group \(\mathbb{Z}_{\text{ord}}\)), define the navigation state:
\begin{equation} \mathcal{C} = \langle k, w, t, d \rangle \quad \text{where} \quad k \in \mathbb{Z}_{\text{ord}}, \; w \in \mathbb{Z}_{16383}, \; t \in \mathbb{N}, \; d \in \{+, -\} \end{equation}Transition functions:
- \(\text{next}: \mathcal{C} \to \mathcal{C}'\) where \(k' = (k \mod \text{ord}) + 1\), \(w' = w + \mathbf{1}_{k=\text{ord}}\), \(t' = t + \mathbf{1}_{d=-}\), \(d' = +\)
- \(\text{prev}: \mathcal{C} \to \mathcal{C}'\) where \(k' = ((k-2) \mod \text{ord}) + 1\), \(w' = w - \mathbf{1}_{k=1}\), \(t' = t + \mathbf{1}_{d=+}\), \(d' = -\)
The indicator \(\mathbf{1}_{cond}\) is 1 if condition holds, 0 otherwise. Default state is \(d=+\) (positive/forward).
Webring as \(S^1\)
A webring is a discrete set of ord sites arranged in a cycle. Topologically, this is a finite sampling of \(S^1\).
Why Ring Size Doesn't Matter
Consider a webring with ord sites arranged on a circle. The key insight:
ord = 1: ●──────────────────● (self-loop)
↺
ord = 3: ●───●───●───●───● (triangle, but still $S^1$)
↺
ord = ∞: ●●●●●●●●●●●●●●●●●● (dense points, still $S^1$)
↺
The number of sites is irrelevant to the topology. All of these are homeomorphic to \(S^1\). The winding number w tracks complete circuits, not individual hops.
The Degenerate Case: ord = 1
When ord = 1 (a ring of one), every navigation is a wraparound:
| Action | Position Change | Winding Change |
|---|---|---|
| next | k=1 → k=1 | w → w+1 |
| prev | k=1 → k=1 | w → w-1 |
You're spinning in place, but the winding number still accumulates. This is mathematically identical to walking in a circle—even a circle of radius zero has well-defined winding.
Visualization
The visualization shows:
- A circle (the ring, regardless of ord)
- A marker that moves around it
- A spiral that accumulates to show winding history
- The winding number w at center
The ring could have 1 site or 1000—the winding behavior is identical.
Related Documents
| Document | Description |
|---|---|
| Winding Ring Spec | URL protocol, state transitions, behavioral classes |
| Sheaf Model | DAG fibers over the ring — intra-site navigation model |
| Auto-Navigation | The auto parameter: one-shot redirects and self-DDoS |
| Implementation Context (v0.1) | Historical: original JavaScript, manifest format |
| Visualization | Python-generated winding diagrams |
| Test Procedures | Verification cases for state transitions and boundaries |
References
- Webring - The 1990s web navigation structure this project revives
- Winding Number - Wikipedia overview of the concept
- Fundamental Group - The algebraic structure behind π₁(\(S^1\)) ≅ ℤ
- Winding numbers and the fundamental theorem of algebra - UCL lecture notes
- nLab: Winding Number - Category-theoretic perspective
- Hatcher, A. Algebraic Topology, Chapter 1.1 - The fundamental group of \(S^1\)
Example URLs
"You built a ring of 1 and want to see how many times they circle around?"
"Yes."
7 examples for consistency with ord=7 mock ring:
