Behavior of a pair of integers under simple iterations

136 Views Asked by At

The originally asked question was deleted by the OP for some unknown reason. I think this was a cute and interesting problem, and I'd really like to know the answer, so I'm just reposting the same question (with a little rewording).

Let's consider an initial pair of integers $(a_0,b_0)$ taken in the $\{1,1000\}$ range. Now we iteratively apply one of two simple transformations to such pair, either $$ (a_n,b_n) \to (a_{n+1}=2a_n, b_{n+1}=b_n+1) $$ or $$ (a_n,b_n) \to (a_{n+1}=a_n+1, b_{n+1}=2b_n) $$ Put in simple words, increment one of the elements of the pair, and simultaneously double the other one.

Question: does there exist a $(a_0,b_0)$ pair of integers such that there is no path leading to a pair of equal integers?


In a comment of the original question, I expressed the thought that an attack on the problem should probably take the binary representations of the integers into consideration. For instance $$ \array{ 7 \texttt{ 111} \cr 5 \texttt{ 101} } \to \array{ 14 \texttt{ 1110} \cr 6 \texttt{ 110} } \to \array{ 28 \texttt{ 11100} \cr 7 \texttt{ 111 } } \to \array{ 29 \texttt{ 11101} \cr 14 \texttt{ 1110 } } \to \array{ 58 \texttt{ 111010} \cr 15 \texttt{ 1111 } } \to \array{ 59 \texttt{ 111011} \cr 30 \texttt{ 11110 } } \to \array{ 60 \texttt{ 111100} \cr 60 \texttt{ 111100} } $$ And in another comment, responding to Henry mentioning that he had not yet found a path to equality for $(15,22)$, I responded that there was a path to $123084$, outlining my process to find that path. Essentially, for $$ \begin{array}{rl} 15 &\texttt{1111} \cr 22 &\texttt{10110} \end{array} $$ to have a chance to reach equality, we have to set to $1$ that second bit of $22$, and we need to do it as soon as possible, which means $8$ additions first to reach $$ \begin{array}{rl} 3840 &\texttt{ 111100000000} \cr 30 &\texttt{ 11110} \end{array} $$ Now compensating for the length of the binary representation, we get to $$ \begin{array}{rl} 3845 &\texttt{ 111100000101} \cr 960 &\texttt{ 1111000000} \end{array} $$ and with a final step $$ \begin{array}{rl} 7690 &\texttt{ 1111000001010} \cr 961 &\texttt{ 1111000001} \end{array} $$ we show that we have transformed the problem from $(15,22)$ to $(10,1)$. And there's a path from $(10,1)$ to $(4,1)$, which resolves as shown above in the $(7,5)$ example (the same sequence of operations that brings $(28,7)$ to equality will work identically on $(4,1)$).