Hydra function

From BusyBeaverWiki
Revision as of 11:38, 23 February 2025 by MrSolis (talk | contribs) (Expanded the article with new information; added an image based on the idea suggested in the talk page)
Jump to navigation Jump to search
A bitmap depiction of 255 iterations of the Hydra function, starting with 3 at the top.

The Hydra function is a Collatz-like function whose behavior is connected to the unsolved halting problems for the Cryptids Hydra and Antihydra. It is defined as: H(n)n+12n=32n={3n2if n0(mod2)3n12if n1(mod2) which can alternatively be written as H(2n)=3nH(2n+1)=3n+1 It has some connections to Mahler's 3/2 problem.

Properties

Here, s and t are positive integers with t odd. Let 0ks be an integer and Hk is the kth iterate of H. Hk(2st)=3k2sktHk(2st+1)=3k2skt+1

Relationship to Hydra and Antihydra

Both machines effectively track the progress of two variables; one of them changes depending on its value modulo 2 but roughly multiplies itself by 32, and the other increases by 2 or decreases by 1 depending on the parity of the first variable.

In particular, Hydra halts if and only if the sequence a(n+1)={3×a(n)+62if a(n)0(mod2)3×a(n)+32if a(n)1(mod2) ever has more even terms than twice the number of odd terms, starting with a(0)=3. Similarly, Antihydra halts if and only if the sequence a(n+1)={3×a(n)+42if a(n)0(mod2)3×a(n)+32if a(n)1(mod2) ever has more odd terms than twice the number of even terms, starting with a(0)=4.

For Hydra, we can introduce the sequence b(n)=13a(n)+2 whose terms have the same sequence of parities as a(n). Then we have: b(n+1)=13a(n+1)+2b(n+1)=2+13{3×a(n)+62if a(n)0(mod2)3×a(n)+32if a(n)1(mod2)b(n+1)={a(n)+62if a(n)0(mod2)a(n)+52if a(n)1(mod2)b(n+1)={3(b(n)2)+62if 3(b(n)2)0(mod2)3(b(n)2)+52if 3(b(n)2)1(mod2)b(n+1)={3b(n)2if b(n)0(mod2)3b(n)12if b(n)1(mod2) For Antihydra, we can repeat this but with the sequence b(n)=a(n)+4.