Introduction to BEAF

BEAF, or Bowers Exploding Array Function, is a googological function invented by Jonathan Bowers. This article is an informal introduction to the function, meant to give an intuitive sense of how it works.

Arrow notation
Before we can understand BEAF, we must understand the extended operators at its core. Arrow notation describes a set of operators invented by :


 * \(a\uparrow b = a^b\).
 * \(a\uparrow\uparrow b = \underbrace{a\uparrow a\uparrow\ldots\uparrow a\uparrow a}_b = \underbrace{a^{a^{a^{.^{.^.}}}}}_b\). Googologists call this tetration; arrows should be solved from right to left.
 * \(a\uparrow\uparrow\uparrow b = \underbrace{a\uparrow\uparrow a\uparrow\uparrow\ldots\uparrow\uparrow a\uparrow\uparrow a}_b\). Also known as pentation.

In general,
 * \(a\uparrow^n b = \underbrace{a\uparrow^{n-1} a\uparrow^{n-1}\ldots\uparrow^{n-1} a\uparrow^{n-1} a}_b\).

Here are some examples:


 * \(3\uparrow 4 = 3^4 = 81\) (3 to the power of 4)
 * \(2\uparrow\uparrow 4 = 2\uparrow 2\uparrow 2\uparrow 2 = 2\uparrow 2\uparrow 4 = 2\uparrow 16 = 65536\) (2 tetrated to 4))
 * \(4\uparrow\uparrow 4 = 2361022671...5261392896\); about \(8.0723\cdot 10^{153}\) digits (4 tetrated to 4)
 * \(3\uparrow\uparrow\uparrow 3 = 3\uparrow\uparrow 3\uparrow\uparrow 3 = 3\uparrow\uparrow 3^{3^3} = 3\uparrow\uparrow 7625597484987\) (3 pentated to 3)

Note that \(a\uparrow^n b\) is pronounced "a (n + 2)-ated to b," not "a n-ated to b."

Operator notation
Bowers developed a generalization of arrow notation that he calls operator notation:


 * \(a\ \{n\}\ b = a\uparrow^n b\)
 * i.e.: \(a\ \{1\}\ b = a^b\)
 * and \(a\ \{n\}\ b = \underbrace{a\ \{n - 1\}\ a\ \{n - 1\}\ \ldots\ \{n - 1\}\ a\ \{n - 1\}\ a}_b\)

For example, \(3\ \{4\}\ 5 = 3\uparrow\uparrow\uparrow\uparrow 5\).

This form of operator notation is simply a shorthand for arrow notation. However, Bowers takes it a step further by wrapping n in two pairs of braces instead of one:


 * \(a\ \{\{1\}\}\ b = \underbrace{a\ \{a\ \{\ldots a\ \{a}_b\}\ a\ldots\}\ a\}\ a\)

Bowers calls this a expanded to b. Here, b is the number of "layers" including the outside, or (number of a 's + 1) / 2. (For the computer scientists out there, expansion is not primitive-recursive. You can't program it using finite for loops.)

An example:


 * \(3\ \{\{1\}\}\ 3 = 3\ \{3\ \{3\}\ 3\}\ 3 = 3\ \{3\ \{2\}\ 7625597484987\}\ 3\)

If we change n to 2, we get multiexpansion.
 * \(a\ \{\{2\}\}\ b = \underbrace{a\ \{\{1\}\}\ a\ \{\{1\}\}\ \ldots\ \{\{1\}\}\ a\ \{\{1\}\}\ a}_b\)

Higher values for n can be used:
 * \(a\ \{\{3\}\}\ b = \underbrace{a\ \{\{2\}\}\ a\ \{\{2\}\}\ \ldots\ \{\{2\}\}\ a\ \{\{2\}\}\ a}_b\) (powerexpansion)
 * \(a\ \{\{4\}\}\ b = \underbrace{a\ \{\{3\}\}\ a\ \{\{3\}\}\ \ldots\ \{\{3\}\}\ a\ \{\{3\}\}\ a}_b\) (expandotetration)
 * expandopentation, expandohexation, etc.

All these operators are right-associative, and they work just like the lower hyper-operators.

Using three braces instead of two gives us explosion:


 * \(a\ \{\{\{1\}\}\}\ b = \underbrace{a\ \{\{a\ \{\{\ldots a\ \{\{a\}\}\ a\ldots\}\}\ a\}\}\ a}_b\)
 * \(a\ \{\{\{2\}\}\}\ b = \underbrace{a\ \{\{\{1\}\}\}\ a\ \{\{\{1\}\}\}\ \ldots\ \{\{\{1\}\}\}\ a\ \{\{\{1\}\}\}\ a}_b\) (multiexplosion)
 * \(a\ \{\{\{3\}\}\}\ b = \underbrace{a\ \{\{\{2\}\}\}\ a\ \{\{\{2\}\}\}\ \ldots\ \{\{\{2\}\}\}\ a\ \{\{\{2\}\}\}\ a}_b\) (powerexplosion)
 * \(a\ \{\{\{4\}\}\}\ b = \underbrace{a\ \{\{\{3\}\}\}\ a\ \{\{\{3\}\}\}\ \ldots\ \{\{\{3\}\}\}\ a\ \{\{\{3\}\}\}\ a}_b\) (explodotetration)
 * explodopentation, explodohexation, etc.

Four sets of braces is detonation (multidetonation, powerdetonation, detonotetration, etc.), and five is pentonation (multipentonation, powerpentonation, pentonotetration, etc.) Then we have hexonation, heptonation, etc.

Our operator notation now has four arguments:


 * \(a\ \{1\}\ b = a^b\)
 * \(a\ \{1\}^d\ b = \underbrace{a\ \{a\ \{\ldots a\ \{a\}^{d - 1}\ a\ldots\}^{d - 1}\ a\}^{d - 1}\ a}_b\)
 * \(a\ \{c\}^d\ b = \underbrace{a\ \{c - 1\}^d\ a\ \{c - 1\}^d\ \ldots\ \{c - 1\}^d\ a\ \{c - 1\}^d\ a}_b\)

Here, the superscript d 's indicate the number of curly braces wrapped around c. For example, \(\{\ldots\}^4\) is a shorthand for \(\{\{\{\{\ldots\}\}\}\}\). This particular notation was not used by Jonathan Bowers.

Googologist Chris Bird proved that this 4-argument notation is about as powerful as chained arrow notation. We have barely scratched the surface of BEAF, however!

Linear array notation
Operator notation is starting to burst at the seams. A simpler way to write \(a\ \{c\}^d\ b\) is \(\{a, b, c, d\}\). Our new notation is:


 * 1) \(\{a, b, 1, 1\} = a^b\)
 * 2) \(\{a, b, 1, d\} = \underbrace{\{a, a, \{a, a, \ldots \{a, a, a, d - 1\} \ldots, d - 1\}, d - 1\}}_b\) if \(d > 1\)
 * 3) \(\{a, b, c, d\} = \underbrace{\{a, \{a, \ldots \{a, a, c - 1, d\} \ldots, c - 1, d\}, c - 1, d\}}_b\) if \(c > 1\)

Ones are considered defaults, so we can chop off the end of an array if it consists only of ones. For example, \(\{a, b, 1, 1\}\) can just be written \(\{a, b\} = a^b\).

This system is called Array Notation, first formulated around 2002.

We can simplify rules 2 and 3 somewhat by relying on their recursive nature:


 * \(\{a, b, 1, d\} = \underbrace{\{a, a, \{a, a, \ldots \{a, a, a, d - 1\} \ldots, d - 1\}, d - 1\}}_b\)
 * \(= \{a, a, \underbrace{\{a, a, \ldots \{a, a, a, d - 1\} \ldots, d - 1\}}_{b - 1}, d - 1\} = \{a, a, \{a, b - 1, c, d\}, d - 1\}\)


 * \(\{a, b, c, d\} = \underbrace{\{a, \{a, \ldots \{a, a, c - 1, d\} \ldots, c - 1, d\}, c - 1, d\}}_b\)
 * \(= \{a, \underbrace{\{a, \ldots \{a, a, c - 1, d\} \ldots, c - 1, d\}}_{b - 1}, c - 1, d\} = \{a, \{a, b - 1, c, d\}, c - 1, d\}\)

This step is very important to the definition of BEAF. If it is not clear to you, try working it out on paper.

Extending to five entries
Okay, let's introduce argument #5.

In array notation, we can see the pattern more clearly.


 * 1) \(\{a, b, 1, 1, 1\} = a^b\)
 * 2) \(\{a, b, 1, 1, e\} = \{a, a, a, \{a, b - 1, 1, 1, e\}, e - 1\}\)
 * 3) \(\{a, b, 1, d, e\} = \{a, a, \{a, b - 1, 1, d, e\}, d - 1, e\}\)
 * 4) \(\{a, b, c, d, e\} = \{a, \{a, b - 1, c, d, e\}, c - 1, d, e\}\)

Another rule is needed when we have a string of 1's from 3rd entry to m-th. We simply turn all 1's from 2nd position to (m-1)-th into a-s, replace m-th 1 with original array with b decreased by 1, and decrease the (m+1)-th entry by 1. This is by analogy with operator notation's rule:
 * \(a\{1\}^d b = a\{a\{\cdots\{a\{a\}^{d-1} a\}^{d-1} a\}^{d-1}\cdots\}^{d-1} a\}^{d-1} a\}^{d-1}\).

So, generally:


 * \(\{a,b,1,1,\cdots,1,1,c \#\} = \{a,a,a,a,\cdots,a,\{a,b-1,1,1,\cdots,1,1,c \#\},c-1 \#\}\)

Right now we sorted out linear arrays. For example, we solve \(\{3,3,1,1,1,3\}\):

\begin{eqnarray*} \{3,3,1,1,1,3\} &=& \{3,3,3,3,\{3,2,1,1,1,3\},2\} \\ &=& \{3,3,3,3,\{3,3,3,3,3,2\},2\} \\ &=& \{3,3,3,3,\{3,\{3,2,3,3,3,2\},2,3,3,2\},2\} \\ &=& \{3,3,3,3,\{3,\{3,\{3,1,3,3,3,2\},2,3,3,2\},2,3,3,2\},2\} \\ &=& \{3,3,3,3,\{3,\{3,3,2,3,3,2\},2,3,3,2\},2\} \end{eqnarray*}

Another example:

 * {a,a,a} (all entries are the same) = {a,2,1,2}


 * {a,a,{a,a,a}} (the c is nested...) = {a,3,1,2}


 * {a,a,{a,a,a,{a,a,a}}} = {a,4,1,2} and continue...

4 entries converted to 5 entries:


 * {a,a,a,a} = {a,2,1,1,2}


 * {a,a,a,{a,a,a,a}} = {a,3,1,1,2}


 * {a,a,a,{a,a,a,{a,a,a,{a,a,a,{a,a,a,a}}}}} = {a,6,1,1,2}

5 entries converted to 6 entries:


 * {a,a,a,a,a} = {a,2,1,1,1,2}


 * {a,a,a,a,a,{a,a,a,a,a}} = {a,3,1,1,1,2}


 * {a,a,a,a,a,{a,a,a,a,a,{a,a,a,a,a}}} = {a,4,1,1,1,2}

And in general, {a,b,@ are 1,2} = {a,@,{a,@,{a,@a,...,{a,@,a}...}}} with b nested, and the @ of "amount of" a is (amount of entries) -1 and the @ is a.

Multidimensional arrays
Our next step should be showing how to evaluate arrays with 2 dimensions or more. For example, take this array:

\[\left\{ \begin{matrix} 3,3 \\ 3,3 \end{matrix} \right\}\]

To easily operate with these ones, we need other separators (not only commas) in the array which indicate the beginning of the specified dimension. The above array can be also written as \(\{3,3 (1) 3,3\}\).

We have a two dimensional array: two entries in the first row and two in the second. (1) here indicates that the following two entries are on the next line. Generally, (n) separator means going to the next n-dimension.

How could we expand these arrays? When the very first row contains more than 2 entries, we can apply our current rules described above. For instance:

\begin{eqnarray*} \{3,3,3 (1) 2\} &=& \{3,\{3,2,3 (1) 2\},2 (1) 2\} \\ &=& \{3,\{3,\{3,1,3 (1) 2\},2 (1) 2\},2 (1) 2\} \\ &=& \{3,\{3,3,2 (1) 2\},2 (1) 2\} \\ &=& \{3,\{3,\{3,2,2 (1) 2\},1 (1) 2\},2 (1) 2\} \\ &=& \{3,\{3,\{3,2,2 (1) 2\} (1) 2\},2 (1) 2\} \\ &=& \{3,\{3,\{3,\{3,1,2 (1) 2\},1 (1) 2\} (1) 2\} (1) 2\},2 (1) 2\} \\ &=& \{3,\{3,\{3,3 (1) 2\} (1) 2\} (1) 2\},2 (1) 2\} \end{eqnarray*}

When the first row contains 2 entries, we use this simple rule:


 * \(\{a,b (1) 2\} = \{\underbrace{a,a,a,\cdots,a,a,a}_{\text{b a's}}\}\)

e.g. \(\{3,6 (1) 2\} = \{3,3,3,3,3,3\}\).

Now look what would happen with our example above. The innermost array is equal to \(\{3,3 (1) 2\} = \{3,3,3\} = 3 \uparrow\uparrow\uparrow 3 = 3 \uparrow\uparrow 7625597484987 = N\). After evaluating this N, the next array becomes \(\{3,N (1) 2\} = \{\underbrace{3,3,3,\cdots,3,3,3}_{\text{N 3's}}\}\).

Bowers made his notation so that every next level is so advanced and powerful that simple examples in that level can clobber upper limits of current and previous levels. We can see, even so easy expressions in multidimensional arrays can be as powerful that they make linear arrays negligible.

Returning back to rules, we can notice that we can have linear array prior to (1) separator. A "2" after (1) indicates 2nd level of linear arrays. So, we can have more levels of linear array notations, each explodes the previous levels. The connection between these levels:


 * \(\{a,b (1) c\} = \{\underbrace{a,a,a,\cdots,a,a,a}_{\text{b a's}} (1) c-1\}\)

When c=1, \(\{a,b (1) 1\} = \{a,b\} = a^b\), 1-chopping still works in 2nd row. Furthermore, it will still works with arbitrary large structures.

Now how could we define \(\{a,b (1) 1,2\}\) (the smallest array with 2 entries in 2nd row)?

We notice the similarity of \(\{a,b,1,2\} = \{a,a,\{a,b-1,1,2\}\}\) and \(\{a,b (1) 1,2\}\), which leads to:


 * \(\{a,b (1) 1,2\} = \{\underbrace{a,a,a,\cdots,a,a,a}_{\text{b a's}} (1) \{a,b-1 (1) 1,2\}\}\)

When the first entry after (1) is equal to 1, we can apply linear array rules except that the first row fills with b a's (if we apply the rules, decreasing some entry in the second row). For example, \(\{3,3 (1) 1,1,1,3\} = \{3,3,3 (1) 3,3,\{3,2 (1) 1,1,1,3\},2\}\). If the first entry after (1) is not 1, then decrease it by 1 and fill the first row with b a's.

We can add entries in the third row:


 * \(\{a,b (1)(1) c\} = \{\underbrace{a,a,a,\cdots,a,a,a}_{\text{b a's}} (1) \underbrace{a,a,a,\cdots,a,a,a}_{\text{b a's}} (1) c-1\}\)

Now we apply our rules on the third row. When we decrease an entry in the second row, we fill the first row. If we decrease an entry in the third row, we fill both previous rows. Generally, decreasing an entry in the n-th row leads to filling all previous rows with b a's in each. For example:


 * \(\{3,4 (1)(1)(1)(1)(1) 5\} = \{3,3,3,3 (1) 3,3,3,3 (1) 3,3,3,3 (1) 3,3,3,3 (1) 3,3,3,3 (1) 4\}\)

Recall that if we have more than one entry on the last row, we replace the penultimate entry with an array identical to the original array except that the second entry is decreased by 1:


 * \(\{3,4 (1)(1) 1,1,1,1,9\} = \{3,3,3,3 (1) 3,3,3,3 (1) 3,3,3,\{3,3 (1)(1) 1,1,1,1,9\},8\}\)

Now we introduce the (2) separator:


 * \(\{a,b (2) c\} = \{\underbrace{a,a,\cdots,a,a}_{\text{b a's}} (1) \underbrace{a,a,\cdots,a,a}_{\text{b a's}} (1) \cdots (1) \underbrace{a,a,\cdots,a,a}_{\text{b a's}} (2) c-1\}\) (with b rows)

Note that the comma can be also written as the (0) separator, and reducting an entry after it just makes one entry prior to it, (1) makes a row of entries, (2) makes a square of entries. By analogy, (n) makes n-D hypercube of entries prior to it. How to solve all this? To go any further, we should introduce the special "array of" operator, an important and powerful tool.

Array of operator
The array of operator, notated & (not to be confused with logical "and" operator) returns the array assigned to the structure at the left to &, filled with the number of entries at the right to &. What are these structures? First structures are numbers, and \(n\ \&\ m = \{\underbrace{m,m,m,\cdots,m,m,m}_{\text{n m's}}\}\). The structure above numbers, so called X-structure, should be evaluated to m. So, \(X\ \&\ m = m \&\ m = \{m,m (1) 2\}\).

If we want to specify other number, we can enclose it by brackets: \(X\ \&\ a[b] = b\ \&\ a[b]\). This notation hasn't been used by Bowers himself.

The structures above numbers X are X+1,X+2,X+3,...,2X,2X+1,2X+2,2X+3,...,3X,4X,...,\(X^2\), etc. X+m can be thought as a line of entries with m entries below it, 2X as two lines, 3X as three lines, nX+m as n lines of entries with m entries below it all. Here are some correspondences between our notations above and "array of":

\begin{eqnarray*} 1\ \&\ n &=& \{n\} = n \\ 2\ \&\ n &=& \{n,n\} = n^n \\ 3\ \&\ n &=& \{n,n,n\} = n \uparrow^{n} n \\ 4\ \&\ n &=& \{n,n,n,n\} = n \underbrace{ \{\{\cdots\{\{n\}\}\cdots\}\} }_{n \{\}'s} n \\ m\ \&\ n &=& \{\underbrace{n,n,n,\cdots,n,n,n}_{\text{m n's}}\} \\ X\ \&\ n &=& \{\underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}}\} \\ X+1\ \&\ n &=& \{\underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}} (1) n\} \\ X+2\ \&\ n &=& \{\underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}} (1) n,n\} \\ X+3\ \&\ n &=& \{\underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}} (1) n,n,n\} \\ X+m\ \&\ n &=& \{\underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}} (1) \underbrace{n,n,n,\cdots,n,n,n}_{\text{m n's}}\} \\ 2X\ \&\ n &=& \{\underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}} (1) \underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}}\} \\ 3X\ \&\ n &=& \{\underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}} (1) \underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}} (1) \underbrace{n,n,n,\cdots,n,n,n}_{\text{n n's}}\} \\ mX\ \&\ n &=& \{\underbrace{X\ \&\ n(1)X\ \&\ n(1)X\ \&\ n(1)\cdots(1)X\ \&\ n(1)X\ \&\ n(1)X\ \&\ n}_{\text{m \&\'s}}\} \\ X^2\ \&\ n &=& \{\underbrace{X\ \&\ n(1)X\ \&\ n(1)X\ \&\ n(1)\cdots(1)X\ \&\ n(1)X\ \&\ n(1)X\ \&\ n}_{\text{n \&\'s}}\} \end{eqnarray*}