6

To each vertex of a pentagon, we assign an integer $x_i$ with sum $s=\sum{x_i > 0}.$ If $x, y,z $ are the numbers assigned to three successive vertices and if $ y < 0$ , then we replace $(x, y,z)$ by $(x + y, −y, y + z)$. Such an operation is performed repeatedly as long as at least one of the five numbers is negative. Decide if the algorithm always stops and how many steps are required?

following is from Problem Solving Strategies by Arthur Engel:

Bernard Chazelle (Princeton) asked: How many steps are needed until stop? He considered the infinite multiset $S$ of all sums defined by $s(i, j )=x_i +···+ x_{j−1}$ with $1 ≤ i ≤ 5$ and $j > i$. A multiset is a set which can have equal elements. In this set, all elements but one either remain invariant or are switched with others. Only $s(4, 5)= x_4$ changes to $−x_4$. Thus, exactly one negative element of $S$ changes to positive at each step. There are only finitely many negative elements in $S$, since $s > 0$. The number of steps until stop is equal to the number of negative elements of S. It is interesting to find a formula with the computer, which, for input $a, b, c, d, e,$ gives the number of steps until stop. This can be done without much effort if $s=1$. For instance, the input $(n, n, 1 − 4n, n, n)$ gives the step number $\color {red}{ f(n)=20n-10 }$.


Fisrt : I'm not convinced There are only finitely many negative elements in $S$. I understand that if $x_4$ is negative, then we can go forward and since s>0 after at most reaching to $s(4,9)$ it will be positive but if we continue why it can't get negative again?

Second : how one should find the formula marked by red ? and why is it easier when $s=1$?

I checked the similar questions but they don't answer my specific questions.

  • @ Kurt G sorry I fixed the color. but It's not nonsense, I've copied it correctly. – Davood Karimi May 09 '22 at 11:18
  • Not sure where you copied that from. The link I found writes "... as long as at least one of the five numbers is negative." Your $y<0$ in that sentence is, with all due respect, confusing. – Kurt G. May 09 '22 at 11:25
  • @ Kurt G I've copied it from the book mentioned. is it book's error? – Davood Karimi May 09 '22 at 11:30
  • Must be. I don't have the book. – Kurt G. May 09 '22 at 11:33
  • thanks. I corrected it – Davood Karimi May 09 '22 at 11:35
  • What is $x_j$ when $j>5$? How did you get an infinite multiset out of sums of consecutive numbers on a pentagon? – Jyrki Lahtonen May 09 '22 at 13:08
  • @ Jyrki Lahtonen it's mod 5, $x_6=x_1$ – Davood Karimi May 09 '22 at 14:12