Hydra function: Difference between revisions

From BusyBeaverWiki
Jump to navigation Jump to search
No edit summary
Tag: Manual revert
(Expanded the article with new information; added an image based on the idea suggested in the talk page)
Line 1: Line 1:
The '''Hydra function''' is a [[Collatz-like]] function whose behavior is connected to the the unsolved halting problems for the [[Cryptids]] [[Hydra]] and [[Antihydra]]:
[[File:Hydra-function-bitmap-255iterations.svg|thumb|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:
<math display="block">\textstyle H(n)\equiv n+\left\lfloor\frac{1}{2}n\right\rfloor=\Big\lfloor\frac{3}{2}n\Big\rfloor=\begin{cases}
  \frac{3n}{2}    & \text{if } n\equiv0\pmod{2} \\
  \frac{3n-1}{2}  & \text{if } n\equiv1\pmod{2} \\
\end{cases}</math>
which can alternatively be written as
<math display="block">\begin{array}{l}
<math display="block">\begin{array}{l}
   H(2n)  & = & 3n  \\
   H(2n)  & = & 3n  \\
   H(2n+1) & = & 3n+1 \\
   H(2n+1) & = & 3n+1 \\
\end{array}</math>
\end{array}</math>
It has some connections to [[wikipedia:Mahler's_3/2_problem|Mahler's 3/2 problem]].
==Properties==
Here, <math>s</math> and <math>t</math> are positive integers with <math>t</math> odd. Let <math>0\le k\le s</math> be an integer and <math>H^k</math> is the <math>k</math>th iterate of <math>H</math>.
<math display="block">\begin{array}{l}
  H^k(2^s t)  & = & 3^k2^{s-k}t  \\
  H^k(2^s t+1)  & = & 3^k2^{s-k}t+1 \\
\end{array}</math>
==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 <math>\frac{3}{2}</math>, 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
<math display="block">a(n+1)=\begin{cases}\frac{3\times a(n)+6}{2}&\text{if }a(n)\equiv0\pmod{2}\\\frac{3\times a(n)+3}{2}&\text{if }a(n)\equiv1\pmod{2}\end{cases}</math>
ever has more even terms than twice the number of odd terms, starting with <math>a(0)=3</math>. Similarly, Antihydra halts if and only if the sequence
<math display="block">a(n+1)=\begin{cases}\frac{3\times a(n)+4}{2}&\text{if }a(n)\equiv0\pmod{2}\\\frac{3\times a(n)+3}{2}&\text{if }a(n)\equiv1\pmod{2}\end{cases}</math>
ever has more odd terms than twice the number of even terms, starting with <math>a(0)=4</math>.


which can alternatively be written as<math display="block">H(n) = \begin{cases}
For Hydra, we can introduce the sequence <math>b(n)=\frac{1}{3}a(n)+2</math> whose terms have the same sequence of parities as <math>a(n)</math>. Then we have:
  \frac{3n}{2}     & \text{if } n \text{ even} \\
<math display="block">\begin{array}{l}
  \frac{3n-1}{2} & \text{if } n \text{ odd} \\
  b(n+1)& = & \frac{1}{3}a(n+1)+2 \\
\end{cases}</math>or simply<math display="block">H(n) = \left\lfloor \frac{3n}{2} \right\rfloor</math>It has some connections to [[wikipedia:Mahler's_3/2_problem|Mahler's 3/2 problem]].
  b(n+1)& = &2+\frac{1}{3}\begin{cases}\frac{3\times a(n)+6}{2}&\text{if }a(n)\equiv0\pmod{2}\\\frac{3\times a(n)+3}{2}&\text{if }a(n)\equiv1\pmod{2}\end{cases}\\
b(n+1)&=&\begin{cases}\frac{a(n)+6}{2}&\text{if }a(n)\equiv0\pmod{2}\\\frac{a(n)+5}{2}&\text{if }a(n)\equiv1\pmod{2}\end{cases}\\
b(n+1)&=&\begin{cases}\frac{3(b(n)-2)+6}{2}&\text{if }3(b(n)-2)\equiv0\pmod{2}\\\frac{3(b(n)-2)+5}{2}&\text{if }3(b(n)-2)\equiv1\pmod{2}\end{cases}\\
b(n+1)&=&\begin{cases}\frac{3b(n)}{2}&\text{if }b(n)\equiv0\pmod{2}\\\frac{3b(n)-1}{2}&\text{if }b(n)\equiv1\pmod{2}\end{cases}\\
\end{array}</math>
For Antihydra, we can repeat this but with the sequence <math>b(n)=a(n)+4</math>.

Revision as of 11:38, 23 February 2025

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:

which can alternatively be written as
It has some connections to Mahler's 3/2 problem.

Properties

Here, and are positive integers with odd. Let be an integer and is the th iterate of .

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 , 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

ever has more even terms than twice the number of odd terms, starting with . Similarly, Antihydra halts if and only if the sequence
ever has more odd terms than twice the number of even terms, starting with .

For Hydra, we can introduce the sequence whose terms have the same sequence of parities as . Then we have:

For Antihydra, we can repeat this but with the sequence .