Given are the real line and the two unique marked points $0$ and $1$. We can perform as many times as we want the following operation: we take two already marked points $a$ and $b$ and mark the reflection of $a$ over $b$. Let $f(n)$ be the minimum number of operations needed to mark on the real line the number $n$ (which is the number at a distance $\left| n\right|$ from $0$ and it is on the right of $0$ if $n>0$ and on the left of $0$ if $n<0$). For example, $f(0)=f(1)=0$ and $f(-1)=f(2)=1$. Find $f(n)$.
Problem
Source: Brazil National Olympiad 2019 #2
Tags: combinatorics
15.11.2019 04:41
By symmetry, it suffices to solve the problem for positive $n.$ The answer is $f(n) = \left \lceil \log_2{n} \right \rceil$ if $n$ is positive. Call this function $g(n)$. The proof proceeds in two steps. First we show that $f(n) \ge g(n).$ We claim that the range fo the marked points is at most $2^t$ at $t$ operations. This is proven by induction on $t$. The base case $t = 0$ is obvious. If it holds for $t = k$, when $t = k+1$ simply apply the inductive hypothesis after reverting the last operation. It's easy to complete the induction. From here, it becomes apparent that $f(n) \ge g(n)$, because $n > 2^{g(n) - 1}.$ Let's now show that $f(n) \le g(n).$ We need to show that it requires at most $n$ operations to mark $n$, for all $n \in \mathbb{N}.$ The proof is by induction on $g(n).$ If $g(n) = 1$, then we have $n = 2$, which clearly requires only one operation to mark. Assume it holds for all $n$ with $g(n) = k.$ When $g(n) = k+1$, consider two cases on the parity of $n$. If $n$ is even, then $g(\frac{n}{2}) = k$ and so $\frac{n}{2}$ requires only $k$ operations to mark. After these $k$ operations, we can just reflect $0$ over $\frac{n}{2}$ to get $n$, completing the induction. If $n$ is odd, then $g(\frac{n+1}{2}) = k$ and so $\frac{n+1}{2}$ requires only $k$ operations to mark. After these $k$ operations, we can just reflect $1$ over $\frac{n+1}{2}$ to get $n$, completing the induction. Hence, the induction is complete. After acquiring the two above bounds, we have shown that $f(n) = g(n).$ $\square$
16.11.2019 09:46
check f(5). 5 can be marked by reflecting -2 over 1. in this case f(5)=2, not 3, as your function suggests.
17.11.2019 01:12
@above Sorry, I don't see how we can obtain $5$ with only two reflections. We can't mark $-2$ on the first move (only $-1$ and $2$), so the first marked point can't be $-2$.
17.11.2019 03:57
sorry lol typed it wrong. reflecting -1 over 2, my bad
17.11.2019 04:31
Doesn't it take one operation each to mark $-1$ and $2$? Then reflecting $-1$ over $2$ would require another operation, for a total of $3$ operations, right?
17.11.2019 06:10
uhhh now i get it. thanks for your patience
17.11.2019 17:41
With regards to the final sentence, 1) Reflecting $-2$ over $1$ gives $4$, not $5$. 2) Note that $-2 $ cannot be reached in $1$ step. 3) I calculate that $f(5)=3 $
10.12.2019 06:57
Hi, I'm the author of this problem, and I just want to add that the inspiration to this problem was... Geogebra. I was measuring 7 units for a simple geometry problem by using the symmetry about a point tool (or circle by center and one point, I don't remember exactly), and I was wondering what was the most efficient way to reach $n$ after marking $0$ and $1$. It became this little nice problem.
23.05.2020 05:08
We claim $f(n) = \lceil \log_2(n) \rceil$, for $n\ge 1$. Obviously $f(n)=f(1-n)$ by symmetry, so it suffices to answer for $n\ge 1$. We first show $f(n) \ge \lceil \log_2(n) \rceil$. In order to do this, we will show that given $k$ operations, the largest "width" of the range of numbers that we mark if at most $2^k$. This is obvious by induction, as at each step, we can at most double the entire width of our range. This proves $f(n) \ge \lceil \log_2(n) \rceil$. To finish, we need to show that we can always get to $n$ from $0,1$ in exactly $\lceil \log_2(n) \rceil$ moves. We induct on $n$, the base case of $n=1$ given. Suppose $2^k < n\le 2^{k+1}$. We need to show that we can get to $n$ in $k+1$ moves. If $n$ is even: we can get to $\tfrac{n}{2}$ in $k$ moves by induction. Then reflect this over 0 to get to $n$. If $n$ is odd: we can get to $\tfrac{n+1}{2}$ in $k$ moves. Then reflect 1 over this to get to $n$. This completes the induction, and the proof.