Fractran: Difference between revisions

From BusyBeaverWiki
Jump to navigation Jump to search
Polygon (talk | contribs)
m Deciders: grammar
C7X (talk | contribs)
 
(27 intermediate revisions by 4 users not shown)
Line 6: Line 6:


== Definition ==
== Definition ==
A fractran program is a list of rational numbers <math>[q_0, q_1, ... q_{k-1}]</math>called rules and a fractran state is an integer <math>s \in \mathbb{Z}</math>. 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 <math>q_i</math> applies to state <math>s</math> if <math>s \cdot q_i \in \mathbb{Z}</math>. 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 <math>s \to t</math> and <math>t = s \cdot q_i</math> and <math>i = \min \{ i : s \cdot q_i \in \mathbb{Z} \}</math>. As with [[Turing machines]], we will write <math>s \xrightarrow{N} t</math> if <math>s \to s_1 \to \cdots \to s_{N-1} \to t </math> (s goes to t after N steps) and <math>s \to^* t</math> or <math>s \to^+ t</math> if <math>s \xrightarrow{N} t</math> 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 <math>s \xrightarrow{N} t</math> and computation halts on t.
A Fractran program is a list of rational numbers <math>[q_0, q_1, \dots, q_{k-1}]</math> called rules and a Fractran state is an integer <math>s \in \mathbb{Z}</math>. 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 <math>q_i</math> applies to state <math>s</math> if <math>s \cdot q_i \in \mathbb{Z}</math>. 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 <math>s \to t</math> and <math>t = s \cdot q_i</math> and <math>i = \min \{ i : s \cdot q_i \in \mathbb{Z} \}</math>. As with [[Turing machines]], we will write <math>s \xrightarrow{N} t</math> if <math>s \to s_1 \to \cdots \to s_{N-1} \to t</math> (s goes to t after N steps) and <math>s \to^* t</math> or <math>s \to^+ t</math> if <math>s \xrightarrow{N} t</math> 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 <math>s \xrightarrow{N} t</math> and computation halts on t.


Let <math>\Omega(n)</math> be the total number of prime factors of a positive integer n. In other words, <math>\Omega(2^{a_0} 3^{a_1} \cdots p_n^{a_n}) = \sum_{k=0}^n a_n</math>. Then given a rule <math>\frac{a}{b} </math> we say that <math>\text{size} \left( \frac{a}{b} \right) = \Omega(a) + \Omega(b) </math>. And the size of a fractran program <math>[q_0, q_1, ... q_{k-1}]</math> is <math>k + \sum_{i=0}^{k-1} \text{size}(q_i) </math>.
Let <math>\Omega(n)</math> be the total number of prime factors of a positive integer n. In other words, <math>\Omega(2^{a_0} 3^{a_1} \cdots p_n^{a_n}) = \sum_{k=0}^n a_n</math>. Then given a rule <math>\frac{a}{b}</math> we say that <math>\text{size} \left( \frac{a}{b} \right) = \Omega(a) + \Omega(b)</math>. And the size of a Fractran program <math>[q_0, q_1, \dots, q_{k-1}]</math> is <math>k + \sum_{i=0}^{k-1} \text{size}(q_i)</math>.


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


== Vector Representation ==
== Vector Representation ==
Line 17: Line 17:
Let the vector representation (for a sufficiently large n) for a state <math>a = 2^{a_0} 3^{a_1} \cdots p_{n-1}^{a_{n-1}}</math> be <math>v(a) = [ a_0, a_1, \dots, a_{n-1} ] \in \mathbb{N}^n</math> and the vector representation for a rule <math>\frac{a}{b}</math> be <math>v \left( \frac{a}{b} \right) = v(a) - v(b) \in \mathbb{Z}^n</math> (Note that this is just an extension of the original definition extended to allow negative <math>a_i</math>).
Let the vector representation (for a sufficiently large n) for a state <math>a = 2^{a_0} 3^{a_1} \cdots p_{n-1}^{a_{n-1}}</math> be <math>v(a) = [ a_0, a_1, \dots, a_{n-1} ] \in \mathbb{N}^n</math> and the vector representation for a rule <math>\frac{a}{b}</math> be <math>v \left( \frac{a}{b} \right) = v(a) - v(b) \in \mathbb{Z}^n</math> (Note that this is just an extension of the original definition extended to allow negative <math>a_i</math>).


Now, rule q applies to state s iff <math>v(s) + v(q) \in \mathbb{N}^n</math> (all components of the vector are ≥0) and if <math>s \to t</math> then <math>v(t) = v(s) + v(q)</math>. 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.
Now, rule q applies to state s iff <math>v(s) + v(q) \in \mathbb{N}^n</math> (all components of the vector are ≥0) and if <math>s \to t</math> then <math>v(t) = v(s) + v(q)</math>. 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.


For example, the BBf(15) champion (<code>[1/45, 4/5, 3/2, 25/3]</code>) in vector representation would be:
For example, the BBf(15) champion (<code>[1/45, 4/5, 3/2, 25/3]</code>) in vector representation would be:
Line 28: Line 28:
\end{bmatrix}</math>
\end{bmatrix}</math>


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).
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).


=== Relationship to VAS / Petri Nets ===
=== Relationship to VAS / Petri Nets ===
Using vector representation, fractran programs are a deterministic version of [[wikipedia:Vector_addition_system|Vector Addition Systems (VAS)]] (and, equivalently, [[wikipedia:Petri_net|Petri Nets]]). VAS are identical to fractran programs in vector representation except that the rules are unordered and non-deterministic, they are used to model distributed systems where precise order of rule execution cannot be predicted. Interestingly, many problems about VAS are actually decidable, but their runtimes are extremely slow. Notably, the reachability problem (given states A and B are there a sequence of rules so that <math>A \to^* B</math>) is "Ackermann-complete" meaning that the optimal algorithm has worst-case runtime akin to the famously fast-growing Ackermann function.<ref>Czerwiński, Wojciech; Orlikowski, Łukasz (2021). ''Reachability in Vector Addition Systems is Ackermann-complete''. 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS). https://arxiv.org/abs/2104.13866.</ref>
Using vector representation, Fractran programs are a deterministic version of [[wikipedia:Vector_addition_system|Vector Addition Systems (VAS)]] (and, equivalently, [[wikipedia:Petri_net|Petri Nets]]). VAS are identical to Fractran programs in vector representation except that the rules are unordered and non-deterministic, they are used to model distributed systems where precise order of rule execution cannot be predicted. Interestingly, many problems about VAS are actually decidable, but their runtimes are extremely slow. Notably, the reachability problem (given states A and B are there a sequence of rules so that <math>A \to^* B</math>) is "Ackermann-complete" meaning that the optimal algorithm has worst-case runtime akin to the famously fast-growing Ackermann function.<ref>Czerwiński, Wojciech; Orlikowski, Łukasz (2021). ''Reachability in Vector Addition Systems is Ackermann-complete''. 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS). https://arxiv.org/abs/2104.13866.</ref>
 
== Visualizing Fractran Programs' Space-Time Diagrams ==
Katelyn Doucette's Fractran space-time diagram visualizer produces the following space-time diagrams for some notable Fractran Programs, under the following principle: Each color represents a prime factor. Left -> right colors indicating the index of that register, and how wide the color is representing how big the value is at that step. Source code: https://github.com/Laturas/FractranVisualizer
{| class="wikitable"
|+
|[[File:Fractran_22_Cryptid.webp|alt=The space-time diagram of Fenrir|460x460px]]
The space-time diagram of Fenrir
|[[File:Hydra.webp|alt=The space-time diagram of Hydra.|460x460px]]
The space-time diagram of Hydra.
|[[File:Bbf21 champ full.png|alt=The space-time diagram of the BBf(21) champion.|400x400px]]
 
The space-time diagram of the BBf(21) champion. The width & height of the diagram can be set in the visualizer.
|[[File:Space_Needle.webp|alt=The space-time diagram of Space Needle.|460x460px]]
The space-time diagram of Space Needle.
|}


== Deciders ==
== Deciders ==
[[File:Fractran deciders.png|alt=Fractran deciders|thumb|All Fractran deciders summarized and their relations, shared by Daniel Yuan on [https://discord.com/channels/960643023006490684/1438019511155691521/1439001835904958655 14 Nov 2025]]]Many specialized deciders have been invented to prove fractran programs non-halting. See image at right. There are three extra deciders: [https://discord.com/channels/960643023006490684/1438019511155691521/1449775657554022531 Spanning Vectors Masked,] which should be very effective, but implementing it is in-progress, a version of Spanning Vectors Masked - [https://discord.com/channels/960643023006490684/1438019511155691521/1453217977385091092 Masked Linear Invariant] - which is very powerful, and some holdouts were removed by [[User:Sligocki|Shawn Ligocki]] with [https://lsv.ens-paris-saclay.fr/Software/fast/ FAST] (Fast Acceleration of Symbolic Transition systems), a pre-existing general tool.
[[File:Fractran deciders.png|alt=Fractran deciders|thumb|All Fractran deciders summarized and their relations, shared by Daniel Yuan on [https://discord.com/channels/960643023006490684/1438019511155691521/1439001835904958655 14 Nov 2025]]]Many specialized deciders have been invented to prove Fractran programs non-halting. See image at right. There are three extra deciders: [https://discord.com/channels/960643023006490684/1438019511155691521/1449775657554022531 Spanning Vectors Masked,] which should be very effective, but implementing it is in-progress, a version of Spanning Vectors Masked - [https://discord.com/channels/960643023006490684/1438019511155691521/1453217977385091092 Masked Linear Invariant] - which is very powerful, and some holdouts were removed by [[User:Sligocki|Shawn Ligocki]] with [https://lsv.ens-paris-saclay.fr/Software/fast/ FAST] (Fast Acceleration of Symbolic Transition systems), a pre-existing general tool.
 
-d released a new decider on 25 Jan 2026: [https://discord.com/channels/960643023006490684/1438019511155691521/1464873923647639703 Beeping Permutation].


== Champions ==
== Champions ==
The table of champions is split into two pieces: the first for small champions (up to BBf(14)) which all share the same relatively simple behavior (sequential programs) is collapsed by default; the second for champions BBf(15) and beyond which have more complex and varied behavior.
The table of champions is split into two pieces: the first for small champions (up to BBf(14)) which all share the same relatively simple behavior (sequential programs) is collapsed by default; the second for champions BBf(15) and beyond which have more complex and varied behavior.
All small champions as well as the first few larger ones were discovered and proven maximal by Jason Yuen (@-d) in their initial enumeration on [https://discord.com/channels/960643023006490684/1362008236118511758/1434033599094587595 1 Nov 2025].
All small champions as well as the first few larger ones were discovered and proven maximal by Jason Yuen (@-d) in their initial enumeration on [https://discord.com/channels/960643023006490684/1362008236118511758/1434033599094587595 1 Nov 2025].


Line 209: Line 225:
|-
|-
|21
|21
|31,957,632
|31,957,632
|<code>[7/15, 4/3, 27/14, 5/2, 9/5]</code>
|<code>[7/15, 4/3, 27/14, 5/2, 9/5]</code>
|<math>\begin{bmatrix}
|<math>\begin{bmatrix}
Line 219: Line 235:
\end{bmatrix}</math>
\end{bmatrix}</math>
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1438019511155691521/1439759182587891894 16 Nov 2025]
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1438019511155691521/1439759182587891894 16 Nov 2025]
|394 holdouts remain. [https://discord.com/channels/960643023006490684/1438019511155691521/1454556504190357585 27 Dec 2025]
|140 holdouts remain. [https://discord.com/channels/960643023006490684/1438019511155691521/1464873923647639703 25 Jan 2026]
Claude Opus 4.6 proof of nonhalting of all 140: [https://discord.com/channels/960643023006490684/1438019511155691521/1485168251997786173 28 March 2026]
|-
|-
|22
|22
Line 233: Line 250:
\end{bmatrix}</math>
\end{bmatrix}</math>
|Shawn Ligocki (@sligocki) [https://discord.com/channels/960643023006490684/1438019511155691521/1448912286713384961 11 Dec 2025] and Jason Yuen (@-d)<sup>[https://discord.com/channels/960643023006490684/1438019511155691521/1448953682237460480 <nowiki>[1]</nowiki>]</sup>
|Shawn Ligocki (@sligocki) [https://discord.com/channels/960643023006490684/1438019511155691521/1448912286713384961 11 Dec 2025] and Jason Yuen (@-d)<sup>[https://discord.com/channels/960643023006490684/1438019511155691521/1448953682237460480 <nowiki>[1]</nowiki>]</sup>
|7743 holdouts remain. [https://discord.com/channels/960643023006490684/1438019511155691521/1454556504190357585 27 Dec 2025]
|2003 holdouts remain. [https://discord.com/channels/960643023006490684/1438019511155691521/1464873923647639703 25 Jan 2026]
 
Known [[Cryptid|Cryptids]]:
 
# Fenrir
|-
|-
|23
|23
Line 249: Line 270:


==== Sequential programs ====
==== Sequential programs ====
All champions up to BBf(14) have very simple behavior. They are all of the form: <math>\left[ \frac{3^{a_1}}{2}, \frac{5^{a_2}}{3}, ... \frac{p_n^{a_k}}{p_{k-1}}, \frac{1}{p_k} \right]</math> or in vector representation (limited to k=4):
All champions up to BBf(14) have very simple behavior. They are all of the form: <math>\left[ \frac{3^{a_1}}{2}, \frac{5^{a_2}}{3}, \dots, \frac{p_n^{a_k}}{p_{k-1}}, \frac{1}{p_k} \right]</math> or in vector representation (limited to k=4):


<math display="block">\begin{bmatrix}
<math display="block">\begin{bmatrix}
Line 335: Line 356:
|51
|51
|-
|-
|17
|'''''17'''''
|2
|'''''2'''''
|3
|'''''3'''''
|107
|'''''107'''''
|-
|-
|18
|'''''18'''''
|2
|'''''2'''''
|4
|'''''4'''''
|211
|'''''211'''''
|-
|-
|19
|'''''19'''''
|2
|'''''2'''''
|5
|'''''5'''''
|370
|'''''370'''''
|-
|-
|20
|20
Line 361: Line 382:
|}
|}


<br>
==== BBf(20) ====
==== BBf(20) ====
[[File:Screenshot 2026-04-01 104704.png|alt=Full space-time diagram of the BBf(20) champion.|left|507x507px]]
The BBf(20) champion (running 746 steps):
The BBf(20) champion (running 746 steps):


Line 386: Line 409:


==== BBf(21) ====
==== BBf(21) ====
[[File:Bbf21 champ full.png|alt=The full space-time diagram of the BBf(21) champion until halting.|thumb|The full space-time diagram of the BBf(21) champion until halting.]]
The BBf(21) champion (running >31M steps):
The BBf(21) champion (running >31M steps):
<math display="block">\begin{bmatrix}
<math display="block">\begin{bmatrix}
Line 420: Line 446:
\end{bmatrix}</math>
\end{bmatrix}</math>


This program implements a [[Collatz-like]] unbiased psuedo-random walk. Let <math>S(x,y) = [0, 0, x, 0, y]</math>, then:<sup>[https://discord.com/channels/960643023006490684/1438019511155691521/1449118888142049421]</sup>
This program implements a [[Collatz-like]] unbiased pseudo-random walk. Let <math>S(x,y) = [0, 0, x, 0, y]</math>, then:<sup>[https://discord.com/channels/960643023006490684/1438019511155691521/1449118888142049421]</sup>
<math display="block">\begin{array}{lcl}
<math display="block">\begin{array}{lcl}
   [1,0,0,0,0]  & \xrightarrow{1}      & S(0,1) \\
   [1,0,0,0,0]  & \xrightarrow{1}      & S(0,1) \\
Line 451: Line 477:


== Cryptids ==
== Cryptids ==
=== Fenrir ===
[[File:Fractran 22 Cryptid.webp|alt=The space-time diagram of Fenrir.|thumb|Partial space-time diagram of Fenrir.]]
"Fenrir" is a family of 3 size 22 [[Cryptids]] discovered by Jason Yuen (@-d) and Claude Opus 4.6 on 22 Mar 2026. Out of 500 holdouts of size 22, Claude Opus 4.6 used Lean to prove that 497 holdouts were non-halting. The remaining 3 holdouts are the Fenrir family.<sup>[https://discord.com/channels/960643023006490684/1438019511155691521/1485415054475268179]</sup> Discord user @ZTS439 shared [https://discord.com/channels/960643023006490684/1438019511155691521/1487251919444508723 some analysis] and a [https://discord.com/channels/960643023006490684/1438019511155691521/1487252789158613002 Python program] for it. Its name comes from [[wikipedia:Norse_mythology|nordic mythology]]; [[wikipedia:Fenrir|Fenrir]] is the wolf that helps destroy the world during [[wikipedia:Ragnarök|Ragnarök]].
{| class="wikitable"
|+
!Holdout number
!Holdout
!Vector Representation
|-
| 29/2003
| <code>[1/15, 27/77, 49/3, 10/49, 33/2]</code>
|<math>\begin{bmatrix}
    0 &    -1 &    -1 &    0 &    0 \\
    0 &    3 &    0 &    -1 &    -1 \\
    0 &    -1 &    0 &    2 &    0 \\
    1 &    0 &    1 &    -2 &    0 \\
  -1 &    1 &    0 &    0 &    1
\end{bmatrix}</math>
|-
| 41/2003
| <code>[1/15, 49/3, 27/77, 10/49, 33/2]</code>
|<math>\begin{bmatrix}
    0 &    -1 &    -1 &    0 &    0 \\
    0 &    -1 &    0 &    2 &    0 \\
    0 &    3 &    0 &    -1 &    -1 \\
    1 &    0 &    1 &    -2 &    0 \\
  -1 &    1 &    0 &    0 &    1
\end{bmatrix}</math>
|-
| 430/2003
| <code>[27/35, 1/33, 25/3, 22/25, 21/2]</code>
|<math>\begin{bmatrix}
    0 &    3 &    -1 &    -1 &    0 \\
    0 &    -1 &    0 &    0 &    -1 \\
    0 &    -1 &    2 &    0 &    0 \\
    1 &    0 &    -2 &    0 &    1 \\
  -1 &    1 &    0 &    1 &    0
\end{bmatrix}</math>
|}
All 3 holdouts follow a biased random walk that somewhat resembles [[Hydra]]. Let <math>S(x,y) = [x, 0, 0, 2, y]</math> (for 29/2003 and 41/2003) or <math>S(x,y) = [x, 0, 2, y, 0]</math> (for 430/2003), then:
<math display="block">\begin{array}{lcl}
  [1,0,0,0,0] & \to & S(0,1) \\
  S(0, 2y)    &  =  & \text{halt} \\
  S(x, 2y)    & \to & S(x-1, 5y+2) \\
  S(x, 2y+1)  & \to & S(x+2, 5y)
\end{array}</math>
The first few visited states are $$S(0, 1) \to S(2, 0) \to S(1, 2) \to S(0, 7) \to S(2, 15) \to S(4, 35)$$


=== Frankenstein's Monster ===
=== Frankenstein's Monster ===
[[File:Frankenstein's Monster.webp|alt=Partial space-time diagram of Frankenstein's Monster.|thumb|Partial space-time diagram of Frankenstein's Monster.]]
"Frankenstein's Monster" is a size 23 [[Cryptid]]. It was created by tweaking a single instruction in the size 22 champion. This tweak switches it from a unbiased random walk to a biased one and thus makes halting probviously impossible. It is called Frankenstein's Monster since it was found by a combination of exhaustive search and hand design.<sup>[https://discord.com/channels/960643023006490684/1438019511155691521/1449138938215141478]</sup>
"Frankenstein's Monster" is a size 23 [[Cryptid]]. It was created by tweaking a single instruction in the size 22 champion. This tweak switches it from a unbiased random walk to a biased one and thus makes halting probviously impossible. It is called Frankenstein's Monster since it was found by a combination of exhaustive search and hand design.<sup>[https://discord.com/channels/960643023006490684/1438019511155691521/1449138938215141478]</sup>


Line 464: Line 543:
\end{bmatrix}</math>
\end{bmatrix}</math>


It's behavior is extremely similar to the size 22 champion. Let <math>S(x,y) = [0, 0, x, 0, y]</math>, then:
Its behavior is extremely similar to the size 22 champion. Let <math>S(x,y) = [0, 0, x, 0, y]</math>, then:


<math display="block">\begin{array}{lcl}
<math display="block">\begin{array}{lcl}
Line 471: Line 550:
   S(3k,  y+1) & \xrightarrow{14k+4}  & S(5k+1, y+2) \\
   S(3k,  y+1) & \xrightarrow{14k+4}  & S(5k+1, y+2) \\
   S(3k+1, y+1) & \xrightarrow{14k+10} & S(5k+3, y+4) \\
   S(3k+1, y+1) & \xrightarrow{14k+10} & S(5k+3, y+4) \\
   S(3k+2, y+1) & \xrightarrow{14k+12} & S(5k+4, y) \\
   S(3k+2, y+1) & \xrightarrow{14k+12} & S(5k+4, y)
\end{array}</math>
\end{array}</math>


Line 501: Line 580:
     0 &    0 &    1 &    -1 &    0 \\
     0 &    0 &    1 &    -1 &    0 \\
     0 &    1 &    0 &    0 &    -1
     0 &    1 &    0 &    0 &    -1
\end{bmatrix}</math><syntaxhighlight>
\end{bmatrix}</math><pre>
H(a, b) = [0, 0, a-2, 0, b]
H(a, b) = [0, 0, a-2, 0, b]
Start -> H(2, 3)
Start -> H(2, 3)
Line 507: Line 586:
H(2a+1, b+1) -> H(3a+1, b)
H(2a+1, b+1) -> H(3a+1, b)
H(a,0) -> halt
H(a,0) -> halt
</syntaxhighlight>
</pre>


=== Hydra ===
=== Hydra ===
[[File:Hydra.webp|alt=Partial space-time diagram of Hydra.|thumb|300x300px|Partial space-time diagram of Hydra.]]
A size 25 program was produced and golfed by hand to simulate [[Hydra]] rules ([https://discord.com/channels/960643023006490684/1438019511155691521/1449829146040467681 Discord]):
A size 25 program was produced and golfed by hand to simulate [[Hydra]] rules ([https://discord.com/channels/960643023006490684/1438019511155691521/1449829146040467681 Discord]):


Line 531: Line 611:
   S(2k,  0)  & \to^* & \text{halt} \\
   S(2k,  0)  & \to^* & \text{halt} \\
   S(2k,  w+1) & \to^* & S(3k,  w) \\
   S(2k,  w+1) & \to^* & S(3k,  w) \\
   S(2k+1, w)  & \to^* & S(3k+1, w+2) \\
   S(2k+1, w)  & \to^* & S(3k+1, w+2)
\end{array}</math>
\end{array}</math>


=== BMO1 ===
=== BMO1 ===
[[File:Ftran bmo1.png|alt=Partial space-time diagram of BMO 1.|thumb|Partial space-time diagram of BMO 1.]]
A size 36 program was produced by hand to simulate [[BMO1]] rules ([https://discord.com/channels/960643023006490684/1438019511155691521/1440018895212642424 Discord]):
A size 36 program was produced by hand to simulate [[BMO1]] rules ([https://discord.com/channels/960643023006490684/1438019511155691521/1440018895212642424 Discord]):


Line 558: Line 639:
   A(a, b) & \to^* & A(a-b, 4b+2) & \text{if } a > b \\
   A(a, b) & \to^* & A(a-b, 4b+2) & \text{if } a > b \\
   A(a, b) & \to^* & A(2a+1, b-a) & \text{if } a < b \\
   A(a, b) & \to^* & A(2a+1, b-a) & \text{if } a < b \\
   A(a, b) & \to^* & \text{Halt} & \text{if } a = b \\
   A(a, b) & \to^* & \text{Halt} & \text{if } a = b
\end{array}</math>
\end{array}</math>


=== BMO 6 (“Space Needle”) ===
=== BMO 6 (“Space Needle”) ===
[[File:Space Needle.webp|alt=Partial space-time diagram of Space Needle.|thumb|Partial space-time diagram of Space Needle.]]
A size 48 program was produced by hand to simulate [https://wiki.bbchallenge.org/wiki/1RB1LA_1LC0RE_1LF1LD_0RB0LA_1RC1RE_---0LD BMO 6] rules ([https://discord.com/channels/960643023006490684/1438019511155691521/1441137371046482071 Discord])
A size 48 program was produced by hand to simulate [https://wiki.bbchallenge.org/wiki/1RB1LA_1LC0RE_1LF1LD_0RB0LA_1RC1RE_---0LD BMO 6] rules ([https://discord.com/channels/960643023006490684/1438019511155691521/1441137371046482071 Discord])


Line 578: Line 660:
     0 &    5 &    0 &    -1 &    0 &    0 &    0 &    0 \\
     0 &    5 &    0 &    -1 &    0 &    0 &    0 &    0 \\
     1 &    0 &    1 &    0 &    0 &    -1 &    0 &    0
     1 &    0 &    1 &    0 &    0 &    -1 &    0 &    0
\end{bmatrix}</math><syntaxhighlight>A(a, b) = B^a C^b E or B^(a-2) C^b D E
\end{bmatrix}</math><pre>A(a, b) = B^a C^b E or B^(a-2) C^b D E


Start: A(7, 1)
Start: A(7, 1)
Line 586: Line 668:
A(2a, b) --> A(5a+b+2, 1)
A(2a, b) --> A(5a+b+2, 1)


A(2a+1, b) --> A(b-1, b+c+3)</syntaxhighlight>
A(2a+1, b) --> A(b-1, b+c+3)</pre>


== References ==
== References ==

Latest revision as of 19:36, 12 April 2026

Fractran (originally styled FRACTRAN) is an esoteric Turing complete model of computation invented by John Conway in 1987.[1] 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.

Discord user Coda came up with a way to transform any Fractran program into a Turing Machine, see source.

BB_fractran(n) or BBf(n) is the Busy Beaver function for Fractran programs. Holdouts lists by Daniel Yuan: Holdouts lists

Definition

A Fractran program is a list of rational numbers [q0,q1,,qk1] called rules and a Fractran state is an integer s. 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 qi applies to state s if sqi. 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 st and t=sqi and i=min{i:sqi}. As with Turing machines, we will write sNt if ss1sN1t (s goes to t after N steps) and s*t or s+t if sNt 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 sNt and computation halts on t.

Let Ω(n) be the total number of prime factors of a positive integer n. In other words, Ω(2a03a1pnan)=k=0nan. Then given a rule ab we say that size(ab)=Ω(a)+Ω(b). And the size of a Fractran program [q0,q1,,qk1] is k+i=0k1size(qi).

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.

Vector Representation

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 [a0,a1,,an1]n to represent the number 2a03a1pn1an1.

Let the vector representation (for a sufficiently large n) for a state a=2a03a1pn1an1 be v(a)=[a0,a1,,an1]n and the vector representation for a rule ab be v(ab)=v(a)v(b)n (Note that this is just an extension of the original definition extended to allow negative ai).

Now, rule q applies to state s iff v(s)+v(q)n (all components of the vector are ≥0) and if st then v(t)=v(s)+v(q). 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.

For example, the BBf(15) champion ([1/45, 4/5, 3/2, 25/3]) in vector representation would be:

[021201110012]

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).

Relationship to VAS / Petri Nets

Using vector representation, Fractran programs are a deterministic version of Vector Addition Systems (VAS) (and, equivalently, Petri Nets). VAS are identical to Fractran programs in vector representation except that the rules are unordered and non-deterministic, they are used to model distributed systems where precise order of rule execution cannot be predicted. Interestingly, many problems about VAS are actually decidable, but their runtimes are extremely slow. Notably, the reachability problem (given states A and B are there a sequence of rules so that A*B) is "Ackermann-complete" meaning that the optimal algorithm has worst-case runtime akin to the famously fast-growing Ackermann function.[2]

Visualizing Fractran Programs' Space-Time Diagrams

Katelyn Doucette's Fractran space-time diagram visualizer produces the following space-time diagrams for some notable Fractran Programs, under the following principle: Each color represents a prime factor. Left -> right colors indicating the index of that register, and how wide the color is representing how big the value is at that step. Source code: https://github.com/Laturas/FractranVisualizer

The space-time diagram of Fenrir

The space-time diagram of Fenrir

The space-time diagram of Hydra.

The space-time diagram of Hydra.

The space-time diagram of the BBf(21) champion.

The space-time diagram of the BBf(21) champion. The width & height of the diagram can be set in the visualizer.

The space-time diagram of Space Needle.

The space-time diagram of Space Needle.

Deciders

Fractran deciders
All Fractran deciders summarized and their relations, shared by Daniel Yuan on 14 Nov 2025

Many specialized deciders have been invented to prove Fractran programs non-halting. See image at right. There are three extra deciders: Spanning Vectors Masked, which should be very effective, but implementing it is in-progress, a version of Spanning Vectors Masked - Masked Linear Invariant - which is very powerful, and some holdouts were removed by Shawn Ligocki with FAST (Fast Acceleration of Symbolic Transition systems), a pre-existing general tool.

-d released a new decider on 25 Jan 2026: Beeping Permutation.

Champions

The table of champions is split into two pieces: the first for small champions (up to BBf(14)) which all share the same relatively simple behavior (sequential programs) is collapsed by default; the second for champions BBf(15) and beyond which have more complex and varied behavior. All small champions as well as the first few larger ones were discovered and proven maximal by Jason Yuen (@-d) in their initial enumeration on 1 Nov 2025.

Small Champions
n BBf(n) Example Champion Vector Representation
2 1 [1/2] [1]
3 1 [3/2] [11]
4 1 [9/2] [12]
5 2 [3/2, 1/3] [1101]
6 3 [9/2, 1/3] [1201]
7 4 [27/2, 1/3] [1301]
8 5 [81/2, 1/3] [1401]
9 6 [243/2, 1/3] [1501]
10 7 [729/2, 1/3] [1601]
11 10 [27/2, 25/3, 1/5] [130012001]
12 13 [81/2, 25/3, 1/5] [140012001]
13 17 [81/2, 125/3, 1/5] [140013001]
14 21 [243/2, 125/3, 1/5] [150013001]
n BBf(n) Example Champion Vector Representation Champion Found Holdouts Proven
15 28 [1/45, 4/5, 3/2, 25/3] [021201110012] Jason Yuen (@-d) 1 Nov 2025 Jason Yuen (@-d) 1 Nov 2025
16 53 [1/45, 4/5, 3/2, 125/3] [021201110013] Jason Yuen (@-d) 1 Nov 2025 Jason Yuen (@-d) 1 Nov 2025
17 107 [5/6, 49/2, 3/5, 40/7] [1110100201103011] Jason Yuen (@-d) 1 Nov 2025 Daniel Yuan (@dyuan01) 3 Nov 2025
18 211 [5/6, 49/2, 3/5, 80/7] [1110100201104011] Jason Yuen (@-d) 4 Nov 2025 Jason Yuen (@-d) 8 Nov 2025
19 370 [5/6, 49/2, 3/5, 160/7] [1110100201105011] @creeperman7002 5 Nov 2025 Decider: Daniel Yuan (@dyuan01) 13 Nov 2025

3 Holdouts: Racheline & Shawn Ligocki

20 746 [7/15, 22/3, 6/77, 5/2, 9/5] [0111011001110111010002100] Jason Yuen (@-d) 13 Nov 2025 Decider: Jason Yuen (@-d)

(Enum+initial) Daniel Yuan (@dyuan01) 13 and 14 Nov 2025

Shawn Ligocki (@sligocki) 7 and 24 Dec 2025 6 Holdouts: Jason Yuen (@-d) 23 Dec 2025

21 31,957,632 [7/15, 4/3, 27/14, 5/2, 9/5] [01112100130110100210] Jason Yuen (@-d) 16 Nov 2025 140 holdouts remain. 25 Jan 2026

Claude Opus 4.6 proof of nonhalting of all 140: 28 March 2026

22 >1.146×1062 [1/12, 9/10, 14/3, 11/2, 5/7, 3/11] [210001210011010100010011001001] Shawn Ligocki (@sligocki) 11 Dec 2025 and Jason Yuen (@-d)[1] 2003 holdouts remain. 25 Jan 2026

Known Cryptids:

  1. Fenrir
23 Known Cryptids:
  1. Frankenstein's Monster
  2. Antihydra-like Cryptid

Behavior of Champions

Sequential programs

All champions up to BBf(14) have very simple behavior. They are all of the form: [3a12,5a23,,pnakpk1,1pk] or in vector representation (limited to k=4):

[1a100001a200001a300001a400001]

These champions repeatedly apply the rules in sequence, never going back to a previous rule. They apply the first rule until they've exhausted all 2s, then the second rule until they've exhausted all 3s, etc. They have a runtime of 1+a1+a1a2+a1a2a3+=i=0kj=1iaj and size 2k+2+i=1kai. 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.

BBf(15) Family

The BBf(15) and BBf(16) champions are members of a family of programs (parameterized by n1):

[02120111001n]

Let a = 2, b = 3, and c = 5.

The BBf(15) champion (n = 2) implements this iteration:

b00haltb17b4b27b5b35b2b45b3bn+53bn

which follows a permutation-like trajectory: a1b1b4b3b2b5b0halt

The BBf(16) champion (n = 3) implements this iteration:

b00haltb110b6b210b7b38b4b48b5b56b2b66b3bn+74bn

which follows a permutation-like trajectory: a1b1b6b3b4b5b2b7b0halt

BBf(17) Family

The BBf(17) to BBf(19) champions are members of a family of programs (parameterized by m,n0)

[1110100n0110m011]

which have size m+n+12

This family obeys the following rules:

  1. [1,0,0,0]1[0,0,0,n]
  2. if d≥1 and b≤m:[0,b,0,d]m+b+2[0,b+1,0,d1+n(mb)]
  3. if d≥1 and b≥m:[0,b,0,d]2m+2[0,b+1,0,d1]
  4. if d=0: [0,b,0,d] has halted

and furthermore these rules are applied in order since b is always increasing (and d is eventually decreasing). Combining these together we get runtime:1+n(m+1)(m(m+1)+2)m(m+1)2

The optimal choices for n,m for various program sizes are:

Size n m Runtime
16 1 3 51
17 2 3 107
18 2 4 211
19 2 5 370
20 2 6 596
21 3 6 904


BBf(20)

Full space-time diagram of the BBf(20) champion.

The BBf(20) champion (running 746 steps):

[0111011001110111010002100]

This program implements a Collatz-like iteration. Let C(n)=[0,0,n,2,0], then:

[1,0,0,0,0]49C(2)C(3k)3khaltC(3k+1)11k+22C(4k+3)C(3k+2)11k+22C(4k+4)

which follows the reasonably "lucky" trajectory:

C(2)C(4)C(7)C(11)C(16)C(23)C(32)C(44)C(60)halt

BBf(21)

The full space-time diagram of the BBf(21) champion until halting.
The full space-time diagram of the BBf(21) champion until halting.


The BBf(21) champion (running >31M steps): [01112100130110100210]

This program implements a Collatz-like iteration. Let D(n)=[0,0,n,0], then:[1] [1,0,0,0,0]1D(1)D(3k)khaltD(3k+1)21k+7C(10k+4)D(3k+2)21k+14C(10k+7)

which follows the reasonably "lucky" trajectory: D(1)D(4)D(14)D(47)D(157)D(524)D(1747)D(5824)D(19414)D(64714)D(215714)D(719047)D(2396824)D(7989414)halt

BBf(22)

The BBf(22) champion (running >1062 steps): [210001210011010100010011001001]

This program implements a Collatz-like unbiased pseudo-random walk. Let S(x,y)=[0,0,x,0,y], then:[2] [1,0,0,0,0]1S(0,1)S(x,0)=haltS(3k,y+1)14k+4S(5k+1,y+1)S(3k+1,y+1)14k+10S(5k+3,y+2)S(3k+2,y+1)14k+12S(5k+4,y)

This random walk iterates 275 times until it halts reaching a maximum y value of 14 at iteration 111: S(0,1)S(1,1)S(3,2)S(6,2)S(11,2)S(19,1)S(33,2)S(56,2)S(94,1)S(158,2)S(264,1)S(441,1)S(736,1)S(1228,2)S(2048,3)S(4065328691604230522442358,13)S(6775547819340384204070598,14)S(11292579698900640340117664,13)S(27930059557111373800280446055462487109112535227834136644,2)S(46550099261852289667134076759104145181854225379723561074,1)S(77583498769753816111890127931840241969757042299539268458,2)S(129305831282923026853150213219733736616261737165898780764,1)S(215509718804871711421917022032889561027102895276497967941,1)S(359182864674786185703195036721482601711838158794163279903,2)S(5894430516013404355095519889620117404469367857588232386361874,2)S(9824050860022340591825866482700195674115613095980387310603124,1)S(16373418100037234319709777471166992790192688493300645517671874,0)

Cryptids

Fenrir

The space-time diagram of Fenrir.
Partial space-time diagram of Fenrir.

"Fenrir" is a family of 3 size 22 Cryptids discovered by Jason Yuen (@-d) and Claude Opus 4.6 on 22 Mar 2026. Out of 500 holdouts of size 22, Claude Opus 4.6 used Lean to prove that 497 holdouts were non-halting. The remaining 3 holdouts are the Fenrir family.[3] Discord user @ZTS439 shared some analysis and a Python program for it. Its name comes from nordic mythology; Fenrir is the wolf that helps destroy the world during Ragnarök.

Holdout number Holdout Vector Representation
29/2003 [1/15, 27/77, 49/3, 10/49, 33/2] [0110003011010201012011001]
41/2003 [1/15, 49/3, 27/77, 10/49, 33/2] [0110001020030111012011001]
430/2003 [27/35, 1/33, 25/3, 22/25, 21/2] [0311001001012001020111010]

All 3 holdouts follow a biased random walk that somewhat resembles Hydra. Let S(x,y)=[x,0,0,2,y] (for 29/2003 and 41/2003) or S(x,y)=[x,0,2,y,0] (for 430/2003), then:

[1,0,0,0,0]S(0,1)S(0,2y)=haltS(x,2y)S(x1,5y+2)S(x,2y+1)S(x+2,5y)

The first few visited states are $$S(0, 1) \to S(2, 0) \to S(1, 2) \to S(0, 7) \to S(2, 15) \to S(4, 35)$$

Frankenstein's Monster

Partial space-time diagram of Frankenstein's Monster.
Partial space-time diagram of Frankenstein's Monster.

"Frankenstein's Monster" is a size 23 Cryptid. It was created by tweaking a single instruction in the size 22 champion. This tweak switches it from a unbiased random walk to a biased one and thus makes halting probviously impossible. It is called Frankenstein's Monster since it was found by a combination of exhaustive search and hand design.[4]

[1/12, 9/10, 14/3, 121/2, 5/7, 3/11] [210001210011010100020011001001]

Its behavior is extremely similar to the size 22 champion. Let S(x,y)=[0,0,x,0,y], then:

[1,0,0,0,0]1S(0,2)S(x,0)=haltS(3k,y+1)14k+4S(5k+1,y+2)S(3k+1,y+1)14k+10S(5k+3,y+4)S(3k+2,y+1)14k+12S(5k+4,y)

with the only difference that the y values now change by {+1,+3,-1} depending on the value of x mod 3 (instead of {0,+1,-1} in the original size 22 program). The x values follow the exact same path as in the original size 22 champion, but the y values quickly grow linearly with the number of iterations (as expected by the random model):

         0: S(0, 1)  @ 1  (0.00s)
   100_000: S(10^22_185, 100171)  @ 10^22_186  (0.87s)
   200_000: S(10^44_370, 200187)  @ 10^44_371  (3.42s)
   300_000: S(10^66_555, 300759)  @ 10^66_556  (7.68s)
   400_000: S(10^88_740, 400451)  @ 10^88_741  (13.64s)
   500_000: S(10^110_925, 500421)  @ 10^110_925  (21.28s)
   600_000: S(10^133_109, 600351)  @ 10^133_110  (30.62s)
   700_000: S(10^155_294, 700319)  @ 10^155_295  (41.64s)
   800_000: S(10^177_479, 799911)  @ 10^177_480  (54.30s)
   900_000: S(10^199_664, 900259)  @ 10^199_665  (68.59s)
 1_000_000: S(10^221_849, 1000853)  @ 10^221_850  (84.51s)
...
 4_000_000: S(10^887_395, 4000201)  @ 10^887_396  (1474.02s)
...
27_500_000: S(10^6_100_841, 27512703)  @ 10^6_100_842  (87616.45s)

Antihydra-like Cryptid

This Cryptid is a size 23 Cryptid. This Cryptid was constructed by Maksandchael by tweaking Frankenstein's Monster to make it as similar to Antihydra as possible. [9/10, 1/6, 1331/2, 14/3, 5/7, 3/11]

[121001100010003110100011001001]
H(a, b) = [0, 0, a-2, 0, b]
Start -> H(2, 3)
H(2a, b) -> H(3a, b+2)
H(2a+1, b+1) -> H(3a+1, b)
H(a,0) -> halt

Hydra

Partial space-time diagram of Hydra.
Partial space-time diagram of Hydra.

A size 25 program was produced and golfed by hand to simulate Hydra rules (Discord):

[363/14, 125/2, 22/21, 1/3, 7/11, 14/5] [110121030011011010000001110110]

The intended interpretation is that if we let S(h,w)=[1,0,w,h3,0] then it follows the following rules:

[1,0,]=S(3,0)S(2k,0)*haltS(2k,w+1)*S(3k,w)S(2k+1,w)*S(3k+1,w+2)

BMO1

Partial space-time diagram of BMO 1.
Partial space-time diagram of BMO 1.

A size 36 program was produced by hand to simulate BMO1 rules (Discord):

[153/55, 2/11, 26/35, 3/7, 11/17, 7/13, 25/6, 55/2, 14/3] [021010110001001011010010100000001010001010112000010101001101000]

Let A(a,b)=[a,b,0,0,0,0,0], then it follows the rules:

[1,0,]*A(1,2)A(a,b)*A(ab,4b+2)if a>bA(a,b)*A(2a+1,ba)if a<bA(a,b)*Haltif a=b

BMO 6 (“Space Needle”)

Partial space-time diagram of Space Needle.
Partial space-time diagram of Space Needle.

A size 48 program was produced by hand to simulate BMO 6 rules (Discord)

[77/2, 2/99, 17/33, 13/11, 285/119, 17/19, 1375/51, 1/17, 3/5, 243/7, 10/13]

[1001100012001000010010100000110001110011000000110130101000000010011000000501000010100100]
A(a, b) = B^a C^b E or B^(a-2) C^b D E

Start: A(7, 1)

A(1, b) --> halt

A(2a, b) --> A(5a+b+2, 1)

A(2a+1, b) --> A(b-1, b+c+3)

References

  1. Conway, John H. (1987). "FRACTRAN: A Simple Universal Programming Language for Arithmetic". Open Problems in Communication and Computation. Springer-Verlag New York, Inc. pp. 4–26. http://doi.org/10.1007/978-1-4612-4808-8_2
  2. Czerwiński, Wojciech; Orlikowski, Łukasz (2021). Reachability in Vector Addition Systems is Ackermann-complete. 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS). https://arxiv.org/abs/2104.13866.