problem:
Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that

$$
f(f(x) f(1-x))=f(x) \quad \text { and } \quad f(f(x))=1-f(x)
$$

for all real $x$.

solution:
Notice that $f(f(f(x)))=^{2} 1-f(f(x))={ }^{2} f(x)$. This is equation 3 . By substituting $f(x)$ for $x$ in the first equation we get:

$$
f(\underline{f(x)})={ }^{1} f(f(\underline{f(x)}) f(1-\underline{f(x)}))={ }^{2} f(f(f(x)) f(f(f(x))))={ }^{3} f(f(f(x)) f(x))
$$

Again we substitute $f(x)$ for $x$ above:

$$
f(f(\underline{f(x)}))=f(f(f(\underline{f(x)})) f(\underline{f(x)}))
$$

Equation 3 applied on both sides gives us:

$$
f(x)=f(f(x) f(f(x)))
$$

But this is the same as what we started with so

$$
f(x)=f(f(x) f(f(x)))=f(f(x))={ }^{2} 1-f(x)
$$

Therefore $f(x)=\frac{1}{2}$, which is a solution.

problem_match: ## Problem 1

solution_match: Solution 1.


solution:
Let first $c$ be a fix point of $f$, that is $f(c)=c$. Then from the second equation we have

$$
c=1-c \Rightarrow c=\frac{1}{2}
$$

The substitution $y=1-x$ in the first equation shows that $f(1-x)=f(x)$ for any $x$. Now, using this and applying $f$ to the second equation we get

$$
f(f(f(x)))=f(1-f(x)))=f(f(x))
$$

thus $f(f(x))$ is a fix point and therefore $f(f(x))=\frac{1}{2}$. Now the second equation gives $f(x)=\frac{1}{2}$. It is easy to check that this is a solution.

solution_match: Solution 2.


problem:
In Wonderland, the towns are connected by roads, and whenever there is a direct road between two towns there is also a route between these two towns that does not use that road. (There is at most one direct road between any two towns.) The Queen
of Hearts ordered the Spades to provide a list of all "even" subsystems of the system of roads, that is, systems formed by subsets of the set of roads, where each town is connected to an even number of roads (possibly none). For each such subsystem they should list its roads. If there are totally $n$ roads in Wonderland and $x$ subsystems on the Spades' list, what is the number of roads on their list when each road is counted as many times as it is listed?

solution:
The answer is $\frac{1}{2} n x$.

Proof: We reformulate the problem in terms of graph theory with the towns being vertices and the roads being edges of a graph $G=(V, E)$. The given information implies that every edge $e \in E$ is part of a cycle. The subgraphs to be counted are those with every valence even, briefly the even subgraphs. Let $N$ be the sum of the numbers of edges in those subgraphs. We can calculate this number by counting for each edge $e \in E$ the even subgraphs of $G$ containing $e$. If $S(e)$ is the set of these graphs, then $N=\sum_{e \in E}|S(e)|$. Now consider for a given $e \in E$ some cycle $c(e)$ containing $e$. For every even subgraph $H$ of $G$ one can define the graph $H^{\prime}$ obtained from $H$ by replacing the set of edges in $H$ that are also edges in $c(e)$ by the set of edges in $c(e)$ that are not edges in $H$. For a given vertex $v \in V$ the following possibilities exist. (i) $c(e)$ does not pass through $v$. (ii) Both edges in $c(e)$ adjacent to $v$ are in $H$. They are then absent from $H^{\prime}$. (iii) None of the edges in $c(e)$ adjacent to $v$ are in $H$. They are then both in $H^{\prime}$. (iv) Exactly one of the edges in $c(e)$ adjacent to $v$ are in $H$. It is then not in $H^{\prime}$ while the other one belongs to $H^{\prime}$. In every case any edge adjacent to $v$ that is not in $c(e)$ is in either none or both of $H$ and $H^{\prime}$. It follows that $H^{\prime}$ is an even subgraph of $G$. Since evidently $H^{\prime \prime}=H$, the total set of even subgraphs of $G$ is thus the union of disjoint pairs $\left\{H, H^{\prime}\right\}$. Exactly one member of each pair belongs to $S(e)$, so $|S(e)|=x / 2$, and $N=\frac{1}{2} n x$.

problem_match: ## Problem 2

solution_match: Solution.


problem:
Anton and Britta play a game with the set $M=\{1,2,3, \ldots, n-1\}$ where $n \geq 5$ is an odd integer. In each step Anton removes a number from $M$ and puts it in his set $A$, and Britta removes a number from $M$ and puts it in her set $B$ (both $A$ and $B$ are empty to begin with). When $M$ is empty, Anton picks two distinct numbers $x_{1}, x_{2}$ from $A$ and shows them to Britta. Britta then picks two distinct numbers $y_{1}, y_{2}$ from $B$. Britta wins if

$$
\left(x_{1} x_{2}\left(x_{1}-y_{1}\right)\left(x_{2}-y_{2}\right)\right)^{\frac{n-1}{2}} \equiv 1 \quad \bmod n
$$

otherwise Anton wins. Find all $n$ for which Britta has a winning strategy.

solution:
Britta wins if and only if $n$ is prime.

If $n$ is not prime, then Anton can add any prime divisor $p<n$ of $n$ to his set $A$ in the first round and choose $x_{1}=p$ which means that the product $\left(x_{1} x_{2}\left(x_{1}-y_{1}\right)\left(x_{2}-y_{2}\right)\right)^{\frac{n-1}{2}}$ is divisible by $p$ and is not $1 \bmod n$ no matter what Britta chooses. And so Britta loses.

If $n$ is prime, then $x_{1} x_{2} \not \equiv 0 \bmod n$, and there exists a number $\alpha$ such that $x^{2} \equiv \alpha$ $\bmod n$ has no solution. Then Britta can always add the number $Y \in M, Y \equiv \alpha X^{-1}$ to $B$, if Anton adds the number $X$ to $A$ in each round. Notice that Anton can never have chosen the number $Y$ beforehand, since $Y \equiv \alpha X^{-1} \Longleftrightarrow X \equiv \alpha Y^{-1}$ and $X \neq Y$ (as $X^{2} \equiv \alpha \bmod n$ is not possible). This means that Britta can always choose the
numbers $y_{1}=\alpha x_{2}^{-1}, y_{2}=\alpha x_{1}^{-1}$ from $B$. This will result in

$$
\begin{aligned}
\left(x_{1} x_{2}\left(x_{1}-y_{1}\right)\left(x_{2}-y_{2}\right)\right)^{\frac{n-1}{2}} & \equiv\left(\left(x_{1} x_{2}-x_{2} y_{1}\right)\left(x_{1} x_{2}-x_{1} y_{2}\right)\right)^{\frac{n-1}{2}} \\
& \equiv\left(\left(x_{1} x_{2}-\alpha\right)\left(x_{1} x_{2}-\alpha\right)\right)^{\frac{n-1}{2}} \\
& \equiv\left(x_{1} x_{2}-\alpha\right)^{n-1} \\
& \equiv 1 \quad \bmod n
\end{aligned}
$$

The last equation is true by Fermat's little theorem, because $n$ is prime and $x_{1} x_{2}-\alpha \not \equiv$ $0 \bmod n\left(\right.$ since $x_{1} \not \equiv y_{1}=\alpha x_{2}^{-1}$ ).

Alternative strategy for Britta is to choose $n-a$ when Anton pick up $a$, which is always possible because $n$ is an odd number and if one of the numbers $a, n-a$ was already chosen before the same is true for the second one. At the end Britta chooses $y_{i}=-x_{i}$ and gets

$$
\left(x_{1} x_{2}\left(x_{1}-y_{1}\right)\left(x_{2}-y_{2}\right)\right)^{\frac{n-1}{2}}=\left(\left(2 x_{1}\right)^{2}\left(2 x_{2}\right)^{2}\right)^{\frac{n-1}{2}} \equiv 1 \quad \bmod n
$$

problem_match: ## Problem 3


problem: Let $A B C$ be an acute-angled triangle with circumscribed circle $k$ and centre of the circumscribed circle $O$. A line through $O$ intersects the sides $A B$ and $A C$ at $D$ and $E$. Denote by $B^{\prime}$ and $C^{\prime}$ the reflections of $B$ and $C$ over $O$, respectively. Prove that the circumscribed circles of $O D C^{\prime}$ and $O E B^{\prime}$ concur on $k$.

solution:
Let $P$ be the intersection of the circles $k$ and the circumscribed circle of triangle $A D E^{1}$. Let $C_{1}$ be the second intersection of the circumscribed circle of $\triangle D O P$ with $k$. We will prove that $C_{1}=C^{\prime}$, i.e. the reflection of $C$ over $O$. We know that $\left|O C_{1}\right|=|O P|$, and hence $\measuredangle C_{1} P O=\measuredangle O C_{1} P$, furthermore $\measuredangle O C_{1} P=\measuredangle O D P=$ $\measuredangle E D P$, since the quadrilateral $C_{1} P O D$ by assumption is inscribed and the points $O, D$ and $E$ are collinear. Now, since $P$ is the centre of spiral similarity sending $D E$ to $B C$ the triangles $P D E$ and $P B C$ are similar, and we have $\measuredangle E D P=\measuredangle C B P$, and finally, from the inscribed angle theorem we have

$$
\measuredangle O P C=90^{\circ}-\frac{\measuredangle C O P}{2}=90^{\circ}-\measuredangle C B P=90^{\circ}-\measuredangle C_{1} P O
$$

The conclusion follows, since $90^{\circ}=\measuredangle C_{1} P O+\measuredangle O P C$, and since $C_{1}$ is by assumption on $k$, it must be the antipodal point of $C$ with respect to $k$.

![](https://cdn.mathpix.com/cropped/2024_06_06_d945609f96dac903e64bg-3.jpg?height=617&width=497&top_left_y=1876&top_left_x=834)[^0]

[^0]:    ${ }^{1}$ That is, the Miquel point of quadrilateral BCED.

problem_match: ## Problem 4