Let $k$ be a positive integer. Scrooge McDuck owns $k$ gold coins. He also owns infinitely many boxes $B_1, B_2, B_3, \ldots$ Initially, bow $B_1$ contains one coin, and the $k-1$ other coins are on McDuck's table, outside of every box. Then, Scrooge McDuck allows himself to do the following kind of operations, as many times as he likes: - if two consecutive boxes $B_i$ and $B_{i+1}$ both contain a coin, McDuck can remove the coin contained in box $B_{i+1}$ and put it on his table; - if a box $B_i$ contains a coin, the box $B_{i+1}$ is empty, and McDuck still has at least one coin on his table, he can take such a coin and put it in box $B_{i+1}$. As a function of $k$, which are the integers $n$ for which Scrooge McDuck can put a coin in box $B_n$?
Problem
Source: P2 Francophone Math Olympiad Senior 2023
Tags: combinatorics
02.05.2023 19:30
For convenience sake shift indices by one, so $B_1$ is $B_0$, $B_2$ is $B_1$ etc. Let $f(x)$ denote biggest number such that we can fill box $B_{f(x)}$ starting with $x$ coins. Let $g(x)$ denote the maximum distance between $B_i$ and $B_j$ after algorithm in which we start with $B_i$ filled and every box $B_k$, $k>i$ is empty and end up with $B_i$ and $B_j$ filled and every other box after $B_i$ empty, and during that algorithm no more than $x$ coins were placed in boxes with indices $>=i$ at the same moment. Clearly $g(1)=0$. Now we can notice that after filling box $B_k$ and emptying all boxes between $1$ and $k-1$ inclusive, if $k>g(n-1)$ we don't care about boxes between $0$ and $k$ and furthest box we can fill has index $k+f(n-1)$. So the answer is $g(n)+f(n-1)$. Now it remains to find $g$. We claim that $g(n)=F_{n}$ for $n>1$. We can get construction by inducting on $n$. For base take $n=2$ and $n=3$ which are trivial. For step we can make $B_{g(n-2)}$ and $B_0$ have one coin each and all other boxes empty. Then we fill box $B_{g(n-1)+g(n-2)}$, so $B_{g(n-1)+g(n-2)}$, $B_{g(n-2)}$ and $B_0$ are now filled and every other box is empty. Finally fill $B_{g(n-2)-i-1}$ and empty $B_{g(n-2)-i}$ until we reach $B_0$. We get that this is optimal because, when filling $B_{g(n)}$ we must have at least one of the boxes between $B_1$ and $B_{g(n-2)}$ filled so we can retrieve our coin. So the answer is $f(n)=F_2 ... + F_{n}=F_{n+2}-2$. Shifting back 1 index this is just $F_{n+2}-1$.
02.05.2023 19:36
Someone check my solution pls. Also sorry for my bad English ig.
03.05.2023 08:46
For $k=4$, there is a way to get to box $8$. To get there, you start by getting to box $4$ only using $3$ coins (this is just $k=3$). Then you put your 4th coin in the 5th box, and proceed to remove all coins other than the 1st and 5th. This can be done with a bit of patience and thought. Finally repeat the method for $k=3$ using the 5th coin like it was your 1st. This gets a coin to the 8th box. The pattern is clear at this point, and the general construction is not too bad (similar to this), however proving that this bound is optimal is tricky.
03.05.2023 09:48
maths31415 wrote: For $k=4$, there is a way to get to box $8$. To get there, you start by getting to box $4$ only using $3$ coins (this is just $k=3$). Then you put your 4th coin in the 5th box, and proceed to remove all coins other than the 1st and 5th. This can be done with a bit of patience and thought. Finally repeat the method for $k=3$ using the 5th coin like it was your 1st. This gets a coin to the 8th box. The pattern is clear at this point, and the general construction is not too bad (similar to this), however proving that this bound is optimal is tricky. Rip. I think it is fixable but it bothers me that resulting function wont be nice from what is see.
03.05.2023 10:35
maths31415 wrote: For $k=4$, there is a way to get to box $8$. To get there, you start by getting to box $4$ only using $3$ coins (this is just $k=3$). Then you put your 4th coin in the 5th box, and proceed to remove all coins other than the 1st and 5th. This can be done with a bit of patience and thought. Finally repeat the method for $k=3$ using the 5th coin like it was your 1st. This gets a coin to the 8th box. The pattern is clear at this point, and the general construction is not too bad (similar to this), however proving that this bound is optimal is tricky. It is because $g(3)=g(4)-1$ I think, so it is fixable