{
  "id": "1991",
  "ident": "NS.01991",
  "slug": "erdos-395",
  "title": "Erdős Problem 395",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "If $z_1,\\ldots,z_n\\in \\mathbb{C}$ with $\\lvert z_i\\rvert=1$ then is it true that the probability\nthat\n$$\\lvert \\epsilon_1z_1+\\cdots+\\epsilon_nz_n\\rvert \\leq \\sqrt{2},$$\nwhere $\\epsilon_i\\in \\{-1,1\\}$ uniformly at random, is $\\gg 1/n$?\n\nA reverse Littlewood-Offord problem. Erdős originally asked this with $\\sqrt{2}$ replaced by $1$,\nbut Carnielli and Carolino [CaCa11] observed that this is false, choosing $z_1=1$ and $z_k=i$\nfor $2\\leq k\\leq n$, where $n$ is even, since then the sum is at least $\\sqrt{2}$ always.\n\nSolved in the affirmative by He, Juškevičius, Narayanan, and Spiro [HJNS24]. The bound of $1/n$\nis the best possible, as shown by taking $z_k=1$ for $1\\leq k\\leq n/2$ and $z_k=i$ otherwise.\n\nSee also [498](https://www.erdosproblems.com/498).",
  "subjects": [
    "math.CO",
    "math.PR",
    "msc:05",
    "msc:60"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos395.erdos_395",
  "statement_lean": "theorem erdos_395 : ∃ c : ℝ, 0 < c ∧ ∀ n : ℕ, 0 < n → ∀ z : Fin n → ℂ,\n    (∀ i, ‖z i‖ = 1) → c / n ≤ (signedSumCount z √2 : ℝ) / 2 ^ n",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 395\n\n*References:*\n- [erdosproblems.com/395](https://www.erdosproblems.com/395)\n- [Er45] Erdős, P., *On a lemma of Littlewood and Offord*. Bull. Amer. Math. Soc. (1945),\n  898--902.\n- [CaCa11] Carnielli, Walter and Carolino, Pietro K., *Adjusting a conjecture of Erdős*. Contrib.\n  Discrete Math. (2011), 154--159.\n- [HJNS24] X. He, T. Juškevičius, B. Narayanan, and S. Spiro, *The Reverse Littlewood-Offord\n  problem of Erdős*. arXiv:2408.11034 (2024).\n-/\n\n@[expose] public section\n\nnamespace Erdos395\n\n/-- The number of sign patterns $\\epsilon \\in \\{-1,1\\}^n$ with\n$\\lvert \\epsilon_1z_1+\\cdots+\\epsilon_nz_n\\rvert \\leq r$. -/\nnoncomputable def signedSumCount {n : ℕ} (z : Fin n → ℂ) (r : ℝ) : ℕ :=\n  {ε : Fin n → ℤ | (∀ i, ε i = -1 ∨ ε i = 1) ∧ ‖∑ i, (ε i : ℂ) * z i‖ ≤ r}.ncard\n\nset_option linter.style.formal_proof_palomar false in\n/--\nIf $z_1,\\ldots,z_n\\in \\mathbb{C}$ with $\\lvert z_i\\rvert=1$ then is it true that the probability\nthat\n$$\\lvert \\epsilon_1z_1+\\cdots+\\epsilon_nz_n\\rvert \\leq \\sqrt{2},$$\nwhere $\\epsilon_i\\in \\{-1,1\\}$ uniformly at random, is $\\gg 1/n$?\n\nA reverse Littlewood-Offord problem. Erdős originally asked this with $\\sqrt{2}$ replaced by $1$,\nbut Carnielli and Carolino [CaCa11] observed that this is false, choosing $z_1=1$ and $z_k=i$\nfor $2\\leq k\\leq n$, where $n$ is even, since then the sum is at least $\\sqrt{2}$ always.\n\nSolved in the affirmative by He, Juškevičius, Narayanan, and Spiro [HJNS24]. The bound of $1/n$\nis the best possible, as shown by taking $z_k=1$ for $1\\leq k\\leq n/2$ and $z_k=i$ otherwise.\n\nSee also [498](https://www.erdosproblems.com/498).\n-/\n@[category research solved, question, AMS 5 60, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos395.lean#L4058\"]\ntheorem erdos_395 : ∃ c : ℝ, 0 < c ∧ ∀ n : ℕ, 0 < n → ∀ z : Fin n → ℂ,\n    (∀ i, ‖z i‖ = 1) → c / n ≤ (signedSumCount z √2 : ℝ) / 2 ^ n := by\n  sorry\n\n/--\nErdős originally asked [erdős_395](https://www.erdosproblems.com/395) with $\\sqrt{2}$ replaced by\n$1$, but Carnielli and Carolino [CaCa11] observed that this is false, choosing $z_1=1$ and $z_k=i$\nfor $2\\leq k\\leq n$, where $n$ is even, since then the sum is at least $\\sqrt{2}$ always.\n-/\n@[category research solved, question, AMS 5 60]\ntheorem erdos_395.variants.one : ¬ ∃ c : ℝ, 0 < c ∧ ∀ n : ℕ, 0 < n →\n    ∀ z : Fin n → ℂ, (∀ i, ‖z i‖ = 1) → c / n ≤ (signedSumCount z 1 : ℝ) / 2 ^ n := by\n  sorry\n\n/--\nThe bound of $1/n$ in [erdős_395](https://www.erdosproblems.com/395) is the best possible, as\nshown by taking $z_k=1$ for $1\\leq k\\leq n/2$ and $z_k=i$ otherwise.\n-/\n@[category research solved, AMS 5 60]\ntheorem erdos_395.variants.sharp : ∃ C : ℝ, ∀ n : ℕ, 0 < n → ∃ z : Fin n → ℂ,\n    (∀ i, ‖z i‖ = 1) ∧ (signedSumCount z √2 : ℝ) / 2 ^ n ≤ C / n := by\n  sorry\n\nend Erdos395\n",
  "statement_hash": "f6b24c1c0ad231f29a05ef217262157b1410d49f1a2b7b667dbd7937a669e5b7",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}