{"year": "2019", "tier": "T1", "problem_label": "1", "problem_type": null, "exam": "RMM", "problem": "Amy and Bob play the game. At the beginning, Amy writes down a positive integer on the board. Then the players take moves in turn, Bob moves first. On any move of his, Bob replaces the number $n$ on the blackboard with a number of the form $n-a^{2}$, where $a$ is a positive integer. On any move of hers, Amy replaces the number $n$ on the blackboard with a number of the form $n^{k}$, where $k$ is a positive integer. Bob wins if the number on the board becomes zero. Can Amy prevent Bob's win?\n\nRussia, Maxim Didin", "solution": "The answer is in the negative. For a positive integer $n$, we define its square-free part $S(n)$ to be the smallest positive integer $a$ such that $n / a$ is a square of an integer. In other words, $S(n)$ is the product of all primes having odd exponents in the prime expansion of $n$. We also agree that $S(0)=0$.\n\nNow we show that (i) on any move of hers, Amy does not increase the square-free part of the positive integer on the board; and (ii) on any move of his, Bob always can replace a positive integer $n$ with a non-negative integer $k$ with $S(k)\\varepsilon v$.\n\nFor each edge $b$ in $B$, adjoining $b$ to $F$ produces a unique simple cycle $C_{b}$ through $b$. Let $S_{b}$ be the set of edges in $A$ along $C_{b}$. Since the $C_{b}$ have pairwise distinct lengths, $\\sum_{b \\in B}\\left|S_{b}\\right| \\geq$ $2+\\cdots+(|B|+1)=|B|(|B|+3) / 2>|B|^{2} / 2>\\varepsilon^{2} v^{2} / 2$.\n\nConsequently, some edge in $A$ lies in more than $\\varepsilon^{2} v^{2} /(2 v)=\\varepsilon^{2} v / 2$ of the $S_{b}$. Fix such an edge $a$ in $A$, and let $B^{\\prime}$ be the set of all edges $b$ in $B$ whose corresponding $S_{b}$ contain $a$, so $\\left|B^{\\prime}\\right|>\\varepsilon^{2} v / 2$.\n\nFor each 2-edge subset $\\left\\{b_{1}, b_{2}\\right\\}$ of $B^{\\prime}$, the union $C_{b_{1}} \\cup C_{b_{2}}$ of the cycles $C_{b_{1}}$ and $C_{b_{2}}$ forms a $\\theta$-graph, since their common part is a path in $F$ through $a$; and since neither of the $b_{i}$ lies along this path, $C_{b_{1}} \\cup C_{b_{2}}$ contains a third simple cycle $C_{b_{1}, b_{2}}$ through both $b_{1}$ and $b_{2}$. Finally, since $B^{\\prime} \\cap C_{b_{1}, b_{2}}=\\left\\{b_{1}, b_{2}\\right\\}$, the assignment $\\left\\{b_{1}, b_{2}\\right\\} \\mapsto C_{b_{1}, b_{2}}$ is injective, so the total number of simple cycles in $G$ is at least $\\binom{\\left|B^{\\prime}\\right|}{2}>\\binom{\\varepsilon^{2} v / 2}{2}$. This establishes the desired lower bound and concludes the proof.\n\nRemarks. (1) The problem of finding two cycles of equal lengths in a graph on $v$ vertices with $2 v$ edges is known and much easier - simply consider all cycles of the form $C_{b}$.\n\nThe solution above shows that a graph on $v$ vertices with at least $v+\\Theta\\left(v^{3 / 4}\\right)$ edges has two cycles of equal lengths. The constant $3 / 4$ is not sharp; a harder proof seems to show that $v+\\Theta(\\sqrt{v \\log v})$ edges would suffice. On the other hand, there exist graphs on $v$ vertices with $v+\\Theta(\\sqrt{v})$ edges having no such cycles.\n(2) To avoid graph terminology, the statement of the problem may be rephrased as follows:\n\nGiven any positive real number $\\varepsilon$, prove that, for all but finitely many positive integers $v$, any $v$-member company, within which there are at least $(1+\\varepsilon) v$ friendship relations, satisfies the following condition: For some integer $u \\geq 3$, there exist two distinct $u$ member cyclic arrangements in each of which any two neighbours are friends. (Two arrangements are distinct if they are not obtained from one another through rotation and/or symmetry; a member of the company may be included in neither arrangement, in one of them or in both.)\n\nSketch of solution 2. (Po-Shen Loh) Recall that the girth of a graph $G$ is the minimal length of a (simple) cycle in this graph.\n\nLemma. For any fixed positive $\\delta$, a graph on $v$ vertices whose girth is at least $\\delta v$ has at most $v+o(v)$ edges.\nProof. Define $f(v)$ to be the maximal number $f$ such that a graph on $v$ vertices whose girth is at least $\\delta v$ may have $v+f$ edges. We are interested in the recursive estimates for $f$.\n\nLet $G$ be a graph on $v$ vertices whose gifth is at least $\\delta v$ containing $v+f(v)$ edges. If $G$ contains a leaf (i.e., a vertex of degree 1 ), then one may remove this vertex along with its edge, obtaining a graph with at most $v-1+f(v-1)$ edges. Thus, in this case $f(v) \\leq f(v-1)$.\n\nDefine an isolated path of length $k$ to be a sequence of vertices $v_{0}, v_{1}, \\ldots, v_{k}$, such that $v_{i}$ is connected to $v_{i+1}$, and each of the vertices $v_{1}, \\ldots, v_{k-1}$ has degree 2 (so, these vertices are connected only to their neighbors in the path). If $G$ contains an isolated path $v_{0}, \\ldots, v_{k}$ of length, say, $k>\\sqrt{v}$, then one may remove all its middle vertices $v_{1}, \\ldots, v_{k-1}$, along with all their $k$ edges. We obtain a graph on $v-k+1$ vertices with at most $(v-k+1)+f(v-k+1)$ edges. Thus, in this case $f(v) \\leq f(v-k+1)+1$.\n\nAssume now that the lengths of all isolated paths do not exceed $\\sqrt{v}$; we show that in this case $v$ is bounded from above. For that purpose, we replace each maximal isolated path by an edge between its endpoints, removing all middle vertices. We obtain a graph $H$ whose girth is at least $\\delta v / \\sqrt{v}=\\delta \\sqrt{v}$. Each vertex of $H$ has degree at least 3. By the girth condition, the neighborhood of any vertex $x$ of radius $r=\\lfloor(\\delta \\sqrt{v}-1) / 2\\rfloor$ is a tree rooted at $x$. Any vertex at level $i\\sqrt{v}$. This easily yields $f(v)=o(v)$, as desired.\n\nNow we proceed to the problem. Consider a graph on $v$ vertices containing no two simple cycles of the same length. Take its $\\lfloor\\varepsilon v / 2\\rfloor$ shortest cycles (or all its cycles, if their total number is smaller) and remove an edge from each. We get a graph of girth at least $\\varepsilon v / 2$. By the lemma, the number of edges in the obtained graph is at most $v+o(v)$, so the number of edges in the initial graph is at most $v+\\varepsilon v / 2+o(v)$, which is smaller than $(1+\\varepsilon) v$ if $v$ is large enough.", "metadata": {"resource_path": "RMM/segmented/en-2019-RMM2019-Day1-English.jsonl", "problem_match": "\nProblem 3.", "solution_match": "\nSolution."}}