{
  "id": "895",
  "ident": "NS.00895",
  "slug": "erdos-1182",
  "title": "Erdős Problem 1182",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $f(n)$ be maximal such that there is a connected graph $G$ with $n$ vertices and $f(n)$ edges\nsuch that\n$$R(K_3,G)= 2n-1.$$\nLet $F(n)$ be maximal such that every connected graph $G$ with $n$ vertices and $\\leq F(n)$ edges\nhas\n$$R(K_3,G)= 2n-1.$$\nEstimate $f(n)$ and $F(n)$. In particular, is it true that $F(n)/n\\to \\infty$?\n\nThis is the first part: estimate $f(n)$. The problem is due to Burr, Erdős, Faudree, Rousseau and\nSchelp [BEFRS80] and appears in [Er78, p. 33]. We read \"estimate\" as the order of magnitude\n`=Θ`. Burr, Erdős, Faudree, Rousseau and Schelp [BEFRS80, Theorem 2] proved\n$n^{3/2}(\\log n)^{1/2}\\ll f(n)\\ll n^{5/3}(\\log n)^{2/3}$ (`erdos_1182.variants.f_lower`,\n`erdos_1182.variants.f_upper`).",
  "subjects": [
    "math.CO",
    "msc:05"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos1182.erdos_1182.parts.i",
  "statement_lean": "theorem erdos_1182.parts.i :\n    (fun n : ℕ ↦ (f n : ℝ)) =Θ[atTop] erdos_1182.parts.i.answer",
  "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 1182\n\n*References:*\n- [erdosproblems.com/1182](https://www.erdosproblems.com/1182)\n- [Er78] Erdős, P., *Problems and results in combinatorial analysis and combinatorial number\n  theory*. Proceedings of the Ninth Southeastern Conference on Combinatorics, Graph Theory, and\n  Computing (Florida Atlantic Univ., Boca Raton, Fla., 1978) (1978), 29-40.\n  [PDF](https://www.renyi.hu/~p_erdos/1978-36.pdf)\n- [BEFRS80] Burr, S. A., Erdős, P., Faudree, R. J., Rousseau, C. C. and Schelp, R. H., *An extremal\n  problem in generalized Ramsey theory*. Ars Combin. 10 (1980), 193-203.\n  [PDF](https://www.renyi.hu/~p_erdos/1980-04.pdf)\n- [Br96] Brandt, S., *Expanding graphs and Ramsey numbers*. Freie Universität Berlin, preprint\n  A 96-24 (1996).\n- [BBH98] Brandt, S., Brinkmann, G. and Harmuth, T., *All Ramsey numbers $r(K_3,G)$ for connected\n  graphs of order 9*. Electron. J. Combin. 5 (1998), #R7.\n- [Ch77] Chvátal, V., *Tree-complete graph Ramsey numbers*. J. Graph Theory 1 (1977), 93.\n- [NiRo09] Nikiforov, V. and Rousseau, C. C., *Ramsey goodness and beyond*. Combinatorica 29\n  (2009), 227-262.\n-/\n\n@[expose] public section\n\nopen Filter Asymptotics\n\nnamespace Erdos1182\n\n/-- A graph `G` on `n` vertices is *$3$-good* (in the sense of [BEFRS80], where a connected graph\nis called $m$-good if $R(K_m,G)=(m-1)(n-1)+1$, here with $m=3$) if $R(K_3,G)=2n-1$, where $K_3$ is\n`(⊤ : SimpleGraph (Fin 3))`. For connected `G` one always has $R(K_3,G)\\ge 2n-1$ (see\n`erdos_1182.variants.ramsey_ge`), so this says that the Ramsey number attains its lower bound.\n\n[Er78, p. 33] states the problem for arbitrary graphs $G(n;\\ell)$ with $R(K_3,G)\\le 2n-1$; for\nconnected graphs this is the same as `IsTriangleGood`, and we follow [BEFRS80] and the problem\npage in restricting to connected graphs. We only apply `IsTriangleGood` to connected graphs, which\nhave a vertex, so the natural-number subtraction is harmless. -/\ndef IsTriangleGood {n : ℕ} (G : SimpleGraph (Fin n)) : Prop :=\n  SimpleGraph.graphRamsey (⊤ : SimpleGraph (Fin 3)) G = 2 * n - 1\n\n/-- $f(n)$: the largest number of edges of a connected $3$-good graph on $n$ vertices (this is\n$g(n)$ in [BEFRS80]). A graph on $n$ vertices has at most $\\binom n2$ edges and a path is\n$3$-good (`erdos_1182.variants.chvatal`), so for $n\\ge1$ the set is nonempty and bounded and\n`sSup` is a genuine maximum. For $n=0$ there is no connected graph and `f 0 = 0`. -/\nnoncomputable def f (n : ℕ) : ℕ :=\n  sSup {q : ℕ | ∃ G : SimpleGraph (Fin n), G.Connected ∧ G.edgeSet.ncard = q ∧ IsTriangleGood G}\n\n/-- $F(n)$: the largest $q\\le\\binom n2$ such that every connected graph on $n$ vertices with at\nmost $q$ edges is $3$-good (this is $f(n)$ in [BEFRS80]). The set below is downward closed, so\n`sSup` is its maximum; for $n\\ge3$ it equals one less than the least number of edges of a\nconnected graph on $n$ vertices that is not $3$-good.\n\nThe condition $q\\le\\binom n2$ is only needed for $n\\le2$, where every connected graph is\n$3$-good: it gives `F 2 = 1`, as in the table of [BEFRS80], and `F 0 = F 1 = 0`. For $n\\ge3$ it is\nautomatic, because the connected graph $K_n$ is not $3$-good (the complement of the odd cycle\n$C_{2n-1}$ shows $R(K_3,K_n)>2n-1$). -/\nnoncomputable def F (n : ℕ) : ℕ :=\n  sSup {q : ℕ | q ≤ n.choose 2 ∧\n    ∀ G : SimpleGraph (Fin n), G.Connected → G.edgeSet.ncard ≤ q → IsTriangleGood G}\n\n/-- If `q ≤ n.choose 2` and every connected graph on `n` vertices with at most `q` edges is\n$3$-good, then `q ≤ F n`. -/\n@[category API, AMS 5]\ntheorem le_F {n q : ℕ} (hq : q ≤ n.choose 2)\n    (h : ∀ G : SimpleGraph (Fin n), G.Connected → G.edgeSet.ncard ≤ q → IsTriangleGood G) :\n    q ≤ F n := by\n  unfold F\n  refine le_csSup ⟨n.choose 2, ?_⟩ ⟨hq, h⟩\n  rintro p ⟨hp, -⟩\n  exact hp\n\ndef erdos_1182.parts.i.answer : ℕ → ℝ := sorry\n\n/--\nLet $f(n)$ be maximal such that there is a connected graph $G$ with $n$ vertices and $f(n)$ edges\nsuch that\n$$R(K_3,G)= 2n-1.$$\nLet $F(n)$ be maximal such that every connected graph $G$ with $n$ vertices and $\\leq F(n)$ edges\nhas\n$$R(K_3,G)= 2n-1.$$\nEstimate $f(n)$ and $F(n)$. In particular, is it true that $F(n)/n\\to \\infty$?\n\nThis is the first part: estimate $f(n)$. The problem is due to Burr, Erdős, Faudree, Rousseau and\nSchelp [BEFRS80] and appears in [Er78, p. 33]. We read \"estimate\" as the order of magnitude\n`=Θ`. Burr, Erdős, Faudree, Rousseau and Schelp [BEFRS80, Theorem 2] proved\n$n^{3/2}(\\log n)^{1/2}\\ll f(n)\\ll n^{5/3}(\\log n)^{2/3}$ (`erdos_1182.variants.f_lower`,\n`erdos_1182.variants.f_upper`).\n-/\n@[category research open, question value, AMS 5]\ntheorem erdos_1182.parts.i :\n    (fun n : ℕ ↦ (f n : ℝ)) =Θ[atTop] erdos_1182.parts.i.answer := by\n  sorry\n\ndef erdos_1182.parts.ii.answer : ℕ → ℝ := fun n ↦ (n : ℝ)\n\n/--\nLet $f(n)$ be maximal such that there is a connected graph $G$ with $n$ vertices and $f(n)$ edges\nsuch that\n$$R(K_3,G)= 2n-1.$$\nLet $F(n)$ be maximal such that every connected graph $G$ with $n$ vertices and $\\leq F(n)$ edges\nhas\n$$R(K_3,G)= 2n-1.$$\nEstimate $f(n)$ and $F(n)$. In particular, is it true that $F(n)/n\\to \\infty$?\n\nThis is the second part: estimate $F(n)$. As an order of magnitude, `=Θ`, this is known:\n$F(n)=\\Theta(n)$, by $F(n)\\ge n-1$ (`erdos_1182.variants.F_ge_pred`, from Chvátal's theorem\n[Ch77]) and the linear upper bounds of `erdos_1182.variants.brandt` and\n`erdos_1182.variants.nikiforov_rousseau`. The finer question of the asymptotic behaviour of\n$F(n)/n$ is open, see `erdos_1182.variants.brandt_expects`.\n-/\n@[category research solved, question value, AMS 5]\ntheorem erdos_1182.parts.ii :\n    (fun n : ℕ ↦ (F n : ℝ)) =Θ[atTop] erdos_1182.parts.ii.answer := by\n  sorry\n\n/--\nLet $f(n)$ be maximal such that there is a connected graph $G$ with $n$ vertices and $f(n)$ edges\nsuch that\n$$R(K_3,G)= 2n-1.$$\nLet $F(n)$ be maximal such that every connected graph $G$ with $n$ vertices and $\\leq F(n)$ edges\nhas\n$$R(K_3,G)= 2n-1.$$\nEstimate $f(n)$ and $F(n)$. In particular, is it true that $F(n)/n\\to \\infty$?\n\nThis is the third part, asked in [BEFRS80, Section 5] and in [Er78, pp. 33-34], where Erdős says\nit seems certain. The answer is no: Brandt [Br96] proved $F(n)\\le 84n$ (as recorded on the problem\npage, see `erdos_1182.variants.brandt`), and [NiRo09, Theorem 5.1] implies $F(n)<50n$ for large\n$n$ (see `erdos_1182.variants.nikiforov_rousseau`).\n-/\n@[category research solved, question, AMS 5]\ntheorem erdos_1182.parts.iii :\n    ¬ Tendsto (fun n : ℕ ↦ (F n : ℝ) / n) atTop atTop := by\n  sorry\n\n/--\nIt is trivial that $R(K_3,G)\\geq 2n-1$ for any connected graph $G$ on $n$ vertices\n([BEFRS80, p. 193]).\n-/\n@[category textbook, AMS 5]\ntheorem erdos_1182.variants.ramsey_ge {n : ℕ} (G : SimpleGraph (Fin n)) (hG : G.Connected) :\n    2 * n - 1 ≤ SimpleGraph.graphRamsey (⊤ : SimpleGraph (Fin 3)) G := by\n  sorry\n\n/--\nBy a result of Chvátal [Ch77], $R(K_3,T)=2n-1$ whenever $T$ is a tree on $n$ vertices (as stated\nin [BEFRS80, p. 193]).\n-/\n@[category research solved, AMS 5]\ntheorem erdos_1182.variants.chvatal {n : ℕ} (T : SimpleGraph (Fin n)) (hT : T.IsTree) :\n    IsTriangleGood T := by\n  sorry\n\n/--\nEvery connected graph with at most $n-1$ edges is a tree, so Chvátal's theorem [Ch77] gives\n$F(n)\\geq n-1$ ([BEFRS80, p. 193]).\n-/\n@[category research solved, AMS 5]\ntheorem erdos_1182.variants.F_ge_pred {n : ℕ} (hn : 2 ≤ n) : n - 1 ≤ F n := by\n  sorry\n\n/--\nBurr, Erdős, Faudree, Rousseau and Schelp [BEFRS80, Theorem 1(a)] proved\n$$\\frac{17n+1}{15}\\leq F(n),$$\nthe lower bound for all $n\\geq 4$.\n\nWe state the integer-part version $n+\\lfloor (2n+1)/15\\rfloor\\le F(n)$, which is what the proof\ngives (the number $k$ of extra edges there is an integer with $0\\le k\\le (2n+1)/15$) and which\nfollows from the printed bound because $n+\\lfloor (2n+1)/15\\rfloor\\leq(17n+1)/15$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_1182.variants.befrs_lower {n : ℕ} (hn : 4 ≤ n) :\n    n + (2 * n + 1) / 15 ≤ F n := by\n  sorry\n\n/--\nBurr, Erdős, Faudree, Rousseau and Schelp [BEFRS80, Theorem 1(b)] proved\n$$F(n)\\leq \\left(\\frac{27}{4}+o(1)\\right)n(\\log n)^2.$$\nThis is superseded by the linear bounds of `erdos_1182.variants.brandt` and\n`erdos_1182.variants.nikiforov_rousseau`.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_1182.variants.befrs_upper :\n    ∀ ε > (0 : ℝ), ∀ᶠ n : ℕ in atTop, (F n : ℝ) < (27 / 4 + ε) * n * Real.log n ^ 2 := by\n  sorry\n\n/--\nThe upper bound was improved to $F(n)\\leq 84n$ by Brandt [Br96]. (This resolves the final\nquestion in the negative.)\n\nWe have not seen the preprint [Br96]; the bound is as recorded on the problem page, and we state\nit for all large $n$. Brandt's method uses expander graphs: almost all regular graphs of large\ndegree are not $3$-good. In [BBH98, p. 6], of which Brandt is a coauthor, it is stated without\nproof that it gives $F(n)<12n$ for large $n$ (there $F(n)$ is called $f(K_3,n)$).\n-/\n@[category research solved, AMS 5]\ntheorem erdos_1182.variants.brandt :\n    ∀ᶠ n : ℕ in atTop, F n ≤ 84 * n := by\n  sorry\n\n/--\nNikiforov and Rousseau [NiRo09, Theorem 5.1] proved that for $n$ sufficiently large almost all\nconnected $100$-regular graphs of order $n$ are not $3$-good. Such a graph has $50n$ edges (and\nconnected $100$-regular graphs of order $n$ exist for all $n\\geq 101$), so $F(n)<50n$ for all\nlarge $n$. This gives a proved linear upper bound for $F$, answering the third part.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_1182.variants.nikiforov_rousseau :\n    ∀ᶠ n : ℕ in atTop, F n < 50 * n := by\n  sorry\n\n/--\nBrandt [Br96] expects that for all large $n$ we have $2n<F(n)<6n$ (as recorded on the problem\npage).\n-/\n@[category research open, AMS 5]\ntheorem erdos_1182.variants.brandt_expects :\n    ∀ᶠ n : ℕ in atTop, 2 * n < F n ∧ F n < 6 * n := by\n  sorry\n\n/--\nBurr, Erdős, Faudree, Rousseau and Schelp [BEFRS80, Theorem 2] proved that there is a constant\n$A>0$ with\n$$n^{3/2}(\\log n)^{1/2} \\ll f(n),$$\nmore precisely $An^{3/2}(\\log n)^{1/2}<f(n)$ for all sufficiently large $n$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_1182.variants.f_lower :\n    ∃ A > (0 : ℝ), ∀ᶠ n : ℕ in atTop,\n      A * (n : ℝ) ^ (3 / 2 : ℝ) * Real.sqrt (Real.log n) < (f n : ℝ) := by\n  sorry\n\n/--\nBurr, Erdős, Faudree, Rousseau and Schelp [BEFRS80, Theorem 2] proved that there is a constant\n$B>0$ with\n$$f(n)\\ll n^{5/3}(\\log n)^{2/3},$$\nmore precisely $f(n)<Bn^{5/3}(\\log n)^{2/3}$ for all sufficiently large $n$.\n-/\n@[category research solved, AMS 5]\ntheorem erdos_1182.variants.f_upper :\n    ∃ B > (0 : ℝ), ∀ᶠ n : ℕ in atTop,\n      (f n : ℝ) < B * (n : ℝ) ^ (5 / 3 : ℝ) * Real.log n ^ (2 / 3 : ℝ) := by\n  sorry\n\n/--\nThe first few values of $F(n)$ and $f(n)$ (beginning with $n=2$) are $1,2,5,7,8$ and $1,2,5,8,12$\nrespectively, as reported in [BEFRS80, Table I]. Brandt, Brinkmann and Harmuth [BBH98, Table 2]\nextended these (by computer) to all $n\\le 12$:\n$$F(n):\\ 1,2,5,7,8,11,11,16,18,23,23,\\qquad f(n):\\ 1,2,5,8,12,16,20,27,33,41,49$$\nfor $n=2,\\ldots,12$. (The value for $n=2$ is from [BEFRS80]; [BBH98] start at $n=3$.)\n-/\n@[category research solved, AMS 5]\ntheorem erdos_1182.variants.small_values :\n    (F 2 = 1 ∧ F 3 = 2 ∧ F 4 = 5 ∧ F 5 = 7 ∧ F 6 = 8 ∧ F 7 = 11 ∧ F 8 = 11 ∧ F 9 = 16 ∧\n      F 10 = 18 ∧ F 11 = 23 ∧ F 12 = 23) ∧\n    (f 2 = 1 ∧ f 3 = 2 ∧ f 4 = 5 ∧ f 5 = 8 ∧ f 6 = 12 ∧ f 7 = 16 ∧ f 8 = 20 ∧ f 9 = 27 ∧\n      f 10 = 33 ∧ f 11 = 41 ∧ f 12 = 49) := by\n  sorry\n\nend Erdos1182\n",
  "statement_hash": "ca6f8c9ba81e1e2894b27163f77c0d9a36dac8178fe4dd2d9070a6de98f1e998",
  "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."
}