Hydra function

From BusyBeaverWiki
Revision as of 00:02, 4 March 2025 by MrSolis (talk | contribs)
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 n≡0(mod2)3n−12if n≡1(mod2) which can alternatively be written as H(2n)=3nH(2n+1)=3n+1 It has some connections to Mahler's 3/2 problem.

Relationship to Hydra and Antihydra

Recall the high-level rules for Hydra and Antihydra:

Hydra Antihydra
Let C(a,b):=0∞<A20a3b20∞:0∞A>0∞→20C(3,0),C(2a,0)→6a2+20a+40∞33a+11A>20∞,C(2a,b+1)→6a2+23a+10C(3a+3,b),C(2a+1,b)→4b+6a2+23a+26C(3a+3,b+2). A(a,b):=0∞1a01bE>0∞:0∞A>0∞→11A(0,4),A(a,2b)→2a+3b2+12b+11A(a+2,3b+2),A(0,2b+1)→3b2+9b−10∞<F11013b0∞,A(a+1,2b+1)→3b2+12b+5A(a,3b+3).

Already, both machines can be observed to have very similar functions. Both have one parameter that increases exponentially with growth factor 32, and another that takes a pseudo-random walk that depends on the parity of the other variable. This relationship can be strengthened through a change of variables. This is easier to illustrate if these rules were written in the form of integer sequences:

Hydra Antihydra
a0=3,an+1={3an+62if an≡0(mod2)3an+32if an≡1(mod2) a0=4,an+1={3an+42if an≡0(mod2)3an+32if an≡1(mod2)

Now, we will introduce a new integer sequence based on the old one and discover the recursive rules for that sequence. For Hydra, this new sequence is bn=13an+2. For Antihydra, this new sequence is bn=an+4. The new rules are found by using bn+1 instead and substituting an+1 for its recursive formula. By doing so, we get:

Hydra Antihydra
b0=3,bn+1={an+62if an≡0(mod2)an+52if an≡1(mod2) b0=8,bn+1={3an+122if an≡0(mod2)3an+112if an≡1(mod2)

After that, we must substitute an for its solution in terms of bn. What results is the following:

Hydra Antihydra
b0=3,bn+1={3(bn−2)+62if 3(bn−2)≡0(mod2)3(bn−2)+52if 3(bn−2)≡1(mod2) b0=8,bn+1={3(bn−4)+122if bn−4≡0(mod2)3(bn−4)+112if bn−4≡1(mod2)

We finish by noting that the if statements simplify to simply checking if bn is even or odd. After simplifying, we get

Hydra Antihydra
b0=3,bn+1={3bn2if bn≡0(mod2)3bn−12if bn≡1(mod2) b0=8,bn+1={3bn2if bn≡0(mod2)3bn−12if bn≡1(mod2)

Properties

Here, s and t are positive integers with t odd. Let 0≤k≤s be an integer and Hk is the kth iterate of H. Hk(2st)=3k2s−ktHk(2st+1)=3k2s−kt+1