{"year": "2002", "tier": "T3", "problem_label": "1", "problem_type": null, "exam": "BalticWay", "problem": "Solve the system of equations\n\n$$\n\\left\\{\\begin{array}{l}\na^{3}+3 a b^{2}+3 a c^{2}-6 a b c=1 \\\\\nb^{3}+3 b a^{2}+3 b c^{2}-6 a b c=1 \\\\\nc^{3}+3 c a^{2}+3 c b^{2}-6 a b c=1\n\\end{array}\\right.\n$$\n\nin real numbers.\n\nAnswer: $a=1, b=1, c=1$.", "solution": "Denoting the left hand sides of the given equations as $A, B$ and $C$, the following equalities can easily be seen to hold:\n\n$$\n\\begin{aligned}\n-A+B+C & =(-a+b+c)^{3} \\\\\nA-B+C & =(a-b+c)^{3} \\\\\nA+B-C & =(a+b-c)^{3} .\n\\end{aligned}\n$$\n\nHence, the system of equations given in the problem is equivalent to the following one:\n\n$$\n\\left\\{\\begin{array}{c}\n(-a+b+c)^{3}=1 \\\\\n(a-b+c)^{3}=1 \\\\\n(a+b-c)^{3}=1\n\\end{array}\\right.\n$$\n\nwhich gives\n\n$$\n\\left\\{\\begin{array}{c}\n-a+b+c=1 \\\\\na-b+c=1 \\\\\na+b-c=1\n\\end{array} .\\right.\n$$\n\nThe unique solution of this system is $(a, b, c)=(1,1,1)$.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n1.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "2", "problem_type": null, "exam": "BalticWay", "problem": "Let $a, b, c, d$ be real numbers such that\n\n$$\n\\begin{aligned}\na+b+c+d & =-2 \\\\\na b+a c+a d+b c+b d+c d & =0\n\\end{aligned}\n$$\n\nProve that at least one of the numbers $a, b, c, d$ is not greater than -1 .", "solution": "We can assume that $a$ is the least among $a, b, c, d$ (or one of the least, if some of them are equal), there are $n>0$ negative numbers among $a, b, c, d$, and the sum of the positive ones is $x$.\n\nThen we obtain\n\n$$\n-2=a+b+c+d \\geqslant n a+x .\n$$\n\nSquaring we get\n\n$$\n4=a^{2}+b^{2}+c^{2}+d^{2}\n$$\n\nwhich implies\n\n$$\n4 \\leqslant n \\cdot a^{2}+x^{2}\n$$\n\nas the square of the sum of positive numbers is not less than the sum of their squares.\n\nCombining inequalities (1) and (2) we obtain\n\n$$\n\\begin{aligned}\nn a^{2}+(n a+2)^{2} & \\geqslant 4, \\\\\nn a^{2}+n^{2} a^{2}+4 n a & \\geqslant 0, \\\\\na^{2}+n a^{2}+4 a & \\geqslant 0 .\n\\end{aligned}\n$$\n\nAs $n \\leqslant 3$ (if all the numbers are negative, the second condition of the problem cannot be satisfied), we obtain from the last inequality that\n\n$$\n\\begin{aligned}\n& 4 a^{2}+4 a \\geqslant 0, \\\\\n& a(a+1) \\geqslant 0 .\n\\end{aligned}\n$$\n\nAs $a<0$ it follows that $a \\leqslant-1$.\n\nAlternative solution. Assume that $a, b, c, d>-1$. Denoting $A=a+1, B=b+1, C=c+1, D=d+1$ we have $A, B, C, D>0$. Then the first equation gives\n\n$$\nA+B+C+D=2 \\text {. }\n$$\n\nWe also have\n\n$$\na b=(A-1)(B-1)=A B-A-B+1 .\n$$\n\nAdding 5 similar terms to the last one we get from the second equation\n\n$$\nA B+A C+A D+B C+B D+C D-3(A+B+C+D)+6=0 .\n$$\n\nIn view of (3) this implies\n\n$$\nA B+A C+A D+B C+B D+C D=0,\n$$\n\na contradiction as all the unknowns $A, B, C, D$ were supposed to be positive.\n\nAnother solution. Assume that the conditions of the problem hold:\n\n$$\n\\begin{aligned}\na+b+c+d & =-2 \\\\\na b+a c+a d+b c+b d+c d & =0 .\n\\end{aligned}\n$$\n\nSuppose that\n\n$$\na, b, c, d>-1 \\text {. }\n$$\n\nIf all of $a, b, c, d$ were negative, then (5) could not be satisfied, so at most three of them are negative. If two or less of them were negative, then (6) would imply that the sum of negative numbers, and hence also the sum $a+b+c+d$, is greater than $2 \\cdot(-1)=-2$, which contradicts (4). So exactly three of $a, b, c, d$ are negative and one is nonnegative. Let $d$ be the nonnegative one. Then $d=-2-(a+b+c)<-2-(-1-1-1)=1$. Obviously $|a|,|b|,|c|,|d|<1$. Squaring (4) and subtracting 2 times (5), we get\n\n$$\na^{2}+b^{2}+c^{2}+d^{2}=4,\n$$\n\nbut\n\n$$\na^{2}+b^{2}+c^{2}+d^{2}=|a|^{2}+|b|^{2}+|c|^{2}+|d|^{2}<4,\n$$\n\na contradiction.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n2.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "3", "problem_type": null, "exam": "BalticWay", "problem": "Find all sequences $a_{0} \\leqslant a_{1} \\leqslant a_{2} \\leqslant \\ldots$ of real numbers such that\n\n$$\na_{m^{2}+n^{2}}=a_{m}^{2}+a_{n}^{2}\n$$\n\nfor all integers $m, n \\geqslant 0$.\n\nAnswer: $a_{n} \\equiv 0, a_{n} \\equiv \\frac{1}{2}$ and $a_{n}=n$.", "solution": "Denoting $f(n)=a_{n}$ we have\n\n$$\nf\\left(m^{2}+n^{2}\\right)=f^{2}(m)+f^{2}(n) .\n$$\n\nSubstituting $m=n=0$ into (7) we get $f(0)=2 f^{2}(0)$, hence either $f(0)=\\frac{1}{2}$ or $f(0)=0$. We consider these cases separately.\n\n(1) If $f(0)=\\frac{1}{2}$ then substituting $m=1$ and $n=0$ into (7) we obtain $f(1)=f^{2}(1)+\\frac{1}{4}$, whence $\\left(f(1)-\\frac{1}{2}\\right)^{2}=0$ and $f(1)=\\frac{1}{2}$. Now,\n\n$$\n\\begin{aligned}\n& f(2)=f\\left(1^{2}+1^{2}\\right)=2 f^{2}(1)=\\frac{1}{2}, \\\\\n& f(8)=f\\left(2^{2}+2^{2}\\right)=2 f^{2}(2)=\\frac{1}{2},\n\\end{aligned}\n$$\n\netc, implying that $f\\left(2^{i}\\right)=\\frac{1}{2}$ for arbitrarily large natural $i$ and, due to monotonity, $f(n)=\\frac{1}{2}$ for every natural $n$.\n\n(2) If $f(0)=0$ then by substituting $m=1, n=0$ into (7) we obtain $f(1)=f^{2}(1)$ and hence, $f(1)=0$ or $f(1)=1$. This gives two subcases.\n\n(2a) If $f(0)=0$ and $f(1)=0$ then by the same technique as above we see that $f\\left(2^{i}\\right)=0$ for arbitrarily large natural $i$ and, due to monotonity, $f(n)=0$ for every natural $n$.\n\n(2b) If $f(0)=0$ and $f(1)=1$ then we compute\n\n$$\n\\begin{aligned}\n& f(2)=f\\left(1^{2}+1^{2}\\right)=2 f^{2}(1)=2, \\\\\n& f(4)=f\\left(2^{2}+0^{2}\\right)=f^{2}(2)=4, \\\\\n& f(5)=f\\left(2^{2}+1^{2}\\right)=f^{2}(2)+f^{2}(1)=5 .\n\\end{aligned}\n$$\n\nNow,\n\n$$\nf^{2}(3)+f^{2}(4)=f(25)=f^{2}(5)+f^{2}(0)=25,\n$$\n\nhence $f^{2}(3)=25-16=9$ and $f(3)=3$. Further,\n\n$$\n\\begin{aligned}\nf(8) & =f\\left(2^{2}+2^{2}\\right)=2 f^{2}(2)=8 \\\\\nf(9) & =f\\left(3^{2}+0^{2}\\right)=f^{2}(3)=9 \\\\\nf(10) & =f\\left(3^{2}+1^{2}\\right)=f^{2}(3)+f^{2}(1)=10\n\\end{aligned}\n$$\n\nFrom the equalities\n\n$$\n\\begin{aligned}\n& f^{2}(6)+f^{2}(8)=f^{2}(10)+f^{2}(0), \\\\\n& f^{2}(7)+f^{2}(1)=f^{2}(5)+f^{2}(5)\n\\end{aligned}\n$$\n\nwe also conclude that $f(6)=6$ and $f(7)=7$. It remains to note that\n\n$$\n\\begin{aligned}\n& (2 k+1)^{2}+(k-2)^{2}=(2 k-1)^{2}+(k+2)^{2}, \\\\\n& (2 k+2)^{2}+(k-4)^{2}=(2 k-2)^{2}+(k+4)^{2}\n\\end{aligned}\n$$\n\nand by induction it follows that $f(n)=n$ for every natural $n$.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n3.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "4", "problem_type": null, "exam": "BalticWay", "problem": "Let $n$ be a positive integer. Prove that\n\n$$\n\\sum_{i=1}^{n} x_{i}\\left(1-x_{i}\\right)^{2} \\leqslant\\left(1-\\frac{1}{n}\\right)^{2}\n$$\n\nfor all nonnegative real numbers $x_{1}, x_{2}, \\ldots, x_{n}$ such that $x_{1}+x_{2}+\\cdots+x_{n}=1$.", "solution": "Expanding the expressions at both sides we obtain the equivalent inequality\n\n$$\n-\\sum_{i} x_{i}^{3}+2 \\sum_{i} x_{i}^{2}-\\frac{2}{n}+\\frac{1}{n^{2}} \\geqslant 0\n$$\n\nIt is easy to check that the left hand side is equal to\n\n$$\n\\sum_{i}\\left(2-\\frac{2}{n}-x_{i}\\right)\\left(x_{i}-\\frac{1}{n}\\right)^{2}\n$$\n\nand hence is nonnegative.\n\nAlternative solution. First note that for $n=1$ the required condition holds trivially, and for $n=2$ we have\n\n$$\nx(1-x)^{2}+(1-x) x^{2}=x(1-x) \\leqslant\\left(\\frac{x+(1-x)}{2}\\right)^{2}=\\frac{1}{4}=\\left(1-\\frac{1}{2}\\right)^{2} .\n$$\n\nSo we may further consider the case $n \\geqslant 3$.\n\nAssume first that for each index $i$ the inequality $x_{i}<\\frac{2}{3}$ holds. Let $f(x)=x(1-x)^{2}=x-2 x^{2}+x^{3}$, then $f^{\\prime \\prime}(x)=6 x-4$. Hence, the function $f$ is concave in the interval $\\left[0, \\frac{2}{3}\\right]$. Thus, from Jensen's inequality we have\n\n$$\n\\begin{aligned}\n\\sum_{i=1}^{n} x_{i}\\left(1-x_{i}\\right)^{2} & =\\sum_{i=1}^{n} f\\left(x_{i}\\right) \\leqslant n \\cdot f\\left(\\frac{x_{1}+\\ldots+x_{n}}{n}\\right)=n \\cdot f\\left(\\frac{1}{n}\\right)= \\\\\n& =n \\cdot \\frac{1}{n}\\left(1-\\frac{1}{n}\\right)^{2}=\\left(1-\\frac{1}{n}\\right)^{2} .\n\\end{aligned}\n$$\n\nIf some $x_{i} \\geqslant \\frac{2}{3}$ then we have\n\n$$\nx_{i}\\left(1-x_{i}\\right)^{2} \\leqslant 1 \\cdot\\left(1-\\frac{2}{3}\\right)^{2}=\\frac{1}{9}\n$$\n\nFor the rest of the terms we have\n\n$$\n\\sum_{j \\neq i} x_{j}\\left(1-x_{j}\\right)^{2} \\leqslant \\sum_{j \\neq i} x_{j}=1-x_{i} \\leqslant \\frac{1}{3}\n$$\n\nHence,\n\n$$\n\\sum_{i=1}^{n} x_{i}\\left(1-x_{i}\\right)^{2} \\leqslant \\frac{1}{9}+\\frac{1}{3}=\\frac{4}{9} \\leqslant\\left(1-\\frac{1}{n}\\right)^{2}\n$$\n\nas $n \\geqslant 3$.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n4.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "5", "problem_type": null, "exam": "BalticWay", "problem": "Find all pairs $(a, b)$ of positive rational numbers such that\n\n$$\n\\sqrt{a}+\\sqrt{b}=\\sqrt{2+\\sqrt{3}} .\n$$\n\nAnswer: $(a, b)=\\left(\\frac{1}{2}, \\frac{3}{2}\\right)$ or $(a, b)=\\left(\\frac{3}{2}, \\frac{1}{2}\\right)$.", "solution": "Squaring both sides of the equation gives\n\n$$\na+b+2 \\sqrt{a b}=2+\\sqrt{3}\n$$\n\nso $2 \\sqrt{a b}=r+\\sqrt{3}$ for some rational number $r$. Squaring both sides of this gives $4 a b=r^{2}+3+2 r \\sqrt{3}$, so $2 r \\sqrt{3}$ is rational, which implies $r=0$. Hence $a b=3 / 4$ and substituting this into (8) gives $a+b=2$. Solving for $a$ and $b$ gives $(a, b)=\\left(\\frac{1}{2}, \\frac{3}{2}\\right)$ or $(a, b)=\\left(\\frac{3}{2}, \\frac{1}{2}\\right)$.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n5.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "6", "problem_type": null, "exam": "BalticWay", "problem": "The following solitaire game is played on an $m \\times n$ rectangular board, $m, n \\geqslant 2$, divided into unit squares. First, a rook is placed on some square. At each move, the rook can be moved an arbitrary number of squares horizontally or vertically, with the extra condition that each move has to be made in the $90^{\\circ}$ clockwise direction compared to the previous one (e.g. after a move to the left, the next one has to be done upwards, the next one to the right etc). For which values of $m$ and $n$ is it possible that the rook visits every square of the board exactly once and returns to the first square? (The rook is considered to visit only those squares it stops on, and not the ones it steps over.)\n\nAnswer: $m, n \\equiv 0 \\bmod 2$.", "solution": "First, consider any row that is not the row where the rook starts from. The rook has to visit all the squares of that row exactly once, and on its tour around the board, every time it visits this row, exactly two squares get visited. Hence, $m$ must be even; a similar argument for the columns shows that $n$ must also be even.\n\nIt remains to prove that for any even $m$ and $n$ such a tour is possible. We will show it by an inductionlike argument. Labelling the squares with pairs of integers $(i, j)$, where $1 \\leqslant i \\leqslant m$ and $1 \\leqslant j \\leqslant n$, we start moving from the square $(m / 2+1,1)$ and first cover all the squares of the top and bottom rows in the order shown in the figure below, except for the squares $(m / 2-1, n)$ and $(m / 2+1, n)$; note that we finish on the square $(m / 2-1,1)$.\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_0d7b2527e7110b7d89ceg-05.jpg?height=363&width=479&top_left_y=1600&top_left_x=363)\n\nThe next square to visit will be $(m / 2-1, n-1)$ and now we will cover the rows numbered 2 and $n-1$, except for the two middle squares in row 2 . Continuing in this way we can visit all the squares except for the two middle squares in every second row (note that here we need the assumption that $m$ and $n$ are even):\n\n| 3 | 7 | | | 8 | 4 |\n| :---: | :---: | :---: | :---: | :---: | :---: |\n| 15 | 19 | 11 | 20 | 16 | 12 |\n| 23 | 27 | | | 28 | 24 |\n| 35 | 39 | 31 | 40 | 36 | 32 |\n| 34 | 38 | | | 37 | 33 |\n| 22 | 26 | 30 | 21 | 29 | 25 |\n| 14 | 18 | | | 17 | 13 |\n| 2 | 6 | 10 | 1 | 9 | 5 |\n\nThe rest of the squares can be visited easily:\n\n| 3 | 7 | 47 | 48 | 8 | 4 |\n| :---: | :---: | :---: | :---: | :---: | :---: |\n| 15 | 19 | 11 | 20 | 16 | 12 |\n| 23 | 27 | 43 | 44 | 28 | 24 |\n| 35 | 39 | 31 | 40 | 36 | 32 |\n| 34 | 38 | 42 | 41 | 37 | 33 |\n| 22 | 26 | 30 | 21 | 29 | 25 |\n| 14 | 18 | 46 | 45 | 17 | 13 |\n| 2 | 6 | 10 | 1 | 9 | 5 |", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n6.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "7", "problem_type": null, "exam": "BalticWay", "problem": "We draw $n$ convex quadrilaterals in the plane. They divide the plane into regions (one of the regions is infinite). Determine the maximal possible number of these regions.\n\nAnswer: The maximal number of regions is $4 n^{2}-4 n+2$.", "solution": "One quadrilateral produces two regions. Suppose we have drawn $k$ quadrilaterals $Q_{1}, \\ldots, Q_{k}$ and produced $a_{k}$ regions. We draw another quadrilateral $Q_{k+1}$ and try to evaluate the number of regions $a_{k+1}$ now produced. Our task is to make $a_{k+1}$ as large as possible. Note that in a maximal configuration, no vertex of any $Q_{i}$ can be located on the edge of another quadrilateral as otherwise we could move this vertex a little bit to produce an extra region.\n\nBecause of this fact and the convexity of the $Q_{j}$ 's, any one of the four sides of $Q_{k+1}$ meets at most two sides of any $Q_{j}$. So the sides of $Q_{k+1}$ are divided into at most $2 k+1$ segments, each of which potentially grows the number of regions by one (being part of the common boundary of two parts, one of which is counted in $a_{k}$ ).\n\nBut if a side of $Q_{k+1}$ intersects the boundary of each $Q_{j}, 1 \\leqslant j \\leqslant k$ twice, then its endpoints (vertices of $Q_{k+1}$ ) are in the region outside of all the $Q_{j}$-s, and the the segments meeting at such a vertex are on the boundary of a single new part (recall that it makes no sense to put vertices on edges of another quadrilaterals). This means that $a_{k+1}-a_{k} \\leqslant 4(2 k+1)-4=8 k$. By considering squares inscribed in a circle one easily sees that the situation where $a_{k+1}-a_{k}=8 k$ can be reached.\n\nIt remains to determine the expression for the maximal $a_{k}$. Since the difference $a_{k+1}-a_{k}$ is linear in $k, a_{k}$ is a quadratic polynomial in $k$, and $a_{0}=2$. So $a_{k}=A k^{2}+B k+2$. We have $8 k=a_{k+1}-a_{k}=A(2 k+1)+B$ for all $k$. This implies $A=4, B=-4$, and $a_{n}=4 n^{2}-4 n+2$.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n7.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "8", "problem_type": null, "exam": "BalticWay", "problem": "Let $P$ be a set of $n \\geqslant 3$ points in the plane, no three of which are on a line. How many possibilities are there to choose a set $T$ of $\\left(\\begin{array}{c}n-1 \\\\ 2\\end{array}\\right)$ triangles, whose vertices are all in $P$, such that each triangle in $T$ has a side that is not a side of any other triangle in $T$ ?\n\nAnswer: There is one possibility for $n=3$ and $n$ possibilities for $n \\geqslant 4$.", "solution": "For a fixed point $x \\in P$, let $T_{x}$ be the set of all triangles with vertices in $P$ which have $x$ as a vertex. Clearly, $\\left|T_{x}\\right|=\\left(\\begin{array}{c}n-1 \\\\ 2\\end{array}\\right)$, and each triangle in $T_{x}$ has a side which is not a side of any other triangle in $T_{x}$. For any $x, y \\in P$ such that $x \\neq y$, we have $T_{x} \\neq T_{y}$ if and only if $n \\geqslant 4$. We will show that any possible set $T$ is equal to $T_{x}$ for some $x \\in P$, i.e. that the answer is 1 for $n=3$ and $n$ for $n \\geqslant 4$.\n\nLet\n\n$$\nT=\\left\\{t_{i}: i=1,2, \\ldots,\\left(\\begin{array}{c}\nn-1 \\\\\n2\n\\end{array}\\right)\\right\\}, \\quad S=\\left\\{s_{i}: i=1,2, \\ldots,\\left(\\begin{array}{c}\nn-1 \\\\\n2\n\\end{array}\\right)\\right\\}\n$$\n\nsuch that $T$ is a set of triangles whose vertices are all in $P$, and $s_{i}$ is a side of $t_{i}$ but not of any $t_{j}$, $j \\neq i$. Furthermore, let $C$ be the collection of all the $\\left(\\begin{array}{l}n \\\\ 3\\end{array}\\right)$ triangles whose vertices are in $P$. Note that\n\n$$\n|C \\backslash T|=\\left(\\begin{array}{c}\nn \\\\\n3\n\\end{array}\\right)-\\left(\\begin{array}{c}\nn-1 \\\\\n2\n\\end{array}\\right)=\\left(\\begin{array}{c}\nn-1 \\\\\n3\n\\end{array}\\right)\n$$\n\nLet $m$ be the number of pairs $(s, t)$ such that $s \\in S$ is a side of $t \\in C \\backslash T$. Since every $s \\in S$ is a side of exactly $n-3$ triangles from $C \\backslash T$, we have\n\n$$\nm=|S| \\cdot(n-3)=\\left(\\begin{array}{c}\nn-1 \\\\\n2\n\\end{array}\\right) \\cdot(n-3)=3 \\cdot\\left(\\begin{array}{c}\nn-1 \\\\\n3\n\\end{array}\\right)=3 \\cdot|C \\backslash T|\n$$\n\nOn the other hand, every $t \\in C \\backslash T$ has at most three sides from $S$. By the above equality, for every $t \\in C \\backslash T$, all its sides must be in $S$.\n\nAssume that for $p \\in P$ there is a side $s \\in S$ such that $p$ is an endpoint of $s$. Then $p$ is also a vertex of each of the $n-3$ triangles in $C \\backslash T$ which have $s$ as a side. Consequently, $p$ is an endpoint of $n-2$ sides in $S$. Since every side in $S$ has exactly 2 endpoints, the number of points $p \\in P$ which occur as a vertex of some $s \\in S$ is\n\n$$\n\\frac{2 \\cdot|S|}{n-2}=\\frac{2}{n-2} \\cdot\\left(\\begin{array}{c}\nn-1 \\\\\n2\n\\end{array}\\right)=n-1\n$$\n\nConsequently, there is an $x \\in P$ which is not an endpoint of any $s \\in S$, and hence $T$ must be equal to $T_{x}$.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n8.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "9", "problem_type": null, "exam": "BalticWay", "problem": "Two magicians show the following trick. The first magician goes out of the room. The second magician takes a deck of 100 cards labelled by numbers $1,2, \\ldots, 100$ and asks three spectators to choose in turn one card each. The second magician sees what card each spectator has taken. Then he adds one more card from the rest of the deck. Spectators shuffle these 4 cards, call the first magician and give him these 4 cards. The first magician looks at the 4 cards and \"guesses\" what card was chosen by the first spectator, what card by the second and what card by the third. Prove that the magicians can perform this trick.", "solution": "We will identify ourselves with the second magician. Then we need to choose a card in such a manner that another magician will be able to understand which of the 4 cards we have chosen and what information it gives about the order of the other cards. We will reach these two goals independently.\n\nLet $a, b, c$ be remainders of the labels of the spectators' three cards modulo 5 . There are three possible cases.\n\n1) All the three remainders coincide. Then choose a card with a remainder not equal to the remainder of spectators' cards. Denote this remainder $d$.\n\nNote that we now have 2 different remainders, one of them in 3 copies (this will be used by the first magician to distinguish betwwen the three cases). To determine which of the cards is chosen by us is now a simple exercise in division by 5 . But we must also encode the ordering of the spectators' cards. These cards have a natural ordering by their labels, and they are also ordered by their belonging to the spectators. Thus, we have to encode a permutation of 3 elements. There are 6 permutations of 3 elements, let us enumerate them somehow. Then, if we want to inform the first magician that spectators form a permutation number $k$ with respect to the natural ordering, we choose the card number $5 k+d$.\n\n2) The remainders $a, b, c$ are pairwise different. Then it is clear that exactly one of the following possibilities takes place:\n\n$$\n\\text { either }|b-a|=|a-c| \\text {, or }|a-b|=|b-c| \\text {, or } \\quad|a-c|=|c-b|\n$$\n\n(the equalities are considered modulo 5). It is not hard to prove it by a case study, but one could also imagine choosing three vertices of a regular pentagon - these vertices always form an isosceles, but not an equilateral triangle.\n\nEach of these possibilities has one of the remainders distinguished from the other two remainders (these distinguished remainders are $a, b, c$, respectively). Now, choose a card from the rest of the deck having the distinguished remainder modulo 5. Hence, we have three different remainders, one of them distinguished by (9) and presented in two copies. Let $d$ be the distinguished remainder and $s=5 m+d$ be the spectator's card with this remainder.\n\nNow we have to choose a card $r$ with the remainder $d$ such that the first magician would be able to understand which of the cards $s$ and $r$ was chosen by us and what permutation of spectators it implies. This can be done easily: if we want to inform the first magician that spectators form a permutation number $k$ with respect to the natural ordering, we choose the card number $s+5 k(\\bmod 100)$.\n\nThe decoding procedure is easy: if we have two numbers $p$ and $q$ that have the same remainder modulo 5 , calculate $p-q(\\bmod 100)$ and $q-p(\\bmod 100)$. If $p-q(\\bmod 100)>q-p(\\bmod 100)$ then $r=q$ is our card and $s=p$ is the spectator's card. (The case $p-q(\\bmod 100)=q-p(\\bmod 100)$ is impossible since the sum of these numbers is equal to 100 , and one of them is not greater than $6 \\cdot 5=30$.)\n\n3) Two remainders (say, $a$ and $b$ ) coincide. Let us choose a card with the remainder $d=(a+c) / 2 \\bmod 5$. Then $|a-d|=|d-c| \\bmod 5$, so the remainder $d$ is distinguished by (9). Hence we have three different remainders, one of them distinguished by (9) and one of the non-distinguished remainders presented in two copies. The first magician will easily determine our card, and the rule to choose the card in order to enable him also determine the order of spectators is similar to the one in the 1-st case.\n\nAlternative solution. This solution gives a non-constructive proof that the trick is possible. For this, we need to show there is an injective mapping from the set of ordered triples to the set of unordered quadruples that additionally respects inclusion.\n\nTo prove that the desired mapping exists, let's consides a bipartite graph such that the set of ordered triples $T$ and the set of unordered quadruples $Q$ form the two disjoint sets of vertices and there is an edge between a triple and a quadruple if and only if the triple is a subset of the quadruple.\n\nFor each triple $t \\in T$, we can add any of the remaining 97 cards to it, and thus we have 97 different quadruples connected to each triple in the graph. Conversely, for each quadruple $q \\in Q$, we can remove any of the 4 cards from it, and reorder the remaining 3 cards in $3 !=6$ different ways, and thus we have 24 different triples connected to each quadruple in the graph.\n\nAccording to the Hall's theorem, a bipartite graph $G=(T, Q, E)$ has a perfect matching if and only if for each subset $T^{\\prime} \\subseteq T$ the set of neighbours of $T^{\\prime}$, denoted $N\\left(T^{\\prime}\\right)$, satisfies $\\left|N\\left(T^{\\prime}\\right)\\right| \\geqslant\\left|T^{\\prime}\\right|$.\n\nTo prove that this condition holds for our graph, consider any subset $T^{\\prime} \\subseteq T$. Because we have 97 quadruples for each triple, and there can be at most 24 copies of each of them in the multiset of neighbours, we have $\\left|N\\left(T^{\\prime}\\right)\\right| \\geqslant \\frac{97}{24}\\left|T^{\\prime}\\right|>4\\left|T^{\\prime}\\right|$, which is even much more than we need.\n\nThus, the desired mapping is guaranteed to exist.\n\nAnother solution. Let the three chosen numbers be $\\left(x_{1}, x_{2}, x_{3}\\right)$. At least one of the sets $\\{1,2, \\ldots, 24\\}$, $\\{25,26, \\ldots, 48\\},\\{49,50, \\ldots, 72\\}$ and $\\{73,74, \\ldots, 96\\}$ should contain none of $x_{1}, x_{2}$ and $x_{3}$, let $S$ be such set. Next we split $S$ into 6 parts: $S=S_{1} \\cup S_{2} \\cup \\ldots \\cup S_{6}$ so that 4 first elements of $S$ are in $S_{1}$, four next in $S_{2}$, etc. Now we choose $i \\in\\{1,2, \\ldots, 6\\}$ corresponding to the order of numbers $x_{1}, x_{2}$ and $x_{3}$ (if $x_{1}|A B|$ and $|A D|>|A C|$. By the cosine law we have\n\n$$\n\\begin{aligned}\n|B D|^{2} & =|A D|^{2}+|A B|^{2}-2|A D \\| A B| \\cos \\angle B A D \\\\\n& <|A D|^{2}+|A B|^{2}-2|A B|^{2} \\cos \\angle B A D \\\\\n& =|A D|^{2}+|A B|^{2}(1-2 \\cos \\angle B A D) \\\\\n& \\leqslant|A D|^{2}\n\\end{aligned}\n$$\n\nsince $1 \\leqslant 2 \\cos (\\angle B A D)$. Hence $|B D|<|A D|$. Similarly we get $|C D|<|A D|$. Hence $A$ and $D$ should not be connected which is a contradiction.\n\nComment. It would be interesting to know whether 11 can be achieved or the actual bound is lower.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n11.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "12", "problem_type": null, "exam": "BalticWay", "problem": "A set $S$ of four distinct points is given in the plane. It is known that for any point $X \\in S$ the remaining points can be denoted by $Y, Z$ and $W$ so that\n\n$$\n|X Y|=|X Z|+|X W| .\n$$\n\nProve that all the four points lie on a line.", "solution": "Let $S=\\{A, B, C, D\\}$ and let $A B$ be the longest of the six segments formed by these four points (if there are several longest segments, choose any of them). If we choose $X=A$ then we must also choose $Y=B$. Indeed, if we would, for example, choose $Y=C$, we should have $|A C|=|A B|+|A D|$ contradicting the maximality of $A B$. Hence we get\n\n$$\n|A B|=|A C|+|A D| \\text {. }\n$$\n\nSimilarly, choosing $X=B$ we must choose $Y=A$ and we obtain\n\n$$\n|A B|=|B C|+|B D| \\text {. }\n$$\n\nOn the other hand, from the triangle inequality we know that\n\n$$\n\\begin{aligned}\n& |A B| \\leqslant|A C|+|B C|, \\\\\n& |A B| \\leqslant|A D|+|B D|,\n\\end{aligned}\n$$\n\nwhere at least one of the inequalities is strict if all the four points are not on the same line. Hence, adding the two last inequalities we get\n\n$$\n2|A B|<|A C|+|B C|+|A D|+|B D| .\n$$\n\nOn the other hand, adding (10) and (11) we get\n\n$$\n2|A B|=|A C|+|A D|+|B C|+|B D|,\n$$\n\na contradiction.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n12.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "13", "problem_type": null, "exam": "BalticWay", "problem": "Let $A B C$ be an acute triangle with $\\angle B A C>\\angle B C A$, and let $D$ be a point on side $A C$ such that $|A B|=|B D|$. Furthermore, let $F$ be a point on the circumcircle of triangle $A B C$ such that line $F D$ is perpendicular to side $B C$ and points $F, B$ lie on different sides of line $A C$. Prove that line $F B$ is perpendicular to side $A C$.", "solution": "Let $E$ be the other point on the circumcircle of triangle $A B C$ such that $|A B|=|E B|$. Let $D^{\\prime}$ be the point of intersection of side $A C$ and the line perpendicular to side $B C$, passing through $E$. Then $\\angle E C B=\\angle B C A$ and the triangle $E C D^{\\prime}$ is isosceles. As $E D^{\\prime} \\perp B C$, the triangle $B E D^{\\prime}$ is also isosceles and $|B E|=\\left|B D^{\\prime}\\right|$ implying $D=D^{\\prime}$. Hence, the points $E, D, F$ lie on one line. We now have\n\n$$\n\\angle E F B+\\angle F D A=\\angle B C A+\\angle E D C=90^{\\circ} .\n$$\n\nThe required result now follows.\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_0d7b2527e7110b7d89ceg-10.jpg?height=591&width=563&top_left_y=270&top_left_x=381)", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n13.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "14", "problem_type": null, "exam": "BalticWay", "problem": "Let $L, M$ and $N$ be points on sides $A C, A B$ and $B C$ of triangle $A B C$, respectively, such that $B L$ is the bisector of angle $A B C$ and segments $A N, B L$ and $C M$ have a common point. Prove that if $\\angle A L B=\\angle M N B$ then $\\angle L N M=90^{\\circ}$.", "solution": "Let $P$ be the intersection point of lines $M N$ and $A C$. Then $\\angle P L B=\\angle P N B$ and the quadrangle $P L N B$ is cyclic. Let $\\omega$ be its circumcircle. It is sufficient to prove that $P L$ is a diameter of $\\omega$.\n\nLet $Q$ denote the second intersection point of the line $A B$ and $\\omega$. Then $\\angle P Q B=\\angle P L B$ and\n\n$$\n\\angle Q P L=\\angle Q B L=\\angle L B N=\\angle L P N\n$$\n\nand the triangles $P A Q$ and $B A L$ are similar. Therefore,\n\n$$\n\\frac{|P Q|}{|P A|}=\\frac{|B L|}{|B A|}\n$$\n\nWe see that the line $P L$ is a bisector of the inscribed angle $N P Q$. Now in order to prove that $P L$ is a diameter of $\\omega$ it is sufficient to check that $|P N|=|P Q|$.\n\nThe triangles $N P C$ and $L B C$ are similar, hence\n\n$$\n\\frac{|P N|}{|P C|}=\\frac{|B L|}{|B C|}\n$$\n\nNote also that\n\n$$\n\\frac{|A B|}{|B C|}=\\frac{|A L|}{|C L|}\n$$\n\nby the properties of a bisector. Combining (12), (13) and (14) we have\n\n$$\n\\frac{|P N|}{|P Q|}=\\frac{|A L|}{|A P|} \\cdot \\frac{|C P|}{|C L|}\n$$\n\nWe want to prove that the left hand side of this equality equals 1 . This follows from the fact that the quadruple of points $(P, A, L, C)$ is harmonic, as can be proven using standard methods (e.g. considering the quadrilateral $M B N S$, where $S=M C \\cap A N$ ).\n\n![](https://cdn.mathpix.com/cropped/2024_04_17_0d7b2527e7110b7d89ceg-11.jpg?height=554&width=945&top_left_y=194&top_left_x=381)", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n14.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "15", "problem_type": null, "exam": "BalticWay", "problem": "A spider and a fly are sitting on a cube. The fly wants to maximize the shortest path to the spider along the surface of the cube. Is it necessarily best for the fly to be at the point opposite to the spider? (\"Opposite\" means \"symmetric with respect to the center of the cube\".)\n\nAnswer: no.", "solution": "Suppose that the side of the cube is 1 and the spider sits at the middle of one of the edges. Then the shortest path to the middle of the opposite edge has length 2 . However, if the fly goes to a point on this edge at distance $s$ from the middle, then the length of the shortest path is\n\n$$\n\\min \\left(\\sqrt{4+s^{2}}, \\sqrt{\\frac{9}{4}+\\left(\\frac{3}{2}-s\\right)^{2}}\\right) .\n$$\n\nIf $01$ such that any prime divisor of $n^{6}-1$ is a divisor of $\\left(n^{3}-1\\right)\\left(n^{2}-1\\right)$.", "solution": "Clearly $n=2$ is such an integer. We will show that there are no others.\n\nConsider the equality\n\n$$\nn^{6}-1=\\left(n^{2}-n+1\\right)(n+1)\\left(n^{3}-1\\right) \\text {. }\n$$\n\nThe integer $n^{2}-n+1=n(n-1)+1$ clearly has an odd divisor $p$. Then $p \\mid n^{3}+1$. Therefore, $p$ does not divide $n^{3}-1$ and consequently $p \\mid n^{2}-1$. This implies that $p$ divides $\\left(n^{3}+1\\right)+\\left(n^{2}-1\\right)=n^{2}(n+1)$. As $p$ does not divide $n$, we obtain $p \\mid n+1$. Also, $p \\mid\\left(n^{2}-1\\right)-\\left(n^{2}-n+1\\right)=n-2$. From $p \\mid n+1$ and $p \\mid n-2$ it follows that $p=3$, so $n^{2}-n+1=3^{r}$ for some positive integer $r$.\n\nThe discriminant of the quadratic $n^{2}-n+\\left(1-3^{r}\\right)$ must be a square of an integer, hence\n\n$$\n1-4\\left(1-3^{r}\\right)=3\\left(4 \\cdot 3^{r-1}-1\\right)\n$$\n\nmust be a squareof an integer. Since for $r \\geqslant 2$ the number $4 \\cdot 3^{r-1}-1$ is not divisible by 3 , this is possible only if $r=1$. So $n^{2}-n-2=0$ and $n=2$.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n18.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "19", "problem_type": null, "exam": "BalticWay", "problem": "Let $n$ be a positive integer. Prove that the equation\n\n$$\nx+y+\\frac{1}{x}+\\frac{1}{y}=3 n\n$$\n\ndoes not have solutions in positive rational numbers.", "solution": "Suppose $x=\\frac{p}{q}$ and $y=\\frac{r}{s}$ satisfy the given equation, where $p, q, r, s$ are positive integers and $\\operatorname{gcd}(p, q)=1, \\operatorname{gcd}(r, s)=1$. We have\n\n$$\n\\frac{p}{q}+\\frac{r}{s}+\\frac{q}{p}+\\frac{s}{r}=3 n\n$$\n\nor\n\n$$\n\\left(p^{2}+q^{2}\\right) r s+\\left(r^{2}+s^{2}\\right) p q=3 n p q r s,\n$$\n\nso $r s \\mid\\left(r^{2}+s^{2}\\right) p q$. Since $\\operatorname{gcd}(r, s)=1$, we have $\\operatorname{gcd}\\left(r^{2}+s^{2}, r s\\right)=1$ and $r s \\mid p q$. Analogously $p q \\mid r s$, so $r s=p q$ and hence there are either two or zero integers divisible by 3 among $p, q, r, s$. Now we have\n\n$$\n\\begin{aligned}\n\\left(p^{2}+q^{2}\\right) r s+\\left(r^{2}+s^{2}\\right) r s & =3 n(r s)^{2} \\\\\np^{2}+q^{2}+r^{2}+s^{2} & =3 n r s,\n\\end{aligned}\n$$\n\nbut $3 n r s \\equiv 0(\\bmod 3)$ and $p^{2}+q^{2}+r^{2}+s^{2}$ is congruent to either 1 or 2 modulo 3 , a contradiction.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n19.", "solution_match": "\nSolution."}} {"year": "2002", "tier": "T3", "problem_label": "20", "problem_type": null, "exam": "BalticWay", "problem": "Does there exist an infinite non-constant arithmetic progression, each term of which is of the form $a^{b}$, where $a$ and $b$ are positive integers with $b \\geqslant 2$ ?\n\nAnswer: no.", "solution": "For an arithmetic progression $a_{1}, a_{2}, \\ldots$ with difference $d$ the following holds:\n\n$$\n\\begin{aligned}\nS_{n} & =\\frac{1}{a_{1}}+\\frac{1}{a_{2}}+\\ldots+\\frac{1}{a_{n+1}}=\\frac{1}{a_{1}}+\\frac{1}{a_{1}+d}+\\ldots+\\frac{1}{a_{1}+n d} \\geqslant \\\\\n& \\geqslant \\frac{1}{m}\\left(\\frac{1}{1}+\\frac{1}{2}+\\ldots+\\frac{1}{n+1}\\right),\n\\end{aligned}\n$$\n\nwhere $m=\\max \\left(a_{1}, d\\right)$. Therefore $S_{n}$ tends to infinity when $n$ increases.\n\nOn the other hand, the sum of reciprocals of the powers of a natural number $x \\neq 1$ is\n\n$$\n\\frac{1}{x^{2}}+\\frac{1}{x^{3}}+\\ldots=\\frac{\\frac{1}{x^{2}}}{1-\\frac{1}{x}}=\\frac{1}{x(x-1)}\n$$\n\nHence, the sum of reciprocals of the terms of the progression required in the problem cannot exceed\n\n$$\n\\frac{1}{1}+\\frac{1}{1 \\cdot 2}+\\frac{1}{2 \\cdot 3}+\\ldots=1+\\left(\\frac{1}{1}-\\frac{1}{2}+\\frac{1}{2}-\\frac{1}{3}+\\ldots\\right)=2\n$$\n\na contradiction.\n\nAlternative solution. Let $a_{k}=a_{0}+d k, k=0,1, \\ldots$ Choose a prime number $p>d$ and set $k^{\\prime} \\equiv\\left(p-a_{0}\\right) d^{-1} \\bmod p^{2}$. Then $a_{k^{\\prime}}=a_{0}+k^{\\prime} d \\equiv p \\bmod p^{2}$ and hence, $a_{k^{\\prime}}$ can not be a power of a natural number.\n\nAnother solution. There can be at most $\\lfloor\\sqrt{n}\\rfloor$ squares in the set $\\{1,2, \\ldots, n\\}$, at most $\\lfloor\\sqrt[3]{n}\\rfloor$ cubes in the same set, etc. The greatest power that can occur in the set $\\{1,2, \\ldots, n\\}$ is $\\left\\lfloor\\log _{2} n\\right\\rfloor$ and thus there are no more than\n\n$$\n\\lfloor\\sqrt{n}\\rfloor+\\lfloor\\sqrt[3]{n}\\rfloor+\\ldots+\\left\\lfloor\\left\\lfloor\\log _{2} \\sqrt[n]{n}\\right\\rfloor\\right.\n$$\n\npowers among the numbers $1,2, \\ldots, n$. Now we can estimate this sum above:\n\n$$\n\\begin{aligned}\n\\lfloor\\sqrt{n}\\rfloor+\\lfloor\\sqrt[3]{n}\\rfloor+\\ldots+\\left\\lfloor\\left\\lfloor\\log _{2} \\sqrt[n\\rfloor\\right]{n}\\right\\rfloor & \\leqslant\\lfloor\\sqrt{n}\\rfloor\\left(\\left\\lfloor\\log _{2} n\\right\\rfloor-1\\right)< \\\\\n& <\\lfloor\\sqrt{n}\\rfloor \\cdot\\left\\lfloor\\log _{2} n\\right\\rfloor=o(n)\n\\end{aligned}\n$$\n\nThis means that every arithmetic progression grows faster than the share of powers.", "metadata": {"resource_path": "BalticWay/segmented/en-bw02sol.jsonl", "problem_match": "\n20.", "solution_match": "\nSolution."}}