User blog:Nayuta Ito/Introduction to AAN

WARNING: This page has THIRTEEN volumes and SIXTY chapters.

=Vol.1 Simple Arrays=

Chapter 1 Simple
Linear array notation in AAN looks like this: a(a,b,c,...,z)x[y] x[y] is optional.

The outermost a shows that it is AAN, so every AAN starts with an a. Also, x is a symbol, not a number. so a(3,3)x[4] and a(3,3) are legal but a(3,3)2[4] is not.

This is how to solve linear AAN:
 * If the entry has x[y] and y is greater than 1:
 * (a,b #)x[y] = a(a,a(a,b #)x[y-1] #)
 * In English, change b into the original array, y decreased by one.
 * If the entry has x[y] and y is 1:
 * a(#)x[1] = a(#)
 * In English, just take out x[1].
 * If the array end with 0) (with no x[y]):
 * a(# 0) = a(#)
 * In English, tailing zero can be eliminated.
 * If the array has less than two entries:
 * a(a,b)=a*b
 * a(a)=a
 * In English, if the entry has two numbers, the product is the answer. If the entry has one number, the number is the answer.
 * If the third entry (from the left) is not zero and the entry has no x[y]:
 * a(a,b,c #) = a(a,b,c-1 #)x[b]
 * In English, decrease the third array by one, and add "x[b]" to the right.
 * Else (The array must not have x[y] and the third entry must be zero):
 * Find the third non-zero number from the left.
 * Decrease it by one, and change the previous entry into the second entry.

For example: a(n,1,1) =a(n,1,0)x[1] (by the fifth rule) =a(n,1,0) (by the second rule) =a(n,1) (by the third rule) =a (by the fourth rule) a(n,2,1) =a(n,2,0)x[2] =a(n, a(n,2,0)x[1] ,0 ) =a(n a(n,2,0)) =a(n,a(n,2)) =a(n,2n) =2n^2 a(4,3,0,0,1) =a(4,3,0,3,0) =a(4,3,0,3) =a(4,3,3,2) =a(4,3,2,2)x[3] =a(4, a(4,3,2,2)x[2] ,2,2) =a(4, a(4, a(4,3,2,2)x[1] ,2,2) ,2,2) =a(4, a(4, a(4,3,2,2) ,2,2) ,2,2) =a(4, a(4, a(4,3,1,2)x[2] ,2,2) ,2,2) =a(4, a(4, a(4, a(4,3,1,2)x[1] ,1,2) ,2,2) ,2,2) =a(4, a(4, a(4, a(4,3,1,2) ,1,2) ,2,2) ,2,2) =... (It will be super long)