| @@ −0,0 +1,204 @@ |
| 1 | +# Erdős #530: Sidon subsets of dense sets in Z_m (the extraction step) |
| 2 | + |
| 3 | +Task t-e21e83f893. Status labels: **[proved]** means a complete proof on paper |
| 4 | +in this file, **[computed]** means exact computation rerun offline here, |
| 5 | +**[unverified]** means recalled from memory without a source check. No network |
| 6 | +was available in this sandbox, so every literature statement is unverified. |
| 7 | + |
| 8 | +## Setup |
| 9 | + |
| 10 | +A set S ⊆ Z_m is *Sidon* (Mathlib `IsSidon`) if a+b = c+d in S forces |
| 11 | +{a,b} = {c,d}. Equivalently, the residues a−b over ordered pairs a ≠ b in S |
| 12 | +are pairwise distinct. This also rules out 2a = 2b, i.e. b − a = m/2. |
| 13 | +For D ⊆ Z_m write F(D) for the size of a largest Sidon subset of D, and |
| 14 | + |
| 15 | + g(δ) = liminf_{m→∞, m ∈ 𝓜} min_{D ⊆ Z_m, |D| ≥ δm} F(D)/√m, |
| 16 | + |
| 17 | +where 𝓜 is the set of Singer moduli q²+q+1 (q a prime power) and Ruzsa moduli |
| 18 | +p(p−1) (p prime). Restricting to 𝓜 matters: for a general m, Z_m is not known |
| 19 | +to contain a Sidon set of size (1−o(1))√m. Taking an integer Sidon set inside |
| 20 | +[0, m/2) gives only √(m/2). The 0.385 proof uses moduli from 𝓜 anyway: by the |
| 21 | +prime number theorem p(p−1) ~ cN can be arranged for every c. g is |
| 22 | +nondecreasing in δ, because a larger δ shrinks the set of admissible D. |
| 23 | + |
| 24 | +**Transfer to #530 [proved in the 0.385 note, restated].** With L = liminf ℓ(N)/√N |
| 25 | +and m = cN, the compression gives a D with density at least |
| 26 | +δ(c) = 1/(2c) − 1/(8c²) + o(1). So for every c > 0, |
| 27 | + |
| 28 | + L ≥ √c · g(δ(c)) (needs g(δ) at that exact density; g is monotone) (T) |
| 29 | + |
| 30 | +* If g(δ) ≥ (1+κ)δ for all δ near 4/9, then (T) at c = 3/4 gives |
| 31 | + L ≥ (1+κ)·2/(3√3), and c = 3/4 stays the optimum. |
| 32 | +* If g(δ) ≥ a√δ, then (T) gives L ≥ a·√(c·δ(c)) = a·√(1/2 − 1/(8c)) for every c, |
| 33 | + which tends to a/√2. Compare Theorem 3 below: a ≤ 1. |
| 34 | + |
| 35 | +## Results |
| 36 | + |
| 37 | +### Theorem 1 [proved]. g(δ) ≥ δ. |
| 38 | +Let S ⊆ Z_m be Sidon with |S| = s. Then Σ_t |D ∩ (S+t)| = |D|·s, so some |
| 39 | +translate gives |D ∩ (S+t)| ≥ δs. A subset of a Sidon set is Sidon, and so is |
| 40 | +a translate. For m ∈ 𝓜 there is a Sidon S ⊆ Z_m with s = (1+o(1))√m: |
| 41 | +Singer gives q+1 in Z_{q²+q+1}, Ruzsa gives p−1 in Z_{p(p−1)}. (The Lean library |
| 42 | +has the Ruzsa set as `ruzsa_sidon`, and the averaging is inside |
| 43 | +`exists_sidon_subset_of_cyclic`.) ∎ |
| 44 | + |
| 45 | +### Theorem 2 [proved]. Translates of one perfect difference set gain only O(1). |
| 46 | +Let S ⊆ Z_m be a Singer set (m = q²+q+1, |S| = q+1, each nonzero difference |
| 47 | +occurs exactly once). Set X(t) = |D ∩ (S+t)| with t uniform. Then |
| 48 | +E X = δ(q+1) and |
| 49 | + |
| 50 | + Var X = q·δ(1−δ). |
| 51 | + |
| 52 | +*Proof.* X(t) = Σ_x 1_D(x)1_S(x−t), so with Fourier coefficients |
| 53 | +f̂(ξ) = Σ_x f(x)e(−xξ/m), Parseval gives |
| 54 | +E X² − (E X)² = m^{−2} Σ_{ξ≠0} |D̂(ξ)|²|Ŝ(ξ)|². For a perfect difference set, |
| 55 | +|Ŝ(ξ)|² = |S| − 1 = q for every ξ ≠ 0, since 1_S * 1_{−S} = q·1_0 + 1. |
| 56 | +Also Σ_{ξ≠0}|D̂(ξ)|² = m|D| − |D|² = m²δ(1−δ). ∎ |
| 57 | + |
| 58 | +Consequences: |
| 59 | +(a) For 0 < δ < 1 we have Var X > 0. So X is not constant, and the best |
| 60 | +translate is strictly above the average. But the gain is small: |
| 61 | +max X − E X ≥ E|X − EX|/2 ≥ Var X/(2·max|X − EX|) ≥ δ(1−δ)q/(2(q+1)) = Ω(1). |
| 62 | +That is an additive O(1) gain, not a gain of order √m. |
| 63 | +(b) For a uniformly random D of density δ, Hoeffding gives |
| 64 | +P(|D ∩ T| ≥ (δ+ε)|T|) ≤ e^{−2ε²|T|} for each fixed T. A union bound over any |
| 65 | +family 𝓕 of Sidon sets of size ≈ √m with log|𝓕| = o(√m) then shows that, with |
| 66 | +high probability, no member of 𝓕 meets D in more than (δ+o(1))√m points. |
| 67 | +Example: all affine images x ↦ ux+t (u a unit) of m^{O(1)} fixed Sidon sets, |
| 68 | +a family of size m^{O(1)}. Hoeffding's bound also holds for the |
| 69 | +hypergeometric case |D| = δm exactly. **So beating δ by a constant factor, even only for random D, |
| 70 | +needs a family of e^{Ω(√m)} Sidon sets of size Θ(√m) that are not affine |
| 71 | +images of one algebraic set.** This makes the question about the entropy of |
| 72 | +near-maximal Sidon sets, which is exactly what is unknown (see Literature). |
| 73 | + |
| 74 | +### Theorem 3 [proved]. g(δ) ≤ √δ for every δ ∈ (0,1]. |
| 75 | +*Proof.* Let r | m, let H ≤ Z_m have index r (|H| = m/r), and let D be a |
| 76 | +union of j cosets of H, so δ = j/r. Let T ⊆ D be Sidon and put t_i = |T ∩ C_i| |
| 77 | +over the j cosets. Differences of two elements in the same coset lie in |
| 78 | +H∖{0}, and all ordered differences of T are distinct. Hence |
| 79 | +Σ t_i(t_i−1) ≤ m/r − 1. By Cauchy–Schwarz, |T|² ≤ j·Σt_i² ≤ j(m/r + |T|), |
| 80 | +so |T| ≤ (j + √(j² + 4jm/r))/2 = √(δm) + O(j). Take m → ∞ through the Ruzsa |
| 81 | +moduli p(p−1) with p ≡ 1 (mod r). By Dirichlet there are infinitely many, |
| 82 | +and r divides each of them. So g(j/r) ≤ √(j/r). For general δ pick rationals j/r ↓ δ and use |
| 83 | +monotonicity. ∎ |
| 84 | + |
| 85 | +So **δ ≤ g(δ) ≤ √δ**. At δ = 4/9 this is 0.444 ≤ g ≤ 0.667, and by (T) the |
| 86 | +extraction step could at best lift the constant from 2/(3√3) ≈ 0.385 to |
| 87 | +about 1/√2 ≈ 0.707. That ceiling is above 0.385, so Theorem 3 does **not** |
| 88 | +close the route. |
| 89 | + |
| 90 | +### Lemma 4 [proved]. Half windows: g(δ) ≥ L·√(δ/2). It gives nothing new. |
| 91 | +Let w = ⌊(m+1)/2⌋. Some rotation window W = [t, t+w) holds at least δw |
| 92 | +elements of D. Shift them into [0, w) as integers. A Sidon subset (over ℤ) of |
| 93 | +that set is Sidon in Z_m, because all pair sums lie in [0, 2w−2] ⊂ [0, m). |
| 94 | +Monotonicity of ℓ (Lean: `ell_mono`, task t-14ab8fec83) gives |
| 95 | +F(D) ≥ ℓ(⌈δw⌉). Combined with (T): L ≥ √c·L·√(δ(c)/2) = L·√(1/4 − 1/(16c)) < L/2, |
| 96 | +so the inequality is vacuous. Any gain has to come from Z_m-Sidon sets that |
| 97 | +are not integer Sidon sets of a half window. |
| 98 | + |
| 99 | +### Where the theory stops |
| 100 | +* I could not prove g(δ) > δ for any δ ∈ (0,1). Theorem 2 shows the proof |
| 101 | + has to use exponentially many non-affine Sidon sets. The natural first |
| 102 | + moment for random D (expected number of Sidon c√m-sets inside D) does not |
| 103 | + decide it: subsets of a Singer set alone give e^{H(c)√m} Sidon sets of size |
| 104 | + c√m (H = binary entropy in nats), and H(δ) > δ log(1/δ), so the first |
| 105 | + moment cannot exclude c > δ. A second-moment or container count would be |
| 106 | + needed. |
| 107 | +* I could not show g(δ) = δ. The subgroup family gives only √δ. A family |
| 108 | + matching δ would need D whose largest Sidon subset is no bigger than its |
| 109 | + trace on a translated Singer set. The numerics below find nothing of the |
| 110 | + kind at m ≤ 133: every D tested has F(D) ≥ 1.3·δ√m. |
| 111 | +* Note g(1) = 1 (Singer sets, and |S| ≤ √m + 1 always), so at δ = 1 we have |
| 112 | + g = δ = √δ, and the endpoint gives no information. |
| 113 | + |
| 114 | +## Numerics [computed] |
| 115 | + |
| 116 | +`maxsidon.c` is an exact branch and bound: the complete search tree, pruned |
| 117 | +only by the valid bounds "size + remaining candidates" and "2k·|S| + k(k−1) |
| 118 | +new differences must fit among the unused residues". Optimality certificate: |
| 119 | +the search is exhaustive, so a rerun reproduces the value, and the node count |
| 120 | +is logged. There is no external ILP/SAT solver in this sandbox (no pip, no |
| 121 | +network), so there is no independent certificate. Cross-check: |
| 122 | +`$TMPDIR/bf.py`-style brute force over all subsets on 150 random instances |
| 123 | +with m ≤ 22 agreed every time (script reproduced in `check_small.py`). |
| 124 | +`run.py` rechecks every reported optimal set (Sidon in Z_m and ⊆ D). |
| 125 | + |
| 126 | +Families (`families.py`, fixed seeds), density ≈ 4/9 unless noted: |
| 127 | +`interval` [0, 4m/9); `residues9` residues {0,1,3,7} mod 9 (9 | m); |
| 128 | +`residues6` 0 mod 3 or 1 mod 6 (density 1/2, 6 | m); `random0..2` uniform |
| 129 | +random; `phase_interval*` and `phase_sidon*` are the random-phase images of |
| 130 | +[0,N) and of the first N Mian–Chowla terms, with N = round(4m/3), i.e. the |
| 131 | +actual D of the 0.385 proof (their density varies with the phase). |
| 132 | + |
| 133 | +Results: `results_small.csv` (m ∈ {31,36,54,57,63,73,81,91,99}) and |
| 134 | +`results_large.csv` (m ∈ {111,117,126,133}, 75 s per instance, about 16 min in total; a |
| 135 | +timeout row is marked TIMEOUT). Summary of F(D)/(δ√m): |
| 136 | + |
| 137 | +Output of `python3 summarize.py results_small.csv results_large.csv`. |
| 138 | +"residues" merges residues9 and residues6. A timeout means no exact value is |
| 139 | +claimed for that instance. |
| 140 | + |
| 141 | +| family | solved | timeouts | F/(δ√m) | F/√(δm) | |
| 142 | +|---|---|---|---|---| |
| 143 | +| interval | 13 | 0 | 1.81–2.00 | 1.20–1.34 | |
| 144 | +| random | 39 | 0 | 1.96–2.42 | 1.30–1.60 | |
| 145 | +| phase_interval | 22 | 4 | 1.31–3.35 | 1.08–1.51 | |
| 146 | +| phase_sidon | 26 | 0 | 1.59–2.24 | 1.21–1.54 | |
| 147 | +| residues | 10 | 0 | 1.60–1.88 | 1.11–1.25 | |
| 148 | + |
| 149 | +The 4 timeouts (75 s) are dense random-phase images of intervals: m=111 |
| 150 | +(δ=0.88), 117 (0.69), 126 (0.65), 133 (0.59). Over all solved instances with |
| 151 | +δ ≥ 0.4, the minimum of F/(δ√m) is 1.31. At exactly δ = 4/9 the minimum is |
| 152 | +1.66 (residues9, m = 117, F = 8). |
| 153 | + |
| 154 | +F(D)/√(δm) lies in 1.08–1.60 on every solved instance. **Closest to δ√m:** the dense |
| 155 | +random-phase images of intervals (ratio ≈ 1.31–1.59 at density 0.63–0.68), |
| 156 | +then unions of residue classes and intervals. All of these are structured |
| 157 | +sets, consistent with Theorem 3's extremal family. Random D are the |
| 158 | +*farthest* from δ√m at these sizes: they contain Sidon sets of size about |
| 159 | +0.9–1.0·√m, nearly as large as the largest Sidon set in all of Z_m. |
| 160 | + |
| 161 | +Worst-D local search (`minimize.py`: swap moves from the interval, the |
| 162 | +residue-class union and a random start; each evaluation exact; this gives |
| 163 | +only an upper bound on min F): see `minimize_small.txt` (m = 18, 27, 36, 45, |
| 164 | +|D| = 4m/9) and `minimize_singer.txt` (m = 31, 57). For m = 18 the minimiser |
| 165 | +is 8 elements of the subgroup 2Z_18, F = 3, which is exactly Theorem 3's |
| 166 | +family (ratio F/(δ√m) = 1.59). The other minimisers found: m = 27, 36, 45 give |
| 167 | +F = 5, 5, 6 (ratios 2.17, 1.88, 2.01). For the Singer moduli, m = 31 gives |
| 168 | +|D| = 14 with F = 5 (1.99), and m = 57 gives |D| = 25 with F = 6 (1.81). At |
| 169 | +m = 57 the minimiser is a cyclic interval of 25 consecutive residues. No |
| 170 | +search got below 1.59·δ√m. |
| 171 | + |
| 172 | +**Caveat on scale.** At m ≤ 133 we have √m ≤ 11.5. Additive constants (for |
| 173 | +example F ≥ 3 always, and |S| ≤ √m + 1) shift these ratios by 10–30%, so the |
| 174 | +table cannot separate g(4/9) = 0.444 from g(4/9) = 0.667. It does show that |
| 175 | +no tested family gets near the averaging bound. |
| 176 | + |
| 177 | +## Literature [unverified, from memory; no network in this sandbox] |
| 178 | +* Singer (1938) and Bose (1942): Sidon sets of size q+1 in Z_{q²+q+1} and |
| 179 | + q in Z_{q²−1}. Ruzsa (1993): p−1 in Z_{p(p−1)}. |
| 180 | +* Kohayakawa–Lee–Rödl–Samotij, "The number of Sidon sets and the maximum size |
| 181 | + of Sidon sets contained in a sparse random set of integers" (Random Struct. |
| 182 | + Alg. 2015). As I recall, the largest Sidon subset of the p-random subset |
| 183 | + [n]_p is Θ(n^{1/3}(log n)^{1/3}) in a middle range of p and Θ(√(pn)) for |
| 184 | + p ≫ n^{−1/3}·polylog. Constants are not determined, so for constant p it |
| 185 | + says only F = Θ(√n). That fits δ ≤ g ≤ √δ but does not pin down g. They and |
| 186 | + Saxton–Thomason (hypergraph containers, 2015) show the number of Sidon sets |
| 187 | + in [n] is 2^{Θ(√n)}, which answers a Cameron–Erdős question. The sharp |
| 188 | + constant in that exponent is open as far as I know, and Theorem 2(b) shows |
| 189 | + this is exactly the quantity the random-D question needs. |
| 190 | +* I do not recall a paper on the worst-case Sidon subset of a dense set in |
| 191 | + [n] or Z_m, i.e. on g itself. A reviewer with network access should search |
| 192 | + "Sidon subsets of dense sets", "Sidon sets in sets of positive density" |
| 193 | + and "B_2 subsets of dense sets". |
| 194 | + |
| 195 | +## Files and how to rerun |
| 196 | +``` |
| 197 | +gcc -O2 -o maxsidon maxsidon.c |
| 198 | +python3 check_small.py ./maxsidon # brute-force cross-check |
| 199 | +python3 families.py 31 36 54 57 63 73 81 91 99 > inst_small.txt |
| 200 | +python3 run.py ./maxsidon 60 < inst_small.txt > results_small.csv # ~45 s |
| 201 | +python3 families.py 111 117 126 133 > inst_large.txt |
| 202 | +python3 run.py ./maxsidon 75 < inst_large.txt > results_large.csv # ~16 min |
| 203 | +for m in 18 27 36 45; do python3 minimize.py ./maxsidon $m $((4*m/9)) 300 1; done |
| 204 | +``` |