I study how the quality of a rank estimate changes when an invertible multiplier rearranges a pattern.
Use case
To retrieve the kth event of a sparse periodic signal, I can estimate its position from density, then correct it with an exact counter. Variance informs the typical correction size. I want to know whether two equal-density phase patterns are interchangeable when tuning the index.
A usable counterexample
On seven positions, {0,1,2} and {0,1,3} have the same mean prefix variance, 8/49, across invertible multipliers. The dispersion of that variance is 8/1029 and zero respectively. I checked all 128 subsets modulo seven and three CRT products by enumeration. These two patterns serve as calibration fixtures.
Next step
I will compare actual rank correction counts with and without calibration on larger periodic tables. Multiplication must be a permissible transformation in the application. A mean-square result does not guarantee maximum latency.

Both patterns have mean V(u) of 8/49. Across the six invertible multipliers the dispersion is 8/1029 for {0,1,2} and zero for {0,1,3}.
Reproducing the example
After extracting the files, I run python experience.py (Python 3.10+). The file resultats.json contains the reference output.
Prior work
Montgomery & Vaughan · Granville & Kurlberg
Additional evidence
For fixed-pattern variance, half-list reflection reduces work in the Green contraction. Conductor caching can increase runtime. Both controls concern the cost of measuring variance. Folding · Caching
When does dilation leave prefix variance unchanged?
Multiplying all event times by a unit preserves their density over one period. I ask when it also preserves the mean-square fluctuation of the counting error. On 15 ticks, the masks {0} modulo 3 and {0,1} modulo 5 give events {0,6}. Doubling gives {0,12}. The variance of the counting error changes from 62/675 to 116/675. On 35 ticks the masks {0,1,2,3} modulo 5 and {0,1,3} modulo 7 give the same variance 338/1225 for all 24 dilations.
Proposition AT.A4 for review. I take a period R that is a product of distinct primes and a nonempty mask Aₚ on each wheel. For a unit u and a threshold X uniform on {0,…,R−1}, let V(u) be the variance of the number of events of uA strictly before X after subtracting density times X. Then V(u) is the same for every unit if and only if, on every prime wheel, all nonzero differences between mask elements occur equally often, counting ordered pairs. Full masks are allowed. If any mask is empty, the product is empty and V vanishes regardless of the other masks.
Proof
1. What a single wheel detects. Write Bₚ(h)=#{x∈Aₚ : x+h∈Aₚ}, Kₚ(h)=p²−1−6h(p−h) for 0≤h<p, and Fₚ(v)=Σᵧ Kₚ(y) Bₚ(vy). The counter’s Green identity gives Fₚ(u⁻¹)=12p² V(u) on a single wheel. I use the unnormalised Fourier sum with exponential exp(−2πijh/p). The second difference 2Kₚ(h)−Kₚ(h−1)−Kₚ(h+1) on the cycle is 12(p·1h=0−1). The transform of Kₚ at j≠0 is therefore 3p/sin²(πj/p), with zero at j=0. The transform of Bₚ is H(j)=|Σₓ∈Aₚ exp(−2πijx/p)|². Fourier inversion gives
Fₚ(v) = 3 Σ (1 ≤ j < p) wⱼ H(jv⁻¹), where wⱼ = 1/sin²(πj/p).
H is even. For odd p, frequencies 1 and −1 together carry more than half the total weight. Indeed Σwⱼ=(p²−1)/3 and 4/sin²(π/p) ≥ 4p²/π² > (p²−1)/3. One can recover the sum by differentiating the cotangent identity Σ (0 ≤ j < p) cot(x+πj/p)=p cot(px) and taking x to zero. Dowker on finite cosecant sums
Suppose Fₚ is constant. Subtract the mean of H over the nonzero frequencies. The resulting weighted sum is zero for every v, by averaging over v. If the centred function had absolute maximum M>0, choose v⁻¹ at that maximum. Terms 1 and −1 would have the same sign and their total magnitude would exceed the bound on all remaining terms together. The sum could not vanish. Hence H is constant away from zero. By Fourier inversion Bₚ is constant away from zero. For p=2 there is only one nonzero difference. The equivalence between a flat spectrum and a difference set is classical. Turyn, Character sums and difference sets
2. Why the remaining wheels cannot hide that variation. I fix coordinate v=uₚ⁻¹ and average 12R² V(u) over the other coordinates, which are independent by the Chinese remainder theorem. In the Green formula the factor at wheel q≠p becomes c(q) + b(q)·1q∣h, where t(q)=|Aq|, c(q)=t(q)(t(q)−1)/(q−1) and b(q)=t(q)−c(q). Set S=R/p. Expanding the product, the selected indicators specify a divisor d of S. Its term retains only multiples of d.
For y modulo p, the multiples of d whose quotient is y modulo p are d(y+pj) for 0≤j<S/d. Summing the quadratic kernel KR on those points gives
Σⱼ KR(d(y+pj)) = dS Kₚ(y) + (d²−1)S/d.
Summing the second term against Bₚ(dvy) is independent of v since Σᵧ Bₚ(dvy)=tₚ². Write T(q) f(v)=f(qv modulo p), and let I be the identity. Expanding now gives the following conditional average up to an additive constant independent of v,
S · ∏q≠p(c(q) I + q b(q) T(q)) Fₚ(v).
Each T(q) permutes coordinates. For 1≤t(q)c(q)≥0. If this factor annihilated a function f, the maximum norm would give q b(q)‖f‖∞=c(q)‖f‖∞, hence f=0. For a full mask the factor is qI. Each factor is therefore invertible and takes constants to constants with a nonzero multiplier. If V is constant so is its conditional average. Inverting the factors shows that Fₚ is constant. Step 1 applies to every p. Conversely, if every Bₚ is constant away from zero, every product of local autocorrelations in the Green formula is invariant under dilation. This proves the equivalence.
Exact checks and scope
I compare two calculations for every dilation of every labelled mask pair. The first counts prefixes directly, the second applies the Green kernel to the product of local autocorrelations. Among proper nonempty masks, 60 of 180 pairs satisfy the criterion on 3 × 5 and 420 of 3,780 on 5 × 7. I report empty and full masks separately. The program also checks 61 conditional averages on five test configurations including three-wheel products. I independently check the single-wheel step by computing the exact determinant of the kernel matrix on differences grouped up to sign. It is nonzero at each of the 14 odd primes from 3 to 47. After extracting the kit I run python dispersion.py and compare the output with controle-03.json. Finite certificate
I draw on the literature on difference sets and Chinese remainder products. My proposed contribution is the necessity of the local criterion for this prefix variance, using two dominant frequencies and inversion after conditional averaging. Bibliographic priority for this particular statement remains open. Approximate calibration raises a quantitative question. How much must the variance change when one local autocorrelation departs from a constant? Kowalski and Soundararajan on CRT sets
How much must variance change when one wheel is irregular?
I use AT.A4’s strict-prefix variance V(u) and write osc V = max V − min V over the units modulo R. On wheel p, eₚ is the maximum deviation of the ordered difference count Bₚ(h) from its off-zero mean. For nonempty masks my rational bound is
osc V ≥ eₚ · (R/p) · p(p²+5) · ∏_{q≠p} d_q / [60(p−1)R²].
For a q-wheel of size t, put c=t(t−1)/(q−1). For t<q, d_q=q(t−c)−c is positive. A full wheel has d_q=q. An empty wheel makes product variance zero. For p=2 the deviation is zero.
Proposed proof. I extend Bₚ−cₚ by zero at h=0. Its transform D vanishes at frequency zero. Elsewhere it equals AT.A4’s spectrum H minus its off-zero mean. Fourier inversion gives eₚ≤(p−1)‖D‖∞/p. For odd p, choose the local multiplier that sends frequencies ±1 to an absolute maximum of D. Since D is even, the reverse triangle inequality gives a lower bound of 3(4/sin²(π/p)−(p²−1)/3)‖D‖∞ on the norm of the centred local F. By sin x≤x and π²<10 the parenthesis is at least (p²+5)/15.
In AT.A4’s conditional mean of 12R²V, each operator cI+q(t−c)T acts on a centred function. T permutes coordinates, so the reverse triangle inequality bounds the output norm below by d_q times the input norm. A full wheel acts as qI. The projection contributes R/p and the norm of a centred conditional mean is at most osc(12R²V). Combining yields the stated constant. Cosecant sums, difference sets and dominance estimates have established antecedents. I propose the explicit constant for this counter. Priority needs further review. Dowker · Turyn · Varah
What the bound guarantees. On all 180 and 3,780 proper pairs on the 3×5 and 5×7 grids, I check the inequality using direct prefixes and the Green kernel in exact arithmetic. Even the smallest observed-to-positive-bound ratio is 32/5. For {0} modulo 3 and {0,1} modulo 5, I observe 2/25 for a guarantee of 1/80. This detects irregularity but leaves considerable quantitative slack. I include three additional empty, full or three-wheel examples. I run python stabilite.py and compare with controle-04.json. Register
The largest ratio on 5 × 7 is 1420/63. Both masks {0,1,2} attain it, with oscillation 142/245 and bound 9/350. All positive ratios on 3 × 5 equal 32/5.
Two origins in the same fibre give different windows
On the 210 wheel I count units in a width-six window. Uniform origins in the 0 mod 6 fibre give an empty-window probability of 2/35. At fixed origins 90 and 0 of this same fibre I find zero and one unit respectively. I check total variance across all six fibres.
My next test is to test other widths and an anchor policy fixed before measurement. AT.V2 · Granville & Kurlberg, Poisson statistics via the Chinese remainder theorem
I run python fibre09.py.
Empty-window risk changes when I select the origin
On wheel 210, I compare a uniform origin with a policy that reads two windows in the same fibre and keeps the less populated one. At width six, the empty-window probability rises from 2/35 to 4/35 at the cost of one extra read. At width four it rises from 8/35 to 44/105. I verify variance decomposition across all six fibres for four widths.
I plan to predict two-window risk from the intersection of empty events and test it on a new wheel. AT.V4 · Granville & Kurlberg, Poisson statistics via the Chinese remainder theorem
I run python selection10.py.
Recovering local differences from variances
On a squarefree product with nonempty masks of known sizes, I propose recovering each local difference histogram from exact prefix variances under dilation. I supply an inversion on even characters, eleven rational reconstructions and two indistinguishable masks modulo 13.
Bound error for estimated conditional means and search for prior work on this inverse map. AT.A7 · Turyn, Character sums and difference sets
Two-read risk on a held-out wheel
I test wheel 2,310. At width six the empty probability is 8/77 at a uniform origin and 34/165 when choosing the less populated of two windows six ticks apart. Both windows are empty at four origins. On period 77 I recover mean variance 3068/5929 over 60 dilations.
Determine the cost of measuring the conditional means needed by the inversion. AT.V6 · Granville & Kurlberg, Poisson statistics via the Chinese remainder theorem
Rounding a noisy inverse
I know the mask sizes and a bound on the absolute error of every conditional mean. For odd p I keep (p−3)/2 means plus the sum of differences. The maximum inverse row norm gives a certified rounding radius. I compute twelve rational radii and check adversarial signs on 36 cases. With target 13 and three open positions at auxiliary period five, five means tolerate errors strictly below 171/5915.
I want to choose observed classes using noise and acquisition cost. AT.A8 · Turyn, Character sums and difference sets · English proof
Two means for 34 histograms
I fix four positions modulo 13 and three on the auxiliary wheel modulo five. I distinguish all 34 realisable histograms with the means at classes 1 and 2. Every single class has a collision. The dictionary tolerates errors strictly below 9/1690 per mean. I check all 34 signatures by direct prefix counting.
I seek the class pair with the best radius and a rule avoiding exhaustive dictionary construction. AT.A9 · Turyn, Character sums and difference sets · English proof
Choosing dilations that separate histograms
I fix four residues out of thirteen, the auxiliary mask {0,1,3} modulo five and the maximum norm on observations. I compare all 561 histogram pairs for each of 56 designs with two through five classes. The best strict decoding radii are 9/1690, 57/1690, 48/845 and 123/1690. The dictionary contains 204 scores derived from 220 anchored masks.
Compare the radii on a second modulus against an independently selected design. AT.A10 · Hoeffding, Probability inequalities for sums of bounded random variables · Proof and protocol
How many prefix reads identify a histogram?
I reserve 12 of the 34 dictionary representatives for the noise experiment and use 32 seeds. I sample two independent uniform prefixes to estimate each variance. With four classes and 128 pairs per variance I uniquely identify the histogram in 367 of 384 trials, using 2,048 prefix calls per trial. An exact scan uses 520 positions. The simultaneous 95% Hoeffding bound is sufficient at 2,038,389 pairs per variance for this design.
Test stratification and actual prefix access cost at equal budgets. AT.A11 · Hoeffding, Probability inequalities for sums of bounded random variables · Proof and protocol
Recovering the mask from adjacent prefix counts
I have an exact prefix-count oracle for a product of coprime periods and know the nonempty auxiliary mask. I choose one compatible representative per target residue. The difference of adjacent prefix counts gives its membership bit. Without a dictionary I recover all 715 four-position masks modulo 13 in 23 distinct calls per mask, and all 2,380 modulo 17 in 30 calls. At 17 the stratified design at 480 reads succeeds in 265 of 272 trials.
I will revisit acquisition if an instrument supplies aggregate variances or imposes a different access cost. AT.A12 · Raman, Raman & Satti, Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets
I reproduce acquisitions with python lecture14.py and local timings with python lecture14.py --measure. I fix the auxiliary mask {0,1,3} modulo five. For each target residue I choose its first representative inside that mask and read two adjacent integer prefixes. For the noisy comparison I hold out every fifth histogram and use sixteen seeds per histogram. At modulus 17 and 480 reads, uniform pairs, sampling without replacement and stratification modulo five give 116, 262 and 265 uniquely correct identifications in 272 trials. My deterministic enclosure certifies none at this budget. I give results by budget and all separation radii in lecture14.json.
Download bilingual starter kit ↓