Fractran: Difference between revisions
→BBf(20): Add steps to BBf(20) analysis |
→Hydra: Add fraction version of Hydra. |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 29: | Line 29: | ||
== 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. | |||
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]. | |||
<div class="toccolours mw-collapsible mw-collapsed">'''Small Champions'''<div class="mw-collapsible-content"> | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
| Line 114: | Line 119: | ||
0 & 0 & -1 | 0 & 0 & -1 | ||
\end{bmatrix}</math> | \end{bmatrix}</math> | ||
|} | |||
</div></div> | |||
{| class="wikitable" | |||
|+ | |||
!n | |||
!BBf(n) | |||
!Example Champion | |||
!Vector Representation | |||
!Champion Found | |||
!Holdouts Proven | |||
|- | |- | ||
| 15 || 28 || <code>[1/45, 4/5, 3/2, 25/3]</code> | | 15 || 28 || <code>[1/45, 4/5, 3/2, 25/3]</code> | ||
| Line 122: | Line 138: | ||
0 & -1 & 2 | 0 & -1 & 2 | ||
\end{bmatrix}</math> | \end{bmatrix}</math> | ||
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1362008236118511758/1434033599094587595 1 Nov 2025] | |||
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1362008236118511758/1434033599094587595 1 Nov 2025] | |||
|- | |- | ||
| 16 || 53 || <code>[1/45, 4/5, 3/2, 125/3]</code> | | 16 || 53 || <code>[1/45, 4/5, 3/2, 125/3]</code> | ||
| Line 130: | Line 148: | ||
0 & -1 & 3 | 0 & -1 & 3 | ||
\end{bmatrix}</math> | \end{bmatrix}</math> | ||
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1362008236118511758/1434033599094587595 1 Nov 2025] | |||
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1362008236118511758/1434033599094587595 1 Nov 2025] | |||
|- | |- | ||
| 17 || 107 || <code>[5/6, 49/2, 3/5, 40/7]</code> | | 17 || 107 || <code>[5/6, 49/2, 3/5, 40/7]</code> | ||
| Line 138: | Line 158: | ||
3 & 0 & 1 & -1 | 3 & 0 & 1 & -1 | ||
\end{bmatrix}</math> | \end{bmatrix}</math> | ||
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1362008236118511758/1434313398799175710 1 Nov 2025] | |||
|Daniel Yuan (@dyuan01) [https://discord.com/channels/960643023006490684/1362008236118511758/1434771877376557086 3 Nov 2025] | |||
|- | |- | ||
| 18 || 211 || <code>[5/6, 49/2, 3/5, 80/7]</code> | | 18 || 211 || <code>[5/6, 49/2, 3/5, 80/7]</code> | ||
| Line 146: | Line 168: | ||
4 & 0 & 1 & -1 | 4 & 0 & 1 & -1 | ||
\end{bmatrix}</math> | \end{bmatrix}</math> | ||
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1362008236118511758/1435313806493614131 4 Nov 2025] | |||
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1362008236118511758/1436661215911870584 8 Nov 2025] | |||
|- | |- | ||
| 19 || | | 19 || 370 || <code>[5/6, 49/2, 3/5, 160/7]</code> | ||
|<math>\begin{bmatrix} | |<math>\begin{bmatrix} | ||
-1 & -1 & 1 & 0 \\ | -1 & -1 & 1 & 0 \\ | ||
| Line 154: | Line 178: | ||
5 & 0 & 1 & -1 | 5 & 0 & 1 & -1 | ||
\end{bmatrix}</math> | \end{bmatrix}</math> | ||
|@creeperman7002 [https://discord.com/channels/960643023006490684/1362008236118511758/1435763150489387090 5 Nov 2025] | |||
|Decider: Daniel Yuan (@dyuan01) [https://discord.com/channels/960643023006490684/1438019511155691521/1438558242388312165 13 Nov 2025] | |||
3 Holdouts: Racheline & Shawn Ligocki | |||
|- | |- | ||
|20 | |20 | ||
|≥ | |≥ 746 | ||
|<code>[ | |<code>[7/15, 22/3, 6/77, 5/2, 9/5]</code> | ||
|<math>\begin{bmatrix} | |<math>\begin{bmatrix} | ||
-1 & -1 & | & -1 & -1 & +1 & \\ | ||
+1 & -1 & & & +1 \\ | |||
+1 & +1 & & -1 & -1 \\ | |||
-1 & & +1 & & \\ | |||
-1 & | & +2 & -1 & & | ||
\end{bmatrix}</math> | \end{bmatrix}</math> | ||
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1438019511155691521/1438480761169776733 13 Nov 2025] | |||
| | |||
|} | |} | ||
| Line 243: | Line 272: | ||
=== BBf(20) === | === BBf(20) === | ||
The BBf(20) champion (running | The BBf(20) champion (running 746 steps): | ||
<math display="block">\begin{bmatrix} | <math display="block">\begin{bmatrix} | ||
-1 & -1 & | & -1 & -1 & +1 & \\ | ||
+1 & -1 & & & +1 \\ | |||
+1 & +1 & & -1 & -1 \\ | |||
-1 & & +1 & & \\ | |||
-1 & | & +2 & -1 & & | ||
\end{bmatrix}</math> | \end{bmatrix}</math> | ||
This program implements a [[Collatz-like]] iteration. Let <math>C(n) = [ | This program implements a [[Collatz-like]] iteration. Let <math>C(n) = [0, 0, n, 2, 0]</math>, then: | ||
<math display="block">\begin{array}{lcl} | <math display="block">\begin{array}{lcl} | ||
[1,0,0,0,0] & \xrightarrow{ | [1,0,0,0,0] & \xrightarrow{49} & C(2) \\ | ||
C(3k) & \xrightarrow{3k} & \text{halt} \\ | C(3k) & \xrightarrow{3k} & \text{halt} \\ | ||
C(3k+1) & \xrightarrow{11k+22} & C(4k+3) \\ | C(3k+1) & \xrightarrow{11k+22} & C(4k+3) \\ | ||
| Line 270: | Line 299: | ||
=== Hydra === | === Hydra === | ||
A size 29 program that simulates [[Hydra]] rules (here the 0s have been omitted to avoid clutter): | A size 29 program that simulates [[Hydra]] rules: <code>[507/22, 26/33, 245/2, 5/21, 1/3, 11/13, 22/5]</code> and in vector form (here the 0s have been omitted to avoid clutter): | ||
<math display="block">\begin{bmatrix} | <math display="block">\begin{bmatrix} | ||
| Line 320: | Line 349: | ||
== References == | == References == | ||
<references /> | <references /> | ||
[[Category:Functions]] | |||
Latest revision as of 20:41, 14 November 2025
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
BB_fractran(n) or BBf(n) is the Busy Beaver function for Fractran programs.
Definition
A fractran program is a list of rational numbers called rules and a fractran state is an integer . 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 applies to state if . 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 and and . As with Turing machines, we will write if (s goes to t after N steps) and or if 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 and computation halts on t.
Let be the total number of prime factors of a positive integer n. In other words, . Then given a rule we say that . And the size of a fractran program is .
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 to represent the number .
Let the vector representation (for a sufficiently large n) for a state be and the vector representation for a rule be (Note that this is just an extension of the original definition extended to allow negative ).
Now, rule q applies to state s iff (all components of the vector are ≥0) and if then . 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:
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).
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.
| n | BBf(n) | Example Champion | Vector Representation |
|---|---|---|---|
| 2 | 1 | [1/2]
|
|
| 3 | 1 | [3/2]
|
|
| 4 | 1 | [9/2]
|
|
| 5 | 2 | [3/2, 1/3]
|
|
| 6 | 3 | [9/2, 1/3]
|
|
| 7 | 4 | [27/2, 1/3]
|
|
| 8 | 5 | [81/2, 1/3]
|
|
| 9 | 6 | [243/2, 1/3]
|
|
| 10 | 7 | [729/2, 1/3]
|
|
| 11 | 10 | [27/2, 25/3, 1/5]
|
|
| 12 | 13 | [81/2, 25/3, 1/5]
|
|
| 13 | 17 | [81/2, 125/3, 1/5]
|
|
| 14 | 21 | [243/2, 125/3, 1/5]
|
| n | BBf(n) | Example Champion | Vector Representation | Champion Found | Holdouts Proven |
|---|---|---|---|---|---|
| 15 | 28 | [1/45, 4/5, 3/2, 25/3]
|
Jason Yuen (@-d) 1 Nov 2025 | Jason Yuen (@-d) 1 Nov 2025 | |
| 16 | 53 | [1/45, 4/5, 3/2, 125/3]
|
Jason Yuen (@-d) 1 Nov 2025 | Jason Yuen (@-d) 1 Nov 2025 | |
| 17 | 107 | [5/6, 49/2, 3/5, 40/7]
|
Jason Yuen (@-d) 1 Nov 2025 | Daniel Yuan (@dyuan01) 3 Nov 2025 | |
| 18 | 211 | [5/6, 49/2, 3/5, 80/7]
|
Jason Yuen (@-d) 4 Nov 2025 | Jason Yuen (@-d) 8 Nov 2025 | |
| 19 | 370 | [5/6, 49/2, 3/5, 160/7]
|
@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]
|
Jason Yuen (@-d) 13 Nov 2025 |
Behavior of Champions
Sequential programs
All champions up to BBf(14) have very simple behavior. They are all of the form: or in vector representation (limited to k=4):
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 and size . 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(17) Family
The BBf(17) to BBf(19) champions are members of a family of programs (parameterized by )
which have size
This family obeys the following rules:
- if d≥1 and b≤m:
- if d≥1 and b≥m:
- 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:
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)
The BBf(20) champion (running 746 steps):
This program implements a Collatz-like iteration. Let , then:
which follows the reasonably "lucky" trajectory:
Cryptids
No fractran Cryptids have been found yet via enumeration, but some have been constructed by hand.
Hydra
A size 29 program that simulates Hydra rules: [507/22, 26/33, 245/2, 5/21, 1/3, 11/13, 22/5] and in vector form (here the 0s have been omitted to avoid clutter):
The intended interpretation is that if we let then it follows the following rules:
BMO1
A size 49 program which simulates BMO1 rules:
Let , then it follows the rules:
References
- ↑ 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