Fractran: Difference between revisions

From BusyBeaverWiki
Jump to navigation Jump to search
Champions: Add section on the simple behavior of small champions.
BMO1: reduction to 36, verified by Shawn
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''Fractran''' (originally styled FRACTRAN) is an esoteric Turing complete model of computation invented by John Conway in 1987.<ref>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. <nowiki>http://doi.org/10.1007/978-1-4612-4808-8_2</nowiki></ref> In this model a program is simply a finite list of fractions, the program state is an integer. For more details see https://en.wikipedia.org/wiki/FRACTRAN
'''Fractran''' (originally styled FRACTRAN) is an esoteric Turing complete model of computation invented by John Conway in 1987.<ref>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. <nowiki>http://doi.org/10.1007/978-1-4612-4808-8_2</nowiki></ref> 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.
'''BB_fractran'''(n) or '''BBf'''(n) is the Busy Beaver function for Fractran programs.


== 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>. 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>. We say that a program has runtime N (or halts in N steps) starting in state s if <math>s \to s_1 \to \cdots \to s_N </math> and no rule applies to <math>s_N </math>.
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.


Let <math>\Omega(n)</math> be the total number of prime factors of a positive integer n. In other words <math>\Omega(1) = 0</math> and <math>\Omega(pn) = \Omega(n)</math> for any prime number p. 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, ... 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.
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 35: Line 40:
!Example Champion
!Example Champion
!Vector Representation
!Vector Representation
|-
| 1 || 0 || <code>[1/1]</code>
|
|-
|-
| 2 || 1 || <code>[1/2]</code>
| 2 || 1 || <code>[1/2]</code>
Line 117: 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 125: 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 133: 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 141: 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 149: 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 || 370 || <code>[5/6, 49/2, 3/5, 160/7]</code>
| 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 157: 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
|≥ 746
|<code>[7/15, 22/3, 6/77, 5/2, 9/5]</code>
|<math>\begin{bmatrix}
    0 &    -1 &    -1 &    1 &    0 \\
    1 &    -1 &    0 &    0 &    1 \\
    1 &    1 &    0 &    -1 &    -1 \\
  -1 &    0 &    1 &    0 &    0 \\
    0 &    2 &    -1 &    0 &    0
\end{bmatrix}</math>
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1438019511155691521/1438480761169776733 13 Nov 2025]
|34 holdouts remain
|-
|21
|≥  31,957,632
|<code>[7/15, 4/3, 27/14, 5/2, 9/5]</code>
|
|Jason Yuen (@-d) [https://discord.com/channels/960643023006490684/1438019511155691521/1439759182587891894 16 Nov 2025]
|783 holdouts remain
|-
|22
|
|
|
|
|
|-
|23
|
|
|
|
|
|}
|}


=== Behavior of Champions ===
=== Behavior of Champions ===
All champions up to BBf(14) have very simple behavior. They are all of the form: <math>\left[ \frac{3^a}{2}, \frac{5^b}{3}, ... \frac{p_n^z}{p_{n-1}}, \frac{1}{p_n} \right]</math> or in vector representation (limited to 5 primes):
 
==== 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):


<math display="block">\begin{bmatrix}
<math display="block">\begin{bmatrix}
   -1 & a & 0 & 0 & 0 \\
   -1 & a_1 &   0 &   0 &   0 \\
     0 & -1 & b & 0 & 0 \\
     0 & -1 & a_2 &   0 &   0 \\
     0 & 0 & -1 & c & 0 \\
     0 &   0 & -1 & a_3 &   0 \\
     0 & 0 & 0 & -1 & d \\
     0 &   0 &   0 & -1 & a_4 \\
     0 & 0 & 0 & 0 & -1
     0 &   0 &   0 &   0 & -1
\end{bmatrix}</math>
\end{bmatrix}</math>


These champions all apply the first rule until they've exhasted all 2s, the second rule until they've exhausted all 3s, etc. They have a runtime of <math>1 + a + ab + abc + abcd + \cdots</math> and size <math>2k + a + b + c + d + \cdots</math> where k is the number of rules/primes used. This grows linearly for k=1 (BBf(5) to BBf(10)) and quadratically for k=2 (BBf(11) ot BBf(14)).
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 <math>1 + a_1 + a_1 a_2 + a_1 a_2 a_3 + \cdots = \sum_{i=0}^k \prod_{j=1}^i a_j</math> and size <math>2k+2 + \sum_{i=1}^k a_i</math>. 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 <math>m,n \ge 0</math>)
 
<math display="block">\begin{bmatrix}
  -1 & -1 &  1 &  0 \\
  -1 &  0 &  0 &  n \\
    0 &  1 & -1 &  0 \\
    m &  0 &  1 & -1
\end{bmatrix}</math>
 
which have size <math>m+n+12</math>
 
This family obeys the following rules:
 
# <math>[1, 0, 0, 0] \xrightarrow{1} [0, 0, 0, n]</math>
# if d≥1 and b≤m:<math display="block">[0, b, 0, d] \xrightarrow{m+b+2} [0, b+1, 0, d - 1 + n(m-b)]</math>
# if d≥1 and b≥m:<math display="block">[0, b, 0, d] \xrightarrow{2m+2} [0, b+1, 0, d - 1]</math>
#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:<math display="block">1 + n(m+1)(m(m+1)+2) - \frac{m(m+1)}{2}</math>
 
The optimal choices for n,m for various program sizes are:
{| class="wikitable"
|+
!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):
 
<math display="block">\begin{bmatrix}
    0 &    -1 &    -1 &    1 &    0 \\
    1 &    -1 &    0 &    0 &    1 \\
    1 &    1 &    0 &    -1 &    -1 \\
  -1 &    0 &    1 &    0 &    0 \\
    0 &    2 &    -1 &    0 &    0
\end{bmatrix}</math>
 
This program implements a [[Collatz-like]] iteration. Let <math>C(n) = [0, 0, n, 2, 0]</math>, then:
 
<math display="block">\begin{array}{lcl}
  [1,0,0,0,0] & \xrightarrow{49}    & C(2) \\
  C(3k)      & \xrightarrow{3k}    & \text{halt} \\
  C(3k+1)    & \xrightarrow{11k+22} & C(4k+3) \\
  C(3k+2)    & \xrightarrow{11k+22} & C(4k+4) \\
\end{array}</math>
 
which follows the reasonably "lucky" trajectory:
 
<math display="block">C(2) \to C(4) \to C(7) \to C(11) \to C(16) \to C(23) \to C(32) \to C(44) \to C(60) \to \text{halt}</math>
 
== 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 ([https://discord.com/channels/960643023006490684/1438019511155691521/1438230006571470919 Discord]):
 
<code>[507/22, 26/33, 245/2, 5/21, 1/3, 11/13, 22/5]</code>
<math display="block">
\begin{bmatrix}
  -1 &    1 &    0 &    0 &    -1 &    2 \\
    1 &    -1 &    0 &    0 &    -1 &    1 \\
  -1 &    0 &    1 &    2 &    0 &    0 \\
    0 &    -1 &    1 &    -1 &    0 &    0 \\
    0 &    -1 &    0 &    0 &    0 &    0 \\
    0 &    0 &    0 &    0 &    1 &    -1 \\
    1 &    0 &    -1 &    0 &    1 &    0
\end{bmatrix}
</math>
 
The intended interpretation is that if we let <math>S(h,w) = [1, 0, 0, w, h-3, 0]
</math> then it follows the following rules:
 
<math display="block">\begin{array}{lcl}
  [1,0,\dots]  & =    & S(3, 0) \\
  S(2k,  0)  & \to^* & \text{halt} \\
  S(2k,  w+1) & \to^* & S(3k,  w) \\
  S(2k+1, w)  & \to^* & S(3k+1, w+2) \\
\end{array}</math>
 
=== BMO1 ===
A size 36 program which simulates [[BMO1]] rules ([https://discord.com/channels/960643023006490684/1438019511155691521/1440018895212642424 Discord]):
 
<code>[153/55, 2/11, 26/35, 3/7, 11/17, 7/13, 25/6, 55/2, 14/3]</code>
<math display="block">
\begin{bmatrix}
    0 &    2 &    -1 &    0 &    -1 &    0 &    1 \\
    1 &    0 &    0 &    0 &    -1 &    0 &    0 \\
    1 &    0 &    -1 &    -1 &    0 &    1 &    0 \\
  0 &    1 &    0 &    -1 &    0 &    0 &    0 \\
  0 &    0 &    0 &    0 &    1 &    0 &    -1 \\
    0 &    0 &    0 &    1 &    0 &    -1 &    0 \\
    -1 &    -1 &    2 &    0 &    0 &    0 &    0 \\
    -1 &    0 &    1 &    0 &    1 &    0 &    0 \\
    1 &    -1 &    0 &    1 &    0 &    0 &    0 \\
\end{bmatrix}
</math>
 
Let <math>A(a,b) = [a, b, 0, 0, 0, 0, 0]</math>, then it follows the rules:
 
<math display="block">\begin{array}{lcl}
  [1,0,\dots] & \to^* & A(1, 2) \\
  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^* & \text{Halt} & \text{if } a = b \\
\end{array}</math>


== References ==
== References ==
<references />
<references />
[[Category:Functions]]

Latest revision as of 18:13, 17 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 [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).

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 34 holdouts remain
21 ≥ 31,957,632 [7/15, 4/3, 27/14, 5/2, 9/5] Jason Yuen (@-d) 16 Nov 2025 783 holdouts remain
22
23

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

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

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 (Discord):

[507/22, 26/33, 245/2, 5/21, 1/3, 11/13, 22/5] [110012110011101200011100010000000011101010]

The intended interpretation is that if we let S(h,w)=[1,0,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

A size 36 program which simulates 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

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