Friday, 21 December 2012

Big Arrows Compass

Painting of labyrinth of arrows on concentric circles

Today is selling archery gear to the Maya gods at a discount. We create a natural extension of Knuth-Conway style arrows, for comparison against various array functions for Big numbers.

Knuth's up .. arrows  §3.1

There are two popular types of arrows available for the definition of Big numbers.
In this chapter we use the countable up-arrow as operators for superpowers. Next chapter we study the right-arrow parameter separator for the row of Conway's chained arrows.
All our arrow structures are painted blue and resolved from right to left (right associatively).

We prefer to speed up multiplication (the first recursion of repeated addition) by substituting a*b = a.. {b} directly into an expression. Applied as in rule *. below which goes straight to the result.
To start more rigorously we can define addition as the shifting of 1 between variables, and multiplication by repeated addition of the same number. Though Karatsuba multiplication for large numbers is the faster algorithm, we like to keep it simple. Adding step by step while avoiding brackets is achieved with the plus + sign in between operands.

  • *.0 X+a1 = X1+a == Xa+1 = Xa1
  • *,1 a*1 = a
  • *,2 a*b1 = a+a*b = a(a*b) == a+..a*1 {:b} = a..(a*1) {b} = a+..a {:b} = a.. {b1}

We use RepExp notation in the definition of rules to repeat substrings in the expression.
A wildcard X stands for an arbitrary substring (which honours the context), and X may be void of characters. But parameters are never empty, and our variables p are greedy for number signs (eat all 1..). So that rules that start on a variable (above rule *,2 and rules A, below) can be thought to have an inactive (possibly empty) left part X with an operator sign on the right end (not ending on 1 or ω etc.).

  • *. Xy*z {X†?} = Xy.. {z}

A virtual left part X is indicated by a comma , instead of a dot . in the rule number. To make this optional X explicit we let it follow by a question mark {X?} in the repertory. The dagger character is a generic operator sign, for instance * number repetition.

Follows the rule list for the evaluation of .. operations (in the active right part of an expression) in the context of up-arrows. Knuth counted his arrows up from the initial A,2 power and so on == by direct substitution, but we prefer a stepwise = approach.

  • A,1 a↑..1 {c} = a => a↑1 = a
  • A,2 a↑b1 = a*a↑b == a*..a↑1 {:b} = a*..a {:b}
  • A,3 a↑..b1 {c1} = a↑..a↑..b {c c1} == a↑....a {c :b}

The superpowers ..{c≥2} expressible now are already far greater than any realistic quantity you can ever hope to imagine. The fantastic world record number, the unspeakable tetration 10^^(10^(5*2^120)) from Buddhist scripture, is smaller than 4↑↑↑3 its neighbour pentation. 

Because the counter starts c=1 at a power (not multiplication), we have a nice shortcut.

  • 1*1=1 => X↑1↑..z {↑:c>0} = X↑1 = X

At chained arrows rule C.3 we get the same total right drop at the penultimate operator. So we'd like to see this feature return as a consequence of other arrow systems. But in the extended system B. below, we can only drop the t→ is 1→ from in between.

Backslashed operations on top of up-arrows are helpful to compare the growth of various functions in the range of superpowers (to assess the Grzegorczyk hierarchy).
A simpler extension with one right arrow on top fulfils a similar purpose (and heralds the continuation of chained arrows to higher dimensions). This refined up-top system B. is defined here, and illustrated by expressions with the old \^ backslashes.

  • B,1 a1 = a where =.. {k>0} or =
  • B,2 a↑b1 = a*a↑b == a*..a {:b} = a^(b+1)
  • B,3 a↑..t→b1 {c} = a↑..a↑..t→b {c c} == a↑....t→1 {c :b1} = a↑....t {c :b1} = a^..(b+1)\^..t {c+1 c}
  • B,4 a↑..b1 {c1} = a↑..a→b {c} = a^..b\^..a {c+1 c}

Multiplication * is the first recursive rule, which repeats the addition of a number. The series of up-arrows .. repeat earlier operations of repetition. 
First come the a↑b powers, next the power towers a↑a↑t up until a↑..t {:b} which equals a↑t→b and in turn a↑a→b equals a↑↑b1 tetration. Then generalize this process to superpowers expressed by multiple a↑..b {:c} arrows, in total a double recursion. 

Superpowers have no counterpart in physical reality – their numbers are just too big to be of practical use. Consider the size of 3↑↑4 evaluated both in the system A. of up-arrows and in the extended system B. for example.

  • 3↑↑4 A.3= 3↑3↑↑3 = 3↑3↑3↑↑2 = 3↑3↑3↑3↑↑1 A.1= 3↑3↑3↑3 A.2= 3↑3↑3*3↑2 = 3↑3↑3*3*3↑1 A.1= 3↑3↑3*3*3 *.= 3↑3↑27 == 3↑7625597484987 ~ 1E3638334640024
  • 3↑↑4 B.4= 3↑3→3 B.3= 3↑3↑3→2 = 3↑3↑3↑3→1 B.1= 3↑3↑3↑3 B.2= 3↑3↑3*3*3 *.= 3↑3↑27 ~ 1511 GB

Though this tetration still fits on a 2 TB harddisk, larger superpowers can't be digitalised or written physically in number base. All of our 1E120 bit of quantum-information space fails to store 4↑↑4 in binary. Working out the recipe would run the cosmos to ruin.

Conway's chained arrows  §3.2

In 1996 John H. Conway published his chained arrow notation in “The Book of Numbers”. We think his arrow operators should become the benchmark of choice to further classify functions in the fast-growing hierarchy.

Define a self-sufficient list of rules for Conway's chained arrows.

  • C.1 X→1 = X
  • C.2 a→b1 = a*a→b = a↑b1 == a*..a→1 {:b} = a*..a {:b}
  • C.3 X→1→z = X <=> X→1→Z = X
  • C.4 X→y1→z1 = X→(X→y→z1)→z == X→(..X→1→z1.)→z {:y:} = X→(..X.)→z {:y:}

Conway directly substituted the three entries a→b→c = a↑..b {c} but we can reduce the three chained arrow entries to multiple up-arrows step by step. This proves that the system C. can express every superpower and reduce it to multiplications. 

  • a→b1→1 = a→b1 = a↑b1
  • a→b1→2 = a→(a→b→2) = a↑(a→b→2) == a↑..(a→1→2) {:b} = a↑..a {:b} = a↑↑b1
  • a→b1→3 = a→(a→b→3)→2 = a↑↑(a→b→3) == a↑↑..a {:b} = a↑↑↑b1
  • a→b1→c1 = a↑..(a→b→c1) {c} == a↑..b1 {c1}

The main rule C.4 in Conway's system relies on bracket characters to nest expressions. Now we transform it to a chained-up arrow system D. where brackets are not required, because in X→y→z the operations starting on take over as word delimiters.

In this context we allow multiple up .. and single right arrows, with temporary up-right arrows ..{z>0} as auxiliary constructs for stepwise operator change. In wildcards all contextual signs are valid, so in X the X may end on .. arrows.

Parts of a rule that are painted grey remain unchanged in its evaluation. A part denoted by a question mark {X?} may be lacking (if void the expression still matches the rule).
To demand that string X is part of Y we write XY, and not to allow X to match in Y we write XY, in the Rep (repertory) for the Exp (expression).

Our rigorous list of rules for alternative chained-up arrow algorithm D. It expands the up-arrow context of system A, but is incompatible with system B, up-top. (Can you make it compatible by adapting rules D.2.3?)

  • D.1 X11 = X1 where =.. {k>0} or =
  • D.2 Wx→y1 {†=or* W†?} = Wx*x→y == W.x*..x {:y}
  • D.3 X1↑y = X1→y
  • D.4a X→y→z1 = X↑→y→z == X↑..→y→1 {z} .4b = X↑..→y {z} = X..y {z1}
  • D.5 W↑1X↑↑y1 {W↑? ↑1X} = W↑1X1X↑↑y == W↑.1X..1X {:y}

Rule D.3 handles both the referral of x↑y↑z powers to rule D.2 and the removal of (virtual) brackets from x→y↑z chained arrows. Rule D.4 can be done step by step (strictly a dual rule), or substituted straight away in grand Conway style.

Rule D.5 reduces .. {c1z1} up-arrows by repetition of 1X chains pi..pn1.. {:n c}  where 1X is delimited by (but not contains) lone .. up-arrows.
This clause of matching the repeated string 1X from the right down to (the left end or) ↑1 (or generally until q↑‡p is met) replaces the nesting brackets of rule C.4. 

Take rule D.4 and D.5 together to meet the conclusion of Conway's original system.

  • X→y1→z1 D.4= X..y1 {z1} D.5= X..X..y {z z1} C.4≡ X→(X→y→z1)→z =D.5= X....X..1 {z :y z1} C.4≡ X→(..X→1→z1.)→z {:y:} D.1= X....X {z :y} C.3≡ X→(..X.)→z {:y:}

From this format it is clear that chained arrows repeat the double recursion of up-arrows, taking two entries from the end of the row. By rule D.3 the result is appended to the row again as a new chained entry, so each double recursion consumes a single entry. Then over the length of the row we count the 3d recursive algorithm.

We'll reduce two chained arrows expressions 3→4→2 (the example 3↑↑4 in last chapter) and 3→3→3→3 (introducing the →↑↑ row creator), so you can see the rules at work.

  • 3→4→2 D.4= 3↑→4→1 = 3↑→4 = 3↑↑4 D.5= 3↑3↑↑3 = 3↑3↑3↑↑2 = 3↑3↑3↑3↑↑1 D.1= 3↑3↑3↑3 D.3= 3↑3↑3→3 =D.2= 3↑3↑3*3*3 =*.= 3↑3↑27 =D.3.2.*.= 3*..3 {:7625597484986}
  • 3→↑↑2 E.7= 3→↑3→2 E.6= 3→3→↑3→1 E.1= 3→3→↑3 E.7= 3→3→3→3 = 3→3↑→3→2 = 3→3↑↑→3→1 = 3→3↑↑→3 D.4= 3→3↑↑↑3 C.4= 3→3→(3→3→2→3)→2 D.5≡ 3→3↑↑3→3↑↑↑2 C.4= 3→3→(3→3→(3→3→1→3)→2)→2 D.5≡ 3→3↑↑3→3↑↑3→3↑↑↑1 C.3= 3→3→(3→3→(3→3)→2)→2 D.1≡ 3→3↑↑3→3↑↑3→3 C.2.*.= 3→3→(3→3→27→2)→2 D.2≡ 3→3↑↑3→3↑↑3*3*3
  • a→b→c1→2 ≡ a→b↑↑c1 a→b→(a→b→c→2)→1 ≡ a→ba→b↑↑c a→b→(a→b→c→2) ≡ a→b→(a→b↑↑c) a→b→(..a→b→1→2.) {:c:} ≡ a→b..↑1 {:c1} a→b→(..a→b.) {:c:} ≡ a→b..a→b {:c}
  • #Garham = 3→3→(..4.) {:64:} < 3→3→65→2

Watch the tetration 3↑3↑3↑3 being reduced to mere trillions of multiplications. Compare the chained arrows 3→3→3→3 which is even larger than Gardner's Graham's number.

And this is hardly where it all ends… Long after the sky has fallen down a tiny typist will travel the universe of Big numbers on the back of an arrow.

Friday, 20 January 2012

Growing Numbers in all Dimensions

Trajectory of a cloud of gas near the supermassive black hole

Multidimensional array functions for Big numbers.

Past ,, into the second row  §3.4

After the first row of function arguments in our system a second row is appended.
We employ a double comma ,, to separate rows within a multidimensional array.
In a definition list we mark a rule m.♥ if it was covered by some rule m.n before.
We approximate ~> expressions by preceding (just smaller) chained arrows.

  • 3.0 a,1,,1 = a,1.. {,1:a1} ~> 2→a1→a
  • 1.♥ a,b1,,1 = aa,b,,1 == a*2^b,1,,1 ~> 2→a*2^ba*2^b

When entry a has accumulated its first row so that all but entry b=1 is counted down, its job becomes to inflate the size of the row again.
Work out three cases. The approximation as calculated for the first row applies.

  • ♥(5,1,,1) 3.= ♥(5,1,1,1,1,1,1) 2.= ♥(10,5,5,5,5,5) ~> 2^^^^^6\^^^^5 ~> 2→8→5
  • ♥(2,4,,1) 1.= ♥(16,1,,1) 3.=2.= ♥(32.,16..) {:16} ~> 2^..17\^..16 {16 15} ~> 2→19→16
  • ♥(2,1,2,,1) 2.= ♥(2,3,1,,1) 1.= ♥(8,1,1,,1) 2.= ♥(8,9,,1) 1.= ♥(u,1,,1) {u:2^11} ~> 2^..u1\^..u {u u-} ~> 2→u3→u ~> 2→11→2→2

By default a partial row R either starts on 1 or is empty, which implicates we have to follow up with comma elimination A,=A in rules ♥.3.1 and ♥.2.5 below.
Wildcard Z (or in calculations) fits any part to the right of the expression, but because the preceding repetition is greedy, Z and later R won't start with ,1 in the rules ♥.2 respectively.  This can also be read from the matching Z/RegExp descriptions. 

  • 1.♥ a,1bZ = aa,bZ == a*2^b,1Z (redoubling motor)
  • 2.3 a,1..Z {,1:n1 Z/(,(,1+)*)?} = a,1..aZ {,1:n} (upload to end of first row) == aa,a..Z {,a:n}
  • 2.4 a,1..Z {,1:n1 Z/1+(,1+)*,?(,1+)*} = a,1..a,Z {,1:n} (upload within first row) == a,1a,..Z {a,:n} 1.= aa,..Z {a,:n1}
  • 3.1 a,1,,1R = a,1..,,R {,1:a1} (upgrade first row size) 2.= aa,a..,,R {,a:a} ~> 2→a1→a,1,,R
  • 2.5 a,1,,1..R {,1:n1} (uploads to second row entry) = a,1,,1..,a1,R {,1:n-}

We apply the old rules for the first row until the primer pattern a,1,, occurs and then the new dimensional rules kick in. Generally a lower level structure is treated as if it is a subexpression of the higher level waiting on the right.
Only the rightmost structures cannot be inflated and are just counted down and off (this alone guarantees reducibility of the expression).

Two further examples on the second row.

  • ♥(2,1,,4) 3.= ♥(2,1,1,1,,3) 2.= ♥(4,2,2,,3) == ♥(2^11,1,1,,3) = ♥(2^12,2048,,3) ~> ♥(v,1,,3) {v:2^2059} 3.= ♥(v,1..,,2) {,1:v1} ~> ♥(w,1,,2) {w:2→2059→2→2} ~> ♥(x,1,,1) {x:2→2059→3→2} ~> 2→2059→4→2
  • ♥(2,1,,1,2) 2.= ♥(2,1,,3,1) 3.= ♥(2,1,1,1,,2,1) ~> ♥(w,1,,1,1) ~> ♥(w,1,,w) {w:2→2059→2→2} ~> 2→2059→w→2 ~> 2→2059→2→3

With this last example we have passed Graham's number(s) – the largest integer ever used in a serious mathematical article (in 1971, for an upper bound in Ramsey theory).


Formulate the approximation of two rows in system compared to chained arrows.
From the expressions that were reduced to natural number before we've learned that:

  • a,R = a,rí.. {,rí:n} ~ 2^..rn3,1 {^:n} ~> vr,1 {vr:2→rn→n}
  • a,R,,1b ~> 2→vr→vr,1,,b ~ 2→vr→2→2,1,,b ~> 2→@→1b→2,1,,1 {@aR}
  • ri,..,b {ri,:n} ~> 2→@→b1→2 {@ri..}

A meta-mix shortcut @ over a set of variables r1,..rn will ideally derive some lifted mean from this set, but in practice a maximal parameter rm is a safe choice.
Because the numbers are already so Big and there's no need to split any hairs, the @ mix-maximized value is just to make sure that, when rm has a superiorly (or infinitely) larger value than the other parameters our approximation formula still holds. 
It is convenient to write the set of variables assigned to @ without commas and to append new next entries at an existing max-mixed set without further ado. 

  • a,R,,b,1c ~> 2,1,,2→@→b→2,c ~> 2→@→(2→@→b→2)→2,1,,1,c ~> 2→@b→2→3,1,,1,c ~> 2→@b→(2→@b→2→3)→2,1,,1,-c ~> 2→@b→1c→3,1,,1,1
  • a,R,,b,c,1d ~> 2,1,,1,2→@b→c→3,d ~> 2→@b→(2→@b→c→3)→3,1,,1,1,d ~> 2→@bc→2→4,1,,1,1,d ~> 2→@bc→1d→4,1,,1,1,1
  • Rm,,Rn,z ~> 2,1,,1,..2→@,-z {1,:n- @RmRn} ~> 2→@→2→n2,1,,1,..-z {1,:n} ~> 2→@→z→n2,1,,1,..1 {1,:n} ~> 2→@→z1→n2,1,,1
  • ri,1,..,rj,2,..z {ri,1,:m rj,2,:n} ~> 2→@→z1→n2 {@RmRn}

Let the subscripts under a partial row sign R keep count of its number of parameters.
In system one row with length n1 and final entry z can be approximated by Rn→z→n using 3 parameters of chained arrows. Two rows in the system require 4 parameters of chained arrows. You can guess where we are heading at… 

Square array  §3.5

Just like every parameter holds some variable number 1.. every row in what's called a square will have different lengths. In the course of a reduction cascade the sizes in a multidimensional function array behave extremely erratic.
Parameters are counted down to value 1 and likewise row size is reduced until a leftmost entry 1 remains and then the upgrade rule appends a series of ,1 to the row.

First we sketch an overview of the reduction cascade for a system square array.
The rule correspondences (rules rendered m.n= green) could then be sought out.

  • a,b,c,,d,e,,f,g,,h :: a,1,c 2.7= a,a1,c- : a,1,1 2.7= a,a1 :: a,1,,d,e 3.2= a,1..,,d-,e {,1:a1} 2.6=2.7=1.5 aa,a..,,d-,e {,a:a} : a,1,,1,e 2.7= a,1,,a1,e- : a,1,,1,1 2.6= a,1,,a1 :: a,1,,1,,f,g 3.2= a,1,,1..,,f-,g {,1:a1} : a,1,,1,,1,g 2.7= a,1,,1,,a1,g- : a,1,,1,,a1 :: a,1,,1,,1,,h 3.2= a,1,,1,,1..,,h- {,1:a1} : a,1,,1,,1,,1 3.2= a,1,,1,,1.. {,1:a1} 2.6= .

Reuse the rules ♥.0.1,1.5 in the definition of the second dimension or square.
Use a wordcard S/(1+(,1+)*(,(,1+)+)*)? for a partial square (possibly void).

  • 2.6 a,1,,1..,1..Z {,,1:n- ,1:m Z/(,(,1+)+)*} = a,1,,1..,1..aZ {,,1:n- ,1:m-} (upload to end of row, for n=1 of first row, for n>1 a higher row)
  • 2.7 a,1,,1..,1..S {,,1:n- ,1:m} = a,1,,1..,1..a,S {,,1:n- ,1:m-} (upload within a row, for n=1 in first row, for n>1 a higher row)
  • 3.2 a,1,,1..S {,,1:n} (upgrade row size) = a,1,,1..,1..,,S {,,1:n- ,1:a}

From an earlier reduction of ♥(4,2,2,,3) to ♥(w,1,,2) take over the value of w in the course of the following example.

  • ♥(2,1,,1,,1) = ♥(2,1,,1,1,1) = ♥(2,1,,1,3) = ♥(2,1,,3,2) = ♥(2,1,1,1,,2,2) = ♥(4,2,2,,2,2) ~> ♥(w,1,,1,2) ~> ♥(w,1,,w,1) {w:2→2059→2→2} ~> ♥(y,1,,y) {y:2→2059→w→2 ~> 2→2059→2^2059→2} ~> 2→2059→y→2 ~> 2→2059→3→3

To name the size of this number, among Bowers' infinity scrapers it comes just after the Corporalplex, and yet it is among the smallest members of a very large family.


Build a formula for approximation of a square upon the two rows already calculated. 
A full row Rn has n entries ri,..rn {:n-} and the sign @ is a dynamic mean, best represented by the largest of all entries previously included in the reduction. 

  • Rm,,Rn,,b ~> 2→@→rn→n1,1,,1,,b {@RmRn} ~> @,1,,1,..@→@→@,,-b {1,:2→@→rn→n1} ~> @→@→@→2→2,1,,1,,-b ~> @→@→@→3→2,1,,1,,--b ~> @→@→@→b→2,1,,1,,1
  • Rm,,Rn,,b,c,d ~> @,1,,1,,@→@→@→b→2,-c,d ~> @→@→@→2→3,1,,1,,1,-c,d ~> @→@→@→c→3,1,,1,,1,1,d ~> @,1,,1,,1,@→@→@→c→3,-d ~> @→@→@→2→4,1,,1,,1,1,-d ~> @→@→@→d→4,1,,1,,1,1,1
  • Rm,,Rn,,Rp ~> @→@→@→rp→p1
  • Rm,,Rn,,Rp,,Rq ~> @→@→@→@→rq→q1
  • Rni,,..Rns {:s-} ~> @→..rns→ns1 {:s}

Let S in the system be a two dimensional array with s rows, where the last row has a length z with a final entry y and let S overall have a maximal parameter value x, then S is approximately larger than a series x→..y→z1 {:s} of Conway's chained arrows – or larger than z1→↑s2 when represented by superchained arrows.

We conclude the square of and the row of chained arrows increase equally fast. Given a large enough size s our spouses won't notice the difference (just 2 parameters).
Now we go one dimension higher.

Cubic arrays  §3.6

The new rules for the cube are an extension of those for the square in the section above, and form a special case in the definition of dimensional arrays in the next section.
For the moment work out an example of a cubic array 11,1,,,111 (in binary notation).

  • ♥(2,1,,,3) = ♥(2,1,,1,,1,,1,,,2) = ♥(2,1,,1,,1,1,1,,,2) = ♥(2,1,,1,,3,2,,,2) = ♥(4,2,2,,2,2,,2,2,,,2) = ♥(2^v0,1,,2,2,,2,2,,,2) {v0:2059} ~> ♥(v1,1,,1,,2,2,,,2) {v1:2→v0→3→3} ~> ♥(v1,1,,1,..v1,,1,2,,,2) {1,:v1} ~> ♥(v2,1,,1,,1,2,,,2) {v2:2→v1→v1→v1 ~ 2→v0→v0→2→2} ~> ♥(v2,1,,1,..v2,,v2,1,,,2) {1,:v2} ~> ♥(v3,1,,1,,v2-,1,,,2) {v3:2→v2→v2→v2 ~ 2→v0→v0→3→2} ~> ♥(v4,1,,1,,v4,,,2) {v4:2→v0→v0→v2→2 ~ 2→v0→v0→2→3} ~> ♥(v5,1,,,2) {v5:2→v0→v0→v4→2 ~ 2→v0→v0→3→3} ~> ♥(v5,..,,..7,,,1) {v5,..:v5 v5,..,,:v5} ~> ♥(v6,1,,,1) {v6:v5→..2 v5→..:v5 ~ v5→↑v5} ~> ♥(v6,..,,..7) {v6,..:v6 v6,..,,:v6} ~> v6→..2 {v6→..:v6} ~> v6→↑v6 ~> v5→↑(v5→↑v5) = v5→↑3→2 ~> v0→↑(v0→↑(v0→v0→v0→3→3)) ~> v0→↑(v0→↑(v0→↑4)) ~> 4→↑4→2

Notice the cube is upgraded with squares when it is reduced to a primer a,1,,,
To compare this number with another notation – in Beaf the next larger would be {3,4,1,1,2} a small Pentadecal.

Now we approximate the cube starting from the earlier results on the square.
A member square Sn holds n rows R and in @ we store a past largest entry. 

  • Sn,,,b ~> @→↑n2,1,,,b {@Sn}

This wraps up the cube.

Multiple dimensions  §3.7

A structure is anything that is systematically countable. A bare structure is counted down and either waiting to be upgraded or to be counted off.
Iterator variables 1.. are the smallest structures in this respect and get an upload from the accumulator value a in rule ♥.4 (more precisely: the bare variable 1 rightmost from the primer has the substructure unit 1 added a times).

We've arranged the primer in the system to be a,1 so the countdown of variable b and the first row stops there if a higher structure is waiting.
Philosophically the accumulator a is not part of any structure and all structures are to be counted down to 1 (except final variables z in expressions of which are counted down to zero, leaving a piece of the structural skeleton to drop off from the right).

To address separators in general we introduce a generic shorthand $ which signifies any type of variable separator.  This translation should be consistent, meaning that similar types are intended at similar positions on both sides of an equation.
Then a dimensional series p$i.. {:n} with various commas $i is ,.. {,:ki} can be written in the shorthand p$.. {:n} in a rule list as below .

  • 0.2 A$ = A
  • 2.? a,1$..1Z {1$:n} = a,1$..a1$Z {1$:n-}

After countable commas ,.. to separate higher dimensions, extradimensional types of separators ,Xi;.. or rather ,`Xi`.. will follow suit. 

Thursday, 29 December 2011

Growing Numbers over the Line

Bright blue curve in dark space, sun visible below the horizon

Today we shoot past the practical physical world with the operation of tetration, which a man uses to raise power towers of variable height. From there on the other superpowers are developed.

Arrows ^.. for comparison  §2.1

In 1976 Donald Knuth invented his arrow notation to express with operators the numbers that result from superexponential functions (constructible by primitive recursion, classified in the Grzegorczyk hierarchy – that some functions increase faster was proven by Wilhelm Ackermann in 1928).

We use arrowheads a^..b in comparisons, and shown below how to evaluate them.  Knuth continued the rules for + * ^ by reducing a superpower with c+1 arrows to a tower of b-1 times the operation with c arrows.

  • a*(b+1) = a+a*b == a+..a*1 {:b} = a+..a {:b}
  • a^(b+1) = a*a^b == a*..a^1 {:b} 
  • a^..1 {c1} = a^..1 {c} == a
  • a^..b1 {c1} = a^..a^..b {c c1} == a^....a {c :b}

The 2nd repetition :b applies to the word from the left start of the Exp up to the 2nd marker dots .. (words in the Exp correspond to factors in the Rep by position).
Same level arrow operations are always associated from right to left.

The thing with arrowheads is that they are ruled by majority precedence, so for their evaluation brackets are needed, soon as 3^^^3 = 3^^(3^3^3) for example.
And if we choose stars ruled by minority precedence (is maximal!), again these cannot be reduced stepwise without brackets, with 3**3 = 3*(3**2) for example.

So to be strict about the characters your algorithm employs, best discard the precedence issue and have operators +.. associate from right to left in all cases! 
Apply a+..b {+:n2} = a*..b {*:n1} = a^..b {^:n} to transcribe intermediate reduction forms of these operations to 1.. and +.. signs (binary, without bracket). 

Further simplify these expressions to a triple format a+c+b {c=n2} or to a file format with a single fixed a plus lots of double recursions ,b,c on top. 
Even further, at the expense of operator compactness, compression of the reduction forms of superpowers reaches its binary low in a basic row function. 

Tetration with higher exponents a,b,c  §2.2

We have set up an elementary system for redoubling and extend its rules slowly.

  • 2.0 a,1,1 = a,a1 1.= a.. {:2^a1} = a*2^(1+a)
  • 1.3 a,b1,1 = aa,b,1 == a..,1,1 {:2^b} = a*2^(1+b+a*2^b)

Three examples how you can reduce such expressions completely. We'll topple the googolduplex 10^10^10^100 here, a number that escapes our physical universe.

  • ♥(6,1,1) 2.= ♥(6,7) = 6*2^7 = 768
  • ♥(2,5,1) 1.= ♥(4,4,1) == ♥(2^6,1,1) 2.= ♥(64,65) = 64*2^65 = 2^71
  • ♥(2,1,5) 2.= ♥(2,3,4) 1.= ♥(4,2,4) 1.= ♥(8,1,4) 2.= ♥(8,9,3) 1.== ♥(8*2^8,1,3) 2.= ♥(2^11,2049,2) 1.== ♥(2^(11+2048),1,2) == ♥(2^(2059+2^2059),1,1) ~> ♥(2^2^2059,1,1) ~> 2^2^2^2059 ~> 2^^4\^11 ~> 2^^6

The last reduction applies the following rules that result in a base 2 tetration.
The approximation given will be worked out generally in section 5.
Assign helper variables u,v,w,.. to store numbers.

  • 2.1 a,1,c1 = a,a1,c 1.== a..,1,c {:2^a}
  • 1.4 a,b1,c = aa,b,c == a..,1,c {:2^b} 2.= u,u1,c- {u=a*2^b} ~> 2^^c\^(a*2^b)

So the three parameters are translated to a tetration 2^^c with a postponed power operation \^P on top, marked by the backslash. This is by convention worked out to a power tower 2^..(2^P) {:c-} to get more detail from P.
Backslashed arrow notation is a convenient tool to compare superexponential functions. However, the few extra steps backslashed \ on top can usually be neglected, given that the direct size of the stairway of a higher superpower is so dominant.

Our superexponential row  §2.3

Let wildcards A,X,Y,Z in a rule substitute for any allowed word (sign sequence) in the expression. We can add some restrictions to the words covered by a wildcard with Regular Expressions, and call such a standard predefined wildcard a wordcard.

Wildcards are allowed to remain empty, with no characters at all. This in contrast to variables n>0 inbetween separators which do not count down to zero. The exception is when an end parameter is deleted (it is thought not to hold a value 0 anymore).

By default the wordcard R will stand in (R: RegExp) for (part of) an array row, made up of parameters pi and single separators , but without begin or end separator.
The regular expression for R shows (when you click it!) it can also be an empty array .

Complete rules for the first row of parameters in my system with multiple parameters and single comma in between. The new upload rule does look beautiful!

  • 0.1 A, = A (comma elimination)
  • 1.0 a,1 = aa, (initial doubling)
  • 1.5 a,1bZ = aa,bZ (redoubling motor) == a..,1Z {a:2^b}
  • 2.2 a,1..R {,1:s1} = a,1..a,R {,1:s} (uploads) == a,1a,..R {a,:s} 1.= aa,..R {a,:s1}

Note that technicalities of greedy vs. lazy selection change the recipe for a wildcard:

Selections are greedy (in Regular Expressions), which means that all subsequent instances of a word to match are to be included, so that none follow right after.
When in the declaration of a rule a wildcard X is placed after a repetition .. of variable size, the greedy match on the left forces X not to start with the repeated token.
Because we've defined a variable as a repetition of ones 1.. {b} the wildcard in rule ♥.1.5 above (is Z) is not supposed to start on 1 (although the rule would still work).
If the wildcard R had not been predefined as a (partial) row, in rule ♥.2.2 the greediness of the left series of ,1 would have required us to adapt R to start on another token.
As soon as a wildcard is declared other repetitions that follow can be lazy again – making it alright for R to start with word a, in the continuation of rule ♥.2.2 above.
This being said, a clean policy will avoid the greedy issue by using well defined wildcards.

After reaching t1 = 256 in blog turf 1 it is now time to create the superexponential record t2 with ten characters up to single , comma between numbers 1..

  • t2 = 11,1,1,1,1 = ♥(2,1,1,1,1) 2.= ♥(2,1,1,3) == ♥(4,2,2,2) 1.= ♥(8,1,2,2) 2.= ♥(8,9,1,2) 1.= ♥(2^11,1,1,2) 2.= ♥(2^12,2^11,2^11,1) 1.4 ~> ♥(v,1,1,1) {v=2^^(2^11)} 2. ~> ♥(v,v,v) ~> 2^^2^^(2^11) ~> t1^^^3 ~> 2^^^4\+1

The number t2 is already unimaginably large, a full tetration step larger than the ancient unspeakable tetration 10^^(10^(5*2^120)) that mahayana buddhism aspired to. 

Clean rules and the basic row  §2.4

In our clean systems:

  • You don't repeat variables – only words consisting of fixed units are repeated.
  • Try to do without brackets – in the primary rules do not nest subexpressions.
  • Although a lower number rule comes before a higher rule in the list (we usually match ♥.1 before ♥.2), avoid dependence on rule preference.
  • Avoid greedy issues with repetitions while using predefined wildcards.
  • Don't rely on Regular Expressions to give back characters (possessive).
  • Don't allow value zero in parameters, but keep final countdowns smooth.

Knuth's arrow operation a^..b can be projected on a basic row of parameters, for the evaluation of superpowers in a system similar to ours.

  • 0. a,b = b
  • 1. a,R,1 = a,R
  • 2. a,b,1R = a,f,R {f=ab R0}
  • 3. a,b.,1..R {:s1} = a.,1..,b1,R {:s} = a,a.,1..,b,R {:s-} == a,a,a.,a-..,b-,R {:s--}
  • a,b.,1..,2 {:s} = a,a.,1..,b {:s-} = a+....a {s :b-} = a*..b {s}

An input expression runs through many reduction forms until a number output is reached. But in upload rule ♦.3 the smallest steps, like a^b = a*a^(b-1), are skipped and Knuth's substitution directly applies, so that a^(b+1) = a*..a {:b}.

In ♦.2 the function motor f adds constant a to the beast b, which is slower than the motor rule ♥.1 doubling its animal a. Also gains a parameter for it lacks a constant and it iterates down to zero instead of 1. Perhaps more significant is that small a instead of big b is substituting the left over entries 1 in the upload series.

We expect to outpace but not in the long run! The higher upload dominates and both upload rules let their best(ial) value substitute for the rightmost entry 1 in the series.
Less powerful rules in the beginning don't matter so much in the end. In section 5 below we will run down the calculation to compare both systems and prove this for the row.

Operators turned superators  §2.5

Vice versa system has an operator format that offers compactness of expression. But instead of counting operators .. we'd rather put their number in a superscript, so you might call them superoperators or superators then. 
In both formats the hearts are left associative and we can park a heart wildcard on the right to hide some advanced operations from view. 
Translate ♥(2,1,1,1) = ♥(2,1,3) = ..  to come to grips with the definition. 

2♥♥♥1 = 231 = 22230 = 223 = 2♥♥3
      = 21222 = 2021122 = 41122 = 81022 = 822
      = 81821 = 2^318 == 2^1110 = 2^1121
      = 2^1112^1120 = 2^1112^11+1 = 2^122^11
     == 2^12*2^2^1110 = 2^2060

For comparison the system with right associative superators s counting stars *.. is shown right. We stub diamonds left, but heart wildcards on either side.
Dare try to wrap your head around these alien abacuses!

a0b = ab                  a0b = ab
as0 = a {s<2 or ≠0}      as1 = a
as10 = a1           {s>0}
asb = as-asb-             asb1 = as-asb
    == a.aí..b- {:s}           == .as-..a {:b}

An incrementor í starts at 1 and is increased by 1 in each next step of a repetition :s.
For example 1*í.. {*í:n} defines the factorial, but in that case order doesn't matter so you can write n! = 1*i.. {*i:n n≥0} as well.

With these special operator notations we like to demonstrate that superexponential numbers can be expressed in a simpler way. 
Pity the party people on planet earth have hijacked superscripts for their petty exponents a2b, but for a machine superscripts and subscripts need to be delimited anyhow, in order to be read from the line. 

Generally there are two options for indexing operators and/or separator signs:

You can expand them directly a[c]b between brackets – or almost directly after the initial , like Bowers did in his Beaf (Jabe is wasting a comma sign there). 
Or you can first introduce them , and then start to count ,.. {c} and append an enumeration ,d;.. or an array ,;d,e,..; (like we did before) or ,`d,e,..` (like we do on this journey), so that a mono-bracket type expansion is eventually reached. 

The main difference between the two systems – the redoubling row versus the basic row system – appears to be that operations are in effect reduced by minority precedence. This is certain to result in larger numbers (example 5*2**3 = 1000) than the majority precedence (where 5*2^3 = 40) which rules system operators.
But how much larger are those numbers exactly?

Evaluating the first row  §2.6

Devise a formula to approximate the first row of system with arrow ^.. operations.
The usual reduction order is ♥:1:2:0 cascading from the left until rules wear out.

  • a,b1,R = u,1,R {u=a*2^b ~ 2^(b+log(a))}
  • a,b1,c1 = u,1,c1 = u,u1,c = u*2^u,1,c ~> 2^u,2^u,c- ~> 2^..u,1,1 {:c} = w,1,1 {w=2^^c\^u}
  • a,b1,c1,d = w,1,1,d ~> 2^^w,1,1,d- == x,1,1,1 {x=2^^^d\^^c\^u} = x,x1,x ~> 2^^x,1,1 ~> 2^^x  = 2^^^(d+1)\^^c\^u 
  • a.,rí.. {:n} ~> 2^..rn1\.^..rì\..log(a)- {n ì :n-}

In this general approximation formula we've used both incrementor í (as explained above) and decrementor ì meta-variables. A decrementor starts at s and is decreased by 1 each step of a repetition :s until finally index 1 is reached.

Now we can compare some Big numbers between systems and find that our is two parameters faster – or one if you don't count the constant 2 item.

a,1.. {,1:s1} = a,1..,a1 {,1:s-} = as11 = asa1
              ~> 2^..(a+1) {^:s a≥1}
              ♦= 2,a1,1..,2 {,1:s1} = 2s1a1

Of course these differences in function speed lose significance once you learn to express row length in the very Big numbers created on the row.


Can there be a final generalization in the evolution of a rule (or rule principle)?
Ponder a peculiar candidate that may answer this fundamental question affirmatively.

The doubling rule ♥.1.0 from day one has been extended a few times to cover further iterations of redoubling on the row.
Now we propose a universal motor rule ♥.1.6 with a restriction on the wildcard (is Z) And meet the dire consequences if we allow any () wildcard Z as an opportunity to create new numbers: fractions, roots, tetration roots, etc…

  • 1.6 a,1Z = aa,Z
  • => aa,,1 = a,1,1 = aa,a
  • aa,,11Z = a,1,11Z = aa,a,1Z
  • aa,,1,..1Z {1,:s} = aa,..Z {a,:s2}

You can choose rule ♥.1.6 as an alternative where usually an upload rule ♥.2 applies. To ponder an example, derive 1,,1,1 = ♥(1,½,½) a mystifying iteration indeed!
We won't go into the field of fractional parameters from odd a,,Z because we are out to build Big numbers in higher dimensions. There we evaluate strictly to whole numbers.

Monday, 26 December 2011

Growing Numbers on the Double

Police officer standing guard at the main doorway of Number 10

Coming days I show you how to build a system to express some extremely Big numbers.
Moving from the bottom up the system's rules are expanded under way, while guarding a general sense of simplicity. Soon these functions increase at record speed and our numbers travel far into the mathematical universe!

We just begin with one unit 1 (raise a finger).

Natural numbers are repetitions 1..  §1.1

Define number variables a,b,c,.. to be filled with ones. A constant t with ten units 1.
Continue counting with fingers 1 (or hands t).

2 = 11
a = 1.. {1:a a>0} = 0+1.. {+1:a}
t = 1111111111 = 10

All variables add naturally, with direct precedence. The addition operator + can be used if you need a lower precedence.
Units minus - (counting down) share this direct affinity with unit 1.

ab = 1..1.. {1:a 1:b} = a+b = ba
1- =   = 0 = -1
ab-.. {-:b} = a

We implied the repetition of characters using a special RepExp.A notation.

{ RepExp } notation

A. Here W:n signifies a word repetition (Rep), to substitute n times the word W in place of W.. in the preceding expression (Exp). We call this a RepExp, a simple form of Regular Expressions (RegExp), ideal for working out recursive functions.

Instead of grouping words with brackets like in RegExp or rehashing words in the Rep as above, we can use dots to delimit and select specific character sequences.
Arbitrary words (fitting for the Exp) are represented by wildcards in capital letters.
Count down the Rep factor to turn a RepExp step by step into a normal expression.

W.. {:n2} = W.W.. {:n1} = WW.W.. {:n}
== A.W.. {:1} = AW
A.W..M.X.Z {:1:} = AWMXZ
A.W..M.X.Z {:n1:} = AW.W..M.X.XZ {:n:}

Option B. when W in the Exp holds a single sign, just write the factor n in the Rep.
C. When W.. starts at the left end or from .W.. dot selection, put :n in the Rep.
D. With words repeated both to the left and right end (or dot), write :n: in the Rep.

With multiple repetitions, the words to target in the Exp correspond to factors in the Rep in the same order. To avoid confusion there's the canonical option:
E. The Rep clause can also be put inside the Exp, right after a word selected by a free left dot .W{:n} or after a single character w{n} as usual in RegExp.

As we venture to accomplish great things, the fun is to maintain the utmost frugality. The turf records (Dutch: turven = to count) defined in each chapter are strings of length ten – ten character places to store a larger number than before. Starting with the sign 1 we've now turved t=10.

One separator , to function as a redoubling operator  §1.2

Introduce a single comma , to separate two variables within an expression. Then reduce them by rules ♥.1 to repeatedly double the left value (starting with a) while the right iteration counter (initially b+1) is decremented.

  • 1.0 a,1 = aa = a*2
  • 1.1 a,b1 = aa,b == a..,1 {:2^b}

An alternative way to define rule ♥.1 of the operation of redoubling.

  • 0.0 a, = a = ♥(a,0)
  • 1.2 a,b = aa,b- ==0. a.. {:2^b} = a*2^b

Here a countdown is written by appending the unit minus - to parameter b so that it is reduced 1- step by step == until the final zero falls away gracefully (a zero gap must not subvert the algorithm).
Also on every iteration step each unit in first entry a is copied and added next to it. Working with integers this puts the output 1.. on a scale a*2^b of binary powers.

t1 = 11,1111111 = ♥(2,7) = 2^8
   = ttttttttttttttttttttttttt111111 {t=1111111111}

Your ten-o-maniac has managed to squeeze a byte 256 in ten places in the above two parameter notation. This restriction on expression size requires that b=t-1-a.
You may improve on his number by taking the 1.. not as characters but as real sizes, so that for all restricted ab the maximum is reached when e^(1/a)=2 so a~1.44.
In the redoubling graph [plot in Sage] for the length t-1=9 you see the real maximum at 271.7 pushing just a teeny 60% higher than our present discrete turf t1=256.