---
title: OCF-Based Alternating Algorithm in Octagonal Dynamics
url: https://www.emergentmind.com/topics/ocf-based-alternating-algorithm
type: topic
---

# OCF-Based Alternating Algorithm in Octagonal Dynamics

An OCF-based alternating algorithm is the renormalization procedure on the regular octagon in which the **octagonal continued fraction** of a direction determines a sequence of accelerated geometric updates on quadrangulations of the associated translation surface. In the formulation analyzed in "Octagonal continued fraction and diagonal changes" [2010.04670], the relevant continued-fraction mechanism is the octagon Farey map of Smillie–Ulcigrai, and the underlying fine-scale geometric dynamics are the diagonal changes introduced by Delecroix and Ulcigrai. The central result is that the octagon additive continued fraction algorithm is not a distinct mechanism from diagonal changes: it is their **acceleration**, so that one continued-fraction step groups finitely many elementary geometric moves into a single macro-step [2010.04670].

## 1. Geometric and dynamical setting

The ambient object is the translation surface \(X_O\) obtained by gluing opposite sides of a regular octagon \(O\). Its Veech group contains the dihedral symmetry group \(D_8\) and the involution
\[
\gamma=\begin{pmatrix} -1 & 2(1+\sqrt2)\\ 0 & 1 \end{pmatrix}, \qquad \gamma^2=\mathrm{id}.
\]
The space of directions is \(\Sigma_+\), the upper half of the circle, parametrized either by angle \(\theta\in[0,\pi]\) or by inverse slope
\[
u=\cot(\theta).
\]

The upper half-circle is partitioned into eight sectors
\[
\overline{\Sigma}_j=\left\{\theta\in S^1:\frac{j\pi}{8}\le \theta\le \frac{(j+1)\pi}{8}\right\},\qquad j=0,\dots,7.
\]
Sector \(\overline{\Sigma}_0\) is a fundamental domain for the action of \(D_8\) on \(\Sigma_+\). For each sector \(\overline{\Sigma}_j\), a symmetry \(\nu_j\in D_8\) maps \(\overline{\Sigma}_j\) linearly onto \(\overline{\Sigma}_0\), giving the folding map
\[
\mathrm{fold}:\Sigma_+\to\overline{\Sigma}_0,\qquad \theta\in\overline{\Sigma}_j\mapsto \nu_j(\theta).
\]

This setting matters because the algorithm acts simultaneously on two levels. On the symbolic side, it advances a continued-fraction coding of directions. On the geometric side, it updates quadrangulations and saddle connections on the octagon surface. A plausible implication is that the algorithm should be understood less as a purely number-theoretic expansion than as a renormalization rule for directions on a translation surface [2010.04670].

## 2. Octagonal continued fractions and the Farey map

The **octagon Farey map** is defined by
\[
F=\gamma\circ \mathrm{fold}.
\]
Equivalently, on each sector \(\overline{\Sigma}_j\), it is the branch
\[
F_j=\gamma\nu_j.
\]
In inverse slope coordinate \(u\), each branch is a Möbius transformation
\[
F(u)=\gamma\nu_j * u=\frac{au+b}{cu+d} \qquad \text{for } u\in\overline{\Sigma}_j,
\]
where
\[
\gamma\nu_j=\begin{pmatrix} a & b\\ c & d\end{pmatrix}.
\]
The map is continuous and piecewise projective or linear in angle coordinates, and it is expanding except at sector endpoints [2010.04670].

The itinerary of a direction under \(F\) is its **octagon continued-fraction expansion**. If
\[
s_k=j \iff F^k(\theta)\in \overline{\Sigma}_j,
\]
then
\[
\theta=[s_0;s_1,s_2,\dots]_O :=\bigcap_{k\in\mathbb N} F_{s_0}^{-1}F_{s_1}^{-1}\cdots F_{s_k}^{-1}[0,\pi].
\]
The map shifts this expansion:
\[
F(\theta)=[s_1;s_2,s_3,\dots]_O.
\]

A direction can have at most two expansions, with the usual endpoint ambiguity. The explicit identifications are:
- if \(s_k\) is even, then
  \[
  (\ldots,s_k,1,1,1,\ldots)\sim (\ldots,s_k+1,1,1,1,\ldots),
  \]
- if \(s_k\) is odd, then
  \[
  (\ldots,s_k,7,7,7,\ldots)\sim (\ldots,s_k+1,7,7,7,\ldots).
  \]
Also,
\[
0=[0;7,7,7,\ldots]_O,\qquad \pi=[7;7,7,7,\ldots]_O.
\]

In the OCF-based alternating algorithm, the symbols \(s_k\in\{0,\dots,7\}\) are the control data. Each digit selects a branch \(F_{s_k}\), and therefore selects a prescribed finite block of geometric operations. This is the precise sense in which the procedure is OCF-based [2010.04670].

## 3. Diagonal changes and quadrangulations

The fine-scale geometric mechanism is the **diagonal changes algorithm** on translation surfaces, specialized here to the regular octagon. Its elementary objects are wedges, admissible quadrilaterals, staircases, and staircase moves.

A **wedge** on a translation surface \(X\) is a pair of saddle connections
\[
w=(w_l,w_r)
\]
such that \(w_l\) and \(w_r\) start at the same singularity, \(w_l\) is left-slanted, \(w_l<0\), \(w_r\) is right-slanted, \(w_r>0\), and the two edges are sides of an embedded triangle in \(X\) [2010.04670].

An **admissible quadrilateral** is one whose left- and right-slanted edges alternate cyclically around it. A **quadrangulation** \(Q\) is a decomposition of \(X\) into admissible quadrilaterals. Each quadrilateral has bottom sides forming a wedge \(w=(w_l,w_r)\), top sides, and a diagonal \(w_d\). It is called left-slanted if its diagonal is left-slanted and right-slanted if its diagonal is right-slanted.

The elementary geometric update is the **diagonal change**. If a quadrilateral \(q\) is left-slanted, the base wedge is replaced by
\[
w'=(w_l,w_d).
\]
If \(q\) is right-slanted, it is replaced by
\[
w'=(w_d,w_r).
\]

A **left staircase** is a cyclic chain of quadrilaterals glued so that top-left sides identify with next bottom-right sides; a **right staircase** is defined symmetrically by top-right with next bottom-left. If all quadrilaterals in the staircase are left-slanted or right-slanted, the staircase is **well slanted**. A **staircase move** is simultaneous diagonal change in all quadrilaterals of a well-slanted staircase [2010.04670].

The quadrangulation also has a combinatorial encoding. For a labeled quadrangulation \(Q\) with \(k\) quadrilaterals, the datum is a pair of permutations
\[
\underline{\pi}=(\pi_l,\pi_r),
\]
where the top-left side of \(q_i\) glues to the bottom-right side of \(q_{\pi_l(i)}\), and the top-right side of \(q_i\) glues to the bottom-left side of \(q_{\pi_r(i)}\). The train-track relations are
\[
w_{i,l}+w_{\pi_l(i),r}=w_{i,r}+w_{\pi_r(i),l}.
\]
For a cycle \(c\) of \(\pi_r\) or \(\pi_l\), a staircase move changes the combinatorics by explicit permutation updates and transforms the length data linearly via
\[
\underline{w}'=A_{\underline{\pi},c}\,\underline{w}.
\]

These definitions are the non-accelerated substrate of the algorithm. The OCF-based alternating algorithm packages such staircase and diagonal changes into sector-dependent blocks rather than executing them one by one [2010.04670].

## 4. Acceleration and the alternating structure

The main theorem states:

> **The octagon additive continued fraction algorithm defined in Smillie–Ulcigrai is an acceleration of the diagonal changes algorithm for the octagon** [2010.04670].

Equivalently, the octagon Farey map \(F\) is obtained by composing a finite number of elementary diagonal changes until the next continued-fraction step is reached. Thus diagonal changes are the fine-scale procedure, while the octagon Farey map records their net effect after a complete block.

This is the precise content of **acceleration** in the paper. The diagonal changes algorithm produces a detailed path in the move graph; the octagon Farey map gives the induced transformation after traversing one whole block of that path. The relation is explicitly compared with the classical fact that the Gauss map is an acceleration of the one-dimensional Farey map [2010.04670].

The procedure is also described as **alternating**. The relevant alternation is not between two optimization blocks or two players, but among different kinds of geometric operations:
- direct staircase changes,
- symmetry operations,
- relabelings,
- and changes in the type of staircase, left or right.

This is especially visible in even sectors, where orientation-reversing symmetries must be inserted to match the branch structure of the octagon Farey map. The paper therefore interprets the accelerated procedure as an alternating algorithm because one effective step is a composition of different operation types rather than a repetition of a single uniform move [2010.04670].

A plausible implication is that “alternating” here names a structural property of the renormalization block: symbolic normalization, geometric diagonal change, and combinatorial relabeling are interleaved within each continued-fraction step.

## 5. Sector-wise decomposition into finite move words

The regular octagon has a special quadrangulation \(Q_0\). If a direction \(\theta\) lies in sector \(\overline{\Sigma}_{s_0}\), the initial quadrangulation is
\[
Q=\nu_{s_0}^{-1}Q_0.
\]
The branch \(F_{s_0}\) opens the sector and the paper works with
\[
Q'=\gamma Q_0.
\]
This opened quadrangulation has combinatorial datum
\[
\pi_l=(1,2)(3),\qquad \pi_r=(1)(2,3).
\]

Because even sectors involve orientation-reversing symmetries, two auxiliary operations are introduced:
1. **Symmetry**, which interchanges left and right vectors in every quadrilateral.
2. **Relabeling**, because after a cycle of moves the combinatorics may return only up to a permutation of labels.

The paper gives a reduced graph of allowed moves in \(H(2)\) and identifies basic move words such as
- \(\cdot rr\),
- \(r\cdot\cdot\),
- \(lll\),
- symmetry.

For each sector \(\overline{\Sigma}_j\), a finite word in these elementary moves has total action equal to the branch \(F_j\) of the octagon Farey map. The paper gives explicit examples [2010.04670]:

| Sector | Word of moves | Matrix information |
|---|---|---|
| \(\frac{\pi}{8}\le \theta\le \frac{2\pi}{8}\) | \(\cdot rr,\; r\cdot\cdot,\; \cdot rr\) | matrix \(A_1\) given explicitly |
| \(\frac{2\pi}{8}\le \theta\le \frac{3\pi}{8}\) | \(\cdot rr,\; lll,\; r\cdot r,\; \cdot r\cdot,\; \text{symmetry}\) | matrix \(A_2\) explicitly given |
| Third sector | \(\cdot rr,\; lll,\; lll,\; \cdot rr\) | matrix \(A_3\) |

For the first sector, the matrix is
\[
A_1=
\begin{pmatrix}
1 & 0 & 0 & 1 & 0 & 0\\
0 & 1 & 0 & 0 & 0 & 0\\
0 & 1 & 1 & 0 & 0 & 1\\
0 & 0 & 0 & 1 & 0 & 0\\
0 & 1 & 0 & 0 & 1 & 1\\
0 & 0 & 0 & 0 & 0 & 1
\end{pmatrix}.
\]
The fourth, fifth, sixth, and seventh sectors are likewise described by explicit words and matrices \(A_4,\dots,A_7\), and the appendix contains drawings of the actual geometric staircase moves [2010.04670].

These sector words are the operational core of the algorithm. One continued-fraction digit chooses one sector, and the sector chooses one finite word of elementary moves. That is the exact mechanism by which OCF digits control alternating geometric renormalization.

## 6. Coding, execution, and interpretation

The key dynamical relation
\[
F(\theta)=[s_1;s_2,s_3,\dots]_O
\]
means that each digit \(s_k\) specifies the next normalization sector. Geometrically, the paper describes the process as follows [2010.04670]:

1. \(s_0\) determines the initial placement of the quadrangulation,
   \[
   Q=\nu_{s_0}^{-1}Q_0.
   \]
2. Applying \(F_{s_0}\) opens the relevant sector and puts the surface into the standard position
   \[
   Q'=\gamma Q_0.
   \]
3. The next digit \(s_1\) determines which sequence of diagonal changes to perform on \(Q'\).
4. Repetition produces a sequence of quadrangulations and saddle connections approximating the direction \(\theta\).

The paper also gives a concrete implementation viewpoint. For an irrational direction \(\theta\in[0,\pi]\), one determines the sector \(\overline{\Sigma}_{s_0}\), initializes \(Q=\nu_{s_0}^{-1}Q_0\), applies the corresponding sector word, updates quadrangulation and length data by the associated matrix product, computes the new direction \(F(\theta)\), and repeats [2010.04670].

This suggests that the OCF-based alternating algorithm is simultaneously:
- a symbolic algorithm, because it shifts the expansion \([s_0;s_1,s_2,\dots]_O\mapsto [s_1;s_2,\dots]_O\);
- a geometric algorithm, because it acts on wedges, quadrangulations, and saddle connections;
- and a linear-algebraic algorithm, because the length data evolve by explicit matrices attached to move words.

The paper emphasizes that intermediate vectors, analogous to intermediate convergents in the classical Farey–Gauss setting, are naturally represented by the finer diagonal changes. A plausible implication is that the accelerated continued-fraction description suppresses this intermediate structure, while the non-accelerated diagonal-change model retains it [2010.04670].

## 7. Significance and relation to adjacent notions

The principal significance of the OCF-based alternating algorithm is conceptual: it identifies the octagonal continued fraction of Smillie–Ulcigrai with an accelerated geometric renormalization procedure rather than an isolated symbolic construction. In this perspective, octagonal continued-fraction digits are not merely labels of sectors; they are instructions for finite blocks of diagonal changes, possibly augmented by symmetry and relabeling [2010.04670].

This addresses a natural misconception. The octagon Farey map might appear to define a self-contained continued-fraction algorithm unrelated to the local geometry of quadrangulations. The paper shows the opposite: each branch \(F_j\) is realized by a finite word in the diagonal-change calculus, so the continued fraction is a symbolic code for an underlying geometric process [2010.04670].

The term “OCF-based alternating algorithm” therefore refers most precisely to a procedure in which:
- the **OCF** component is the octagonal continued fraction
  \[
  \theta=[s_0;s_1,s_2,\dots]_O,
  \]
- the **based** component is the selection of sector branches \(F_{s_k}\),
- and the **alternating algorithm** component is the composition of diagonal changes, symmetry, relabeling, and left/right staircase-type transitions into accelerated blocks.

Within the scope of the paper, the bottom-line characterization is concise: the octagon Farey map
\[
F=\gamma\circ\mathrm{fold}
\]
is an acceleration of the diagonal changes algorithm on the regular octagon, and the octagonal continued-fraction digits provide the symbolic coding of that geometric alternating renormalization process [2010.04670].

Source: https://www.emergentmind.com/topics/ocf-based-alternating-algorithm