{
  "id": "682",
  "ident": "NS.00682",
  "slug": "erdos-1105",
  "title": "Erdős Problem 1105",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "The anti-Ramsey number $\\mathrm{AR}(n,G)$ is the maximum possible number of colours in which the\nedges of $K_n$ can be coloured without creating a rainbow copy of $G$ (i.e. one in which all edges\nhave different colours).\n\nLet $C_k$ be the cycle on $k$ vertices. Is it true that\n$\\mathrm{AR}(n,C_k)=\\left(\\frac{k-2}{2}+\\frac{1}{k-1}\\right)n+O(1)$?\n\nMontellano-Ballesteros and Neumann-Lara [MoNe05] gave an exact formula for $\\mathrm{AR}(n,C_k)$,\nwhich implies in particular that\n$\\mathrm{AR}(n,C_k)=\\left(\\frac{k-2}{2}+\\frac{1}{k-1}\\right)n+O(1).$",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos1105.erdos_1105.parts.i",
  "statement_lean": "theorem erdos_1105.parts.i :\n    ∀ k, 3 ≤ k →\n    ((fun n => (antiRamseyNum (cycleGraph k) n : ℝ) - ((k - 2 : ℝ) / 2 + 1 / (k - 1)) * n)\n      =O[atTop] (fun _ => (1 : ℝ)))",
  "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 1105\n\n*References:*\n- [erdosproblems.com/1105](https://www.erdosproblems.com/1105)\n- [PALOMAR-2026-10-13-000006](https://palomar-registry.org/entry.html?id=PALOMAR-2026-10-13-000006&version=1)\n- [ESS75] Erdős, P. and Simonovits, M. and Sós, V. T., Anti-{R}amsey theorems. (1975), 633--643.\n- [MoNe05] Montellano-Ballesteros, J. J. and Neumann-Lara, V., An anti-{R}amsey theorem on cycles.\n  Graphs Combin. (2005), 343--354.\n- [SiSo84] Simonovits, Miklós and Sós, Vera T., On restricted colourings of {$K_n$}. Combinatorica\n  (1984), 101--110.\n- [Yu21] L.-T. Yuan, The anti-Ramsey number for paths. arXiv:2102.00807 (2021).\n-/\n\n@[expose] public section\n\nnamespace Erdos1105\n\nopen SimpleGraph Asymptotics Filter\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe anti-Ramsey number $\\mathrm{AR}(n,G)$ is the maximum possible number of colours in which the\nedges of $K_n$ can be coloured without creating a rainbow copy of $G$ (i.e. one in which all edges\nhave different colours).\n\nLet $C_k$ be the cycle on $k$ vertices. Is it true that\n$\\mathrm{AR}(n,C_k)=\\left(\\frac{k-2}{2}+\\frac{1}{k-1}\\right)n+O(1)$?\n\nMontellano-Ballesteros and Neumann-Lara [MoNe05] gave an exact formula for $\\mathrm{AR}(n,C_k)$,\nwhich implies in particular that\n$\\mathrm{AR}(n,C_k)=\\left(\\frac{k-2}{2}+\\frac{1}{k-1}\\right)n+O(1).$\n-/\n@[category research solved, question, AMS 5, formal_proof using lean4 at\n  \"https://github.com/linrock/math-proofs/blob/ba96303b34a95ac458958c1eb0bbdee54733484a/erdos-1105/Solution.lean#L72\"]\ntheorem erdos_1105.parts.i :\n    ∀ k, 3 ≤ k →\n    ((fun n => (antiRamseyNum (cycleGraph k) n : ℝ) - ((k - 2 : ℝ) / 2 + 1 / (k - 1)) * n)\n      =O[atTop] (fun _ => (1 : ℝ))) := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $P_k$ be the path on $k$ vertices and $\\ell=\\lfloor\\frac{k-1}{2}\\rfloor$. If $n\\geq k\\geq 5$\nthen is $\\mathrm{AR}(n,P_k)$ equal to $\\max\\left(\\binom{k-2}{2}+1,\n\\binom{\\ell-1}{2}+(\\ell-1)(n-\\ell+1)+\\epsilon\\right)$where $\\epsilon=1$ if $k$ is odd and\n$\\epsilon=2$ otherwise?\n\nA proof of the formula for $\\mathrm{AR}(n,P_k)$ for all $n\\geq k\\geq 5$ has been announced by\nYuan [Yu21].\n-/\n@[category research solved, question, AMS 5, formal_proof using lean4 at\n  \"https://github.com/linrock/math-proofs/blob/ba96303b34a95ac458958c1eb0bbdee54733484a/erdos-1105/Solution.lean#L79\"]\ntheorem erdos_1105.parts.ii :\n    ∀ (k n : ℕ), 5 ≤ k → k ≤ n →\n    let ℓ := (k - 1) / 2\n    let ε := if Odd k then 1 else 2\n    antiRamseyNum (pathGraph k) n = max ((k - 2).choose 2 + 1) ((ℓ - 1).choose 2 +\n      (ℓ - 1) * (n - ℓ + 1) + ε) := by\n  sorry\n\n-- TODO: Add Erdős, Simonovits, and Sós variant.\n-- TODO: Add Simonovits and Sós variant.\n\nend Erdos1105\n",
  "statement_hash": "2cb04aa34664709147fea9a077add5463e973c3426d4aec83e1858dde6bbde8e",
  "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."
}