Cayley Graph Diameters of Zaremba’s Semigroup
The Finding
For each prime , the Cayley graph of in — where vertices are group elements and edges connect elements differing by one generator — has a diameter satisfying:
Note: 172 is the exact prime count (). Only prime moduli are tested since is well-defined as a group for prime . The maximum ratio 3.11 occurs at ; for the ratio stays below 2.89.
The ratio is decreasing and appears to converge to approximately , suggesting:
This asymptotic claim is based on the empirical trend over two orders of magnitude in and should be treated as a conjecture, not a proven bound. Quantitatively: over the range (108 primes), the maximum ratio drops from 1.73 to 1.44 and the minimum from 1.51 to 1.37. The ratio at is 1.44. A formal statistical analysis (regression with confidence intervals) has not been performed; the sample is too small for reliable extrapolation, and the apparent convergence could slow or reverse beyond .
The maximum diameter observed is 10, first achieved at .
Why This Matters
Direct Bound on Continued Fraction Length
The Cayley diameter equals the maximum continued fraction length needed to represent any element of as a product of the generators . Since continued fraction convergents correspond to products of these matrices, the diameter bounds the worst-case CF length needed to hit any denominator class modulo .
Note: the correspondence between Cayley diameter in and CF length over is subtle — reduction mod can lose information. The diameter gives an upper bound on CF length modulo , but lifting to integer continued fractions requires additional arguments (see Bourgain-Kontorovich 2014, Section 4).
If with explicit , this could feed into an effective for Zaremba’s Conjecture via the Bourgain-Kontorovich circle method (Bourgain-Kontorovich, 2014).
Connection to Property (τ)
The logarithmic diameter growth is consistent with property (τ) — the spectral gap of the Cayley graph Laplacian remains bounded away from zero as . Combined with our spectral gap data ( for all square-free ) and transitivity proof, this provides three independent lines of evidence that the semigroup has strong expansion properties.
The connection between spectral gap and diameter is classical: for a -regular Cayley graph on vertices with spectral gap , the diameter satisfies (Chung, 1989). Our spectral gap data predicts exactly the logarithmic diameter growth we observe.
Comparison with Known Results
Helfgott’s growth theorem (Helfgott, 2008) implies that generating sets of produce Cayley graphs with diameter , but without explicit constants. Bourgain-Gamburd (Bourgain-Gamburd, 2008) proved that random generators give spectral gaps bounded away from zero, yielding diameter. Our computation provides, to our knowledge, the first explicit numerical data for the Zaremba generators specifically, with the constant approaching .
Data
| Prime range | Count | Max diam | Max ratio | Min ratio |
|---|---|---|---|---|
| 15 | 5 | 2.89 | 1.44 | |
| 10 | 7 | 2.52 | 1.53 | |
| 21 | 8 | 1.79 | 1.51 | |
| 62 | 10 | 1.61 | 1.45 | |
| 87 | 10 | 1.44 | 1.37 |
Sample data points:
| diam | diam/ | |||
|---|---|---|---|---|
| 2 | 6 | 2 | 0.69 | 2.89 |
| 5 | 120 | 5 | 1.61 | 3.11 |
| 13 | 2184 | 6 | 2.56 | 2.34 |
| 101 | 1030200 | 8 | 4.62 | 1.73 |
| 211 | 9393480 | 10 | 5.35 | 1.87 |
| 509 | 131906220 | 10 | 6.23 | 1.61 |
| 1021 | 1064296620 | 10 | 6.93 | 1.44 |
Method
For each prime :
- Encode elements of as integers:
- GPU BFS from the identity , expanding all frontier nodes in parallel
- Each thread computes 10 neighbors (5 generators + 5 inverses) via right-multiplication
- Visited set: bitset of size bytes with
atomicOrfor lock-free marking - Frontier double-buffered: current → next, swap each level
- Diameter = number of BFS levels until frontier is empty
- Validation: after BFS completes, count set bits in the visited bitset and verify it equals the known group order . Any mismatch (from early termination, hash collisions, or encoding errors) would be flagged. All 172 primes passed this check.
Measured throughput for : nodes visited in seconds on 8× B200 GPUs, yielding BFS node expansions per second per GPU. Total wall time across all 172 primes was 40 seconds.
The group has order . For : , bitset MB.
References
- Zaremba, S.K. (1972). “La méthode des ‘bons treillis’ pour le calcul des intégrales multiples.” Applications of Number Theory to Numerical Analysis, pp. 39–119.
- Bourgain, J. and Kontorovich, A. (2014). “On Zaremba’s conjecture.” Annals of Mathematics, 180(1), pp. 137–196. arXiv:1107.3776
- Bourgain, J. and Gamburd, A. (2008). “Uniform expansion bounds for Cayley graphs of .” Annals of Mathematics, 167(2), pp. 625–642.
- Helfgott, H.A. (2008). “Growth and generation in .” Annals of Mathematics, 167(2), pp. 601–623. arXiv:math/0509024
- Chung, F.R.K. (1989). “Diameters and eigenvalues.” Journal of the AMS, 2(2), pp. 187–196.
- Dickson, L.E. (1901). Linear Groups with an Exposition of the Galois Field Theory. B.G. Teubner, Leipzig.
Code
# Compile (requires CUDA)
nvcc -O3 -arch=sm_100a -o cayley_gpu scripts/experiments/zaremba-transfer-operator/cayley_gpu.cu
# Run for all primes up to 1021
./cayley_gpu 1021
Source: scripts/experiments/zaremba-transfer-operator/cayley_gpu.cu
Computed on 8× NVIDIA B200 (1.43 TB VRAM, Blackwell architecture, CUDA 12.8), 40 seconds total. Full BFS logs and per-prime diameter data available in the GitHub repository.
This work was produced through human–AI collaboration (Cahlen Humphreys + Claude). Not independently peer-reviewed. All code and data open for verification at github.com/cahlen/idontknow.