Neha Patil (Editor)

Knuth's up arrow notation

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In mathematics, Knuth's up-arrow notation is a method of notation for very large integers, introduced by Donald Knuth in 1976. It is closely related to the Ackermann function and especially to the hyperoperation sequence. The idea is based on the fact that multiplication can be viewed as iterated addition and exponentiation as iterated multiplication. Continuing in this manner leads to tetration (iterated exponentiation) and to the remainder of the hyperoperation sequence, which is commonly denoted using Knuth arrow notation.

Contents

Introduction

The ordinary arithmetical operations of addition, multiplication, and exponentiation are naturally extended into a sequence of hyperoperations as follows.

Multiplication by a natural number is defined as iterated addition:

a × b = a + a + + a b  copies of  a

For example,

4 × 3 = 4 + 4 + 4 = 12 3  copies of  4

Exponentiation for a natural power b is defined as iterated multiplication, which Knuth denoted by a single up-arrow:

a b = a b = a × a × × a b  copies of  a

For example,

4 3 = 4 3 = 4 × 4 × 4 = 64 3  copies of  4

To extend the sequence of operations beyond exponentiation, Knuth defined a “double arrow” operator to denote iterated exponentiation (tetration):

a ↑↑ b =   b a = a a . . . a = a ( a ( a ) ) b  copies of  a b  copies of  a

For example,

4 ↑↑ 3 =   3 4 = 4 4 4 = 4 ( 4 4 ) = 4 256 1.34078079 × 10 154 3  copies of  4 3  copies of  4

Here and below evaluation is to take place from right to left, as Knuth's arrow operators (just like exponentiation) are defined to be right-associative.

According to this definition,

3 ↑↑ 2 = 3 3 = 27 3 ↑↑ 3 = 3 3 3 = 3 27 = 7 , 625 , 597 , 484 , 987 3 ↑↑ 4 = 3 3 3 3 = 3 3 27 = 3 7625597484987 1.2580143 × 10 3638334640024 3 ↑↑ 5 = 3 3 3 3 3 = 3 3 3 27 = 3 3 7625597484987 etc.

This already leads to some fairly large numbers, but Knuth extended the notation. He went on to define a “triple arrow” operator for iterated tetration (pentation):

a ↑↑↑ b = a ↑↑ ( a ↑↑ ( ↑↑ a ) ) b  copies of  a

followed by a “quadruple arrow“ operator for iterated pentation (hexation):

a ↑↑↑↑ b = a ↑↑↑ ( a ↑↑↑ ( ↑↑↑ a ) ) b  copies of  a

and so on. The general rule is that an n -arrow operator expands into a right-associative series of ( n 1 )-arrow operators. Symbolically,

a   n   b = a   n 1   ( a   n 1   (   n 1   a ) ) b  copies of  a

Examples:

3 ↑↑↑ 2 = 3 ↑↑ 3 = 3 3 3 = 3 27 = 7 , 625 , 597 , 484 , 987 3 ↑↑↑ 3 = 3 ↑↑ ( 3 ↑↑ 3 ) = 3 ↑↑ ( 3 3 3 ) = 3 3 3 3 3 3  copies of  3 = 3 3 3 7,625,597,484,987 copies of 3 = 3 3 3 3 3 7,625,597,484,987 copies of 3

The notation a n b is commonly used to denote a ↑↑ b with n arrows. In fact, a n b is a [n+2] b with hyperoperation. For example, 39 ↑↑ 14 can also be written as 39 [4] 14 (the "[4]" means tetration), but it is not equal to 39 [2] 14 = 39 × 14 = 546; similarly, 77 77 77 is equal to 77 [79] 77, instead of 77 [77] 77.

Notation

In expressions such as a b , the notation for exponentiation is usually to write the exponent b as a superscript to the base number a . But many environments — such as programming languages and plain-text e-mail — do not support superscript typesetting. People have adopted the linear notation a b for such environments; the up-arrow suggests 'raising to the power of'. If the character set doesn't contain an up arrow, the caret (^) is used instead.

The superscript notation a b doesn't lend itself well to generalization, which explains why Knuth chose to work from the inline notation a b instead.

a n b is a shorter alternative notation for n uparrows. Thus a 4 b = a ↑↑↑↑ b .

Writing out up-arrow notation in terms of powers

Attempting to write a ↑↑ b using the familiar superscript notation gives a power tower.

For example: a ↑↑ 4 = a ( a ( a a ) ) = a a a a

If b is a variable (or is too large), the power tower might be written using dots and a note indicating the height of the tower.

a ↑↑ b = a a . . . a b

Continuing with this notation, a ↑↑↑ b could be written with a stack of such power towers, each describing the size of the one above it.

a ↑↑↑ 4 = a ↑↑ ( a ↑↑ ( a ↑↑ a ) ) = a a . . . a a a . . . a a a . . . a a

Again, if b is a variable or is too large, the stack might be written using dots and a note indicating its height.

a ↑↑↑ b = a a . . . a a a . . . a a } b

Furthermore, a ↑↑↑↑ b might be written using several columns of such stacks of power towers, each column describing the number of power towers in the stack to its left:

a ↑↑↑↑ 4 = a ↑↑↑ ( a ↑↑↑ ( a ↑↑↑ a ) ) = a a . . . a a a . . . a a } a a . . . a a a . . . a a } a a . . . a a a . . . a a } a

And more generally:

a ↑↑↑↑ b = a a . . . a a a . . . a a } a a . . . a a a . . . a a } } a b

This might be carried out indefinitely to represent a n b as iterated exponentiation of iterated exponentiation for any a, n and b (although it clearly becomes rather cumbersome).

Using tetration

The tetration notation b a allows us to make these diagrams slightly simpler while still employing a geometric representation (we could call these tetration towers).

a ↑↑ b = b a a ↑↑↑ b = a . . . a a b a ↑↑↑↑ b = a . . . a a a . . . a a a } b

Finally, as an example, the fourth Ackermann number 4 4 4 could be represented as:

4 . . . 4 4 4 . . . 4 4 4 . . . 4 4 4 = 4 . . . 4 4 4 . . . 4 4 4 4 4 4

Generalizations

Some numbers are so large that multiple arrows of Knuth's up-arrow notation become too cumbersome; then an n-arrow operator n is useful (and also for descriptions with a variable number of arrows), or equivalently, hyper operators.

Some numbers are so large that even that notation is not sufficient. The Conway chained arrow notation can then be used: a chain of three elements is equivalent with the other notations, but a chain of four or more is even more powerful.

a n b = a [ n + 2 ] b = a b n (Knuth) (hyperoperation) (Conway)

It is generally suggested that Knuth's arrow should be used for smaller magnitude numbers, and the chained arrow or hyper operators for larger ones.

Definition

The up-arrow notation is formally defined by

a n b = { a b , if  n = 0 ; 1 , if  n 1  and  b = 0 ; a n 1 ( a n ( b 1 ) ) , otherwise 

for all integers a , b , n with b 0 , n 0 .

This definition takes multiplication as the basic operation ( a 0 b = a b ) , then yields exponentiation ( a 1 b = a b = a b ) as repeated multiplication, tetration ( a 2 b = a ↑↑ b ) as repeated exponentiation, etc. (This is equivalent to the hyperoperation sequence except it omits the two more-basic operations of successor and addition, inclusion of which requires additional starting values that somewhat complicate the definition.)

All up-arrow operators (including normal exponentiation, a b ) are right associative, i.e. evaluated from right to left in an expression.
a b c = a ( b c ) —— not ( a b ) c .
3 ↑↑ 3 = 3 3 3 is 3 ( 3 3 ) = 3 27 = 7625597484987 —— not ( 3 3 ) 3 = 27 3 = 19683.

Note that due to right-associativity we have, for b 1 , n 1 ,

a n b = a n 1 a n 1 a n 1 a     ( with  b   a 's ) = a n 1 a n 1 a n 1 a n 1 1     ( with  b   a 's ) = ( a n 1 ) b 1

where each a appears as a left operand of the arrow operator (which is significant because the arrow operators are not commutative), and we have written ( a m ) b for the bth functional power of the function f ( x ) = a m x . Because ( a m ) 0 n = n , the original definition can therefore be written more concisely as follows:

a n b = { a b , if  n = 0 ; ( a n 1 ) b 1 if  n 1

for all integers a , b , n with b 0 , n 0 .

Computing 2↑mn

Computing 2 m n can be restated in terms of an infinite table. We place the numbers 2 n in the top row, and fill the left column with values 2. To determine a number in the table, take the number immediately to the left, then look up the required number in the previous row, at the position given by the number just taken.

The table is the same as that of the Ackermann function, except for a shift in m and n , and an addition of 3 to all values.

Computing 3↑mn

We place the numbers 3 n in the top row, and fill the left column with values 3. To determine a number in the table, take the number immediately to the left, then look up the required number in the previous row, at the position given by the number just taken.

Computing 10↑mn

We place the numbers 10 n in the top row, and fill the left column with values 10. To determine a number in the table, take the number immediately to the left, then look up the required number in the previous row, at the position given by the number just taken.

Note that for 2 ≤ n ≤ 9 the numerical order of the numbers 10 m n is the lexicographical order with m as the most significant number, so for the numbers of these 8 columns the numerical order is simply line-by-line. The same applies for the numbers in the 97 columns with 3 ≤ n ≤ 99, and if we start from m = 1 even for 3 ≤ n ≤ 9,999,999,999.

Numeration systems based on the hyperoperation sequence

R. L. Goodstein, with a system of notation different from Knuth arrows, used the sequence of hyperoperators here denoted by ( + ,   × ,   ,   ↑↑ ,   ) to create systems of numeration for the nonnegative integers. Letting square brackets ([1], [2], [3], [4], ... ) denote the respective hyperoperators ( + ,   × ,   ,   ↑↑ ,   ) , the so-called complete hereditary representation of integer n, at level k and base b, can be expressed as follows using only the first k hyperoperators and using as digits only 0, 1, ..., b − 1, together with the base b itself:

  • For 0 ≤ nb-1, n is represented simply by the corresponding digit.
  • For n > b-1, the representation of n is found recursively, first representing n in the form
  • b [k] xk [k - 1] xk-1 [k - 2] ... [2] x2 [1] x1 where xk, ..., x1 are the largest integers satisfying (in turn) b [k] xkn b [k] xk [k - 1] xk - 1n ... b [k] xk [k - 1] xk - 1 [k - 2] ... [2] x2 [1] x1n Any xi exceeding b-1 is then re-expressed in the same manner, and so on, repeating this procedure until the resulting form contains only the digits 0, 1, ..., b-1, together with the base b.

    The remainder of this section will use the superscripts to denote the hyperoperators.

    Unnecessary parentheses can be avoided by giving higher-level operators higher precedence in the order of evaluation; thus,

    level-1 representations have the form b [1] X, with X also of this form;

    level-2 representations have the form b [2] X [1] Y, with X,Y also of this form;

    level-3 representations have the form b [3] X [2] Y [1] Z, with X,Y,Z also of this form;

    level-4 representations have the form b [4] X [3] Y [2] Z [1] W, with X,Y,Z,W also of this form;

    and so on.

    Note that in this type of base-b hereditary representation, the base itself appears in the expressions, as well as "digits" from the set {0, 1, ..., b-1}. This compares to ordinary base-2 representation when the latter is written out in terms of the base b; e.g., in ordinary base-2 notation, 6 = (110)2 = 2 [3] 2 [2] 1[1] 2 [3] 1 [2] 1[1] 2 [3] 0 [2] 0, whereas the level-3 base-2 hereditary representation is 6 = 2 [3] (2 [3] 1 [2] 1 [1] 0) [2] 1 [1] (2 [3] 1 [2] 1 [1] 0). The hereditary representations can be abbreviated by omitting any instances of [1] 0, [2] 1, [3] 1, [4] 1, etc.; for example, the above level-3 base-2 representation of 6 abbreviates to 2 [3] 2 [1] 2.

    Examples: The unique base-2 representations of the number 266, at levels 1, 2, 3, 4, and 5 are as follows:

    Level 1: 266 = 2 [1] 2 [1] 2 [1] ... [1] 2 (with 133 2s) Level 2: 266 = 2 [2] (2 [2] (2 [2] (2 [2] 2 [2] 2 [2] 2 [2] 2 [1] 1)) [1] 1) Level 3: 266 = 2 [3] 2 [3] (2 [1] 1) [1] 2 [3] (2 [1] 1) [1] 2 Level 4: 266 = 2 [4] (2 [1] 1) [3] 2 [1] 2 [4] 2 [2] 2 [1] 2 Level 5: 266 = 2 [5] 2 [4] 2 [1] 2 [5] 2 [2] 2 [1] 2

    References

    Knuth's up-arrow notation Wikipedia