One afternoon I was fortunate to have lunch in Berkeley with Bill Kahan, a pioneer in applied number theory, and our conversation turned to errors in numeric computation. I observed that an error is merely an opportunity to do more computing. Bill seemed to like the remark; he repeated it in a Dr. Dobb's interview, where it was credited to him. When we met again, I asked him about it. He apologized, explaining that the interviewer had created something rather than reporting it, and that he was surprised himself by what he read. The apology was unnecessary. I had intended to summarize Kahan's own work. He was instrumental in creating IEEE Std. 754, where an exceptional condition, more informally an "error", need not end computation but can serve as a gateway to a higher symbolic algebra. I found that architecture inspiring, and my comment had been intended to acknowledge his inspiration.
+
One afternoon I was fortunate to have lunch in Berkeley with Bill Kahan, a pioneer in applied number theory, and our conversation turned to errors in numeric computation. I observed that an error is merely an opportunity to do more computing. Bill seemed to like the remark; he repeated it in a Dr. Dobb's interview, where it was credited to him.TODO·cite: the Dr. Dobb's interview, issue and date. When we met again, I asked him about it. He apologized, explaining that the interviewer had created something rather than reporting it, and that he was himself surprised by what he read. The apology was unnecessary. I had intended to summarize Kahan's own work. He was instrumental in creating IEEE Std 754, where an exceptional condition, more informally an 'error', need not end computation but can serve as a gateway to a higher symbolic algebra. I found that architecture inspiring, and my comment had been meant to acknowledge the debt.
-
In practical computing the symbol algebra of the IEEE Std. 754 quickly devolves into the catch-all indeterminate value, the so-called NaN, which tends to leave programmers wishing to extend the system. Kulisch and Miranker attempted to formalize computer arithmetic, and started by reasoning about a screen that laid out over the real number space. Boehm and Cartwright introduced a concept of Constructive Real Numbers, where precision of computation was extended upon demand. And through Stephen Wolfram's vision, Mathematica provides a complete symbolic math manipulation package, where a symbolic expression can be reduced before being evaluated. For evaluation they then track loss of precision through significance arithmetic. In my own work, I have suggested an analysis step first, where required precision is derived, followed by computation. However, among these there is still missing a formalism of passing through the gateway upon an error, so to speak. Mathematica comes the closest.
+
In practical computing the symbol algebra of IEEE Std 754 quickly devolves into the catch-all indeterminate value, the so-called NaN, which tends to leave programmers wishing to extend the system. Kulisch and Miranker attempted to formalize computer arithmetic, and started by reasoning about a screen that lay over the real number space.Ulrich W. Kulisch and Willard L. Miranker, Computer Arithmetic in Theory and Practice (New York: Academic Press, 1981). Boehm and Cartwright introduced a concept of Constructive Real Numbers, where precision of computation was extended upon demand. And through Stephen Wolfram's vision, Mathematica provides a complete symbolic math manipulation package, where a symbolic expression can be reduced before being evaluated. Mathematica then tracks loss of precision through significance arithmetic. In my own work, I have suggested an analysis step first, where required precision is derived, followed by computation. However, among these there is still missing a formalism of passing through the gateway upon an error, so to speak. Mathematica comes the closest. Each of these is taken up in its turn later in this book, and the citations are given there.
-
John Gustafson also brought up the topic of the nature of error shortly before publishing "The End of Error". He now has another proposal based on variable precision arithmetic known as "posits". There was so much I wanted to say when we spoke, but I could not formulate the thoughts. I had learned a great deal while doing formal analysis of the algorithms I had put on the Am29050, Am486, and K5 processors at AMD, but when I tried to articulate this, I only stammered. I feel that I fell short, as all I could do was point at my already published work at that time on high radix online arithmetic. So this volume is my answer to John's question. Albeit it is a little late, well years late, but I hope it will still have some value.
+
John Gustafson also brought up the topic of the nature of error shortly before publishing The End of Error. He now has another proposal, the posit, which abandons the variable width operands of his earlier unums in favour of a fixed width whose internal field boundaries move, so that accuracy is greatest for magnitudes near one and tapers toward the extremes of the range. John grilled me over the method I had used, and what he was pressing on was the question of how a computation is to know what precision it needs. I answered with High Radix Online Arithmetic and with the importance of variable precision, but I could not formulate the rest of the thoughts. I had learned a great deal while doing formal analysis of the algorithms I had put on the Am29050, Am486, and K5 processors at AMD, yet when I tried to articulate this, I only stammered. I feel that I fell short, as all I could do was point at my already published work at that time on High Radix Online Arithmetic. So this volume is my answer to John's question. It is a little late, well years late, but I hope it will still have some value.
-
There is a first edition of this book. The same concepts are described in those pages, but the story is not as well told, and no one has come full circle to say it made any sense to them. Well, one colleague, after reviewing the first edition, admitted he was bewildered by it and asked if I was proposing that we build Turing Machines. After all we are the music makers, in the music business, so to speak; only instead of being written in notes, our music is written in transistors and layout. So then, he rightfully asks, what is the proposal here? I can only point him at Mitch Alsup's book, and ponder how I can tell this story differently.
+
There is a first edition of this book.TODO·cite: the first edition, and the Quicklisp release of the Lisp library. The same concepts are described in those pages, but the story is not as well told, and no one has come full circle to say that it made sense. Well, one reader did come back. Kelvin Goveas, a colleague and a dear friend, reviewed the first edition, admitted he was bewildered by it, and asked whether I was proposing that we build Turing Machines. After all, we are the music makers,Arthur O'Shaughnessy, "Ode", in Music and Moonlight (London: Chatto and Windus, 1874). in the music business, so to speak; only instead of being written in notes, our music is written in transistors and layout. So then, he rightly asked, what is the proposal here? I have yet to give him an answer. The best I can do is point him at Mitch Alsup's architecture book,TODO·cite: Mitch Alsup's architecture book. Title and publication details to be confirmed; his My 66000 architecture is the subject. where the proposals are, and go on pondering how I can tell this story differently.
-
There is not a hardware specification for a new proposed machine in this book. This book is not proposing to build in hardware a Turing Machine. This is an absolute. Building a RT Machine might be interesting, and the organization for it is described in this book, but that is certainly not the proposal here. Rather this book lays the foundation for a proposal for another machine. It explains and justifies that other machine's features. But the details, the architecture, of this other machine are not found in these pages.
+
There is no hardware specification for a new machine in this book, and no proposal to build a Turing Machine in hardware. This is an absolute. The RT Machine is an improved computation theoretic model, and what distinguishes it from the Turing Machine is that it can be realized, which is what saves the Naturalist thesis. Its organization is described in these pages, and building one might be interesting, but there is no suggestion here that microprocessors should be made that way. This volume is the second edition of the first of four that were envisioned, leading in the end to the TTCA Machine, which is a real machine, and which I proposed building in 2005. What this book does is lay the foundation for that proposal, and explain and justify the features such a machine will need. The architecture itself is not found in these pages.
-
There is a practical aspect to this work. A software library that is of general usefulness can be found in these pages, and downloaded from GitHub. The library was first articulated in the Lisp language in the first edition of the book and released on Quicklisp. Lisp is in a sense pure, and formal statements can be made with it. Using it for the library made the library a natural small step away from the formal discussion that came before it was presented. Since that time I have written parts of the library in other languages and found it very useful. This volume presents the Python API.
+
There is a practical aspect to this work. A software library that is of general usefulness can be found in these pages, and downloaded from GitHub. It was first articulated in the Lisp language in the first edition of the book and released on Quicklisp. Lisp is in a sense pure, and formal statements can be made with it, so writing the library there kept it a small and natural step away from the formal discussion that precedes it. Since that time I have written parts of the library in other languages and found it useful. This volume presents the Python API.
A Peano Number is a computational structure, as its name records. It starts with emptiness, a zero, and is then built up by repeated application of the successor function. Because a number is a computational structure, number theory was already computation theory before Church, Turing, and their contemporaries gave the subject its name. It is a computation theory whose discussion is confined to the relationships among Peano structures, which is to say, to Peano Numbers. Then the activity of writing algorithms and designing circuits that relate those structures to one another, in the service of solving real problems, is applied number theory.
@@ -191,7 +185,7 @@
- The authority to remove Russell's Paradox set formulation comes from the set S. If we know its definition, then the authority comes through that definition. However, if we merely stipulate that S must be defined, then we are expressing our authority through S by declaring, "Undefined sets are not allowed." In the explanation above, it is only after discovering a set is undefined that we conclude it is not a member of S. I sometimes wonder how mathematics might have evolved had Frege simply taken that approach. We take this question up again in chapter , Computational Naturalism, and discover there is a deeper issue.
+ The authority to remove Russell's Paradox set formulation comes from the set S. If we know its definition, then the authority comes through that definition. However, if we merely stipulate that S must be defined, then we are expressing our authority through S by declaring, "Undefined sets are not allowed." In the explanation above, it is only after discovering a set is undefined that we conclude it is not a member of S. I sometimes wonder how mathematics might have evolved had Frege simply taken that approach. We take this question up again in chapter , Computational Naturalism, and discover there is a deeper issue.
@@ -220,16 +214,16 @@
Turing employed an enumerative diagonal argument to establish this result. A simpler proof by contradiction that is commonly used today was first published by Christopher Strachey in 1965 Christopher Strachey, "An Impossible Program," The Computer Journal 7, no. 4 (January 1965): 313. In his letter, Strachey explicitly attributed the distilled logic to an existing "well known piece of folklore among programmers.". To begin the proof, assume a person builds a perfect decider program, H(p, i), that evaluates any given program p executing with input i, then outputs 'Y' if p(i) halts, and 'N' if it does not halt. Next, a person writes a malicious program, M(x), that incorporates H as a subroutine. When M receives an input program x, it evaluates H(x, x) to determine how program x behaves when given itself as input. If H(x, x) outputs 'Y', M enters an infinite loop; if H(x, x) outputs 'N', M immediately halts.
-
-
+
+
M( x ){
if( H(x ,x) == 'Y' ) while( true );
else if( H(x ,x) == 'N' ) return;
}
- Code . The diagonal machine that defeats a supposed halting decider
-
+ Code . The diagonal machine that defeats a supposed halting decider
+
The evil part occurs when we give program M(x) itself as input, M(M). Program M calls its subroutine and asks H(M, M) what M will do. If H outputs 'Y', it is wrong, because M loops infinitely. If H outputs 'N', then it is wrong, because M halts. The decider H is forced into an inescapable failure, proving that no universal decider can exist.
@@ -310,8 +304,8 @@
These are the discernible levels of the computer design abstraction stack:
-
-
+
+
mathematical logic
computation theory
@@ -320,8 +314,8 @@
implementation
realization
- List . The six levels of the computer design abstraction stack
-
+ List . The six levels of the computer design abstraction stack
+
Mathematical logic underpins the computation theory level. Computation theory speaks of the time and space complexity of algorithms and the existence of solutions to decider problems, which in turn guides the goals of the architecture and organization levels.
@@ -337,7 +331,7 @@
- It is not a requirement of a computer organization, nor of an architecture, that it be capable of physical realization. The abstract Turing Machine organization developed in chapter serves as an example. Instead, an abstract organization can serve other purposes, in this case as a stepping stone to another organization that can be realized.
+ It is not a requirement of a computer organization, nor of an architecture, that it be capable of physical realization. The abstract Turing Machine organization developed in chapter serves as an example. Instead, an abstract organization can serve other purposes, in this case as a stepping stone to another organization that can be realized.
@@ -386,8 +380,8 @@
The Turing Machine is a computation theory object that is suggestive of a simple architecture, and a computer organization. A person who has had to do homework problems centered on Turing Machines will have tracked the flow of data through the machine, i.e. worked at the register-transfer level. However, a little work is needed to complete the architecture analog. The fundamentals are present: the read/write head, the tape, and the procedure for using the tape. Other things are missing, or are left unspecified:
-
-
+
+
The manipulation of symbols remains ungrounded.
The tape is not well defined.
@@ -395,8 +389,8 @@
The tape transport is not articulated, though it is implied.
The read buffer is not identified as a component. One is required so that the programmed controller can do a write without clobbering the read data needed for the next transition.
- List . What the Turing Machine leaves out of its architecture
-
+ List . What the Turing Machine leaves out of its architecture
+
As we proceed, we will likely discover other missing components.
@@ -474,20 +468,20 @@
Suppose we are given a Turing Machine m_i, which will potentially be run after being given any one of a number of input tapes x_{i,j}. For each of those inputs, the same tape with the results written upon it will be r_{i,j}. We notate this as:
-
-
+
+
m_i(x_{i,j}) = r_{i,j}
- eq: Machine m_i given input tape x_{i,j} writes result tape r_{i,j}
-
+ eq: Machine m_i given input tape x_{i,j} writes result tape r_{i,j}
+
Here the subscripts of the same name set up a correspondence. x_{i,j} is the jth input to the machine m_i, etc. The free variable j runs over all the interesting distinct input tapes to be given to machine m_i. So for example, if we had a machine, say m_8, and we had a set of three inputs to be given to m_8, then:
-
-
+
+
\begin{aligned}
m_8(x_{8,0}) &= r_{8,0} \\
@@ -495,8 +489,8 @@
m_8(x_{8,2}) &= r_{8,2}
\end{aligned}
- eq: Machine m_8 over a set of three input tapes
-
+ eq: Machine m_8 over a set of three input tapes
+
Another machine, perhaps machine m_7, would have its own distinct inputs x_{7,j}, etc.
@@ -506,25 +500,25 @@
Now suppose that a machine m_{i.1} is the result of a transformation, T, applied to machine m_i.
-
-
+
+
m_i \xrightarrow{T} m_{i.1}
- eq: Transform T carries machine m_i to machine m_{i.1}
-
+ eq: Transform T carries machine m_i to machine m_{i.1}
+
We can then assign a property to transform T called its doesn't change results property, as follows. If and only if:
-
-
+
+
\forall j \colon r_{i,j} = r_{i.1,j}
- eq: The doesn't change results condition for one machine
-
+ eq: The doesn't change results condition for one machine
+
then T doesn't change m_i results. Here we note that we are evaluating a specific machine m_i, so we must add the qualifier 'm_i results'. It might be that for another machine with another corresponding set of interesting inputs, the transform would lead to a new machine that produces different results.
@@ -534,13 +528,13 @@
If, and only if, it is the case that
-
-
+
+
\forall i, \forall j \colon r_{i,j} = r_{i.1,j}
- eq: The same results transform property, over all machines
-
+ eq: The same results transform property, over all machines
+
then we can say without qualification that T is a same results transform. Though still implied are the sets of machines and tapes.
@@ -559,13 +553,13 @@
Suppose we also have a computation theory C that allows us to analyze some machines so as to answer some questions we find interesting. Suppose furthermore that among these questions are questions of time and space complexity, along with zero or more questions about decidability. Furthermore, we are given a machine, say m_i, for which these questions have answers. We represent this as:
-
-
+
+
a_{i,k} = q_{i,k}(m_i, \{x_{i,j}\})
- eq: A computation theoretic question and the answer it has for a machine
-
+ eq: A computation theoretic question and the answer it has for a machine
+
Here, \{x_{i,j}\} represents the entire domain of j tapes being passed as arguments to the question q_{i,k}. From this, we can observe that if there are n_k questions, then we will have n_k answers. Also, for a specific machine m_i, where there are n_jj values, the domain over which m_i will be analyzed will have n_j tapes in it.
@@ -575,25 +569,25 @@
As we had already discovered when determining that T is a same results transform, T transforms machine m_i into machine m_{i.1}.
-
-
+
+
m_i \xrightarrow{T} m_{i.1}
- eq: Transform T carries machine m_i to machine m_{i.1}, restated
-
+ eq: Transform T carries machine m_i to machine m_{i.1}, restated
+
For our specific machine m_i, if and only if:
-
-
+
+
\forall k \colon a_{i,k} = a_{i.1,k}
- eq: The inconsequential condition for one machine
-
+ eq: The inconsequential condition for one machine
+
then T is computation theoretic inconsequential for m_i.
@@ -603,13 +597,13 @@
If, and only if, it is the case that:
-
-
+
+
\forall i, \forall k \colon a_{i,k} = a_{i.1,k}
- eq: The computation theoretic inconsequential transform property
-
+ eq: The computation theoretic inconsequential transform property
+
then we can say without qualification that T is computation theoretic inconsequential. Though still implied are the sets of machines, tapes, and questions.
@@ -625,18 +619,18 @@
This definition comes from Hopcroft and Ullman's book with minor terminology changes to make it flow into the text here John E. Hopcroft and Jeffrey D. Ullman, Introduction to Automata Theory, Languages, and Computation (Reading: Addison-Wesley, 1979)..
-
-
+
+
M = (Q, Σ, Î, δ, q_0, â¡, F)
- eq: The conventional Turing Machine as a seven tuple
-
+ eq: The conventional Turing Machine as a seven tuple
+
Each component of the Machine, M, is defined as follows:
-
-
+
+
Q: The finite set of states of the programmed finite state machine controller.
Σ: The finite set of input symbols.
@@ -653,8 +647,8 @@
F: The set of final or accepting states, a subset of Q.
- List . The components of the conventional Turing Machine M
-
+ List . The components of the conventional Turing Machine M
+
I introduced the qualifier programmed in front of the finite state machine controller because each Turing Machine that accomplishes a different task has a different finite state machine controller. A program is then a set of assignments to the variable parts of the Turing Machine definition. Notice that additional variables are needed by the Turing Machine executor beyond those that appear in the definition, such as the current state variable. In alternative terminology, the definition above defines a Turing Machine type, and a set of assignments to the variable parts of the definition constitutes an instance. Accordingly, then, when a computer arithmetician says he has two Turing Machines, he is saying that he has two distinct sets of Turing Machine variable assignments, and as these sets are distinct, each can be manipulated independently.
@@ -668,13 +662,13 @@
Hopcroft and Ullman explain a step of the machine by showing a representation of the tape with the state variable melded in to the left of the currently scanned symbol. Suppose δ(q, X_i) = (p, Y, L); i.e., the next move is leftward. Then,
-
-
+
+
X_1 X_2 ⯠X_{i-1} q X_i X_{i+1} ⯠X_n \underset{M}{â¢} X_1 X_2 ⯠X_{i-2} p X_{i-1} Y X_{i+1} ⯠X_n
- eq: An instantaneous description rewritten by a leftward move
-
+ eq: An instantaneous description rewritten by a leftward move
+
So first the tape is X_1 X_2 ⯠X_{i-1} X_i X_{i+1} ⯠X_n, with the head over X_i, and in state q. Then after a step of the machine, the tape is X_1 X_2 ⯠X_{i-1} Y X_{i+1} ⯠X_n, with the head over X_{i-1}, and in state p. Thus X_i was overwritten with Y, and the head stepped left.
@@ -684,19 +678,19 @@
Here is the programmed controller for a Turing Machine that reverses a binary string. Although by definition each state transition matches exactly one value under the head, as a practical matter, disjunctive selection is allowed via a comma list. A conjunctive phrasing for a state transition proposition would require stringing intermediate states in series.
-
-
+
+
- Figure . A conventional Turing Machine that reverses a binary string
-
+ Figure . A conventional Turing Machine that reverses a binary string
+
Provided the site is still alive, the following YAML can be entered at TuringMachine.io to watch the machine run.
-
-
+
+
# YAML
# Reverses a binary string using a single marker and an EOM terminator.
@@ -752,15 +746,15 @@
done:
- Code . The conventional reverse machine, as TuringMachine.io YAML
-
+ Code . The conventional reverse machine, as TuringMachine.io YAML
+
By default a newly initialized machine always starts with the head on the leftmost tape cell. The input is specified to be placed one square past the initial blank on the tape. This allows the leftmost blank to be used as a reliable start of input marker later when it is scanning left. The machine begins by reading this initial blank and stepping right. If it immediately encounters another blank, the string is empty and the machine is done. Otherwise, it sweeps right to place an end of message marker, E, immediately after the string. It then enters a repetitive process: it walks left to locate the next unprocessed input symbol, overwrites it with an asterisk to mark it as read, and then carries that remembered value rightward to deposit it at the new end of the sequence. By executing this back and forth shuttle, the machine systematically builds the reversed string to the right of the E, finishing by sweeping through to erase its temporary markers.
The following trace demonstrates the reversal of the string "110" using the same head embedded in the tape diagram as was used above, with a small variation. Here the head position is indicated using a bullet character, while the current state is listed in the left column. The empty symbol prints as a space. If you align the first line at the top of your window and scroll down, the execution plays out like an animation.
-
-
+
+
q_init ⢠1 1 0
q1 â¢1 1 0
@@ -814,8 +808,8 @@
q5 â¢0 1 1
done ⢠0 1 1
- Code . A step-by-step trace of the conventional reverse machine
-
+ Code . A step-by-step trace of the conventional reverse machine
+
@@ -824,8 +818,8 @@
The total number of steps for reversing an n symbol string:
-
-
+
+
\text{steps} =
\begin{cases}
@@ -833,8 +827,8 @@
3n^2 + 6n + 5 & \text{if } n \ge 1
\end{cases}
- eq: Steps taken by the conventional reverse machine
-
+ eq: Steps taken by the conventional reverse machine
+
This shows string reversal to be an O(n^2) complexity problem, which might appear to some programmers as a peculiar result, as the same problem can be solved in O(n) time with a C program. This justifies further analysis.
@@ -842,23 +836,23 @@
For a realized machine, symbols are machine word encodings. For example, ASCII uses 7 data bits, so there are 128 symbols available. If the width of the word for encoding symbols is n bits, then the total number of states required for this string reverse machine is:
-
-
+
+
\text{states} = 2^n + 8
- eq: States required by the conventional reverse machine
-
+ eq: States required by the conventional reverse machine
+
The number of arcs in the machine:
-
-
+
+
\text{arcs} = 2^{2n} + 9(2^n) + 12
- eq: Arcs required by the conventional reverse machine
-
+ eq: Arcs required by the conventional reverse machine
+
These equations show that the state controller size explodes with word width. It would be impractical to implement for all but the smallest of word sizes. This is one of the reasons that computation theory books use modest-sized symbol alphabets in their examples, perhaps the first few letters of the Latin alphabet, or the letter 's' for unary arithmetic. Previous sections discussed challenges transitioning the Turing Machine to a modern architecture due to the tape length, and discussed how this could be mitigated. In contrast, there is no practical mediation for implementing a Turing Machine controller even for modest-sized real problems.
@@ -866,8 +860,8 @@
The observation runs the other way as well. There is not a single chapter dedicated to computation theory in Hennessy and Patterson's definitive textbook on computer architecture. John L. Hennessy and David A. Patterson, Computer Architecture: A Quantitative Approach, 6th ed. (Cambridge: Morgan Kaufmann, 2017).
-
-
+
+
@@ -905,8 +899,8 @@
- Table . The chapter list of Hennessy and Patterson, Computer Architecture: A Quantitative Approach
-
+ Table . The chapter list of Hennessy and Patterson, Computer Architecture: A Quantitative Approach
+
@@ -921,13 +915,13 @@
Because emptiness is a property of a container, Turing's first statement can be modeled with a sequence of sets. For a Turing Machine tape, each sequence member is either an empty set or a singleton set. In the language of mathematics an empty tape can be defined as a empty sets:
-
-
+
+
T_0 = [ \{ \}, \{ \}, \{ \}, \dots ]
- eq: An empty tape written as a sequence of empty sets
-
+ eq: An empty tape written as a sequence of empty sets
+
Here, each tape member set is called a cell. This definition for an empty tape is specific to Turing Machines, as in mathematics an empty sequence has zero length. An empty tape is not an empty sequence, rather it is an infinite sequence where every member is an empty set. In one sense this is a little peculiar that something said to be empty is infinite, in another sense it is consistent for the model that an empty Turing Machine tape keeps its defining characteristics. That is, it remains a single-ended Turing Machine tape, where any cell of the tape could be written with a symbol value, while the basic form of the tape will not change.
@@ -935,8 +929,8 @@
So we might imagine a tape machine, say called machine A, where, upon attempting to read an empty cell, the machine head instead returns a control symbol representing that the cell was empty. To accomplish this, the head would have to do some work; it would have to be able to detect emptiness, and then choose to return the empty symbol instead of a read value. This feature would fix the problem of not having any defined next-state behavior for an empty cell. Furthermore, suppose the inverse process is also special in that upon attempting to write the empty symbol, the machine takes action, emptying the cell out. This would facilitate an erase operation.
-
-
+
+
def read(c):
if is_empty(c):
@@ -944,11 +938,11 @@
else:
return c.get()
- Code . Reading a cell that can be empty
-
+ Code . Reading a cell that can be empty
+
-
-
+
+
def write(c ,x):
if not is_empty(c):
@@ -956,18 +950,18 @@
if x != 'empty':
c.put(x) # Place the new symbol unless we are erasing
- Code . Writing a cell, where writing the empty symbol erases it
-
+ Code . Writing a cell, where writing the empty symbol erases it
+
Now imagine machine B, where the concept of an empty cell is jettisoned, and what remains is the mere memory of emptiness, a symbol called empty. Then using the language of mathematics, the mathematician defines an initial empty tape as:
-
-
+
+
T_0 = [ \mathtt{empty}, \mathtt{empty}, \mathtt{empty}, \ldots ]
- eq: An empty tape written with the empty symbol
-
+ eq: An empty tape written with the empty symbol
+
For machine B, no modifications are required to the native read and write functions.
@@ -1019,15 +1013,15 @@
Like the empty symbol, unspecified is a meta-symbol. It describes the data, or lack thereof, rather than being the data. Specifically, the unspecified symbol says that another machine, a machine A, would have a singular alphabet symbol at the memory location, but our machine B is not being informed as to which symbol it is. Because the Turing Machine state transition function requires a specific symbol value, reading an unspecified symbol, and then using it to make a decision as though it were a concrete symbol, would be an error, unless that control path was for the very purpose of detecting this error.
Reasons that memory can be unspecified include:
-
-
+
+
The memory was not initialized.
The memory holds stale data written by an unrelated process, such as a reused memory allocation.
The data is effectively unspecified because the program, by design, does not make decisions based upon its value.
- List . Reasons a memory location can hold an unspecified value
-
+ List . Reasons a memory location can hold an unspecified value
+
An example of effectively unspecified data would be a program that reverses a string without looking at the values being reversed. A string reverse function need not inspect the value of the string; it only needs to recognize the structural boundaries established by the writing protocol. Yet the conventional Turing Machine is incapable of doing this, and worse, as we saw, there is an explosion in the number of states for the reverse string controller against word length.
@@ -1039,8 +1033,8 @@
The modifications
The specific architectural modifications are as follows:
-
-
+
+
There is one unified alphabet Σ to which both status symbols and data symbols belong.
The machine utilizes a Moore-style programmed state controller, with zero or one instruction specified per state, so that instructions are independent and managed separately from state transitions.
@@ -1058,24 +1052,24 @@
- List . The architectural modifications that distinguish the RT Machine
-
+ List . The architectural modifications that distinguish the RT Machine
+
Here the subscript i is a device used to emphasize that q_i and q_{i+1} can be any members of the total set of states, Q. State q_0 refers specifically to the initial state. Also note, later the spartan q will be used to denote the contents of the q register, the current state register.
The Hopcroft and Ullman machine definition specified a next-state function, δ. Here we instead use next-state tables that cascade, and as tables are containers, we denote these using a capital letter as Î_0, Î_1, Î_2, and Î_3.
The new machine evaluates next-state transitions through these four layers, in order, progressing to the next layer only when no transition is found in the prior layer:
-
-
+
+
Conditional (Î_0): Selects the transition rule that matches the current state and the value of the status register.
State Default (Î_1): Selects the default transition rule that matches the current state.
Status Default (Î_2): Selects the default transition rule that matches the current machine status.
Global Default (Î_3): A single table that holds the next-state of last resort.
- List . The four next-state transition layers, in evaluation order
-
+ List . The four next-state transition layers, in evaluation order
+
Programmers will typically use the Global Default arc, Î_3, to take the machine to an error state when they have mistakenly left the next-state transition undefined. However, it is conceivable for some machines that if no other next-state is defined, there is a single logical state that should be visited, and this condition is not an error. If no Global Default arc is specified, and no next-state is found, the machine hangs.
@@ -1091,33 +1085,33 @@
The RT Machine fixed part
-
-
+
+
\mathit{MF} = (\mathit{QF}, \mathit{ΣF}, \mathit{AF})
- eq: MF, the fixed part of the RT Machine
-
+ eq: MF, the fixed part of the RT Machine
+
In the following, the middle dot acts as a namespace operator, N{·}x. By doing this we assure there will be no aliasing with the symbols provided by the programmer when he defines a programmed state controller.
The set of predefined states:
-
-
+
+
\mathit{QF} = \{\mathit{QF}{·}\mathtt{initial}\}
- eq: QF, the set of predefined states
-
+ eq: QF, the set of predefined states
+
The state controller always starts in the QF·initial state. This is a symbol representing the state; it is not a register that holds a state. The 'F' values are all fixed.
The programmer cannot add instructions to the machine definition, so there are no symbol aliasing issues here:
-
-
+
+
\begin{aligned}
\mathit{AF} = \{& \\
@@ -1130,20 +1124,20 @@
\}
\end{aligned}
- eq: AF, the set of predefined instructions
-
+ eq: AF, the set of predefined instructions
+
where Ï must be in Σ.
The set of predefined symbols:
-
-
+
+
\mathit{ΣF} = \{\mathit{ΣF}{·}\mathtt{leftmost}, \mathit{ΣF}{·}\mathtt{rightmost}\}
- eq: ΣF, the set of predefined symbols
-
+ eq: ΣF, the set of predefined symbols
+
Note that the machine does not report having stepped off the end of the tape. There are no errors of the "you did it, shame on you" kind in this architecture. Instead the status register carries the cell type, and rightmost is one of the types it can carry. A controller that cannot prove it will stay on the tape must therefore consult the status before stepping right, and decide. Often the proof is available, in which case no test is needed and no cycles are spent on one. Where it is not available, the machine has told the program what it needs to know in advance rather than punished it afterwards. This is the same discipline applied to empty and to unspecified data, and it is what allows the fault taxonomy given earlier to hold: a program stops because its logic said to, because it has a flaw, or because a physical resource ran out and somebody must bring more. Walking off the end of the tape is not a fourth reason, because the machine gives the program the means to see the end coming.
@@ -1155,13 +1149,13 @@
Machine variables
-
-
+
+
\mathit{MV} = (q, s, d)
- eq: MV, the machine variables
-
+ eq: MV, the machine variables
+
q: is the current state of the machine.
@@ -1175,105 +1169,105 @@
Programmable part
-
-
+
+
\mathit{MP} = (\mathit{QP}, \mathit{ΣP}, \mathit{ÎP}, Î_0, Î_1, Î_2, Î_3, \mathit{HP})
- eq: MP, the programmable part of the RT Machine
-
+ eq: MP, the programmable part of the RT Machine
+
A set of programmed state symbols:
-
-
+
+
\mathit{QP}
- eq: QP, the set of programmed state symbols
-
+ eq: QP, the set of programmed state symbols
+
A set of programmed data symbols:
-
-
+
+
\mathit{ΣP}
- eq: ΣP, the set of programmed data symbols
-
+ eq: ΣP, the set of programmed data symbols
+
The programmed instructions. A set of pairs of the form:
-
-
+
+
\mathit{ÎP} = \{ \langle q_i, a \rangle, \dots \}
- eq: ÎP, the programmed instructions, as state and action pairs
-
+ eq: ÎP, the programmed instructions, as state and action pairs
+
where q_i is matched to the current state, and a is a member of \mathit{A}.
The conditional transition table. A set of state transition triples; each triple is of the form:
Here q_i and q_{i+1} are two states from the total set of Q. They need not be distinct. While the machine is running, state q_i is to be matched against the contents of the q register, the current state. Symbol Ï is a member of the total set Σ and is to be matched against the contents of the s register, the machine status. When q_i matches the current state and Ï matches the current status, then q_{i+1} becomes the next-state.
The state default transition table. A set of state transition pairs; each pair is of the form:
-
-
+
+
Î_1 = \{ \langle q_i, q_{i+1} \rangle, \dots \}
- eq: Îâ, the state default transition table
-
+ eq: Îâ, the state default transition table
+
where q_i is matched to the current state, and upon a match q_{i+1} will be taken as the next-state.
The status default transition table. A set of state transition pairs; each pair is of the form:
-
-
+
+
Î_2 = \{ \langle Ï, q_{i+1} \rangle, \dots \}
- eq: Îâ, the status default transition table
-
+ eq: Îâ, the status default transition table
+
where Ï matches the symbol in s register, and upon a match q_{i+1} will be taken as the next-state.
The global default next-state:
-
-
+
+
Î_3 = q_{i+1}
- eq: Îâ, the global default next-state
-
+ eq: Îâ, the global default next-state
+
This is the transition of last resort. It is unconditional; the next-state becomes q_{i+1}.
A set of programmer-defined halting states:
-
-
+
+
\mathit{HP}
- eq: HP, the set of programmed halting states
-
+ eq: HP, the set of programmed halting states
+
@@ -1281,76 +1275,76 @@
The RT Machine definition in total
-
-
+
+
M = (q, s, d, Q, Σ, A, Î, Î, H)
- eq: The RT Machine in total
-
+ eq: The RT Machine in total
+
The variables used by the executor, \mathit{MV} = (q, s, d).
The complete set of states, uniting the fixed predefined states and the programmed states:
-
-
+
+
Q = \mathit{QF} \cup \mathit{QP}
- eq: Q, the complete state set, fixed united with programmed
-
+ eq: Q, the complete state set, fixed united with programmed
+
The complete set of symbols, uniting the fixed control symbols and the programmed data symbols:
-
-
+
+
Σ = \mathit{ΣF} \cup \mathit{ΣP}
- eq: Σ, the complete symbol set, fixed united with programmed
-
+ eq: Σ, the complete symbol set, fixed united with programmed
+
All members of the set of available instructions are fixed:
-
-
+
+
A = \mathit{AF}
- eq: A, the instruction set, entirely fixed
-
+ eq: A, the instruction set, entirely fixed
+
The table of state-instruction pairs is strictly programmed.
The ordered sequence of next-state transition rules:
-
-
+
+
Î = [Î_0 \mid Î_1 \mid Î_2 \mid Î_3]
- eq: Î, the transition rules as an ordered sequence
-
+ eq: Î, the transition rules as an ordered sequence
+
The set of halt states is strictly programmed, and thus could be empty.
-
-
+
+
H = \mathit{HP}
- eq: H, the halt state set, entirely programmed
-
+ eq: H, the halt state set, entirely programmed
+
@@ -1367,15 +1361,15 @@
Initialization stage
Before the first cycle begins, a tape is selected and mounted. The read/write head is positioned over the leftmost tape cell. The machine variables are initialized as follows:
-
-
+
+
The current state q is set to \mathit{QF}{·}\mathtt{initial}.
The data register d is initialized to hold the \mathit{ΣF}{·}\mathtt{unspecified} symbol.
The status register s is initialized to hold the \mathit{ΣF}{·}\mathtt{unspecified} symbol.
- List . The initial values given to the machine variables
-
+ List . The initial values given to the machine variables
+
@@ -1384,14 +1378,14 @@
Phase 1: Instruction issue and execution
-
-
+
+
Given the current state q, lookup the instruction λ, within the instruction table Î.
Perform the instruction λ.
- List . The two steps of instruction issue and execution
-
+ List . The two steps of instruction issue and execution
+
If the instruction is left and the machine walks off the tape, the machine hangs.
@@ -1416,8 +1410,8 @@
Because the RT Machine separates the data path from the control path, it is possible to reverse a string without inspecting the payload. The programmed controller only needs to recognize the structural boundaries of the data protocol. When a payload symbol is encountered, the controller executes a read(d) instruction, placing the value into the data register, which is not examined for decision-making purposes. When a value is used to base a decision upon, the controller executes a read(s), placing the value into the status register. Because instructions are bound to states rather than transitions, reading and stepping are distinct states. This combination of features results in a controller that has threads of serialized execution.
-
-
+
+
# RT Machine String Reverse
# Domains:
@@ -1558,17 +1552,17 @@
δ:
Q·Done
- Code . The RT Machine string reverse controller
-
+ Code . The RT Machine string reverse controller
+
-
-
+
+
- Figure . The RT Machine that reverses a binary string
-
+ Figure . The RT Machine that reverses a binary string
+
@@ -1579,8 +1573,8 @@
The form of this diagram shows a lead-in, a long loop, and a tail leading to done. This is suggestive of code followed by a while loop that breaks out, with further code completing the program.
-
-
+
+
void RT·reverse_string() {
// Initialization: Scan to EOM and setup the EOR boundary
@@ -1634,13 +1628,13 @@
return;
}
- Code . The RT reverse controller written as C
-
+ Code . The RT reverse controller written as C
+
The total number of steps for reversing an n symbol string using the RT Machine:
-
-
+
+
\text{steps} =
\begin{cases}
@@ -1648,8 +1642,8 @@
4.5n^2 + 11.5n + 5 & \text{if } n \ge 1
\end{cases}
- eq: Steps taken by the RT reverse machine
-
+ eq: Steps taken by the RT reverse machine
+
@@ -1659,8 +1653,8 @@
The reverse string machine spends a lot of time shuttling the head between two context areas: one for the original string, and one for the resulting reversed string. This suggests that a two-head version would be faster. The following is the two-head state machine definition:
-
-
+
+
# RT Two-Head String Reverse
# input: (Ï â Σ)* EOM (starting on the leftmost cell)
@@ -1761,17 +1755,17 @@
δ:
Q·Done
- Code . The two-headed string reverse controller
-
+ Code . The two-headed string reverse controller
+
-
-
+
+
- Figure . A two-headed RT Machine that reverses a binary string
-
+ Figure . A two-headed RT Machine that reverses a binary string
+
@@ -1781,8 +1775,8 @@
The number of states has dropped from 24 to 18, while the speed increase is dramatic, with the former quadratic performance becoming linear performance. The total number of steps for reversing an n symbol string using a two-head RT architecture:
-
-
+
+
\text{steps} =
\begin{cases}
@@ -1790,13 +1784,13 @@
9n + 4 & \text{if } n \ge 1
\end{cases}
- eq: Steps taken by the two-headed RT reverse machine
-
+ eq: Steps taken by the two-headed RT reverse machine
+
The two paths through the state machine, and the one loop, translate well into code:
-
-
+
+
void RT·reverse_string_2_head() {
// Phase 1: Both heads scan right to the EOM pivot
@@ -1837,8 +1831,8 @@
return;
}
- Code . The two-headed reverse controller written as C
-
+ Code . The two-headed reverse controller written as C
+
This machine has a single tape with two heads marking two separate context areas. Because the areas do not overlap, this situation is indistinguishable from the case of the machine having two separate tapes, each with its own head. Hartmanis and Stearns established the original proof that simulating a Turing Machine with multiple tapes, each with its own head, on a single-tape, single-head machine incurs a quadratic time penalty J. Hartmanis and R. E. Stearns, "On the computational complexity of algorithms," Transactions of the American Mathematical Society 117 (1965): 285-306.. Hopcroft and Ullman formalize this relationship in their text John E. Hopcroft and Jeffrey D. Ullman, Introduction to Automata Theory, Languages, and Computation (Reading: Addison-Wesley, 1979), 292.. This explains why in this example of a string reverse machine, when the second head was added to eliminate the head shuttling, the quadratic term disappeared. Not all quadratic terms in step-count formulas are due to shuttling, but this one happens to be such a case.
@@ -1854,18 +1848,18 @@
The RT Machine design
-
-
+
+
- Figure . A Turing Machine
-
+ Figure . A Turing Machine
+
-
The prior chapter on the computation theoretic RT Machine, chapter , serves as the architectural template, with only a few modifications. The architecture requires explicit data rather than accepting meta-symbols like 'unspecified' as presumed initial values 'by definition'. Actual values are transacted. Now that data and control have been separated, the controller is practical to implement, and even more so because it was defined in terms of tables that can be built in hardware. As the read status instruction returns the cell type, it will in its current form be able to return 'rightmost', so the right end of the tape can be detected. In order to extend the tape, the machine will stop and ask the operator to mount a new reel. This could be signaled when the user attempts to step right of rightmost, either by a panel light that illuminates upon the machine finding a rightmost status, or by the program printing a message on the console teletype. As this is a constant-time operation, it is computation theoretic inconsequential.
+
The prior chapter on the computation theoretic RT Machine, chapter , serves as the architectural template, with only a few modifications. The architecture requires explicit data rather than accepting meta-symbols like 'unspecified' as presumed initial values 'by definition'. Actual values are transacted. Now that data and control have been separated, the controller is practical to implement, and even more so because it was defined in terms of tables that can be built in hardware. As the read status instruction returns the cell type, it will in its current form be able to return 'rightmost', so the right end of the tape can be detected. In order to extend the tape, the machine will stop and ask the operator to mount a new reel. This could be signaled when the user attempts to step right of rightmost, either by a panel light that illuminates upon the machine finding a rightmost status, or by the program printing a message on the console teletype. As this is a constant-time operation, it is computation theoretic inconsequential.
-
Because a Turing Machine can only reach another cell further out on the tape by stepping to it, space complexity and time complexity are related. A program that runs for ten steps can consume at most ten cells of tape. However, if that program merely bounces between two cells, it will require less space, precisely two cells. As another example, a program that counts the number of characters on its input tape using Hindu-Arabic notation will execute in asymptotically linear time, as demonstrated in section , which analyses the increment operation. Its working footprint, however, will be logarithmic in space complexity, because that is how fast an Hindu-Arabic representation grows with a count.
+
Because a Turing Machine can only reach another cell further out on the tape by stepping to it, space complexity and time complexity are related. A program that runs for ten steps can consume at most ten cells of tape. However, if that program merely bounces between two cells, it will require less space, precisely two cells. As another example, a program that counts the number of characters on its input tape using Hindu-Arabic notation will execute in asymptotically linear time, as demonstrated in section , which analyses the increment operation. Its working footprint, however, will be logarithmic in space complexity, because that is how fast an Hindu-Arabic representation grows with a count.
If a program executed at the speed of a human operator, the operator would likely abandon the process before it finished. This highlights a necessary attribute of good software: utility. It also exposes a limitation of pure computation theory, which abstracts away physical time. Nevertheless, formal analysis remains a necessity. Consider an exponential-time program processing worst-case operands: its execution time explodes relative to input length, rapidly exceeding the age of the universe. In such extremes, empirical wall-clock measurement becomes superfluous. Computation theory classifies a program's behavior, which establishes structural implications for wall-clock time, rather than calculating absolute durations.
@@ -1884,28 +1878,28 @@
An HU contains a head and a local controller. The local controller supports these instructions:
-
-
+
+
read() â Ï
write(Ï)
status() â s
- List . The instructions supported by the head unit controller
-
+ List . The instructions supported by the head unit controller
+
-
On this model of machine, the HU status is identical to the indicated cell's type. The cell type is not read from the tape; rather, it is derived from the head's physical relationship to the ends of the tape. With a physical tape drive, an unused leader and trailer are required to prevent the tape from departing from the reels, a condition difficult to reverse. Therefore, the format, or physical, markers will be on the ends of the usable portion of the tape, rather than on the physical end of the tape. Consequently, the HU works in conjunction with the TTU to derive the status. (The tape transport unit, the TTU, is discussed in the next section, section .) As established in section , cell types are:
+
On this model of machine, the HU status is identical to the indicated cell's type. The cell type is not read from the tape; rather, it is derived from the head's physical relationship to the ends of the tape. With a physical tape drive, an unused leader and trailer are required to prevent the tape from departing from the reels, a condition difficult to reverse. Therefore, the format, or physical, markers will be on the ends of the usable portion of the tape, rather than on the physical end of the tape. Consequently, the HU works in conjunction with the TTU to derive the status. (The tape transport unit, the TTU, is discussed in the next section, section .) As established in section , cell types are:
-
-
+
+
leftmost
rightmost
medial
island
- List . The cell types a head unit can report
-
+ List . The cell types a head unit can report
+
A computation theoretic Turing Machine would never encounter a status of rightmost or island. This is where a finite extendable tape structurally differs from a single-ended theoretical tape.
@@ -1921,21 +1915,21 @@
The TTU is the component where tapes are mounted and unmounted, and where read/write head units are installed. When multiple HUs are plugged in, the controller passes control among them so it appears that heads never collide. The TTU controller has these components:
-
-
+
+
one or more HUs
a data buffer holding a single symbol
a status buffer
a instruction buffer, written by the programmed controller, acted upon immediately by the TTU
- List . The components of the tape transport unit controller
-
+ List . The components of the tape transport unit controller
+
The TTU interfaces with the executor, which in turn gates the flow of data through the machine. The executor controls the clock and reset lines, and through this supervises the customer programmed control unit, the CPCU. This two-layer control system is single-threaded and issues the following instructions to each selected TTU:
-
-
+
+
read(head) â Ï
write(Ï ,head)
@@ -1943,8 +1937,8 @@
left(head)
right(head)
- List . The instructions issued to a selected tape transport unit
-
+ List . The instructions issued to a selected tape transport unit
+
The head argument multiplexes the instruction to the specified head. If the TTU has one head, the head argument is optional. The last two instructions cause the tape to be moved such that, relatively, the selected head moves left or right by one cell.
@@ -1955,8 +1949,8 @@
The controller is programmed via patch panels. The panels would look something like what is shown in the following ASCII art blocks. Note that â indicates an illuminated indicator light, whereas â is not illuminated. [/] represents an open toggle switch, while [â] is a closed one. {*} is a pushed button, while { } is a button that is not pushed. ( ) represents a hole for a banana plug. Each patch cord has a banana plug on each end. Plugging a patch cord between separate panels will void the warranty ;-).
- Figure . The control panel, carrying power, error, reset and single-step
-
+ Figure . The control panel, carrying power, error, reset and single-step
+
-
-
+
+
- Figure . The state transition panel, with state indicators and halt switches
-
+ Figure . The state transition panel, with state indicators and halt switches
+
-
-
+
+
- Figure . The instruction panel, one patch row per instruction and one column per state
-
+ Figure . The instruction panel, one patch row per instruction and one column per state
+
-
-
+
+
- Figure . The sigma select panel, choosing the symbol written by write(Ï)
-
+ Figure . The sigma select panel, choosing the symbol written by write(Ï)
+
The top panel has two toggle switches. One turns the machine on, and the other selects run or single-step mode. Immediately to the right of the two toggles are indicator lights. To the right of the indicator lights are two push buttons. One is for reset, which sends the machine back to state q_0, and the other is for stepping the machine when it is in single-step mode. This panel also has an error indicator light which will illuminate if no next-state is specified for a state transition, and thus the machine is hung, or if a head walks off the end of a tape.
This section describes the RT Machine organization. Figure shows the major components and their channels of communications. The organization guides designers who will later draft schematics that specify all of the connections.
+
This section describes the RT Machine organization. Figure shows the major components and their channels of communications. The organization guides designers who will later draft schematics that specify all of the connections.
Components
-
-
+
+
Control Panel
@@ -2102,10 +2096,10 @@
s register
Status Decoder
- List . The units and panels the machine is assembled from
-
+ List . The units and panels the machine is assembled from
+
-
As described in chapter , which is being used as the architectural template, the executor guides the machine through the initialization, programmed control, and halting stages of execution. The Executor contains the power, reset, and clock logic. It has two modes of execution: the run mode in which the clock runs free, and the single-step mode, in which clock pulses are sent with the push of a button. It also holds the halt state switch bank, and is ready to stop the clock when a halt state is reached. When in the programmed control stage, most of the active control comes from the CPCU.
+
As described in chapter , which is being used as the architectural template, the executor guides the machine through the initialization, programmed control, and halting stages of execution. The Executor contains the power, reset, and clock logic. It has two modes of execution: the run mode in which the clock runs free, and the single-step mode, in which clock pulses are sent with the push of a button. It also holds the halt state switch bank, and is ready to stop the clock when a halt state is reached. When in the programmed control stage, most of the active control comes from the CPCU.
The CPCU contains the current state register q, the Next-State Table, and the Instruction Table.
@@ -2163,15 +2157,15 @@
Head partition
-
-
+
+
The left side: The finite set containing all of the cells to the left of the head cell.
Head: the head cell.
The right side: the infinite set containing all the cells to the right of the head.
- List . The three areas of the head partition
-
+ List . The three areas of the head partition
+
If the head is on the leftmost cell, there is no left side area.
Remaining: the infinite set including the right neighbor of the leftmost cell, and all cells further to the right.
- List . The two areas of the leftmost and remaining partition
-
+ List . The two areas of the leftmost and remaining partition
+
@@ -2198,8 +2192,8 @@
A nonempty tape, one with at least one cell holding an alphabet symbol, can be partitioned into the following areas:
-
-
+
+
The left empty tail: if the leftmost cell of the tape is an alphabet cell, there is no left empty tail. Otherwise, it consists of the leftmost cell and the empty cells, if any, to the right of the leftmost cell, up to, but not including, the first alphabet cell.
@@ -2207,8 +2201,8 @@
The right empty tail: the infinite set extending from the right neighbor of the rightmost cell of the active area, extending rightward.
- List . The three areas of the active area partition
-
+ List . The three areas of the active area partition
+
A noncomputational tape is one that cannot be initialized by a Turing Machine, but can still be surmised to exist, perhaps in analysis due to its properties. The empty tape is an example. The tape holding the Peano Numbers is another example. For noncomputational tapes that have the property that the active area is open on the right, there is no right empty tail.
@@ -2331,15 +2325,15 @@
When a Turing Machine operates on a finite virtual tape, the structural logic of the partitions established earlier must be updated to reflect the absolute rightward boundary.
-
-
+
+
For the Head partition and Area implied partition, the right side is no longer infinite. It is a finite set containing all cells extending from the right neighbor of the head (or area) up to the absolute rightmost cell of the virtual tape. If the head (or area) includes the rightmost cell of the virtual tape, the right side set does not exist.
For the Leftmost/remaining partition, the remaining area is now a finite set terminating at the rightmost cell of the virtual tape.
For the Active area partition, the right empty tail is similarly a finite set extending to the rightmost boundary of the virtual tape. If the rightmost alphabet cell occupies the rightmost cell of the virtual tape, the right empty tail does not exist.
- List . The partitions of a finite virtual tape
-
+ List . The partitions of a finite virtual tape
+
@@ -2366,7 +2360,7 @@
So we now have two means for identifying a feature. One means is to state its address, and the other is to put a tape machine head on it.
-
As we noted in section , an area has two distinguishing features, being that it has a leftmost cell, and a rightmost cell. That definition is topological. If we start with the leftmost cell of a tape, we are either already on the leftmost cell of a defined area, or we can step right to find it. At the point of finding it we know this leftmost cell is part of the area, then we are either already on the rightmost cell, or we can continue to step right on cells in the area until we find the rightmost cell in the area. The right neighbor of the rightmost cell in the area, and all cells to that right of that, are excluded from the area.
+
As we noted in section , an area has two distinguishing features, being that it has a leftmost cell, and a rightmost cell. That definition is topological. If we start with the leftmost cell of a tape, we are either already on the leftmost cell of a defined area, or we can step right to find it. At the point of finding it we know this leftmost cell is part of the area, then we are either already on the rightmost cell, or we can continue to step right on cells in the area until we find the rightmost cell in the area. The right neighbor of the rightmost cell in the area, and all cells to that right of that, are excluded from the area.
With addresses we can now define an area with two addresses, two Peano Numbers, the address of the leftmost cell, and that of the rightmost cell. All Peano Numbers greater than or equal to the address of the leftmost cell, or less than or equal to the address of the rightmost cell, are addresses of cells that are in the area. This feels more satisfactory for most of us, as now we are talking about arithmetic rather than graph topology. Though should the topology of the tape be generalized, this could become limiting. It reminds me of Frege's admonition that perhaps math should be built on top of geometry.
@@ -2406,15 +2400,15 @@
How cardinality is computed
-
-
+
+
We set Turing Machine P with its head on the leftmost cell of an area. We mount the initial tape, '·', on the A machine.
We step P and simultaneously run the A machine. Stepping stops when P reaches the rightmost cell of the area. At this point, the tape on the A machine holds the address space extent.
The A machine is run an additional time. The output on the tape is defined to be the cardinality of the address space, aka the cardinality.
- List . The three steps for computing the cardinality of an address space
-
+ List . The three steps for computing the cardinality of an address space
+
@@ -2477,13 +2471,13 @@
Now here is an interesting result:
-
-
+
+
\aleph_{0} - \aleph_{-1} = 1
- eq: The difference of two transfinite cardinals is one
-
+ eq: The difference of two transfinite cardinals is one
+
Neither machine can be run. However we can compose the two machines, then simplify the composition. When we do so, the ever larger Peano Number machines annihilate each other, and the increment machine remains. The increment machine can be run, so we end up with an output value.
@@ -2551,8 +2545,8 @@
For Hindu-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.
-
-
+
+
increment:
a = TTU.read()
@@ -2563,19 +2557,19 @@
TTU.step()
goto increment
- Code . A controller that increments a binary counter
-
+ Code . A controller that increments a binary counter
+
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 Peano 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 programmed state controller has taken a step. Sequential instructions mean unconditional next-state choices, whereas an if signals a conditional next-state choice. The if 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.
- Each row shows an input tape, and actions taken to write the result tape. For any given row, the result tape is the same as the input tape on the next row down. Table lists 7 increments, which is sufficient to reach the maximum count that can be held by a 3 bit counter.
+ Each row shows an input tape, and actions taken to write the result tape. For any given row, the result tape is the same as the input tape on the next row down. Table lists 7 increments, which is sufficient to reach the maximum count that can be held by a 3 bit counter.
-
-
+
+
@@ -2624,8 +2618,8 @@
- Table . The cost in steps of each increment, through the range of a three bit counter
-
+ Table . The cost in steps of each increment, through the range of a three bit counter
+
The number of programmable controller state transition steps required to reach a maximum 1 bit, 2 bit, and 3 bit count are: [2, 8, 22]. Note these are cumulative. The three bit maximum count cost includes that of the two bit maximum count cost, etc. Each maximum count is exponentially larger, so a better measure is the average cost per step: [2/1, 8/3, 22/7] = [2, 2.667, 3.143]
@@ -2674,14 +2668,14 @@
This reveals a fundamental property of Arabic Representation: it encodes both the sequence of digit symbols (which map to a Peano Number) and the sequence's length (which exists at a meta level, governing computational operations). The representation of zero exposes a limitation. At zero, the representation retains length information necessary for computation but lacks an explicit numerical mapping to zero itself.
Structurally, this forces a design choice between two options:
-
-
+
+
Using an empty sequence [] and arbitrarily mapping it to zero. This allows a length function to return zero naturally, as the empty sequence is never scanned.
Using a lone zero symbol [0], which introduces an effective length concept where [0] must be treated as though it has zero length in algorithmic operations.
- List . The two options for representing zero
-
+ List . The two options for representing zero
+
Without explicit brackets, the empty sequence collapses into an empty space, conveying no meaning when written in conventional notation. To maintain visual clarity and avoid empty spaces where zero should appear, conventional architectures adopt the standard 0. However, the length function must still return zero for [0], despite its apparent length of one.
@@ -2865,27 +2859,27 @@
In the architectural terminology utilized here, viewing memory as a horizontal tape with bytes in the cells and addresses increasing while moving to the right, little-endian numbers have the least-significant digit on the left, and big-endian numbers have the least-significant digit on the right of an allocation. Stated structurally, little-endian numbers are zero padded on the right, and big-endian numbers are zero padded on the left.
-
Figure depicts a word featuring byte addresses represented in hexadecimal, running from c0 to c3. (In decimal these addresses represent 192, 193, 194, 195). The address of the byte before c0 is bf. The address after c3 is c4. The address for the word itself evaluates to c0, as it is the minimum byte address. This word holds a little-endian number. Treating a byte as an octet digit, the binary encoding for the least-significant digit of this number is 0001 1000. The most-significant digit is 1010 1110.
+
Figure depicts a word featuring byte addresses represented in hexadecimal, running from c0 to c3. (In decimal these addresses represent 192, 193, 194, 195). The address of the byte before c0 is bf. The address after c3 is c4. The address for the word itself evaluates to c0, as it is the minimum byte address. This word holds a little-endian number. Treating a byte as an octet digit, the binary encoding for the least-significant digit of this number is 0001 1000. The most-significant digit is 1010 1110.
-
-
+
+
- Figure . A left-justified word holding a number least-significant-digit-first
-
+ Figure . A left-justified word holding a number least-significant-digit-first
+
-
In Figure , the same number populates the word using big-endian architecture. For all but very large numbers, the digit pointed at by the allocation pointer evaluates to zero. A system continues to scan zeros until reaching either the end of the allocation or the most-significant digit. If it reaches the end of the allocation, the contained number evaluates to zero. Because this is the exact same number shown in Figure , it retains the identical least-significant digit and most-significant digit.
+
In Figure , the same number populates the word using big-endian architecture. For all but very large numbers, the digit pointed at by the allocation pointer evaluates to zero. A system continues to scan zeros until reaching either the end of the allocation or the most-significant digit. If it reaches the end of the allocation, the contained number evaluates to zero. Because this is the exact same number shown in Figure , it retains the identical least-significant digit and most-significant digit.
-
-
+
+
- Figure . The same number held in big-endian digit-order
-
+ Figure . The same number held in big-endian digit-order
+
If the specified word holds a count, the counting mechanics differ. When counting with the little-endian convention, a number grows into larger addresses as the count carries into new digits. In contrast, with big-endian architecture, counting carries into strictly smaller memory addresses.
@@ -2921,27 +2915,27 @@
Our Indian Number derived representations consist of sequences of digits. Words of allocation consist of consecutively addressed bytes. Hardware manages bytes atomically. Any bit encoding for the digits of a number must pack cleanly into bytes, otherwise the digits fracture. Achieving a clean packing requires padding the data with zeros to force alignment to an 8-bit boundary. When a system meets this criterion, treating a number as a sequence of bytes acting as digits maintains structural consistency. Due to this constraint, little-endian and big-endian are routinely classified as byte orders.
-
Figure displays a stream of bytes arriving as data and being copied into a word. The digits of the word (the bytes) arrive in little-endian order and target a little-endian machine, so they are written in the exact order they are scanned off the channel.
+
Figure displays a stream of bytes arriving as data and being copied into a word. The digits of the word (the bytes) arrive in little-endian order and target a little-endian machine, so they are written in the exact order they are scanned off the channel.
-
-
+
+
- Figure . A byte-by-byte copy performed in address order
-
+ Figure . A byte-by-byte copy performed in address order
+
In the second case, the identical data stream arrives with words serialized as bytes in little-endian order, but the receiving machine is big-endian. The system must reverse the bytes strictly on a word-by-word basis.
-
-
+
+
- Figure . A reverse order byte copy performed word by word
-
+ Figure . A reverse order byte copy performed word by word
+
When the data arrives, there is no way to know where the word boundaries are. Serialization destroys that structural boundary information. Without knowing where the words are, a system cannot determine when to perform the byte order reversal. Therefore, resolving this requires a different approach than the one used for bit order in bytes; the problem transfers into the software layer.
@@ -3006,11 +3000,11 @@
- Let us put this into perspective. Suppose in ancient Roman times that a clock tick for a computer was scaled to be one day long, so that the action involves sending letters rather than variable values. Under this scale, a single nanosecond of real-world execution time equates to three days. Suppose a program initiated a read request for a location in memory on the Ides of March, the date when Caesar was assassinated on -0043-03-15. Surely that was a big day for posting letters. Table provides the historical date that the variable value would finally be loaded into the processor, depending on the memory tier being accessed:
+ Let us put this into perspective. Suppose in ancient Roman times that a clock tick for a computer was scaled to be one day long, so that the action involves sending letters rather than variable values. Under this scale, a single nanosecond of real-world execution time equates to three days. Suppose a program initiated a read request for a location in memory on the Ides of March, the date when Caesar was assassinated on -0043-03-15. Surely that was a big day for posting letters. Table provides the historical date that the variable value would finally be loaded into the processor, depending on the memory tier being accessed:
-
-
+
+
@@ -3060,8 +3054,8 @@
- Table . Memory tier latency, scaled so that one clock tick lasts one day
-
+ Table . Memory tier latency, scaled so that one clock tick lasts one day
+
In computer architecture, there is a rule that the slower the access time, the larger the amount of data that should be transferred. The idea is then that of access time per bit, instead of access time per fetch. A common example given is that of a station wagon of hard drives driven across the country. Andrew S. Tanenbaum famously coined this concept in his 1981 textbook Computer Networks, stating: "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway." This physical data transfer method is universally referred to as a sneakernet. Ten terabits, at three days, equates to 26 nanoseconds per bit. Not bad, if a user can wait three days to continue the program, but aliasing between data sets would make a program very slow. The Turing Machine model does not capture the effects of clumped data accesses.
@@ -3087,8 +3081,8 @@
Applying this mechanical procedure to the RT two-headed reverse string example controller results in:
-
-
+
+
# Phase 1: Both heads scan right to the EOM pivot
L·initial:
@@ -3138,17 +3132,17 @@
write('Ï' ,1 ,EOR)
halt
- Code . The two-headed reverse controller as linear code with jumps
-
+ Code . The two-headed reverse controller as linear code with jumps
+
The state labels have become addresses into the program tape, and the address of the cell indicated by the head on the first tape is now an Instruction Pointer (IP). In a sense the programmed controller has been replaced by a little Turing Machine of its own. One that controls the head on the first tape, and moves it in response to the control instructions found on the first tape. Such a controller on a processor is called a sequencer.
By separating the control path from the data path, utilizing an integrated symbol alphabet, replacing states with sequential instructions, and introducing an explicit addressable instruction pointer, the theoretical machine has physically crossed the bridge to conventional computing. The resulting architecture is a stored-program, von Neumann-style machine organization.
-
Some of the default cases for the jump table unnecessarily jump to the instruction at the next sequential address. Code lacks the regularity to use a computed jump table, so this style of jump table becomes a Lisp cond statement, i.e. sequential conditional tests. So then by using the instructions test, beq (for branch on equal), and jump as control instructions, and rearranging to favor sequential execution, this code becomes:
+
Some of the default cases for the jump table unnecessarily jump to the instruction at the next sequential address. Code lacks the regularity to use a computed jump table, so this style of jump table becomes a Lisp cond statement, i.e. sequential conditional tests. So then by using the instructions test, beq (for branch on equal), and jump as control instructions, and rearranging to favor sequential execution, this code becomes:
-
-
+
+
# Phase 1: Both heads scan right to the EOM pivot
L·initial:
@@ -3197,8 +3191,8 @@
write('Ï' ,1 ,EOR)
halt
- Code . The same controller using test, branch and jump instructions
-
+ Code . The same controller using test, branch and jump instructions
+
This is an assembly-level code description of an instruction sequence. To get it into final form, the labels that appear as instruction arguments would be replaced with their addresses. Symbolic labels would not appear on the tape. As an alternative to using absolute branches, relative branches could be used. Performance will be greatly enhanced for a sequencer that performs relative branching if it contains an adder circuit; otherwise, the addition of offsets would be another RT Machine program invocation.
@@ -3281,7 +3275,7 @@
- At the time of this writing many machines use 64 bit words. This is equivalent to 8 ASCII characters, while the average size of an identifier is about 5 characters. Hence the approach of using a string as a symbol might not be as inefficient as it seems to be at first. Using strings has advantages. Symbol instances can carry semantic clues for the programmer. There is no hazard of conflating the string instance with the name, as they are the same. Also, a string instance will have integrity across contexts, such as between invocations or when passed between processes (note section , on crossing context boundaries). A drawback is in cases there is no language support, the strings are typically ad hoc so the guarantee of distinctness becomes merely a contract with the programmer.
+ At the time of this writing many machines use 64 bit words. This is equivalent to 8 ASCII characters, while the average size of an identifier is about 5 characters. Hence the approach of using a string as a symbol might not be as inefficient as it seems to be at first. Using strings has advantages. Symbol instances can carry semantic clues for the programmer. There is no hazard of conflating the string instance with the name, as they are the same. Also, a string instance will have integrity across contexts, such as between invocations or when passed between processes (note section , on crossing context boundaries). A drawback is in cases there is no language support, the strings are typically ad hoc so the guarantee of distinctness becomes merely a contract with the programmer.
@@ -3343,8 +3337,8 @@
The enum of C is used to make alphabets of named symbols. Each entry in the enum is a static symbol factory, and instances are distinct Integers.
-
-
+
+
/* The enum definition acts as the factory. */
typedef enum {
@@ -3364,15 +3358,15 @@
/* Evaluates to True */
}
- Code . A static symbol factory made with a C enum
-
+ Code . A static symbol factory made with a C enum
+
The enum is a static alphabet made by the compiler, where symbol instances are Integers. In the following example, the alphabet is made dynamically, where each symbol instance is a string pointer.
-
-
+
+
#include <string.h>
#include <stdlib.h>
@@ -3438,8 +3432,8 @@
if(e == NULL) printf("e is NULL\n");
}
- Code . A dynamic symbol factory whose instances are string pointers
-
+ Code . A dynamic symbol factory whose instances are string pointers
+
@@ -3530,7 +3524,7 @@
The orders of analysis were named in section
- . This
+ . This
chapter takes the second-order as its working material.
@@ -3568,8 +3562,8 @@
Suppose our goal is to subtract 3 from 5 in the second-order. Consider a Turing Machine representation named five that outputs the number 5, i.e., it prints to the tape, 'sssss', using unary notation. Let us assume that the tape is initially empty and that the empty symbol 'â¡' terminates the string. To preserve the code for second-order analysis, we define the program's Abstract Syntax Tree (AST) as a quoted progn block. This block can contain any native Lisp control structures, though for this generator it is a simple sequence:
-
-
+
+
(defparameter *five-ast*
'(progn
@@ -3580,13 +3574,13 @@
(write s) (step)
))
- Code . The abstract syntax tree for the Peano Number five
-
+ Code . The abstract syntax tree for the Peano Number five
+
Similarly, the AST for the number 3:
-
-
+
+
(defparameter *three-ast*
'(progn
@@ -3595,8 +3589,8 @@
(write s) (step)
))
- Code . The abstract syntax tree for the Peano Number three
-
+ Code . The abstract syntax tree for the Peano Number three
+
If we were to dynamically evaluate these ASTs in the first-order, the Hindu-Arabic representation of each number would be physically written in unary code on the tape.
@@ -3606,8 +3600,8 @@
For the second-order difference operation, we compose the ASTs to create a new program. Here we extract the body of the second operand's AST and substitute every (write s) followed by a (step) instruction with an inverted pair: a (left) instruction followed by writing the empty symbol (write â¡).
-
-
+
+
(defun invert-direction (cmds)
(cond
@@ -3639,13 +3633,13 @@
,@(invert-direction body-b)
)))
- Code . A composer that subtracts by inverting the direction of one machine
-
+ Code . A composer that subtracts by inverting the direction of one machine
+
We pass our two Peano Number ASTs to this composer, and we get as a result a newly synthesized AST.
-
-
+
+
(defparameter
*primitive-five-minus-3-ast*
@@ -3664,8 +3658,8 @@
;; (left) (write â¡)
;; )
- Code . The composed but unsimplified tree for five minus three
-
+ Code . The composed but unsimplified tree for five minus three
+
I called this 'primitive' because it is missing the simplification. This sort of simplification is also known as compiler code optimization. Optimizations can be operation specific, or general in nature. Here we will send the primitive composition's body to an analyzer which scans the steps and removes the redundant operations.
@@ -3679,8 +3673,8 @@
For a program containing branched control logic, the simplifier would require a deep recursive walk of the AST to ensure operations aren't annihilated across conditional boundaries. For our explicit Peano Number generators, a linear scan of the progn body suffices. It calls itself recursively until the scan fails to find any further reductions, returning its optimized AST.
-
-
+
+
(defun remove-annihilations (cmds)
(cond
@@ -3717,13 +3711,13 @@
)))
- Code . A simplifier that removes annihilating instruction pairs
-
+ Code . A simplifier that removes annihilating instruction pairs
+
After giving the difference program to the simplifier, we get:
-
-
+
+
(defparameter
*simplified-five-minus-3-ast*
@@ -3735,8 +3729,8 @@
;; (write s) (step)
;; (write s) (step))
- Code . The simplified tree for five minus three
-
+ Code . The simplified tree for five minus three
+
This technique of composing Turing Machine programs in the presence of simplification is closely related to that of symbol computation and expression simplification that we find in math tools such as Mathematica. We can imagine our Turing Machines as functions with names, and then symbolic computation leaves them unevaluated as here. Then the Mathematica Simplify is the compiler optimization simplifier as above. A difference in these two systems is that of the functions being reduced to Turing Machine head and tape transport unit instructions.
@@ -3757,33 +3751,33 @@
Let us take the multiplicative inverse of the additive identity as an example, AKA division by zero. In the second-order, when we attempt to compute a division, say 6/0, the machine will not reduce.
-
-
+
+
(divide 6 0)
- Code . A division by zero, which does not reduce
-
+ Code . A division by zero, which does not reduce
+
Now consider the compiler optimization like simplification of this expression:
-
-
+
+
(divide (divide 6 0) (divide 3 0))
- Code . A composition of two unreduced divisions
-
+ Code . A composition of two unreduced divisions
+
The result will be:
-
-
+
+
(multiply 2 (divide 0 0))
- Code . The reduced result, still carrying a divide of zero by zero
-
+ Code . The reduced result, still carrying a divide of zero by zero
+
There is no special help here. Hence, (divide 0 0) remains as an error flag.
@@ -3830,8 +3824,8 @@
Let us construct a forward difference pyramid for the polynomial f(t) = t^2.
-
-
+
+
@@ -3875,8 +3869,8 @@
- Table . The forward difference table for f(t) = t²
-
+ Table . The forward difference table for f(t) = t²
+
In order to design for indefinite extension, the Turing Machine tape must retain the function value alongside with its forward differences. Because the second difference is constant higher-order differences are all zero. Hence the tape requires a three component vector to hold the differences.
@@ -3886,8 +3880,8 @@
Here is the sequence of tape states as the machine is repeatedly called to extend the function from its initial conditions at t = 0. During each step, the machine adds δ^1 to f, and δ^2 to δ^1, as there is no δ^3, it is taken to be zero, so δ^2 is merely copied down.
-
-
+
+
Initial Tape (t=0): [0, 1, 2]
Call 1 (t=1): [1, 3, 2]
@@ -3895,8 +3889,8 @@
Call 3 (t=3): [9, 7, 2]
Call 4 (t=4): [16, 9, 2]
- Code . The tape at each call while extending t²
-
+ Code . The tape at each call while extending t²
+
For Call 1, the input tape is the Initial Tape. In Call 1 the machine will take the function value on the input tape, 0, and add the first difference, 1, writing the result 1, to the result tape. The machine will then continue on and take the first difference on the input tape, 1, and add the second difference on the input tape, 2, writing the result first difference to the result tape, 3. Then finishing up, the machine will not find a third difference on the input tape, so it will copy the second difference found on the input tape as the second difference for the result tape.
@@ -3952,25 +3946,25 @@
The exact algebraic composition of this mechanical expansion is formalized by Newton's calculus of finite differences Isaac Newton formalized this interpolation method in 1675, later published in his Methodus Differentialis (1711). For a comprehensive foundational treatment, see George Boole, A Treatise on the Calculus of Finite Differences (Cambridge: Macmillan and Co., 1860), Chapter II.. Instead of executing the machine incrementally, a person can calculate the function value at call \omega directly as a linear combination of the initial tape components using Newton's forward difference formula:
-
-
+
+
D_{\omega, 0} = \sum_{j=0}^{\omega} \binom{\omega}{j} D_{0, j}
- eq: Newton's forward difference formula for the value at call Ï
-
+ eq: Newton's forward difference formula for the value at call Ï
+
Because the binomial coefficient \binom{\omega}{j} evaluates to exactly zero for any Integer j > \omega, the summation naturally truncates at index \omega. This algebraic property perfectly mirrors the physical boundary established by the machine execution trace. Furthermore, the relationship is symmetric. A person can compute the specific components of the initial tape, D_{0, n}, directly from the sequence of evaluated function calls, D_{k, 0}, using the alternating binomial sum:
-
-
+
+
D_{0, n} = \sum_{k=0}^{n} (-1)^{n-k} \binom{n}{k} D_{k, 0}
- eq: The initial tape components recovered from evaluated calls
-
+ eq: The initial tape components recovered from evaluated calls
+
As a consequence of this lemma, we know that for any finite number of calls, i.e. finite \omega, that a finite prefix of D_0 is used.
@@ -4022,8 +4016,8 @@
To observe the structural integrity of this progression, a person can array these relationships into a system of equations mapping the initial tape to the polynomial constants:
-
-
+
+
@@ -4059,8 +4053,8 @@
- Table . The initial differences as a system of equations in the polynomial constants
-
+ Table . The initial differences as a system of equations in the polynomial constants
+
A pattern emerges. Because each successive forward difference operator annihilates the lowest power of t, the resulting algebraic system is upper triangular. For any extent \omega, the \omegath difference equation reduces to D_{0,\omega} = \omega! a_\omega. This structural guarantee permits a person to reliably recover a_\omega = D_{0,\omega} / \omega!. Because an initial tape of extent \omega dictates that D_{0,\omega} is nonzero, a_\omega is guaranteed to be nonzero. All subsequent lower-order constants are then systematically resolved through cascading back substitution.
@@ -4070,8 +4064,8 @@
To observe the formal mechanics of this progression, a person can alternatively array these relationships into a matrix equation mapping the polynomial constants, a_i, to the initial tape differences, D_{0,n}. The coefficients of this transformation are defined by the Stirling numbers of the second kind, denoted S(i,n):
-
-
+
+
\begin{bmatrix} D_{0,0} \\ D_{0,1} \\ D_{0,2} \\ \vdots \\ D_{0,\omega} \end{bmatrix} =
\begin{bmatrix}
@@ -4083,24 +4077,24 @@
\end{bmatrix}
\begin{bmatrix} a_0 \\ a_1 \\ a_2 \\ \vdots \\ a_\omega \end{bmatrix}
- eq: Polynomial constants carried to initial differences by Stirling numbers of the second kind
-
+ eq: Polynomial constants carried to initial differences by Stirling numbers of the second kind
+
For any extent \omega, the final row of this strictly upper triangular matrix again simplifies to D_{0,\omega} = \omega! a_\omega.
- The main diagonal contains strictly non-zero factorials, ensuring the matrix is invertible. By inverting this matrix, a person replaces the cascading back substitution with a direct, closed form equation to recover any constant a_i. The inversion utilizes the signed Stirling numbers of the first kind, denoted s(n,i) (see the Appendix on Stirling numbers, section ).
+ The main diagonal contains strictly non-zero factorials, ensuring the matrix is invertible. By inverting this matrix, a person replaces the cascading back substitution with a direct, closed form equation to recover any constant a_i. The inversion utilizes the signed Stirling numbers of the first kind, denoted s(n,i) (see the Appendix on Stirling numbers, section ).
-
-
+
+
a_i = \sum_{n=i}^{\omega} \frac{s(n,i)}{n!} D_{0,n}
- eq: A polynomial constant recovered using signed Stirling numbers of the first kind
-
+ eq: A polynomial constant recovered using signed Stirling numbers of the first kind
+
Thus, extending this procedure \omega times definitively recovers the constants for exactly a polynomial of degree \omega.
@@ -4110,13 +4104,13 @@
This mechanical recovery of standard polynomial constants is completely analogous to Newton's interpolation formula Ibid.. Instead of resolving the standard constants a_i through an upper triangular matrix, a person can construct the polynomial directly by treating the initial tape components as the exact coefficients for a basis of binomial terms:
-
-
+
+
f(t) = \sum_{n=0}^{\omega} D_{0, n} \binom{t}{n}
- eq: The polynomial built directly on a basis of binomial terms
-
+ eq: The polynomial built directly on a basis of binomial terms
+
Because the nth binomial coefficient expands into a polynomial of exactly degree n, and the summation is bounded by the finite extent \omega where D_{0, \omega} is definitively nonzero, the constructed function f(t) is structurally guaranteed to be a polynomial of degree \omega.
@@ -4132,8 +4126,8 @@
Here is the table of finite differences for the function 2^t.
-
-
+
+
@@ -4183,11 +4177,11 @@
- Table . The forward difference table for f(t) = 2áµ
-
+ Table . The forward difference table for f(t) = 2áµ
+
- The first difference of 2^t is also 2^t, so row 0 of the table will have an infinite number of values. Fortunately, due to the lemma of section , stating that evaluating call \omega requires an initial tape populated with components 0 through \omega of row 0, exactly those components are needed for the recurrence to proceed. Furthermore, when new values are needed, they are easily computed. A programmer need not store the entire infinite first row of the difference table on a static tape.
+ The first difference of 2^t is also 2^t, so row 0 of the table will have an infinite number of values. Fortunately, due to the lemma of section , stating that evaluating call \omega requires an initial tape populated with components 0 through \omega of row 0, exactly those components are needed for the recurrence to proceed. Furthermore, when new values are needed, they are easily computed. A programmer need not store the entire infinite first row of the difference table on a static tape.
@@ -4224,22 +4218,22 @@
Now suppose we want to express the quotient of these two functions.
-
-
+
+
h(t) = \frac{f(t)}{g(t)} = \frac{2^t - 32}{3t - 15}
- eq: The quotient h(t), carrying a pole and a zero at t = 5
-
+ eq: The quotient h(t), carrying a pole and a zero at t = 5
+
-
-
+
+
- Figure . The quotient h(t) plotted across the singularity at t = 5
-
+ Figure . The quotient h(t) plotted across the singularity at t = 5
+
@@ -4250,8 +4244,8 @@
Suppose we move to a second-order evaluation, and for places the computation does not work, we return the machine that isn't evaluating. That is similar to what we did to get (divide 0 0), but the zeros in that expression came from a prior step first-order evaluation. Let us instead give the quotient composer two machines to compose, and have it return a value when reduction to the first-order is possible, and return the full problem as posed to it when it can not be reduced.
-
-
+
+
@@ -4324,15 +4318,15 @@
- Table . The quotient and the ratio of first differences through the singularity
-
+ Table . The quotient and the ratio of first differences through the singularity
+
The quotient machine, (divide f(5) g(5)), is no more representative of the value we expected here, than was (divide 0 0). However, as we have the whole program, we could pass it to a L'Hôpital evaluator and get a value back. But I am wondering if we can't design function extension form that extends to the value and beyond without any hiccups, as most apparently there is a value to extend to.
- I included the first difference along with the evaluation results in Table . When building a first difference table an interesting thing happens at the singularity, the first difference and the function itself coincide, note calls 4 and 5. This makes sense because δ f(4) = f(5) - f(4), which becomes δ f(4) = 0 - f(4), and the same happens to g in the denominator, so the signs cancel. Note also δ f(5) = f(6) - f(5), which becomes δ f(5) = f(6) - 0.
+ I included the first difference along with the evaluation results in Table . When building a first difference table an interesting thing happens at the singularity, the first difference and the function itself coincide, note calls 4 and 5. This makes sense because δ f(4) = f(5) - f(4), which becomes δ f(4) = 0 - f(4), and the same happens to g in the denominator, so the signs cancel. Note also δ f(5) = f(6) - f(5), which becomes δ f(5) = f(6) - 0.
Ostensibly it looks like we have happened upon a discrete version of L'Hôpital's rule, that we merely use the first difference quotient instead of the function quotient at the singularity. But alas, the coincidence occurs at h(4) rather than at h(5). For the second coincidence, we find h(6) as the 5th first finite difference. In neither case did we learn anything about the value of h(5).
@@ -4346,27 +4340,27 @@
So then, perhaps we set the value at the singularity to x build out the difference table, then solve for x?
-
-
+
+
- Figure . The difference table with the singular value carried as the variable x
-
+ Figure . The difference table with the singular value carried as the variable x
+
As Newton pointed out, we can know the differences on the D_0 row of the table from the quotient function:
-
-
+
+
D_{0,n} = \sum_{k=0}^n (-1)^{n-k} \binom{n}{k} \frac{f(k)}{g(k)}
- eq: The initial differences of the quotient, taken from the function
-
+ eq: The initial differences of the quotient, taken from the function
+
For k=5 the difference evaluates to be (divide 0 0), as it did for the quotient, and it also fails for all values above k=5 due to the summation. So we can not use this to solve for x.
@@ -4380,33 +4374,33 @@
The L'Hôpital evaluator will discover that a transcendental constant is required. It will be returned as a higher-order object, a machine definition, because the value can not be written to the tape.
-
-
+
+
T = \frac{32 \ln(2)}{3}
- eq: The transcendental constant the quotient requires
-
+ eq: The transcendental constant the quotient requires
+
The resulting D_0 vector for the quotient is:
-
-
+
+
- Figure . The Dâ vector for the quotient
-
+ Figure . The Dâ vector for the quotient
+
-
-
+
+
- Figure . The difference table for h(t)
-
+ Figure . The difference table for h(t)
+
I find it fascinating to watch the transcendental difference values march down the table, then all cancel out after h(5) is generated.
@@ -4419,8 +4413,8 @@
And for the victory lap, evaluation versus higher-order computation and function extension:
-
-
+
+
@@ -4483,8 +4477,8 @@
- Table . Direct evaluation of f(t)/g(t) against the extended quotient vector H(t)
-
+ Table . Direct evaluation of f(t)/g(t) against the extended quotient vector H(t)
+
@@ -4493,13 +4487,13 @@
The fundamental claim of computational analysis is that all functions can be viewed as discrete entities. Take this simple function:
-
-
+
+
f(t) = t^3
- Code . A simple cubic function
-
+ Code . A simple cubic function
+
It is said to be a continuous function over the real field. However, from a computational perspective, it is a string of 8 discrete symbols. A person might ask then, "If the function is not continuous, then how can a person take a derivative?" Often people view a derivative as a tangent line to a curve drawn on a plot. The computational analyst's answer is to use a machine that manipulates the symbols; it will move the 3 down in front of the t, decrement the power, and write 2. Those are all discrete operations.
@@ -4537,11 +4531,11 @@
Does computation theory matter to computing?
- Let us put this into perspective. Suppose in ancient Roman times that a clock tick for a computer was scaled to be one day long. Under this scale, a single nanosecond of real-world execution time equates to three days. Suppose a program initiated a read request for a location in memory on the Ides of March, the date when Caesar was assassinated on 0043-03-15. Table provides the historical date that the variable value would finally be loaded into the processor, depending on the memory tier being accessed:
+ Let us put this into perspective. Suppose in ancient Roman times that a clock tick for a computer was scaled to be one day long. Under this scale, a single nanosecond of real-world execution time equates to three days. Suppose a program initiated a read request for a location in memory on the Ides of March, the date when Caesar was assassinated on 0043-03-15. Table provides the historical date that the variable value would finally be loaded into the processor, depending on the memory tier being accessed:
-
-
+
+
@@ -4591,8 +4585,8 @@
- Table . Memory tier latency, scaled so that one clock tick lasts one day
-
+ Table . Memory tier latency, scaled so that one clock tick lasts one day
+
@@ -4637,7 +4631,7 @@
- We then define the symbol in computational terms, as done in section . This begins with memory addresses, represented as charge arrays, acting as primitive symbols, and extends to the symbol factory, copy operations, and instance comparison.
+ We then define the symbol in computational terms, as done in section . This begins with memory addresses, represented as charge arrays, acting as primitive symbols, and extends to the symbol factory, copy operations, and instance comparison.
@@ -4710,13 +4704,13 @@
However, in the calculus of finite differences, standard exponents are clumsy. Because the Turing Machine evaluates discrete jumps, the natural basis is the falling factorial, denoted as t^{\underline{n}}:
-
-
+
+
t^{\underline{n}} = t(t - 1)(t - 2) ⯠(t - n + 1)
- eq: The falling factorial, the natural basis for discrete differences
-
+ eq: The falling factorial, the natural basis for discrete differences
+
When a person applies the discrete forward difference operator, δ, to a falling factorial, it behaves identically to the continuous derivative: δ(t^{\underline{n}}) = n t^{\underline{n - 1}}.
@@ -4752,13 +4746,13 @@
The signed Stirling numbers of the first kind perform the exact inverse operation. They reconstruct standard continuous powers from falling factorials:
-
-
+
+
t^{\underline{n}} = \sum_{k=0}^n s(n,k) t^k
- eq: The falling factorial expanded over standard powers
-
+ eq: The falling factorial expanded over standard powers
+
Combinatorially, the unsigned magnitude of s(n,k) represents the number of ways to arrange n items into k disjoint cycles. The alternating signs account for the algebraic expansion of the falling factorial terms (t - 1)(t - 2), etc.
--
2.20.1