<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.bbchallenge.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Coda</id>
	<title>BusyBeaverWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bbchallenge.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Coda"/>
	<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/wiki/Special:Contributions/Coda"/>
	<updated>2026-04-30T20:32:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Beaver_Math_Olympiad&amp;diff=7144</id>
		<title>Beaver Math Olympiad</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Beaver_Math_Olympiad&amp;diff=7144"/>
		<updated>2026-04-11T13:57:09Z</updated>

		<summary type="html">&lt;p&gt;Coda: Add link to Lean formalizations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Beaver Mathematical Olympiad&#039;&#039;&#039; (BMO) is an attempt to re-formulate the halting problem for some particular Turing machines as a mathematical problem in a style suitable for a hypothetical math olympiad. &lt;br /&gt;
&lt;br /&gt;
The purpose of the BMO is twofold. First, statements where non-essential details (related to tape encoding, number of steps, etc.) are discarded are more suitable to be shared with mathematicians who perhaps are able to help. Second, it&#039;s a way to jokingly highlight how a hard question could appear deceptively simple.&lt;br /&gt;
&lt;br /&gt;
BMO problems have been formalized in Lean and added to the DeepMind formal-conjectures database ([https://github.com/google-deepmind/formal-conjectures/blob/main/FormalConjectures/Other/BeaverMathOlympiad.lean Github]).&lt;br /&gt;
&lt;br /&gt;
== Unsolved problems ==&lt;br /&gt;
&lt;br /&gt;
=== 1. {{TM|1RB1RE_1LC0RA_0RD1LB_---1RC_1LF1RE_0LB0LE|undecided}} ===&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;(a_n)_{n \ge 1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;(b_n)_{n \ge 1}&amp;lt;/math&amp;gt; be two sequences such that &amp;lt;math&amp;gt;(a_1, b_1) = (1, 2)&amp;lt;/math&amp;gt; and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;(a_{n+1}, b_{n+1}) = \begin{cases}&lt;br /&gt;
(a_n-b_n, 4b_n+2) &amp;amp; \text{if }a_n \ge b_n \\&lt;br /&gt;
(2a_n+1, b_n-a_n) &amp;amp; \text{if }a_n &amp;lt; b_n&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for all positive integers &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Does there exist a positive integer &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;a_i = b_i&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The first 10 values of &amp;lt;math&amp;gt;(a_n, b_n)&amp;lt;/math&amp;gt; are &amp;lt;math&amp;gt;(1, 2), (3, 1), (2, 6), (5, 4), (1, 18), (3, 17), (7, 14), (15, 7), (8, 30), (17, 22)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== 2. [[Hydra]] and [[Antihydra]] ===&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;(a_n)_{n \ge 0}&amp;lt;/math&amp;gt; be a sequence such that &amp;lt;math&amp;gt;a_{n+1} = a_n+\left\lfloor\frac{a_n}{2}\right\rfloor&amp;lt;/math&amp;gt; for all non-negative integers &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
# If &amp;lt;math&amp;gt;a_0=3&amp;lt;/math&amp;gt;, does there exist a non-negative integer &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; such that the list of numbers &amp;lt;math&amp;gt;a_0, a_1, a_2, \dots, a_k&amp;lt;/math&amp;gt; have more than twice as many even numbers as odd numbers? ([[Hydra]])&lt;br /&gt;
# If &amp;lt;math&amp;gt;a_0=8&amp;lt;/math&amp;gt;, does there exist a non-negative integer &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; such that the list of numbers &amp;lt;math&amp;gt;a_0, a_1, a_2, \dots, a_k&amp;lt;/math&amp;gt; have more than twice as many odd numbers as even numbers? ([[Antihydra]])&lt;br /&gt;
&lt;br /&gt;
=== 5. {{TM|1RB0LD_1LC0RA_1RA1LB_1LA1LE_1RF0LC_---0RE|undecided}} ===&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;(a_n)_{n \ge 1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;(b_n)_{n \ge 1}&amp;lt;/math&amp;gt; be two sequences such that &amp;lt;math&amp;gt;(a_1, b_1) = (0, 5)&amp;lt;/math&amp;gt; and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;(a_{n+1}, b_{n+1}) = \begin{cases}&lt;br /&gt;
(a_n+1, b_n-f(a_n)) &amp;amp; \text{if } b_n \ge f(a_n) \\&lt;br /&gt;
(a_n, 3b_n+a_n+5) &amp;amp; \text{if } b_n &amp;lt; f(a_n)&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;f(x)=10\cdot 2^x-1&amp;lt;/math&amp;gt; for all non-negative integers &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Does there exist a positive integer &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;b_i = f(a_i)-1&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
=== 6. {{TM|1RB1LA_1LC0RE_1LF1LD_0RB0LA_1RC1RE_---0LD|undecided}} ===&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(b) = b + k + 3a&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; are non-negative integers satisfying &amp;lt;math&amp;gt;b = (2a+1)\cdot 2^k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now consider the iterated application of the function &amp;lt;math&amp;gt;f^{n+1}(b) = f(f^n(b))&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f^0(b)=b&amp;lt;/math&amp;gt;. Does there exist a non-negative integer &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;f^n(6)&amp;lt;/math&amp;gt; equals a power of 2?&lt;br /&gt;
&lt;br /&gt;
=== 8. {{TM|1RB0LD_0RC1RB_0RD0RA_1LE0RD_1LF---_0LA1LA|undecided}} ===&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;(a_n)_{n \ge 1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;(b_n)_{n \ge 1}&amp;lt;/math&amp;gt; be two sequences such that &amp;lt;math&amp;gt;(a_1, b_1) = (10, 12)&amp;lt;/math&amp;gt; and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;(a_{n+1}, b_{n+1}) = \begin{cases}&lt;br /&gt;
(a_n-\lfloor\frac{b_n}{2}\rfloor-3, 3\lfloor\frac{b_n+1}{2}\rfloor+6) &amp;amp; \text{if }a_n &amp;gt; \lfloor\frac{b_n}{2}\rfloor \\&lt;br /&gt;
(3a_n+5, b_n-2a_n) &amp;amp; \text{if }a_n \le \lfloor\frac{b_n}{2}\rfloor&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for all positive integers &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Does there exist a positive integer &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;a_n = \lfloor\frac{b_n}{2}\rfloor + 1&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
== Solved problems ==&lt;br /&gt;
&lt;br /&gt;
=== 3. {{TM|1RB0RB3LA4LA2RA_2LB3RA---3RA4RB|non-halt}} and {{TM|1RB1RB3LA4LA2RA_2LB3RA---3RA4RB|non-halt}} ===&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;v_2(n)&amp;lt;/math&amp;gt; be the largest integer &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;2^k&amp;lt;/math&amp;gt; divides &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;(a_n)_{n \ge 0}&amp;lt;/math&amp;gt; be a sequence such that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_n = \begin{cases}&lt;br /&gt;
2 &amp;amp; \text{if } n=0 \\&lt;br /&gt;
a_{n-1}+2^{v_2(a_{n-1})+2}-1 &amp;amp; \text{if } n \ge 1&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for all non-negative integers &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Is there an integer &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;a_n=4^k&amp;lt;/math&amp;gt; for some positive integer &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
Link to Discord discussion: https://discord.com/channels/960643023006490684/1084047886494470185/1252634913220591728&lt;br /&gt;
&lt;br /&gt;
Formalised solution: [https://discord.com/channels/960643023006490684/1259770421046411285/1488737894943166604 Initial announcement], [https://discord.com/channels/960643023006490684/1259770421046411285/1488743526882738276 Lean proof], [https://discord.com/channels/960643023006490684/1259770421046411285/1488781537699696821 LLM-translated Rocq proof], [https://discord.com/channels/960643023006490684/1259770421046411285/1488898995865784442 Proof of closure of existing mid-level rules].&lt;br /&gt;
&lt;br /&gt;
=== 4. {{TM|1RB3RB---1LB0LA_2LA4RA3LA4RB1LB|non-halt}} ===&lt;br /&gt;
&lt;br /&gt;
Bonnie the beaver was bored, so she tried to construct a sequence of integers &amp;lt;math&amp;gt;\{a_n\}_{n \ge 0}&amp;lt;/math&amp;gt;. She first defined &amp;lt;math&amp;gt;a_0=2&amp;lt;/math&amp;gt;, then defined &amp;lt;math&amp;gt;a_{n+1}&amp;lt;/math&amp;gt; depending on &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; using the following rules:&lt;br /&gt;
&lt;br /&gt;
* If &amp;lt;math&amp;gt;a_n \equiv 0\text{ (mod 3)}&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;a_{n+1}=\frac{a_n}{3}+2^n+1&amp;lt;/math&amp;gt;.&lt;br /&gt;
* If &amp;lt;math&amp;gt;a_n \equiv 2\text{ (mod 3)}&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;a_{n+1}=\frac{a_n-2}{3}+2^n-1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
With these two rules alone, Bonnie calculates the first few terms in the sequence: &amp;lt;math&amp;gt;2, 0, 3, 6, 11, 18, 39, 78, 155, 306, \dots&amp;lt;/math&amp;gt;. At this point, Bonnie plans to continue writing terms until a term becomes &amp;lt;math&amp;gt;1\text{ (mod 3)}&amp;lt;/math&amp;gt;. If Bonnie sticks to her plan, will she ever finish?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Solution&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
How to guess the closed-form solution: Firstly, notice that &amp;lt;math&amp;gt;a_n \approx \frac{3}{5} \times 2^n&amp;lt;/math&amp;gt;. Secondly, calculate the error term &amp;lt;math&amp;gt;a_n - \frac{3}{5} \times 2^n&amp;lt;/math&amp;gt;. The error term appears to have a period of 4. This leads to the following guess:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_n=\frac{3}{5}\begin{cases}&lt;br /&gt;
2^n+\frac{7}{3} &amp;amp;\text{if } n\equiv 0 \pmod{4}\\&lt;br /&gt;
2^n-2 &amp;amp;\text{if } n\equiv 1 \pmod{4}\\&lt;br /&gt;
2^n+1 &amp;amp;\text{if } n\equiv 2 \pmod{4}\\&lt;br /&gt;
2^n+2 &amp;amp;\text{if } n\equiv 3 \pmod{4}&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This closed-form solution can be proven correct by induction. Unfortunately, the induction may require a lot of tedious calculations.&lt;br /&gt;
&lt;br /&gt;
For all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, we have &amp;lt;math&amp;gt;a_{4k} \equiv 2\text{ (mod 3)}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;a_{4k+1} \equiv a_{4k+2} \equiv a_{4k+3} \equiv 0\text{ (mod 3)}&amp;lt;/math&amp;gt;. Therefore, Bonnie will never finish.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 7. {{TM|1RB1RF_1RC0RA_1LD1RC_1LE0LE_0RA0LD_0RB---|non-halt}} ===&lt;br /&gt;
Let &amp;lt;math&amp;gt;v_2(n)&amp;lt;/math&amp;gt; be the largest integer &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;2^k&amp;lt;/math&amp;gt; divides &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(n) = n+1+(v_2(n+1) \bmod 2)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now consider the iterated application of the function &amp;lt;math&amp;gt;f^{n+1}(b) = f(f^n(b)))&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f^0(b)=b&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;(a_n)_{n \ge 0}&amp;lt;/math&amp;gt; be a sequence such that &amp;lt;math&amp;gt;a_0=1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;a_{n+1} = f^{n+2}\left(\left\lfloor\frac{a_n}{2}\right\rfloor\right)&amp;lt;/math&amp;gt; for all non-negative integers &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Does there exist a non-negative integer &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;a_k&amp;lt;/math&amp;gt; is even?&lt;br /&gt;
&lt;br /&gt;
(for simplicity, this question is slightly stronger than the halting problem of this TM)&lt;br /&gt;
&lt;br /&gt;
Link to Discord discussion: https://discord.com/channels/960643023006490684/1421782442213376000/1431483206208852001&lt;br /&gt;
&lt;br /&gt;
== Practice Problems ==&lt;br /&gt;
Problems that are not BMO-level, but provide counter-examples to certain [[probvious]] intuition:&lt;br /&gt;
&lt;br /&gt;
* {{TM|1RB0LE_1LC1RA_---1LD_0RB1LF_1RD1LA_0LA0RD}}&lt;br /&gt;
* {{TM|1RB0RD_0LC1RA_0RA1LB_1RE1LB_1LF1LB_---1LE}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Individual machines]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=User:Coda&amp;diff=5598</id>
		<title>User:Coda</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=User:Coda&amp;diff=5598"/>
		<updated>2025-12-16T06:28:31Z</updated>

		<summary type="html">&lt;p&gt;Coda: Created page with &amp;quot;On a break https://youtube.com/watch?v=zFi0QmxqKu0&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On a break https://youtube.com/watch?v=zFi0QmxqKu0&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Fractran&amp;diff=5027</id>
		<title>Fractran</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Fractran&amp;diff=5027"/>
		<updated>2025-11-11T16:17:36Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Cryptids */ yet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Fractran&#039;&#039;&#039; (originally styled FRACTRAN) is an esoteric Turing complete model of computation invented by John Conway in 1987.&amp;lt;ref&amp;gt;Conway, John H. (1987). &amp;quot;FRACTRAN: A Simple Universal Programming Language for Arithmetic&amp;quot;. &#039;&#039;Open Problems in Communication and Computation&#039;&#039;. Springer-Verlag New York, Inc. pp. 4–26. &amp;lt;nowiki&amp;gt;http://doi.org/10.1007/978-1-4612-4808-8_2&amp;lt;/nowiki&amp;gt;&amp;lt;/ref&amp;gt; In this model a program is simply a finite list of fractions (rational numbers), the program state is an integer. For more details see https://en.wikipedia.org/wiki/FRACTRAN&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BB_fractran&#039;&#039;&#039;(n) or &#039;&#039;&#039;BBf&#039;&#039;&#039;(n) is the Busy Beaver function for Fractran programs.&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
A fractran program is a list of rational numbers &amp;lt;math&amp;gt;[q_0, q_1, ... q_{k-1}]&amp;lt;/math&amp;gt;called rules and a fractran state is an integer &amp;lt;math&amp;gt;s \in \mathbb{Z}&amp;lt;/math&amp;gt;. The numerator and denominator of any rational number fraction do not share any prime factors (they are in reduced form). We say that a rule &amp;lt;math&amp;gt;q_i&amp;lt;/math&amp;gt; applies to state &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;s \cdot q_i \in \mathbb{Z}&amp;lt;/math&amp;gt;. If no rule applies, we say that the computation has halted otherwise we apply the first applicable rule at each step. In that case we say &amp;lt;math&amp;gt;s \to t&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t = s \cdot q_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;i = \min \{ i : s \cdot q_i \in \mathbb{Z} \}&amp;lt;/math&amp;gt;. As with [[Turing machines]], we will write &amp;lt;math&amp;gt;s \xrightarrow{N} t&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;s \to s_1 \to \cdots \to s_{N-1} \to t &amp;lt;/math&amp;gt; (s goes to t after N steps) and &amp;lt;math&amp;gt;s \to^* t&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;s \to^+ t&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;s \xrightarrow{N} t&amp;lt;/math&amp;gt; for some N≥0 or N≥1 (respectively). We say that a program has runtime N (or halts in N steps) starting in state s if &amp;lt;math&amp;gt;s \xrightarrow{N} t&amp;lt;/math&amp;gt; and computation halts on t.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;\Omega(n)&amp;lt;/math&amp;gt; be the total number of prime factors of a positive integer n. In other words, &amp;lt;math&amp;gt;\Omega(2^{a_0} 3^{a_1} \cdots p_n^{a_n}) = \sum_{k=0}^n a_n&amp;lt;/math&amp;gt;. Then given a rule &amp;lt;math&amp;gt;\frac{a}{b} &amp;lt;/math&amp;gt; we say that  &amp;lt;math&amp;gt;\text{size} \left( \frac{a}{b} \right) = \Omega(a) + \Omega(b) &amp;lt;/math&amp;gt;. And the size of a fractran program &amp;lt;math&amp;gt;[q_0, q_1, ... q_{k-1}]&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;k + \sum_{i=0}^{k-1} \text{size}(q_i) &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
BB_fractran(n) or BBf(n) is the maximum runtime starting in state 2 for all halting fractran programs of size n. It is a non-computable function akin to the [[Busy Beaver Functions]] since Fractran is Turing Complete.&lt;br /&gt;
&lt;br /&gt;
== Vector Representation ==&lt;br /&gt;
Fractran programs are not easy to interpret, in fact it may be completely unclear at first that they can perform any computation at all. One of the key insights is to represent all numbers (states and rules) in their prime factorization form. For example, we can use a vector &amp;lt;math&amp;gt;[ a_0, a_1, \dots, a_{n-1} ] \in \mathbb{Z}^n&amp;lt;/math&amp;gt; to represent the number &amp;lt;math&amp;gt;2^{a_0} 3^{a_1} \cdots p_{n-1}^{a_{n-1}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let the vector representation (for a sufficiently large n) for a state &amp;lt;math&amp;gt;a = 2^{a_0} 3^{a_1} \cdots p_{n-1}^{a_{n-1}}&amp;lt;/math&amp;gt; be &amp;lt;math&amp;gt;v(a) = [ a_0, a_1, \dots, a_{n-1} ] \in \mathbb{N}^n&amp;lt;/math&amp;gt; and the vector representation for a rule &amp;lt;math&amp;gt;\frac{a}{b}&amp;lt;/math&amp;gt; be &amp;lt;math&amp;gt;v \left( \frac{a}{b} \right) = v(a) - v(b) \in \mathbb{Z}^n&amp;lt;/math&amp;gt; (Note that this is just an extension of the original definition extended to allow negative &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Now, rule q applies to state s iff &amp;lt;math&amp;gt;v(s) + v(q) \in \mathbb{N}^n&amp;lt;/math&amp;gt; (all components of the vector are ≥0) and if &amp;lt;math&amp;gt;s \to t&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;v(t) = v(s) + v(q)&amp;lt;/math&amp;gt;. So the fractran multiplication model is completely equivalent to the vector adding model. For presentation, we will represent a fractran program with a matrix where each row is the vector representation for a rule.&lt;br /&gt;
&lt;br /&gt;
For example, the BBf(15) champion (&amp;lt;code&amp;gt;[1/45, 4/5, 3/2, 25/3]&amp;lt;/code&amp;gt;) in vector representation would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{bmatrix}&lt;br /&gt;
   0 &amp;amp; -2 &amp;amp; -1 \\&lt;br /&gt;
   2 &amp;amp;  0 &amp;amp; -1 \\&lt;br /&gt;
  -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  2&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this representation, it becomes much easier to reason about fractran programs and describe general rules. It is also very easy to calculate the size of a rule or program in vector representation. It is the sum of absolute values of all elements in the matrix + number of rules (number of rows).&lt;br /&gt;
&lt;br /&gt;
== Champions ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!n&lt;br /&gt;
!BBf(n)&lt;br /&gt;
!Example Champion&lt;br /&gt;
!Vector Representation&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 1 || &amp;lt;code&amp;gt;[1/2]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 1 || &amp;lt;code&amp;gt;[3/2]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp; 1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 1 || &amp;lt;code&amp;gt;[9/2]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp; 2&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 2 || &amp;lt;code&amp;gt;[3/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  1 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 3 || &amp;lt;code&amp;gt;[9/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  2 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 4 || &amp;lt;code&amp;gt;[27/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  3 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 5 || &amp;lt;code&amp;gt;[81/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  4 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 9 || 6 || &amp;lt;code&amp;gt;[243/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  5 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 7 || &amp;lt;code&amp;gt;[729/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  6 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 10 || &amp;lt;code&amp;gt;[27/2, 25/3, 1/5]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  3 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  2 \\&lt;br /&gt;
   0 &amp;amp;  0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 13 || &amp;lt;code&amp;gt;[81/2, 25/3, 1/5]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  4 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  2 \\&lt;br /&gt;
   0 &amp;amp;  0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 13 || 17 || &amp;lt;code&amp;gt;[81/2, 125/3, 1/5]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  4 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  3 \\&lt;br /&gt;
   0 &amp;amp;  0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 21 || &amp;lt;code&amp;gt;[243/2, 125/3, 1/5]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  5 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  3 \\&lt;br /&gt;
   0 &amp;amp;  0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 15 || 28 || &amp;lt;code&amp;gt;[1/45, 4/5, 3/2, 25/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   0 &amp;amp; -2 &amp;amp; -1 \\&lt;br /&gt;
   2 &amp;amp;  0 &amp;amp; -1 \\&lt;br /&gt;
  -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  2&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 53 || &amp;lt;code&amp;gt;[1/45, 4/5, 3/2, 125/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   0 &amp;amp; -2 &amp;amp; -1 \\&lt;br /&gt;
   2 &amp;amp;  0 &amp;amp; -1 \\&lt;br /&gt;
  -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  3&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 107 || &amp;lt;code&amp;gt;[5/6, 49/2, 3/5, 40/7]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   -1 &amp;amp;  0 &amp;amp;  0 &amp;amp;  2 \\&lt;br /&gt;
    0 &amp;amp;  1 &amp;amp; -1 &amp;amp;  0 \\&lt;br /&gt;
    3 &amp;amp;  0 &amp;amp;  1 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 18 || 211 || &amp;lt;code&amp;gt;[5/6, 49/2, 3/5, 80/7]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   -1 &amp;amp;  0 &amp;amp;  0 &amp;amp;  2 \\&lt;br /&gt;
    0 &amp;amp;  1 &amp;amp; -1 &amp;amp;  0 \\&lt;br /&gt;
    4 &amp;amp;  0 &amp;amp;  1 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 19 || ≳ 370 || &amp;lt;code&amp;gt;[5/6, 49/2, 3/5, 160/7]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   -1 &amp;amp;  0 &amp;amp;  0 &amp;amp;  2 \\&lt;br /&gt;
    0 &amp;amp;  1 &amp;amp; -1 &amp;amp;  0 \\&lt;br /&gt;
    5 &amp;amp;  0 &amp;amp;  1 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Behavior of Champions ===&lt;br /&gt;
&lt;br /&gt;
==== Sequential programs ====&lt;br /&gt;
All champions up to BBf(14) have very simple behavior. They are all of the form: &amp;lt;math&amp;gt;\left[ \frac{3^{a_1}}{2}, \frac{5^{a_2}}{3}, ... \frac{p_n^{a_k}}{p_{k-1}}, \frac{1}{p_k} \right]&amp;lt;/math&amp;gt; or in vector representation (limited to k=4):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; a_1 &amp;amp;   0 &amp;amp;   0 &amp;amp;   0 \\&lt;br /&gt;
    0 &amp;amp;  -1 &amp;amp; a_2 &amp;amp;   0 &amp;amp;   0 \\&lt;br /&gt;
    0 &amp;amp;   0 &amp;amp;  -1 &amp;amp; a_3 &amp;amp;   0 \\&lt;br /&gt;
    0 &amp;amp;   0 &amp;amp;   0 &amp;amp;  -1 &amp;amp; a_4 \\&lt;br /&gt;
    0 &amp;amp;   0 &amp;amp;   0 &amp;amp;   0 &amp;amp;  -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These champions repeatedly apply the rules in sequence, never going back to a previous rule. They apply the first rule until they&#039;ve exhausted all 2s, then the second rule until they&#039;ve exhausted all 3s, etc. They have a runtime of &amp;lt;math&amp;gt;1 + a_1 + a_1 a_2 + a_1 a_2 a_3 + \cdots = \sum_{i=0}^k \prod_{j=1}^i a_j&amp;lt;/math&amp;gt; and size &amp;lt;math&amp;gt;2k+2 + \sum_{i=1}^k a_i&amp;lt;/math&amp;gt;. This grows linearly for k=1 (BBf(5) to BBf(10)) and quadratically for k=2 (BBf(11) to BBf(14)). Letting k grow with the size, the maximum runtime grows exponentially in the program size.&lt;br /&gt;
&lt;br /&gt;
==== BBf(17) Family ====&lt;br /&gt;
The BBf(17) to BBf(19) champions are members of a family of programs (parameterized by &amp;lt;math&amp;gt;m,n \ge 0&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   -1 &amp;amp;  0 &amp;amp;  0 &amp;amp;  n \\&lt;br /&gt;
    0 &amp;amp;  1 &amp;amp; -1 &amp;amp;  0 \\&lt;br /&gt;
    m &amp;amp;  0 &amp;amp;  1 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which have size &amp;lt;math&amp;gt;m+n+12&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This family obeys the following rules:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;math&amp;gt;[1, 0, 0, 0] \xrightarrow{1} [0, 0, 0, n]&amp;lt;/math&amp;gt;&lt;br /&gt;
# if d≥1 and b≤m:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;[0, b, 0, d] \xrightarrow{m+b+2} [0, b+1, 0, d - 1 + n(m-b)]&amp;lt;/math&amp;gt;&lt;br /&gt;
# if d≥1 and b≥m:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;[0, b, 0, d] \xrightarrow{2m+2} [0, b+1, 0, d - 1]&amp;lt;/math&amp;gt;&lt;br /&gt;
#if d=0: [0,b,0,d] has halted&lt;br /&gt;
&lt;br /&gt;
and furthermore these rules are applied in order since b is always increasing (and d is eventually decreasing). Combining these together we get runtime:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;1 + n(m+1)(m(m+1)+2) - \frac{m(m+1)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The optimal choices for n,m for various program sizes are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Size&lt;br /&gt;
!n&lt;br /&gt;
!m&lt;br /&gt;
!Runtime&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|51&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|2&lt;br /&gt;
|3&lt;br /&gt;
|107&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|211&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|2&lt;br /&gt;
|5&lt;br /&gt;
|370&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|2&lt;br /&gt;
|6&lt;br /&gt;
|596&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|3&lt;br /&gt;
|6&lt;br /&gt;
|904&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cryptids ==&lt;br /&gt;
No fractran [[Cryptids]] have been found yet via enumeration, but [[User:Sligocki|Shawn Ligocki]] constructed by hand a program of size 37 that simulates [[Hydra]] (here the 0s have been omitted to avoid clutter):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp;    &amp;amp; +3 &amp;amp;    &amp;amp; +1 &amp;amp;    &amp;amp;    &amp;amp;    \\&lt;br /&gt;
      &amp;amp;    &amp;amp; -1 &amp;amp; +1 &amp;amp; -1 &amp;amp; +1 &amp;amp;    &amp;amp;    \\&lt;br /&gt;
      &amp;amp;    &amp;amp; -1 &amp;amp; +2 &amp;amp; +1 &amp;amp; -1 &amp;amp;    &amp;amp;    \\&lt;br /&gt;
      &amp;amp; -1 &amp;amp;    &amp;amp;    &amp;amp; -1 &amp;amp;    &amp;amp; +1 &amp;amp;    \\&lt;br /&gt;
      &amp;amp; +2 &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp; -1 &amp;amp; +1 &amp;amp;    \\&lt;br /&gt;
      &amp;amp;    &amp;amp; +1 &amp;amp; -1 &amp;amp;    &amp;amp;    &amp;amp; -1 &amp;amp; +1 \\&lt;br /&gt;
      &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp; +1 &amp;amp; -1 \\&lt;br /&gt;
      &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp; +1 &amp;amp;    &amp;amp; -1 &amp;amp;   &lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The intended interpretation is that if we let S(h,w) = [0, w, h, 0, 1, 0, 0, 0] then it follows the following rules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{lcl}&lt;br /&gt;
  S(2k,   0)   &amp;amp; \to^* &amp;amp; \text{halt} \\&lt;br /&gt;
  S(2k,   w+1) &amp;amp; \to^* &amp;amp; S(3k,   w) \\&lt;br /&gt;
  S(2k+1, w)   &amp;amp; \to^* &amp;amp; S(3k+1, w+2) \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Fractran&amp;diff=5024</id>
		<title>Fractran</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Fractran&amp;diff=5024"/>
		<updated>2025-11-11T10:07:21Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Definition */ Mention reduced fraction requirement&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Fractran&#039;&#039;&#039; (originally styled FRACTRAN) is an esoteric Turing complete model of computation invented by John Conway in 1987.&amp;lt;ref&amp;gt;Conway, John H. (1987). &amp;quot;FRACTRAN: A Simple Universal Programming Language for Arithmetic&amp;quot;. &#039;&#039;Open Problems in Communication and Computation&#039;&#039;. Springer-Verlag New York, Inc. pp. 4–26. &amp;lt;nowiki&amp;gt;http://doi.org/10.1007/978-1-4612-4808-8_2&amp;lt;/nowiki&amp;gt;&amp;lt;/ref&amp;gt; In this model a program is simply a finite list of fractions (rational numbers), the program state is an integer. For more details see https://en.wikipedia.org/wiki/FRACTRAN&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BB_fractran&#039;&#039;&#039;(n) or &#039;&#039;&#039;BBf&#039;&#039;&#039;(n) is the Busy Beaver function for Fractran programs.&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
A fractran program is a list of rational numbers &amp;lt;math&amp;gt;[q_0, q_1, ... q_{k-1}]&amp;lt;/math&amp;gt;called rules and a fractran state is an integer &amp;lt;math&amp;gt;s \in \mathbb{Z}&amp;lt;/math&amp;gt;. The numerator and denominator of any rational number fraction do not share any prime factors (they are in reduced form). We say that a rule &amp;lt;math&amp;gt;q_i&amp;lt;/math&amp;gt; applies to state &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;s \cdot q_i \in \mathbb{Z}&amp;lt;/math&amp;gt;. If no rule applies, we say that the computation has halted otherwise we apply the first applicable rule at each step. In that case we say &amp;lt;math&amp;gt;s \to t&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t = s \cdot q_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;i = \min \{ i : s \cdot q_i \in \mathbb{Z} \}&amp;lt;/math&amp;gt;. As with [[Turing machines]], we will write &amp;lt;math&amp;gt;s \xrightarrow{N} t&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;s \to s_1 \to \cdots \to s_{N-1} \to t &amp;lt;/math&amp;gt; (s goes to t after N steps) and &amp;lt;math&amp;gt;s \to^* t&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;s \to^+ t&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;s \xrightarrow{N} t&amp;lt;/math&amp;gt; for some N≥0 or N≥1 (respectively). We say that a program has runtime N (or halts in N steps) starting in state s if &amp;lt;math&amp;gt;s \xrightarrow{N} t&amp;lt;/math&amp;gt; and computation halts on t.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;\Omega(n)&amp;lt;/math&amp;gt; be the total number of prime factors of a positive integer n. In other words, &amp;lt;math&amp;gt;\Omega(2^{a_0} 3^{a_1} \cdots p_n^{a_n}) = \sum_{k=0}^n a_n&amp;lt;/math&amp;gt;. Then given a rule &amp;lt;math&amp;gt;\frac{a}{b} &amp;lt;/math&amp;gt; we say that  &amp;lt;math&amp;gt;\text{size} \left( \frac{a}{b} \right) = \Omega(a) + \Omega(b) &amp;lt;/math&amp;gt;. And the size of a fractran program &amp;lt;math&amp;gt;[q_0, q_1, ... q_{k-1}]&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;k + \sum_{i=0}^{k-1} \text{size}(q_i) &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
BB_fractran(n) or BBf(n) is the maximum runtime starting in state 2 for all halting fractran programs of size n. It is a non-computable function akin to the [[Busy Beaver Functions]] since Fractran is Turing Complete.&lt;br /&gt;
&lt;br /&gt;
== Vector Representation ==&lt;br /&gt;
Fractran programs are not easy to interpret, in fact it may be completely unclear at first that they can perform any computation at all. One of the key insights is to represent all numbers (states and rules) in their prime factorization form. For example, we can use a vector &amp;lt;math&amp;gt;[ a_0, a_1, \dots, a_{n-1} ] \in \mathbb{Z}^n&amp;lt;/math&amp;gt; to represent the number &amp;lt;math&amp;gt;2^{a_0} 3^{a_1} \cdots p_{n-1}^{a_{n-1}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let the vector representation (for a sufficiently large n) for a state &amp;lt;math&amp;gt;a = 2^{a_0} 3^{a_1} \cdots p_{n-1}^{a_{n-1}}&amp;lt;/math&amp;gt; be &amp;lt;math&amp;gt;v(a) = [ a_0, a_1, \dots, a_{n-1} ] \in \mathbb{N}^n&amp;lt;/math&amp;gt; and the vector representation for a rule &amp;lt;math&amp;gt;\frac{a}{b}&amp;lt;/math&amp;gt; be &amp;lt;math&amp;gt;v \left( \frac{a}{b} \right) = v(a) - v(b) \in \mathbb{Z}^n&amp;lt;/math&amp;gt; (Note that this is just an extension of the original definition extended to allow negative &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Now, rule q applies to state s iff &amp;lt;math&amp;gt;v(s) + v(q) \in \mathbb{N}^n&amp;lt;/math&amp;gt; (all components of the vector are ≥0) and if &amp;lt;math&amp;gt;s \to t&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;v(t) = v(s) + v(q)&amp;lt;/math&amp;gt;. So the fractran multiplication model is completely equivalent to the vector adding model. For presentation, we will represent a fractran program with a matrix where each row is the vector representation for a rule.&lt;br /&gt;
&lt;br /&gt;
For example, the BBf(15) champion (&amp;lt;code&amp;gt;[1/45, 4/5, 3/2, 25/3]&amp;lt;/code&amp;gt;) in vector representation would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{bmatrix}&lt;br /&gt;
   0 &amp;amp; -2 &amp;amp; -1 \\&lt;br /&gt;
   2 &amp;amp;  0 &amp;amp; -1 \\&lt;br /&gt;
  -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  2&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this representation, it becomes much easier to reason about fractran programs and describe general rules. It is also very easy to calculate the size of a rule or program in vector representation. It is the sum of absolute values of all elements in the matrix + number of rules (number of rows).&lt;br /&gt;
&lt;br /&gt;
== Champions ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!n&lt;br /&gt;
!BBf(n)&lt;br /&gt;
!Example Champion&lt;br /&gt;
!Vector Representation&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 1 || &amp;lt;code&amp;gt;[1/2]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 1 || &amp;lt;code&amp;gt;[3/2]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp; 1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 1 || &amp;lt;code&amp;gt;[9/2]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp; 2&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 2 || &amp;lt;code&amp;gt;[3/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  1 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 3 || &amp;lt;code&amp;gt;[9/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  2 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 4 || &amp;lt;code&amp;gt;[27/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  3 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 5 || &amp;lt;code&amp;gt;[81/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  4 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 9 || 6 || &amp;lt;code&amp;gt;[243/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  5 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 7 || &amp;lt;code&amp;gt;[729/2, 1/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  6 \\&lt;br /&gt;
   0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 10 || &amp;lt;code&amp;gt;[27/2, 25/3, 1/5]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  3 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  2 \\&lt;br /&gt;
   0 &amp;amp;  0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 13 || &amp;lt;code&amp;gt;[81/2, 25/3, 1/5]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  4 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  2 \\&lt;br /&gt;
   0 &amp;amp;  0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 13 || 17 || &amp;lt;code&amp;gt;[81/2, 125/3, 1/5]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  4 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  3 \\&lt;br /&gt;
   0 &amp;amp;  0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 21 || &amp;lt;code&amp;gt;[243/2, 125/3, 1/5]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
  -1 &amp;amp;  5 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  3 \\&lt;br /&gt;
   0 &amp;amp;  0 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 15 || 28 || &amp;lt;code&amp;gt;[1/45, 4/5, 3/2, 25/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   0 &amp;amp; -2 &amp;amp; -1 \\&lt;br /&gt;
   2 &amp;amp;  0 &amp;amp; -1 \\&lt;br /&gt;
  -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  2&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 53 || &amp;lt;code&amp;gt;[1/45, 4/5, 3/2, 125/3]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   0 &amp;amp; -2 &amp;amp; -1 \\&lt;br /&gt;
   2 &amp;amp;  0 &amp;amp; -1 \\&lt;br /&gt;
  -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   0 &amp;amp; -1 &amp;amp;  3&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 17 || 107 || &amp;lt;code&amp;gt;[5/6, 49/2, 3/5, 40/7]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   -1 &amp;amp;  0 &amp;amp;  0 &amp;amp;  2 \\&lt;br /&gt;
    0 &amp;amp;  1 &amp;amp; -1 &amp;amp;  0 \\&lt;br /&gt;
    3 &amp;amp;  0 &amp;amp;  1 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 18 || 211 || &amp;lt;code&amp;gt;[5/6, 49/2, 3/5, 80/7]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   -1 &amp;amp;  0 &amp;amp;  0 &amp;amp;  2 \\&lt;br /&gt;
    0 &amp;amp;  1 &amp;amp; -1 &amp;amp;  0 \\&lt;br /&gt;
    4 &amp;amp;  0 &amp;amp;  1 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 19 || ≳ 370 || &amp;lt;code&amp;gt;[5/6, 49/2, 3/5, 160/7]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;math&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   -1 &amp;amp;  0 &amp;amp;  0 &amp;amp;  2 \\&lt;br /&gt;
    0 &amp;amp;  1 &amp;amp; -1 &amp;amp;  0 \\&lt;br /&gt;
    5 &amp;amp;  0 &amp;amp;  1 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Behavior of Champions ===&lt;br /&gt;
&lt;br /&gt;
==== Sequential programs ====&lt;br /&gt;
All champions up to BBf(14) have very simple behavior. They are all of the form: &amp;lt;math&amp;gt;\left[ \frac{3^{a_1}}{2}, \frac{5^{a_2}}{3}, ... \frac{p_n^{a_k}}{p_{k-1}}, \frac{1}{p_k} \right]&amp;lt;/math&amp;gt; or in vector representation (limited to k=4):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; a_1 &amp;amp;   0 &amp;amp;   0 &amp;amp;   0 \\&lt;br /&gt;
    0 &amp;amp;  -1 &amp;amp; a_2 &amp;amp;   0 &amp;amp;   0 \\&lt;br /&gt;
    0 &amp;amp;   0 &amp;amp;  -1 &amp;amp; a_3 &amp;amp;   0 \\&lt;br /&gt;
    0 &amp;amp;   0 &amp;amp;   0 &amp;amp;  -1 &amp;amp; a_4 \\&lt;br /&gt;
    0 &amp;amp;   0 &amp;amp;   0 &amp;amp;   0 &amp;amp;  -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These champions repeatedly apply the rules in sequence, never going back to a previous rule. They apply the first rule until they&#039;ve exhausted all 2s, then the second rule until they&#039;ve exhausted all 3s, etc. They have a runtime of &amp;lt;math&amp;gt;1 + a_1 + a_1 a_2 + a_1 a_2 a_3 + \cdots = \sum_{i=0}^k \prod_{j=1}^i a_j&amp;lt;/math&amp;gt; and size &amp;lt;math&amp;gt;2k+2 + \sum_{i=1}^k a_i&amp;lt;/math&amp;gt;. This grows linearly for k=1 (BBf(5) to BBf(10)) and quadratically for k=2 (BBf(11) ot BBf(14)). Letting k grow with the size, the maximum runtime grows exponentially in the program size.&lt;br /&gt;
&lt;br /&gt;
==== BBf(17) Family ====&lt;br /&gt;
The BBf(17) to BBf(19) champions are members of a family of programs (parameterized by &amp;lt;math&amp;gt;m,n \ge 0&amp;lt;/math&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp; -1 &amp;amp;  1 &amp;amp;  0 \\&lt;br /&gt;
   -1 &amp;amp;  0 &amp;amp;  0 &amp;amp;  n \\&lt;br /&gt;
    0 &amp;amp;  1 &amp;amp; -1 &amp;amp;  0 \\&lt;br /&gt;
    m &amp;amp;  0 &amp;amp;  1 &amp;amp; -1&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which have size &amp;lt;math&amp;gt;m+n+12&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This family obeys the following rules:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;math&amp;gt;[1, 0, 0, 0] \xrightarrow{1} [0, 0, 0, n]&amp;lt;/math&amp;gt;&lt;br /&gt;
# if d≥1 and b≤m:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;[0, b, 0, d] \xrightarrow{m+b+2} [0, b+1, 0, d - 1 + n(m-b)]&amp;lt;/math&amp;gt;&lt;br /&gt;
# if d≥1 and b≥m:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;[0, b, 0, d] \xrightarrow{2m+2} [0, b+1, 0, d - 1]&amp;lt;/math&amp;gt;&lt;br /&gt;
#if d=0: [0,b,0,d] has halted&lt;br /&gt;
&lt;br /&gt;
and furthermore these rules are applied in order since b is always increasing (and d is eventually decreasing). Combining these together we get runtime:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;1 + n(m+1)(m(m+1)+2) - \frac{m(m+1)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The optimal choices for n,m for various program sizes are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Size&lt;br /&gt;
!n&lt;br /&gt;
!m&lt;br /&gt;
!Runtime&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|1&lt;br /&gt;
|3&lt;br /&gt;
|51&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|2&lt;br /&gt;
|3&lt;br /&gt;
|107&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|2&lt;br /&gt;
|4&lt;br /&gt;
|211&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|2&lt;br /&gt;
|5&lt;br /&gt;
|370&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|2&lt;br /&gt;
|6&lt;br /&gt;
|596&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|3&lt;br /&gt;
|6&lt;br /&gt;
|904&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cryptids ==&lt;br /&gt;
No fractran [[Cryptids]] have been found via enumeration, but [[User:Sligocki|Shawn Ligocki]] constructed by hand a program of size 37 that simulates [[Hydra]] (here the 0s have been omitted to avoid clutter):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{bmatrix}&lt;br /&gt;
   -1 &amp;amp;    &amp;amp; +3 &amp;amp;    &amp;amp; +1 &amp;amp;    &amp;amp;    &amp;amp;    \\&lt;br /&gt;
      &amp;amp;    &amp;amp; -1 &amp;amp; +1 &amp;amp; -1 &amp;amp; +1 &amp;amp;    &amp;amp;    \\&lt;br /&gt;
      &amp;amp;    &amp;amp; -1 &amp;amp; +2 &amp;amp; +1 &amp;amp; -1 &amp;amp;    &amp;amp;    \\&lt;br /&gt;
      &amp;amp; -1 &amp;amp;    &amp;amp;    &amp;amp; -1 &amp;amp;    &amp;amp; +1 &amp;amp;    \\&lt;br /&gt;
      &amp;amp; +2 &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp; -1 &amp;amp; +1 &amp;amp;    \\&lt;br /&gt;
      &amp;amp;    &amp;amp; +1 &amp;amp; -1 &amp;amp;    &amp;amp;    &amp;amp; -1 &amp;amp; +1 \\&lt;br /&gt;
      &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp; +1 &amp;amp; -1 \\&lt;br /&gt;
      &amp;amp;    &amp;amp;    &amp;amp;    &amp;amp; +1 &amp;amp;    &amp;amp; -1 &amp;amp;   &lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The intended interpretation is that if we let S(h,w) = [0, w, h, 0, 1, 0, 0, 0] then it follows the following rules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{lcl}&lt;br /&gt;
  S(2k,   0)   &amp;amp; \to^* &amp;amp; \text{halt} \\&lt;br /&gt;
  S(2k,   w+1) &amp;amp; \to^* &amp;amp; S(3k,   w) \\&lt;br /&gt;
  S(2k+1, w)   &amp;amp; \to^* &amp;amp; S(3k+1, w+2) \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=4678</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=4678"/>
		<updated>2025-10-23T15:12:08Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Π1 */ add OEIS link to BB_clean instead&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Lazy Beaver]]&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state, m-symbol Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|see [[Lazy Beaver#Computed Values]]&lt;br /&gt;
|[[oeis:A337805|A337805 (for m=2)]]&lt;br /&gt;
|-&lt;br /&gt;
|Configs A(a, b) reached in [[Antihydra]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A386792|A386792]] (for a), [[oeis:A385902|A385902]] (for b)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs and are grouped by their position in the [[wikipedia:Arithmetical_hierarchy|arithmetical hierarchy]].&lt;br /&gt;
&lt;br /&gt;
Note that when the bbchallenge community refers to BB(n, m), we mean the Max Shift function S(n, m) defined below (if m is omitted, it is set to 2 by default). Some literature may refer to the Max Score function Σ(n, m) by BB(n, m) instead.&lt;br /&gt;
&lt;br /&gt;
==== Π1 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Maximum Space Function]]&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|see [[Maximum Space Function#Champions]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Blanking Busy Beaver]]&lt;br /&gt;
|BLB(n,m)&lt;br /&gt;
|The maximum number of steps that an n-state m-symbol Turing machine can make on an initially blank tape until it is blank again (halting or not)&lt;br /&gt;
|see [[Blanking Busy Beaver Function#Champions]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|BB_clean&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state 2-symbol Turing machine can make on an initially blank tape until it halts on a blank tape&lt;br /&gt;
|(see comments #75 and #77 [https://scottaaronson.blog/?p=5661 here])&lt;br /&gt;
|[[oeis:A119683|A119683]]&lt;br /&gt;
|-&lt;br /&gt;
|BB_ones&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of 1&#039;s that an n-state 2-symbol Turing machine can make in a row, before halting on a 0 next to it&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[Maximum Consecutive Ones Function]]&lt;br /&gt;
|num(n)&lt;br /&gt;
|The maximum amount of consecutive 1&#039;s that an n-state 2-symbol Turing machine can print before eventually halting&lt;br /&gt;
|see [[Maximum Consecutive Ones Function]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Size of the Runtime Spectrum&lt;br /&gt;
|&amp;lt;math&amp;gt;R(n)&amp;lt;/math&amp;gt;&lt;br /&gt;
|The number of distinct runtimes for a machine with a given number of symbols, for increasing number of states&lt;br /&gt;
|see &amp;quot;The Spectrum of Runtimes&amp;quot; in &amp;quot;[https://www.scottaaronson.com/papers/bb.pdf The Busy Beaver Frontier]&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver]]&lt;br /&gt;
|BBi(n)&lt;br /&gt;
|Maximum number of steps that an n-instruction Turing machine (allowing any number of states and symbols) can take on an initially blank tape before eventually halting.&lt;br /&gt;
|see [[Instruction-Limited Busy Beaver#Champions]]&lt;br /&gt;
|[[oeis:A384629|A384629]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver|Instruction-Limited Symbol Busy Beaver]]&lt;br /&gt;
|Σi(n)&lt;br /&gt;
|Maximum number of non-blank symbols that an n-instruction Turing machine (allowing any number of states and symbols) can leave on an initially blank tape before eventually halting.&lt;br /&gt;
|see [[Instruction-Limited Busy Beaver#Champions]]&lt;br /&gt;
|[[oeis:A384766|A384766]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver#Instruction-Limited Busy Beaver Variants|Instruction-Limited Greedy Busy Beaver]]&lt;br /&gt;
|gBBi(n)&lt;br /&gt;
|Maximum number of steps that an n-instruction Turing machine can take from a blank tape before halting, where the Turing machines first n-1 instructions are a machine which runs for gBBi(n-1) steps.&lt;br /&gt;
|see [[Instruction-Limited Busy Beaver#Instruction-Limited Busy Beaver Variants]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver#Instruction-Limited Busy Beaver Variants|Instruction-Limited Blanking Busy Beaver]]&lt;br /&gt;
|BLBi(n)&lt;br /&gt;
|Maximum number of steps that an n-instruction Turing machine (allowing any number of states and symbols) can take on an initially blank tape before blanking the tape again.&lt;br /&gt;
|see [[Instruction-Limited Busy Beaver#Instruction-Limited Busy Beaver Variants]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver for lambda calculus]]&lt;br /&gt;
|BBλ(n)&lt;br /&gt;
|Maximum beta normal form size of any closed lambda term of size n.&lt;br /&gt;
|see [[Busy Beaver for lambda calculus#Champions]]&lt;br /&gt;
|[[oeis:A333479|A333479]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Π2 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver for lambda calculus#Oracle Busy Beaver|Busy Beaver for lambda calculus with a BBλ oracle]]&lt;br /&gt;
|BBλ&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Maximum beta/oracle normal form size of any 1-closed lambda term of size n.&lt;br /&gt;
|see [[Busy Beaver for lambda calculus#Oracle Busy Beaver]]&lt;br /&gt;
|[[oeis:A385712|A385712]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Π3 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver#Beeping Booping Busy Beavers|Beeping Booping busy beaver]]&lt;br /&gt;
|BBBB(n)&lt;br /&gt;
|&lt;br /&gt;
|see [[Beeping Busy Beaver#Beeping Booping Busy Beavers]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Yet ungrouped ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|Maximum space&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
* Any of the above for machines with more than one tape, or tapes with more dimensions (2d grid, 3d, n-d...)&lt;br /&gt;
* Machines with a finite tape, or a circular one of a certain length&lt;br /&gt;
* Any of the above functions bounded by the number of instructions rather than states and symbols.&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;br /&gt;
[[Category:Functions]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=4677</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=4677"/>
		<updated>2025-10-23T15:09:37Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Π1 */ Add noncomputable sequence (starting and ending with blank tape)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Lazy Beaver]]&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state, m-symbol Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|see [[Lazy Beaver#Computed Values]]&lt;br /&gt;
|[[oeis:A337805|A337805 (for m=2)]]&lt;br /&gt;
|-&lt;br /&gt;
|Configs A(a, b) reached in [[Antihydra]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A386792|A386792]] (for a), [[oeis:A385902|A385902]] (for b)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs and are grouped by their position in the [[wikipedia:Arithmetical_hierarchy|arithmetical hierarchy]].&lt;br /&gt;
&lt;br /&gt;
Note that when the bbchallenge community refers to BB(n, m), we mean the Max Shift function S(n, m) defined below (if m is omitted, it is set to 2 by default). Some literature may refer to the Max Score function Σ(n, m) by BB(n, m) instead.&lt;br /&gt;
&lt;br /&gt;
==== Π1 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Maximum Space Function]]&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|see [[Maximum Space Function#Champions]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Blanking Busy Beaver]]&lt;br /&gt;
|BLB(n,m)&lt;br /&gt;
|The maximum number of steps that an n-state m-symbol Turing machine can make on an initially blank tape until it is blank again (halting or not)&lt;br /&gt;
|see [[Blanking Busy Beaver Function#Champions]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|BB_clean&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state 2-symbol Turing machine can make on an initially blank tape until it halts on a blank tape&lt;br /&gt;
|(see comments #75 and #77 [https://scottaaronson.blog/?p=5661 here])&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BB_ones&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of 1&#039;s that an n-state 2-symbol Turing machine can make in a row, before halting on a 0 next to it&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[Maximum Consecutive Ones Function]]&lt;br /&gt;
|num(n)&lt;br /&gt;
|The maximum amount of consecutive 1&#039;s that an n-state 2-symbol Turing machine can print before eventually halting&lt;br /&gt;
|see [[Maximum Consecutive Ones Function]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Size of the Runtime Spectrum&lt;br /&gt;
|&amp;lt;math&amp;gt;R(n)&amp;lt;/math&amp;gt;&lt;br /&gt;
|The number of distinct runtimes for a machine with a given number of symbols, for increasing number of states&lt;br /&gt;
|see &amp;quot;The Spectrum of Runtimes&amp;quot; in &amp;quot;[https://www.scottaaronson.com/papers/bb.pdf The Busy Beaver Frontier]&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver]]&lt;br /&gt;
|BBi(n)&lt;br /&gt;
|Maximum number of steps that an n-instruction Turing machine (allowing any number of states and symbols) can take on an initially blank tape before eventually halting.&lt;br /&gt;
|see [[Instruction-Limited Busy Beaver#Champions]]&lt;br /&gt;
|[[oeis:A384629|A384629]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver|Instruction-Limited Symbol Busy Beaver]]&lt;br /&gt;
|Σi(n)&lt;br /&gt;
|Maximum number of non-blank symbols that an n-instruction Turing machine (allowing any number of states and symbols) can leave on an initially blank tape before eventually halting.&lt;br /&gt;
|see [[Instruction-Limited Busy Beaver#Champions]]&lt;br /&gt;
|[[oeis:A384766|A384766]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver#Instruction-Limited Busy Beaver Variants|Instruction-Limited Greedy Busy Beaver]]&lt;br /&gt;
|gBBi(n)&lt;br /&gt;
|Maximum number of steps that an n-instruction Turing machine can take from a blank tape before halting, where the Turing machines first n-1 instructions are a machine which runs for gBBi(n-1) steps.&lt;br /&gt;
|see [[Instruction-Limited Busy Beaver#Instruction-Limited Busy Beaver Variants]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver#Instruction-Limited Busy Beaver Variants|Instruction-Limited Blanking Busy Beaver]]&lt;br /&gt;
|BLBi(n)&lt;br /&gt;
|Maximum number of steps that an n-instruction Turing machine (allowing any number of states and symbols) can take on an initially blank tape before blanking the tape again.&lt;br /&gt;
|see [[Instruction-Limited Busy Beaver#Instruction-Limited Busy Beaver Variants]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver for lambda calculus]]&lt;br /&gt;
|BBλ(n)&lt;br /&gt;
|Maximum beta normal form size of any closed lambda term of size n.&lt;br /&gt;
|see [[Busy Beaver for lambda calculus#Champions]]&lt;br /&gt;
|[[oeis:A333479|A333479]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Maximal number of steps that an n-state Turing machine can make which was started on an initially blank tape before halting on the blank tape again.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A119683|A119683]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Π2 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver for lambda calculus#Oracle Busy Beaver|Busy Beaver for lambda calculus with a BBλ oracle]]&lt;br /&gt;
|BBλ&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Maximum beta/oracle normal form size of any 1-closed lambda term of size n.&lt;br /&gt;
|see [[Busy Beaver for lambda calculus#Oracle Busy Beaver]]&lt;br /&gt;
|[[oeis:A385712|A385712]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Π3 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver#Beeping Booping Busy Beavers|Beeping Booping busy beaver]]&lt;br /&gt;
|BBBB(n)&lt;br /&gt;
|&lt;br /&gt;
|see [[Beeping Busy Beaver#Beeping Booping Busy Beavers]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Yet ungrouped ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|Maximum space&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
* Any of the above for machines with more than one tape, or tapes with more dimensions (2d grid, 3d, n-d...)&lt;br /&gt;
* Machines with a finite tape, or a circular one of a certain length&lt;br /&gt;
* Any of the above functions bounded by the number of instructions rather than states and symbols.&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;br /&gt;
[[Category:Functions]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=4357</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=4357"/>
		<updated>2025-10-07T10:50:29Z</updated>

		<summary type="html">&lt;p&gt;Coda: make state diagram caption a paragraph&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}&lt;br /&gt;
{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}, called &#039;&#039;&#039;Antihydra&#039;&#039;&#039;, is a [[BB(6)]] [[Cryptid]]. Its pseudo-random behaviour was first reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after. It was named after the 2-state, 5-symbol [[Turing machine]] called [[Hydra]] for sharing many similarities to it.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Antihydra is known to not generate Sturmian words&amp;lt;ref&amp;gt;DUBICKAS A. ON INTEGER SEQUENCES GENERATED BY LINEAR MAPS. &#039;&#039;Glasgow Mathematical Journal&#039;&#039;. 2009;51(2):243-252. doi:[https://doi.org/10.1017/S0017089508004655 10.1017/S0017089508004655]&amp;lt;/ref&amp;gt; (Corollary 4).&lt;br /&gt;
&amp;lt;table style=&amp;quot;margin: auto; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 200px;&amp;quot;&amp;gt;[[File:Antihydra-depiction.png|200px]]&amp;lt;br&amp;gt;Artistic depiction of Antihydra by Jadeix&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
! !!0!!1&lt;br /&gt;
|-&lt;br /&gt;
!A&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!B&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!C&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!D&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!E&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!F&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
The transition table of Antihydra.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[File:Antihydra_state_diagram.png|200x200px]]&lt;br /&gt;
State diagram of Antihydra&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 220px;&amp;quot;&amp;gt;[[File:Antihydra award.jpg|220px]]&amp;lt;br&amp;gt;A community trophy - to be awarded to the first person or group who solves the Antihydra problem&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
In effect, the halting problem for Antihydra is about whether repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor+2&amp;lt;/math&amp;gt; will at some point produce more odd values of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; than twice the number of even values.&lt;br /&gt;
&lt;br /&gt;
These rules can be modified to use the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor&amp;lt;/math&amp;gt;, or the [[Hydra function]], which strengthens Antihydra&#039;s similarities to Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
[[File:Antihydra Walk.png|thumb|Path of parity of repeated applications of Hydra map for Antihydra.]]&lt;br /&gt;
Starting from a blank tape, Antihydra reaches &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; in 11 steps and then the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{38}&amp;lt;/math&amp;gt; rule steps,&amp;lt;ref&amp;gt;https://discord.com/channels/960643023006490684/1026577255754903572/1271528180246773883&amp;lt;/ref&amp;gt; at which point &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; exceeds &amp;lt;math&amp;gt;2^{37}&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; values resembles a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to the position of the current &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; value, then the probability of it ever reaching position -1 is less than &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left( \frac{\sqrt{5}-1}{2} \right)}^{2^{37}}\approx 2.884\times 10^{-28723042565}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python program implements the abstracted behavior of the Antihydra. Proving whether it halts or not would also solve the Antihydra problem:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Current value of the iterated Hydra function starting with initial value 8 (the values do not overflow)&lt;br /&gt;
h = 8&lt;br /&gt;
# (Collatz-like) condition counter that keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
c = 0&lt;br /&gt;
# If c equals -1 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while c != -1:&lt;br /&gt;
    # If h is even, add 2 to c so even numbers count twice&lt;br /&gt;
    if h % 2 == 0:&lt;br /&gt;
        c += 2&lt;br /&gt;
    else:&lt;br /&gt;
        c -= 1&lt;br /&gt;
    # Add the current hydra value divided by two (integer division, rounding down) to itself (Hydra function)&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (h &amp;gt;&amp;gt; 1)&lt;br /&gt;
    h += h//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The variable values of this iteration have been put into the On-Line Encyclopedia of Integer Sequences (OEIS):&lt;br /&gt;
&lt;br /&gt;
* Hydra function values with Antihydra&#039;s starting value 8: https://oeis.org/A386792&lt;br /&gt;
* Antihydra&#039;s condition values: https://oeis.org/A385902&lt;br /&gt;
&lt;br /&gt;
Fast [[Hydra]]/Antihydra simulation code by Greg Kuperberg (who said it could be made faster using FLINT):&amp;lt;syntaxhighlight lang=&amp;quot;python2&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Python script to demonstrate almost linear time hydra simulation&lt;br /&gt;
# using fast multiplication. &lt;br /&gt;
# by Greg Kuperberg&lt;br /&gt;
&lt;br /&gt;
import time&lt;br /&gt;
from gmpy2 import mpz,bit_mask&lt;br /&gt;
&lt;br /&gt;
# Straight computation of t steps of hydra&lt;br /&gt;
def simple(n,t):&lt;br /&gt;
    for s in range(t): n += n&amp;gt;&amp;gt;1&lt;br /&gt;
    return n&lt;br /&gt;
&lt;br /&gt;
# Accelerated computation of 2**e steps of hydra&lt;br /&gt;
def hydra(n,e):&lt;br /&gt;
    if e &amp;lt; 9: return simple(n,1&amp;lt;&amp;lt;e)&lt;br /&gt;
    t = 1&amp;lt;&amp;lt;(e-1)&lt;br /&gt;
    (p3t,m) = (mpz(3)**t,bit_mask(t))&lt;br /&gt;
    n = p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
    return p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
&lt;br /&gt;
def elapsed():&lt;br /&gt;
    (last,elapsed.mark) = (elapsed.mark,time.process_time())&lt;br /&gt;
    return elapsed.mark-last&lt;br /&gt;
elapsed.mark = 0&lt;br /&gt;
&lt;br /&gt;
(n,e) = (mpz(3),25)&lt;br /&gt;
&lt;br /&gt;
elapsed()&lt;br /&gt;
print(&#039;hydra:  steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
    % (1&amp;lt;&amp;lt;e,hash(hydra(n,e)),elapsed()))&lt;br /&gt;
&lt;br /&gt;
# Quadratic time algorithm for comparison&lt;br /&gt;
# print(&#039;simple: steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
#     % (1&amp;lt;&amp;lt;e,hash(simple(n,1&amp;lt;&amp;lt;e)),elapsed()))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:BB(6)]][[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=4356</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=4356"/>
		<updated>2025-10-07T10:49:00Z</updated>

		<summary type="html">&lt;p&gt;Coda: Set Antihydra state diagram image type to Basic (not frameless), like the others&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}&lt;br /&gt;
{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}, called &#039;&#039;&#039;Antihydra&#039;&#039;&#039;, is a [[BB(6)]] [[Cryptid]]. Its pseudo-random behaviour was first reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after. It was named after the 2-state, 5-symbol [[Turing machine]] called [[Hydra]] for sharing many similarities to it.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Antihydra is known to not generate Sturmian words&amp;lt;ref&amp;gt;DUBICKAS A. ON INTEGER SEQUENCES GENERATED BY LINEAR MAPS. &#039;&#039;Glasgow Mathematical Journal&#039;&#039;. 2009;51(2):243-252. doi:[https://doi.org/10.1017/S0017089508004655 10.1017/S0017089508004655]&amp;lt;/ref&amp;gt; (Corollary 4).&lt;br /&gt;
&amp;lt;table style=&amp;quot;margin: auto; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 200px;&amp;quot;&amp;gt;[[File:Antihydra-depiction.png|200px]]&amp;lt;br&amp;gt;Artistic depiction of Antihydra by Jadeix&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
! !!0!!1&lt;br /&gt;
|-&lt;br /&gt;
!A&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!B&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!C&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!D&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!E&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!F&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
The transition table of Antihydra.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[File:Antihydra_state_diagram.png|200x200px]]State diagram of Antihydra&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 220px;&amp;quot;&amp;gt;[[File:Antihydra award.jpg|220px]]&amp;lt;br&amp;gt;A community trophy - to be awarded to the first person or group who solves the Antihydra problem&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
In effect, the halting problem for Antihydra is about whether repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor+2&amp;lt;/math&amp;gt; will at some point produce more odd values of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; than twice the number of even values.&lt;br /&gt;
&lt;br /&gt;
These rules can be modified to use the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor&amp;lt;/math&amp;gt;, or the [[Hydra function]], which strengthens Antihydra&#039;s similarities to Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
[[File:Antihydra Walk.png|thumb|Path of parity of repeated applications of Hydra map for Antihydra.]]&lt;br /&gt;
Starting from a blank tape, Antihydra reaches &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; in 11 steps and then the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{38}&amp;lt;/math&amp;gt; rule steps,&amp;lt;ref&amp;gt;https://discord.com/channels/960643023006490684/1026577255754903572/1271528180246773883&amp;lt;/ref&amp;gt; at which point &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; exceeds &amp;lt;math&amp;gt;2^{37}&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; values resembles a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to the position of the current &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; value, then the probability of it ever reaching position -1 is less than &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left( \frac{\sqrt{5}-1}{2} \right)}^{2^{37}}\approx 2.884\times 10^{-28723042565}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python program implements the abstracted behavior of the Antihydra. Proving whether it halts or not would also solve the Antihydra problem:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Current value of the iterated Hydra function starting with initial value 8 (the values do not overflow)&lt;br /&gt;
h = 8&lt;br /&gt;
# (Collatz-like) condition counter that keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
c = 0&lt;br /&gt;
# If c equals -1 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while c != -1:&lt;br /&gt;
    # If h is even, add 2 to c so even numbers count twice&lt;br /&gt;
    if h % 2 == 0:&lt;br /&gt;
        c += 2&lt;br /&gt;
    else:&lt;br /&gt;
        c -= 1&lt;br /&gt;
    # Add the current hydra value divided by two (integer division, rounding down) to itself (Hydra function)&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (h &amp;gt;&amp;gt; 1)&lt;br /&gt;
    h += h//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The variable values of this iteration have been put into the On-Line Encyclopedia of Integer Sequences (OEIS):&lt;br /&gt;
&lt;br /&gt;
* Hydra function values with Antihydra&#039;s starting value 8: https://oeis.org/A386792&lt;br /&gt;
* Antihydra&#039;s condition values: https://oeis.org/A385902&lt;br /&gt;
&lt;br /&gt;
Fast [[Hydra]]/Antihydra simulation code by Greg Kuperberg (who said it could be made faster using FLINT):&amp;lt;syntaxhighlight lang=&amp;quot;python2&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Python script to demonstrate almost linear time hydra simulation&lt;br /&gt;
# using fast multiplication. &lt;br /&gt;
# by Greg Kuperberg&lt;br /&gt;
&lt;br /&gt;
import time&lt;br /&gt;
from gmpy2 import mpz,bit_mask&lt;br /&gt;
&lt;br /&gt;
# Straight computation of t steps of hydra&lt;br /&gt;
def simple(n,t):&lt;br /&gt;
    for s in range(t): n += n&amp;gt;&amp;gt;1&lt;br /&gt;
    return n&lt;br /&gt;
&lt;br /&gt;
# Accelerated computation of 2**e steps of hydra&lt;br /&gt;
def hydra(n,e):&lt;br /&gt;
    if e &amp;lt; 9: return simple(n,1&amp;lt;&amp;lt;e)&lt;br /&gt;
    t = 1&amp;lt;&amp;lt;(e-1)&lt;br /&gt;
    (p3t,m) = (mpz(3)**t,bit_mask(t))&lt;br /&gt;
    n = p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
    return p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
&lt;br /&gt;
def elapsed():&lt;br /&gt;
    (last,elapsed.mark) = (elapsed.mark,time.process_time())&lt;br /&gt;
    return elapsed.mark-last&lt;br /&gt;
elapsed.mark = 0&lt;br /&gt;
&lt;br /&gt;
(n,e) = (mpz(3),25)&lt;br /&gt;
&lt;br /&gt;
elapsed()&lt;br /&gt;
print(&#039;hydra:  steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
    % (1&amp;lt;&amp;lt;e,hash(hydra(n,e)),elapsed()))&lt;br /&gt;
&lt;br /&gt;
# Quadratic time algorithm for comparison&lt;br /&gt;
# print(&#039;simple: steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
#     % (1&amp;lt;&amp;lt;e,hash(simple(n,1&amp;lt;&amp;lt;e)),elapsed()))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:BB(6)]][[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=4355</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=4355"/>
		<updated>2025-10-07T10:45:26Z</updated>

		<summary type="html">&lt;p&gt;Coda: make state diagram image frameless like the others&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}&lt;br /&gt;
{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}, called &#039;&#039;&#039;Antihydra&#039;&#039;&#039;, is a [[BB(6)]] [[Cryptid]]. Its pseudo-random behaviour was first reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after. It was named after the 2-state, 5-symbol [[Turing machine]] called [[Hydra]] for sharing many similarities to it.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Antihydra is known to not generate Sturmian words&amp;lt;ref&amp;gt;DUBICKAS A. ON INTEGER SEQUENCES GENERATED BY LINEAR MAPS. &#039;&#039;Glasgow Mathematical Journal&#039;&#039;. 2009;51(2):243-252. doi:[https://doi.org/10.1017/S0017089508004655 10.1017/S0017089508004655]&amp;lt;/ref&amp;gt; (Corollary 4).&lt;br /&gt;
&amp;lt;table style=&amp;quot;margin: auto; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 200px;&amp;quot;&amp;gt;[[File:Antihydra-depiction.png|200px]]&amp;lt;br&amp;gt;Artistic depiction of Antihydra by Jadeix&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
! !!0!!1&lt;br /&gt;
|-&lt;br /&gt;
!A&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!B&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!C&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!D&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!E&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!F&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
The transition table of Antihydra.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[File:Antihydra_state_diagram.png|frameless]]State diagram of Antihydra&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 220px;&amp;quot;&amp;gt;[[File:Antihydra award.jpg|220px]]&amp;lt;br&amp;gt;A community trophy - to be awarded to the first person or group who solves the Antihydra problem&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
In effect, the halting problem for Antihydra is about whether repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor+2&amp;lt;/math&amp;gt; will at some point produce more odd values of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; than twice the number of even values.&lt;br /&gt;
&lt;br /&gt;
These rules can be modified to use the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor&amp;lt;/math&amp;gt;, or the [[Hydra function]], which strengthens Antihydra&#039;s similarities to Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
[[File:Antihydra Walk.png|thumb|Path of parity of repeated applications of Hydra map for Antihydra.]]&lt;br /&gt;
Starting from a blank tape, Antihydra reaches &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; in 11 steps and then the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{38}&amp;lt;/math&amp;gt; rule steps,&amp;lt;ref&amp;gt;https://discord.com/channels/960643023006490684/1026577255754903572/1271528180246773883&amp;lt;/ref&amp;gt; at which point &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; exceeds &amp;lt;math&amp;gt;2^{37}&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; values resembles a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to the position of the current &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; value, then the probability of it ever reaching position -1 is less than &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left( \frac{\sqrt{5}-1}{2} \right)}^{2^{37}}\approx 2.884\times 10^{-28723042565}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python program implements the abstracted behavior of the Antihydra. Proving whether it halts or not would also solve the Antihydra problem:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Current value of the iterated Hydra function starting with initial value 8 (the values do not overflow)&lt;br /&gt;
h = 8&lt;br /&gt;
# (Collatz-like) condition counter that keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
c = 0&lt;br /&gt;
# If c equals -1 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while c != -1:&lt;br /&gt;
    # If h is even, add 2 to c so even numbers count twice&lt;br /&gt;
    if h % 2 == 0:&lt;br /&gt;
        c += 2&lt;br /&gt;
    else:&lt;br /&gt;
        c -= 1&lt;br /&gt;
    # Add the current hydra value divided by two (integer division, rounding down) to itself (Hydra function)&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (h &amp;gt;&amp;gt; 1)&lt;br /&gt;
    h += h//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The variable values of this iteration have been put into the On-Line Encyclopedia of Integer Sequences (OEIS):&lt;br /&gt;
&lt;br /&gt;
* Hydra function values with Antihydra&#039;s starting value 8: https://oeis.org/A386792&lt;br /&gt;
* Antihydra&#039;s condition values: https://oeis.org/A385902&lt;br /&gt;
&lt;br /&gt;
Fast [[Hydra]]/Antihydra simulation code by Greg Kuperberg (who said it could be made faster using FLINT):&amp;lt;syntaxhighlight lang=&amp;quot;python2&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Python script to demonstrate almost linear time hydra simulation&lt;br /&gt;
# using fast multiplication. &lt;br /&gt;
# by Greg Kuperberg&lt;br /&gt;
&lt;br /&gt;
import time&lt;br /&gt;
from gmpy2 import mpz,bit_mask&lt;br /&gt;
&lt;br /&gt;
# Straight computation of t steps of hydra&lt;br /&gt;
def simple(n,t):&lt;br /&gt;
    for s in range(t): n += n&amp;gt;&amp;gt;1&lt;br /&gt;
    return n&lt;br /&gt;
&lt;br /&gt;
# Accelerated computation of 2**e steps of hydra&lt;br /&gt;
def hydra(n,e):&lt;br /&gt;
    if e &amp;lt; 9: return simple(n,1&amp;lt;&amp;lt;e)&lt;br /&gt;
    t = 1&amp;lt;&amp;lt;(e-1)&lt;br /&gt;
    (p3t,m) = (mpz(3)**t,bit_mask(t))&lt;br /&gt;
    n = p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
    return p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
&lt;br /&gt;
def elapsed():&lt;br /&gt;
    (last,elapsed.mark) = (elapsed.mark,time.process_time())&lt;br /&gt;
    return elapsed.mark-last&lt;br /&gt;
elapsed.mark = 0&lt;br /&gt;
&lt;br /&gt;
(n,e) = (mpz(3),25)&lt;br /&gt;
&lt;br /&gt;
elapsed()&lt;br /&gt;
print(&#039;hydra:  steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
    % (1&amp;lt;&amp;lt;e,hash(hydra(n,e)),elapsed()))&lt;br /&gt;
&lt;br /&gt;
# Quadratic time algorithm for comparison&lt;br /&gt;
# print(&#039;simple: steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
#     % (1&amp;lt;&amp;lt;e,hash(simple(n,1&amp;lt;&amp;lt;e)),elapsed()))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:BB(6)]][[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=4354</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=4354"/>
		<updated>2025-10-07T10:43:55Z</updated>

		<summary type="html">&lt;p&gt;Coda: Add Antihydra state diagram&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}&lt;br /&gt;
{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}, called &#039;&#039;&#039;Antihydra&#039;&#039;&#039;, is a [[BB(6)]] [[Cryptid]]. Its pseudo-random behaviour was first reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after. It was named after the 2-state, 5-symbol [[Turing machine]] called [[Hydra]] for sharing many similarities to it.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Antihydra is known to not generate Sturmian words&amp;lt;ref&amp;gt;DUBICKAS A. ON INTEGER SEQUENCES GENERATED BY LINEAR MAPS. &#039;&#039;Glasgow Mathematical Journal&#039;&#039;. 2009;51(2):243-252. doi:[https://doi.org/10.1017/S0017089508004655 10.1017/S0017089508004655]&amp;lt;/ref&amp;gt; (Corollary 4).&lt;br /&gt;
&amp;lt;table style=&amp;quot;margin: auto; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 200px;&amp;quot;&amp;gt;[[File:Antihydra-depiction.png|200px]]&amp;lt;br&amp;gt;Artistic depiction of Antihydra by Jadeix&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
! !!0!!1&lt;br /&gt;
|-&lt;br /&gt;
!A&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!B&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!C&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!D&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!E&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!F&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
The transition table of Antihydra.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[File:Antihydra state diagram.png|thumb|State diagram of Antihydra]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 220px;&amp;quot;&amp;gt;[[File:Antihydra award.jpg|220px]]&amp;lt;br&amp;gt;A community trophy - to be awarded to the first person or group who solves the Antihydra problem&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
In effect, the halting problem for Antihydra is about whether repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor+2&amp;lt;/math&amp;gt; will at some point produce more odd values of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; than twice the number of even values.&lt;br /&gt;
&lt;br /&gt;
These rules can be modified to use the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor&amp;lt;/math&amp;gt;, or the [[Hydra function]], which strengthens Antihydra&#039;s similarities to Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
[[File:Antihydra Walk.png|thumb|Path of parity of repeated applications of Hydra map for Antihydra.]]&lt;br /&gt;
Starting from a blank tape, Antihydra reaches &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; in 11 steps and then the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{38}&amp;lt;/math&amp;gt; rule steps,&amp;lt;ref&amp;gt;https://discord.com/channels/960643023006490684/1026577255754903572/1271528180246773883&amp;lt;/ref&amp;gt; at which point &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; exceeds &amp;lt;math&amp;gt;2^{37}&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; values resembles a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to the position of the current &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; value, then the probability of it ever reaching position -1 is less than &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left( \frac{\sqrt{5}-1}{2} \right)}^{2^{37}}\approx 2.884\times 10^{-28723042565}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python program implements the abstracted behavior of the Antihydra. Proving whether it halts or not would also solve the Antihydra problem:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Current value of the iterated Hydra function starting with initial value 8 (the values do not overflow)&lt;br /&gt;
h = 8&lt;br /&gt;
# (Collatz-like) condition counter that keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
c = 0&lt;br /&gt;
# If c equals -1 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while c != -1:&lt;br /&gt;
    # If h is even, add 2 to c so even numbers count twice&lt;br /&gt;
    if h % 2 == 0:&lt;br /&gt;
        c += 2&lt;br /&gt;
    else:&lt;br /&gt;
        c -= 1&lt;br /&gt;
    # Add the current hydra value divided by two (integer division, rounding down) to itself (Hydra function)&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (h &amp;gt;&amp;gt; 1)&lt;br /&gt;
    h += h//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The variable values of this iteration have been put into the On-Line Encyclopedia of Integer Sequences (OEIS):&lt;br /&gt;
&lt;br /&gt;
* Hydra function values with Antihydra&#039;s starting value 8: https://oeis.org/A386792&lt;br /&gt;
* Antihydra&#039;s condition values: https://oeis.org/A385902&lt;br /&gt;
&lt;br /&gt;
Fast [[Hydra]]/Antihydra simulation code by Greg Kuperberg (who said it could be made faster using FLINT):&amp;lt;syntaxhighlight lang=&amp;quot;python2&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Python script to demonstrate almost linear time hydra simulation&lt;br /&gt;
# using fast multiplication. &lt;br /&gt;
# by Greg Kuperberg&lt;br /&gt;
&lt;br /&gt;
import time&lt;br /&gt;
from gmpy2 import mpz,bit_mask&lt;br /&gt;
&lt;br /&gt;
# Straight computation of t steps of hydra&lt;br /&gt;
def simple(n,t):&lt;br /&gt;
    for s in range(t): n += n&amp;gt;&amp;gt;1&lt;br /&gt;
    return n&lt;br /&gt;
&lt;br /&gt;
# Accelerated computation of 2**e steps of hydra&lt;br /&gt;
def hydra(n,e):&lt;br /&gt;
    if e &amp;lt; 9: return simple(n,1&amp;lt;&amp;lt;e)&lt;br /&gt;
    t = 1&amp;lt;&amp;lt;(e-1)&lt;br /&gt;
    (p3t,m) = (mpz(3)**t,bit_mask(t))&lt;br /&gt;
    n = p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
    return p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
&lt;br /&gt;
def elapsed():&lt;br /&gt;
    (last,elapsed.mark) = (elapsed.mark,time.process_time())&lt;br /&gt;
    return elapsed.mark-last&lt;br /&gt;
elapsed.mark = 0&lt;br /&gt;
&lt;br /&gt;
(n,e) = (mpz(3),25)&lt;br /&gt;
&lt;br /&gt;
elapsed()&lt;br /&gt;
print(&#039;hydra:  steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
    % (1&amp;lt;&amp;lt;e,hash(hydra(n,e)),elapsed()))&lt;br /&gt;
&lt;br /&gt;
# Quadratic time algorithm for comparison&lt;br /&gt;
# print(&#039;simple: steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
#     % (1&amp;lt;&amp;lt;e,hash(simple(n,1&amp;lt;&amp;lt;e)),elapsed()))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:BB(6)]][[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=File:Antihydra_state_diagram.png&amp;diff=4353</id>
		<title>File:Antihydra state diagram.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=File:Antihydra_state_diagram.png&amp;diff=4353"/>
		<updated>2025-10-07T10:42:19Z</updated>

		<summary type="html">&lt;p&gt;Coda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;visualizes the transitions between states, depending on the input&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Holdouts_lists&amp;diff=3830</id>
		<title>Holdouts lists</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Holdouts_lists&amp;diff=3830"/>
		<updated>2025-09-25T07:45:38Z</updated>

		<summary type="html">&lt;p&gt;Coda: unable -&amp;gt; yet unable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;holdout&#039;&#039;&#039; (or undecided machine) is a [[Turing machine]] for which it is not known whether the machine halts or not from all-0 input tape. Holdouts are the machines which [[Decider|deciders]] are yet unable to decide.&lt;br /&gt;
&lt;br /&gt;
Holdout lists are often shared by contributors. There is a [[#Downloadable Holdout Lists|Downloadable Holdout Lists]] table where people have added lists with no restriction or independent verification. For some of the entries there is a reference to a spreadsheet that documents what was run to achieve the result. For others, there is additional documentation on the specific BB pages.&lt;br /&gt;
&lt;br /&gt;
The table with the &amp;quot;Number of holdouts&amp;quot; is based on the holdout lists listed in the table below it. Thus, some of these numbers have not been independently verified. All the zero entries (no remaining holdouts) have been verified.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Number of holdouts&lt;br /&gt;
!&lt;br /&gt;
!2-state&lt;br /&gt;
!3-state&lt;br /&gt;
!4-state&lt;br /&gt;
!5-state&lt;br /&gt;
!6-state&lt;br /&gt;
!7-state&lt;br /&gt;
|-&lt;br /&gt;
!2-symbol&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|0&lt;br /&gt;
|1,691&lt;br /&gt;
|28,189,617&lt;br /&gt;
|-&lt;br /&gt;
!3-symbol&lt;br /&gt;
|0&lt;br /&gt;
|6&lt;br /&gt;
|460,916,384&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!4-symbol&lt;br /&gt;
|0&lt;br /&gt;
|434,787,751&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!5-symbol&lt;br /&gt;
|83&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
!6-symbol&lt;br /&gt;
|1,688,951&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Downloadable Holdout Lists ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!BB space&lt;br /&gt;
!Date&lt;br /&gt;
!Shared by&lt;br /&gt;
!Number of holdouts&lt;br /&gt;
!File&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1239205785913790465/1411308408220549140 August 30 2025]&lt;br /&gt;
|@mxdys&lt;br /&gt;
|2,592&lt;br /&gt;
|[[:File:BB6 holdouts 2592.txt|BB6 holdouts 2592.txt]]&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1239205785913790465/1399783936019664896 July 29 2025]&lt;br /&gt;
|@mxdys&lt;br /&gt;
|2,728&lt;br /&gt;
|[[:File:BB6 holdouts 2728.txt|BB6 holdouts 2728.txt]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(2,5)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1259770421046411285/1355593937531961365 March 29 2025]&lt;br /&gt;
|@mxdys&lt;br /&gt;
|83&lt;br /&gt;
|[[:File:BB2x5 Coq holdouts 83.txt]]&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(4,3)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1084047886494470185/1320172124509311004  December 21, 2024]&lt;br /&gt;
|@tjligocki&lt;br /&gt;
|460,916,384&lt;br /&gt;
|[https://drive.google.com/file/d/1hKy0TuPuI62rN95j6ZLjXgE-Pue8tRsK/view?usp=drive_link 4x3_holdouts_460916384.txt.gz]&lt;br /&gt;
|[https://drive.google.com/drive/folders/1HBPZ17llVE_8wCy5FvRUFQ5MJsaYXAW-?usp=drive_link Google Drive directory for 4x3 TMs]&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1239205785913790465/1310648046576730124 November 25, 2024 (@icy)]&lt;br /&gt;
|@tjligocki&lt;br /&gt;
|4,319&lt;br /&gt;
|[https://docs.google.com/spreadsheets/d/1grhW_0neb2I8TfceN5-v70_3W42Z2U159r9L6FhPGf8/edit?usp=sharing Spreadsheet of holdouts]&lt;br /&gt;
|Keeping track of BB(6) progress - informal.&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(3,3)]]&lt;br /&gt;
|November 10, 2024&lt;br /&gt;
|&lt;br /&gt;
|6&lt;br /&gt;
|[[:File:3x3 holdout 6.txt|3x3 holdout 6.txt]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|[https://discordapp.com/channels/960643023006490684/1239205785913790465/1304303803213942846 November 8, 2024]&lt;br /&gt;
|@mxdys&lt;br /&gt;
|4,408&lt;br /&gt;
|[[:File:BB6 holdouts 4408.txt|BB6_holdouts_4408.txt]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(2,6)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/960643023530762341/1303219184221683733 November 4, 2024]&lt;br /&gt;
|@tjligocki&lt;br /&gt;
|22,302,296&lt;br /&gt;
|[https://drive.google.com/file/d/1xRLIjdiqImFP2SL38gvhxVlAaX0L1cYO/view?usp=drive_link 2x6_holdouts_22302296.txt.gz]&lt;br /&gt;
|[https://drive.google.com/drive/folders/1p9b5g-Id3WEMUYIwEnaKWRBGIW66ADjM?usp=drive_link Google Drive directory for 2x6 TMs]&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(3,4)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/960643023530762341/1302767449476694188  November 3, 2024]&lt;br /&gt;
|@tjligocki&lt;br /&gt;
|434,787,751&lt;br /&gt;
|[https://drive.google.com/file/d/1PLzN3wLw-MRgk1OFmYh4RTwNc30nflR7/view?usp=drive_link 3x4_holdouts_434787751.txt.gz]&lt;br /&gt;
|[https://drive.google.com/drive/folders/1bZxl7jg5q9IVvHQNZwItx1kPusAWznZk?usp=drive_link Google Drive directory for 3x4 TMs]&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|[https://discordapp.com/channels/960643023006490684/1239205785913790465/1280185195877634098 September 2, 2024]&lt;br /&gt;
|@mxdys&lt;br /&gt;
|5394&lt;br /&gt;
|[[:File:BB6 holdouts 5394.txt]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1239205785913790465/1269612923127599164 August 4, 2024]&lt;br /&gt;
|@mxdys&lt;br /&gt;
|5877&lt;br /&gt;
|[[:File:BB6 holdouts 5877.txt]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1239205785913790465/1259131753176498216 July 6, 2024]&lt;br /&gt;
|@mxdys&lt;br /&gt;
|7296&lt;br /&gt;
|[[:File:BB6 holdouts 7296.txt]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(2,5)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1084047886494470185/1252989316175499284 June 19, 2024]&lt;br /&gt;
|@mxdys&lt;br /&gt;
|217&lt;br /&gt;
|[[:File:2x5_holdouts_217.txt]]&lt;br /&gt;
|273 holdouts minus machines solved by CTL&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(2,5)]]&lt;br /&gt;
|June 15th 2024&lt;br /&gt;
|@dyuan01&lt;br /&gt;
| 273&lt;br /&gt;
|[[:File:2x5_holdouts_273.txt]]&lt;br /&gt;
|@Justin Blanchard&#039;s 499 holdouts minus machines solved by @mxdys&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1239205785913790465/1250895665719148595 June 13, 2024]&lt;br /&gt;
|@tjligocki&lt;br /&gt;
| 12,091&lt;br /&gt;
|[[:File:BB6 holdouts 12091.txt]]&lt;br /&gt;
|Work done with @Shawn Ligocki&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(3,3)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1084047886494470185/1249142547217907772 June 9, 2024]&lt;br /&gt;
|@Justin Blanchard&lt;br /&gt;
|22&lt;br /&gt;
|[[:File:3x3.todo.txt]], [[:File:Mugshots small.pdf]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BB(6)&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1239205785913790465/1248708916381220954 June 7, 2024]&lt;br /&gt;
|@mxdys&lt;br /&gt;
|12,325&lt;br /&gt;
|[[:File:BB6 holdouts 12325.txt]]&lt;br /&gt;
|Some equivalent machines are removed.&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(5)]]&lt;br /&gt;
|June 2024&lt;br /&gt;
|BBChallenge&lt;br /&gt;
|0&lt;br /&gt;
|&lt;br /&gt;
|&#039;&#039;&#039;BB(5) is SOLVED!&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(2,5)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1084047886494470185/1242679236142170203 May 22, 2024]&lt;br /&gt;
|@Justin Blanchard&lt;br /&gt;
|499&lt;br /&gt;
|[[:File:2x5.todo.txt]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(3,3)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1084047886494470185/1116351783040716830 June 8, 2023]&lt;br /&gt;
|@Iijil&lt;br /&gt;
|925&lt;br /&gt;
|[[:File:2023 06 08.3x3.holdouts intersect sligocki iijil 925.txt]]&lt;br /&gt;
|Intersection of @sligocki and @Iijil from below&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(3,3)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1084047886494470185/1116351783040716830 June 8, 2023]&lt;br /&gt;
|@Iijil&lt;br /&gt;
|2,480&lt;br /&gt;
|[[:File:2023 06 08.3x3.holdouts iijil 2380.txt]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(3,3)]]&lt;br /&gt;
|[https://discord.com/channels/960643023006490684/1084047886494470185/1116178334620070000 June 7, 2023]&lt;br /&gt;
|@sligocki&lt;br /&gt;
|2,417&lt;br /&gt;
|[[:File:2023 06 07.3x3.holdouts 2417.txt]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|May 27, 2023&lt;br /&gt;
|@sligocki&lt;br /&gt;
|181,851&lt;br /&gt;
|[https://drive.google.com/file/d/1YNwFCN6XJeDNKxxK5KbGHOAFOdIBvDb6/view?usp=drive_link 6x2.holdouts_181851.txt.gz]&lt;br /&gt;
|This was posted to the BBChallenge Forum (before Discord)&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(6)]]&lt;br /&gt;
|May 10, 2023&lt;br /&gt;
|@sligocki&lt;br /&gt;
|1,458,704&lt;br /&gt;
|[https://drive.google.com/file/d/14bDnBt0OwuHATFBiubc_5jub0220EyXf/view?usp=drive_link 6x2.holdouts_1458704.txt.gz]&lt;br /&gt;
|This was posted to the BBChallenge Forum (before Discord)&lt;br /&gt;
|-&lt;br /&gt;
|[[BB(5)]]&lt;br /&gt;
|[https://skelet.ludost.net/bb/nreg.html circa May 13th, 2003]&lt;br /&gt;
|Georgi Georgiev (Skelet)&lt;br /&gt;
|43&lt;br /&gt;
|[https://bbchallenge.org/skelet List of 43 holdouts]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Papers_%26_Talks&amp;diff=3829</id>
		<title>Papers &amp; Talks</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Papers_%26_Talks&amp;diff=3829"/>
		<updated>2025-09-25T07:22:52Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Papers */ add link to BB(5) arxiv paper&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Papers ==&lt;br /&gt;
Paper produced by The bbchallenge Collaboration:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Determination of the fifth Busy Beaver value.&#039;&#039;&#039; The bbchallenge Collaboration, J. Blanchard, Daniel Briggs, Konrad Deka, Nathan Fenner, Yannick Forster, Georgi Georgiev (Skelet), Matthew L. House, Rachel Hunter, Iijil, Maja Kądziołka, Pavel Kropitz, Shawn Ligocki, mxdys, Mateusz Naściszewski, savask, Tristan Stérin, Chris Xu, Jason Yuen, Théo Zimmermann. https://arxiv.org/abs/2509.12337 [https://github.com/bbchallenge/bbchallenge-paper (github)]&lt;br /&gt;
* &#039;&#039;&#039;Turing machines deciders, part I.&#039;&#039;&#039; The bbchallenge Collaboration, J. Blanchard, K. Deka, N. Fenner, T. Guilfoyle, Iijil, M. Kądziołka, P. Kropitz, S. Ligocki, P. Michel, M. Naściszewski, and T. Stérin. Apr. 2025. https://arxiv.org/abs/2504.20563&lt;br /&gt;
Paper produced by community members:&lt;br /&gt;
* Stérin, T., Woods, D. (2024). Hardness of Busy Beaver Value BB(15). In: Kovács, L., Sokolova, A. (eds) Reachability Problems. RP 2024. Lecture Notes in Computer Science, vol 15050. Springer, Cham. https://doi.org/10.1007/978-3-031-72621-7_9 &lt;br /&gt;
** Paper: [https://arxiv.org/abs/2107.12475 arxiv version] (first released in 2021), [https://link.springer.com/chapter/10.1007/978-3-031-72621-7_9 conference version]&lt;br /&gt;
** Talk on September 25th 2024 at RP 2024 in Vienna: [https://drive.google.com/file/d/1gCoKCHvXGJeY7LvdQX9kN8u0ITdCKtJN/view?usp=sharing talk recording], [https://drive.google.com/file/d/1x3MRuKyh92XWlBHRawqDzxEdXIGSgsX_/view?usp=drive_link talk recording (compressed)], [https://docs.google.com/presentation/d/1rVEMr-AJM_kTzdI95xT2KLux4G24AoTBBCYQoPk8vS0/edit#slide=id.g2d359b31dea_0_2125 talk slides]&lt;br /&gt;
* Xu, C. (2024). Skelet #17 and the fifth Busy Beaver number. [https://arxiv.org/abs/2407.02426 Arxiv preprint]&lt;br /&gt;
&lt;br /&gt;
== Talks ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;To come: &#039;&#039;&#039;Le cinquième nombre Busy Beaver.&#039;&#039;&#039;&#039;&#039; Talk by Tristan Stérin at the seminar of Prof. Timothy Gowers [https://www.college-de-france.fr/fr/chaire/timothy-gowers-combinatoire-chaire-statutaire/ College de France&#039;s lectures] , October 27th 2025.&lt;br /&gt;
* &#039;&#039;&#039;Determination of the fifth Busy Beaver value.&#039;&#039;&#039; Poster by The bbchallenge Collaboration and Tristan Stérin presented at the 31st International Conference on DNA Computing and Molecular Programming [https://dna31.sciencesconf.org/ DNA31]. [https://drive.google.com/file/d/1vRq6C7BIhKdq9hSZYdQtzV5JJRuwGc6q/view?usp=sharing (poster PDF)] [https://drive.google.com/file/d/1vQhcKVgEaRBeANwmRZ-fCzoJcP6kxJ4D/view?usp=sharing (poster SVG)]&lt;br /&gt;
* &#039;&#039;&#039;Coq proof of the fifth Busy Beaver value.&#039;&#039;&#039; Talk given by Tristan Stérin at &#039;&#039;&#039;[https://msp.cis.strath.ac.uk/types2025/cfp.html Types 2025],&#039;&#039;&#039; Glasgow, Scotland, June 9th 2025. [https://docs.google.com/presentation/d/1koofTIAOdk-DsKH6bnLi_jPeHG3-9vz2EcS_N5PsU-0/edit (slides)] [https://bbchallenge.org/types2025 (links)]&lt;br /&gt;
* &#039;&#039;&#039;Formal verification of the 5th Busy Beaver value.&#039;&#039;&#039; Talk given by Maja Kądziołka and Tristan Stérin at Cambridge&#039;s seminar &amp;quot;[https://talks.cam.ac.uk/show/index/164015 Formalisation of mathematics with interactive theorem provers]&amp;quot;, March 13th 2025. [https://www.youtube.com/watch?v=5X6YVEnbLZU (recording)] [https://docs.google.com/presentation/d/1enqHCmXNYubhZyHmaj1qaYciY0bJtSJasc8gqwMLZ7c/edit?slide=id.g319e2b7dbee_0_3#slide=id.g319e2b7dbee_0_3 (slides, part 1)] [https://sakamoto.pl/~mei/bbslides/bbslides.html (interactive slides, part 2)]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=BB(6)&amp;diff=3711</id>
		<title>BB(6)</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=BB(6)&amp;diff=3711"/>
		<updated>2025-09-12T09:33:09Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Top Halters */ add link to Wikipedia page of Knuth&amp;#039;s up-arrow notation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The 6-state, 2-symbol Busy Beaver problem, &#039;&#039;&#039;BB(6)&#039;&#039;&#039;, refers to the unsolved 6&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; value of the [[Busy Beaver function]]. With the discovery of the [[Cryptid]] machine [[Antihydra]] in June 2024, we now know that we must solve a [[Collatz-like]] problem in order to solve BB(6) and thus [https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard].&lt;br /&gt;
&lt;br /&gt;
The current BB(6) [[champion]] {{TM|1RB1RA_1RC1RZ_1LD0RF_1RA0LE_0LD1RC_1RA0RE|halt}} was discovered by mxdys in June 2025, proving the lower bound:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;S(6) &amp;gt; \Sigma(6) &amp;gt; 2 \uparrow\uparrow\uparrow 5&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Techniques ==&lt;br /&gt;
Simulating tetrational machines, such as the former champion {{TM|1RB0LD_1RC0RF_1LC1LA_0LE1RZ_1LF0RB_0RC0RE|halt}}, requires [[Accelerated simulator|accelerated simulation]] that can handle Collatz Level 2 [[Inductive rule|inductive rules]]. In other words, it requires a simulator that can prove the rules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{lcl}&lt;br /&gt;
  C(4k)   &amp;amp; \to &amp;amp; {\operatorname{Halt}}\Big(\frac{3^{k+3} - 11}{2}\Big) \\&lt;br /&gt;
  C(4k+1) &amp;amp; \to &amp;amp; C\Big(\frac{3^{k+3} - 11}{2}\Big) \\&lt;br /&gt;
  C(4k+2) &amp;amp; \to &amp;amp; C\Big(\frac{3^{k+3} - 11}{2}\Big) \\&lt;br /&gt;
  C(4k+3) &amp;amp; \to &amp;amp; C\Big(\frac{3^{k+3} + 1}{2}\Big) \\&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and also compute the remainder mod 3 of numbers produced by applying these rules 15 times (which requires some fancy math related to [[wikipedia:Euler&#039;s_totient_function|Euler&#039;s totient function]]). &lt;br /&gt;
&lt;br /&gt;
We are also applying existing automatic deciders on current holdout lists with more extreme choices of parameters (more computational resources). [[User:XnoobSpeakable|XnoobSpeakable]] was able to solve 11 of the final 2728 holdouts using higher order parameters with the Ligockis&#039; Enumerate.py. An example command line entry is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python3 Code/Enumerate.py --infile &amp;quot;bb6in/bb6tm{i}.txt&amp;quot; --outfile &amp;quot;bb6out/t{i}.pb&amp;quot; -r --no-steps --exp-linear-rules --max-loops=50_000_000 --block-mult=3 --max-block-size=100 --time=500 --force --save-freq=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
XnoobSpeakable ran Enumerate.py on all TMs in the 2728 holdout list with the above max-loops and max-block-size parameters using &amp;lt;code&amp;gt;--block-mult=1&amp;lt;/code&amp;gt; ,&amp;lt;code&amp;gt;--block-mult=2&amp;lt;/code&amp;gt; , and &amp;lt;code&amp;gt;--block-mult=3&amp;lt;/code&amp;gt;. For context, during the Stage 2 BB(7) enumeration, where speed was more important due to the tens of millions of known holdouts, parameters of &amp;lt;code&amp;gt;--max-loops=100_000 --block-mult=2 --time=30 --save-freq=100&amp;lt;/code&amp;gt; were used.  &lt;br /&gt;
&lt;br /&gt;
@Iijil&#039;s MITMWFAR decider is likely too weak to be of any assistance: running the decider on 2650 BB(6) holdouts, using parameters not strong enough to solve BB(5) TMs, took prohibitively long to compute.&lt;br /&gt;
&lt;br /&gt;
== Cryptids ==&lt;br /&gt;
Several [[Turing machines]] have been found that are [[Cryptids]], considered so because each of them have a [[Collatz-like]] halting problem, a type of problem that is generally difficult to solve. However, probabilistic arguments have allowed all but one of them to be categorized as [[probviously]] halting or probviously non-halting.&lt;br /&gt;
&lt;br /&gt;
Probviously non-halting Cryptids:&lt;br /&gt;
&lt;br /&gt;
* {{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}, [[Antihydra]]&lt;br /&gt;
* {{TM|1RB1RC_1LC1LE_1RA1RD_0RF0RE_1LA0LB_---1RA|undecided}}, a variant of [[Hydra]] and Antihydra&lt;br /&gt;
* {{TM|1RB1LD_1RC1RE_0LA1LB_0LD1LC_1RF0RA_---0RC|undecided}}, similar to Antihydra&lt;br /&gt;
* {{TM|1RB0LD_1RC1RF_1LA0RA_0LA0LE_1LD1LA_0RB---|undecided}}, similar to Antihydra&lt;br /&gt;
* {{TM|1RB0LB_1LC0RE_1LA1LD_0LC---_0RB0RF_1RE1RB|undecided}}, similar to Antihydra&lt;br /&gt;
* {{TM|1RB1LA_1LC0RE_1LF1LD_0RB0LA_1RC1RE_---0LD|undecided}}&lt;br /&gt;
&lt;br /&gt;
Probviously halting Cryptids:&lt;br /&gt;
&lt;br /&gt;
* {{TM|1RB0RD_0RC1RE_1RD0LA_1LE1LC_1RF0LD_---0RA}}, [[Lucy&#039;s Moonlight]]&lt;br /&gt;
* {{TM|1RB1RA_0RC1RC_1LD0LF_0LE1LE_1RA0LB_---0LC|undecided}}, a family of 16 related TMs&lt;br /&gt;
* {{TM|1RB1RE_1LC1LD_---1LA_1LB1LE_0RF0RA_1LD1RF}}&lt;br /&gt;
* {{TM|1RB0RE_1LC1LD_0RA0LD_1LB0LA_1RF1RA_---1LB}}&lt;br /&gt;
* {{TM|1RB0LC_0LC0RF_1RD1LC_0RA1LE_---0LD_1LF1LA}}&lt;br /&gt;
* {{TM|1RB0LC_1LC0RD_1LF1LA_1LB1RE_1RB1LE_---0LE}}&lt;br /&gt;
* {{TM|1RB---_0RC0RE_1RD1RF_1LE0LB_1RC0LD_1RC1RA}}&lt;br /&gt;
* {{TM|1RB0LD_1RC1RA_1LD0RB_1LE1LA_1RF0RC_---1RE}}&lt;br /&gt;
&lt;br /&gt;
Although {{TM|1RB1LE_0LC0LB_1RD1LC_1RD1RA_1RF0LA_---1RE}} behaves similarly to the probviously halting Cryptids, it is estimated to have a 3/5 chance of becoming a [[translated cycler]] and a 2/5 chance of halting.&lt;br /&gt;
&lt;br /&gt;
There are a few machines considered notable for their chaotic behaviour, but which have not been classified as Cryptids due to seemingly lacking a connection to any known open mathematical problems, such as Collatz-like problems.&lt;br /&gt;
&lt;br /&gt;
Potential Cryptids:&lt;br /&gt;
&lt;br /&gt;
* {{TM|1RB1RE_1LC0RA_0RD1LB_---1RC_1LF1RE_0LB0LE|undecided}}&lt;br /&gt;
* {{TM|1RB0LD_1LC0RA_1RA1LB_1LA1LE_1RF0LC_---0RE|undecided}}&lt;br /&gt;
* {{TM|1RB0RB_1LC1RE_1LF0LD_1RA1LD_1RC1RB_---1LC|undecided}}&lt;br /&gt;
&lt;br /&gt;
== Top Halters ==&lt;br /&gt;
Below is a table of the machines with the 10 highest known runtimes.&amp;lt;ref&amp;gt;Shawn Ligocki&#039;s list of 6-state, 2-symbol machines with large runtimes ([https://github.com/sligocki/busy-beaver/blob/main/Machines/bb/6x2.txt Link])&amp;lt;/ref&amp;gt; Their sigma scores are expressed using an extension of [[wikipedia:Knuth&#039;s_up-arrow_notation|Knuth&#039;s up-arrow notation]].&amp;lt;ref&amp;gt;Shawn Ligocki. 2022. [https://www.sligocki.com/2022/06/25/ext-up-notation.html &amp;quot;Extending Up-arrow Notation&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Top Known BB(6) Halters&lt;br /&gt;
!Standard format&lt;br /&gt;
!(approximate) Σ&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB1RA_1RC1RZ_1LD0RF_1RA0LE_0LD1RC_1RA0RE|halt}}&lt;br /&gt;
|2 ↑↑↑ 5&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB1LC_1LA1RE_0RD0LA_1RZ1LB_1LD0RF_0RD1RB|halt}}&lt;br /&gt;
|10 ↑↑ 11010000&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB0LD_1RC0RF_1LC1LA_0LE1RZ_1LF0RB_0RC0RE|halt}}&lt;br /&gt;
|10 ↑↑ 15.60465&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB0LF_1RC1RB_1LD0RA_1LB0LE_1RZ0LC_1LA1LF|halt}}&lt;br /&gt;
|10 ↑↑ 7.52390&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB0LF_1RC1RB_1LD0RA_1RF0LE_1RZ0LC_1LA1LF|halt}}&lt;br /&gt;
|10 ↑↑ 7.52390&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB0LF_1RC1RB_1LD0RA_1LF0LE_1RZ0LC_1LA1LF|halt}}&lt;br /&gt;
|10 ↑↑ 7.52390&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB1RC_1LC1RE_1LD0LB_1RE1LC_1LE0RF_1RZ1RA|halt}}&lt;br /&gt;
|10 ↑↑ 7.23619&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB1RA_1LC1LE_1RE0LD_1LC0LF_1RZ0RA_0RA0LB|halt}}&lt;br /&gt;
|10 ↑↑ 6.96745&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB0RF_1LC0RA_1RZ0LD_1LE1LD_1RB1RC_0LD0RE|halt}}&lt;br /&gt;
|10 ↑↑ 5.77573&lt;br /&gt;
|-&lt;br /&gt;
|{{TM|1RB0LA_1LC1LF_0LD0LC_0LE0LB_1RE0RA_1RZ1LD|halt}}&lt;br /&gt;
|10 ↑↑ 5.63534&lt;br /&gt;
|}&lt;br /&gt;
The runtimes are presumed to be about &amp;lt;math&amp;gt;\text{score}^2&amp;lt;/math&amp;gt; which is roughly indistinguishable in tetration notation.&lt;br /&gt;
&lt;br /&gt;
== Holdouts ==&lt;br /&gt;
[[File:BB6 num holdouts over time.png|thumb|Number of BB(6) holdouts over time]]&lt;br /&gt;
@mxdys&#039;s informal [[Holdouts lists|holdouts list]] has 2592 machines up to equivalence as of August 2025.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[[Category:BB Domains]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=3695</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=3695"/>
		<updated>2025-09-09T08:36:28Z</updated>

		<summary type="html">&lt;p&gt;Coda: Fix accidental n/m confusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Lazy Beaver]]&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state, m-symbol Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|see [[Lazy Beaver#Computed Values]]&lt;br /&gt;
|[[oeis:A337805|A337805 (for m=2)]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs and are grouped by their position in the [[wikipedia:Arithmetical_hierarchy|arithmetical hierarchy]].&lt;br /&gt;
&lt;br /&gt;
Note that when the bbchallenge community refers to BB(n, m), we mean the Max Shift function S(n, m) defined below (if m is omitted, it is set to 2 by default). Some literature may refer to the Max Score function Σ(n, m) by BB(n, m) instead.&lt;br /&gt;
&lt;br /&gt;
==== Π1 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|BB_SPACE(1,2)=2, BB_SPACE(2,2)=4, BB_SPACE(3,2)=7, BB_SPACE(4,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Blanking Busy Beaver]]&lt;br /&gt;
|BLB(n,m)&lt;br /&gt;
|The maximum number of steps that an n-state m-symbol Turing machine can make on an initially blank tape until it is blank again (halting or not)&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|BB_clean&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state 2-symbol Turing machine can make on an initially blank tape until it halts on a blank tape&lt;br /&gt;
|(see comments #75 and #77 [https://scottaaronson.blog/?p=5661 here])&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BB_ones&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of 1&#039;s that an n-state 2-symbol Turing machine can make in a row, before halting on a 0 next to it&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Size of the Runtime Spectrum&lt;br /&gt;
|&amp;lt;math&amp;gt;R(n)&amp;lt;/math&amp;gt;&lt;br /&gt;
|The number of distinct runtimes for a machine with a given number of symbols, for increasing number of states&lt;br /&gt;
|see &amp;quot;The Spectrum of Runtimes&amp;quot; in &amp;quot;[https://www.scottaaronson.com/papers/bb.pdf The Busy Beaver Frontier]&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver]]&lt;br /&gt;
|BBi(n)&lt;br /&gt;
|Maximum number of steps that an n-instruction Turing machine (allowing any number of states and symbols) can take on an initially blank tape before eventually halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A384629|A384629]]&lt;br /&gt;
|-&lt;br /&gt;
|Instruction-Limited Symbol Busy Beaver&lt;br /&gt;
|Σi(n)&lt;br /&gt;
|Maximum number of non-blank symbols that an n-instruction Turing machine (allowing any number of states and symbols) can leave on an initially blank tape before eventually halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A384766|A384766]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Π2 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver#Beeping Booping Busy Beavers|Beeping Booping busy beaver]]&lt;br /&gt;
|BBBB(n)&lt;br /&gt;
|&lt;br /&gt;
|BBBB(1) = 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Yet ungrouped ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|Maximum space&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
* Any of the above for machines with more than one tape, or tapes with more dimensions (2d grid, 3d, n-d...)&lt;br /&gt;
* Machines with a finite tape, or a circular one of a certain length&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;br /&gt;
[[Category:Functions]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=3694</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=3694"/>
		<updated>2025-09-09T08:32:14Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Computable Sequences */ Link to Lazy Beaver value table on Wiki instead of redundantly replicating the values on the Sequences page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Lazy Beaver]]&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state, m-symbol Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|see [[Lazy Beaver#Computed Values]]&lt;br /&gt;
|[[oeis:A337805|A337805 (for n=2)]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs and are grouped by their position in the [[wikipedia:Arithmetical_hierarchy|arithmetical hierarchy]].&lt;br /&gt;
&lt;br /&gt;
Note that when the bbchallenge community refers to BB(n, m), we mean the Max Shift function S(n, m) defined below (if m is omitted, it is set to 2 by default). Some literature may refer to the Max Score function Σ(n, m) by BB(n, m) instead.&lt;br /&gt;
&lt;br /&gt;
==== Π1 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|BB_SPACE(1,2)=2, BB_SPACE(2,2)=4, BB_SPACE(3,2)=7, BB_SPACE(4,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Blanking Busy Beaver]]&lt;br /&gt;
|BLB(n,m)&lt;br /&gt;
|The maximum number of steps that an n-state m-symbol Turing machine can make on an initially blank tape until it is blank again (halting or not)&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|BB_clean&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state 2-symbol Turing machine can make on an initially blank tape until it halts on a blank tape&lt;br /&gt;
|(see comments #75 and #77 [https://scottaaronson.blog/?p=5661 here])&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BB_ones&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of 1&#039;s that an n-state 2-symbol Turing machine can make in a row, before halting on a 0 next to it&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Size of the Runtime Spectrum&lt;br /&gt;
|&amp;lt;math&amp;gt;R(n)&amp;lt;/math&amp;gt;&lt;br /&gt;
|The number of distinct runtimes for a machine with a given number of symbols, for increasing number of states&lt;br /&gt;
|see &amp;quot;The Spectrum of Runtimes&amp;quot; in &amp;quot;[https://www.scottaaronson.com/papers/bb.pdf The Busy Beaver Frontier]&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[Instruction-Limited Busy Beaver]]&lt;br /&gt;
|BBi(n)&lt;br /&gt;
|Maximum number of steps that an n-instruction Turing machine (allowing any number of states and symbols) can take on an initially blank tape before eventually halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A384629|A384629]]&lt;br /&gt;
|-&lt;br /&gt;
|Instruction-Limited Symbol Busy Beaver&lt;br /&gt;
|Σi(n)&lt;br /&gt;
|Maximum number of non-blank symbols that an n-instruction Turing machine (allowing any number of states and symbols) can leave on an initially blank tape before eventually halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A384766|A384766]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Π2 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver#Beeping Booping Busy Beavers|Beeping Booping busy beaver]]&lt;br /&gt;
|BBBB(n)&lt;br /&gt;
|&lt;br /&gt;
|BBBB(1) = 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Yet ungrouped ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|Maximum space&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
* Any of the above for machines with more than one tape, or tapes with more dimensions (2d grid, 3d, n-d...)&lt;br /&gt;
* Machines with a finite tape, or a circular one of a certain length&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;br /&gt;
[[Category:Functions]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=2713</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=2713"/>
		<updated>2025-08-03T19:50:54Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Code */ Mention that the values do not overflow, also that the values have been added to the OEIS and link to the sequences&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is a [[BB(6)]] [[Cryptid]]. Its pseudo-random behaviour was first reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after. It was named after the 2-state, 5-symbol [[Turing machine]] called [[Hydra]] for sharing many similarities to it.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Antihydra is known to not generate Sturmian words&amp;lt;ref&amp;gt;DUBICKAS A. ON INTEGER SEQUENCES GENERATED BY LINEAR MAPS. &#039;&#039;Glasgow Mathematical Journal&#039;&#039;. 2009;51(2):243-252. doi:[https://doi.org/10.1017/S0017089508004655 10.1017/S0017089508004655]&amp;lt;/ref&amp;gt; (Corollary 4).&lt;br /&gt;
&amp;lt;table style=&amp;quot;margin: auto; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 200px;&amp;quot;&amp;gt;[[File:Antihydra-depiction.png|200px]]&amp;lt;br&amp;gt;Artistic depiction of Antihydra by Jadeix&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
! !!0!!1&lt;br /&gt;
|-&lt;br /&gt;
!A&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!B&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!C&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!D&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!E&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!F&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
The transition table of Antihydra.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 220px;&amp;quot;&amp;gt;[[File:Antihydra award.jpg|220px]]&amp;lt;br&amp;gt;A community trophy - to be awarded to the first person or group who solves the Antihydra problem&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
In effect, the halting problem for Antihydra is about whether repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor+2&amp;lt;/math&amp;gt; will at some point produce more odd values of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; than twice the number of even values.&lt;br /&gt;
&lt;br /&gt;
These rules can be modified to use the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor&amp;lt;/math&amp;gt;, or the [[Hydra function]], which strengthens Antihydra&#039;s similarities to Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values resembles a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python program implements the abstracted behavior of the Antihydra. Proving whether it halts or not would also solve the Antihydra problem:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Current value of the iterated Hydra function starting with initial value 8 (the values do not overflow)&lt;br /&gt;
h = 8&lt;br /&gt;
# (Collatz-like) condition counter that keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
c = 0&lt;br /&gt;
# If c equals -1 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while c != -1:&lt;br /&gt;
    # If h is even, add 2 to c so even numbers count twice&lt;br /&gt;
    if h % 2 == 0:&lt;br /&gt;
        c += 2&lt;br /&gt;
    else:&lt;br /&gt;
        c -= 1&lt;br /&gt;
    # Add the current hydra value divided by two (integer division, rounding down) to itself (Hydra function)&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (h &amp;gt;&amp;gt; 1)&lt;br /&gt;
    h += h//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The variable values of this iteration have been put into the On-Line Encyclopedia of Integer Sequences (OEIS):&lt;br /&gt;
&lt;br /&gt;
* Hydra function values with Antihydra&#039;s starting value 8: https://oeis.org/A386792&lt;br /&gt;
* Antihydra&#039;s condition values: https://oeis.org/A385902&lt;br /&gt;
&lt;br /&gt;
Fast [[Hydra]]/Antihydra simulation code by Greg Kuperberg (who said it could be made faster using FLINT):&amp;lt;syntaxhighlight lang=&amp;quot;python2&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Python script to demonstrate almost linear time hydra simulation&lt;br /&gt;
# using fast multiplication. &lt;br /&gt;
# by Greg Kuperberg&lt;br /&gt;
&lt;br /&gt;
import time&lt;br /&gt;
from gmpy2 import mpz,bit_mask&lt;br /&gt;
&lt;br /&gt;
# Straight computation of t steps of hydra&lt;br /&gt;
def simple(n,t):&lt;br /&gt;
    for s in range(t): n += n&amp;gt;&amp;gt;1&lt;br /&gt;
    return n&lt;br /&gt;
&lt;br /&gt;
# Accelerated computation of 2**e steps of hydra&lt;br /&gt;
def hydra(n,e):&lt;br /&gt;
    if e &amp;lt; 9: return simple(n,1&amp;lt;&amp;lt;e)&lt;br /&gt;
    t = 1&amp;lt;&amp;lt;(e-1)&lt;br /&gt;
    (p3t,m) = (mpz(3)**t,bit_mask(t))&lt;br /&gt;
    n = p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
    return p3t*(n&amp;gt;&amp;gt;t) + hydra(n&amp;amp;m,e-1)&lt;br /&gt;
&lt;br /&gt;
def elapsed():&lt;br /&gt;
    (last,elapsed.mark) = (elapsed.mark,time.process_time())&lt;br /&gt;
    return elapsed.mark-last&lt;br /&gt;
elapsed.mark = 0&lt;br /&gt;
&lt;br /&gt;
(n,e) = (mpz(3),25)&lt;br /&gt;
&lt;br /&gt;
elapsed()&lt;br /&gt;
print(&#039;hydra:  steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
    % (1&amp;lt;&amp;lt;e,hash(hydra(n,e)),elapsed()))&lt;br /&gt;
&lt;br /&gt;
# Quadratic time algorithm for comparison&lt;br /&gt;
# print(&#039;simple: steps=%d hash=%016x time=%.6fs&#039;&lt;br /&gt;
#     % (1&amp;lt;&amp;lt;e,hash(simple(n,1&amp;lt;&amp;lt;e)),elapsed()))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]][[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1876</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1876"/>
		<updated>2025-05-01T16:39:20Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Code */ Rename code variables to h and c to make the names for meaningful&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is a [[BB(6)]] [[Cryptid]]. Its pseudo-random behaviour was first reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after. It was named after the 2-state, 5-symbol [[Turing machine]] called [[Hydra]] for sharing many similarities to it.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Antihydra is known to not generate Sturmian words&amp;lt;ref&amp;gt;DUBICKAS A. ON INTEGER SEQUENCES GENERATED BY LINEAR MAPS. &#039;&#039;Glasgow Mathematical Journal&#039;&#039;. 2009;51(2):243-252. doi:10.1017/S0017089508004655&amp;lt;/ref&amp;gt; (Corollary 4).&lt;br /&gt;
&amp;lt;table style=&amp;quot;margin: auto; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 200px;&amp;quot;&amp;gt;[[File:Antihydra-depiction.png|200px]]&amp;lt;br&amp;gt;Artistic depiction of Antihydra by Jadeix&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
! !!0!!1&lt;br /&gt;
|-&lt;br /&gt;
!A&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!B&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!C&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!D&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!E&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!F&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
The transition table of Antihydra.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 220px;&amp;quot;&amp;gt;[[File:Antihydra award.jpg|220px]]&amp;lt;br&amp;gt;A community trophy - to be awarded to the first person or group who solves the Antihydra problem&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
In effect, the halting problem for Antihydra is about whether repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor+2&amp;lt;/math&amp;gt; will at some point produce more odd values of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; than twice the number of even values.&lt;br /&gt;
&lt;br /&gt;
These rules can be modified to use the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor&amp;lt;/math&amp;gt;, or the [[Hydra function]], which strengthens Antihydra&#039;s similarities to Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values resembles a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python program implements the abstracted behavior of the Antihydra. Proving whether it halts or not would also solve the Antihydra problem:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Current value of the iterated Hydra function starting with initial value 8&lt;br /&gt;
h = 8&lt;br /&gt;
# (Collatz-like) condition counter that keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
c = 0&lt;br /&gt;
# If c equals -1 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while c != -1:&lt;br /&gt;
    # If h is even, add 2 to c so even numbers count twice&lt;br /&gt;
    if h % 2 == 0:&lt;br /&gt;
        c += 2&lt;br /&gt;
    else:&lt;br /&gt;
        c -= 1&lt;br /&gt;
    # Add the current hydra value divided by two (integer division, rounding down) to itself (Hydra function)&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (h &amp;gt;&amp;gt; 1)&lt;br /&gt;
    h += h//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]][[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Talk:Antihydra&amp;diff=1868</id>
		<title>Talk:Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Talk:Antihydra&amp;diff=1868"/>
		<updated>2025-04-30T15:09:53Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Variable Naming Conventions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Variable Naming Conventions ==&lt;br /&gt;
I noticed that the usage of the variables &#039;a&#039; and &#039;b&#039; in this article are opposite to how they are defined in other sources. Can we modify this article to make it more consistent? [[User:Peacemaker II|Peacemaker II]] ([[User talk:Peacemaker II|talk]]) 00:36, 30 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
Agreeing to the above that renaming the variables in this article would align it to most other sources and also proposing naming these variables h (*h*ydra) and c ((*c*ollatz-like) *c*ondition *c*ounter) instead for easier remembering [[User:Coda|Coda]] ([[User talk:Coda|talk]]) 00:57, 30 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I&#039;ll change the article to use the modified variable names. You are referring to *h* instead of *b* and *c* instead of *a*, right? [[User:MrSolis|MrSolis]] ([[User:MrSolis|talk]]) 15:02, 30 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Yes, a-&amp;gt;c and b-&amp;gt;h in this article. h being the always increasing current hydra function value. It would probably also be a good idea to agree on a standard order of these two (h first?) [[User:Coda|Coda]] ([[User talk:Coda|talk]]) 15:07, 30 April 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Talk:Antihydra&amp;diff=1865</id>
		<title>Talk:Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Talk:Antihydra&amp;diff=1865"/>
		<updated>2025-04-30T00:58:30Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Variable Naming Conventions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Variable Naming Conventions ==&lt;br /&gt;
I noticed that the usage of the variables &#039;a&#039; and &#039;b&#039; in this article are opposite to how they are defined in other sources. Can we modify this article to make it more consistent? [[User:Peacemaker II|Peacemaker II]] ([[User talk:Peacemaker II|talk]]) 00:36, 30 April 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
Agreeing to the above that renaming the variables in this article would align it to most other sources and also proposing naming these variables h (*h*ydra) and c ((*c*ollatz-like) *c*ondition *c*ounter) instead for easier remembering [[User:Coda|Coda]] ([[User talk:Coda|talk]]) 00:57, 30 April 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Hydra_function&amp;diff=1833</id>
		<title>Hydra function</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Hydra_function&amp;diff=1833"/>
		<updated>2025-04-23T10:46:17Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Coding the Hydra and Antihydra problems using the Hydra function */ remove accidental new line&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Hydra Spiral.png|thumb|185px|A spiral-like figure that gives the first few terms of the Hydra sequences with initial values 2, 5, 8, 11, 14, and 17.]]&lt;br /&gt;
The &#039;&#039;&#039;Hydra function&#039;&#039;&#039; is a [[Collatz-like]] function defined as:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\textstyle H(n)\equiv n+\big\lfloor\frac{1}{2}n\big\rfloor=\Big\lfloor\frac{3}{2}n\Big\rfloor=\begin{cases}&lt;br /&gt;
\frac{3n}{2}&amp;amp;\text{if }n\equiv0\pmod{2},\\&lt;br /&gt;
\frac{3n-1}{2}&amp;amp;\text{if }n\equiv1\pmod{2}.\\&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
It is named as such because of its connection to the unsolved halting problems for the [[Cryptids]] [[Hydra]] and [[Antihydra]]. Due to its simplicity, simulations for both of these [[Turing machines]] utilize this function instead of what can initially be proven.&lt;br /&gt;
== Relationship to Hydra and Antihydra problems==&lt;br /&gt;
Using the Hydra function, we can obtain simplified rules for Hydra and Antihydra:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C_H(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^{3(a-2)}\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{20}&amp;amp;C_H(3,0),\\&lt;br /&gt;
C_H(2a,0)&amp;amp;\xrightarrow{54a^2-48a-2}&amp;amp;0^\infty\;3^{9a-8}\;1\;\textrm{A&amp;gt;}\;2\;0^\infty,\\&lt;br /&gt;
C_H(2a,b+1)&amp;amp;\xrightarrow{54a^2-39a-5}&amp;amp;C_H(3a,b),\\&lt;br /&gt;
C_H(2a+1,b)&amp;amp;\xrightarrow{4b+54a^2-3a+4}&amp;amp;C_H(3a+1,b+2).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A_H(a,b):=0^\infty\;1^a\;0\;1^{b-4}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{11}&amp;amp;A_H(0,8),\\&lt;br /&gt;
A_H(a,2b)&amp;amp; \xrightarrow{2a+3b^2-1}&amp;amp; A_H(a+2,3b),\\&lt;br /&gt;
A_H(0,2b+1)&amp;amp;\xrightarrow{3b^2-3b-7}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b-6}\;0^\infty,\\&lt;br /&gt;
A_H(a+1,2b+1)&amp;amp;\xrightarrow{3b^2-7}&amp;amp; A_H(a,3b+1).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Recall the high-level rules for Hydra and Antihydra:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^a\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{20}&amp;amp;C(3,0),\\&lt;br /&gt;
C(2a,0)&amp;amp;\xrightarrow{6a^2+20a+4}&amp;amp;0^\infty\;3^{3a+1}\;1\;\textrm{A&amp;gt;}\;2\;0^\infty,\\&lt;br /&gt;
C(2a,b+1)&amp;amp;\xrightarrow{6a^2+23a+10}&amp;amp;C(3a+3,b),\\&lt;br /&gt;
C(2a+1,b)&amp;amp;\xrightarrow{4b+6a^2+23a+26}&amp;amp;C(3a+3,b+2).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{11}&amp;amp;A(0,4),\\&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Already, both machines appear to be very similar. They have one parameter that increases exponentially with growth factor &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; and another that takes a pseudo-random walk. Below, the exponentially increasing variables are described by integer sequences:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_0=3,a_{n+1}=\begin{cases}\frac{3a_n+6}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+3}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_0=4,a_{n+1}=\begin{cases}\frac{3a_n+4}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+3}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This will make demonstrating the transformation easier. Now we will define a new integer sequence based on the old one and discover the recursive rules for that sequence. This new sequence is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;b_n=\frac{1}{3}a_n+2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_n=a_n+4&amp;lt;/math&amp;gt; for Hydra and Antihydra respectively. We start by using &amp;lt;math&amp;gt;b_{n+1}&amp;lt;/math&amp;gt; instead and substituting &amp;lt;math&amp;gt;a_{n+1}&amp;lt;/math&amp;gt; for its recursive formula. By doing so, we get:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{a_n+6}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{a_n+5}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3a_n+12}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+11}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
After that, we can substitute &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; for its solution in terms of &amp;lt;math&amp;gt;b_n&amp;lt;/math&amp;gt;. What results is the following:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{3(b_n-2)+6}{2}&amp;amp;\text{if }3(b_n-2)\equiv0\pmod{2}\\\frac{3(b_n-2)+5}{2}&amp;amp;\text{if }3(b_n-2)\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3(b_n-4)+12}{2}&amp;amp;\text{if }b_n-4\equiv0\pmod{2}\\\frac{3(b_n-4)+11}{2}&amp;amp;\text{if }b_n-4\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The &amp;lt;math&amp;gt;\text{if}&amp;lt;/math&amp;gt; statements amount to checking if &amp;lt;math&amp;gt;b_n&amp;lt;/math&amp;gt; is even or odd. After simplifying, we are done:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{3b_n}{2}&amp;amp;\text{if }b_n\equiv0\pmod{2}\\\frac{3b_n-1}{2}&amp;amp;\text{if }b_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3b_n}{2}&amp;amp;\text{if }b_n\equiv0\pmod{2}\\\frac{3b_n-1}{2}&amp;amp;\text{if }b_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Now that we have demonstrated a strong similarity in the behaviour of both Turing machines, we can return to using the high-level rules. Doing that while considering the step counts yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Under these rules, the halting problem for Hydra is about whether repeatedly applying the function &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=3&amp;lt;/math&amp;gt;, will eventually generate more even terms than twice the number of odd terms. Similarly, Antihydra halts if and only if repeatedly applying &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;, will eventually generate more odd terms than twice the number of even terms.&lt;br /&gt;
&lt;br /&gt;
=== Coding the Hydra and Antihydra problems using the Hydra function ===&lt;br /&gt;
Paired with the corresponding even/odd criterion as loop halting condition (implemented as a counter variable) and initial Hydra function value, the Hydra function definition can be used to write computer programs that simulate the abstracted behavior of the Hydra and Antihydra Turing machines. The following Python program is a Hydra simulator:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# &#039;a&#039; and &#039;b&#039; fulfill the same purpose as in the Hydra rules:&lt;br /&gt;
# The current hydra function value&lt;br /&gt;
a = 3&lt;br /&gt;
# The even/odd condition counter&lt;br /&gt;
b = 0&lt;br /&gt;
# As long as Hydra has not halted, &#039;b&#039; remains greater than -1.&lt;br /&gt;
while b != -1:&lt;br /&gt;
    # If &#039;a&#039; is even, decrement &#039;b&#039;, otherwise increase &#039;b&#039; by 2.&lt;br /&gt;
    if a % 2 == 0:&lt;br /&gt;
        b -= 1&lt;br /&gt;
    else:&lt;br /&gt;
        b += 2&lt;br /&gt;
    # This performs one step of the Hydra function H(a) = a + floor(a/2).&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (a &amp;gt;&amp;gt; 1)&lt;br /&gt;
    a += a//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Replacing &amp;lt;code&amp;gt;a = 3&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;a = 8&amp;lt;/code&amp;gt; and swapping &amp;lt;code&amp;gt;b -= 1&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;b += 2&amp;lt;/code&amp;gt; turns this program into an Antihydra simulator.&lt;br /&gt;
&lt;br /&gt;
Determining whether these programs halt or not (and if so, after how many loop iterations) would resolve these open problems.&lt;br /&gt;
==Properties==&lt;br /&gt;
The Hydra function can be rewritten as follows:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
H(2n)&amp;amp;=&amp;amp;3n,\\&lt;br /&gt;
H(2n+1)&amp;amp;=&amp;amp;3n+1.\\&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Now assume that for some positive integer &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and every odd integer &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;H^s(2^st)=3^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H^s(2^st+1)=3^st+1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;H^i(n)&amp;lt;/math&amp;gt; is function iteration. Notice that we can write &amp;lt;math&amp;gt;2^{s+1}t=2\cdot2^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;2^{s+1}t+1=2\cdot2^st+1&amp;lt;/math&amp;gt;, so if we apply &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; to these numbers, we get &amp;lt;math&amp;gt;H(2\cdot2^st)=3\cdot 2^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H(2\cdot2^st+1)=3\cdot2^st+1&amp;lt;/math&amp;gt;. Now, if we apply &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; to these numbers &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; times, we get &amp;lt;math&amp;gt;H^{s+1}\big(2^{s+1}t\big)=H^s(2^s\cdot3t)=3^{s+1}t&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H^{s+1}\big(2^{s+1}t+1\big)=H^s(2^s\cdot3t+1)=3^{s+1}t+1&amp;lt;/math&amp;gt;. Therefore, by mathematical induction we have proved the following formulas:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
H^s(2^st)&amp;amp;=&amp;amp;3^st,\\&lt;br /&gt;
H^s(2^st+1)&amp;amp;=&amp;amp;3^st+1.\\&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This optimization can be directly applied to the high-level rules for Hydra and Antihydra, producing this result:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C_H(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^{3(a-2)}\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
C_H(2^st,b+s)&amp;amp;\xrightarrow{f_1(s,t)}&amp;amp;C_H(3^st,b),\\&lt;br /&gt;
C_H(2^st+1,b)&amp;amp;\xrightarrow{f_2(s,t,b)}&amp;amp;C_H(3^st+1,b+2s),\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_1(s,t)=\frac{3t(3^s-2^s)(18(3^s+2^s)t-65)}{5}-5s&amp;lt;/math&amp;gt; and &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_2(s,t,b)=(b+s)4s+\frac{3t(3^s-2^s)(18(3^s+2^s)t-5)}{5}&amp;lt;/math&amp;gt;.&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A_H(a,b):=0^\infty\;1^a\;0\;1^{b-4}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A_H(a,2^st)&amp;amp; \xrightarrow{f_3(s,t,a)}&amp;amp; A_H(a+2s,3^st),\\&lt;br /&gt;
A_H(a+s,2^st+1)&amp;amp;\xrightarrow{f_4(s,t)}&amp;amp; A_H(a,3^st+1),\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_3(s,t,a)=(2a-3+2s)s+\frac{3t^2(9^s-4^s)}{5}&amp;lt;/math&amp;gt; and &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_4(s,t)=\frac{3t^2(9^s-4^s)}{5}-7s&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
== Visualizations ==&lt;br /&gt;
The four images below depict the first 1000 values of four Hydra sequences with different initial values. Each row of pixels shows a number in binary on the right and its parity on the left (blue for even, red for odd):&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
File:HydraFunction-StartingValue2.png|Starting value 2. There are 492 even numbers and 508 odd numbers.&lt;br /&gt;
File:HydraFunction-StartingValue5.png|Starting value 5. There are 497 even numbers and 503 odd numbers.&lt;br /&gt;
File:Antihydra increasing value.png|Starting value 8. There are 499 even numbers and 501 odd numbers.&lt;br /&gt;
File:HydraFunction-StartingValue11.png|Starting value 11. There are 481 even numbers and 519 odd numbers.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Hydra_function&amp;diff=1832</id>
		<title>Hydra function</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Hydra_function&amp;diff=1832"/>
		<updated>2025-04-23T10:45:03Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Coding the Hydra and Antihydra problems using the Hydra function */ Improve wording around condition counter and explain meaning of program halting status&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Hydra Spiral.png|thumb|185px|A spiral-like figure that gives the first few terms of the Hydra sequences with initial values 2, 5, 8, 11, 14, and 17.]]&lt;br /&gt;
The &#039;&#039;&#039;Hydra function&#039;&#039;&#039; is a [[Collatz-like]] function defined as:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\textstyle H(n)\equiv n+\big\lfloor\frac{1}{2}n\big\rfloor=\Big\lfloor\frac{3}{2}n\Big\rfloor=\begin{cases}&lt;br /&gt;
\frac{3n}{2}&amp;amp;\text{if }n\equiv0\pmod{2},\\&lt;br /&gt;
\frac{3n-1}{2}&amp;amp;\text{if }n\equiv1\pmod{2}.\\&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
It is named as such because of its connection to the unsolved halting problems for the [[Cryptids]] [[Hydra]] and [[Antihydra]]. Due to its simplicity, simulations for both of these [[Turing machines]] utilize this function instead of what can initially be proven.&lt;br /&gt;
== Relationship to Hydra and Antihydra problems==&lt;br /&gt;
Using the Hydra function, we can obtain simplified rules for Hydra and Antihydra:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C_H(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^{3(a-2)}\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{20}&amp;amp;C_H(3,0),\\&lt;br /&gt;
C_H(2a,0)&amp;amp;\xrightarrow{54a^2-48a-2}&amp;amp;0^\infty\;3^{9a-8}\;1\;\textrm{A&amp;gt;}\;2\;0^\infty,\\&lt;br /&gt;
C_H(2a,b+1)&amp;amp;\xrightarrow{54a^2-39a-5}&amp;amp;C_H(3a,b),\\&lt;br /&gt;
C_H(2a+1,b)&amp;amp;\xrightarrow{4b+54a^2-3a+4}&amp;amp;C_H(3a+1,b+2).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A_H(a,b):=0^\infty\;1^a\;0\;1^{b-4}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{11}&amp;amp;A_H(0,8),\\&lt;br /&gt;
A_H(a,2b)&amp;amp; \xrightarrow{2a+3b^2-1}&amp;amp; A_H(a+2,3b),\\&lt;br /&gt;
A_H(0,2b+1)&amp;amp;\xrightarrow{3b^2-3b-7}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b-6}\;0^\infty,\\&lt;br /&gt;
A_H(a+1,2b+1)&amp;amp;\xrightarrow{3b^2-7}&amp;amp; A_H(a,3b+1).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Recall the high-level rules for Hydra and Antihydra:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^a\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{20}&amp;amp;C(3,0),\\&lt;br /&gt;
C(2a,0)&amp;amp;\xrightarrow{6a^2+20a+4}&amp;amp;0^\infty\;3^{3a+1}\;1\;\textrm{A&amp;gt;}\;2\;0^\infty,\\&lt;br /&gt;
C(2a,b+1)&amp;amp;\xrightarrow{6a^2+23a+10}&amp;amp;C(3a+3,b),\\&lt;br /&gt;
C(2a+1,b)&amp;amp;\xrightarrow{4b+6a^2+23a+26}&amp;amp;C(3a+3,b+2).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{11}&amp;amp;A(0,4),\\&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Already, both machines appear to be very similar. They have one parameter that increases exponentially with growth factor &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; and another that takes a pseudo-random walk. Below, the exponentially increasing variables are described by integer sequences:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_0=3,a_{n+1}=\begin{cases}\frac{3a_n+6}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+3}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_0=4,a_{n+1}=\begin{cases}\frac{3a_n+4}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+3}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This will make demonstrating the transformation easier. Now we will define a new integer sequence based on the old one and discover the recursive rules for that sequence. This new sequence is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;b_n=\frac{1}{3}a_n+2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_n=a_n+4&amp;lt;/math&amp;gt; for Hydra and Antihydra respectively. We start by using &amp;lt;math&amp;gt;b_{n+1}&amp;lt;/math&amp;gt; instead and substituting &amp;lt;math&amp;gt;a_{n+1}&amp;lt;/math&amp;gt; for its recursive formula. By doing so, we get:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{a_n+6}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{a_n+5}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3a_n+12}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+11}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
After that, we can substitute &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; for its solution in terms of &amp;lt;math&amp;gt;b_n&amp;lt;/math&amp;gt;. What results is the following:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{3(b_n-2)+6}{2}&amp;amp;\text{if }3(b_n-2)\equiv0\pmod{2}\\\frac{3(b_n-2)+5}{2}&amp;amp;\text{if }3(b_n-2)\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3(b_n-4)+12}{2}&amp;amp;\text{if }b_n-4\equiv0\pmod{2}\\\frac{3(b_n-4)+11}{2}&amp;amp;\text{if }b_n-4\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The &amp;lt;math&amp;gt;\text{if}&amp;lt;/math&amp;gt; statements amount to checking if &amp;lt;math&amp;gt;b_n&amp;lt;/math&amp;gt; is even or odd. After simplifying, we are done:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{3b_n}{2}&amp;amp;\text{if }b_n\equiv0\pmod{2}\\\frac{3b_n-1}{2}&amp;amp;\text{if }b_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3b_n}{2}&amp;amp;\text{if }b_n\equiv0\pmod{2}\\\frac{3b_n-1}{2}&amp;amp;\text{if }b_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Now that we have demonstrated a strong similarity in the behaviour of both Turing machines, we can return to using the high-level rules. Doing that while considering the step counts yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Under these rules, the halting problem for Hydra is about whether repeatedly applying the function &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=3&amp;lt;/math&amp;gt;, will eventually generate more even terms than twice the number of odd terms. Similarly, Antihydra halts if and only if repeatedly applying &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;, will eventually generate more odd terms than twice the number of even terms.&lt;br /&gt;
&lt;br /&gt;
=== Coding the Hydra and Antihydra problems using the Hydra function ===&lt;br /&gt;
Paired with the corresponding even/odd criterion as loop halting condition (implemented as a counter variable) and initial Hydra function value, the Hydra function definition can be used to write computer programs that simulate the abstracted behavior of the Hydra and Antihydra Turing machines. The following Python program is a Hydra simulator:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# &#039;a&#039; and &#039;b&#039; fulfill the same purpose as in the Hydra rules:&lt;br /&gt;
# The current hydra function value&lt;br /&gt;
a = 3&lt;br /&gt;
# The even/odd condition counter&lt;br /&gt;
b = 0&lt;br /&gt;
# As long as Hydra has not halted, &#039;b&#039; remains greater than -1.&lt;br /&gt;
while b != -1:&lt;br /&gt;
    # If &#039;a&#039; is even, decrement &#039;b&#039;, otherwise increase &#039;b&#039; by 2.&lt;br /&gt;
    if a % 2 == 0:&lt;br /&gt;
        b -= 1&lt;br /&gt;
    else:&lt;br /&gt;
        b += 2&lt;br /&gt;
    # This performs one step of the Hydra function H(a) = a + floor(a/2).&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (a &amp;gt;&amp;gt; 1)&lt;br /&gt;
    a += a//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Replacing &amp;lt;code&amp;gt;a = 3&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;a = 8&amp;lt;/code&amp;gt; and swapping &amp;lt;code&amp;gt;b -= 1&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;b += 2&amp;lt;/code&amp;gt; turns this program into an Antihydra simulator.&lt;br /&gt;
&lt;br /&gt;
Determining whether these programs halt or not (and if so, after how many loop iterations) would resolve these open problems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
problems.&lt;br /&gt;
&lt;br /&gt;
==Properties==&lt;br /&gt;
The Hydra function can be rewritten as follows:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
H(2n)&amp;amp;=&amp;amp;3n,\\&lt;br /&gt;
H(2n+1)&amp;amp;=&amp;amp;3n+1.\\&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Now assume that for some positive integer &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and every odd integer &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;H^s(2^st)=3^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H^s(2^st+1)=3^st+1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;H^i(n)&amp;lt;/math&amp;gt; is function iteration. Notice that we can write &amp;lt;math&amp;gt;2^{s+1}t=2\cdot2^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;2^{s+1}t+1=2\cdot2^st+1&amp;lt;/math&amp;gt;, so if we apply &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; to these numbers, we get &amp;lt;math&amp;gt;H(2\cdot2^st)=3\cdot 2^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H(2\cdot2^st+1)=3\cdot2^st+1&amp;lt;/math&amp;gt;. Now, if we apply &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; to these numbers &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; times, we get &amp;lt;math&amp;gt;H^{s+1}\big(2^{s+1}t\big)=H^s(2^s\cdot3t)=3^{s+1}t&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H^{s+1}\big(2^{s+1}t+1\big)=H^s(2^s\cdot3t+1)=3^{s+1}t+1&amp;lt;/math&amp;gt;. Therefore, by mathematical induction we have proved the following formulas:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
H^s(2^st)&amp;amp;=&amp;amp;3^st,\\&lt;br /&gt;
H^s(2^st+1)&amp;amp;=&amp;amp;3^st+1.\\&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This optimization can be directly applied to the high-level rules for Hydra and Antihydra, producing this result:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C_H(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^{3(a-2)}\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
C_H(2^st,b+s)&amp;amp;\xrightarrow{f_1(s,t)}&amp;amp;C_H(3^st,b),\\&lt;br /&gt;
C_H(2^st+1,b)&amp;amp;\xrightarrow{f_2(s,t,b)}&amp;amp;C_H(3^st+1,b+2s),\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_1(s,t)=\frac{3t(3^s-2^s)(18(3^s+2^s)t-65)}{5}-5s&amp;lt;/math&amp;gt; and &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_2(s,t,b)=(b+s)4s+\frac{3t(3^s-2^s)(18(3^s+2^s)t-5)}{5}&amp;lt;/math&amp;gt;.&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A_H(a,b):=0^\infty\;1^a\;0\;1^{b-4}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A_H(a,2^st)&amp;amp; \xrightarrow{f_3(s,t,a)}&amp;amp; A_H(a+2s,3^st),\\&lt;br /&gt;
A_H(a+s,2^st+1)&amp;amp;\xrightarrow{f_4(s,t)}&amp;amp; A_H(a,3^st+1),\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_3(s,t,a)=(2a-3+2s)s+\frac{3t^2(9^s-4^s)}{5}&amp;lt;/math&amp;gt; and &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_4(s,t)=\frac{3t^2(9^s-4^s)}{5}-7s&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
== Visualizations ==&lt;br /&gt;
The four images below depict the first 1000 values of four Hydra sequences with different initial values. Each row of pixels shows a number in binary on the right and its parity on the left (blue for even, red for odd):&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
File:HydraFunction-StartingValue2.png|Starting value 2. There are 492 even numbers and 508 odd numbers.&lt;br /&gt;
File:HydraFunction-StartingValue5.png|Starting value 5. There are 497 even numbers and 503 odd numbers.&lt;br /&gt;
File:Antihydra increasing value.png|Starting value 8. There are 499 even numbers and 501 odd numbers.&lt;br /&gt;
File:HydraFunction-StartingValue11.png|Starting value 11. There are 481 even numbers and 519 odd numbers.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Hydra_function&amp;diff=1831</id>
		<title>Hydra function</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Hydra_function&amp;diff=1831"/>
		<updated>2025-04-23T10:03:07Z</updated>

		<summary type="html">&lt;p&gt;Coda: Emphasize the distinction between the Hydra function and -problems and add more code comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Hydra Spiral.png|thumb|185px|A spiral-like figure that gives the first few terms of the Hydra sequences with initial values 2, 5, 8, 11, 14, and 17.]]&lt;br /&gt;
The &#039;&#039;&#039;Hydra function&#039;&#039;&#039; is a [[Collatz-like]] function defined as:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\textstyle H(n)\equiv n+\big\lfloor\frac{1}{2}n\big\rfloor=\Big\lfloor\frac{3}{2}n\Big\rfloor=\begin{cases}&lt;br /&gt;
\frac{3n}{2}&amp;amp;\text{if }n\equiv0\pmod{2},\\&lt;br /&gt;
\frac{3n-1}{2}&amp;amp;\text{if }n\equiv1\pmod{2}.\\&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
It is named as such because of its connection to the unsolved halting problems for the [[Cryptids]] [[Hydra]] and [[Antihydra]]. Due to its simplicity, simulations for both of these [[Turing machines]] utilize this function instead of what can initially be proven.&lt;br /&gt;
== Relationship to Hydra and Antihydra problems==&lt;br /&gt;
Using the Hydra function, we can obtain simplified rules for Hydra and Antihydra:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C_H(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^{3(a-2)}\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{20}&amp;amp;C_H(3,0),\\&lt;br /&gt;
C_H(2a,0)&amp;amp;\xrightarrow{54a^2-48a-2}&amp;amp;0^\infty\;3^{9a-8}\;1\;\textrm{A&amp;gt;}\;2\;0^\infty,\\&lt;br /&gt;
C_H(2a,b+1)&amp;amp;\xrightarrow{54a^2-39a-5}&amp;amp;C_H(3a,b),\\&lt;br /&gt;
C_H(2a+1,b)&amp;amp;\xrightarrow{4b+54a^2-3a+4}&amp;amp;C_H(3a+1,b+2).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A_H(a,b):=0^\infty\;1^a\;0\;1^{b-4}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{11}&amp;amp;A_H(0,8),\\&lt;br /&gt;
A_H(a,2b)&amp;amp; \xrightarrow{2a+3b^2-1}&amp;amp; A_H(a+2,3b),\\&lt;br /&gt;
A_H(0,2b+1)&amp;amp;\xrightarrow{3b^2-3b-7}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b-6}\;0^\infty,\\&lt;br /&gt;
A_H(a+1,2b+1)&amp;amp;\xrightarrow{3b^2-7}&amp;amp; A_H(a,3b+1).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Recall the high-level rules for Hydra and Antihydra:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^a\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{20}&amp;amp;C(3,0),\\&lt;br /&gt;
C(2a,0)&amp;amp;\xrightarrow{6a^2+20a+4}&amp;amp;0^\infty\;3^{3a+1}\;1\;\textrm{A&amp;gt;}\;2\;0^\infty,\\&lt;br /&gt;
C(2a,b+1)&amp;amp;\xrightarrow{6a^2+23a+10}&amp;amp;C(3a+3,b),\\&lt;br /&gt;
C(2a+1,b)&amp;amp;\xrightarrow{4b+6a^2+23a+26}&amp;amp;C(3a+3,b+2).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{11}&amp;amp;A(0,4),\\&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Already, both machines appear to be very similar. They have one parameter that increases exponentially with growth factor &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; and another that takes a pseudo-random walk. Below, the exponentially increasing variables are described by integer sequences:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_0=3,a_{n+1}=\begin{cases}\frac{3a_n+6}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+3}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_0=4,a_{n+1}=\begin{cases}\frac{3a_n+4}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+3}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This will make demonstrating the transformation easier. Now we will define a new integer sequence based on the old one and discover the recursive rules for that sequence. This new sequence is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;b_n=\frac{1}{3}a_n+2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_n=a_n+4&amp;lt;/math&amp;gt; for Hydra and Antihydra respectively. We start by using &amp;lt;math&amp;gt;b_{n+1}&amp;lt;/math&amp;gt; instead and substituting &amp;lt;math&amp;gt;a_{n+1}&amp;lt;/math&amp;gt; for its recursive formula. By doing so, we get:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{a_n+6}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{a_n+5}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3a_n+12}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+11}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
After that, we can substitute &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; for its solution in terms of &amp;lt;math&amp;gt;b_n&amp;lt;/math&amp;gt;. What results is the following:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{3(b_n-2)+6}{2}&amp;amp;\text{if }3(b_n-2)\equiv0\pmod{2}\\\frac{3(b_n-2)+5}{2}&amp;amp;\text{if }3(b_n-2)\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3(b_n-4)+12}{2}&amp;amp;\text{if }b_n-4\equiv0\pmod{2}\\\frac{3(b_n-4)+11}{2}&amp;amp;\text{if }b_n-4\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The &amp;lt;math&amp;gt;\text{if}&amp;lt;/math&amp;gt; statements amount to checking if &amp;lt;math&amp;gt;b_n&amp;lt;/math&amp;gt; is even or odd. After simplifying, we are done:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{3b_n}{2}&amp;amp;\text{if }b_n\equiv0\pmod{2}\\\frac{3b_n-1}{2}&amp;amp;\text{if }b_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3b_n}{2}&amp;amp;\text{if }b_n\equiv0\pmod{2}\\\frac{3b_n-1}{2}&amp;amp;\text{if }b_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Now that we have demonstrated a strong similarity in the behaviour of both Turing machines, we can return to using the high-level rules. Doing that while considering the step counts yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Under these rules, the halting problem for Hydra is about whether repeatedly applying the function &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=3&amp;lt;/math&amp;gt;, will eventually generate more even terms than twice the number of odd terms. Similarly, Antihydra halts if and only if repeatedly applying &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;, will eventually generate more odd terms than twice the number of even terms.&lt;br /&gt;
&lt;br /&gt;
=== Coding the Hydra and Antihydra problems using the Hydra function ===&lt;br /&gt;
Paired with the corresponding even/odd condition counter, the Hydra function definition allows one to write computer programs that simulate the abstracted behavior of the Hydra and Antihydra Turing machines. The following Python program is a Hydra simulator:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# &#039;a&#039; and &#039;b&#039; fulfill the same purpose as in the Hydra rules:&lt;br /&gt;
# The current hydra function value&lt;br /&gt;
a = 3&lt;br /&gt;
# The even/odd condition counter&lt;br /&gt;
b = 0&lt;br /&gt;
# As long as Hydra has not halted, &#039;b&#039; remains greater than -1.&lt;br /&gt;
while b != -1:&lt;br /&gt;
    # If &#039;a&#039; is even, decrement &#039;b&#039;, otherwise increase &#039;b&#039; by 2.&lt;br /&gt;
    if a % 2 == 0:&lt;br /&gt;
        b -= 1&lt;br /&gt;
    else:&lt;br /&gt;
        b += 2&lt;br /&gt;
    # This performs one step of the Hydra function H(a) = a + floor(a/2).&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (a &amp;gt;&amp;gt; 1)&lt;br /&gt;
    a += a//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Replacing &amp;lt;code&amp;gt;a = 3&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;a = 8&amp;lt;/code&amp;gt; and swapping &amp;lt;code&amp;gt;b -= 1&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;b += 2&amp;lt;/code&amp;gt; turns this program into an Antihydra simulator.&lt;br /&gt;
==Properties==&lt;br /&gt;
The Hydra function can be rewritten as follows:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
H(2n)&amp;amp;=&amp;amp;3n,\\&lt;br /&gt;
H(2n+1)&amp;amp;=&amp;amp;3n+1.\\&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Now assume that for some positive integer &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and every odd integer &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;H^s(2^st)=3^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H^s(2^st+1)=3^st+1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;H^i(n)&amp;lt;/math&amp;gt; is function iteration. Notice that we can write &amp;lt;math&amp;gt;2^{s+1}t=2\cdot2^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;2^{s+1}t+1=2\cdot2^st+1&amp;lt;/math&amp;gt;, so if we apply &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; to these numbers, we get &amp;lt;math&amp;gt;H(2\cdot2^st)=3\cdot 2^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H(2\cdot2^st+1)=3\cdot2^st+1&amp;lt;/math&amp;gt;. Now, if we apply &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; to these numbers &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; times, we get &amp;lt;math&amp;gt;H^{s+1}\big(2^{s+1}t\big)=H^s(2^s\cdot3t)=3^{s+1}t&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H^{s+1}\big(2^{s+1}t+1\big)=H^s(2^s\cdot3t+1)=3^{s+1}t+1&amp;lt;/math&amp;gt;. Therefore, by mathematical induction we have proved the following formulas:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
H^s(2^st)&amp;amp;=&amp;amp;3^st,\\&lt;br /&gt;
H^s(2^st+1)&amp;amp;=&amp;amp;3^st+1.\\&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This optimization can be directly applied to the high-level rules for Hydra and Antihydra, producing this result:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C_H(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^{3(a-2)}\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
C_H(2^st,b+s)&amp;amp;\xrightarrow{f_1(s,t)}&amp;amp;C_H(3^st,b),\\&lt;br /&gt;
C_H(2^st+1,b)&amp;amp;\xrightarrow{f_2(s,t,b)}&amp;amp;C_H(3^st+1,b+2s),\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_1(s,t)=\frac{3t(3^s-2^s)(18(3^s+2^s)t-65)}{5}-5s&amp;lt;/math&amp;gt; and &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_2(s,t,b)=(b+s)4s+\frac{3t(3^s-2^s)(18(3^s+2^s)t-5)}{5}&amp;lt;/math&amp;gt;.&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A_H(a,b):=0^\infty\;1^a\;0\;1^{b-4}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A_H(a,2^st)&amp;amp; \xrightarrow{f_3(s,t,a)}&amp;amp; A_H(a+2s,3^st),\\&lt;br /&gt;
A_H(a+s,2^st+1)&amp;amp;\xrightarrow{f_4(s,t)}&amp;amp; A_H(a,3^st+1),\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_3(s,t,a)=(2a-3+2s)s+\frac{3t^2(9^s-4^s)}{5}&amp;lt;/math&amp;gt; and &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_4(s,t)=\frac{3t^2(9^s-4^s)}{5}-7s&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
== Visualizations ==&lt;br /&gt;
The four images below depict the first 1000 values of four Hydra sequences with different initial values. Each row of pixels shows a number in binary on the right and its parity on the left (blue for even, red for odd):&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
File:HydraFunction-StartingValue2.png|Starting value 2. There are 492 even numbers and 508 odd numbers.&lt;br /&gt;
File:HydraFunction-StartingValue5.png|Starting value 5. There are 497 even numbers and 503 odd numbers.&lt;br /&gt;
File:Antihydra increasing value.png|Starting value 8. There are 499 even numbers and 501 odd numbers.&lt;br /&gt;
File:HydraFunction-StartingValue11.png|Starting value 11. There are 481 even numbers and 519 odd numbers.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1830</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1830"/>
		<updated>2025-04-23T09:43:50Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Code */ Antihydra code comment correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is a [[BB(6)]] [[Cryptid]]. Its pseudo-random behaviour was first reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after. It was named after the 2-state, 5-symbol [[Turing machine]] called [[Hydra]] for sharing many similarities to it.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;margin: auto; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 200px;&amp;quot;&amp;gt;[[File:Antihydra-depiction.png|200px]]&amp;lt;br&amp;gt;Artistic depiction of Antihydra by Jadeix&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
! !!0!!1&lt;br /&gt;
|-&lt;br /&gt;
!A&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!B&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!C&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!D&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!E&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!F&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
The transition table of Antihydra.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 220px;&amp;quot;&amp;gt;[[File:Antihydra award.jpg|220px]]&amp;lt;br&amp;gt;A community trophy - to be awarded to the first person or group who solves the Antihydra problem&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
In effect, the halting problem for Antihydra is about whether repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor+2&amp;lt;/math&amp;gt; will at some point produce more odd values of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; than twice the number of even values.&lt;br /&gt;
&lt;br /&gt;
These rules can be modified to use the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor&amp;lt;/math&amp;gt;, or the [[Hydra function]], which strengthens Antihydra&#039;s similarities to Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values resembles a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python program implements the abstracted behavior of the Antihydra. Proving whether it halts or not would also solve the Antihydra problem:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
a = 1&lt;br /&gt;
# The iterated value&lt;br /&gt;
b = 8&lt;br /&gt;
# If a equals 0 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while a != 0:&lt;br /&gt;
    # If b is even, add 2 to a so even numbers count twice&lt;br /&gt;
    if b % 2 == 0:&lt;br /&gt;
        a += 2&lt;br /&gt;
    else:&lt;br /&gt;
        a -= 1&lt;br /&gt;
    # Add the number divided by two (integer division, rounding down) to itself (Hydra function)&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (a &amp;gt;&amp;gt; 1)&lt;br /&gt;
    b += b//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]][[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1829</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1829"/>
		<updated>2025-04-23T09:40:37Z</updated>

		<summary type="html">&lt;p&gt;Coda: Readd Antihydra Python code to avoid indirection&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is a [[BB(6)]] [[Cryptid]]. Its pseudo-random behaviour was first reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after. It was named after the 2-state, 5-symbol [[Turing machine]] called [[Hydra]] for sharing many similarities to it.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;margin: auto; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 200px;&amp;quot;&amp;gt;[[File:Antihydra-depiction.png|200px]]&amp;lt;br&amp;gt;Artistic depiction of Antihydra by Jadeix&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
! !!0!!1&lt;br /&gt;
|-&lt;br /&gt;
!A&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!B&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!C&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!D&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!E&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!F&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
The transition table of Antihydra.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 220px;&amp;quot;&amp;gt;[[File:Antihydra award.jpg|220px]]&amp;lt;br&amp;gt;A community trophy - to be awarded to the first person or group who solves the Antihydra problem&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
In effect, the halting problem for Antihydra is about whether repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor+2&amp;lt;/math&amp;gt; will at some point produce more odd values of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; than twice the number of even values.&lt;br /&gt;
&lt;br /&gt;
These rules can be modified to use the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor&amp;lt;/math&amp;gt;, or the [[Hydra function]], which strengthens Antihydra&#039;s similarities to Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values resembles a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python program implements the abstracted behavior of the Antihydra. Proving whether it halts or not would also solve the Antihydra problem:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
a = 1&lt;br /&gt;
# The iterated value&lt;br /&gt;
b = 8&lt;br /&gt;
# If a &amp;lt; 0 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while a != 0:&lt;br /&gt;
    # If b is even, add 2 to a so even numbers count twice&lt;br /&gt;
    if b % 2 == 0:&lt;br /&gt;
        a += 2&lt;br /&gt;
    else:&lt;br /&gt;
        a -= 1&lt;br /&gt;
    # Add the number divided by two (integer division, rounding down) to itself (Hydra function)&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (a &amp;gt;&amp;gt; 1)&lt;br /&gt;
    b += b//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]][[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Hydra_function&amp;diff=1814</id>
		<title>Hydra function</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Hydra_function&amp;diff=1814"/>
		<updated>2025-04-15T13:17:46Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Coding the Hydra function */ Note that integer division by 2 is equivalent to a right bit shift, which is relevant for the Visualizations below&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Hydra Spiral.png|thumb|185px|A spiral-like figure that gives the first few terms of the Hydra sequences with initial values 2, 5, 8, 11, 14, and 17.]]&lt;br /&gt;
The &#039;&#039;&#039;Hydra function&#039;&#039;&#039; is a [[Collatz-like]] function defined as:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\textstyle H(n)\equiv n+\big\lfloor\frac{1}{2}n\big\rfloor=\Big\lfloor\frac{3}{2}n\Big\rfloor=\begin{cases}&lt;br /&gt;
\frac{3n}{2}&amp;amp;\text{if }n\equiv0\pmod{2},\\&lt;br /&gt;
\frac{3n-1}{2}&amp;amp;\text{if }n\equiv1\pmod{2}.\\&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
It is named as such because of its connection to the unsolved halting problems for the [[Cryptids]] [[Hydra]] and [[Antihydra]]. Due to its simplicity, simulations for both of these [[Turing machines]] utilize this function instead of what can initially be proven.&lt;br /&gt;
== Relationship to Hydra and Antihydra==&lt;br /&gt;
Using the Hydra function, we can obtain simplified rules for Hydra and Antihydra:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C_H(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^{3(a-2)}\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{20}&amp;amp;C_H(3,0),\\&lt;br /&gt;
C_H(2a,0)&amp;amp;\xrightarrow{54a^2-48a-2}&amp;amp;0^\infty\;3^{9a-8}\;1\;\textrm{A&amp;gt;}\;2\;0^\infty,\\&lt;br /&gt;
C_H(2a,b+1)&amp;amp;\xrightarrow{54a^2-39a-5}&amp;amp;C_H(3a,b),\\&lt;br /&gt;
C_H(2a+1,b)&amp;amp;\xrightarrow{4b+54a^2-3a+4}&amp;amp;C_H(3a+1,b+2).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A_H(a,b):=0^\infty\;1^a\;0\;1^{b-4}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{11}&amp;amp;A_H(0,8),\\&lt;br /&gt;
A_H(a,2b)&amp;amp; \xrightarrow{2a+3b^2-1}&amp;amp; A_H(a+2,3b),\\&lt;br /&gt;
A_H(0,2b+1)&amp;amp;\xrightarrow{3b^2-3b-7}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b-6}\;0^\infty,\\&lt;br /&gt;
A_H(a+1,2b+1)&amp;amp;\xrightarrow{3b^2-7}&amp;amp; A_H(a,3b+1).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Recall the high-level rules for Hydra and Antihydra:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^a\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{20}&amp;amp;C(3,0),\\&lt;br /&gt;
C(2a,0)&amp;amp;\xrightarrow{6a^2+20a+4}&amp;amp;0^\infty\;3^{3a+1}\;1\;\textrm{A&amp;gt;}\;2\;0^\infty,\\&lt;br /&gt;
C(2a,b+1)&amp;amp;\xrightarrow{6a^2+23a+10}&amp;amp;C(3a+3,b),\\&lt;br /&gt;
C(2a+1,b)&amp;amp;\xrightarrow{4b+6a^2+23a+26}&amp;amp;C(3a+3,b+2).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
0^\infty\;\textrm{A&amp;gt;}\;0^\infty&amp;amp;\xrightarrow{11}&amp;amp;A(0,4),\\&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Already, both machines appear to be very similar. They have one parameter that increases exponentially with growth factor &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; and another that takes a pseudo-random walk. Below, the exponentially increasing variables are described by integer sequences:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_0=3,a_{n+1}=\begin{cases}\frac{3a_n+6}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+3}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;a_0=4,a_{n+1}=\begin{cases}\frac{3a_n+4}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+3}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This will make demonstrating the transformation easier. Now we will define a new integer sequence based on the old one and discover the recursive rules for that sequence. This new sequence is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;b_n=\frac{1}{3}a_n+2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_n=a_n+4&amp;lt;/math&amp;gt; for Hydra and Antihydra respectively. We start by using &amp;lt;math&amp;gt;b_{n+1}&amp;lt;/math&amp;gt; instead and substituting &amp;lt;math&amp;gt;a_{n+1}&amp;lt;/math&amp;gt; for its recursive formula. By doing so, we get:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{a_n+6}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{a_n+5}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3a_n+12}{2}&amp;amp;\text{if }a_n\equiv0\pmod{2}\\\frac{3a_n+11}{2}&amp;amp;\text{if }a_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
After that, we can substitute &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; for its solution in terms of &amp;lt;math&amp;gt;b_n&amp;lt;/math&amp;gt;. What results is the following:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{3(b_n-2)+6}{2}&amp;amp;\text{if }3(b_n-2)\equiv0\pmod{2}\\\frac{3(b_n-2)+5}{2}&amp;amp;\text{if }3(b_n-2)\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3(b_n-4)+12}{2}&amp;amp;\text{if }b_n-4\equiv0\pmod{2}\\\frac{3(b_n-4)+11}{2}&amp;amp;\text{if }b_n-4\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The &amp;lt;math&amp;gt;\text{if}&amp;lt;/math&amp;gt; statements amount to checking if &amp;lt;math&amp;gt;b_n&amp;lt;/math&amp;gt; is even or odd. After simplifying, we are done:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=3,b_{n+1}=\begin{cases}\frac{3b_n}{2}&amp;amp;\text{if }b_n\equiv0\pmod{2}\\\frac{3b_n-1}{2}&amp;amp;\text{if }b_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b_0=8,b_{n+1}=\begin{cases}\frac{3b_n}{2}&amp;amp;\text{if }b_n\equiv0\pmod{2}\\\frac{3b_n-1}{2}&amp;amp;\text{if }b_n\equiv1\pmod{2}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Now that we have demonstrated a strong similarity in the behaviour of both Turing machines, we can return to using the high-level rules. Doing that while considering the step counts yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Under these rules, the halting problem for Hydra is about whether repeatedly applying the function &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=3&amp;lt;/math&amp;gt;, will eventually generate more even terms than twice the number of odd terms. Similarly, Antihydra halts if and only if repeatedly applying &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;, will eventually generate more odd terms than twice the number of even terms.&lt;br /&gt;
== Coding the Hydra function ==&lt;br /&gt;
The Hydra function&#039;s simple definition allows one to write computer programs that simulate Hydra and Antihydra. The following Python program is a straightforward Hydra simulator based on the Hydra function:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# &#039;a&#039; and &#039;b&#039; fulfill the same purpose as in the Hydra rules.&lt;br /&gt;
a = 3&lt;br /&gt;
b = 0&lt;br /&gt;
# As long as Hydra has not halted, &#039;b&#039; remains greater than -1.&lt;br /&gt;
while b != -1:&lt;br /&gt;
    # If &#039;a&#039; is even, decrement &#039;b&#039;, otherwise increase &#039;b&#039; by 2.&lt;br /&gt;
    if a % 2 == 0:&lt;br /&gt;
        b -= 1&lt;br /&gt;
    else:&lt;br /&gt;
        b += 2&lt;br /&gt;
    # This performs H(a) = a + floor(a/2).&lt;br /&gt;
    # Note that integer division by 2 is equivalent to one bit shift to the right (a &amp;gt;&amp;gt; 1)&lt;br /&gt;
    a += a//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Replacing &amp;lt;code&amp;gt;a = 3&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;a = 8&amp;lt;/code&amp;gt; and swapping &amp;lt;code&amp;gt;b -= 1&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;b += 2&amp;lt;/code&amp;gt; turns this program into an Antihydra simulator.&lt;br /&gt;
==Properties==&lt;br /&gt;
The Hydra function can be rewritten as follows:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
H(2n)&amp;amp;=&amp;amp;3n,\\&lt;br /&gt;
H(2n+1)&amp;amp;=&amp;amp;3n+1.\\&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Now assume that for some positive integer &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and every odd integer &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;H^s(2^st)=3^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H^s(2^st+1)=3^st+1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;H^i(n)&amp;lt;/math&amp;gt; is function iteration. Notice that we can write &amp;lt;math&amp;gt;2^{s+1}t=2\cdot2^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;2^{s+1}t+1=2\cdot2^st+1&amp;lt;/math&amp;gt;, so if we apply &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; to these numbers, we get &amp;lt;math&amp;gt;H(2\cdot2^st)=3\cdot 2^st&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H(2\cdot2^st+1)=3\cdot2^st+1&amp;lt;/math&amp;gt;. Now, if we apply &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; to these numbers &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; times, we get &amp;lt;math&amp;gt;H^{s+1}\big(2^{s+1}t\big)=H^s(2^s\cdot3t)=3^{s+1}t&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H^{s+1}\big(2^{s+1}t+1\big)=H^s(2^s\cdot3t+1)=3^{s+1}t+1&amp;lt;/math&amp;gt;. Therefore, by mathematical induction we have proved the following formulas:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
H^s(2^st)&amp;amp;=&amp;amp;3^st,\\&lt;br /&gt;
H^s(2^st+1)&amp;amp;=&amp;amp;3^st+1.\\&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This optimization can be directly applied to the high-level rules for Hydra and Antihydra, producing this result:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Hydra !! Antihydra&lt;br /&gt;
|-align=&amp;quot;center&amp;quot;&lt;br /&gt;
|Let &amp;lt;math&amp;gt;C_H(a,b):=0^\infty\;\textrm{&amp;lt;A}\;2\;0^{3(a-2)}\;3^b\;2\;0^\infty&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
C_H(2^st,b+s)&amp;amp;\xrightarrow{f_1(s,t)}&amp;amp;C_H(3^st,b),\\&lt;br /&gt;
C_H(2^st+1,b)&amp;amp;\xrightarrow{f_2(s,t,b)}&amp;amp;C_H(3^st+1,b+2s),\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_1(s,t)=\frac{3t(3^s-2^s)(18(3^s+2^s)t-65)}{5}-5s&amp;lt;/math&amp;gt; and &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_2(s,t,b)=(b+s)4s+\frac{3t(3^s-2^s)(18(3^s+2^s)t-5)}{5}&amp;lt;/math&amp;gt;.&lt;br /&gt;
|Let &amp;lt;math&amp;gt;A_H(a,b):=0^\infty\;1^a\;0\;1^{b-4}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A_H(a,2^st)&amp;amp; \xrightarrow{f_3(s,t,a)}&amp;amp; A_H(a+2s,3^st),\\&lt;br /&gt;
A_H(a+s,2^st+1)&amp;amp;\xrightarrow{f_4(s,t)}&amp;amp; A_H(a,3^st+1),\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_3(s,t,a)=(2a-3+2s)s+\frac{3t^2(9^s-4^s)}{5}&amp;lt;/math&amp;gt; and &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f_4(s,t)=\frac{3t^2(9^s-4^s)}{5}-7s&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
== Visualizations ==&lt;br /&gt;
The four images below depict the first 1000 values of four Hydra sequences with different initial values. Each row of pixels shows a number in binary on the right and its parity on the left (blue for even, red for odd):&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed&amp;quot; heights=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
File:HydraFunction-StartingValue2.png|Starting value 2. There are 492 even numbers and 508 odd numbers.&lt;br /&gt;
File:HydraFunction-StartingValue5.png|Starting value 5. There are 497 even numbers and 503 odd numbers.&lt;br /&gt;
File:Antihydra increasing value.png|Starting value 8. There are 499 even numbers and 501 odd numbers.&lt;br /&gt;
File:HydraFunction-StartingValue11.png|Starting value 11. There are 481 even numbers and 519 odd numbers.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1813</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1813"/>
		<updated>2025-04-15T13:08:31Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Analysis */ Link to Hydra function since that has the code now&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is a [[BB(6)]] [[Cryptid]]. Its pseudo-random behaviour was first reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after. It was named after the 2-state, 5-symbol [[Turing machine]] called [[Hydra]] for sharing many similarities to it.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;margin: auto; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td style=&amp;quot;width: 200px;&amp;quot;&amp;gt;[[File:Antihydra-depiction.png|200px]]&amp;lt;br&amp;gt;Artistic depiction of Antihydra by Jadeix&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto;&amp;quot;&lt;br /&gt;
! !!0!!1&lt;br /&gt;
|-&lt;br /&gt;
!A&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!B&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!C&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!D&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!E&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!F&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
The transition table of Antihydra.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td style=&amp;quot;width: 220px;&amp;quot;&amp;gt;[[File:Antihydra award.jpg|220px]]&amp;lt;br&amp;gt;A community trophy - to be awarded to the first person or group who solves the Antihydra problem&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
In effect, the halting problem for Antihydra is about whether repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;f(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor+2&amp;lt;/math&amp;gt; will at some point produce more odd values of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; than twice the number of even values.&lt;br /&gt;
&lt;br /&gt;
These rules can be modified to use the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3n}{2}\Big\rfloor&amp;lt;/math&amp;gt;, or the [[Hydra function]], which strengthens Antihydra&#039;s similarities to Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values resembles a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]][[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=1774</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=1774"/>
		<updated>2025-04-10T13:58:41Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Noncomputable Sequences */ avoid ambiguous phrasing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Lazy Beaver]]&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|LB(1)=2, LB(2)=7, LB(3)=22, LB(4)=72, LB(5)=427&lt;br /&gt;
|[[oeis:A337805|A337805]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs and are grouped by their position in the [[wikipedia:Arithmetical_hierarchy|arithmetical hierarchy]].&lt;br /&gt;
&lt;br /&gt;
Note that when the bbchallenge community refers to BB(n, m), we mean the Max Shift function S(n, m) defined below (if m is omitted, it is set to 2 by default). Some literature may refer to the Max Score function Σ(n, m) by BB(n, m) instead.&lt;br /&gt;
&lt;br /&gt;
==== Π1 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|BB_SPACE(1,2)=2, BB_SPACE(2,2)=4, BB_SPACE(3,2)=7, BB_SPACE(4,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|[https://nickdrozd.github.io/2021/02/14/blanking-beavers.html Blanking Beavers]&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state m-symbol Turing machine can make on an initially blank tape until it is blank again (halting or not)&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|BB_clean&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state 2-symbol Turing machine can make on an initially blank tape until it halts on a blank tape&lt;br /&gt;
|(see comments #75 and #77 [https://scottaaronson.blog/?p=5661 here])&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BB_ones&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of 1&#039;s that an n-state 2-symbol Turing machine can make in a row, before halting on a 0 next to it&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Size of the Runtime Spectrum&lt;br /&gt;
|&lt;br /&gt;
|The number of distinct runtimes for a machine with a given number of symbols, for increasing number of states&lt;br /&gt;
|see &amp;quot;The Spectrum of Runtimes&amp;quot; in &amp;quot;[https://www.scottaaronson.com/papers/bb.pdf The Busy Beaver Frontier]&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Π2 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Yet ungrouped ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
* Any of the above for machines with more than one tape, or tapes with more dimensions (2d grid, 3d, n-d...)&lt;br /&gt;
* Machines with a finite tape, or a circular one of a certain length&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=1773</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=1773"/>
		<updated>2025-04-10T12:56:51Z</updated>

		<summary type="html">&lt;p&gt;Coda: Add note describing bbchallenge BB(n) convention&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Lazy Beaver]]&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|LB(1)=2, LB(2)=7, LB(3)=22, LB(4)=72, LB(5)=427&lt;br /&gt;
|[[oeis:A337805|A337805]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs and are grouped by their position in the [[wikipedia:Arithmetical_hierarchy|arithmetical hierarchy]].&lt;br /&gt;
&lt;br /&gt;
Note that when the bbchallenge community refers to BB(n, m), we mean the Max Shift function S(n, m) defined below. Some literature may refer to the Max Score function under this name instead. If m is omitted, it is set to 2 by default.&lt;br /&gt;
&lt;br /&gt;
==== Π1 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|BB_SPACE(1,2)=2, BB_SPACE(2,2)=4, BB_SPACE(3,2)=7, BB_SPACE(4,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|[https://nickdrozd.github.io/2021/02/14/blanking-beavers.html Blanking Beavers]&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state m-symbol Turing machine can make on an initially blank tape until it is blank again (halting or not)&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|BB_clean&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state 2-symbol Turing machine can make on an initially blank tape until it halts on a blank tape&lt;br /&gt;
|(see comments #75 and #77 [https://scottaaronson.blog/?p=5661 here])&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BB_ones&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of 1&#039;s that an n-state 2-symbol Turing machine can make in a row, before halting on a 0 next to it&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Size of the Runtime Spectrum&lt;br /&gt;
|&lt;br /&gt;
|The number of distinct runtimes for a machine with a given number of symbols, for increasing number of states&lt;br /&gt;
|see &amp;quot;The Spectrum of Runtimes&amp;quot; in &amp;quot;[https://www.scottaaronson.com/papers/bb.pdf The Busy Beaver Frontier]&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Π2 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Yet ungrouped ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
* Any of the above for machines with more than one tape, or tapes with more dimensions (2d grid, 3d, n-d...)&lt;br /&gt;
* Machines with a finite tape, or a circular one of a certain length&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=1772</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=1772"/>
		<updated>2025-04-10T12:50:08Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Noncomputable Sequences */ Group sequences into separate tables depending on their position in the arithmetical hierarchy - TODO: make all tables equal width?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Lazy Beaver]]&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|LB(1)=2, LB(2)=7, LB(3)=22, LB(4)=72, LB(5)=427&lt;br /&gt;
|[[oeis:A337805|A337805]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs and are grouped by their position in the [[wikipedia:Arithmetical_hierarchy|arithmetical hierarchy]]&lt;br /&gt;
&lt;br /&gt;
==== Π1 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|BB_SPACE(1,2)=2, BB_SPACE(2,2)=4, BB_SPACE(3,2)=7, BB_SPACE(4,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|[https://nickdrozd.github.io/2021/02/14/blanking-beavers.html Blanking Beavers]&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state m-symbol Turing machine can make on an initially blank tape until it is blank again (halting or not)&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|BB_clean&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state 2-symbol Turing machine can make on an initially blank tape until it halts on a blank tape&lt;br /&gt;
|(see comments #75 and #77 [https://scottaaronson.blog/?p=5661 here])&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BB_ones&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of 1&#039;s that an n-state 2-symbol Turing machine can make in a row, before halting on a 0 next to it&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Size of the Runtime Spectrum&lt;br /&gt;
|&lt;br /&gt;
|The number of distinct runtimes for a machine with a given number of symbols, for increasing number of states&lt;br /&gt;
|see &amp;quot;The Spectrum of Runtimes&amp;quot; in &amp;quot;[https://www.scottaaronson.com/papers/bb.pdf The Busy Beaver Frontier]&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Π2 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Yet ungrouped ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
* Any of the above for machines with more than one tape, or tapes with more dimensions (2d grid, 3d, n-d...)&lt;br /&gt;
* Machines with a finite tape, or a circular one of a certain length&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1766</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1766"/>
		<updated>2025-04-03T17:57:03Z</updated>

		<summary type="html">&lt;p&gt;Coda: Add community trophy photograph&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
[[File:Antihydra-depiction.png|right|thumb|200px|Artistic depiction of Antihydra by Jadeix]]&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is the first [[BB(6)]] [[Cryptid]] to be identified. It operates by repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;. Determining whether this [[Turing machine]] halts requires solving the [[Collatz-like]] mathematical problem of whether there [[wikipedia:Eventually_(mathematics)|eventually]] exists a step at which &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt; has been applied to (strictly) more than twice as many odd as even numbers. Proving a result remains challenging due to the lack of an exploitable pattern in the sequence&#039;s parities, although probabilistic arguments based on random walks suggest Antihydra has a minuscule chance of halting.&lt;br /&gt;
== Description ==&lt;br /&gt;
[[File:Antihydra TransitionTable.png|right|150px|thumb|The transition table of Antihydra.]]&lt;br /&gt;
Antihydra basically repeatedly modifies the integer ordered pair &amp;lt;math&amp;gt;(x,y)&amp;lt;/math&amp;gt; starting at &amp;lt;math&amp;gt;(0,4)&amp;lt;/math&amp;gt;, which is represented on the tape as &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s, separated by a single &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. It does this by &amp;quot;borrowing&amp;quot; a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; from the right side and, through a series of back-and-forth head movements, &amp;quot;moves&amp;quot; this &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; toward the one separating &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, two units at a time. As this happens, the head visits new cells on the right, which has the effect of there being about &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; times as many &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s on the tape when the distance has been closed. After that, &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; are updated. If the previous value of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; was even, then &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y+2&amp;lt;/math&amp;gt;. Otherwise, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y-1&amp;lt;/math&amp;gt; or Antihydra halts if &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; was 0.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;a_k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_k&amp;lt;/math&amp;gt; be integer sequences defined below:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
a_0=0,&amp;amp;a_{k+1} =  \begin{cases}a_k + 2 &amp;amp; \text{if } b_k\equiv0\pmod{2}\\a_k - 1 &amp;amp; \text{if }b_k\equiv1\pmod{2} \\\end{cases},&amp;amp;b_0=8,&amp;amp;b_{k+1}=H(b_k).\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Antihydra halts if and only if there exists any number &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; for which &amp;lt;math&amp;gt;a_i&amp;lt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
=== Attributions ===&lt;br /&gt;
[[File:Antihydra award.jpg|thumb|Community trophy to be awarded to the first person or group who solves the Antihydra problem]]&lt;br /&gt;
Antihydra and its pseudo-random behaviour were reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after, where it was found to be closely related to [[Hydra]]; in particular, the roles of even and odd numbers are switched. This is why the machine was named &#039;&#039;&#039;Anti&#039;&#039;&#039;hydra.&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The page [[Hydra function]] shows how these rules can be simplified to use that function instead, along with Hydra.&lt;br /&gt;
== Coding Antihydra&#039;s behaviour ==&lt;br /&gt;
Antihydra&#039;s relatively simple rules allow one to write a computer program that mimics its behaviour, terminating if and only if Antihydra halts.&lt;br /&gt;
=== Python code === &lt;br /&gt;
The following Python program is a straightfoward Antihydra simulator using the Hydra function:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
a = 0&lt;br /&gt;
# The iterated value&lt;br /&gt;
b = 8&lt;br /&gt;
# If a &amp;lt; 0 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while a != -1:&lt;br /&gt;
    # If b is even, add 2 to a so even numbers count twice&lt;br /&gt;
    if b % 2 == 0:&lt;br /&gt;
        a += 2&lt;br /&gt;
    else:&lt;br /&gt;
        a -= 1&lt;br /&gt;
    # Add the number divided by two (integer division, rounding down) to itself&lt;br /&gt;
    b += b//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Alternative programs ====&lt;br /&gt;
This code can be [[wikipedia:Code_golf|codegolfed]] by noting that the change in &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; is a function of &amp;lt;code&amp;gt;b % 2&amp;lt;/code&amp;gt;. Additionally, integer division by two can be replaced with a bitwise logical right shift by one.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=0,8&lt;br /&gt;
while a!=-1:&lt;br /&gt;
    a+=2-b%2*3&lt;br /&gt;
    b+=b&amp;gt;&amp;gt;1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Another insight is that numerical value of 0 functions as the Boolean &amp;lt;code&amp;gt;False&amp;lt;/code&amp;gt; and all others are &amp;lt;code&amp;gt;True&amp;lt;/code&amp;gt;. The initial value of &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; would have to change for the program to terminate under the same halting conditions as Antihydra.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=1,8&lt;br /&gt;
while a:a+=2-b%2*3;b+=b&amp;gt;&amp;gt;1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
===A heuristic nonhalting argument===&lt;br /&gt;
[[File:Antihydra increasing value.png|thumb|200px|A binary representation of the first 1000 &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values, each of which is computed from the previous by the iteration &amp;lt;code&amp;gt;b += b&amp;gt;&amp;gt;1&amp;lt;/code&amp;gt;. Rows with blue have even values and rows with red have odd values.]]&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values can be approximated by a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To view an animation of the blank tape becoming &amp;lt;math&amp;gt;A(6,23)&amp;lt;/math&amp;gt; in 419 steps, click [https://wiki.bbchallenge.org/w/images/3/36/AHydra_0-419.gif here].&#039;&#039;&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]]&lt;br /&gt;
[[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=File:Antihydra_award.jpg&amp;diff=1765</id>
		<title>File:Antihydra award.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=File:Antihydra_award.jpg&amp;diff=1765"/>
		<updated>2025-04-03T17:54:47Z</updated>

		<summary type="html">&lt;p&gt;Coda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trophy to be awarded to the first person or group who is first acknowledged by the bbchallenge.org community to have resolved the Antihydra problem&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1699</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1699"/>
		<updated>2025-03-12T12:14:08Z</updated>

		<summary type="html">&lt;p&gt;Coda: Use variable name in accordance with the article convention (a=odd/even counter, b=increasing variable)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
[[File:Antihydra-depiction.png|right|thumb|200px|Artistic depiction of Antihydra by Jadeix]]&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is the first [[BB(6)]] [[Cryptid]] to be identified. It operates by repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;. Determining whether this [[Turing machine]] halts requires solving the [[Collatz-like]] mathematical problem of whether there [[wikipedia:Eventually_(mathematics)|eventually]] exists a step at which &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt; has been applied to (strictly) more than twice as many odd as even numbers. Proving a result remains challenging due to the lack of an exploitable pattern in the sequence&#039;s parities, although probabilistic arguments based on random walks suggest Antihydra has a minuscule chance of halting.&lt;br /&gt;
== Description ==&lt;br /&gt;
[[File:Antihydra TransitionTable.png|right|150px|thumb|The transition table of Antihydra.]]&lt;br /&gt;
Antihydra basically repeatedly modifies the integer ordered pair &amp;lt;math&amp;gt;(x,y)&amp;lt;/math&amp;gt; starting at &amp;lt;math&amp;gt;(0,4)&amp;lt;/math&amp;gt;, which is represented on the tape as &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s, separated by a single &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. It does this by &amp;quot;borrowing&amp;quot; a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; from the right side and, through a series of back-and-forth head movements, &amp;quot;moves&amp;quot; this &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; toward the one separating &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, two units at a time. As this happens, the head visits new cells on the right, which has the effect of there being about &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; times as many &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s on the tape when the distance has been closed. After that, &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; are updated. If the previous value of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; was even, then &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y+2&amp;lt;/math&amp;gt;. Otherwise, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y-1&amp;lt;/math&amp;gt; or Antihydra halts if &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; was 0.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;a_k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_k&amp;lt;/math&amp;gt; be integer sequences defined below:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
a_0=0,&amp;amp;a_{k+1} =  \begin{cases}a_k + 2 &amp;amp; \text{if } b_k\equiv0\pmod{2}\\a_k - 1 &amp;amp; \text{if }b_k\equiv1\pmod{2} \\\end{cases},&amp;amp;b_0=8,&amp;amp;b_{k+1}=H(b_k).\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Antihydra halts if and only if there exists any number &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; for which &amp;lt;math&amp;gt;a_i&amp;lt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
=== Attributions === &lt;br /&gt;
Antihydra and its pseudo-random behaviour were reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after, where it was found to be closely related to [[Hydra]]. The &amp;quot;anti-&amp;quot; in the name is due to the fact that the roles of even and odd numbers are switched compared to the behavior of Hydra &amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The page [[Hydra function]] shows how these rules can be simplified to use that function instead, along with Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
===A heuristic nonhalting argument===&lt;br /&gt;
[[File:Antihydra increasing value.png|thumb|200px|A binary representation of the first 1000 steps of the evolution of the exponentially increasing variable of the Antihydra iteration (b = b + (b &amp;gt;&amp;gt; 1)). The colored background indicates whether the value is even or odd with blue and red, respectively.]]&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values can be approximated by a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To view an animation of the blank tape becoming &amp;lt;math&amp;gt;A(6,23)&amp;lt;/math&amp;gt; in 419 steps, click [https://wiki.bbchallenge.org/w/images/3/36/AHydra_0-419.gif here].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python programs implement the abstracted behavior of the Antihydra. Proving whether they halt or not would also solve the Antihydra problem: &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
a = 0&lt;br /&gt;
# The iterated value&lt;br /&gt;
b = 8&lt;br /&gt;
# If a &amp;lt; 0 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while a != -1:&lt;br /&gt;
    # If b is even, add 2 to a so even numbers count twice&lt;br /&gt;
    if b % 2 == 0:&lt;br /&gt;
        a += 2&lt;br /&gt;
    else:&lt;br /&gt;
        a -= 1&lt;br /&gt;
    # Add the number divided by two (integer division, rounding down) to itself&lt;br /&gt;
    b += b//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Integer division by two is equivalent to shifting the binary representation of the number one place to the right (discarding the least significant bit).&lt;br /&gt;
&lt;br /&gt;
[[wikipedia:Code_golf|Codegolfed]] versions by mxdys:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=0,8&lt;br /&gt;
while a!=-1:&lt;br /&gt;
    a+=2-b%2*3&lt;br /&gt;
    b+=b&amp;gt;&amp;gt;1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;even shorter, here the order of the two sequential operations (shifted addition, even/odd counting) is reversed:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=3,8&lt;br /&gt;
while a:b+=b&amp;gt;&amp;gt;1;a+=2-b%2*3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]]&lt;br /&gt;
[[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1698</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1698"/>
		<updated>2025-03-12T12:09:08Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Code */ Another small code comment fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
[[File:Antihydra-depiction.png|right|thumb|200px|Artistic depiction of Antihydra by Jadeix]]&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is the first [[BB(6)]] [[Cryptid]] to be identified. It operates by repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;. Determining whether this [[Turing machine]] halts requires solving the [[Collatz-like]] mathematical problem of whether there [[wikipedia:Eventually_(mathematics)|eventually]] exists a step at which &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt; has been applied to (strictly) more than twice as many odd as even numbers. Proving a result remains challenging due to the lack of an exploitable pattern in the sequence&#039;s parities, although probabilistic arguments based on random walks suggest Antihydra has a minuscule chance of halting.&lt;br /&gt;
== Description ==&lt;br /&gt;
[[File:Antihydra TransitionTable.png|right|150px|thumb|The transition table of Antihydra.]]&lt;br /&gt;
Antihydra basically repeatedly modifies the integer ordered pair &amp;lt;math&amp;gt;(x,y)&amp;lt;/math&amp;gt; starting at &amp;lt;math&amp;gt;(0,4)&amp;lt;/math&amp;gt;, which is represented on the tape as &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s, separated by a single &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. It does this by &amp;quot;borrowing&amp;quot; a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; from the right side and, through a series of back-and-forth head movements, &amp;quot;moves&amp;quot; this &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; toward the one separating &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, two units at a time. As this happens, the head visits new cells on the right, which has the effect of there being about &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; times as many &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s on the tape when the distance has been closed. After that, &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; are updated. If the previous value of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; was even, then &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y+2&amp;lt;/math&amp;gt;. Otherwise, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y-1&amp;lt;/math&amp;gt; or Antihydra halts if &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; was 0.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;a_k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_k&amp;lt;/math&amp;gt; be integer sequences defined below:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
a_0=0,&amp;amp;a_{k+1} =  \begin{cases}a_k + 2 &amp;amp; \text{if } b_k\equiv0\pmod{2}\\a_k - 1 &amp;amp; \text{if }b_k\equiv1\pmod{2} \\\end{cases},&amp;amp;b_0=8,&amp;amp;b_{k+1}=H(b_k).\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Antihydra halts if and only if there exists any number &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; for which &amp;lt;math&amp;gt;a_i&amp;lt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
=== Attributions === &lt;br /&gt;
Antihydra and its pseudo-random behaviour were reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after, where it was found to be closely related to [[Hydra]]. The &amp;quot;anti-&amp;quot; in the name is due to the fact that the roles of even and odd numbers are switched compared to the behavior of Hydra &amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The page [[Hydra function]] shows how these rules can be simplified to use that function instead, along with Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
===A heuristic nonhalting argument===&lt;br /&gt;
[[File:Antihydra increasing value.png|thumb|200px|A binary representation of the first 1000 steps of the evolution of the exponentially increasing variable of the Antihydra iteration (a = a + a//2). The colored background indicates whether the value is even or odd with blue and red, respectively.]]&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values can be approximated by a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To view an animation of the blank tape becoming &amp;lt;math&amp;gt;A(6,23)&amp;lt;/math&amp;gt; in 419 steps, click [https://wiki.bbchallenge.org/w/images/3/36/AHydra_0-419.gif here].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python programs implement the abstracted behavior of the Antihydra. Proving whether they halt or not would also solve the Antihydra problem: &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
a = 0&lt;br /&gt;
# The iterated value&lt;br /&gt;
b = 8&lt;br /&gt;
# If a &amp;lt; 0 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while a != -1:&lt;br /&gt;
    # If b is even, add 2 to a so even numbers count twice&lt;br /&gt;
    if b % 2 == 0:&lt;br /&gt;
        a += 2&lt;br /&gt;
    else:&lt;br /&gt;
        a -= 1&lt;br /&gt;
    # Add the number divided by two (integer division, rounding down) to itself&lt;br /&gt;
    b += b//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Integer division by two is equivalent to shifting the binary representation of the number one place to the right (discarding the least significant bit).&lt;br /&gt;
&lt;br /&gt;
[[wikipedia:Code_golf|Codegolfed]] versions by mxdys:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=0,8&lt;br /&gt;
while a!=-1:&lt;br /&gt;
    a+=2-b%2*3&lt;br /&gt;
    b+=b&amp;gt;&amp;gt;1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;even shorter, here the order of the two sequential operations (shifted addition, even/odd counting) is reversed:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=3,8&lt;br /&gt;
while a:b+=b&amp;gt;&amp;gt;1;a+=2-b%2*3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]]&lt;br /&gt;
[[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1697</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1697"/>
		<updated>2025-03-12T12:07:31Z</updated>

		<summary type="html">&lt;p&gt;Coda: fix code comment&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
[[File:Antihydra-depiction.png|right|thumb|200px|Artistic depiction of Antihydra by Jadeix]]&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is the first [[BB(6)]] [[Cryptid]] to be identified. It operates by repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;. Determining whether this [[Turing machine]] halts requires solving the [[Collatz-like]] mathematical problem of whether there [[wikipedia:Eventually_(mathematics)|eventually]] exists a step at which &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt; has been applied to (strictly) more than twice as many odd as even numbers. Proving a result remains challenging due to the lack of an exploitable pattern in the sequence&#039;s parities, although probabilistic arguments based on random walks suggest Antihydra has a minuscule chance of halting.&lt;br /&gt;
== Description ==&lt;br /&gt;
[[File:Antihydra TransitionTable.png|right|150px|thumb|The transition table of Antihydra.]]&lt;br /&gt;
Antihydra basically repeatedly modifies the integer ordered pair &amp;lt;math&amp;gt;(x,y)&amp;lt;/math&amp;gt; starting at &amp;lt;math&amp;gt;(0,4)&amp;lt;/math&amp;gt;, which is represented on the tape as &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s, separated by a single &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. It does this by &amp;quot;borrowing&amp;quot; a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; from the right side and, through a series of back-and-forth head movements, &amp;quot;moves&amp;quot; this &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; toward the one separating &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, two units at a time. As this happens, the head visits new cells on the right, which has the effect of there being about &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; times as many &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s on the tape when the distance has been closed. After that, &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; are updated. If the previous value of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; was even, then &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y+2&amp;lt;/math&amp;gt;. Otherwise, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y-1&amp;lt;/math&amp;gt; or Antihydra halts if &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; was 0.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;a_k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_k&amp;lt;/math&amp;gt; be integer sequences defined below:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
a_0=0,&amp;amp;a_{k+1} =  \begin{cases}a_k + 2 &amp;amp; \text{if } b_k\equiv0\pmod{2}\\a_k - 1 &amp;amp; \text{if }b_k\equiv1\pmod{2} \\\end{cases},&amp;amp;b_0=8,&amp;amp;b_{k+1}=H(b_k).\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Antihydra halts if and only if there exists any number &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; for which &amp;lt;math&amp;gt;a_i&amp;lt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
=== Attributions === &lt;br /&gt;
Antihydra and its pseudo-random behaviour were reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after, where it was found to be closely related to [[Hydra]]. The &amp;quot;anti-&amp;quot; in the name is due to the fact that the roles of even and odd numbers are switched compared to the behavior of Hydra &amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The page [[Hydra function]] shows how these rules can be simplified to use that function instead, along with Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
===A heuristic nonhalting argument===&lt;br /&gt;
[[File:Antihydra increasing value.png|thumb|200px|A binary representation of the first 1000 steps of the evolution of the exponentially increasing variable of the Antihydra iteration (a = a + a//2). The colored background indicates whether the value is even or odd with blue and red, respectively.]]&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values can be approximated by a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To view an animation of the blank tape becoming &amp;lt;math&amp;gt;A(6,23)&amp;lt;/math&amp;gt; in 419 steps, click [https://wiki.bbchallenge.org/w/images/3/36/AHydra_0-419.gif here].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python programs implement the abstracted behavior of the Antihydra. Proving whether they halt or not would also solve the Antihydra problem: &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
a = 0&lt;br /&gt;
# The iterated value&lt;br /&gt;
b = 8&lt;br /&gt;
# If a &amp;lt; 0 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while a != -1:&lt;br /&gt;
    # If b is even, add 2 to b so even numbers count twice&lt;br /&gt;
    if b % 2 == 0:&lt;br /&gt;
        a += 2&lt;br /&gt;
    else:&lt;br /&gt;
        a -= 1&lt;br /&gt;
    # Add the number divided by two (integer division, rounding down) to itself&lt;br /&gt;
    b += b//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Integer division by two is equivalent to shifting the binary representation of the number one place to the right (discarding the least significant bit).&lt;br /&gt;
&lt;br /&gt;
[[wikipedia:Code_golf|Codegolfed]] versions by mxdys:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=0,8&lt;br /&gt;
while a!=-1:&lt;br /&gt;
    a+=2-b%2*3&lt;br /&gt;
    b+=b&amp;gt;&amp;gt;1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;even shorter, here the order of the two sequential operations (shifted addition, even/odd counting) is reversed:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=3,8&lt;br /&gt;
while a:b+=b&amp;gt;&amp;gt;1;a+=2-b%2*3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]]&lt;br /&gt;
[[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1696</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1696"/>
		<updated>2025-03-12T12:06:00Z</updated>

		<summary type="html">&lt;p&gt;Coda: Add code examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
[[File:Antihydra-depiction.png|right|thumb|200px|Artistic depiction of Antihydra by Jadeix]]&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is the first [[BB(6)]] [[Cryptid]] to be identified. It operates by repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;. Determining whether this [[Turing machine]] halts requires solving the [[Collatz-like]] mathematical problem of whether there [[wikipedia:Eventually_(mathematics)|eventually]] exists a step at which &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt; has been applied to (strictly) more than twice as many odd as even numbers. Proving a result remains challenging due to the lack of an exploitable pattern in the sequence&#039;s parities, although probabilistic arguments based on random walks suggest Antihydra has a minuscule chance of halting.&lt;br /&gt;
== Description ==&lt;br /&gt;
[[File:Antihydra TransitionTable.png|right|150px|thumb|The transition table of Antihydra.]]&lt;br /&gt;
Antihydra basically repeatedly modifies the integer ordered pair &amp;lt;math&amp;gt;(x,y)&amp;lt;/math&amp;gt; starting at &amp;lt;math&amp;gt;(0,4)&amp;lt;/math&amp;gt;, which is represented on the tape as &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s, separated by a single &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. It does this by &amp;quot;borrowing&amp;quot; a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; from the right side and, through a series of back-and-forth head movements, &amp;quot;moves&amp;quot; this &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; toward the one separating &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, two units at a time. As this happens, the head visits new cells on the right, which has the effect of there being about &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; times as many &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s on the tape when the distance has been closed. After that, &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; are updated. If the previous value of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; was even, then &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y+2&amp;lt;/math&amp;gt;. Otherwise, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y-1&amp;lt;/math&amp;gt; or Antihydra halts if &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; was 0.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;a_k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_k&amp;lt;/math&amp;gt; be integer sequences defined below:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
a_0=0,&amp;amp;a_{k+1} =  \begin{cases}a_k + 2 &amp;amp; \text{if } b_k\equiv0\pmod{2}\\a_k - 1 &amp;amp; \text{if }b_k\equiv1\pmod{2} \\\end{cases},&amp;amp;b_0=8,&amp;amp;b_{k+1}=H(b_k).\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Antihydra halts if and only if there exists any number &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; for which &amp;lt;math&amp;gt;a_i&amp;lt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
=== Attributions === &lt;br /&gt;
Antihydra and its pseudo-random behaviour were reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after, where it was found to be closely related to [[Hydra]]. The &amp;quot;anti-&amp;quot; in the name is due to the fact that the roles of even and odd numbers are switched compared to the behavior of Hydra &amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The page [[Hydra function]] shows how these rules can be simplified to use that function instead, along with Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
===A heuristic nonhalting argument===&lt;br /&gt;
[[File:Antihydra increasing value.png|thumb|200px|A binary representation of the first 1000 steps of the evolution of the exponentially increasing variable of the Antihydra iteration (a = a + a//2). The colored background indicates whether the value is even or odd with blue and red, respectively.]]&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values can be approximated by a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra [[probviously]] runs indefinitely.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To view an animation of the blank tape becoming &amp;lt;math&amp;gt;A(6,23)&amp;lt;/math&amp;gt; in 419 steps, click [https://wiki.bbchallenge.org/w/images/3/36/AHydra_0-419.gif here].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
The following Python programs implement the abstracted behavior of the Antihydra. Proving whether they halt or not would also solve the Antihydra problem: &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# Keeps track of how many odd and even numbers have been encountered&lt;br /&gt;
a = 0&lt;br /&gt;
# The iterated value&lt;br /&gt;
b = 8&lt;br /&gt;
# If b &amp;lt; 0 there have been (strictly) more than twice as many odd as even numbers and the program halts&lt;br /&gt;
while a != -1:&lt;br /&gt;
    # If b is even, add 2 to b so even numbers count twice&lt;br /&gt;
    if b % 2 == 0:&lt;br /&gt;
        a += 2&lt;br /&gt;
    else:&lt;br /&gt;
        a -= 1&lt;br /&gt;
    # Add the number divided by two (integer division, rounding down) to itself&lt;br /&gt;
    b += b//2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Integer division by two is equivalent to shifting the binary representation of the number one place to the right (discarding the least significant bit).&lt;br /&gt;
&lt;br /&gt;
[[wikipedia:Code_golf|Codegolfed]] versions by mxdys:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=0,8&lt;br /&gt;
while a!=-1:&lt;br /&gt;
    a+=2-b%2*3&lt;br /&gt;
    b+=b&amp;gt;&amp;gt;1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;even shorter, here the order of the two sequential operations (shifted addition, even/odd counting) is reversed:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
a,b=3,8&lt;br /&gt;
while a:b+=b&amp;gt;&amp;gt;1;a+=2-b%2*3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]]&lt;br /&gt;
[[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1687</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1687"/>
		<updated>2025-03-10T12:35:34Z</updated>

		<summary type="html">&lt;p&gt;Coda: Actually include Antihydra question in its description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}{{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
[[File:Antihydra-depiction.png|right|thumb|200px|Artistic depiction of Antihydra by Jadeix]]&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; is the first [[BB(6)]] [[Cryptid]] to be identified. It operates by repeatedly applying the function &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, starting with &amp;lt;math&amp;gt;n=8&amp;lt;/math&amp;gt;. Determining whether this [[Turing machine]] halts requires solving a [[Collatz-like ]]&amp;lt;nowiki/&amp;gt;mathematical problem. Specifically, one must establish a significant result regarding the frequency of odd versus even numbers throughout the sequence: whether there [[wikipedia:Eventually_(mathematics)|eventually]] exists a step at which &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt; has been applied to (strictly) more than twice as many odd as even numbers. While probabilistic arguments based on random walks suggest Antihydra [[probviously]] runs indefinitely, proving this remains challenging. The difficulty stems from both the lack of an exploitable pattern in the sequence’s parities and the inherent complexity of Collatz-like problems.&lt;br /&gt;
== Description ==&lt;br /&gt;
[[File:Antihydra TransitionTable.png|right|150px|thumb|The transition table of Antihydra.]]&lt;br /&gt;
Antihydra basically repeatedly modifies the integer ordered pair &amp;lt;math&amp;gt;(x,y)&amp;lt;/math&amp;gt; starting at &amp;lt;math&amp;gt;(0,4)&amp;lt;/math&amp;gt;, which is represented on the tape as &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; consecutive &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s, separated by a single &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt;. It does this by &amp;quot;borrowing&amp;quot; a &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; from the right side and, through a series of back-and-forth head movements, &amp;quot;moves&amp;quot; this &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; toward the one separating &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, two units at a time. As this happens, the head visits new cells on the right, which has the effect of there being about &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}&amp;lt;/math&amp;gt; times as many &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt;s on the tape when the distance has been closed. After that, &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; are updated. If the previous value of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; was even, then &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y+2&amp;lt;/math&amp;gt;. Otherwise, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; becomes &amp;lt;math&amp;gt;y-1&amp;lt;/math&amp;gt; or Antihydra halts if &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; was 0.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;H(n)=\Big\lfloor\frac{3}{2}n\Big\rfloor&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;a_k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_k&amp;lt;/math&amp;gt; be integer sequences defined below:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
a_0=0,&amp;amp;a_{k+1} =  \begin{cases}a_k + 2 &amp;amp; \text{if } b_k\equiv0\pmod{2}\\a_k - 1 &amp;amp; \text{if }b_k\equiv1\pmod{2} \\\end{cases},&amp;amp;b_0=8,&amp;amp;b_{k+1}=H(b_k).\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
Antihydra halts if and only if there exists any number &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; for which &amp;lt;math&amp;gt;a_i&amp;lt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
=== Attributions === &lt;br /&gt;
Antihydra and its pseudo-random behaviour were reported [https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 on Discord] by mxdys on 28 June 2024, and Racheline discovered the high-level rules soon after, where it was found to be closely related to [[Hydra]]. The &amp;quot;anti-&amp;quot; in the name is due to the fact that the roles of even and odd numbers are switched compared to the behavior of Hydra &amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/960643023530762341/1257053002859286701 Discord conversation where the machine was named]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a,b):=0^\infty\;1^a\;0\;1^b\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;. Then,&amp;lt;ref name=&amp;quot;bl&amp;quot;&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|lll|}\hline&lt;br /&gt;
A(a,2b)&amp;amp; \xrightarrow{2a+3b^2+12b+11}&amp;amp; A(a+2,3b+2),\\&lt;br /&gt;
A(0,2b+1)&amp;amp;\xrightarrow{3b^2+9b-1}&amp;amp; 0^\infty\;\textrm{&amp;lt;F}\;110\;1^{3b}\;0^\infty,\\&lt;br /&gt;
A(a+1,2b+1)&amp;amp;\xrightarrow{3b^2+12b+5}&amp;amp; A(a,3b+3).\\\hline&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&#039;&#039;&#039;Proof&#039;&#039;&#039;&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Consider the partial configuration &amp;lt;math&amp;gt;P(m,n):=0\;1^m\;\textrm{E&amp;gt;}\;0\;1^n\;0^\infty&amp;lt;/math&amp;gt;. The configuration after two steps is &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{A&amp;gt;}\;1^{n+1}\;0^\infty&amp;lt;/math&amp;gt;. We note the following shift rule:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{A&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{A&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
As a result, we get &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+1}\;\textrm{A&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; steps. Advancing two steps produces &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;1^{n+2}\;\textrm{&amp;lt;C}\;0^\infty&amp;lt;/math&amp;gt;. A second shift rule is useful here:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline1^s\;\textrm{&amp;lt;C}\xrightarrow{s}\textrm{&amp;lt;C}\;1^s\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
This allows us to reach &amp;lt;math&amp;gt;0\;1^{m-1}\;0\;\textrm{&amp;lt;C}\;1^{n+2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;n+2&amp;lt;/math&amp;gt; steps. Moving five more steps gets us to &amp;lt;math&amp;gt;0\;1^{m-2}\;\textrm{E&amp;gt;}\;0\;1^{n+3}\;0^\infty&amp;lt;/math&amp;gt;, which is the same configuration as &amp;lt;math&amp;gt;P(m-2,n+3)&amp;lt;/math&amp;gt;. Accounting for the head movement creates the condition that &amp;lt;math&amp;gt;m\ge 4&amp;lt;/math&amp;gt;. In summary:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline P(m,n)\xrightarrow{2n+12}P(m-2,n+3)\text{ if }m\ge 4.\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
With &amp;lt;math&amp;gt;A(a,b)&amp;lt;/math&amp;gt; we have &amp;lt;math&amp;gt;P(b,0)&amp;lt;/math&amp;gt;. As a result, we can apply this rule &amp;lt;math display=&amp;quot;inline&amp;gt;\big\lfloor\frac{1}{2}b\big\rfloor-1&amp;lt;/math&amp;gt; times (assuming &amp;lt;math&amp;gt;b\ge 4&amp;lt;/math&amp;gt;), which creates two possible scenarios:&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv0\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math&amp;gt;\sum_{i=0}^{(b/2)-2}(2\times 3i+12)=\textstyle\frac{3}{4}b^2+\frac{3}{2}b-6&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(2,\frac{3}{2}b-3\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;011\;\textrm{E&amp;gt;}\;0\;1^{(3b)/2-3}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+4&amp;lt;/math&amp;gt; steps this is &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;C}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, which then leads to &amp;lt;math&amp;gt;0^\infty\;\textrm{&amp;lt;C}\;1^a\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; steps. After five more steps, we reach &amp;lt;math&amp;gt;0^\infty\;1\;\textrm{E&amp;gt;}\;1^{a+2}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, from which another shift rule must be applied:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline\textrm{E&amp;gt;}\;1^s\xrightarrow{s}1^s\;\textrm{E&amp;gt;}\\\hline\end{array}&amp;lt;/math&amp;gt;Doing so allows us to get the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a+3}\;\textrm{E&amp;gt;}\;00\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;a+2&amp;lt;/math&amp;gt; steps. In six steps we have &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;011\;\textrm{E&amp;gt;}\;1^{(3b)/2}\;0^\infty&amp;lt;/math&amp;gt;, so we use the shift rule again, ending at &amp;lt;math&amp;gt;0^\infty\;1^{a+2}\;0\;1^{(3b)/2+2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a+2,\frac{3}{2}b+2\Big)&amp;lt;/math&amp;gt;, &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{2}b&amp;lt;/math&amp;gt; steps later. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;2a+\frac{3}{4}b^2+6b+11&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
#If &amp;lt;math&amp;gt;b\equiv1\ (\operatorname{mod}2)&amp;lt;/math&amp;gt;, then in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2-\frac{27}{4}&amp;lt;/math&amp;gt; steps we arrive at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P\Big(3,\frac{3b-9}{2}\Big)&amp;lt;/math&amp;gt;. The matching complete configuration is &amp;lt;math&amp;gt;0^\infty\;1^a\;0111\;\textrm{E&amp;gt;}\;0\;1^{(3b-9)/2}\;0^\infty&amp;lt;/math&amp;gt;. After &amp;lt;math&amp;gt;3b+2&amp;lt;/math&amp;gt; steps this becomes &amp;lt;math&amp;gt;0^\infty\;1^a\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;a=0&amp;lt;/math&amp;gt; then we have reached the undefined &amp;lt;code&amp;gt;F0&amp;lt;/code&amp;gt; transition with a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+3b-\frac{19}{4}&amp;lt;/math&amp;gt; steps. Otherwise, continuing for six steps gives us &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0111\;\textrm{E&amp;gt;}\;1^{(3b-3)/2}\;0^\infty&amp;lt;/math&amp;gt;. We conclude with the configuration &amp;lt;math&amp;gt;0^\infty\;1^{a-1}\;0\;1^{(3b+3)/2}\;\textrm{E&amp;gt;}\;0^\infty&amp;lt;/math&amp;gt;, equal to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;A\Big(a-1,\frac{3b+3}{2}\Big)&amp;lt;/math&amp;gt;, in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3b-3}{2}&amp;lt;/math&amp;gt; steps. This gives a total of &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{3}{4}b^2+\frac{9}{2}b-\frac{1}{4}&amp;lt;/math&amp;gt; steps.&lt;br /&gt;
The information above can be summarized as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;A(a,b)\rightarrow\begin{cases}A\Big(a+2,\frac{3}{2}b+2\Big)&amp;amp;\text{if }b\ge 2,b\equiv0\pmod{2};\\0^\infty\;\textrm{&amp;lt;F}\;110\;1^{(3b-3)/2}\;0^\infty&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a=0;\\A\Big(a-1,\frac{3b+3}{2}\Big)&amp;amp;\text{if }b\ge3,b\equiv1\pmod{2},\text{ and }a&amp;gt;0.\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Substituting &amp;lt;math&amp;gt;b\leftarrow 2b&amp;lt;/math&amp;gt; for the first case and &amp;lt;math&amp;gt;b\leftarrow 2b+1&amp;lt;/math&amp;gt; for the other two yields the final result.&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
The page [[Hydra function]] shows how these rules can be simplified to use that function instead, along with Hydra.&lt;br /&gt;
== Trajectory ==&lt;br /&gt;
11 steps are required to enter the configuration &amp;lt;math&amp;gt;A(0, 4)&amp;lt;/math&amp;gt; before the rules are repeatedly applied. So far, Antihydra has been simulated to &amp;lt;math&amp;gt;2^{31}&amp;lt;/math&amp;gt; rule steps, at which point &amp;lt;math&amp;gt;b=1073720884&amp;lt;/math&amp;gt;. Here are the first few:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{|c|}\hline A(0,4)\xrightarrow{47}A(2,8)\xrightarrow{111}A(4,14)\xrightarrow{250}A(6,23)\xrightarrow{500}A(5,36)\xrightarrow{1209}A(7,56)\xrightarrow{2713}A(9,86)\rightarrow\cdots\\\hline\end{array}&amp;lt;/math&amp;gt;&lt;br /&gt;
===A heuristic nonhalting argument===&lt;br /&gt;
[[File:Antihydra increasing value.png|thumb|200px|A binary representation of the first 1000 steps of the evolution of the exponentially increasing variable of the Antihydra iteration (a = a + a//2). The colored background indicates whether the value is even or odd with blue and red, respectively.]]&lt;br /&gt;
The trajectory of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; values can be approximated by a random walk in which the walker can only move in step sizes +2 or -1 with equal probability, starting at position 0. If &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; is the probability that the walker will reach position -1 from position &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then it can be seen that &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)=\frac{1}{2}P(n-1)+\frac{1}{2}P(n+2)&amp;lt;/math&amp;gt;. Solutions to this recurrence relation come in the form &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt; P(n)=c_0{\left(\frac{\sqrt{5}-1}{2}\right)}^n+c_1+c_2{\left(-\frac{1+\sqrt{5}}{2}\right)}^n&amp;lt;/math&amp;gt;, which after applying the appropriate boundary conditions reduces to &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;P(n)={\left(\frac{\sqrt{5}-1}{2}\right)}^{n+1}&amp;lt;/math&amp;gt;. This means that if the walker were to get to position 1073720884 then the probability of it ever reaching position -1 is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;{\left(\frac{\sqrt{5}-1}{2}\right)}^{1073720885}\approx 4.841\times 10^{-224394395}&amp;lt;/math&amp;gt;. This combined with the fact that the expected position of the walker after &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; steps is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\frac{1}{2}k&amp;lt;/math&amp;gt; strongly suggests Antihydra will not halt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;To view an animation of the blank tape becoming &amp;lt;math&amp;gt;A(6,23)&amp;lt;/math&amp;gt; in 419 steps, click [https://wiki.bbchallenge.org/w/images/3/36/AHydra_0-419.gif here].&#039;&#039;&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:Individual machines]]&lt;br /&gt;
[[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1636</id>
		<title>Antihydra</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Antihydra&amp;diff=1636"/>
		<updated>2025-03-03T21:41:11Z</updated>

		<summary type="html">&lt;p&gt;Coda: Add visualization of the evolution of the Antihydra&amp;#039;s &amp;quot;a&amp;quot; variable in binary representation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{machine|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA}}{{unsolved|Does Antihydra run forever?}}&lt;br /&gt;
[[File:Antihydra-depiction.png|right|thumb|Artistic depiction of Antihydra by Jadeix]]&lt;br /&gt;
&#039;&#039;&#039;Antihydra&#039;&#039;&#039; ({{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}) is a [[probviously]] nonhalting [[BB(6)]] [[Collatz-like]] [[Cryptid]]. In fact, it was the first identified BB(6) Cryptid. It is closely related to [[Hydra]].&lt;br /&gt;
&lt;br /&gt;
It simulates iterations of the Collatz-like [[Hydra function]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;H(n) = \left\lfloor \frac{3n}{2} \right\rfloor = \begin{cases}&lt;br /&gt;
  \frac{3n}{2}     &amp;amp; \text{if } n \text{ even} \\&lt;br /&gt;
  \frac{3n-1}{2}  &amp;amp; \text{if } n \text{ odd} \\&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;starting from 8:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;8 \to 12 \to 18 \to 27 \to 40 \to 60 \to 90 \to 135 \to 202 \cdots&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Antihydra halts if and only if the cumulative number of odd values in this sequence is ever more than twice the cumulative number of even values.&lt;br /&gt;
&lt;br /&gt;
If we treat the parity of successive values in this sequence as independent random coin flips, then this is a biased random walk and has a miniscule chance of ever halting, thus we say that this TM &amp;quot;probviously&amp;quot; does not halt. But proving this would require solving a Collatz-like problem.&lt;br /&gt;
&lt;br /&gt;
== Turing Machine ==&lt;br /&gt;
Antihydra is the TM {{TM|1RB1RA_0LC1LE_1LD1LC_1LA0LB_1LF1RE_---0RA|undecided}}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Antihydra&lt;br /&gt;
!&lt;br /&gt;
!0&lt;br /&gt;
!1&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;A&#039;&#039;&#039;&lt;br /&gt;
|1RB&lt;br /&gt;
|1RA&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;B&#039;&#039;&#039;&lt;br /&gt;
|0LC&lt;br /&gt;
|1LE&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;C&#039;&#039;&#039;&lt;br /&gt;
|1LD&lt;br /&gt;
|1LC&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;D&#039;&#039;&#039;&lt;br /&gt;
|1LA&lt;br /&gt;
|0LB&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;E&#039;&#039;&#039;&lt;br /&gt;
|1LF&lt;br /&gt;
|1RE&lt;br /&gt;
|-&lt;br /&gt;
!&#039;&#039;&#039;F&#039;&#039;&#039;&lt;br /&gt;
| ---&lt;br /&gt;
|0RA&lt;br /&gt;
|}&lt;br /&gt;
It was discovered by @mxdys on 28 Jun 2024 and shared on Discord&amp;lt;ref&amp;gt;[https://discord.com/channels/960643023006490684/1026577255754903572/1256223215206924318 Discord message], accessed 30 June 2024.&amp;lt;/ref&amp;gt; and Racheline discovered that it iterates the Hydra function.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
[[File:Antihydra increasing value.png|thumb|Binary representation of the first 1000 steps of the evolution of the exponentially increasing variable of the Antihydra iteration (a = a + a//2), the colored background indicating whether the value is even (blue) or odd (red)]]&lt;br /&gt;
Let &amp;lt;math&amp;gt;A(a+4, b) = 0^\infty \; 1^b \; 0 \; 1^a \; E&amp;gt; \; 0^\infty&amp;lt;/math&amp;gt;, then&amp;lt;ref&amp;gt;S. Ligocki, &amp;quot;[https://www.sligocki.com/2024/07/06/bb-6-2-is-hard.html BB(6) is Hard (Antihydra)]&amp;quot; (2024). Accessed 22 July 2024.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{array}{l}&lt;br /&gt;
  \text{Start}&amp;amp;&amp;amp; \to &amp;amp; A(8,    &amp;amp; 0) \\&lt;br /&gt;
  A(2a,   &amp;amp; b) &amp;amp; \to &amp;amp; A(3a,   &amp;amp; b+2) \\&lt;br /&gt;
  A(2a+1, &amp;amp; b) &amp;amp; \to &amp;amp; A(3a+1, &amp;amp; b-1) &amp;amp; \text{if} &amp;amp; b&amp;gt;0 \\&lt;br /&gt;
  A(2a+1, &amp;amp; 0) &amp;amp; \to &amp;amp; \text{HALT}&lt;br /&gt;
\end{array}&amp;lt;/math&amp;gt;At each iteration, &amp;lt;math&amp;gt;a \mapsto H(a)&amp;lt;/math&amp;gt; and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;b \mapsto \begin{cases}&lt;br /&gt;
  b+2    &amp;amp; \text{if } a \text{ is even} \\&lt;br /&gt;
  b-1    &amp;amp; \text{if } a \text{ is odd} \\&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
halting iff b ever reaches -1.&lt;br /&gt;
&lt;br /&gt;
== Biased Random Walk ==&lt;br /&gt;
If we consider the sequence of parities of &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; to be independent random coin flips, then the movement of &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; is a biased random walk (50% chance of +2, 50% of -1). Starting from &amp;lt;math&amp;gt;b = n&amp;lt;/math&amp;gt;, the chance of such a random walk ever reaching &amp;lt;math&amp;gt;b = -1&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\left(\frac{1}{\phi}\right)^{n+1}&amp;lt;/math&amp;gt; and the expected value of b after k steps is &amp;lt;math&amp;gt;\frac{k}{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Simulation ==&lt;br /&gt;
@mxdys has simulated this iteration out to &amp;lt;math&amp;gt;2^{31} = 2\,147\,483\,648&amp;lt;/math&amp;gt; steps at which point &amp;lt;math&amp;gt;b = 1\,073\,720\,884&amp;lt;/math&amp;gt; ([https://discord.com/channels/960643023006490684/1026577255754903572/1258509066196746351 Discord link]), this is 20940 (0.002%) below the expected value if this were a random walk. If this was a random walk, the chance of ever halting from this point is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\left(\frac{1}{\phi}\right)^{1\,073\,720\,885} &amp;lt; \left(\frac{1}{2}\right)^{500\,000\,000}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
an extremely miniscule chance.&lt;br /&gt;
&lt;br /&gt;
==Sources==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Individual machines]]&lt;br /&gt;
[[Category:Cryptids]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=File:Antihydra_increasing_value.png&amp;diff=1635</id>
		<title>File:Antihydra increasing value.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=File:Antihydra_increasing_value.png&amp;diff=1635"/>
		<updated>2025-03-03T21:36:41Z</updated>

		<summary type="html">&lt;p&gt;Coda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Binary representations of the evolution of the a = a + a//2 part of the Antihydra, the color of the background indicating whether the current line&#039;s value is even (blue) or odd (red):&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra_table.png&amp;diff=1005</id>
		<title>File:Bbchallenge antihydra table.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra_table.png&amp;diff=1005"/>
		<updated>2024-10-09T07:40:50Z</updated>

		<summary type="html">&lt;p&gt;Coda: Coda uploaded a new version of File:Bbchallenge antihydra table.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
https://wiki.bbchallenge.org/wiki/File:Bbchallenge_antihydra.png with Turing Machine transition table&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra.png&amp;diff=1004</id>
		<title>File:Bbchallenge antihydra.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra.png&amp;diff=1004"/>
		<updated>2024-10-09T07:40:25Z</updated>

		<summary type="html">&lt;p&gt;Coda: Coda uploaded a new version of File:Bbchallenge antihydra.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Poster for the Antihydra Cryptid - image by Jadeix from https://wiki.bbchallenge.org/wiki/File:Antihydra-depiction.png&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra_table.png&amp;diff=1003</id>
		<title>File:Bbchallenge antihydra table.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra_table.png&amp;diff=1003"/>
		<updated>2024-10-08T22:08:26Z</updated>

		<summary type="html">&lt;p&gt;Coda: Coda uploaded a new version of File:Bbchallenge antihydra table.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
https://wiki.bbchallenge.org/wiki/File:Bbchallenge_antihydra.png with Turing Machine transition table&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra.png&amp;diff=1002</id>
		<title>File:Bbchallenge antihydra.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra.png&amp;diff=1002"/>
		<updated>2024-10-08T21:48:07Z</updated>

		<summary type="html">&lt;p&gt;Coda: Coda uploaded a new version of File:Bbchallenge antihydra.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Poster for the Antihydra Cryptid - image by Jadeix from https://wiki.bbchallenge.org/wiki/File:Antihydra-depiction.png&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra_table.png&amp;diff=1001</id>
		<title>File:Bbchallenge antihydra table.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra_table.png&amp;diff=1001"/>
		<updated>2024-10-08T19:17:29Z</updated>

		<summary type="html">&lt;p&gt;Coda: https://wiki.bbchallenge.org/wiki/File:Bbchallenge_antihydra.png with Turing Machine transition table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
https://wiki.bbchallenge.org/wiki/File:Bbchallenge_antihydra.png with Turing Machine transition table&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra.png&amp;diff=1000</id>
		<title>File:Bbchallenge antihydra.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=File:Bbchallenge_antihydra.png&amp;diff=1000"/>
		<updated>2024-10-08T18:50:30Z</updated>

		<summary type="html">&lt;p&gt;Coda: Poster for the Antihydra Cryptid - image by Jadeix from https://wiki.bbchallenge.org/wiki/File:Antihydra-depiction.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Poster for the Antihydra Cryptid - image by Jadeix from https://wiki.bbchallenge.org/wiki/File:Antihydra-depiction.png&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Busy_Beaver_Functions&amp;diff=572</id>
		<title>Busy Beaver Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Busy_Beaver_Functions&amp;diff=572"/>
		<updated>2024-07-27T20:48:37Z</updated>

		<summary type="html">&lt;p&gt;Coda: Add &amp;quot;starting from a blank tape&amp;quot; condition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Busy Beaver Game is the search for Turing machines which maximize various &#039;&#039;&#039;Busy Beaver Functions&#039;&#039;&#039;. All Busy Beaver functions are non-computable. There are several, related functions with different authors referring to one or the other as &amp;quot;the Busy Beaver function&amp;quot;. Therefore, it is recommended that you use a more specific designation when referring to one specific Busy Beaver function.&lt;br /&gt;
&lt;br /&gt;
The two most commonly used Busy Beaver functions are:&lt;br /&gt;
&lt;br /&gt;
* The Maximum Shift function &amp;lt;math&amp;gt;S(n, m)&amp;lt;/math&amp;gt; which is the most commonly used Busy Beaver function by bbchallenge and is generally called &amp;lt;math&amp;gt;BB(n, m)&amp;lt;/math&amp;gt; here.&lt;br /&gt;
* The Maximum Score function &amp;lt;math&amp;gt;\Sigma(n, m)&amp;lt;/math&amp;gt; which is Tibor Radó&#039;s original Busy Beaver function.&lt;br /&gt;
where &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; denotes the number of states and &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; the number of symbols.&lt;br /&gt;
&lt;br /&gt;
== Max Shift Function S(n, m) ==&lt;br /&gt;
The Maximum Shift or Maximum Step function is the largest number of steps (or shifts) that any Turing machine (of a certain size, and starting with a blank tape) takes before halting. It was introduced by Tibor Radó in his seminal Busy Beaver paper.&amp;lt;ref&amp;gt;Tibor Radó (May 1962). &amp;quot;[https://computation4cognitivescientists.weebly.com/uploads/6/2/8/3/6283774/rado-on_non-computable_functions.pdf On non-computable functions]&amp;quot; (PDF). &#039;&#039;Bell System Technical Journal&#039;&#039;. &#039;&#039;&#039;41&#039;&#039;&#039; (3): 877–884. https://doi.org/10.1002%2Fj.1538-7305.1962.tb00480.x&amp;lt;/ref&amp;gt; He used the notation &amp;lt;math&amp;gt;S(n)&amp;lt;/math&amp;gt; to define it for Turing machines with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; states and 2 symbols. This was later extended to &amp;lt;math&amp;gt;S(n, m)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; states and &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; symbols. Notably, the halting transition counts as a step, so the TM with rule &amp;lt;code&amp;gt;A0 -&amp;gt; 1RZ&amp;lt;/code&amp;gt; halts in 1 step.&lt;br /&gt;
&lt;br /&gt;
Ben-Amram calls this the &amp;lt;math&amp;gt;time(n)&amp;lt;/math&amp;gt; function.&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;Ben-Amram A.M., Julstrom B.A. and Zwick U. (1996). [http://dx.doi.org/10.1007/BF01192693 A note on busy beavers and other creatures]. &#039;&#039;Mathematical Systems Theory&#039;&#039; &#039;&#039;&#039;29&#039;&#039;&#039; (4), July-August 1996, 375-386.&amp;lt;/ref&amp;gt; Harland calls it the &amp;quot;frantic frog&amp;quot; function &amp;lt;math&amp;gt;ff(n)&amp;lt;/math&amp;gt;.&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;James Harland. [https://dl.acm.org/doi/pdf/10.5555/1151785.1151794 The Busy Beaver, the Placid Platypus and other Crazy Creatures]. 2006.&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In his 2020 survey, Scott Aaronson used the notation &amp;lt;math&amp;gt;BB(n, m)&amp;lt;/math&amp;gt; for the Max Shift function and referred to it as &amp;quot;the&amp;quot; Busy Beaver function.&amp;lt;ref&amp;gt;Scott Aaronson. [https://scottaaronson.blog/?p=4916 The Busy Beaver Frontier]. 2020.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Max Score Function Σ(n, m) ==&lt;br /&gt;
The Maximum Score function is the largest number of ones (or non-zero symbols in general) left on the tape by any halting Turing machine (of a certain size, and starting with a blank tape) at the moment it halts. It was also introduced by Tibor Radó in his seminal paper. He called it the &amp;quot;score&amp;quot; of the Turing machine. He used the notation &amp;lt;math&amp;gt;\Sigma(n)&amp;lt;/math&amp;gt; to define it for Turing machines with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; states and 2 symbols. This was later extended to &amp;lt;math&amp;gt;\Sigma(n, m)&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; states and &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; symbols.&lt;br /&gt;
&lt;br /&gt;
Ben-Amram calls this the &amp;lt;math&amp;gt;ones(n)&amp;lt;/math&amp;gt; function.&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt; Harland calls it the &amp;quot;busy beaver&amp;quot; function &amp;lt;math&amp;gt;bb(n)&amp;lt;/math&amp;gt;.&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt; Before Aaronson&#039;s survey, this was the function that most people called &amp;quot;the&amp;quot; Busy Beaver function.&lt;br /&gt;
&lt;br /&gt;
== Other Busy Beaver functions ==&lt;br /&gt;
In addition to the above functions, there are a couple of others that have appeared in the literature:&lt;br /&gt;
&lt;br /&gt;
* Maximum space: Ben-Amram call this &amp;lt;math&amp;gt;space(n)&amp;lt;/math&amp;gt;&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;, bbchallenge calls it &amp;lt;code&amp;gt;BB_SPACE(n)&amp;lt;/code&amp;gt; or &amp;lt;math&amp;gt;BB_{space}(n)&amp;lt;/math&amp;gt;. This is the total number of tape cells read before halting. According to Ben-Amram, it includes the starting cell, but not necessarily the cell the halting transition moves to.&lt;br /&gt;
* Maximum consecutive ones: Ben-Amram calls this &amp;lt;math&amp;gt;num(n)&amp;lt;/math&amp;gt;.&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt; A TM only qualifies if it halts with all ones consecutive on tape.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=462</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=462"/>
		<updated>2024-07-13T18:24:01Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Noncomputable Sequences */ Add BB_clean, BB_ones and &amp;quot;Size of the Runtime Spectrum&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs.&lt;br /&gt;
&lt;br /&gt;
TODO: group by position in arithmetical hierarchy&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|BB_SPACE(1,2)=2, BB_SPACE(2,2)=4, BB_SPACE(3,2)=7, BB_SPACE(4,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|Lazy Beaver&lt;br /&gt;
|&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337805|A337805]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|[https://nickdrozd.github.io/2021/02/14/blanking-beavers.html Blanking Beavers]&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state m-symbol Turing machine can make on an initially blank tape until it is blank again (halting or not)&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|BB_clean&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state 2-symbol Turing machine can make on an initially blank tape until it halts on a blank tape&lt;br /&gt;
|(see comments #75 and #77 [https://scottaaronson.blog/?p=5661 here])&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|BB_ones&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of 1&#039;s that an n-state 2-symbol Turing machine can make in a row, before halting on a 0 next to it&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Size of the Runtime Spectrum&lt;br /&gt;
|&lt;br /&gt;
|The number of distinct runtimes for a machine with a given number of symbols, for increasing number of states&lt;br /&gt;
|see &amp;quot;The Spectrum of Runtimes&amp;quot; [https://www.scottaaronson.com/papers/bb.pdf here (.pdf)]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
* Any of the above for machines with more than one tape, or tapes with more dimensions (2d grid, 3d, n-d...)&lt;br /&gt;
* Machines with a finite tape, or a circular one of a certain length&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=401</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=401"/>
		<updated>2024-07-11T18:25:24Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Noncomputable Sequences */ color -&amp;gt; symbol to stick with the convention on the site&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs.&lt;br /&gt;
&lt;br /&gt;
TODO: group by position in arithmetical hierarchy&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|BB_SPACE(1,2)=2, BB_SPACE(2,2)=4, BB_SPACE(3,2)=7, BB_SPACE(4,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|Lazy Beaver&lt;br /&gt;
|&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337805|A337805]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|[https://nickdrozd.github.io/2021/02/14/blanking-beavers.html Blanking Beavers]&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state m-symbol Turing machine can make on an initially blank tape until it is blank again&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=400</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=400"/>
		<updated>2024-07-11T18:24:48Z</updated>

		<summary type="html">&lt;p&gt;Coda: /* Noncomputable Sequences */ Add Blanking Beaver sequence&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs.&lt;br /&gt;
&lt;br /&gt;
TODO: group by position in arithmetical hierarchy&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|BB_SPACE(1,2)=2, BB_SPACE(2,2)=4, BB_SPACE(3,2)=7, BB_SPACE(4,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|Lazy Beaver&lt;br /&gt;
|&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337805|A337805]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|[https://nickdrozd.github.io/2021/02/14/blanking-beavers.html Blanking Beavers]&lt;br /&gt;
|&lt;br /&gt;
|The maximum number of steps that an n-state m-color Turing machine can make on an initially blank tape until it is blank again&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
	<entry>
		<id>https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=399</id>
		<title>Sequences</title>
		<link rel="alternate" type="text/html" href="https://wiki.bbchallenge.org/w/index.php?title=Sequences&amp;diff=399"/>
		<updated>2024-07-11T17:28:30Z</updated>

		<summary type="html">&lt;p&gt;Coda: Add value contribution hint&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists sequences related to the Busy Beaver functions.&lt;br /&gt;
&lt;br /&gt;
These tables are incomplete, you can help by adding missing items. If you add a value, please add a reference to a paper or code with which it was computed/proved if possible.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;canonical&amp;quot; values of a sequence are maintained on another Wiki page, please link to that, instead of replicating them here.&lt;br /&gt;
&lt;br /&gt;
=== Computable Sequences ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|2-symbol TM count&lt;br /&gt;
|Number of n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) (halting or not) Turing machines.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A052200|A052200]]&lt;br /&gt;
|-&lt;br /&gt;
|Number of n-state 2-symbol halt-free TMs&lt;br /&gt;
|A Turing machine is halt-free if none of its instructions lead to the halt state.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337025|A337025]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Noncomputable Sequences ===&lt;br /&gt;
The following sequences depend on the specific behavior of programs.&lt;br /&gt;
&lt;br /&gt;
TODO: group by position in arithmetical hierarchy&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sequence Name&lt;br /&gt;
!Symbol&lt;br /&gt;
!Description&lt;br /&gt;
!Values&lt;br /&gt;
![[oeis:|OEIS]] sequence&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift Function]]&lt;br /&gt;
|S(n, m)&lt;br /&gt;
|The maximal number of steps that an n-state, m-symbol Turing machine can make on an initially blank tape before eventually halting.&lt;br /&gt;
|[[Main Page|see the Main Page]]&lt;br /&gt;
|[[oeis:A060843|A060843]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score Function]]&lt;br /&gt;
|Σ(n, m)&lt;br /&gt;
|Maximal number of 1&#039;s that an n-state, m-symbol Turing machine can print on an initially blank tape before halting.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A028444|A028444]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|BB_SPACE(n,m)&lt;br /&gt;
|Maximum number of memory cells visited by a halting Turing machine with n states and m symbols starting from all-0 memory tape&lt;br /&gt;
|BB_SPACE(1,2)=2, BB_SPACE(2,2)=4, BB_SPACE(3,2)=7, BB_SPACE(4,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|Number of n-state Turing machines which halt.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A004147|A004147]]&lt;br /&gt;
|-&lt;br /&gt;
|Lazy Beaver&lt;br /&gt;
|&lt;br /&gt;
|The smallest positive number of steps a(n) such that no n-state Turing machine halts in exactly a(n) steps on an initially blank tape.&lt;br /&gt;
|&lt;br /&gt;
|[[oeis:A337805|A337805]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Beeping Busy Beaver]]&lt;br /&gt;
|BBB(n)&lt;br /&gt;
|The latest possible step that any 2-symbol TM with n states exits a chosen state finitely many times&lt;br /&gt;
|see [[Beeping Busy Beaver#Results]]&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#S(n, m)&lt;br /&gt;
|The number of programs that halt after exactly S(n,m) steps ([[Busy Beaver Functions#Max Shift Function S(n, m)|Max Shift]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#S(1,2)=32, #S(2,2)=40, #S(3,2)=16&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#Σ(n, m)&lt;br /&gt;
|The number of programs that halt with Σ(n, m) 1&#039;s on the tape ([[Busy Beaver Functions#Max Score Function Σ(n, m)|Max Score]]) for each n of a given m (including all equivalent transformations)&lt;br /&gt;
|#Σ(1,2)=16, #Σ(2,2)=4, #Σ(3,2)=40&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|#BB_SPACE(n,m)&lt;br /&gt;
|The number of programs that visited the most number of tape cells for a given (n,m) (including all equivalent transformations)&lt;br /&gt;
|#BB_SPACE(1,2)=32, #BB_SPACE(2,2)=24, #BB_SPACE(3,2)=48&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The number of non-halting programs with n states which reach infinitely many tape cells&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|The average number of states that are reached infinitely many times, among all non-halting turing machines with n states&lt;br /&gt;
|&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== More possibilities ===&lt;br /&gt;
&lt;br /&gt;
* The number of distinct final tape states of halting machines with n states and m symbols, for some definition of &amp;quot;distinct&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Further information ===&lt;br /&gt;
For more information on sequences, see the [[oeis:wiki/Busy_Beaver_numbers|OEIS Wiki: Busy Beaver Numbers]], [https://oeis.org/search?q=busy+beaver OEIS search: &amp;quot;busy beaver&amp;quot;] and [[oeis:wiki/Index_to_OEIS:_Section_Br#beaver|OEIS Wiki: &amp;quot;related to busy beaver&amp;quot;]]&lt;/div&gt;</summary>
		<author><name>Coda</name></author>
	</entry>
</feed>