From: Thomas Walker Lynch Date: Fri, 10 Jul 2026 17:30:42 +0000 (+0000) Subject: nice revision work today, but no forward progress X-Git-Url: https://git.reasoningtechnology.com/?a=commitdiff_plain;h=5cd441cc97662ebc5101080e5bb20aed7e941b2f;p=TM-2026 nice revision work today, but no forward progress --- diff --git a/document/TM-2026.html b/document/TM-2026.html index 6859928..b40f113 100644 --- a/document/TM-2026.html +++ b/document/TM-2026.html @@ -1760,18 +1760,19 @@ Address -

Unary Representation address

+ +

Unary Representation address

- An architect can define a Turing Machine that is identical to the recursive definition of Natural Numbers as given by Peano. Giuseppe Peano, Arithmetices principia, nova methodo exposita (Turin: Fratres Bocca, 1889). If a person were to run the Natural Number Machine and observe as it writes to the tape, that person would watch as the Natural Numbers are printed one after another: '·s·ss·sss·ssss· ...'. Because the Natural Number Machine never halts, a person cannot use the Natural Number Machine to initialize a tape, but a person can analyze the machine. When the leftmost cell holds a terminator, it is said to have the value 'zero'. A person calls 's·' the number 'one', and so forth. + A person can define a Turing Machine that is identical to the recursive definition of Natural Numbers as given by Peano. Giuseppe Peano, Arithmetices principia, nova methodo exposita (Turin: Fratres Bocca, 1889). If a person were to run the Natural Number Machine and observe as it writes to the tape, that person would watch as the Natural Numbers are printed one after another: '·s·ss·sss·ssss· ...'. Here '·' represents zero, and 's·' represents one, etc. Because the Natural Number Machine never halts, the machine cannot be used to initialize a tape, but an analyzer can evaluate the machine to make conclusions about what it would write if it were run.

- A function extension version of the Natural Number sequence generator would accept as input a prior function extension result, or an initial empty tape, and then modify the tape to contain the next count. This is accomplished through two subroutine calls: find_empty and increment. The find_empty machine checks the symbol under the head. Upon finding it is not the empty symbol, the machine steps right and checks the next cell, repeating until it finds the empty symbol, whereupon it halts. The increment machine writes an 's' onto the tape and halts. Recurrent calls to the Natural Number extender then produce a sequence of result tapes: [], [s], [ss], …. Similarly, a programmer can write a machine called decrement, though a person must note that decrementing can return the left of leftmost symbol. + In contrast, a function extension version of the Natural Number sequence generator can be run. The function extension machine would be given as input a prior function extension result, or an initial empty tape. It would then modify the tape to contain the next Natural Number, as per the sequence that the Natural Number machine would write, if it could be run. This is accomplished through two subroutine calls: find_empty and increment. The find_empty machine checks the symbol under the head. Upon finding it is not the empty symbol, the machine steps right and checks the next cell, repeating until it finds the empty symbol, whereupon it halts. The increment machine writes an 's' onto the tape and halts. Recurrent calls to the Natural Number extender then produce a sequence of result tapes: [], [s], [ss], …. Similarly, a programmer can write a machine called decrement, though the programmer must note that decrementing can return the left-of-leftmost symbol.

- To say that Natural Number A is smaller than Natural Number B is to say that A would occur on the Natural Number Machine tape to the left of B, if the machine were run. Similarly, if B were said to be greater than A, that means B would occur further to the right. It is a simple matter for a programmer to write decider machines for this. The decider is given two input tapes for the two numbers to compare, and it keeps a head on each. It then steps forward until both heads do not have an 's' under them. If empty symbols are found simultaneously on both tapes, then the two numbers are equal; otherwise, the number with an empty symbol under the head is the lesser number. + To say that Natural Number A is smaller than Natural Number B is to say that A would occur on the Natural Number Machine tape to the left of B, if the machine were run. Similarly, if B were said to be greater than A, that means B would occur further to the right. It is a simple matter for a programmer to write decider machines for this. The decider is given two input tapes for the two numbers to compare, and it keeps a head on each. It then steps forward until neither head has an 's' under it. If empty symbols are found simultaneously on both tapes, then the two numbers are equal; otherwise, the number with an empty symbol under the head is the lesser number.

@@ -1787,18 +1788,18 @@

-

Binary Arabic Representation address

+

Binary Arabic representation address

- Would it be computationally consequential for the assignment of addresses to cells if instead of using unary for addresses, a person used binary Arabic Representation? For unary representation each increment was constant time, but with Arabic addresses, increments will have a carry. Therefore, there is reason to suspect that the necessity to call an address increment when stepping probably causes steps to become ever slower. + Would it be computationally consequential if binary Arabic representation were used instead of unary for addresses? For unary representation each increment was constant time, but with Arabic addresses, increments would have a carry. Would the carry cause stepping to the right, combined with calling the address machine, to become slower and slower as the machine steps further and further?

- If an architect allows the Arabic count to be multiprecision, and thus grow as the count gets larger, the empty symbol becomes a terminator. If the architect instead fixes the width of the Arabic number, then the width must be hardcoded and handled as an end case, which muddies the discussion without changing the computational complexity results. Hence, this model opts for the expanding representation. + For this discussion, the Arabic representation address is variable precision, so it will grow as the count becomes larger. The empty symbol will serve as the terminator.

- For Arabic_increment, the machine reads the cell under the head, upon finding a 0 it writes a 1 and halts. Upon finding a 1, it writes a 0, steps right, and repeats the procedure. + For Arabic_increment, the machine reads the cell under the head; upon finding a 0 or the terminator, it writes a 1 and halts. Upon finding a 1, it writes a 0, steps right, and repeats the procedure.

@@ -1812,7 +1813,7 @@ goto increment -

Here TTU is the tape transport unit. It has the number to be incremented mounted on it. This number is either zero, which would mean the leftmost cell is empty, or it is of the same form as a result from a Natural Number extension machine. A TTU.read occurs into the read buffer automatically when the machine enters a new state on the programmed controller, so it is not counted as a step. Actions are associated with the state of the programmed controller, so when the machine arrives at a write, step, or halt node, the machine has taken a step. Sequential instructions mean unconditional next state choices, whereas an 'if' signals a conditional next state choice. The condition is a logical proposition based on the read symbol.

+

Here TTU is the tape transport unit. It has the number to be incremented mounted on it. This number is either zero, which would mean the leftmost cell is empty, or it is of the same form as a result from a Natural Number extension machine. A TTU.read places a copy of the symbol instance found in the cell under the head into the read buffer automatically when the machine enters a new state on the programmed controller, so it is not counted as a step. In contrast, the other actions are associated with the state of the programmed controller, so when the machine arrives at a write, step, or halt node, it means that the machine has taken a step. Sequential instructions mean unconditional next state choices, whereas an 'if' signals a conditional next state choice. The condition is a logical proposition based on the read symbol.

The loop form here is worth taking note of, as it will come up again. The controller executes a first action, that of a read, followed by a middle break test, and then the recursive form actions.

@@ -1879,19 +1880,19 @@ \sum_{k=1}^{n} 2k \cdot 2^{n-k} = 2^{n+2} - 2n - 4

- To find the average cost per increment across this entire progression, a person divides the total number of tape actions by the total number of increments, which is 2^n - 1. For asymptotic analysis, dividing by 2^n reveals the limits cleanly: + To find the average cost per increment across this entire progression, a person divides the total number of tape actions by the total number of increments, which is 2^n - 1:

- \text{Average Cost} \approx \frac{2^{n+2} - 2n - 4}{2^n} + \text{Average Cost} = \frac{2^{n+2} - 2n - 4}{2^n - 1} = \frac{4(2^n-1)+4-2n-4}{2^n-1}

This simplifies algebraically to:

- \text{Average Cost} = 4 - \frac{2n}{2^n} - \frac{4}{2^n} + \text{Average Cost} = 4 - \frac{2n}{2^n - 1}

- As the address space grows, the bit width n increases. The polynomial term 2n is outpaced by the exponential denominator 2^n, causing the fractional terms to converge to zero. The average work done by the machine head converges to exactly four tape actions per increment. This is a surprising counter intuitive result. + As the address space grows, the bit width n increases. The polynomial term 2n is outpaced by the exponential denominator 2^n - 1, causing the fractional terms to converge to zero. The average work done by the machine head converges to exactly four tape actions per increment. This is a surprising counter intuitive result.

@@ -1899,20 +1900,24 @@

- The model used here to define an address is analogous to keeping a pointer into memory, and then using that pointer value as the address. Each step then increments or decrements the pointer. A pointer will be one word in width. In small geometries where computation element delay dominates, two operand adders of fixed width tend towards logarithmic complexity evaluation times against bit width, which makes it practical to perform word width addition operations atomically in one machine cycle. In fact, for some machines, the adder time likely sets the clock period. Consequently, a programmer cannot expose increment time aliasing to the real world. It remains a theoretical observation. + The model used here to define an address is analogous to keeping a pointer into memory, and then using that pointer value as the address. Each step then increments or decrements the pointer. A pointer will be one word in width. In small geometries where computation element delay dominates, two operand adders of fixed width tend towards logarithmic complexity evaluation times against bit width, which makes it practical to perform word width addition operations atomically in one machine cycle. In fact, for some machines, the adder time likely sets the clock period. Consequently, a programmer cannot arrange a program to expose increment time aliasing to the real world. It remains a theoretical observation.

- On real machines, there is no head sitting on top of system memory that gets pushed back and forth. Instead, pointers are sent on a trip through a virtual memory system, and then through an address decoder. Address decoders resemble carry chains, and they also have logarithmic physical evaluation times as word width grows. Hence, a fixed width word holding an address gets decoded in approximately constant time measured in clock ticks. Address decoding will get spread across the memory hierarchy, so decode time is a complex question. + On real machines, there is no head sitting on top of system memory that gets pushed back and forth. Instead, pointers are sent on a trip through a virtual memory system, and then through an address decoder so as to locate a memory cell. Address decoders resemble carry chains, and they also have logarithmic physical evaluation times as word width grows. Hence, a fixed width word holding an address gets decoded in approximately constant time measured in clock ticks. Address decoding will get spread across the memory hierarchy, so the full answer is that decode time is a complex question.

- At a higher level, that virtual memory system level, the memory architecture begins to look more like that of a Turing Machine. The translation lookaside buffer provides stateful location context, and the neighbor relationship between pages is sometimes taken into account for performance reasons. However, once a program starts performing at virtual memory page fetch times instead of local system memory access times, a person recognizes it as page thrashing and knows it becomes too slow to wait on, no matter its computation complexity class. Aliasing can happen in the virtual memory system, which, when it happens, can cause programs to become very slow. + Although addresses are decoded, and thus locality plays no role, each decode being independent, locality of reference does matter on real machines. In interleaved memory, accesses to one location will also pull down neighbors. Prefetch algorithms will assume that the contents of neighbors are also needed, and cache lines organize memory in blocks, so the contents of each cell again comes along with its neighbors.

+ +

+ For very large programs, when the virtual memory system becomes salient, the memory architecture begins to look more like that of a Turing Machine. The translation lookaside buffer provides stateful location context, and the neighbor relationship between pages is sometimes taken into account for performance reasons. However, once a program starts performing at virtual memory page fetch times instead of local system memory access times, this is known as page thrashing and when it occurs programs become very slow. It is also possible for small programs to use address access patterns that lead to page thrashing. This is another form of address aliasing.

-

So in summary then, using Arabic Representation for addressing is not statistically computationally consequential. However, the idea of using a decoded address in place of a tape head raises issues. It would not be an exaggeration to say that the goal of modern computer architecture is to ensure that within the locality of an execution context, address decoding does not become computationally consequential. +

So in summary then, using Arabic representation for addressing is not statistically computationally consequential. However, the idea of using a decoded address in place of a tape head raises issues. It would not be an exaggeration to say that the goal of modern computer architecture is to ensure that within the locality of an execution context, address decoding does not become computationally consequential.

+ Area and partitioning