4

I apologize for the lack of an even better title. The main reason I couldn't find a better one is because I have a problem that I cannot find reference anywhere. I am pretty sure it has a name, but I'm afraid I simply don't know it.

I'm given an algorithm that starts with four numbers $a$, $b$, $c$ and $d$ which can be chosen freely. After each iteration, the numbers are recalculated as shown in the following images. $a_{n+1}=|a_n-b_n|\ $, $b_{n+1}=|b_n-c_n|\ $, $c_{n+1}=|c_n-d_n|\ $, $d_{n+1}=|d_n-a_n|\ $ for all $n\gt0$.

algorithm to produce neigh

After a certain amount of time, this algorithm always results in all four columns ending and remaining at 0. Or so it appears. You can quickly try it out by replicating it in Excel or any other spreadsheet program.

The goal is to choose the four starting numbers a, b, c and d in such a way, that the columns all jump to 0 after the 50th iteration or later.

I have difficulties understanding how one can outsmart this algorithm, i.e., to make this algorithm compute as many rounds as possible before reaching all 0's. I've tried a brute force method by simple giving a, b, c and d random numbers with maximum lengths of 30 digits. And then seeing how far I can get. I let my computer try that for eight hours last night and the best I came up with was 17 several times - so obviously pure random brute force will not work and I will need a more thoughtful approach.

I'd be glad about any ideas!

c42
  • 151
  • 3

1 Answers1

3

I am a bit cautious just in case you might be taking part of some kind of open competition or exam.

Before I could reasonably believe that you are raising this question in good faith, I will just say I can reach 51 iterations without going to all zeros using less than 18 digits for each number.

As an evidence that I do have an answer, here are the last 5 digits of my numbers. This will not help anybody to get a better answer, except when you are super good at math, in which situation you probably do not need this too tenuous a hint anyway. However, it can be used to prove beyond any doubt in the future that I did know an answer. $$(***00000, ***22634, ***22881, ***60047)$$


Per request of the questioner, I will explain the simple "secret" of how to get an answer briefly. A full update may or may be followed later.

What you want is to let $a_1, b_1,c_1,d_1$ look like $a_0, b_0,c_0,d_0$ exactly. Since they look like exactly, the $a_2, b_2, c_2, d_2$ will look like $a_1, b_1, c_1, d_1$ exactly. You see you can actually go on forever. It will break down only when we cannot express the number accurately enough in its numerical representation, which is enforced since the geocacher owner does not accept values like $\sqrt 2$ (just for an example; there may or may not be a $\sqrt 2$ in my answer).

What does it mean by exactly alike? Well, for example, if the two circles of numbers are the same except by a factor and a rotation.

John L.
  • 39,205
  • 4
  • 34
  • 93