{
  "index": "1956-B-5",
  "type": "COMB",
  "tag": [
    "COMB"
  ],
  "difficulty": "",
  "question": "5. Consider a set of \\( 2 n \\) points in space, \\( n>1 \\). Suppose they are joined by at least \\( n^{2}+1 \\) segments. Show that at least one triangle is formed. Show that for each \\( n \\) it is possible to have \\( 2 n \\) points joined by \\( n^{2} \\) segments without any triangles being formed.",
  "solution": "Solution. Let \\( T_{n} \\) be the statement: If \\( 2 n \\) points are joined by at least \\( n^{2}+1 \\) segments, then a triangle is formed. We shall prove \\( T_{n} \\) by induction.\n\nSuppose \\( A, B, C, D \\) are four points joined by at least five segments. Then at most one segment is missing, say \\( A B \\), and \\( B C D \\) form a triangle. Thus \\( T_{2} \\) is true.\n\nNow assume \\( T_{k} \\) is true. Let \\( 2(k+1) \\) points be given connected by at least \\( (k+1)^{2}+1 \\) segments. Let \\( A \\) and \\( B \\) be two points that are joined and let \\( \\mathcal{S} \\) be the set of \\( 2 k \\) other points. Suppose \\( p \\) points of \\( \\mathcal{S} \\) are joined to \\( A \\) and \\( q \\) points of \\( S \\) are joined to \\( B \\). If \\( p+q>2 k \\), then some point \\( C \\) of \\( S \\) is joined to both \\( A \\) and \\( B \\), and \\( A B C \\) is a triangle. If \\( p+q \\leq 2 k \\), then at most \\( 2 k+1 \\) segments have \\( A \\) or \\( B \\) as endpoints and at least\n\\[\n(k+1)^{2}+1-(2 k+1)=k^{2}+1\n\\]\nconnect points of \\( \\mathbf{S} \\). By \\( \\boldsymbol{T}_{k} \\) some three points of S form a triangle. Thus \\( T_{k+1} \\) is true.\n\nTherefore, \\( T_{n} \\) is true for all \\( n>1 \\) (and for \\( n=1 \\) in a vacuous way).\nTo show that \\( 2 n \\) points can be joined by \\( n^{2} \\) segments without any triangles being formed, divide the points into two sets \\( S, T \\) of \\( n \\) elements each. If every point in \\( S \\) is joined to every point in \\( T \\), then \\( n^{2} \\) segments are used and no triangle is formed.\n\nRemark. If \\( 2 n \\) points are joined by \\( n^{2}+1 \\) segments, then at least \\( n \\) triangles are formed. For a discussion of this and related problems, see P. Turan, \"On the Theory of Graphs,\" Colloquium Mathematica, vol. 3 (1954, pages 19-30.",
  "vars": [
    "A",
    "B",
    "C",
    "D",
    "p",
    "q"
  ],
  "params": [
    "n",
    "k",
    "S",
    "T",
    "T_n",
    "T_2",
    "T_k",
    "T_k+1"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "A": "vertexa",
        "B": "vertexb",
        "C": "vertexc",
        "D": "vertexd",
        "p": "linkcntp",
        "q": "linkcntq",
        "n": "totalno",
        "k": "stepidx",
        "S": "setprim",
        "T": "setdual",
        "T_n": "propnfun",
        "T_2": "proptwof",
        "T_k": "propkfun",
        "T_k+1": "propknxt"
      },
      "question": "5. Consider a set of \\( 2 totalno \\) points in space, \\( totalno>1 \\). Suppose they are joined by at least \\( totalno^{2}+1 \\) segments. Show that at least one triangle is formed. Show that for each \\( totalno \\) it is possible to have \\( 2 totalno \\) points joined by \\( totalno^{2} \\) segments without any triangles being formed.",
      "solution": "Solution. Let \\( propnfun \\) be the statement: If \\( 2 totalno \\) points are joined by at least \\( totalno^{2}+1 \\) segments, then a triangle is formed. We shall prove \\( propnfun \\) by induction.\n\nSuppose \\( vertexa, vertexb, vertexc, vertexd \\) are four points joined by at least five segments. Then at most one segment is missing, say \\( vertexa vertexb \\), and \\( vertexb vertexc vertexd \\) form a triangle. Thus \\( proptwof \\) is true.\n\nNow assume \\( propkfun \\) is true. Let \\( 2(stepidx+1) \\) points be given connected by at least \\( (stepidx+1)^{2}+1 \\) segments. Let \\( vertexa \\) and \\( vertexb \\) be two points that are joined and let \\( \\mathcal{setprim} \\) be the set of \\( 2 stepidx \\) other points. Suppose \\( linkcntp \\) points of \\( \\mathcal{setprim} \\) are joined to \\( vertexa \\) and \\( linkcntq \\) points of setprim are joined to \\( vertexb \\). If \\( linkcntp+linkcntq>2 stepidx \\), then some point \\( vertexc \\) of setprim is joined to both \\( vertexa \\) and \\( vertexb \\), and \\( vertexa vertexb vertexc \\) is a triangle. If \\( linkcntp+linkcntq \\leq 2 stepidx \\), then at most \\( 2 stepidx+1 \\) segments have \\( vertexa \\) or \\( vertexb \\) as endpoints and at least\n\\[\n(stepidx+1)^{2}+1-(2 stepidx+1)=stepidx^{2}+1\n\\]\nconnect points of \\( \\mathbf{setprim} \\). By \\( \\boldsymbol{propkfun} \\) some three points of setprim form a triangle. Thus \\( propknxt \\) is true.\n\nTherefore, \\( propnfun \\) is true for all \\( totalno>1 \\) (and for \\( totalno=1 \\) in a vacuous way).\nTo show that \\( 2 totalno \\) points can be joined by \\( totalno^{2} \\) segments without any triangles being formed, divide the points into two sets \\( setprim, setdual \\) of \\( totalno \\) elements each. If every point in \\( setprim \\) is joined to every point in \\( setdual \\), then \\( totalno^{2} \\) segments are used and no triangle is formed.\n\nRemark. If \\( 2 totalno \\) points are joined by \\( totalno^{2}+1 \\) segments, then at least \\( totalno \\) triangles are formed. For a discussion of this and related problems, see P. Turan, \"On the Theory of Graphs,\" Colloquium Mathematica, vol. 3 (1954, pages 19-30."
    },
    "descriptive_long_confusing": {
      "map": {
        "A": "sandcastle",
        "B": "toothbrush",
        "C": "pineapple",
        "D": "butterfly",
        "p": "rainstorm",
        "q": "moonlight",
        "n": "foreground",
        "k": "watershed",
        "S": "playground",
        "T": "flashlight",
        "T_n": "whirlpool",
        "T_2": "skylifter",
        "T_k": "snowflake",
        "T_k+1": "borderline"
      },
      "question": "5. Consider a set of \\( 2 foreground \\) points in space, \\( foreground>1 \\). Suppose they are joined by at least \\( foreground^{2}+1 \\) segments. Show that at least one triangle is formed. Show that for each \\( foreground \\) it is possible to have \\( 2 foreground \\) points joined by \\( foreground^{2} \\) segments without any triangles being formed.",
      "solution": "Solution. Let \\( whirlpool \\) be the statement: If \\( 2 foreground \\) points are joined by at least \\( foreground^{2}+1 \\) segments, then a triangle is formed. We shall prove \\( whirlpool \\) by induction.\n\nSuppose \\( sandcastle, toothbrush, pineapple, butterfly \\) are four points joined by at least five segments. Then at most one segment is missing, say \\( sandcastle toothbrush \\), and \\( toothbrush pineapple butterfly \\) form a triangle. Thus \\( skylifter \\) is true.\n\nNow assume \\( snowflake \\) is true. Let \\( 2(watershed+1) \\) points be given connected by at least \\( (watershed+1)^{2}+1 \\) segments. Let \\( sandcastle \\) and \\( toothbrush \\) be two points that are joined and let \\( \\mathcal{playground} \\) be the set of \\( 2 watershed \\) other points. Suppose \\( rainstorm \\) points of \\( \\mathcal{playground} \\) are joined to \\( sandcastle \\) and \\( moonlight \\) points of \\( playground \\) are joined to \\( toothbrush \\). If \\( rainstorm+moonlight>2 watershed \\), then some point \\( pineapple \\) of \\( playground \\) is joined to both \\( sandcastle \\) and \\( toothbrush \\), and \\( sandcastle toothbrush pineapple \\) is a triangle. If \\( rainstorm+moonlight \\leq 2 watershed \\), then at most \\( 2 watershed+1 \\) segments have \\( sandcastle \\) or \\( toothbrush \\) as endpoints and at least\n\\[\n(watershed+1)^{2}+1-(2 watershed+1)=watershed^{2}+1\n\\]\nconnect points of \\( \\mathbf{playground} \\). By \\( \\boldsymbol{snowflake} \\) some three points of playground form a triangle. Thus \\( borderline \\) is true.\n\nTherefore, \\( whirlpool \\) is true for all \\( foreground>1 \\) (and for \\( foreground=1 \\) in a vacuous way).\nTo show that \\( 2 foreground \\) points can be joined by \\( foreground^{2} \\) segments without any triangles being formed, divide the points into two sets \\( playground, flashlight \\) of \\( foreground \\) elements each. If every point in \\( playground \\) is joined to every point in \\( flashlight \\), then \\( foreground^{2} \\) segments are used and no triangle is formed.\n\nRemark. If \\( 2 foreground \\) points are joined by \\( foreground^{2}+1 \\) segments, then at least \\( foreground \\) triangles are formed. For a discussion of this and related problems, see P. Turan, \"On the Theory of Graphs,\" Colloquium Mathematica, vol. 3 (1954, pages 19-30."
    },
    "descriptive_long_misleading": {
      "map": {
        "A": "regionone",
        "B": "regiontwo",
        "C": "regionthree",
        "D": "regionfour",
        "p": "isolatedcount",
        "q": "solitarycount",
        "n": "tinycount",
        "k": "voidstep",
        "S": "mismatchset",
        "T": "contrastset",
        "T_n": "falseassertion",
        "T_2": "falsebasecase",
        "T_k": "falsekeystep",
        "T_k+1": "falsefollowup"
      },
      "question": "5. Consider a set of \\( 2 tinycount \\) points in space, \\( tinycount>1 \\). Suppose they are joined by at least \\( tinycount^{2}+1 \\) segments. Show that at least one triangle is formed. Show that for each \\( tinycount \\) it is possible to have \\( 2 tinycount \\) points joined by \\( tinycount^{2} \\) segments without any triangles being formed.",
      "solution": "Solution. Let \\( falseassertion \\) be the statement: If \\( 2 tinycount \\) points are joined by at least \\( tinycount^{2}+1 \\) segments, then a triangle is formed. We shall prove \\( falseassertion \\) by induction.\n\nSuppose \\( regionone, regiontwo, regionthree, regionfour \\) are four points joined by at least five segments. Then at most one segment is missing, say \\( regionone regiontwo \\), and \\( regiontwo regionthree regionfour \\) form a triangle. Thus \\( falsebasecase \\) is true.\n\nNow assume \\( falsekeystep \\) is true. Let \\( 2(voidstep+1) \\) points be given connected by at least \\( (voidstep+1)^{2}+1 \\) segments. Let \\( regionone \\) and \\( regiontwo \\) be two points that are joined and let \\( \\mathcal{mismatchset} \\) be the set of \\( 2 voidstep \\) other points. Suppose \\( isolatedcount \\) points of \\( \\mathcal{mismatchset} \\) are joined to \\( regionone \\) and \\( solitarycount \\) points of \\( mismatchset \\) are joined to \\( regiontwo \\). If \\( isolatedcount+solitarycount>2 voidstep \\), then some point \\( regionthree \\) of \\( mismatchset \\) is joined to both \\( regionone \\) and \\( regiontwo \\), and \\( regionone regiontwo regionthree \\) is a triangle. If \\( isolatedcount+solitarycount \\leq 2 voidstep \\), then at most \\( 2 voidstep+1 \\) segments have \\( regionone \\) or \\( regiontwo \\) as endpoints and at least\n\\[\n(voidstep+1)^{2}+1-(2 voidstep+1)=voidstep^{2}+1\n\\]\nconnect points of \\( \\mathbf{mismatchset} \\). By \\( \\boldsymbol{falsekeystep} \\) some three points of mismatchset form a triangle. Thus \\( falsefollowup \\) is true.\n\nTherefore, \\( falseassertion \\) is true for all \\( tinycount>1 \\) (and for \\( tinycount=1 \\) in a vacuous way).\nTo show that \\( 2 tinycount \\) points can be joined by \\( tinycount^{2} \\) segments without any triangles being formed, divide the points into two sets \\( mismatchset, contrastset \\) of \\( tinycount \\) elements each. If every point in \\( mismatchset \\) is joined to every point in \\( contrastset \\), then \\( tinycount^{2} \\) segments are used and no triangle is formed.\n\nRemark. If \\( 2 tinycount \\) points are joined by \\( tinycount^{2}+1 \\) segments, then at least \\( tinycount \\) triangles are formed. For a discussion of this and related problems, see P. Turan, \"On the Theory of Graphs,\" Colloquium Mathematica, vol. 3 (1954, pages 19-30."
    },
    "garbled_string": {
      "map": {
        "A": "hgtrmpsa",
        "B": "qzxplmno",
        "C": "fdaskjwe",
        "D": "nlqwerty",
        "p": "lmnopqrs",
        "q": "zxcvbnma",
        "n": "vbrstplq",
        "k": "mndghrei",
        "S": "qwerhjku",
        "T": "asdfghjk",
        "T_n": "plokmijn",
        "T_2": "qazwsxed",
        "T_k": "rfvtgbyh",
        "T_k+1": "yhnujmki"
      },
      "question": "5. Consider a set of \\( 2 vbrstplq \\) points in space, \\( vbrstplq>1 \\). Suppose they are joined by at least \\( vbrstplq^{2}+1 \\) segments. Show that at least one triangle is formed. Show that for each \\( vbrstplq \\) it is possible to have \\( 2 vbrstplq \\) points joined by \\( vbrstplq^{2} \\) segments without any triangles being formed.",
      "solution": "Solution. Let \\( plokmijn \\) be the statement: If \\( 2 vbrstplq \\) points are joined by at least \\( vbrstplq^{2}+1 \\) segments, then a triangle is formed. We shall prove \\( plokmijn \\) by induction.\n\nSuppose \\( hgtrmpsa, qzxplmno, fdaskjwe, nlqwerty \\) are four points joined by at least five segments. Then at most one segment is missing, say \\( hgtrmpsa qzxplmno \\), and \\( qzxplmno fdaskjwe nlqwerty \\) form a triangle. Thus \\( qazwsxed \\) is true.\n\nNow assume \\( rfvtgbyh \\) is true. Let \\( 2(mndghrei+1) \\) points be given connected by at least \\( (mndghrei+1)^{2}+1 \\) segments. Let \\( hgtrmpsa \\) and \\( qzxplmno \\) be two points that are joined and let \\( \\mathcal{qwerhjku} \\) be the set of \\( 2 mndghrei \\) other points. Suppose \\( lmnopqrs \\) points of \\( \\mathcal{qwerhjku} \\) are joined to \\( hgtrmpsa \\) and \\( zxcvbnma \\) points of \\( qwerhjku \\) are joined to \\( qzxplmno \\). If \\( lmnopqrs+zxcvbnma>2 mndghrei \\), then some point \\( fdaskjwe \\) of \\( qwerhjku \\) is joined to both \\( hgtrmpsa \\) and \\( qzxplmno \\), and \\( hgtrmpsa qzxplmno fdaskjwe \\) is a triangle. If \\( lmnopqrs+zxcvbnma \\leq 2 mndghrei \\), then at most \\( 2 mndghrei+1 \\) segments have \\( hgtrmpsa \\) or \\( qzxplmno \\) as endpoints and at least\n\\[\n(mndghrei+1)^{2}+1-(2 mndghrei+1)=mndghrei^{2}+1\n\\]\nconnect points of \\( \\mathbf{qwerhjku} \\). By \\( \\boldsymbol{rfvtgbyh} \\) some three points of qwerhjku form a triangle. Thus \\( yhnujmki \\) is true.\n\nTherefore, \\( plokmijn \\) is true for all \\( vbrstplq>1 \\) (and for \\( vbrstplq=1 \\) in a vacuous way).\nTo show that \\( 2 vbrstplq \\) points can be joined by \\( vbrstplq^{2} \\) segments without any triangles being formed, divide the points into two sets \\( qwerhjku, asdfghjk \\) of \\( vbrstplq \\) elements each. If every point in \\( qwerhjku \\) is joined to every point in \\( asdfghjk \\), then \\( vbrstplq^{2} \\) segments are used and no triangle is formed.\n\nRemark. If \\( 2 vbrstplq \\) points are joined by \\( vbrstplq^{2}+1 \\) segments, then at least \\( vbrstplq \\) triangles are formed. For a discussion of this and related problems, see P. Turan, \"On the Theory of Graphs,\" Colloquium Mathematica, vol. 3 (1954, pages 19-30."
    },
    "kernel_variant": {
      "question": "Let $n\\ge 2$ be an integer and fix a vertex partition  \n\\[\nV=A\\;\\dot\\cup\\;B ,\\qquad |A|=|B|=n .\n\\]\n\nDenote by  \n\\[\nK_{n,n}=([A,B],\\,E_{\\mathrm{back}}),\\qquad |E_{\\mathrm{back}}|=n^{2},\n\\]\nthe \\emph{backbone}.  \nEvery graph $G$ considered from now on fulfils the\n\n(Backbone condition)\\; $E_{\\mathrm{back}}\\subseteq E(G)$,\n\nso the $n^{2}$ edges between $A$ and $B$ are always present.  \nAll \\emph{surplus links} of $G$ must lie \\emph{inside} the parts:\n\\[\nE^{\\mathrm{in}}\\;:=\\;E(G)\\setminus E_{\\mathrm{back}}\n\\subseteq\\binom{A}{2}\\cup\\binom{B}{2}.\n\\]\nPut\n\\[\nq:=|E^{\\mathrm{in}}|,\\qquad \nq_{A}:=\\bigl|E^{\\mathrm{in}}\\cap\\binom{A}{2}\\bigr|,\\qquad\nq_{B}:=\\bigl|E^{\\mathrm{in}}\\cap\\binom{B}{2}\\bigr|,\\qquad\nq=q_{A}+q_{B}.\n\\tag{1}\n\\]\n\nFor any graph $H$ write $\\tau(H)$ for the number of (unordered) triangles in $H$ and set  \n$\\displaystyle \\operatorname{ex}(n,K_{3})=\\bigl\\lfloor n^{2}/4\\bigr\\rfloor$,\nMantel–Turán’s maximum number of edges in a triangle–free graph on $n$ vertices.\n\n(a) (Proved minimum) Show the \\emph{surplus–triangle inequality}\n\\[\n\\boxed{\\qquad \\tau(G)\\;\\ge\\; q\\,n\\qquad } .\n\\tag{$\\star$}\n\\]\n\n(b) (Exact minimum)\n\n(i) Prove that equality in $(\\star)$ is \\emph{possible} only if\n\\[\nq_{A}\\;\\le\\;\\operatorname{ex}(n,K_{3})\n\\quad\\text{and}\\quad\nq_{B}\\;\\le\\;\\operatorname{ex}(n,K_{3}).\n\\tag{2}\n\\]\n(In particular $(2)$ implies $q\\le 2\\,\\operatorname{ex}(n,K_{3})$, but the converse implication is false in general.)\n\n(ii) For every ordered triple $(n,q_{A},q_{B})$ satisfying $(2)$\nconstruct a graph $G^{\\ast}(n,q_{A},q_{B})$ such that\n$|E^{\\mathrm{in}}|=q_{A}+q_{B}$ and\n$\\tau\\!\\bigl(G^{\\ast}(n,q_{A},q_{B})\\bigr)=q\\,n$.\n\n(c) (Structure of all extremal graphs)  \nProve that equality $\\tau(G)=q\\,n$ holds \\emph{precisely} for those backbone networks in which both induced subgraphs $G[A]$ and $G[B]$ are triangle–free.\n\n(d) (Bonus: triangles beyond Mantel)  \nLet $s_{A}:=\\max\\{0,\\,q_{A}-\\operatorname{ex}(n,K_{3})\\}$ and  \n$s_{B}:=\\max\\{0,\\,q_{B}-\\operatorname{ex}(n,K_{3})\\}$.  \nShow that Rademacher’s theorem yields\n\\[\n\\tau(G)\\;\\ge\\; q\\,n \\;+\\;\\bigl(s_{A}+s_{B}\\bigr)\n\\Bigl\\lfloor \\frac{n}{2}\\Bigr\\rfloor .\n\\tag{$\\dagger$}\n\\]\nIn particular, if $q>2\\,\\operatorname{ex}(n,K_{3})$ then\n\\[\n\\tau(G)\\;\\ge\\; q\\,n \\;+\\;\n\\bigl(q-2\\,\\operatorname{ex}(n,K_{3})\\bigr)\n\\Bigl\\lfloor\\frac{n}{2}\\Bigr\\rfloor .\n\\]\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
      "solution": "Throughout let $G$ be a backbone network obeying the notation of\n$(1)$.\n\n--------------------------------------------------------------------\n1. Proof of the surplus–triangle inequality $(\\star)$.\n\nFix an arbitrary surplus edge $e=uv\\in E^{\\mathrm{in}}$ and, without loss of generality, assume $u,v\\in A$ (the case $u,v\\in B$ is symmetric).  \nFor every vertex $b\\in B$ the three edges\n\\[\nuv,\\;ub,\\;vb\n\\]\nform a triangle that contains $e$ as its \\emph{only} surplus edge.  \nSince $|B|=n$, there are \\emph{exactly} $n$ triangles of this\ntype (call them \\emph{type I} triangles) containing $e$.\nAdditional triangles might appear if the subgraph $G[A]$ itself\ncontains further surplus edges, but this observation suffices for our lower bound.\n\nIf $e'$ is another surplus edge, then the two collections of\ntype-I triangles generated by $e$ and by $e'$ are disjoint, because\neach such triangle is determined uniquely by its own defining surplus\nedge together with two backbone edges.  Consequently\n\\[\n\\tau(G)\\;\\ge\\; \\bigl|E^{\\mathrm{in}}\\bigr|\\,n\n             \\;=\\; q\\,n ,\n\\]\nproving $(\\star)$.\n\n--------------------------------------------------------------------\n2. When can equality occur? — Proof of part (b)(i).\n\nWrite\n\\[\n\\tau_{A}:=\\tau\\bigl(G[A]\\bigr),\\qquad\n\\tau_{B}:=\\tau\\bigl(G[B]\\bigr).\n\\]\nEvery triangle of $G$ is of one of the following two types:\n\n• type I: exactly one surplus edge (hence two backbone edges) — there are\n$qn$ of these, as counted above;\n\n• type II: three surplus edges contained in the same part — these contribute\n$\\tau_{A}+\\tau_{B}$ triangles.\n\nHence\n\\[\n\\tau(G)=qn+\\tau_{A}+\\tau_{B}.\n\\tag{3}\n\\]\nEquality $\\tau(G)=qn$ therefore forces $\\tau_{A}=\\tau_{B}=0$; both\ninduced subgraphs $G[A]$ and $G[B]$ must be triangle–free.\nBy Mantel’s theorem this implies\n\\[\nq_{A}\\;\\le\\;\\operatorname{ex}(n,K_{3}),\\qquad\nq_{B}\\;\\le\\;\\operatorname{ex}(n,K_{3}),\n\\]\nso $(2)$ is necessary.\n\nConversely, if $(2)$ holds we can realise $G[A]$ and $G[B]$ as\ntriangle–free graphs with the prescribed numbers of edges, so $(2)$ is\nalso sufficient.  This completes (b)(i).\n\n--------------------------------------------------------------------\n3. Construction of extremal graphs — proof of part (b)(ii).\n\nChoose triangle–free graphs  \n$H_{A}\\subseteq\\binom{A}{2}$ with $e(H_{A})=q_{A}$ and  \n$H_{B}\\subseteq\\binom{B}{2}$ with $e(H_{B})=q_{B}$\n(for instance, take suitable subgraphs of the balanced complete\nbipartite Turán graph on each part).\nDefine\n\\[\nG^{\\ast}(n,q_{A},q_{B})\n:= K_{n,n}\\;\\cup\\;H_{A}\\;\\cup\\;H_{B}.\n\\]\nBecause $H_{A}$ and $H_{B}$ are disjoint and triangle–free, relation (3)\ngives\n\\[\n\\tau\\!\\bigl(G^{\\ast}(n,q_{A},q_{B})\\bigr)=q\\,n,\n\\]\nas required.\n\n--------------------------------------------------------------------\n4. Characterisation of all equality graphs — proof of part (c).\n\nSuppose $\\tau(G)=q\\,n$.  \nThen $\\tau_{A}+\\tau_{B}=0$ by (3), so both $G[A]$ and $G[B]$ are\ntriangle–free.\nConversely, if both induced subgraphs are triangle–free,\n$\\tau_{A}=\\tau_{B}=0$ and again (3) yields $\\tau(G)=q\\,n$.\nHence\n\\[\n\\tau(G)=q\\,n\\quad\\Longleftrightarrow\\quad\nG[A]\\text{ and }G[B]\\text{ are triangle–free}.\n\\]\n\n--------------------------------------------------------------------\n5. Bonus — proof of the strengthened lower bound $(\\dagger)$.\n\nFix one part, say $A$, and put $s_{A}=q_{A}-\\operatorname{ex}(n,K_{3})$\nif this number is positive, otherwise $s_{A}=0$.\nRademacher’s theorem tells us that a\ngraph on $n$ vertices with $\\operatorname{ex}(n,K_{3})+s_{A}$ edges\ncontains at least\n$s_{A}\\Bigl\\lfloor n/2\\Bigr\\rfloor$ triangles.  Hence\n$\\tau_{A}\\ge s_{A}\\Bigl\\lfloor n/2\\Bigr\\rfloor$,\nand the same argument applied to part $B$ yields\n$\\tau_{B}\\ge s_{B}\\Bigl\\lfloor n/2\\Bigr\\rfloor$.\nInserting these estimates into (3) gives $(\\dagger)$ immediately.\nIf $q>2\\,\\operatorname{ex}(n,K_{3})$ then $s_{A}+s_{B}=q-2\\,\\operatorname{ex}(n,K_{3})>0$,\nwhich implies the announced lower bound.\n\n\\hfill$\\square$\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.484073",
        "was_fixed": false,
        "difficulty_analysis": "• The original problem required only the existence of a single triangle once the Mantel bound n² was exceeded by one edge.  \n• The enhanced variant asks for an exact minimisation of the triangle count for every possible surplus q, a full characterisation of all extremal graphs, and quantitative corollaries.  \n• The solution demands several advanced extremal-graph tools: choice of a maximum cut, optimal-partition arguments, double counting, and a stability-type analysis to pin down the precise structure of every minimiser.  \n• It introduces extra parameters (the variable excess q), forces analysis of the entire triangle spectrum rather than mere existence, and requires matching constructions for every admissible q.  \nConsequently the task is substantially deeper, longer, and conceptually more sophisticated than both the original question and its previous kernel variant."
      }
    },
    "original_kernel_variant": {
      "question": "Let $n\\ge 2$ be an integer and fix a vertex partition  \n\\[\nV=A\\;\\dot\\cup\\;B ,\\qquad |A|=|B|=n .\n\\]\n\nDenote by  \n\\[\nK_{n,n}=([A,B],\\,E_{\\mathrm{back}}),\\qquad |E_{\\mathrm{back}}|=n^{2},\n\\]\nthe \\emph{backbone}.  \nEvery graph $G$ considered from now on fulfils the\n\n(Backbone condition)\\; $E_{\\mathrm{back}}\\subseteq E(G)$,\n\nso the $n^{2}$ edges between $A$ and $B$ are always present.  \nAll \\emph{surplus links} of $G$ must lie \\emph{inside} the parts:\n\\[\nE^{\\mathrm{in}}\\;:=\\;E(G)\\setminus E_{\\mathrm{back}}\n\\subseteq\\binom{A}{2}\\cup\\binom{B}{2}.\n\\]\nPut\n\\[\nq:=|E^{\\mathrm{in}}|,\\qquad \nq_{A}:=\\bigl|E^{\\mathrm{in}}\\cap\\binom{A}{2}\\bigr|,\\qquad\nq_{B}:=\\bigl|E^{\\mathrm{in}}\\cap\\binom{B}{2}\\bigr|,\\qquad\nq=q_{A}+q_{B}.\n\\tag{1}\n\\]\n\nFor any graph $H$ write $\\tau(H)$ for the number of (unordered) triangles in $H$ and set  \n$\\displaystyle \\operatorname{ex}(n,K_{3})=\\bigl\\lfloor n^{2}/4\\bigr\\rfloor$,\nMantel–Turán’s maximum number of edges in a triangle–free graph on $n$ vertices.\n\n(a) (Proved minimum) Show the \\emph{surplus–triangle inequality}\n\\[\n\\boxed{\\qquad \\tau(G)\\;\\ge\\; q\\,n\\qquad } .\n\\tag{$\\star$}\n\\]\n\n(b) (Exact minimum)\n\n(i) Prove that equality in $(\\star)$ is \\emph{possible} only if\n\\[\nq_{A}\\;\\le\\;\\operatorname{ex}(n,K_{3})\n\\quad\\text{and}\\quad\nq_{B}\\;\\le\\;\\operatorname{ex}(n,K_{3}).\n\\tag{2}\n\\]\n(In particular $(2)$ implies $q\\le 2\\,\\operatorname{ex}(n,K_{3})$, but the converse implication is false in general.)\n\n(ii) For every ordered triple $(n,q_{A},q_{B})$ satisfying $(2)$\nconstruct a graph $G^{\\ast}(n,q_{A},q_{B})$ such that\n$|E^{\\mathrm{in}}|=q_{A}+q_{B}$ and\n$\\tau\\!\\bigl(G^{\\ast}(n,q_{A},q_{B})\\bigr)=q\\,n$.\n\n(c) (Structure of all extremal graphs)  \nProve that equality $\\tau(G)=q\\,n$ holds \\emph{precisely} for those backbone networks in which both induced subgraphs $G[A]$ and $G[B]$ are triangle–free.\n\n(d) (Bonus: triangles beyond Mantel)  \nLet $s_{A}:=\\max\\{0,\\,q_{A}-\\operatorname{ex}(n,K_{3})\\}$ and  \n$s_{B}:=\\max\\{0,\\,q_{B}-\\operatorname{ex}(n,K_{3})\\}$.  \nShow that Rademacher’s theorem yields\n\\[\n\\tau(G)\\;\\ge\\; q\\,n \\;+\\;\\bigl(s_{A}+s_{B}\\bigr)\n\\Bigl\\lfloor \\frac{n}{2}\\Bigr\\rfloor .\n\\tag{$\\dagger$}\n\\]\nIn particular, if $q>2\\,\\operatorname{ex}(n,K_{3})$ then\n\\[\n\\tau(G)\\;\\ge\\; q\\,n \\;+\\;\n\\bigl(q-2\\,\\operatorname{ex}(n,K_{3})\\bigr)\n\\Bigl\\lfloor\\frac{n}{2}\\Bigr\\rfloor .\n\\]\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
      "solution": "Throughout let $G$ be a backbone network obeying the notation of\n$(1)$.\n\n--------------------------------------------------------------------\n1. Proof of the surplus–triangle inequality $(\\star)$.\n\nFix an arbitrary surplus edge $e=uv\\in E^{\\mathrm{in}}$ and, without loss of generality, assume $u,v\\in A$ (the case $u,v\\in B$ is symmetric).  \nFor every vertex $b\\in B$ the three edges\n\\[\nuv,\\;ub,\\;vb\n\\]\nform a triangle that contains $e$ as its \\emph{only} surplus edge.  \nSince $|B|=n$, there are \\emph{exactly} $n$ triangles of this\ntype (call them \\emph{type I} triangles) containing $e$.\nAdditional triangles might appear if the subgraph $G[A]$ itself\ncontains further surplus edges, but this observation suffices for our lower bound.\n\nIf $e'$ is another surplus edge, then the two collections of\ntype-I triangles generated by $e$ and by $e'$ are disjoint, because\neach such triangle is determined uniquely by its own defining surplus\nedge together with two backbone edges.  Consequently\n\\[\n\\tau(G)\\;\\ge\\; \\bigl|E^{\\mathrm{in}}\\bigr|\\,n\n             \\;=\\; q\\,n ,\n\\]\nproving $(\\star)$.\n\n--------------------------------------------------------------------\n2. When can equality occur? — Proof of part (b)(i).\n\nWrite\n\\[\n\\tau_{A}:=\\tau\\bigl(G[A]\\bigr),\\qquad\n\\tau_{B}:=\\tau\\bigl(G[B]\\bigr).\n\\]\nEvery triangle of $G$ is of one of the following two types:\n\n• type I: exactly one surplus edge (hence two backbone edges) — there are\n$qn$ of these, as counted above;\n\n• type II: three surplus edges contained in the same part — these contribute\n$\\tau_{A}+\\tau_{B}$ triangles.\n\nHence\n\\[\n\\tau(G)=qn+\\tau_{A}+\\tau_{B}.\n\\tag{3}\n\\]\nEquality $\\tau(G)=qn$ therefore forces $\\tau_{A}=\\tau_{B}=0$; both\ninduced subgraphs $G[A]$ and $G[B]$ must be triangle–free.\nBy Mantel’s theorem this implies\n\\[\nq_{A}\\;\\le\\;\\operatorname{ex}(n,K_{3}),\\qquad\nq_{B}\\;\\le\\;\\operatorname{ex}(n,K_{3}),\n\\]\nso $(2)$ is necessary.\n\nConversely, if $(2)$ holds we can realise $G[A]$ and $G[B]$ as\ntriangle–free graphs with the prescribed numbers of edges, so $(2)$ is\nalso sufficient.  This completes (b)(i).\n\n--------------------------------------------------------------------\n3. Construction of extremal graphs — proof of part (b)(ii).\n\nChoose triangle–free graphs  \n$H_{A}\\subseteq\\binom{A}{2}$ with $e(H_{A})=q_{A}$ and  \n$H_{B}\\subseteq\\binom{B}{2}$ with $e(H_{B})=q_{B}$\n(for instance, take suitable subgraphs of the balanced complete\nbipartite Turán graph on each part).\nDefine\n\\[\nG^{\\ast}(n,q_{A},q_{B})\n:= K_{n,n}\\;\\cup\\;H_{A}\\;\\cup\\;H_{B}.\n\\]\nBecause $H_{A}$ and $H_{B}$ are disjoint and triangle–free, relation (3)\ngives\n\\[\n\\tau\\!\\bigl(G^{\\ast}(n,q_{A},q_{B})\\bigr)=q\\,n,\n\\]\nas required.\n\n--------------------------------------------------------------------\n4. Characterisation of all equality graphs — proof of part (c).\n\nSuppose $\\tau(G)=q\\,n$.  \nThen $\\tau_{A}+\\tau_{B}=0$ by (3), so both $G[A]$ and $G[B]$ are\ntriangle–free.\nConversely, if both induced subgraphs are triangle–free,\n$\\tau_{A}=\\tau_{B}=0$ and again (3) yields $\\tau(G)=q\\,n$.\nHence\n\\[\n\\tau(G)=q\\,n\\quad\\Longleftrightarrow\\quad\nG[A]\\text{ and }G[B]\\text{ are triangle–free}.\n\\]\n\n--------------------------------------------------------------------\n5. Bonus — proof of the strengthened lower bound $(\\dagger)$.\n\nFix one part, say $A$, and put $s_{A}=q_{A}-\\operatorname{ex}(n,K_{3})$\nif this number is positive, otherwise $s_{A}=0$.\nRademacher’s theorem tells us that a\ngraph on $n$ vertices with $\\operatorname{ex}(n,K_{3})+s_{A}$ edges\ncontains at least\n$s_{A}\\Bigl\\lfloor n/2\\Bigr\\rfloor$ triangles.  Hence\n$\\tau_{A}\\ge s_{A}\\Bigl\\lfloor n/2\\Bigr\\rfloor$,\nand the same argument applied to part $B$ yields\n$\\tau_{B}\\ge s_{B}\\Bigl\\lfloor n/2\\Bigr\\rfloor$.\nInserting these estimates into (3) gives $(\\dagger)$ immediately.\nIf $q>2\\,\\operatorname{ex}(n,K_{3})$ then $s_{A}+s_{B}=q-2\\,\\operatorname{ex}(n,K_{3})>0$,\nwhich implies the announced lower bound.\n\n\\hfill$\\square$\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.405320",
        "was_fixed": false,
        "difficulty_analysis": "• The original problem required only the existence of a single triangle once the Mantel bound n² was exceeded by one edge.  \n• The enhanced variant asks for an exact minimisation of the triangle count for every possible surplus q, a full characterisation of all extremal graphs, and quantitative corollaries.  \n• The solution demands several advanced extremal-graph tools: choice of a maximum cut, optimal-partition arguments, double counting, and a stability-type analysis to pin down the precise structure of every minimiser.  \n• It introduces extra parameters (the variable excess q), forces analysis of the entire triangle spectrum rather than mere existence, and requires matching constructions for every admissible q.  \nConsequently the task is substantially deeper, longer, and conceptually more sophisticated than both the original question and its previous kernel variant."
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}