Busy Beaver Coder

From BusyBeaverWiki
Revision as of 21:08, 30 November 2026 by NathFR76 (talk | contribs) (BBC(23,2,2) = 103 steps !)
Jump to navigation Jump to search

The Busy Beaver Coder (BBC) function is a variant of the Busy Beaver function proposed by NathFR76. Busy Beaver Coder is a variant of the Busy Beaver problem like SKI calculus but in Busy Beaver version.

BBC(n)

A BBC machine (function denoted BBC(n)) consists of four program branches:

P=(A0,A1,B0,B1,C0,C1)

It has:

  • Three states: A, B and C
  • Two tape symbols: 0 and 1
  • A bi-infinite tape, initially filled with zeros
  • A head initially positioned at cell 0
  • An initial state of A

Each branch is selected according to the current state and the symbol being read:

Branch Selection condition
A0 State A, reading 0
A1 State A, reading 1
B0 State B, reading 0
B1 State B, reading 1
C0 State C, reading 0
C1 State C, reading 1

Each branch is a finite string over the alphabet:

0,1,L,R,A,B,C,H

The instructions are executed sequentially:

Character Action
0 Write 0 on the current cell
1 Write 1 on the current cell
L Move one cell to the left
R Move one cell to the right
A Switch to state A
B Switch to state B
C Switch to state C
H Halt immediately

Important: Executing an entire branch counts as exactly one BBC step, regardless of the number of characters in that branch.

After the branch has been executed, the next branch is selected according to the resulting state and the symbol currently being read.

If a selected branch is empty, the machine halts. This activation still counts as one step. If the instruction H is encountered, the machine halts immediately, and any characters following H are ignored.

The program length is defined as:

|P|=|A0|+|A1|+|B0|+|B1|+|C0|+|C1|

Branch labels and separators are not counted.

The BBC function is defined by:

BBC(n)=max|P|=n haltsT(P)

where (T(P)) is the total number of BBC steps executed before the machine halts.

In other words, BBC(n) is the maximum number of branch activations performed by any halting BBC program of exactly (n) characters.

BBC(n,k,p)

The BBC model can be generalized using three independent parameters:

  • n: the maximum total number of instructions in the program
  • k: the number of available states
  • p: the number of available tape symbols


A generalized BBC machine has:

  • k states, denoted (Q0,Q1,…,Qk−1)
  • p tape symbols, denoted (0,1,…,p−1), with 0 as the blank symbol
  • A total of (k×p) program branches, one for each possible combination of state and scanned symbol


Each branch is a finite sequence of instructions, an instruction can:

  • Write one of the p available symbols on the current tape cell
  • Move the tape head one cell to the left or right
  • Change the current state to one of the k available states


At each activation, the machine selects the branch corresponding to its current state and the symbol currently scanned by the head. It then executes the entire branch, instruction by instruction, before selecting the next branch.

As in the original model, an empty branch causes the machine to halt. This final activation is counted as one BBC step

The initial configuration consists of a blank tape, the head positioned at cell 0, and the machine in its initial state Q0


The program size is the total number of instructions across all branches, excluding separators:

|P|=∑i=0k−1∑j=0p−1|Pi,j|

Each instruction counts as one unit, regardless of how its state or symbol identifier is written.


We define:

BBC(n,k,p)=max⁡{Steps(P):|P|≤n, P halts}

Thus, n, k, and p are independent parameters: n controls program size, k controls the number of states, and p controls the tape alphabet size.

The original BBC model corresponds to:

BBC(n)=BBC(n,3,2)

Known values and lower bounds

The following table summarizes the currently known results:

example champion for BBC(n): A0|A1|B0|B1|C0|C1

Domain Max Steps Champions
2 states, 2 symbols
BBC(0,2,2) 1 |||
BBC(1,2,2) 2 1|||
BBC(2,2,2) 3 1|B||
BBC(3,2,2) 4 B||1|A
BBC(4,2,2) 4 B||1|A
BBC(5,2,2) 5 LB|R|1A|
BBC(6,2,2) 9 LLB|R|1A|
BBC(7,2,2) 11 1LLB|R|1A|
BBC(8,2,2) 12 LLLB|RR|1A|
BBC(9,2,2) 14 1B||LLL1LA|R
BBC(10,2,2) 17 1B||1LLL1LA|R
BBC(11,2,2) 20 1B||L1RRRRA|LL
BBC(12,2,2) 21 1LB||1RRR1RA|0A
BBC(13,2,2) 22 1L1B||1LLLL1LA|R
BBC(14,2,2) 28 1LLLL1B|0LB||RRRA
BBC(15,2,2) 30 1LLLL0LB||1R|0RRRA
BBC(16,2,2) 41 L1LLLLLB|0RR|1RRRA|
BBC(17,2,2) 41 1LLLB||1R1RR1RRRA|0L
BBC(18,2,2) 43 1LB||1LLLLLL1LL1RA|RR
BBC(19,2,2) 72 1LL1LLLLB|L0RR|1R1RRA|
BBC(20,2,2) 72 1LL1LLLLB|L0RR|1R1RRA|
BBC(21,2,2) 72 LLB|LLL|1RRRRR1RR1RRR1A|
BBC(22,2,2) 103 R1LLLL1LLL1LLB|0RRR|1R1A|
BBC(23,2,2) 103 R1LLLL1LLL1LLB|0RRR|1R1A|
2 states, 3 symbols
BBC(0,2,3) 1 |||||
BBC(1,2,3) 2 1|||||
BBC(2,2,3) 3 B|||1||
BBC(3,2,3) 4 B|||2||A
BBC(4,2,3) 5 B||1|2||A
BBC(5,2,3) 6 B|B|1|2||A
BBC(6,2,3) 9 LLB||R|2A||
BBC(7,2,3) 14 2|R|B|1A||LL
BBC(8,2,3) 18 2B|R|1|2A||LL
BBC(9,2,3) 23 2B|2R||R|A|1LL
BBC(10,2,3) 63 2B|R2|R|1A||LLL
BBC(11,2,3) 63 2B|R2|R|1A||LLL
BBC(12,2,3) 237 2B|2L|1R|LLL1A||R
BBC(13,2,3) 348 2LLLB||0R|1R|0L|RA
BBC(14,2,3) 7,462 LLB||1RR|1L2A|2L|1R
2 states, 4 symbols
BBC(0,2,4) 1 |||||||
BBC(1,2,4) 2 1|||||||
BBC(2,2,4) 3 B||||1|||
BBC(3,2,4) 4 2||B||||L|
BBC(4,2,4) 5 B||1||2||A|
BBC(5,2,4) 6 B|B|1||2||A|
BBC(6,2,4) 9 LLB||R||2A|||
BBC(7,2,4) 14 2|R|B||1A||LL|
BBC(8,2,4) 18 2|3|B|R|1|A|LL|
BBC(9,2,4) 24 2|3|B|R|1A|LL|1|
BBC(10,2,4) 63 2B|R2|R||1A||LLL|
...
BBC(21,2,4) > 3,932,964 1RB|2LA|1RA|1RA|1LB|1LA|3RB|
3 states, 2 symbols
BBC(0) 1 |||||
BBC(1) 2 1|||||
BBC(2) 3 B||C|||
BBC(3) 4 B||C||1|
BBC(4) 5 1|B||C||0
BBC(5) 6 B|B|C||1|A
BBC(6) 9 RRB|L|1A|||
BBC(7) 13 RRB|L|C||1|A
BBC(8) 17 B|R|1|LLC|1A|
BBC(9) 23 1RRRB|L|C||L|A
BBC(10) 34 1RRRRB|L|C||L|A
BBC(11) 47 1RRRRRB|L|C||L|A
BBC(12) 62 1RRRRRRB|L|C||L|A
BBC(13) 119 1RRRRRB|0L|C||L|LA
BBC(14) 264 1RRRRRRB|0L|C||L|LA
BBC(15) 4,482 1L1B|R|1RRRC|LL||0RA
BBC(16) 4,482 1L1B|R|1RRRC|LL||0RA
BBC(17) 7,533 1B|LB|1R1RC|LL||0R1RRA
BBC(18) > 8,806 1B|LC|1R1R0R1RRA|LL||0A
...
BBC(333) > Googol (10100) 1R325 B|0L|C||L|LA
3 states, 3 symbols
BBC(0,3,3) 1 ||||||||
BBC(1,3,3) 2 1||||||||
BBC(2,3,3) 3 B|||2|||||
BBC(3,3,3) 4 B|||C|||2||
BBC(4,3,3) 5 B||C|2||A|||
BBC(5,3,3) 6 B||C|2||A|||L
BBC(6,3,3) 9 LLB|R||1A|||||
BBC(7,3,3) 14 2|R|B|1A||LL|||
BBC(8,3,3) 18 2|R|B|C||LL|1|A|
BBC(9,3,3) 24 B|R|1|2||C|2A||LL
BBC(10,3,3) 63 2B|R2|R|1A||LLL|||
...
BBC(24,3,3) > 119,112,334,170,342,541 0RB|2LA|1RA|1LA|2RB|1RC||1LB|1LC
4 states, 2 symbols
BBC(0,4,2) 1 |||||||
BBC(1,4,2) 2 1|||||||
BBC(2,4,2) 3 B||1|||||
BBC(3,4,2) 4 B||C||D|||
BBC(4,4,2) 5 B||C||D||1|
BBC(5,4,2) 6 B||C||D||1|A
BBC(6,4,2) 9 LLB|R|1A|||||
BBC(7,4,2) 13 LLB|R|C||1|A||
BBC(8,4,2) 17 B|R|1|LLC|1A|||
BBC(9,4,2) 23 1LLLB|R|C||R|A||
BBC(10,4,2) 34 1LLLLB|R|C||R|A||
BBC(11,4,2) 47 1LLLLLB|R|C||R|A||
...
BBC(21,4,2) > 107 1RB|1LB|1LA|0LC||1LD|1RD|0RA
5 states, 2 symbols
BBC(0,5,2) 1 |||||||||
BBC(1,5,2) 2 1|||||||||
BBC(2,5,2) 3 B||1|||||||
BBC(3,5,2) 4 B||1|A||||||
BBC(4,5,2) 5 B||C||D||E|||
BBC(5,5,2) 6 B|C|1|A||D||||
BBC(6,5,2) 9 LLB|R|1A|||||||
BBC(7,5,2) 13 LLB|R|C||1|A||||
BBC(8,5,2) 17 B|R|1|LLC|1A|||||
BBC(9,5,2) 23 1LLLB|R|C||R|A||||
BBC(10,5,2) 34 1LLLLB|R|C||R|A||||
...
BBC(27,5,2) > 47,176,870 1RB|1LC|1RC|1RB|1RD|0LE|1LA|1LD||0LA

A 17-character program reaching 7,533 steps

The following program has exactly 17 characters:

Branch Program
A0 1B
A1 LB
B0 1R1RC
B1 LL
C0
C1 0R1RRA

Its execution has been independently verified to halt after 7,533 steps.

Estimate known function for some n

Comparisons between for some n, BBC(n) and known function, which fα(n) is Fast Growing Hierarchy

Domain Functions
2 states, 2 symbols
BBC(6,2,2) > f0(n)
BBC(16,2,2) > f1(n)
BBC(19,2,2) > 3n
BBC(22,2,2) > 4n
2 states, 3 symbols
BBC(6,2,3) > f0(n)
BBC(8,2,3) > f1(n)
BBC(10,2,3) > 6n
BBC(12,2,3) > n2
BBC(14,2,3) > n3
2 states, 4 symbols
BBC(6,2,4) > f0(n)
BBC(8,2,4) > f1(n)
BBC(10,2,4) > 6n
3 states, 2 symbols
BBC(6) > f0(n)
BBC(8) > f1(n)
BBC(10) > 3n
BBC(11) > 4n
BBC(12) > 5n
BBC(13) > 9n
BBC(14) > n2+4n
BBC(15) > n3+4n2
BBC(17) > n3+9n2
BBC(333) > 2n
3 states, 3 symbols
BBC(6,3,3) > f0(n)
BBC(8,3,3) > f1(n)
BBC(10,3,3) > 6n
4 states, 2 symbols
BBC(6,4,2) > f0(n)
BBC(8,4,2) > f1(n)
BBC(10,4,2) > 3n
BBC(11,4,2) > 4n
5 states, 2 symbols
BBC(6,5,2) > f0(n)
BBC(8,5,2) > f1(n)
BBC(10,5,2) > 3n

Monotonicity

Since characters placed after a halting instruction H are never executed, a program can be extended without changing its execution time.

Consequently, the BBC function is non-decreasing:

BBC(n+1)≥BBC(n)