From: Thomas Walker Lynch Date: Sat, 4 Jul 2026 17:48:58 +0000 (+0000) Subject: seems to be fully recovered, now on to the emptiness chapter X-Git-Url: https://git.reasoningtechnology.com/machine%20fig.png?a=commitdiff_plain;h=4b200dd3465174298244f8a2ffc786d98f26304c;p=TM-2026 seems to be fully recovered, now on to the emptiness chapter --- diff --git a/document/TM-2026.html b/document/TM-2026.html index a007ff9..dc9e2a2 100644 --- a/document/TM-2026.html +++ b/document/TM-2026.html @@ -1241,15 +1241,15 @@

In an analogous manner to defining an address space for a tape, we can define an address space for an area. Accordingly, the leftmost cell of the area is assigned address zero, and the address increments cell by cell going to the right. A finite area will have a finite address space, with the address of the rightmost cell being the largest address in the address space.

-

It is interesting that the extent of an area will be the same, whether it is calculated from the address space of the tape, or the address space of the area. When it is computed from the address space of the area, the extent will be identical to the largest address in the address space. We will use the Greek symbol omega, \\omega, to symbolize an extent. We can give it a subscript with the name of an area if the correspondence is not already clear. I chose \\omega makes sense here because \\omega is an inclusive bound, i.e. it is the rightmost letter included in the Greek alphabet. Thus it is the extent of the Greek alphabet. +

It is interesting that the extent of an area will be the same, whether it is calculated from the address space of the tape, or the address space of the area. In fact, the extent will always be identical to the largest address in the address space. We will use the Greek symbol omega, \omega, to symbolize an extent. We can give it a subscript with the name of an area if the correspondence is not already clear. The choice of \omega makes sense here because \omega is an inclusive bound, i.e. it is the rightmost letter included in the Greek alphabet. Thus it is the extent of the Greek alphabet.

Length

-

If cells in an area are transacted, the cost of the area is the cost of a cell multiplied by the count of cells. Vincent Atanasoff probably found himself needing to know such a count when ordering capacitors. The count of cells in an area is also known as the area's length. We will use the Greek symbol Ï¡, pronounced as sampi, to refer to the length. The length of an area, the count of its cells, will always be one greater than its extent, Ï¡ = \\omega + 1. This symbol makes sense here, as the Greek number system fell short of letters, so the symbol Ï¡ was tacked on to the end of the alphabet, but did not belong to the alphabet. +

If cells in an area are transacted, the cost of the area is the cost of a cell multiplied by the count of cells. Vincent Atanasoff probably found himself needing to know such a count when ordering capacitors. The count of cells in an area is also known as the area's length. We will use the Greek symbol Ï¡, pronounced as sampi, to refer to the length. The length of an area, the count of its cells, will always be one greater than its extent, Ï¡ = \omega + 1. This symbol makes sense here, as the Greek number system fell short of letters, so the symbol Ï¡ was tacked on to the end of the alphabet, but did not belong to the alphabet.

-

The count of cells in an area, the length of an area, and the cardinality of the address space for an area are all the same number, Ï¡. The extent of an area, \\omega, is an address in an area's address space, whereas the cardinality of an area, Ï¡, falls completely outside it. This has implications. Because extent is an address, extent and addresses can always use the same number representation. In contrast, there is no such guarantee for cardinality, Ï¡. Take for example an area that contains 256 cells. The addresses run from zero to 255, and all can be represented with an 8 bit binary number. However, the number 256 does not fit. It is for this reason that code will have fewer end case problems when expressing the size of objects with extents, rather than with lengths. +

The count of cells in an area, the length of an area, and the cardinality of the address space for an area are all the same number, Ï¡. The extent of an area, \omega, is an address in an area's address space, whereas the cardinality of an area, Ï¡, falls outside it. This has implications. Because extent is an address, extent and addresses can always use the same number representation. In contrast, there is no such guarantee for cardinality, Ï¡. Take for example an area that contains 256 cells. The addresses run from zero to 255, and all can be represented with an 8 bit binary number. However, the number 256 requires 9 bits, and thus would not fit in an 8 bit address register. This one of the reasons that code will have fewer end case problems when expressing the size of objects with extents, rather than with lengths.

Is the cardinality of an open on the right area a Natural Number?

@@ -1288,16 +1288,16 @@

The resolution lies in the computational reality of Step 2. For an area that is open on the right, the stepping of machine P never halts. Because Step 2 never terminates, Step 3 is never executed. The A machine never runs that final, additional time. Therefore, the cardinality of an open area is never actually produced by the machine. In the language of Computational Naturalism, Lemma 2 is false for an infinite area; the cardinality of an open on the right area is excluded from being a Natural Number because a Natural Number Machine cannot reach it in the first order.

-

So then can we add a property to cardinality, such that a second order analysis could use this property to continue downstream analysis? In short we could say that cardinality has no first order value, but it has a second order one. This is analogous to inventing a new type of number, a complex number with a second component. I.e., there is no 'real' solution, but there is an 'imaginary' one. Or analogous to error algebra, where a number value is replaced with a rule on how to handle downstream operations when it is given as an input. +

So then can we add a property to cardinality, such that a second order analysis could use this property to continue downstream analysis? In short we could say that cardinality has no first order value, but it has a second order one. This is analogous to inventing a new type of number, analogous to a complex number with a second component. I.e., there is no 'real' solution, but there is an 'imaginary' one. Or analogous to error algebra, where a number value is replaced with a rule on how to handle downstream operations when it is given as an input.

-

Such a value would be a new Turing Machine, one that composes a call to the never halting Natural Number machine followed by an increment operation. It cannot be run, but it perfectly explains the situation to an analyst. Perhaps we name this machine \\aleph_0. +

Such a value would be a new Turing Machine, one that composes a call to the never halting Natural Number machine followed by an increment operation. It cannot be run, but it perfectly explains the situation to an analyst. Perhaps we name this machine \aleph_0.

What if extent was used instead of cardinality?

- Had extent been used instead of cardinality, we would lack the final increment step in the three step computing procedure. However, step 2 still cannot complete. Rather than a value, the result of the second order analysis would be a machine that produces ever larger Natural Numbers. We can call this machine \\aleph_{-1}. + Had extent been used instead of cardinality, we would lack the final increment step in the three step computing procedure. However, step 2 still cannot complete. Rather than a value, the result of the second order analysis would be a machine that produces ever larger Natural Numbers. We can call this machine \aleph_{-1}.

@@ -1305,7 +1305,7 @@

- \\aleph_{0} - \\aleph_{-1} = 1 + \aleph_{0} - \aleph_{-1} = 1

@@ -1721,7 +1721,7 @@ Consequentiality across the design abstraction stack -

Dhoice of realization

+

Choice of realization

Let us take the example of adding two Arabic representation numbers. Logically this is considered to be a logarithmic time problem. We break the operands into fixed length pieces, and adding them in pairs results in a carry per block. By recursively pairing the blocks and applying the carries, we generate wider carries. Thus we can show that in terms of the logic gates that must be traversed, the sum is a log time operation. diff --git a/document/temp.html b/document/temp.html new file mode 100644 index 0000000..6327f21 --- /dev/null +++ b/document/temp.html @@ -0,0 +1,1264 @@ + + +

In band and out of band control

+ +

+ Because of the impossibility of recognizing certain tape features, when a tape is written by one Turing Machine, then used by another, there must be some sort of system for messaging control. There are two approaches for mixing data and control together: one is in band signaling, while the other is out of band signaling. +

+ +

+ In band control occurs when control signals or structural metadata are mixed directly into the same channel and alphabet as the data payload. In band signaling leads to ambiguities between what is control and what is data. As we saw, there are cases where a recognizer, i.e., merely examining the data, is completely incapable of resolving even the simplest of control questions. A conventional approach for resolving these ambiguities makes use of escape sequence schemes that grow in length as the levels of communication grow. This has always been an afterthought, a sort of hack. +

+ +

+ In contrast, out of band control communicates structural information through a strictly separate channel or by utilizing symbols definitively excluded from the programmer visible data alphabet. The rightmost tape marker is an out of band mechanism because it utilizes an expanded hardware tape alphabet strictly reserved for machine management, guaranteeing it can never be conflated with the user's data. Modern architectures often lack the luxury of inventing new symbols to serve as control rather than data. Another out of band signaling technique is to structure the data into channels; such structure is called formatting. We find formatting on hard drives, in frame based and packet based communication channels, and in data structures. +

+ +

Abstract areas and partitions

+ +

+ A tape area and partitioning can be an abstraction defined by a function rather than merely by a leftmost and rightmost cell. Such areas can have different topologies than those of the base tape. A familiar example for most computer scientists is utilizing software to create the appearance of a two dimensional array over a linear memory. +

+ +

+ Accordingly, suppose there is a three tape Universal Turing Machine gasket machine that holds the definition of a base machine on a first tape. It calls the base machine as a subroutine to access the base machine's tape (the second tape), and it uses its own tape to organize the tape abstraction. Then this outer machine can present to its user a variety of transforms of the base machine's tape. +

+ +

+ As an example, a gasket machine could partition the base machine's tape into two areas, one consisting of the odd addressed cells, and the other of the even addressed cells. Though these two areas consist of noncontiguous cells on the base tape, when viewed through the gasket machine, they appear perfectly contiguous. In this case, each area will have a leftmost cell and remain open on the right. +

+ +

+ When the base machine tape cells behind an abstract area are physically contiguous, we say that the abstract area is compact. In the odd even tape partition example, the abstract areas lack compactness. +

+ + + +------------------- + + + + + + TM-2026 + + + + + + + + + + + + + + + + + + + + + + Introduction + +

+ In 1893 Gottlob Frege published an axiomatic construction of mathematics from set theory. Frege's grand objective was something he called Logicism, the philosophical thesis that all of mathematics can be derived entirely from pure logic. To bridge set theory and logic, Frege defined sets using a method known as set comprehension. Under this approach, a mathematician states a logical rule or property, and any object satisfying that logical statement automatically becomes a member of the set. Because the membership of a set is determined entirely by logical rules, the resulting sets, and the mathematics built upon them, are derived directly from logic. To implement this, his specific machinery relied upon unrestricted set comprehension, formalized as Basic Law V Gottlob Frege, Grundgesetze der Arithmetik, Vol. 2 (Jena: Hermann Pohle, 1903), Appendix (Nachwort), 253.. +

+ +

+ At a conference in Paris in 1900, David Hilbert presented a list of pressing unsolved problems in mathematics. + Second on his list was "The Compatibility of the Arithmetical Axioms." Hilbert challenged mathematicians to find a means to demonstrate that "a finite number of logical steps based upon them [axioms] can never lead to contradictory results" F. N. Cole et al., eds., Bulletin of the American Mathematical Society, Vol. 8 (New York: Macmillan, 1902). This can be found at https://www.gutenberg.org/cache/epub/71655/pg71655 images.html. The MathWorld article on this subject, https://mathworld.wolfram.com/HilbertsProblems.html, explains that Hilbert presented 10 problems at the conference, though the publication shows 23 problems, and shortly later a 24th problem was added. Based on the notes of this citation, it appears the second problem is the same on all of these lists. Also note, Hilbert discusses completeness specifically as an axiom for bounding on the sets, which appears to be distinct from the question of logical completeness for an axiomatic system.. +

+ +

+ In 1901 Bertrand Russell found a well formed set formulation using Frege's set theory that did not correspond to a set. As Frege's work was based on this set theory, this called into question his entire work. Russell pointed out that it was possible to define a set of all sets that do not contain themselves. However this was a paradox, because if said set contained itself, it shouldn't, and if it didn't it should. Thus the formulation failed to define a set because the logical condition cannot be satisfied Bertrand Russell, The Principles of Mathematics (Cambridge: Cambridge University Press, 1903), Chapter X, 'The Contradiction'.. Russell communicated this to Frege in a letter dated 1902 06 16, shortly before his second volume was going to print Bertrand Russell to Gottlob Frege, June 16, 1902, reprinted in Jean van Heijenoort, From Frege to Gödel: A Source Book in Mathematical Logic (Cambridge: Harvard University Press, 1967), 124 125. Gottlob Frege, Grundgesetze der Arithmetik, Vol. 2 (Jena: Hermann Pohle, 1903), Appendix (Nachwort), 253. Frege writes: 'Hardly anything more unfortunate can befall a scientific writer than to have one of the foundations of his edifice shaken after the work is finished.'. Frege hurriedly authored an appendix (the Nachwort) admitting his system was compromised Frege was a quiet, rigid man who had spent decades building his logical fortress in almost total academic obscurity. Frege was personally devastated by Russell's letter. Shortly after, he suffered the loss of his wife, fell into severe depression, and his academic output almost entirely ceased. In 1924, a year before his death, he wrote unpublished diaries explicitly surrendering his life's work, declaring that logicism was a mistake and that mathematics must actually be derived from geometry. Note I. Grattan Guinness, The Search for Mathematical Roots, 1870 1940 (Princeton: Princeton University Press, 2000). For an analysis of Frege's intellectual decline, personal tragedies, and his unpublished 1924 1925 diaries where he formally surrenders the logicist program, see Chapter 7.. +

+ +

+ In 1903 Russell proposed a hierarchy of types to repair this foundational vulnerability. At the base were sets of individuals, then sets based on individuals or sets of individuals, etc. This looks a lot like how types work in modern software Bertrand Russell, The Principles of Mathematics (Cambridge: Cambridge University Press, 1903), Appendix B: The Doctrine of Types.. In this manner, it is not possible to write a paradoxical set definition. Russell and Alfred North Whitehead then engineered an entirely new, massive scaffolding utilizing this type system to pursue Frege's original objective of deriving mathematics from logic, publishing their results in three volumes between 1910 and 1913 Alfred North Whitehead and Bertrand Russell, Principia Mathematica (Cambridge: Cambridge University Press, 1910 1913).. Russell's system can be cumbersome due to requiring a large construction to be assembled in place of what otherwise might have been a simple rule. +

+ +

+ In 1908 Ernst Zermelo published an alternative system designed to avoid the known paradoxical statements of the time, even though absolute consistency remained unproven. In Zermelo's set theory, a mathematician first starts with an existing set, and then applies the Axiom of Separation using definite properties to partition out subsets Ernst Zermelo, "Untersuchungen über die Grundlagen der Mengenlehre I," Mathematische Annalen 65 (1908): 261 281.. To see how this works, consider the expression \{x \mid P(x)\}. Under unrestricted comprehension, a logician is permitted to define the predicate P(x) as x \notin x. This produces Russell's Paradox, so the set fails to be defined. In contrast, consider the same predicate, though restricted by Zermelo's Axiom of Separation over a predefined set S, written as \dot{R} = \{x \mid x \in S \wedge x \notin x\}. The only thing a person needs to know about S here is that it has already been successfully defined. So let us ask, is \dot{R} in \dot{R}? If we assume \dot{R} is a member of S, evaluating the second term forces the familiar fatal loop: if \dot{R} is in \dot{R}, it shouldn't be, and if it isn't, it should be. Thus if we assume that \dot{R} is in S, then \dot{R} can not be defined, but by definition, S is defined, and thus its members are defined. As we arrived at a contradiction, the original assumption must be false, i.e. it is wrong to assume that \dot{R} is in S. As \dot{R} is definitively not a member of \dot{R}, the first term of the set comprehension rule, x \in S is false, and the paradox vanishes. +

+ +

+ A person might suggest defining S as the set of all definable mathematical objects, forming a universal set. However, if such a universal set S existed, the Axiom of Separation could be applied using the previous predicate to isolate \dot{R}. Because \dot{R} is a valid, definable set, it must reside within S by the very definition of a universal set. But notice that the logic evaluated earlier proved definitively that \dot{R} cannot be a member of S. Yet the existence of a definable set \dot{R} that sits strictly outside of S contradicts the premise that S contains everything. Therefore, within any system governed by the Axiom of Separation, a universal set cannot exist. +

+ +

+ The authority to remove the 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 the chapter Computational Naturalism, and discover there is a deeper issue. +

+ +

+ Stepping back from the mechanics of set definition, a person can observe two competing approaches to establishing mathematical foundations. The first approach is constructive, building complex systems by assembling them upward from fundamental primitives. The second approach relies on islands of meaning, carving out valid spaces from the abstract void using precise rules and axioms, exactly as Zermelo did. Because both methodologies rely entirely upon a rigorous framework of deduction to function, logic itself serves as the essential substrate. Consequently, a complete foundational study requires the examination of three distinct subjects: the primitives used for construction, the rules that bound the theoretical islands, and the underlying logic that evaluates them both. +

+ +

+ In 1928 David Hilbert and Wilhelm Ackermann published a textbook on mathematical logic, Grundzüge der theoretischen Logik David Hilbert and Wilhelm Ackermann, Grundzüge der theoretischen Logik (Berlin: Springer, 1928). This first edition has not been translated into English.. A feature of this book is its attention to procedures to follow for mechanically determining truth of statements. They called the problem solved by such a procedure the Entscheidungsproblem. In the first chapter they review the procedure for solving the Entscheidungsproblem in the propositional logic. For the first order predicate calculus they define the problem as, "Universal validity concerns the following question: How can one determine, for any given logical expression that contains no individual signs [constants], whether the expression represents a true assertion for arbitrary substitutions for the occurring variables, or not?" Ibid., 72 73.. They review some special cases with solutions, including one published earlier by Ackermann, but then throw down the gauntlet by saying, + "A general solution to the Entscheidungsproblem, regardless of whether a person considers the first or the second formulation, is not yet available." Ibid., 81. "Eine allgemeine Lösung des Entscheidungsproblems, mag man nun die erste oder die zweite Fassung nehmen, liegt bis jetzt noch nicht vor." The term Entscheidungsproblem literally translates to 'decision problem'. However, there are many types of decision problems, and later we will meet a class of Turing Machine programs called deciders, so it appears to be best to keep the original German. As we will see later Alan Turing also did this.. +

+ +

+ In 1931 Kurt Gödel published his incompleteness theorems Kurt Gödel, "Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I," Monatshefte für Mathematik und Physik 38 (1931): 173 198.. By mapping formal logic into arithmetic, he demonstrated that any consistent formal system sufficiently powerful to perform basic arithmetic, let us call it system S, will inevitably contain well formed formulas that are mathematically true yet cannot be proven within the system itself For the definitive English translation, see Jean van Heijenoort, From Frege to Gödel: A Source Book in Mathematical Logic, 1879 1931 (Cambridge: Harvard University Press, 1967), 596 616.. Gödel achieved this by engineering a specific formula that evaluates to the claim: "G: There exists no sequence of valid logical steps within system S that proves G." If system S is consistent, it cannot output a proof for G; thus, the claim G makes is factually accurate, rendering it true but mechanically unprovable. Furthermore, Gödel demonstrated that system S cannot output a proof of its own consistency. This result fractured David Hilbert's 1900 vision of utilizing a weaker, strictly "finitistic" logical subsystem to definitively prove that the axioms of arithmetic are entirely free of contradictions David Hilbert, "Mathematical Problems," Bulletin of the American Mathematical Society 8 (1902): 437 479.. If the full, powerful system S physically lacks the mechanical capacity to verify its own consistency, Hilbert's weaker finitistic subsystem is definitively incapable of accomplishing the task. Gödel's work established a hard mechanical boundary, asserting that truth and provability are distinct concepts in classical mathematics. +

+ +

+ In April 1936, Alonzo Church leveraged Gödel's foundational papers to directly answer the Entscheidungsproblem Alonzo Church, "An Unsolvable Problem of Elementary Number Theory," American Journal of Mathematics 58, no. 2 (April 1936): 345 363.. Working independently, Alan Turing had arrived at his own mechanical solution, and upon seeing Church's April publication, Turing rushed to submit his manuscript on 28 May 1936, appending a proof that his mechanical architecture was mathematically equivalent to Church's lambda calculus Alan M. Turing, "On Computable Numbers, with an Application to the Entscheidungsproblem," Proceedings of the London Mathematical Society s2 42, no. 1 (1936): 230 265. Received May 28, 1936, published November 30, 1936.. As Hilbert and Ackermann concede in the 1938 second edition of their textbook, Church's results demonstrated that "the quest for a general solution of the decision problem must be regarded as hopeless" David Hilbert and Wilhelm Ackermann, Principles of Mathematical Logic, 2nd ed. (New York: Chelsea Publishing Company, 1950), 124.. By giving the "somewhat vague intuitive concept of recursion a certain precise formalization," Church proved the "non existence of such a recursive procedure" that could mechanically yield a value of truth or falsehood for every individual formula Ibid., 124.. +

+ + +

+ Alan Turing used an abstraction of a computing machine, also described as a clerk working at a desk with pen and squares on paper while following a procedure, to prove that no primary 'analyzer' program can universally decide whether a second 'studied' program will halt when it is run Alan M. Turing, "On Computable Numbers, with an Application to the Entscheidungsproblem," Proceedings of the London Mathematical Society s2 42, no. 1 (1936): 230 265.. An answer to this halting problem (specifically asserting "The studied machine halts" or "The studied machine does not halt") would indeed be a statement in first order logic. Thus, by showing no analyzer can universally make such a determination, Turing proved that no decider could exist for the Entscheidungsproblem. +

+ + +

+ 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; + } + + +

+ 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. +

+ +

+ While Gödel, Church, and Turing established the primary boundaries of computation, they did not work in a vacuum. During this period, the broader academic community worked to synthesize the definitive mechanics of effective calculability. Jacques Herbrand and Gödel formalized general recursive functions between 1931 and 1934 Kurt Gödel, "On Undecidable Propositions of Formal Mathematical Systems," mimeographed lecture notes, Institute for Advanced Study, Princeton, 1934.. Emil Post independently defined "Finite Combinatory Processes" in 1936, outlining a theoretical architecture functionally identical to Turing's model Emil L. Post, "Finite Combinatory Processes Formulation 1," The Journal of Symbolic Logic 1, no. 3 (September 1936): 103 105.. Stephen Kleene subsequently unified these disparate threads, proving the strict mathematical equivalence of Church's lambda calculus, Herbrand Gödel recursive functions, and Turing's mechanical architectures Stephen C. Kleene, "General Recursive Functions of Natural Numbers," Mathematische Annalen 112 (1936): 727 742.. +

+ +

+ The academic community was thus equipped with three mathematically equivalent foundations for computation theory: recursive functions, the lambda calculus, and the Turing Machine. While all three frameworks remain active subjects of study, Turing's model is unique in providing practical intuition through the abstraction of physical machines and programs. This made it the foundation of choice for computation theory textbooks by Stephen Kleene Stephen C. Kleene, Introduction to Metamathematics (Amsterdam: North Holland, 1952)., Martin Davis Martin Davis, Computability and Unsolvability (New York: McGraw Hill, 1958)., and Marvin Minsky Marvin L. Minsky, Computation: Finite and Infinite Machines (Englewood Cliffs: Prentice Hall, 1967)., leading to the modern standard presentations by authors such as John Hopcroft and Jeffrey Ullman John E. Hopcroft and Jeffrey D. Ullman, Introduction to Automata Theory, Languages, and Computation (Reading: Addison Wesley, 1979)., as well as Harry Lewis and Christos Papadimitriou Harry R. Lewis and Christos H. Papadimitriou, Elements of the Theory of Computation (Englewood Cliffs: Prentice Hall, 1981).. +

+ +

+ To definitively apply his proof to the Entscheidungsproblem, Turing carried the additional burden of establishing that Hilbert and Ackermann's intuitive concept of an effective procedure was functionally equivalent to a Turing Machine program. Turing addressed this issue directly in his 1936 paper. Over the following decades, the academic community evaluated and accepted his argument, cementing what is now known as the Church Turing Thesis. This consensus supplied the necessary bridge between mathematics and modern computer science by formally equating the vague, historical notion of a human procedure with the rigorous, mechanical definition of an algorithm. +

+ +

+ For Turing's purposes working on the Entscheidungsproblem, establishing functional equivalence between algorithms and Turing Machine programs was sufficient. However, when the Turing Machine serves as a foundational model for computation theory, we are led to ask another question: whether the Turing Machine is representative of modern architectures, and to the extent it differs, how this would affect the applicability of computation theoretic results. +

+ +

+ In reading Alan Turing's 1936 paper, it is striking how modern the text feels, specifically because he discusses algorithms, stored programs, and the mechanical limits of computation. + While his contemporaries largely built purely mathematical and logical frameworks, Turing uniquely tied computation theory directly to the abstraction of machines executing stored programs. Because physical hardware capable of executing stored memory programs had not yet been invented, this explicit architectural grounding makes Turing's work remarkably prescient. Still, Turing could not formally connect the Turing Machine to modern architectures, simply because those architectures did not yet exist. Here, by modern, I refer to architectures utilizing random access system memory, dedicated instruction fetch streams with dynamic branching, and discrete processing units. Though Charles Babbage's 1842 Analytical Engine touched on these concepts, they would wait until the 1940s to reemerge. The practical engineering context of 1936 was limited to calculating machines programmed via patch panels. Hence, for example, there is no explanation in his paper as to why a von Neumann architecture machine (1945) running a program would exhibit the computation theoretic results derived from a computation theory based on the Turing Machine (1936). +

+ +

+ To establish the missing connection to modern architecture, the volumes of the TTCA, starting in the following chapters, transform the Turing Machine into a modern architecture in a stepwise fashion, while ensuring that at each step the modifications are inconsequential to computation theoretic existence proofs and complexity class results. We do run into some problems, so the architecture we derive will be a little different from those we currently build. +

+ +

+ The infinite tape is not as large of a hurdle as it might seem at first. For computational problems, the Turing Machine halts in a finite number of steps. Because the Turing Machine is limited to stepping the read/write head over one cell per machine execution step, in a finite number of steps, only a finite amount of tape is ever used. But for a given computation, how much tape is that? Resolving this by assuming more tape is simply attached when needed is analogous to cheating in a 'guess the bigger number' game by declaring, "My number is always one bigger than the given number, so I will tell you my guess after you state your number." Some mathematicians suggest that what is meant by infinity is precisely a rule of this sort. For engineers building physical hardware, however, to state that a resource starts finite and expands incrementally over time is a very different proposition than being asked to install infinite memory on a machine in the first place. +

+ +

+ In 1967, Marvin Minsky addressed this very topic in saying: "We need not think of the machine's tape as infinite. We imagine instead that the machine begins with a finite tape, but that, whenever an end is encountered, another unit of tape is attached." Marvin L. Minsky, Computation: Finite and Infinite Machines (Englewood Cliffs: Prentice Hall, 1967), 167. In 1967, this was a perfectly natural thing to suggest, as computers utilized magnetic tape memory on manually mounted reels, and it was entirely possible for a computation to stop and request a new reel of tape to be mounted. Contemporary computer architectures do, in fact, achieve a similar effect through virtual memory. When physical RAM is depleted, the operating system pauses the active process and autonomously provisions apparent capacity by swapping memory pages out to auxiliary storage. However, this illusion of infinite tape remains bound by the physical limits of the secondary storage and the boundaries of the processor's address space. Once the available swap space is exhausted or the address space is saturated, the operating system abruptly terminates the process. +

+ +

+ Like a Turing Machine, a computer architecture is an abstraction. The box sitting on a person's desk is a realization of some computer architecture. To say a Turing Machine does something is to say that the Turing Machine was analyzed and the result of the analysis is that 'something'. A computer architecture can also be analyzed. A computer architecture is said to be Turing Complete when through analysis it is determined that it can do anything that a Turing Machine can do. The practical implications for a realization of a computer architecture is that a running program will only throw an error because a) the program logic told it to, b) the program has a flaw, or c) there is a mathematical fact standing in the way of execution. It is tolerable to call a computer architecture Turing Complete if it has the built in ability to pause a program until a 'more memory' request is fulfilled. If there can be any other errors from a realization running a program, such as running out of address space or integer overflow, then the architecture is not Turing Complete. +

+ +

+ Turing's a machine from his 1936 paper utilizes binary. George Boole's work (1847, 1854) was well established by then, so from a theoretical standpoint, it was a sensible simplification. However, utilizing binary within the context of a machine description effectively bridged the gap to the more practically minded engineers of the time. Alan Turing's paper arrived at the same time that switched telephone networks had reached a scale that made them difficult to maintain without systematic approaches. These networks were built upon electromechanical relays, which were decisively binary devices. At least seven men in addition to Alan Turing appear to have independently contemplated the intersection of Boolean algebra, logic, and physical computing: Victor Shestakov (1935, proposed mapping Boolean algebra to electromechanical relay circuits), Konrad Zuse (1936, adopted base 2 architecture to bypass the physical complexity of decimal mechanical gears), Akira Nakashima (1936, published the mathematical equivalence of Boolean algebra and two terminal switching networks), Louis Couffignal (1936, proved calculating machines must shift to binary linkages to reduce physical friction), Claude Shannon (1937, published the definitive mathematical proof mapping Boolean algebra to electrical relays), George Stibitz (1937, constructed the first electromechanical binary adder), and John Vincent Atanasoff (1937, adopted binary to keep the vacuum tube count of electronic circuits physically viable). +

+ + The computer design abstraction stack + +

The six levels

+ +

+ There are a number of discernible levels to the computer design abstraction stack: +

+ +
    +
  1. mathematical logic
  2. +
  3. computation theory
  4. +
  5. architecture
  6. +
  7. organization
  8. +
  9. implementation
  10. +
  11. realization
  12. +
+ +

+ Mathematical logic underpins the computation theory layer. 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 layers. +

+ +

+ An architecture provides programmers with information that is valuable when designing the logic of programs. This includes programmers across the entire software stack, such as firmware engineers, driver developers, systems programmers, compiler writers, and application developers. Although applications programs might only be exposed to the virtual architecture presented by various standards, various libraries, and the programming language used. In addition to specifying the instructions (instruction set architecture), architecture includes describing the memory and hardware virtualization features, specifying the behavior of the interrupt subsystem, the method of doing I/O, DMA, the special registers and their effects, any architectural busses, and the standards to be followed for each if any. More recently, this also includes specifying how programs can make use of secure areas. The architecture is specified by an architect. +

+ +

+ The classic text by Hamacher, Vranesic, and Zaky carefully defines the organizational level as sitting between architecture and implementation V. Carl Hamacher, Zvonko G. Vranesic, and Safwat G. Zaky, Computer Organization, 5th ed. (New York: McGraw Hill, 2002).. + Organization is the register transfer level description of the machine, which includes internal buses, external buses and the state machines that implement the protocols used, control units, interrupt structures, and ALU layout. Crucially, it is at this level that decisions regarding instruction level parallelism are made, such as whether the processor will employ a scalar, superscalar, or VLIW design, the depth of its execution pipelines, the use of out of order execution, branch prediction strategies, and the specific hierarchy of hardware caches. It dictates the logical arrangement of hardware and the procedures that force the data to flow to satisfy the architectural constraints. Organization is sometimes called micro architecture, and it is made by a design architect. +

+ +

+ It is not a requirement of a computer organization, nor an architecture, that it be capable of physical realization. The abstract Turing Machine organization developed in a later section 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. +

+ +

+ The implementation instructs the manufacturing teams very specifically on what is to be built. For a microprocessor chip, this consists of the full wiring of the logic gates and transistors, instructions for cutting the lithography masks, the package to be used, and the production test programs to be run. The instructions for cutting the masks consist of the sizes and placement of doping wells and gates, the placement of contacts, and where to run wires. The implementation is designed by design engineers, with the assistance of design synthesis tools and CAD tools. +

+ +

+ A realization is a physical box full of plastic, metal, fiberglass, and silicon, along with a smattering of exotic materials. A realization is made by manufacturing engineers, technicians, and product line workers, with the assistance of some of the most sophisticated machines ever built by humankind. +

+ +

+ If a computer manufacturer keeps the architecture as a constant, all other levels can change, and a customer will be able to run the same software. The same organization can be used with different implementations. Minor changes in manufacturing process can sometimes be used with an older implementation, for example a simple transistor shrink. +

+ +

The levels are not independent

+ +

+ The layers are merely idealizations. In both practice and theory it is not possible to completely disentangle them. On a new machine of the same architecture, it is common that some software will require updates to run, and almost certainly specific operating system support will be required. +

+ +

+ An architect almost always has a reference organization in mind, and design architects work with design engineers to know what is practical, and design engineers work with manufacturing engineers to know what can be built. +

+ +

+ The common understanding of the word 'architecture' is what Hamacher and Zaky call an organization. For example, even the most experienced of architects will say things like a microprocessor has a "superscalar architecture", though whether a processor is a scalar, superscalar, or VLIW machine is clearly a question of computer organization. +

+ +

+ In fact, architecture instructs organization. When an architect designs an instruction set that has load instructions, it implies that there will be an instruction fetch, and thus an instruction bus. Furthermore the load data has to come from somewhere, so there will be data fetch and a data bus. Could both be the same bus? If not, then we have a "Harvard Architecture". The fact is, almost no one involved in computer design completely divorces architecture from organization. +

+ +

+ This cascades down the stack, as organization instructs implementation, etc. For example, if the architecture has an instruction that names one of N registers as an operand, then the organization has a register file that data flows to and from, and busses to carry that data, the design will specify a register file and layout the busses, and the manufacturing people will build them. +

+ +

Where the Turing Machine fits in

+ +

+ 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, the procedure for using the tape, but other components are missing. The manipulation of symbols remains ungrounded. The tape is not well defined. The use of emptiness is non architectural like. The tape transport is not articulated, though it is implied. The read buffer that is required, so the programmed controller can do a write without clobbering the read data needed for the next transition, is not identified as a component. As we proceed, we will likely discover other missing components. +

+ +

Computation theoretic consequentiality

+ +

+ The Turing Machine is an abstraction, as are architectures, organizations, and implementations. Only a computer realization is concrete, but even then we can make observations that are analogous to properties of an abstraction. Hence, we can use the language of mathematics to talk about machines at all of the levels. +

+ +

+ When a transform applied to machine m_i produces machine m_{i.1}, and this latter machine gets the same results for the same computational inputs, and furthermore, if any computation theory analysis applied to m_{i.1} yields the same answer as it would when applied to m_i — we say that the transform is computation theoretic inconsequential. Otherwise, the transformation is said to be computation theoretic consequential. The remainder of this section defines these terms more precisely. +

+ +

Definition of the same results transform property

+ +

+ Suppose we are interested in a given Turing Machine m_i where the machine will potentially be run after being given any one of a number of input tapes x_{i,j}, and for each of those inputs the same tape with the results written will be r_{i,j}, then we notate this as: +

+ + + m_i(x_{i,j}) = 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} \\ + m_8(x_{8,1}) &= r_{8,1} \\ + m_8(x_{8,2}) &= r_{8,2} + \end{aligned} + + +

+ Another machine, perhaps machine m_7, would have its own distinct inputs x_{7,j}, etc. +

+ +

+ 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} + + +

+ 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} + + +

+ 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. +

+ +

+ If, and only if, it is the case that +

+ + + \forall i, \forall j \colon r_{i,j} = r_{i.1,j} + + +

+ then we can say without qualification that T is a same results transform. Though still implied are the sets of machines, tapes, and questions. +

+ +

Definition of the computation theoretic consequential/inconsequential transform property

+ +

+ Suppose we still have the given machines, and their corresponding inputs, that were used when determining transform T is a same results transform. +

+ +

+ 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}\}) + + +

+ 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_j j values, the domain over which m_i will be analyzed will have n_j tapes in it. +

+ +

+ As we had already discovered when determining T is a same results transform, T transforms machine m_i into machine m_{i.1}. +

+ + + m_i \xrightarrow{T} m_{i.1} + + +

+ For our specific machine m_i, if and only if: +

+ + + \forall k \colon a_{i,k} = a_{i.1,k} + + +

+ then T is computation theoretic inconsequential for m_i. +

+ +

+ If, and only if, it is the case that: +

+ + + \forall i, \forall k \colon a_{i,k} = a_{i.1,k} + + +

+ then we can say without qualification that T is computation theoretic inconsequential. Though still implied are the sets of machines and tapes. +

+ + + + + Symbol + +

+ A symbol is a distinct mathematical object capable of being instantiated. Within a given context, any instance of a specific symbol evaluates as equal to any other instance of that identical symbol, and evaluates as not equal to any instance of a different symbol. +

+ +

+ Put more formally, given a set of instantiable objects and a collection of instances made from them, for these objects to be symbols, two structural conditions must be met. First, it must be possible to define an instance comparison operation, denoted =, that acts as an equivalence relation to partition the collection into discrete equivalence classes. There must be a one to one correspondence between the resulting equivalence classes and the original instantiable objects from which the member instances were derived. +

+ +

+ It follows from this definition that the distinct equivalence classes can be used as a proxy for the instantiable objects themselves. That is, a person can name either the instantiable object or the equivalence class, and then through this correspondence, find the other. +

+ +

The factory interpretation

+ +

+ In the context of real machines, the symbol itself can be defined as a factory that produces symbol instances. A new symbol instance of the given symbol is then made, say, by calling the factory's make function. All of the symbol instances made by the factory constitute the members of the corresponding equivalence class. +

+ +

+ A symbol instance newly minted by the factory is said to come direct from the factory. A symbol instance direct from the factory is also called an original. +

+ +

Required properties of symbol factories

+ +

+ Any two symbol instances returned directly from two distinct factories will always evaluate to False during an equality comparison. In other words, two distinct originals will always be not equal. +

+ +

+ Given an original, all copies stemming from it will be equal to each other and to the original. By stemming from, this definition includes all direct copies and copies of copies. +

+ +

+ Given any two originals, say A and B, it is established that A is not equal to B, as discussed above. Note also that A is not equal to any copy stemming from B, and B is not equal to any copy stemming from A. +

+ +

+ Though symbol instances are integer like in that copy and equality comparison operations can be used with them, symbol instances are disallowed from being used with other integer operators. Symbols cannot be compared for greater than or less than; they cannot be incremented, added, nor subtracted, etc. +

+ +

Instance implementation

+ +

+ Within a process, a reference to the factory can be used as a symbol instance, which will cause the factory to become trivial. Making a new instance will merely require copying the factory reference, and there will be nothing in memory that the base factory reference is pointing to. +

+ +

+ In general, memory addresses are built in symbol instances, hence within the context of a single process run, a program can make use of these symbols. However, this diminishes the size of the address space and leaves the memory at those addresses unused. A common hedge is then to use references into a dictionary, where the data looked up in the dictionary is the name of the symbol. +

+ +

+ Such symbol names are non structural strings, so they do not need to follow the rules of symbols. For example, a program written where references to strings were used as symbol instances, could give multiple, or all, strings the same name, and the program would function. Conventionally, the names are made to be distinct so as to avoid confusion. The hazard here is that a programmer will then conflate the string name with the symbol instance, and perform symbol operations with it. +

+ +

+ An alternative implementation is to have the factory return an integer value. Each factory has a base integer that is distinct from that of other factories. Calling make then returns the base integer. +

+ +

+ As another alternative, each factory can be given a base string, and then make returns a copy of the base string. Here we refer literally to the string as the symbol instance. There is no separate name, and the string data, not the reference to the string, becomes the symbol instance. This is however merely an architectural constraint, under the hood an implementation could use string references as long as it always appears to the programmer that the string value is being used. +

+ +

+ 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 the section below 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. +

+ +

Consequentiality

+ +

+ The time that a Turing Machine takes to copy a symbol to or from tape is considered to be a single machine step. The step itself is part of the step count, and the count certainly is consequential, but the copy itself is a constant of 1. It will never affect time complexity results. +

+ +

+ The Turing Machine is defined with a finite alphabet and a couple of additional symbols. As these are part of the machine definition, and thus do not change at run time, the time to make them is inconsequential. +

+ +

+ On a real machine, the factory would be used to make the alphabet and a couple of additional symbols, but as the alphabet is finite, and set in advance, making it is similarly inconsequential. +

+ +

+ This leaves the question of the time to copy an instance. Such a copy is done when reading and writing a tape on the Turing Machine, and reading and writing memory on a real machine. As the alphabet is finite, each symbol can be encoded in a fixed number of bits. Hence, a copy time is constant. Typically the number of symbols involved is so small, that a single read or write of memory is required for doing a copy, but even if the number of symbols is enormous, it will be a fixed constant time. There can be extenuating circumstances, such as cache misses and page faults. So generally symbol copy time is inconsequential, but it is possible in address aliasing conditions, say with page faults, can muddy the picture. +

+ +

Distinctness across contexts

+ +

+ If a symbol persists across contexts (such as across scopes or processes), it must remain distinct from all other symbols in its new context. +

+ +

+ One way to meet this requirement is to find a scope encompassing both contexts and to place the symbol factory there. Another solution is to give each context a distinct root symbol and to use an array of symbols in place of the imported symbol. Yet another approach is to associate an imported symbol with a new symbol in the given new context using a correspondence map. +

+ +

+ When utilizing memory addresses as symbols in a virtual memory environment, the convention is to disallow addresses in one process from being used in another. If that isolation is insufficient, it is often adequate to use indexes instead of addresses, taking the address to the base of the data structure. Though the absolute address of the data structure might differ across contexts, the relative offset remains constant. Another approach is to reserve memory address blocks and to guarantee imported pages have the exact same addresses as before, though they might be imported sequentially to reuse the memory block. In architecture, this is generally known as the pointer swizzling problem. +

+ +

Alphabet

+ +

+ An alphabet is another name for 'a set of symbols'. Because it is simply a set, an infinite number of distinct alphabets can exist. Papers on Turing Machine typically speak of 'the alphabet', as the alphabet of data symbols. However, other alphabets can be defined for Turing Machines, such as the alphabet of states in the programmed controller. A set of symbols could be finite or infinite. The Turing Machine alphabets are finite. +

+ +

Examples

+ +

+ 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 { + SYMBOL_EMPTY = 0, + SYMBOL_ZERO = 1, + SYMBOL_ONE = 2, + SYMBOL_A = 3, + SYMBOL_B = 4 + } TapeAlphabet; + + /* Instantiating copies of the symbols: */ + TapeAlphabet cell_1 = SYMBOL_A; + TapeAlphabet cell_2 = SYMBOL_A; + + /* Equality comparison over instances */ + if(cell_1 == cell_2){ + /* Evaluates to True */ + } + + +

+ 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> + #include <stdio.h> + + // maximum legal index into the symbol list + #define LIST_EXTENT 3 + + typedef const char *Instance; + typedef struct{ + Instance *head; + Instance *tail; + Instance *extent; + } List; + + static List SYM_LIST = {NULL ,NULL ,NULL}; + + Instance make_list(const char *name){ + size_t size = LIST_EXTENT + 1; + SYM_LIST.head = (Instance *)malloc( size * sizeof(Instance) ); + SYM_LIST.tail = SYM_LIST.head; + SYM_LIST.extent = SYM_LIST.head + LIST_EXTENT; + *SYM_LIST.head = strdup(name); + return *SYM_LIST.head; + } + + Instance make_symbol(const char *name){ + if(!SYM_LIST.head) return make_list(name); + + Instance *pt = SYM_LIST.head; + while(1){ + if( strcmp(*pt ,name) == 0 ) return *pt; + + if(pt == SYM_LIST.extent){ + fprintf(stderr ,"symbol list overflow for %s\n" ,name); + return NULL; + } + + if(pt == SYM_LIST.tail){ + *++SYM_LIST.tail = strdup(name); + return *SYM_LIST.tail; + } + + pt++; + } + } + + int main(){ + Instance a = make_symbol("a"); + Instance b = make_symbol("b"); + Instance c = make_symbol("c"); + Instance d = make_symbol("d"); + Instance e = make_symbol("e"); // overflows table + + Instance *pt = SYM_LIST.head; + Instance *pt_tail = SYM_LIST.tail; + while(1){ + puts(*pt); + if(pt == pt_tail) break; + pt++; + } + + if(e == NULL) printf("e is NULL\n"); + } + + + + The Turing Machine as a computer architecture + +

+ In this interpretation of the Turing Machine, the architecture utilizes a single ended tape, as done in Hopcroft and Ullman's book John E. Hopcroft and Jeffrey D. Ullman, Introduction to Automata Theory, Languages, and Computation (Reading: Addison Wesley, 1979).. If a computation requires a two way infinite tape, the single ended tape machine can emulate it by interleaving the addresses: assigning odd addressed cells to represent the right going half, and even addressed cells to represent the left going half. This emulation requires taking two steps instead of one to advance in a given logical direction. When analyzing the time complexity of an algorithm, this overhead merely doubles the constant on the linear term, leaving the asymptotic order of complexity entirely unchanged. The outcomes of decider programs are unaffected. Therefore, utilizing a single ended tape is an inconsequential variation of the two way tape machine. +

+ +

+ Furthermore, this definition adopts the language of hardware specification rather than formal mathematics. Because this is merely a terminology change with direct correspondences between operations, the resulting model remains isomorphic to the Hopcroft and Ullman definition. Adopting this architectural perspective facilitates the goal of building downward toward a computer architecture, rather than upward to abstract mathematical analysis, though it certainly does not preclude such analysis. In this model, the fixed components are read only, while the memory components will potentially have data flowing through them. As detailed in the control procedures below, data flows dynamically at the command of the programmed controller. +

+ +
+ Figure 1: A Turing Machine +
Figure 1 A Turing Machine
+
+ + +

The Turing Machine consists of:

+
    +
  • a read only alphabet that instances can be made from
  • +
  • a read only empty symbol that instances can be made from
  • +
  • a constant tape consisting of read writable cells
  • +
  • a read only left from leftmost error symbol that instances can be made from
  • +
  • a head bearing tape transport mechanism
  • +
  • a read writable single symbol read data buffer
  • +
  • a constant state machine programmed controller with states that can be referenced
  • +
  • a constant initial state reference
  • +
  • a constant halt state reference
  • +
  • a read writable current state reference variable
  • +
  • a constant operation procedure where each step of the procedure can be referenced
  • +
  • a read writable operation procedure step reference counter
  • +
  • a read only clock to synchronize control and to cause counting until the halt state is reached.
  • +
  • a fixed hardware comparator to evaluate state and symbol equivalencies
  • +
  • a reset button that activates logic that initializes the machine
  • +
+ +

Each highlighted term is a short name for the associated item.

+ +

+ The distinct empty symbol can be any symbol that is excluded from the alphabet. Only instances of alphabet symbols or the empty symbol are permitted to be written to the tape. +

+ +

+ Intuitively, a person might consider that the alphabet symbols are useful while the empty symbol is merely taking up space while waiting to be displaced, in the same manner that a person considers a bookshelf to be empty rather than being full of air. (And if a person puts a bookshelf underwater, is it still empty, or is it full of water?). +

+ +

+ Depending on the design, without reset being held during power up, a real machine can land in an illegal state that might not be resettable, and could conceivably be damaging. Hence, reset is normally held during power up, and it is reset, not power up, that causes a machine to land in a known initial state. +

+ +

+ This design assumes that when reset is released, the then initialized machine starts running. This is fine for our purposes, but surely the deluxe model would have a separate 'go' button and the associated logic. +

+ +

+ Note that we packaged a tape transport along with the head. In this volume we will talk about sending step commands to the head, but of course a head doesn't step, rather a tape transport mechanism steps. Hence, when we talk about 'stepping the head' implied is that the head remains stationary, and the tape transport mechanism moves the tape. As the tape is normally very long and held on spools, even if we could move the head it would not be very effective. +

+ +

+ The constant operation procedure should not be conflated with the Turing Machine program. For a microcode controlled machine, the procedure will be found in microcode memory, and it will be executed as though a program. Each line of the procedure, when read, results in a set of bits being connected to the machine's control lines. Some of those control lines will control what the procedure does, and some will extend out into the data path and be used to configure execution units and gate data on to busses. +

+ +

+ For a hardwired machine, the operation program will be expressed with logic gates and flip flops (single bit memory registers). Whether a machine is microcode controlled, or hardware controlled is a question of implementation. The values on the control lines remain the same independent of those implementation decisions, so those decisions are inconsequential to our architecture discussion. +

+ +

+ The Turing Machine architecture specifies an infinite tape, which can neither be implemented, nor realized. We will introduce a computationally inconsequential modification in a later chapter that causes the tape to be finite. +

+ +

The Turing Machine tape cell

+ +

+ A property is a pair, where the components are called the name and the value. A name is an instance of a symbol and it must uniquely identify the property within its context. The value is a variable that can be written then read back. +

+ +

+ A cell is the square from Alan Turing's 1936 paper Alan M. Turing, "On Computable Numbers, with an Application to the Entscheidungsproblem," Proceedings of the London Mathematical Society s2 42, no. 1 (1936): 230 265.. Mathematically, a cell is a distinct identifiable set, with one to three property members depending on the type of cell. +

+ +

+ A leftmost cell is a set of two properties named 'right neighbor' and 'data'. A rightmost cell is a set of two properties named 'left neighbor' and 'data'. An interstitial cell is a set holding three properties: a 'left neighbor', a 'right neighbor', and 'data'. While an island cell owns a single compulsory property, that of 'data'. +

+ +

+ The value of a cell neighbor property is limited to being the identity of a cell. The value of a cell data property can be an instance of an alphabet symbol, or alternatively, an instance of the empty symbol. +

+ +

The Turing Machine tape

+ +

+ The Turing Machine tape is a set containing exactly one leftmost cell and an infinite number of interstitial cells. For each cell in the set, called cell A, if cell A has a right neighbor that is cell B, then cell B's left neighbor is cell A. Similarly, if cell A has a left neighbor of cell B, then cell B's right neighbor is cell A. Furthermore, any cell in the set must be reachable by traversing right neighbors starting from the leftmost cell, in a finite number of steps. +

+ +

+ To say that a tape is infinite, and to simultaneously require that any cell can be reached in a finite number of steps, might seem to be contradictory. However, these locutions are compatible in their meaning. By saying the tape is infinite, we are saying that after reaching a cell through a finite number of right neighbor hops, there will always be further cells to the right. So though any cell can be reached in finite hops starting at the leftmost cell, all of the cells cannot be reached. +

+ +

+ In conventional computation theory, once a tape is defined the cell neighbor properties values are fixed. Cells don't move, new cells cannot be added, and cells existing on the tape cannot be removed. This fits the definition of a space, so we can say that a Turing Machine tape has a constant, fixed, linear topology. This also matches the reality of hardware memories. On the other hand, it does not track well with general memory containers such as linked lists where destructive operations are often permitted. +

+ +

+ Nor can a cell data property be removed; however, unlike for cell neighbor property values, the cell data property value can be changed while the Turing Machine is running. In fact some people would say this is the whole point of running a Turing Machine. +

+ +

+ Initially the Turing Machine tape is filled with empty symbols. However, as we noted above, a Turing Machine cannot visit all the cells on a tape, so a Turing Machine cannot erase a tape in advance for another Turing Machine to use. In a later chapter we will provide a computationally inconsequential alternative, but for now we will do as all have done before us, and decree that initial empty tapes are available by definition. +

+ +

+ The tape is intentionally defined in such a manner that there is no meaning to 'in between' two cells. The head of the machine is always on exactly one cell, with the option of stepping to neighbor cells. Taking a step is an atomic operation; there is no meaning to 'during the step'. Turing Machines are state machines controlled by a clock. A person only asks questions of them when the machine is in a defined state. +

+ +

+ Mathematically, a Turing Machine tape can be expressed as a path graph. However, a tape model and a path graph model imply different ontological contexts. The neighbor property of a Turing Machine tape cell specifically informs a clock driven atomic step function where to place the machine head next. The machine only has defined meaning at the state points on the programmed controller. In contrast, a path graph exists in the wider context of graph theory. A path graph has edges and each edge can be focused on, said to be traversed over, and given general properties. These are things we explicitly excluded in the tape definition. If we were to move the tape from the context of the machine and into the more abstract mathematical context by modeling the tape with a path graph, then we would do so for the purpose of analyzing the tape, which is a higher order and more abstract activity. However, in the current exercise we are not reaching towards the more abstract; rather, we are reaching in the other direction, towards machine architecture. +

+ +

The Turing Machine tape head

+ +

+ The tape head consists of a reference to exactly one of the tape cells and a set of four functions: read, write, step-left, and step-right. In addition, the tape head can throw an error, left-of-leftmost, if the Turing Machine attempts to step left from the leftmost cell. When stepping, the cell reference in the head is updated based on the neighbor properties of the currently referenced cell. The cell referenced by the head is called the cell the head is on, or more simply, the head cell, or more generally as the indicated cell. +

+ +

+ A person can also say that the head indexes the head cell. This utilizes the classical mechanical definition, where an index is a mark for aligning gears. This physical meaning contrasts with an index integer used for addressing an array. The architectural definition of the Turing Machine developed here relies strictly upon the topological properties of the tape, independent of the definition of Natural Numbers. Addresses, which do rely on Natural Numbers, are discussed further on in this volume. This represents a minor divergence from Alan Turing's original paper, as he took it as a given that numbers naturally paired with the squares. We explicitly establish that pairing only after deriving Natural Numbers using the Turing Machine itself. +

+ +

The programmed controller

+ +

+ There are two distinct centers of logical control for the Turing Machine. The one we are most familiar with from the many descriptions of the Turing Machine in papers is called the 'state controller'; however, this term becomes confusing when we realize there are additional controllers involved. Hence, we call this component the programmed controller. It is customized for each different problem the Turing Machine will work on, while the other controllers give the Turing Machine its fixed characteristics. +

+ +

Components

+ +

The programmed controller contains the following components:

+
    +
  • alphabet of states
  • +
  • a reset control line
  • +
  • a step control line
  • +
  • an initial state
  • +
  • a halt state
  • +
  • a current state register
  • +
  • a comparator
  • +
  • an instruction table
  • +
  • a next state table
  • +
  • default next state table
  • +
  • error state symbol
  • +
+ +

+ Each state corresponds to a symbol. Here, instances of the state symbols appear in a different context than that of the data alphabet symbols or the empty symbol, and thus they do not need to be distinct from them. In real machines, state symbol instances are unsigned integers. +

+ +

+ The alphabet of states is specified in the architecture, and in the design stage becomes a table in a document where each row relates a bit vector with a name. It remains a documented abstraction to the designers, but can become embodied in programs where meaningful print statements are needed. Perhaps in a CAD tool such as a hardware debugger. +

+ +

+ The current state register holds an instance of the current state symbol. During reset its value is forced to be an instance of the initial state symbol. During normal operation it is successively updated with the prior next state choice. +

+ +

+ The current state register output is wired to the comparator, along with the halt symbol. A positive match across the comparator asserts a gating signal that halts the machine clock. This halts the internal procedures (discussed in a later chapter), which guarantees that no further step pulses will arrive at the programmed controller. +

+ +

+ The current state register is used to lookup a row in the instruction table. Each defined row contains an instruction that is sent to the tape transport unit. A retrieved instruction provides the specific control code and, in the case of a write instruction, the argument symbol to be written. If the current state yields no match in the instruction table, the logic defaults to issuing a 'no-op', no operation instruction. While a 'no-op' need not be physically acted upon by the tape transport, the fixed wiring typically propagates the signal regardless. +

+ +

+ The current state register, concatenated with the output of the read buffer, is used to lookup a row in the next state table. It yields the subsequent state, or an indication that the given input is not found. +

+ +

+ The current state register is also used to lookup a row in the default next state table while ignoring the read buffer output. An entry for a given state might not exist here either. +

+ +

+ The 'lookup' operation can be implemented in a number of ways, at the election of the design engineers. In the simplest form a lookup indexes into an array, though this can be inefficient. For such small machines a hash table is an unlikely alternative. More likely is content addressable memory, a programmable logic array, or custom combinational logic. +

+ +

+ The programmer must provide the state alphabet, the instruction table, and the next state table. To do this, the programmer benefits from understanding how the programmed controller works. When preparing to provide the tables, the programmer can draw a state machine graph. There are two styles of state machine graphs: the Mealy style and the Moore style. The Mealy style has outputs specified on the edges, while the Moore machine has outputs associated with states. They are equivalently expressive, though the Moore style more easily leads to the table values for the programmed controller described in this section. +

+ +

+ Each defined row of the instruction table specifies a state specific instruction to be given to the tape transport unit. The instruction will be one from the set: { no-op, step-left, step-right, and write(value) }, where the value parameter for a write instruction is coded directly as part of the instruction. +

+ +

Control logic

+ +

+ The following procedure is embodied as further control logic in the Turing Machine. This procedure is fired upon receiving a step pulse. At the time the procedure is entered, the head is stable upon a cell. We list phases so as to avoid any apparent race conditions. This does not dictate to the designers that the clock must have phases, though that isn't excluded either. +

+ +

Deterministic (Uniplex) programmed control procedure

+ +

Upon each step pulse:

+ +

Phase 1:

+
    +
  1. read the symbol instance indicated by the head into the read data buffer
  2. +
+ +

Phase 2:

+
    +
  1. lookup the current state in the instruction table
  2. +
  3. lookup the current state concatenated with the read data buffer in the next state table
  4. +
  5. lookup the current state in the default next state table
  6. +
+ +

Phase 3:

+
    +
  1. if the current state is found in the next state table, use the retrieved value as the next state. Otherwise, if the current state is found in the default next state table, use the default state as the next state. Otherwise, use the error state as the next state.
  2. +
  3. if an instruction was retrieved from the instruction table, the tape transport executes it. Otherwise, the tape transport executes the default 'no-op' instruction.
  4. +
+ +

Phase 4:

+
    +
  1. write the next state to the current state register
  2. +
  3. controller remains quiescent waiting for the next step pulse
  4. +
+ + +

Consequentiality of architectural level control

+ +

+ In common books and papers about the Turing Machine, a step is defined as one step of the programmed controller, i.e. one pass through the four phase procedure given above. Decider proofs ask if the comparator will match the halt state within a finite number of steps. Time complexity proofs take a formulation of step count to reach the halt state, parameterized against the size of the input, and report the order of the highest term as it is asymptotically dominant. Hence we speak of constant, linear, polynomial, and exponential time complexity algorithms. A similar method of analysis, that of memory usage with step count, parameterized against input size, is used for space complexity. +

+ +

+ For a real machine, the step pulse will be derived from the machine clock. The clock will have a constant period, so there is a constant duration of time that will be the same for each pass through the execution procedure. Thus, if we replace the step count with a count of clock ticks, we will get the same decider and complexity results as we would have from step counts. This fits the definition we have been using for inconsequential. +

+ + +

An alternative: stored program and sequencer

+ +

+ The Universal Turing Machine, proposed by Alan Turing, introduced a profound architectural inversion: relocating the defining state tables from hardwired logic, or manually configured patch panels, directly onto the tape itself. This enables replacing the custom programmed controller with a fixed controller that derives its behavior dynamically from the tape data. Consequently, a single, immutable hardware architecture can simulate the execution of any conceivable Turing Machine. +

+ +

+ In addition, encoding a machine's control logic as parseable data on tape establishes an ontology of analysis, a framework where a machine can analyze another machine to establish some properties the other machine might have. We say 'some' because at least one limitation has been proven. Alan Turing proved that such an analyst cannot in general determine if said other machine has the property that it would halt for any input when run. +

+ +

+ We can optimize this representation. Instead of storing the state tables verbatim, we can list a sequence of instructions directly on the tape. To achieve this, the architecture expands to support two distinct categories of instructions: the physical tape transport instructions we defined previously, and a newly introduced category of control instructions. The programmed controller is then replaced with a fixed hardware controller called a sequencer. +

+ +

+ Because the original state tables allowed for non linear execution paths, the instruction sequence on the tape cannot always execute in a straight line. Therefore, the architect must include at least two control instructions: a halt instruction and a test and branch instruction. The sequencer starts at the first instruction in the program, perhaps at the leftmost cell on the tape, and evaluates it. If it is a control instruction, the sequencer acts upon it directly to alter the flow of execution or stop the machine. Otherwise, if it is a physical instruction for the head unit, the sequencer passes it down to the tape transport. +

+ +

+ Because we have not yet derived Natural Numbers or memory addresses in this architecture, a test and branch instruction cannot jump to a numerical address. Instead, it must operate topologically. A topological branch instruction simply commands the sequencer to scan the tape for a specific target symbol, and resume executing instructions from that physical location. +

+ +

+ As noted in the prior section, an instruction consists of an instruction code and potentially an argument. There are many choices that can be made in instruction set design. Among those choices, almost all will be inconsequential from a computation theoretic point of view, but almost all will introduce strict efficiency trade offs in physical hardware. +

+ +

Machine control

+ +

+ In the prior two sections we discussed the configurable part of the Turing Machine control. Here we complete the picture by describing the fixed portion. +

+ +

Setup

+
    +
  1. select and mount a tape
  2. +
  3. push the reset button
  4. +
+ +

Reset

+
    +
  1. step the head left until an 'left of leftmost' error from the tape transport unit, the head will then be on the leftmost cell
  2. +
  3. hit reset on the programmed controller, or the sequencer, depending on which is being used
  4. +
  5. wait until the release of the reset button
  6. +
+ +

Main:

+
    +
  1. evaluate the value of the reset line coming from the reset button
  2. +
  3. if the reset line is true, execute the Reset procedure
  4. +
  5. if the reset line is false, evaluate the halt line coming from the comparator
  6. +
  7. if the halt line is true, freeze execution until reset is asserted, then return to step 1
  8. +
  9. if the halt line is false, send a step pulse to the programmed controller (or sequencer) on each clock tick
  10. +
+ +

+ A person can read this procedure with the caveat, "if we could realize such a machine, this is what we would do." Later, these directions can be modified and applied to the machine variation that has an expanding tape. +

+ +

+ To start the machine we must first select a tape. Common choices are an empty tape, a tape with data on it the machine is to decide matches a given language pattern, or a tape with a Turing Machine on it to be analyzed. After the tape is selected it is mounted on the Turing Machine, then the reset button is hit. +

+ +

+ After the reset button is released, the machine begins stepping. If the program is a computation, the machine will eventually halt. If the machine eventually halts, then we know the associated program was a computation. Otherwise we do not know. Any amount of time we wait where the machine has not halted, we will not know that it will ever halt. Hence, we cannot in general use 'running a Turing Machine' as a means to determine if a given program is computational. (We could instead try to answer the question 'is it computational' through analysis, but there too, Turing has shown that in general that will not work either.) +

+ + +Area and partitions + +

+ We call a subset of contiguous cells from a tape an area of said tape. A finite area of at least three cells will have a leftmost cell in the area, a rightmost cell in the area, with one or more interstitial cells. A leftmost cell in an area might have a left neighbor property, but the cell indicated by that property resides strictly outside the area. Or it is possible that the leftmost cell of an area is also the leftmost cell of the tape, and thus it lacks a left neighbor property. Any cell on a single ended tape will have a right neighbor property, but for a finite area the rightmost cell's right neighbor property will indicate a cell that falls outside the area. It is possible for an area to be open on the right, and thus be infinite. + In this manner we distinguish between tape cell types and area cell types. +

+ +

A tape partition is a set of areas that completely span a tape. For any partition of a single ended Turing Machine tape, at least one of the areas will necessarily be infinite. An area can also be partitioned, which leads to nested areas. +

+ +

Head partition

+ +
    +
  1. The left side: a potentially empty finite set containing all of the cells to the left of the head cell.
  2. +
  3. Head: the head cell.
  4. +
  5. The right side: the infinite set extending rightward from the right neighbor of the head cell.
  6. +
+ +

Leftmost/remaining partition

+ +
    +
  1. Leftmost: the leftmost cell.
  2. +
  3. Remaining: the infinite set including the right neighbor of the leftmost cell, and all cells further to the right.
  4. +
+ +

Active area partition

+ +

+ A nonempty tape, one with at least one cell holding an alphabet symbol, can be partitioned into the following areas: +

+ +
    +
  1. The left empty tail: this area is empty when the leftmost cell is nonempty. Otherwise, it consists of the leftmost cell and the empty cells, if any, to the right of the leftmost cell, up to the first alphabet cell.
  2. + +
  3. Active area: a finite area for computational problems, containing the cells extending from the leftmost alphabet cell up to and including the rightmost alphabet cell. It is possible that the leftmost alphabet cell and the rightmost alphabet cell will be the exact same cell.
  4. + +
  5. The right empty tail: the infinite set extending from the right neighbor of the rightmost cell of the active area, extending rightward.
  6. +
+ +

Area implied partition

+ +

+ Given any area on a tape, or nested within another area, the potential for two additional areas is implied. +

+ +
    +
  1. The left side: a potentially empty finite set containing all of the cells to the left of the given area.
  2. +
  3. The given area.
  4. +
  5. The right side: for a tape, the infinite set extending rightward from the rightmost cell of the given area. For a nested area, this could be empty or finite.
  6. +
+ + +

The impossibility of recognizing an empty tape

+ +

+ Recognition is a process where a Turing Machine decides if a pattern is present on a tape solely by reading symbols found on the tape. No meta information, such as a message communicating something about the area being examined or the nature of the program that wrote the symbols, can be taken into account. +

+ +

+ The active area partition of a tape only works for tapes that have at least one alphabet cell. As soon as a machine does its first write of an alphabet symbol, it is known the tape has at least one alphabet symbol. However, what if a tape of unknown status, whether completely empty or containing an alphabet cell, is mounted on a tape machine, and it is desired that the machine recognize if the tape is empty or has an alphabet cell? This is the equivalent problem of looking for the leftmost cell of an active area. +

+ +

+ Recognizing that a tape is empty is generally impossible. Suppose it were attempted, and a machine started scanning the tape rightward from the leftmost cell; for every cell that is discovered to be empty, the machine would have to scan further rightward to check for an alphabet cell. If the tape is truly empty, the recognizer would never stop scanning, so no decision would ever be rendered. +

+ +

The impossibility of recognizing the rightmost cell of the active area

+ +

+ In general, a Turing Machine cannot step across a tape reading cells to recognize the rightmost cell of the active area, or equivalently, the leftmost cell of the right empty tail. Suppose a recognizer attempted this by starting in the active area and stepping right, and the machine discovered an empty cell. The machine would be unable to distinguish between the case of said empty cell being embedded within the active area (meaning more alphabet cells lie further to the right), or the case where said cell is genuinely the leftmost cell of the right tail. To resolve the ambiguity, the machine would be obligated to continue stepping right. Yet, there would never come a time where finding another empty cell would avoid leading back to the exact same case ambiguity, so the machine would forever step right without returning a decision. +

+ +

+ It follows that if knowledge of the end of the active area is needed, this information must be encoded as a message. For example, a special symbol can be reserved in the alphabet specifically to serve as the end of active area marker. Each time a machine steps beyond the current end of active area marker and does a write, it writes the marker in the right neighbor cell, and goes back and erases the old mark. This method is related to communications theory and the science of signaling. Here, the active area marker is an out of band control signal. +

+ +

+ If a tape is written by an initializing tape machine, unmounted, and then mounted on a second analyzing tape machine, the analyzing tape machine is starting with a populated tape. Similarly, a mathematician can, by decree, define an initial tape that holds predefined alphabet symbols. In these cases, the analyzing machine cannot use the signaling method described in the prior paragraph, as it was excluded from controlling all the writes of alphabet symbols to the tape. The only solution to this problem is for the initializing machine and the analyzing machine to use a shared communication protocol for signaling the end of the active area. +

+ +

+ By definition, a computation must finish in a finite number of steps. It follows that the active area when a Turing Machine halts a computation will always be finite. Consequently, if a Turing Machine initially starts working with a tape that was computed by another Turing Machine, the length of the input will be finite. Still, that input will be in the active area, so the receiving Turing Machine will need to read control data left on the tape under a common communication protocol to be able to find the bounds of the input area. +

+ +

+ When an input tape is provided as a general mathematical object, either decreed by definition or perhaps abstracted from 'what a Turing Machine computation would produce in the limit of step count', then the input can be either finite or infinite. +

+ +

In band and out of band control

+ +

+ Because of the impossibility of recognizing certain tape features, when a tape is written by one Turing Machine, then used by another, there must be some sort of system for messaging control. There are two approaches for mixing data and control together: one is in band signaling, while the other is out of band signaling. +

+ +

+ In band control occurs when control signals or structural metadata are mixed directly into the same channel and alphabet as the data payload. In band signaling leads to ambiguities between what is control and what is data. As we saw, there are cases where a recognizer, i.e., merely examining the data, is completely incapable of resolving even the simplest of control questions. A conventional approach for resolving these ambiguities makes use of escape sequence schemes that grow in length as the levels of communication grow. This has always been an afterthought, a sort of hack. +

+ +

+ In contrast, out of band control communicates structural information through a strictly separate channel or by utilizing symbols definitively excluded from the programmer visible data alphabet. The rightmost tape marker is an out of band mechanism because it utilizes an expanded hardware tape alphabet strictly reserved for machine management, guaranteeing it can never be conflated with the user's data. Modern architectures often lack the luxury of inventing new symbols to serve as control rather than data. Another out of band signaling technique is to structure the data into channels; such structure is called formatting. We find formatting on hard drives, in frame based and packet based communication channels, and in data structures. +

+ +

Abstract areas and partitions

+ +

+ A tape area and partitioning can be an abstraction defined by a function rather than merely by a leftmost and rightmost cell. Such areas can have different topologies than those of the base tape. A familiar example for most computer scientists is utilizing software to create the appearance of a two dimensional array over a linear memory. +

+ +

+ Accordingly, suppose there is a three tape Universal Turing Machine gasket machine that holds the definition of a base machine on a first tape. It calls the base machine as a subroutine to access the base machine's tape (the second tape), and it uses its own tape to organize the tape abstraction. Then this outer machine can present to its user a variety of transforms of the base machine's tape. +

+ +

+ As an example, a gasket machine could partition the base machine's tape into two areas, one consisting of the odd addressed cells, and the other of the even addressed cells. Though these two areas consist of noncontiguous cells on the base tape, when viewed through the gasket machine, they appear perfectly contiguous. In this case, each area will have a leftmost cell and remain open on the right. +

+ +

+ When the base machine tape cells behind an abstract area are physically contiguous, we say that the abstract area is compact. In the odd even tape partition example, the abstract areas lack compactness. +

+ + + + + + + + + +----------------------- +Addresses + +

We can define a Turing Machine that is identical to the recursive definition of Natural Numbers as given by Peano. Giuseppe Peano, Arithmetices principia, nova methodo exposita (Turin: Fratres Bocca, 1889).

+ +

If we were to run the Natural Numbers Machine and watch as it writes to the tape, we would watch as the Natural Numbers are printed one after another, '·s·ss·sss·ssss· ...'. Here we are using the middle dot as a terminator symbol. As the Natural Numbers Machine never halts, we cannot use the Natural Number Machine to initialize a tape, but we can analyze the machine. When the leftmost cell holds a terminator, we say it has the value 'zero'. We call '·s·' the number 'one'. Each set of 's' adjacent symbols surrounded by the terminators, and zero, is said to be a Natural Number. +

+ +

To say that one Natural Number A is smaller than Natural Number B is to say that A would occur on the Natural Number Machine tape to the left of B, if the machine were to be run. Similarly, if B were said to be greater than A, that would mean B would occur further to the right. To increment a Natural Number is to find its right neighbor. To decrement a number is to find its left neighbor. +

+ +

+ Now suppose we have a single Natural Number on a tape, say 'sss·', then we can define an Increment machine that, when initialized with a tape, writes an additional 's' and a new terminator. For example, when initialized with 'sss·' and then run, it produces 'ssss·'. In an analogous manner, we can define a Decrement machine. +

+ +

As such, we can assign a Natural Number to each member of the tape sequence through the following procedure. Given a machine, say P, we lock to it a second Address Machine, say A_P. When P's tape is first mounted, at the same time A_P is mounted with a tape that has only a terminator symbol, '·'. When P steps right, A_P writes an 's', steps right, and writes the terminator. For each step left of P, the machine A_P steps left and writes the terminator symbol. +

+ +

+ The Natural Number found on A_P is then called the address of the cell the head is on for machine P. As each increment and decrement of the address is a constant time operation, keeping the address of the cell the head is on is a computationally inconsequential action. +

+ +

+ An address space is the set of addresses that would be placed into correspondence to cells if we were to step across all those cells while assigning an address to each cell the head is on. Address space is a second order concept. It is because assigning an address to a cell can be a second order concept that we often take it for granted. +

+ +

+ It is interesting to contemplate if the Natural Number at the basis of the Address Machine instead used Arabic Representation. In that case, an increment or decrement would be a linear time operation due to the carry. Consider a constant time operation on the base machine P, say it steps to the right 5280 cells and writes a mile marker. It would still be a constant time operation no matter the time taken for the address increment. So then consider an operation that is linear time, say a n, where n is the length of the input. Say, for example, it stepped n cells to the right and wrote a marker. If the increment time grows linearly with each step, then what was time n without addresses becomes time n^2 with them, or polynomial time. So indeed using Arabic Representation instead of unary for the address would be computationally consequential for all but constant time machines, if addresses were kept track of in the first order. +

+ +

+ As of the time of this writing, real machines keep the illusion of constant time Arabic Representation for addresses due to fixed width clocked operations. When the width is fixed, and that fixed number is small enough that interconnect delay does not dominate over computation element delay, adder time tends to be logarithmic. The same is true of the related problem of address decoding. Thus an add can be performed within 'one clock tick'. Native address arithmetic operations on modern machines are always done in this manner. Perhaps there exists a special problem, such as pointer swizzling, where address arithmetic would come under software control. +

+ +

+ The model used here to define an address is analogous to keeping a pointer into memory, and then using that pointer value as the address. Each step then increments or decrements the pointer. On a real machine, to access memory requires sending that pointer on a trip through a virtual memory system perhaps, and then through an address decoder. In the Turing Machine model, the head directly indicates a location, so it is more akin to the output of the memory decoder, though unlike the output of a memory decoder, it is stateful, i.e., a persistent value that can be moved incrementally. The analogy with the Turing Machine model holds due to the fiction of a constant decode time, as described in the prior paragraph. +

+ +

+ At a higher level, that virtual memory system level, the memory architecture begins to look more like that of a Turing Machine. The translation lookaside buffer provides stateful location context, and the neighbor relationship between pages might be taken into account for performance reasons. However, once a program starts performing at virtual memory page fetch times instead of local system memory access times, we say that it is page thrashing and know it will become too slow to wait on, no matter its computation complexity class. +

+ +

+ 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 BC. The following table provides the historical date that the variable value would finally be loaded into the processor, depending on the memory tier being accessed: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Memory TierReal World LatencyScaled DelayScaled Arrival EraHistorical Context
L1 Cache Hit1 ns3 days0043 03 18 BCThree days after the assassination.
DRAM (Main memory)100 ns300 days0042 01 09 BCNearly a year later, during the Liberators civil war.
NVMe SSD Page Swap15 µs45,000 days0080123 years later, exactly as the Colosseum is completed in Rome.
SATA SSD Page Swap100 µs300,000 days0778821 years later, during the reign of Charlemagne and the Frankish Empire.
Magnetic HDD Page Swap10 ms30,000,000 days82092Tens of thousands of years in the future, long after current human civilizations are dust.
+ +

This is why computer architects spend almost all of their effort designing memory subsystems that have a high statistical chance of executing in the lower levels of the memory abstraction stack. There is not a single chapter on computation theory in Hennessy and Patterson's Computer Architecture: A Quantitative Approach, for example. John L. Hennessy and David A. Patterson, Computer Architecture: A Quantitative Approach, 6th ed. (Cambridge: Morgan Kaufmann, 2017).

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Chapter 1Fundamentals of Quantitative Design and Analysis
Chapter 2Memory Hierarchy Design
Chapter 3Instruction Level Parallelism and Its Exploitation
Chapter 4Data Level Parallelism in Vector, SIMD, and GPU Architectures
Chapter 5Thread Level Parallelism
Chapter 6Warehouse Scale Computers
Chapter 7Domain Specific Architectures
Chapter 8The Future of Computing
+ + Address defined area, distance, extent, length, and size + +

We defined a tape as having a single feature, that of a leftmost cell, along with a linear neighbor topology. When a tape is mounted it gains a second feature, that of the cell the head is on. The leftmost cell was fixed in place, while any other single cell on the tape can be featured as the cell the head is on. When we introduced areas, we picked up two new features, that of the leftmost cell of the area, and the rightmost cell of the area. Again, those features could coincide with the former features. We noted that the features partitioned a tape thus defining more areas, and more features. +

+ +

+ When cells were defined we noted that they were sets, and that these sets had identity and could be referred to. We needed that to be the case so as to build the tape topology using neighbor properties. Had the tape been singly linked, perhaps we could have used the cells to represent themselves in the properties, but when we doubly linked it, a given cell had to appear in two places, as the right neighbor of its left neighbor, and the left neighbor of its right neighbor, so we stipulated the sets as being identifiable. Initially we did not say how they would be identified. This is common in mathematics, but we soon cleared this up by formalizing the concept of a symbol. +

+ +

+ When discussing symbols we noted they could be natural numbers, and even went so far as to point out that addresses were symbols, though we had not yet defined them. They are familiar to anyone involved in computing, so again, it did not present a serious problem. Here we have now formalized them. +

+ +

+ 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 the section discussing area, 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, if there is one, is excluded from the area. +

+ +

With addresses we can now define an area with two addresses, two natural numbers, the address of the leftmost cell, and that of the rightmost cell. All natural 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. +

+ +

The distance between two cells is the absolute difference in their addresses. When we talk about the distance between the leftmost cell of an area and the rightmost cell of an area, we call this number the area's extent.

+ +

In an analogous manner to defining an address space for a tape, we can define an address space for an area. Accordingly, the leftmost cell of the area is assigned address zero, and the address increments cell by cell going to the right. A finite area will have a finite address space, with the address of the rightmost cell being the largest address in the address space. +

+ +

It is interesting that the extent of an area will be the same, whether it is calculated from the address space of the tape, or the address space of the area. When it is computed from the address space of the area, the extent will be identical to the largest address in the address space. We will use the Greek symbol omega, ω, to symbolize an extent. We can give it a subscript with the name of an area if the correspondence is not already clear. I chose ω because ω is the rightmost letter included in the Greek alphabet. Thus it is the extent of the Greek alphabet. +

+ +

If cells in an area are transacted, the cost of the area is the cost of a cell multiplied by the count of cells. Vincent Atanasoff probably found himself needing to know such a count when ordering capacitors. The count of cells in an area is also known as the area's length. We will use the Greek symbol ϡ, pronounced as sampi, to refer to the length. The length of an area, the count of its cells, will always be one greater than its extent, ϡ = ω + 1. This symbol makes sense here, as the Greek number system fell short of letters, so the symbol ϡ was tacked on to the end of the alphabet, but did not belong to the alphabet. +

+ +

The count of cells in an area, the length of an area, and the cardinality of the address space for an area are all the same number, ϡ. The extent of an area, ω, is an address in an area's address space, whereas the cardinality of an area, ϡ, falls completely outside it. This has implications. Because extent is an address, extent and addresses can always use the same number representation. In contrast, there is no such guarantee for cardinality, ϡ. Take for example an area that contains 256 cells. The addresses run from zero to 255, and all can be represented with an 8 bit binary number. However, the number 256 does not fit. It is for this reason that it might make more sense to use extents than to use lengths. +

+ +

It is considered by some to be profound that the cardinality of a bounded set of Natural Numbers is excluded from the set. If we generalize to an area that is open on the right, for the cardinality of the address space to fall outside the address space would mean that the cardinality of Natural Numbers falls outside the Natural Numbers. It seems peculiar that cardinality, which is a count, is found to fall outside the numbers we use for counting. Though at this point we are asking for an outer bounding value on an infinite set. +

+ +

Is the cardinality of an open on the right area a Natural Number?

+ +

So we find an interesting situation with the cardinality of an address space for an area that is open on the right. It goes like this.

+ +

How cardinality is computed

+ +
    +
  1. We set Turing Machine P with its head on the leftmost cell of an area. We mount the initial tape, '·', on the A machine.
  2. +
  3. 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.
  4. +
  5. 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.
  6. +
+ +

Lemma 1, the A machine produces Natural Numbers

+ +

This follows from its definition; it is literally the increment from the Natural Numbers Machine.

+ +

Lemma 2, cardinality is a natural number

+ +

Cardinality is produced by repeatedly calling the A machine, and the A machine produces Natural Numbers.

+ +

Lemma 3, cardinality is not in the address space

+ +

At the end of the second step in the procedure for producing the cardinality, the tape of the A machine held the extent of the address space. Then in step 3, A was called again, thus leaving a number one larger than the extent on its tape. The extent is the largest number in the address space, hence cardinality is larger than all numbers in the address space. Thus cardinality is not in the address space.

+ +

Lemma 4, the address space of an open on the right area is identical to the Natural Numbers.

+ +

Composing the A machine with an unterminated loop call, where each result is written to a tape with a terminator between entries, results in the same machine as the Natural Numbers Machine.

+ +

The apparent contradiction.

+ +

By Lemma 2, cardinality is a Natural Number. By Lemma 3 cardinality is not in the address space. By Lemma 4 the address space is identical to the Natural Numbers.

+ +

Resolution

+ +

The resolution lies in the computational reality of Step 2. For an area that is open on the right, the stepping of machine P never halts. Because Step 2 never terminates, Step 3 is never executed. The A machine never runs that final, additional time. Therefore, the cardinality of an open area is never actually produced by the machine. In the language of Computational Naturalism, Lemma 2 is false for an infinite area; the cardinality of an open on the right area is excluded from being a Natural Number because a Natural Number Machine cannot reach it in the first order.

+ +

So then can we add a property to cardinality, such that a second order analysis could use this property to continue downstream analysis? In short we could say that cardinality has no first order value, but it has a second order one. This is analogous to inventing a new type of number, a complex number with a second component. I.e., there is no 'real' solution, but there is an 'imaginary' one. Or analogous to error algebra, where a number value is replaced with a rule on how to handle downstream operations when it is given as an input. +

+ +

Such a value would be a new Turing Machine, one that composes a call to the never halting Natural Number machine followed by an increment operation. It cannot be run, but it perfectly explains the situation to an analyst. Perhaps we name this machine ℵ_0. +

+ +

What if extent was used instead of cardinality?

+ +

+ Had extent been used instead of cardinality, we would lack the final increment step in the three step computing procedure. However, step 2 still cannot complete. Rather than a value, the result of the second order analysis would be a machine that produces ever larger Natural Numbers. We can call this machine ℵ_{−1}. +

+ +

+ Now here is an interesting result: +

+ + + ℵ_{0} − ℵ_{−1} = 1 + + +

+ Neither machine can be run. However we can compose the two machines, then simplify the composition. When we do so, the ever larger Natural Number machines annihilate each other, and the increment machine remains. The increment machine can be run, so we end up with an output value. +

+ +

Size

+ +

Consider the case of a partitioned tape. Then consider that we write a gasket, such that we have a higher level Turing Machine that considers each of the areas of the partition as a cell. So then, initially the Turing machine starts with its head on the leftmost area, stepping right steps to the right neighbor area etc. In this manner we abstract the concept of a cell to areas. A length then becomes a count of areas; however the size remains a count of the cells. Something similar is done in the C language, where the length of an array is a count of the elements in the array, but the size of the array is a count of bytes. A byte being an addressable unit in physical memory, and thus the underlying cell that everything is built up from.

diff --git a/document/temp2.html b/document/temp2.html new file mode 100644 index 0000000..f419aff --- /dev/null +++ b/document/temp2.html @@ -0,0 +1,457 @@ + Area and partitions + +

+ We call a subset of contiguous cells from a tape an area of said tape. A finite area of at least three cells will have a left most cell in the area, a right most cell in the area, with one or more interstitial cells. A leftmost cell in an area might have a left neighbor property, but the cell indicated by that property is not in the area. Or it is possible that the leftmost cell of an area is also the leftmost cell of the tape, and thus it does not have a left neighbor property. Any cell on a single ended tape will have a right neighbor property, but for a a finite area the rightmost cell's right neighbor property will indicate a cell that is not in the area. It is possible for an area to be open on the right, and thus not be finite. + In this manner we distinguish between tape cell types, and area cell types. +

+ +

A tape partition is a set of areas that completely span a tape. For any partition of a single ended Turing Machine tape, at least one of the areas will necessarily be infinite. An area can also be partitioned, which would lead to nested areas. +

+ +

Head partition

+ +
    +
  1. The left side: a potentially empty finite set containing all of the cells to the left of the head cell.
  2. +
  3. Head: the head cell.
  4. +
  5. The right side: the infinite set extending rightward from the right neighbor of the head cell.
  6. +
+ +

Leftmost/remaining partition

+ +
    +
  1. Leftmost: the leftmost cell.
  2. +
  3. Remaining: the infinite set including the right neighbor of the leftmost cell, and all cells further to the right.
  4. +
+ +

Active area partition

+ +

+ A non empty tape, one with at least one cell holding an alphabet symbol, can be partitioned into the following areas: +

+ +
    +
  1. The left empty tail: this area is empty when the leftmost cell is not empty. Otherwise, it consists of the leftmost cell and the empty cells, if any, to the right of the leftmost cell, up to the first alphabet cell.
  2. + +
  3. Active area: a finite area for computational problems, containing the cells extending from the leftmost alphabet cell up to and including the rightmost alphabet cell. It is possible that the leftmost alphabet cell and the rightmost alphabet cell will be the same cell.
  4. + +
  5. The right empty tail: The infinite set extending from the right neighbor of the rightmost cell of the active area, extending rightward.
  6. +
+ +

Area implied partition

+ +

+ Given any area on a tape, or nested within another area, there is implied the potential for two more areas. +

+ +
    +
  1. The left side: a potentially empty finite set containing all of the cells to the left of the given area.
  2. +
  3. The given area.
  4. +
  5. The right side: for a tape, the infinite set extending rightward from the rightmost of the given area. For a nested area, this could be empty or finite.
  6. +
+ + +

The impossibility of recognizing an empty tape

+ +

+ Recognition is a process where a Turing Machine decides if a pattern is present on a tape solely by reading symbols found on the tape. No meta information, such as a message communicating something about the area being examined or the nature of the program that wrote the symbols, can be taken into account. +

+ +

+ The active area partition of a tape only works for tapes that have at least one alphabet cell. As soon as a machine does its first write of an alphabet symbol, it is known the tape has at least one alphabet symbol. However, what if a tape of unknown status, whether completely empty or containing an alphabet cell, is mounted on a tape machine, and it is desired that the machine recognize if the tape is empty or has an alphabet cell? This is the equivalent problem of looking for the leftmost cell of an active area. +

+ +

+ Recognizing that a tape is empty is not generally possible. Suppose it were attempted, and a machine started scanning the tape rightward from the leftmost cell; for every cell that is discovered to be empty, the machine would have to scan further rightward to check for an alphabet cell. If the tape is truly empty, the recognizer would never stop scanning, so no decision would be rendered. +

+ +

The impossibility of recognizing the rightmost cell of the active area

+ +

+ In general, a Turing Machine cannot step across a tape reading cells to recognize the rightmost cell of the active area, or equivalently, the leftmost cell of the right empty tail. Suppose a recognizer attempted this by starting in the active area and stepping right, and the machine discovered an empty cell. The machine would not be able to distinguish between the case of said empty cell being embedded within the active area (meaning more alphabet cells lie further to the right), or the case where said cell is genuinely the leftmost cell of the right tail. To resolve the ambiguity, the machine would be obligated to continue stepping right. Yet, there would never come a time where finding another empty cell would not lead back to the exact same case ambiguity, so the machine would forever step right without returning a decision. +

+ +

+ It follows that if knowledge of the end of the active area is needed, this information must be encoded as a message. For example, a special symbol can be reserved in the alphabet specifically to serve as the end of active area marker. Each time a machine steps beyond the current end of active area marker and does a write, it writes the marker in the right neighbor cell, and goes back and erases the old mark. This method is related to communications theory and the science of signaling. Here, the active area marker is an out of band control signal. +

+ +

+ If a tape is written by an initializing tape machine, unmounted, and then mounted on a second analyzing tape machine, the analyzing tape machine is not starting with an empty tape. Similarly, a mathematician can, by decree, define an initial tape that is not empty. In these cases, the analyzing machine cannot use the signaling method described in the prior paragraph, as it was not in control of all the writes of alphabet symbols to the tape. The only solution to this problem is for the initializing machine and the analyzing machine to use a shared communication protocol for signaling the end of the active area. +

+ +

+ By definition, a computation must finish in a finite number of steps. It follows that the active area when a Turing Machine halts a computation will always be finite. Consequently, if a Turing Machine initially starts working with a tape that was computed by another Turing Machine, the length of the input will be finite. Still, that input will be in the active area, so the receiving Turing Machine will need to read control data left on the tape under a common communication protocol to be able to find the bounds of the input area. +

+ +

+ When an input tape is provided as a general mathematical object, either decreed by definition or perhaps abstracted from 'what a Turing Machine computation would produce in the limit of step count', then the input can be either finite or infinite. +

+ +

Abstract areas

+ +

The concept of area can be abstracted to include a set of cells that share a property.

+ +

This might be a property of the values in the cells, or a property of the addresses of cells.

+ +

An abstract area can be colored by a property detecting machine.

+ +

Such a machine would start at the leftmost cell, check the value in that cell for the given property and mark it accordingly. It would then step right and repeat.

+ +

For such a marker machine to be computational there will have to be a leftmost cell in the area, and upon finding a leftmost cell in the area, a rightmost cell will have to exist. Without both of these boundaries, a marker machine will never halt.

+ +

Even if a marker machine does not halt, it still might be useful for analysis.

+ +

Marker machines that color based only on the value found in each individual cell are context free.

+ +

Abstract areas can also be defined based on functions of cell values that include context.

+ +

When the cells in an abstract area are contiguous, we say that the area is compact.

+ +

An example of an area that is excluded from being compact is that of the odd addressed cells.

+ +

The odd and even addressed cells of a tape form two non overlapping abstract areas.

+ +

Given a cell in either of these abstract areas, its direct physical neighbors on the tape will be found in the opposing area.

+ + +

In band and out of band control

+ +

+ In band control occurs when control signals or structural metadata are mixed directly into the same channel and alphabet as the data payload. In band signaling leads to ambiguities between what is control and what is data. As we saw, there are cases a recognizer, i.e. merely examining the data, is not capable of resolving even the simplest of control questions. A conventional approach for resolving these ambiguities makes use of escape sequence schemes that grow in length as the levels of communication grow. This has always been an after thought, a sort of hack. +

+ +

+ In contrast, out of band control communicates structural information through a strictly separate channel or by utilizing symbols definitively excluded from the programmer visible data alphabet. The rightmost tape marker is an out of band mechanism because it utilizes an expanded hardware tape alphabet strictly reserved for machine management, guaranteeing it can never be conflated with the user's data. Modern architectures often do not have the luxury of inventing new symbols to serve as control rather than data. Another out of band signaling technique is to structure the data into channels; such structure is called formatting. We find formatting on hard drives, in frame based and packet based communication channels, and in data structures. +

+ + + Computational Analysis + +

+ In mathematics, analysis is the rigorous study of limits, continuity, rates of change, and bounds. It encompasses several specialized branches. Real analysis studies the behavior of real numbers, sequences, and continuous functions. Complex analysis extends these principles to functions of complex variables. Functional analysis examines vector spaces where the elements themselves are functions. Numerical analysis focuses on the design of algorithms to yield approximate solutions for continuous mathematical problems. Harmonic analysis studies the representation of functions or signals as the superposition of basic waves, such as Fourier series. Across all these branches, analysis provides a formal framework for evaluating mathematical objects. +

+ +

+ In computation theory, computational analysis is defined as the static evaluation of a formal system or machine definition to deduce its absolute boundaries and properties. This process remains entirely distinct from dynamically executing the machine to yield a computed result. +

+ +

+ This analytical perspective has been present from the very beginning of the field. Alan Turing's formulation of the halting problem relies explicitly on one machine examining another. To properly evaluate the limits of this analytical capacity, the examining machine must necessarily be given definitions of programs that loop infinitely. Consequently, the foundational proofs of computer science formally establish non computational programs as legitimate objects of analytical study. +

+ +

+ We call a program that examines another program so as to deduce properties of its results an analyzer. The program or machine definition being subjected to this evaluation is called the studied program or studied machine. +

+ +

+ Turing Machines that halt in a finite number of steps for any finite input within a stipulated domain are said to be computational over that domain. +

+ +

+ By definition, first order analysis is the running of programs, and it has its place. + Generally, when we want to know what output a computational machine will produce, the fastest route to this knowledge is to run the program. Most programs written to solve problems are most effectively run to solve those problems rather than analyzed to deduce what they will produce. +

+ +

+ Now suppose we quantify the inputs to a computational machine over a domain and want to know a property of the machine. Perhaps, say, that it always produces an even number. If the quantification is over a large set, then it might be faster to study the machine than it would be to run the machine on every input in the domain while checking its output. +

+ +

+ Further suppose that the quantification is over an infinite input space. Then the only option for answering a question about the properties of results from such a machine is to analyze it. This is second order analysis, also called simply analysis. +

+ +

+ Famously, we know that universally an analyzer cannot determine if a machine is computational. This knowledge was derived by reasoning about the properties of a hypothetically existing analyzer machine. This is a third order analysis activity. +

+ +

+ As an analyzer does not run the machine being studied, it is not required to be a machine that halts. Suppose we have a machine that produces an infinite sequence of digits to a tape without halting. A limit analyzer could examine that machine and, in some cases, determine if it has asymptotic behavior. For example, recognizing that appending a binary fractional sequence of 0.1111... indefinitely evaluates in the limit to 1.0. In this manner, the use of analyzers facilitates using computation theory for deriving higher order mathematics. +

+ + Computational Naturalism + +

+ Given that we have an architectural definition for a Turing Machine, and will modify this in a later chapter to define a realizable Turing Complete architecture, it is possible to invert the foundation of mathematics. Instead of mathematics preceding computation, we posit that given a Turing Machine exists, all of mathematics is an interpretation of what can be done with it. +

+ +

+ We begin by defining the tape cell as a location in a physical memory, which provides us with arrays of charge configurations. +

+ +

+ We then define the symbol in computational terms, as done in the prior 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. +

+ +

+ Logic is then defined on top of relay switch logic, as Shannon and others have already done. A machine that requires all inputs to be the '1' symbol to produce a '1' symbol output is a conjunction machine, and so forth. +

+ +

+ On top of this we can define the Peano Machine, a counter, and then use that machine as the definition of Natural Numbers. +

+ +

+ Where Gödel reduced logic to natural numbers, we go the other direction to expand upon logic from natural numbers. +

+ +

+ An axiomatic proof is then a decider that is built up from subroutine calls to the axioms. We might then quantify over all possible compositions of our subroutines in analysis and ask if it is possible that a contradiction decider would return Y or N. +

+ +

+ Frege's set theory is then the analysis of a logic program against an enumeration of inputs to choose if a proposed symbol is in a set. Perhaps executing such a program is left to first order analysis, or perhaps execution is not practical, and evaluation is left to second order analysis. +

+ +

+ Russell's Paradox will then be expressed as a Turing Machine that can be analyzed in the second order, but cannot be analyzed in the first order. That is, the paradox exists merely in the first order as it will never halt when run. However, it is not a paradox in the second order. It is, of course, through second order analysis that we are able to describe why Russell's Set description does not resolve in the first order. +

+ +

+ With the language of Computational Naturalism it is possible to restate every statement ever made by any mathematician; we might say that the mere fact that a mathematician was able to state something qualifies its membership into Zermelo's S set. +

+ +

+ Given our knowledge that a universal halting problem analyzer that decides if a Turing Machine program halts does not exist, it is desirable to have rules that guide our writing only Turing Machine programs that are known to halt. This can be done through construction, as proposed by Russell, or through axioms of separation, mapping, and choice, as proposed by Zermelo and others. But then we know from the completeness and correctness theorems, that when such guiding rules are applied, there will exist Turing Machine programs that do halt, but whose definition cannot be constructed, nor surmised using the said axioms. +

+ +

+ This brings us back to the reference from the Zermelo discussion in the introduction. Specifically, the question posed is if our finding through second order analysis that Russell's paradoxical set formulation will not run in the first order and define a set, does this mean that we are merely using S to state that we are tossing out sets that cannot be defined? The answer is it is not quite this simple. Had Frege said, 'we merely dismiss such sets', we would not have the formalization for the second order analysis. Throwing out Russell's paradox simply because we ran it and it never halted is not a practical approach. Instead, we omit it specifically from S because analyzing R reveals that it fails to define a first order halting machine, and S, by definition, only holds first order halting machines. Zermelo's language is precise and formal. However, it is this bothersome nuance, now articulated here, which caused us to scratch our heads when reading Zermelo the first time. +

+ +

+ Russell's set formulation, R, can be analyzed to determine that it would not halt if it were run. We still keep it as a second order object, and have even given it a name, R. However, this begs the question, are there machines that cannot even be analyzed in the second order to ascertain if they would return a result in first order analysis, i.e., when they are run? If Gödel has a say here, a person would wager that such machines exist. But then, is there an option for analysis in the third order? Is Turing's halting proof a third order analysis as it reasons about running the second order analyzer? Or is it merely a recursive application of second order analysis? +

+ + Addresses + +

We can define a Turing Machine that is identical to the recursive definition of Natural Numbers as given by Peano. Giuseppe Peano, Arithmetices principia, nova methodo exposita (Turin: Fratres Bocca, 1889).

+ +

If we were to run the Natural Numbers Machine and watch as it writes to the tape, we would watch as the Natural Numbers are printed one after another, '·s·ss·sss·ssss· ...'. Here we are using the middle dot as a terminator symbol. As the Natural Numbers Machine never halts, we cannot use the Natural Number Machine to initialize a tape, but we can analyze the machine. When the leftmost cell holds a terminator, we say it has the value 'zero'. We call '·s·' the number 'one'. Each set of 's' adjacent symbols surrounded by the terminators, and zero, is said to be a Natural Number. +

+ +

To say that one Natural Number A is smaller than Natural Number B is to say that A would occur on the Natural Number Machine tape to the left of B, if the machine were to be run. Similarly, if B were said to be greater than A, that would mean B would occur further to the right. To increment a Natural Number is to find its right neighbor. To decrement a number is to find its left neighbor. +

+ +

+ Now suppose we have a single Natural Number on a tape, say 'sss·', then we can define an Increment machine that, when initialized with a tape, writes an additional 's' and a new terminator. For example, when initialized with 'sss·' and then run, it produces 'ssss·'. In an analogous manner, we can define a Decrement machine. +

+ +

As such, we can assign a Natural Number to each member of the tape sequence through the following procedure. Given a machine, say P, we lock to it a second Address Machine, say A_P. When P's tape is first mounted, at the same time A_P is mounted with a tape that has only a terminator symbol, '·'. When P steps right, A_P writes an 's', steps right, and writes the terminator. For each step left of P, the machine A_P steps left and writes the terminator symbol. +

+ +

+ The Natural Number found on A_P is then called the address of the cell the head is on for machine P. As each increment and decrement of the address is a constant time operation, keeping the address of the cell the head is on is a computationally inconsequential action. +

+ +

+ An address space is the set of addresses that would be placed into correspondence to cells if we were to step across all those cells while assigning an address to each cell the head is on. Address space is a second order concept. It is because assigning an address to a cell can be a second order concept that we often take it for granted. +

+ +

+ It is interesting to contemplate if the Natural Number at the basis of the Address Machine instead used Arabic Representation. In that case, an increment or decrement would be a linear time operation due to the carry. Consider a constant time operation on the base machine P, say it steps to the right 5280 cells and writes a mile marker. It would still be a constant time operation no matter the time taken for the address increment. So then consider an operation that is linear time, say a n, where n is the length of the input. Say, for example, it stepped n cells to the right and wrote a marker. If the increment time grows linearly with each step, then what was time n without addresses becomes time n^2 with them, or polynomial time. So indeed using Arabic Representation instead of unary for the address would be computationally consequential for all but constant time machines, if addresses were kept track of in the first order. +

+ +

+ As of the time of this writing, real machines keep the illusion of constant time Arabic Representation for addresses due to fixed width clocked operations. When the width is fixed, and that fixed number is small enough that interconnect delay does not dominate over computation element delay, adder time tends to be logarithmic. The same is true of the related problem of address decoding. Thus an add can be performed within 'one clock tick'. Native address arithmetic operations on modern machines are always done in this manner. Perhaps there exists a special problem, such as pointer swizzling, where address arithmetic would come under software control. +

+ +

+ The model used here to define an address is analogous to keeping a pointer into memory, and then using that pointer value as the address. Each step then increments or decrements the pointer. On a real machine, to access memory requires sending that pointer on a trip through a virtual memory system perhaps, and then through an address decoder. In the Turing Machine model, the head directly indicates a location, so it is more akin to the output of the memory decoder, though unlike the output of a memory decoder, it is stateful, i.e., a persistent value that can be moved incrementally. The analogy with the Turing Machine model holds due to the fiction of a constant decode time, as described in the prior paragraph. +

+ +

+ At a higher level, that virtual memory system level, the memory architecture begins to look more like that of a Turing Machine. The translation lookaside buffer provides stateful location context, and the neighbor relationship between pages might be taken into account for performance reasons. However, once a program starts performing at virtual memory page fetch times instead of local system memory access times, we say that it is page thrashing and know it will become too slow to wait on, no matter its computation complexity class. +

+ +

+ 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. The following table provides the historical date that the variable value would finally be loaded into the processor, depending on the memory tier being accessed: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Memory TierReal World LatencyScaled DelayScaled Arrival EraHistorical Context
L1 Cache Hit1 ns3 days-0043-03-18Three days after the assassination.
DRAM (Main memory)100 ns300 days-0042-01-09Nearly a year later, during the Liberators' civil war.
NVMe SSD Page Swap15 µs45,000 days0080123 years later, exactly as the Colosseum is completed in Rome.
SATA SSD Page Swap100 µs300,000 days0778821 years later, during the reign of Charlemagne and the Frankish Empire.
Magnetic HDD Page Swap10 ms30,000,000 days82092Tens of thousands of years in the future, long after current human civilizations are dust.
+ +

This is why computer architects spend almost all of their effort designing computers that execute as many instructions per cycle as possible within a memory subsystems that has a high statistical chance of executing in the lower levels of the memory abstraction stack. As a demonstration of this, there is not a single chapter on computation theory in Hennessy and Patterson's Computer Architecture: A Quantitative Approach. John L. Hennessy and David A. Patterson, Computer Architecture: A Quantitative Approach, 6th ed. (Cambridge: Morgan Kaufmann, 2017).

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Chapter 1Fundamentals of Quantitative Design and Analysis
Chapter 2Memory Hierarchy Design
Chapter 3Instruction-Level Parallelism and Its Exploitation
Chapter 4Data-Level Parallelism in Vector, SIMD, and GPU Architectures
Chapter 5Thread-Level Parallelism
Chapter 6Warehouse-Scale Computers
Chapter 7Domain-Specific Architectures
Chapter 8The Future of Computing
+ + Metrics + +

Address defined area

+ +

We defined a tape as having a single feature, that of a leftmost cell, along with a linear neighbor topology. When a tape is mounted it gains a second feature, that of the cell the head is on. The leftmost cell was fixed in place, while any other single cell on the tape can be featured as the cell the head is on. When we introduced areas, we picked up two new features, that of the leftmost cell of the area, and the rightmost cell of the area. Again, those features could coincide with the former features. We noted that the features partitioned a tape thus defining more areas, and more features. +

+ +

+ When cells were defined we noted that they were sets, and that these sets had identity and could be referred to. We needed that to be the case so as to build the tape topology using neighbor properties. Had the tape been singly linked, perhaps we could have used the cells to represent themselves in the properties, but when we doubly linked it, a given cell had to appear in two places, as the right neighbor of its left neighbor, and the left neighbor of its right neighbor, so we stipulated the sets as being identifiable. Initially we did not say how they would be identified. This is common in mathematics, but we soon cleared this up by formalizing the concept of a symbol. +

+ +

+ When discussing symbols we noted they could be natural numbers, and even went so far as to point out that addresses were symbols, though we had not yet defined them. They are familiar to anyone involved in computing, so again, it did not present a serious problem. Here we have now formalized them. +

+ +

+ 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 the section discussing area, 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 natural numbers, the address of the leftmost cell, and that of the rightmost cell. All natural 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. +

+ +

Distance and Extent

+ +

The distance between two cells is the absolute difference in their addresses. When we talk about the distance between the leftmost cell of an area and the rightmost cell of an area, we call this number the area's extent.

+ +

In an analogous manner to defining an address space for a tape, we can define an address space for an area. Accordingly, the leftmost cell of the area is assigned address zero, and the address increments cell by cell going to the right. A finite area will have a finite address space, with the address of the rightmost cell being the largest address in the address space. +

+ +

It is interesting that the extent of an area will be the same, whether it is calculated from the address space of the tape, or the address space of the area. When it is computed from the address space of the area, the extent will be identical to the largest address in the address space. We will use the Greek symbol omega, \\omega, to symbolize an extent. We can give it a subscript with the name of an area if the correspondence is not already clear. I chose \\omega makes sense here because \\omega is an inclusive bound, i.e. it is the rightmost letter included in the Greek alphabet. Thus it is the extent of the Greek alphabet. +

+ +

Length

+ +

If cells in an area are transacted, the cost of the area is the cost of a cell multiplied by the count of cells. Vincent Atanasoff probably found himself needing to know such a count when ordering capacitors. The count of cells in an area is also known as the area's length. We will use the Greek symbol Ï¡, pronounced as sampi, to refer to the length. The length of an area, the count of its cells, will always be one greater than its extent, Ï¡ = \\omega + 1. This symbol makes sense here, as the Greek number system fell short of letters, so the symbol Ï¡ was tacked on to the end of the alphabet, but did not belong to the alphabet. +

+ +

The count of cells in an area, the length of an area, and the cardinality of the address space for an area are all the same number, Ï¡. The extent of an area, \\omega, is an address in an area's address space, whereas the cardinality of an area, Ï¡, falls completely outside it. This has implications. Because extent is an address, extent and addresses can always use the same number representation. In contrast, there is no such guarantee for cardinality, Ï¡. Take for example an area that contains 256 cells. The addresses run from zero to 255, and all can be represented with an 8 bit binary number. However, the number 256 does not fit. It is for this reason that code will have fewer end case problems when expressing the size of objects with extents, rather than with lengths. +

+ +

Is the cardinality of an open on the right area a Natural Number?

+ +

So we find an interesting situation with the cardinality of an address space for an area that is open on the right. It goes like this.

+ +

How cardinality is computed

+ +
    +
  1. We set Turing Machine P with its head on the leftmost cell of an area. We mount the initial tape, '·', on the A machine.
  2. +
  3. 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.
  4. +
  5. 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.
  6. +
+ +

Lemma 1, the A machine produces Natural Numbers

+ +

This follows from its definition; it is literally the increment from the Natural Numbers Machine.

+ +

Lemma 2, cardinality is a natural number

+ +

Cardinality is produced by repeatedly calling the A machine, and the A machine produces Natural Numbers.

+ +

Lemma 3, cardinality is not in the address space

+ +

At the end of the second step in the procedure for producing the cardinality, the tape of the A machine held the extent of the address space. Then in step 3, A was called again, thus leaving a number one larger than the extent on its tape. The extent is the largest number in the address space, hence cardinality is larger than all numbers in the address space. Thus cardinality is not in the address space.

+ +

Lemma 4, the address space of an open on the right area is identical to the Natural Numbers.

+ +

Composing the A machine with an unterminated loop call, where each result is written to a tape with a terminator between entries, results in the same machine as the Natural Numbers Machine.

+ +

The apparent contradiction.

+ +

By Lemma 2, cardinality is a Natural Number. By Lemma 3 cardinality is not in the address space. By Lemma 4 the address space is identical to the Natural Numbers.

+ +

Resolution

+ +

The resolution lies in the computational reality of Step 2. For an area that is open on the right, the stepping of machine P never halts. Because Step 2 never terminates, Step 3 is never executed. The A machine never runs that final, additional time. Therefore, the cardinality of an open area is never actually produced by the machine. In the language of Computational Naturalism, Lemma 2 is false for an infinite area; the cardinality of an open on the right area is excluded from being a Natural Number because a Natural Number Machine cannot reach it in the first order.

+ +

So then can we add a property to cardinality, such that a second order analysis could use this property to continue downstream analysis? In short we could say that cardinality has no first order value, but it has a second order one. This is analogous to inventing a new type of number, a complex number with a second component. I.e., there is no 'real' solution, but there is an 'imaginary' one. Or analogous to error algebra, where a number value is replaced with a rule on how to handle downstream operations when it is given as an input. +

+ +

Such a value would be a new Turing Machine, one that composes a call to the never halting Natural Number machine followed by an increment operation. It cannot be run, but it perfectly explains the situation to an analyst. Perhaps we name this machine \\aleph_0. +

+ +

What if extent was used instead of cardinality?

+ +

+ Had extent been used instead of cardinality, we would lack the final increment step in the three step computing procedure. However, step 2 still cannot complete. Rather than a value, the result of the second order analysis would be a machine that produces ever larger Natural Numbers. We can call this machine \\aleph_{-1}. +

+ +

+ Now here is an interesting result: +

+ + + \\aleph_{0} - \\aleph_{-1} = 1 + + +

+ Neither machine can be run. However we can compose the two machines, then simplify the composition. When we do so, the ever larger Natural Number machines annihilate each other, and the increment machine remains. The increment machine can be run, so we end up with an output value. +

+ + +

Size

+ +

Consider the case of a partitioned tape. Then consider that we write a gasket, such that we have a higher level Turing Machine that considers each of the areas of the partition as a cell. So then, initially the Turing machine starts with its head on the leftmost area, stepping right steps to the right neighbor area etc. In this manner we abstract the concept of a cell to areas. A length then becomes a count of areas; however the size remains a count of the cells. Something similar is done in the C language, where the length of an array is a count of the elements in the array, but the size of the array is a count of bytes. A byte being an addressable unit in physical memory, and thus the underlying cell that everything is built up from.