Let $f:\mathbb{Z}^4 \rightarrow \mathbb{Z}^4$ by
$f(w,x,y,z) = (\mid w-x \mid,\mid x-y \mid,\mid y-z \mid,\mid z-w \mid)$
- Prove that for any $(w,x,y,z) \in \mathbb{Z}^4$ there is $n>0$ such that $f^n(w,x,y,z)=(0,0,0,0)$
- Prove that there is no $n$ such that $f^n(w,x,y,z)=(0,0,0,0)$ for all $(w,x,y,z) \in \mathbb{Z}^4$
I wrote a computer code in R that can execute this function for any integers $w,x,y,z$ and $n$. See below:
rm(list = ls())
myfun=function(w,x,y,z){
outcome <- c(abs(w-x), abs(x-y), abs(y-z),abs(z-w))
return(outcome)
}
w<-1
x<-3
y<-534
z<-3
n=6
outcome <- matrix (nrow=n, ncol=4)
for (i in 1:n){
outcome[i,] <- myfun(w,x,y,z)
w <- outcome[i,1]
x <- outcome[i,2]
y <- outcome[i,3]
z <- outcome[i,4]
}
outcome
After executing 100's of points I see that after, $n=5$ we see the function going to $(0,0,0,0)$. I tried using brute force and applied the function 6 times by hand to see if it cancels out but I've end up with a very complex function. There must be a cleaner way of proving this question. Point me in the right direction please.
1. Let us show that $f^n(v)\to 0$, $n\to\infty$, for any $v=(a,b,c,d)\in \mathbb{R}^4$. It is enough to consider non-negative vectors. It is clear that $f$ does not increase the maximum of the numbers, which we denote by $||v||$. Therefore, there exists the limit $\lim_{n\to\infty} ||f^n(v)||$. In particular, the sequence $\{f^n(v),n\ge 1\}$ has a limit point, say, $v_0$.
Clearly, $||f^m(v_0)|| = ||v_0||$ for any $m\ge 0$. Also, extracting a convergent subsequence for preimages of elements converging to $v_0$, $v_0 = f(u_0)$.
Assume that $v_0\neq 0$. Let $a>0$ be the maximal coordinate of $f(v_0)$, wlog the first. Then $v_0$ has either the form $(a,0,*,*)$ or $(0,a,*,*)$. Moreover, the sum of the remaining coordinates must be $a$ due to the fact that $v_0 = f(u_0)$.
Case a Both remaining coordinates are less that $a$ (and therefore positive). Then we have either (here $c$ means any number less then $a$) $$(a,0,c,c)\to (a,c,c,c) \to (c,c,c,c),$$ or $$(0,a,c,c)\to (a,c,c,c) \to (c,c,c,c),$$ which contradicts to $||f^m(v_0)|| = ||v_0||$.
Case b One of the remaining coordinates is $a$ (and the other is zero). Then we have essentially two possibilities $$ (a,0,a,0)\to (a,a,a,a)\to (0,0,0,0), $$ and $$ (0,a,a,0)\to (a,0,a,0)\to (a,a,a,a)\to (0,0,0,0), $$ both contradicting the assumption.
Therefore, $v_0=0$, hence, $\lim_{n\to\infty} f^n(v) = 0$, as claimed.
2. First we prove this for real numbers. Notice that the polynomial $(x-1)(x+1)^3+1$ has a positive root $\lambda \approx 0.83929$. Set $(t,u,v,w) = (1,1+\lambda,(1+\lambda)^2,(1+\lambda)^3)$. Then $$f(t,u,v,w) = (\lambda,\lambda(1+\lambda),\lambda(1+\lambda)^2,(1+\lambda)^3-1)\\ = (\lambda,\lambda(1+\lambda),\lambda(1+\lambda)^2,\lambda(1+\lambda)^3)=\lambda\cdot (t,u,v,w).$$ (I'll not write the vector here, since $\lambda$ is a cumbersome root of a cubic equation, and $(t,u,v,w)$ is even more cumbersome; the numerical values are $(t,u,v,w)\approx (1, 1.8393, 3.383, 6.2223)$.) Therefore, for any $n\ge 1$ $f^n(t,u,v,w) = \lambda^n\cdot (t,u,v,w)\neq 0$.
Now by way of contradiction assume that there exists $n\ge 1$ such that $f^n(a,b,c,d) = 0$ for any integer $a,b,c,d$. Then, obviously, $f^n(a,b,c,d) = 0$ for any rational $a,b,c,d$. In view of continuity, $f^n(a,b,c,d) = 0$ for any real $a,b,c,d$, which contradicts the previous paragraph.
This proof also gives a way to construct integer quadruples leading to arbitrarily long iteration sequences: one just needs to multiply $(t,u,v,w)$ by a large number and take integer parts. Say, the approximate values $(10000,18393,33830,62223)$ lead to a $24$-step iteration sequence.
The application of this method for triples (perhaps, unsurprisingly) leads to funny example of long iteration triples: $(F_{n-2},F_{n-1},F_n)$, where $F_n$ is the $n$th Fibonacci number.