From 4d4683a44c70e4d5a6d8bfd292b52e2333ff8f86 Mon Sep 17 00:00:00 2001
From: Thomas Walker Lynch Dear Zen master, here I submit my thesis for your consideration. All communication is founded upon common knowledge, so here are some notes on the conventions used in this book. All communication is founded upon common knowledge, so here are some notes on the style of English prose used in this book. Generally in this book, containers such as sequences and sets are capital letters, even when in Greek. Mathematical objects that are not containers are represented with lower case letters. Character pairs or full symbol names can also be used to represent mathematical objects. The context will make it clear if a non-letter unicode character is used to represent a container or a non-container.
+ The unicode middle dot, ·, is used as an ad hoc namespace operator in identifiers. Hence, , would be the variable from the namespace. This is a typography symbol. It can be seen for example when words are broken into symbols, e.g. 'op·er·a·tor', and sometimes in names, such a 'Leonardo da·Vinci', and 'Vincent van·Gogh'. It is accepted in identifiers by modern C compilers, and it is part of the RT·gcc compiler mods for gcc. Anyone familiar with my writing knows that I have experimented with gender forms in technical language for reasons of inclusion. For example, I used the plural-as-singular style in early writings and was applauded by some, though categorized as illiterate by others. Since then, I have evolved a writing style that emphasizes using roles as subjects: the mathematician, the author, the programmer. Such subjects are singular, so for grammatical agreement, I use the inclusive he. It is structurally much cleaner to use he as inclusive of all readers than it is to force "they" to take on a singular form. I strictly reserve "a person" for abstract generalizations where the subject is truly an unknown third party, including an AI. I have experimented with modern gender forms in technical language in past writings. For example, I used the plural-as-singular style in one piece, and was applauded by some, though categorized as illiterate by others. Since then, I have evolved a writing style that emphasizes using roles as subjects: the mathematician, the author, the programmer. Such subjects are singular, so for grammatical agreement, I use the inclusive he. It is structurally much cleaner to use he as inclusive of all people than it is to gray out an entire category of plural agreement pronouns by forcing words such as "they" to take on a singular form. I use "a person" when the subject is an unknown third party, potentially even being an AI. I prefer this over the 'one' of 'One does this, or one does that.' so that 'one' can be reserved to unambiguously refer to the natural number. In the prior edition of this book, the preface included a discussion on the meaning of the word "may" according to RFC 2119, the guidelines for specification writing. There is an important distinction between the 'may' of options or permission, and the 'may' of probability. However, distinguishing between the two was too much of an ask of readers, most of whom skip the preface anyway. So in this edition, I avoid the temptation to use 'may' and replace it with a direct statement of what I mean. "It is of high probability that..." or "There are options for...". Directly saying what is meantâwho would have thought of it? The RFC 2119 authors have clearly struggled with this as well, as they now require the words they discuss to be strictly capitalized to prove they have a proscribed meaning. In the prior edition of this book, the preface included a discussion on the meaning of the word "may" according to RFC 2119, the guidelines for specification writing. There is an important distinction between the 'may' of options or permission, and the more colloquial 'may' of probability. However, distinguishing between the two was too much of an ask of readers, most of whom skip the preface anyway. So in this edition, I avoid the temptation to use 'may' and replace it with a direct statement of what I mean. "It is of high probability that..." or "There are options for...". Directly saying what is meant, who would have thought of it? The RFC 2119 authors have apparently struggled with this as well, as they now require the MAY and other words that appear in RFC 2119 to be capitalized so as to dodge the grammar debate.
- 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 . Russell communicated this to Frege in a letter dated 1902 06 16, shortly before his second volume was going to print . Frege hurriedly authored an appendix (the Nachwort) admitting his system was compromised . + 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 . Russell communicated this to Frege in a letter dated 1902 06 16, shortly before his second volume was going to print . Frege hurriedly authored an appendix (the Nachwort) admitting his system was compromised .
@@ -74,11 +77,11 @@
- In 1931 Kurt Gödel published his incompleteness theorems . By mapping formal logic into arithmetic, he demonstrated that any consistent formal system sufficiently powerful to perform basic arithmetic, let us call it system , will inevitably contain well formed formulas that are mathematically true yet cannot be proven within the system itself . Gödel achieved this by engineering a specific formula that evaluates to the claim: ": There exists no sequence of valid logical steps within system that proves ." If system is consistent, it cannot output a proof for ; thus, the claim makes is factually accurate, rendering it true but mechanically unprovable. Furthermore, Gödel demonstrated that system 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 . If the full, powerful system 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 1931 Kurt Gödel published his incompleteness theorems . By mapping formal logic into arithmetic, he demonstrated that any consistent formal system sufficiently powerful to perform basic arithmetic, let us call it system , will inevitably contain well-formed formulas that are mathematically true yet cannot be proven within the system itself . Gödel achieved this by engineering a specific formula that evaluates to the claim: ": There exists no sequence of valid logical steps within system that proves ." If system is consistent, it cannot output a proof for ; thus, the claim makes is factually accurate, rendering it true but mechanically unprovable. Furthermore, Gödel demonstrated that system 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 . If the full, powerful system 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 . 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 . 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" . 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 . + In April 1936, Alonzo Church leveraged Gödel's foundational papers to directly answer the Entscheidungsproblem . 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 . 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" . 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 .
@@ -103,7 +106,7 @@- 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 . Emil Post independently defined "Finite Combinatory Processes" in 1936, outlining a theoretical architecture functionally identical to Turing's model . 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 . + 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 . Emil Post independently defined "Finite Combinatory Processes" in 1936, outlining a theoretical architecture functionally identical to Turing's model . 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 .
@@ -149,12 +152,12 @@ - +
- There are a number of discernible levels to the computer design abstraction stack: + These are the discernible levels of the computer design abstraction stack:
The classic text by Hamacher, Vranesic, and Zaky carefully defines the organizational level as sitting between architecture and implementation . - 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. is sometimes called , and it is made by a . + 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. is sometimes called , and it is made by a .
@@ -206,7 +209,7 @@
- The common understanding of the word 'architecture' is what Hamacher and Zaky call an . 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. + 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, is clearly a question of computer organization.
@@ -231,7 +234,7 @@
- When a transform applied to machine produces machine , and this latter machine gets the same results for the same computational inputs, and furthermore, if any computation theory analysis applied to yields the same answer as it would when applied to â we say that the transform is . Otherwise, the transformation is said to be . The remainder of this section defines these terms more precisely. + When a transform applied to machine produces machine , and this latter machine gets the same results for the same computational inputs, and furthermore, if any computation theory analysis applied to yields the same existence and big O results as it would when applied to , we say that the transform is . Otherwise, the transformation is said to be . The remainder of this section defines these terms more precisely.
Where the components have the following meanings:
+Each component of the Machine, , is defined as follows:
I have introduced the qualifier programmed in front of the finite state machine controller because each Turing Machine that accomplishes a different task has a different finite state machine controller. The rest of the Turing Machine remains fixed. Hence, when a mathematician defines a custom task controller, he is essentially programming the machine.
+I introduced the qualifier programmed in front of the finite state machine controller because each Turing Machine that accomplishes a different task has a different finite state machine controller. A is then a set of assignments to the variable parts of the Turing Machine definition. Notice that additional variables are needed by the Turing Machine executor beyond those that appear in the definition, such as the current state variable. In alternative terminology, the definition above defines a Turing Machine , and a set of assignments to the variable parts of the definition constitutes an . Accordingly, then, when a computer arithmetician says he has two Turing Machines, he is saying that he has two distinct sets of Turing Machine variable assignments, and as these sets are distinct, each can be manipulated independently.
-Here the input alphabet is said to be a subset of a larger alphabet. This allows some symbols to be set aside and only used by the machine. In the architecture description given below, those symbols exclusive to the larger set are called . Hopcroft and Ullman include the empty symbol as a control symbol. However, they have simultaneously listed it as a separate component.
+Here the input alphabet is said to be a subset of a larger alphabet. This allows some symbols to be set aside and only used by the machine. The symbols which are exclusive to the larger set are . symbols are distinguished by their use in describing the machine status rather than serving explicitly as input data. Hopcroft and Ullman include the empty symbol, â¡, as a control symbol. However, they have simultaneously listed it as a separate component.
-State transitions are gated by the read value from the tape. Each state transition function includes actions to be taken; hence, their programmable controller is a Mealy style state machine. The step action is mandatory, though it can be in either direction. The write action must be specified, but the write could be the same symbol that is read, making it effectively an optional action.
+State transitions are gated by the value read from the tape. Each state transition is bound to an actions to be taken; hence, this Turing Machine definition describes a Mealy style state machine. The step action can be in either direction, but taking a step is mandatory. The write action must be specified, but the written symbol can be the same symbol that is read, making it effectively an optional action.
-This machine makes use of a single ended tape. If a computation specifies a two way infinite tape, it can be emulated 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 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 a computation theoretic inconsequential variation of the two way tape machine. +
This machine makes use of a single ended tape. If a computation specifies a two way infinite tape, it can be emulated 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, and to wrap motion at the dividing cell, and is otherwise undetectable. The transformation has a small constant effect at the dividing cell, and otherwise multiplies the step count formula by two, which do not affect big O results. Hence, the single ended tape machine is a computation theoretic inconsequential variation of the two way tape machine.
Hopcroft and Ullman explain a step of the machine by showing a representation of the tape with the state variable melded in to the left of the currently scanned symbol. Suppose ; i.e., the next move is leftward. Then, @@ -526,7 +529,7 @@ -
This shows string reversal to be an complexity problem, which might appear to some to be a peculiar result, as the same problem can be solved in time with a C program. This justifies further analysis.
+This shows string reversal to be an complexity problem, which might appear to some programmers as a peculiar result, as the same problem can be solved in time with a C program. This justifies further analysis.
Reversing a string does not intrinsically require making decisions based on the values in the string that is being reversed; however, a Turing Machine must use the value under the head for the next state transitions. Also, the only memory a controller has is through adding control path branches, so to "carry the symbol right" requires a branch in the state controller per symbol to remember what the symbol is. Consequently, had the input alphabet been larger, this controller would have required proportionally more states, as noted on the diagram.
@@ -546,7 +549,7 @@ -These equations show that the state controller size explodes with word width. It would be impractical to implement for all but the smallest of word sizes. This is one of the reasons that computation theory books use modest-sized symbol alphabets in their examples, perhaps the first few letters of the Latin alphabet, or the letter 's' for unary arithmetic. Previous sections discussed challenges transitioning the Turing Machine to a real architecture due to the tape length, and how this could be mitigated. In contrast, there is no practical mediation for implementing a Turing Machine controller even for modest-sized real problems.
+These equations show that the state controller size explodes with word width. It would be impractical to implement for all but the smallest of word sizes. This is one of the reasons that computation theory books use modest-sized symbol alphabets in their examples, perhaps the first few letters of the Latin alphabet, or the letter 's' for unary arithmetic. Previous sections discussed challenges transitioning the Turing Machine to a real architecture due to the tape length, and discussed how this could be mitigated. In contrast, there is no practical mediation for implementing a Turing Machine controller even for modest-sized real problems.
This raises a question: if the Turing machine is to instruct upon the limitations of real computation, what are the implications stemming from its state controller being impractical? As one such implication, when a Turing Machine proof shows that a number is computable, it doesn't necessarily instruct upon how it could be computed. When a reader picks up a text on applied number theory, also called computer arithmetic, he is unlikely to find a chapter on Turing Machines.
@@ -561,7 +564,7 @@Now imagine machine B, where the concept of an empty cell is jettisoned, and what remains is the mere memory of emptiness, a symbol called . Then using the language of mathematics, the mathematician defines an initial empty tape as:
@@ -599,7 +602,7 @@It is possible to build a mapping between the machine A and machine B. The read and write operations are placed into correspondence. The empty set as a member of tape sequence of machine A is placed into correspondence with the symbol of machine B. The other components are defined identically, and map directly. This creates an isomorphism between the two machines. Hence, they are equally expressive. However, machine B is simpler, so it is understandable that computer theoreticians have settled on this definition.
-If we view the symbol from within the definition of machine B, it is a category error. It is a sequence element not a container. Even if it were allowed that a position within a sequence were a container and thus could have the property of being empty, the symbol represents that there is no symbol in the very location it is found. Hence, to ascribe an appropriate meaning to the symbol, the entire system must be kept including the mapping to machine A, then the empty symbol found on machine B means that if machine A were used instead, the same location in the tape sequence would be an empty set. However, this feels unsatisfactory, because in all other respects, machine B is a perfectly well defined Turing Machine all by itself.
+If we view the symbol from within the definition of machine B, it is a category error. It is a sequence element rather than a container. Even if it were allowed that a position within a sequence were a container and thus could have the property of being empty, the symbol represents that there is no symbol in the very location it is found. Hence, to ascribe an appropriate meaning to the symbol, the entire system must be kept including the mapping to machine A, then the empty symbol found on machine B means that if machine A were used instead, the same location in the tape sequence would be an empty set. However, this feels unsatisfactory, because in all other respects, machine B is a perfectly well defined Turing Machine all by itself.
Going back to Turing's moniker of does limit the focus solely to machine B, because the original paper by Turing states the definition of meaning "no symbol", as was already discussed. Calling it is merely the same name colored by the engineering of wood pulp. However, there is a pleasing property of the blank, i.e. the symbol, that is valuable and unique to it. It prints as a space in diagrams given in text books and in the output of Turing Machine simulators. There is an analogous symbolic system that also has this characteristic, and is being leveraged in these situations: the ASCII hex 20, called SP. It prints as a space leaving an area of the paper it is printed on blank. Perhaps a better name for the ersatz symbol is .
@@ -621,9 +624,9 @@ -This chapter presents a modified computation theoretic Turing Machine with three structural additions. First, it separates control flow from data flow, ensuring that payload symbols do not needlessly expand the control state machine. Second, it unifies the control and data symbol sets into a single alphabet to natively support explicit communications protocols even in the presence of recursion and self-recursion. Finally, it implements a cascading next-state evaluation hierarchy, permitting the programmer to formally define and handle meta-symbols such as , while also making it more convenient to code communication protocols.
+This chapter presents a modified computation theoretic Turing Machine with three structural additions. First, it separates control flow from data flow, ensuring that payload symbols do not needlessly expand the control state machine. Second, it unifies the control and data symbol sets into a single alphabet to natively support explicit communications protocols even in the presence of recursion and self-recursion. Finally, it implements a cascading next-state evaluation hierarchy, permitting the programmer to formally define and handle meta-symbols while also making it more convenient to program communication protocols.
-In the first edition of this book, I introduced a "read only after write" rule while working towards an architectural Turing Machine because conventional computer architectures do not maintain a concept of empty memory. The approach described in this section integrates the "read only after write" into a computation theoretic machine by designing in the concept of being unspecified, which then displaces the concept of a cell being empty.
@@ -631,11 +634,11 @@While using the standard library to write tapes, the uninitialized part of the tape could not be read until after it was written, so early tape machines indeed enforced the "read only after write" rule. However, if the programmer were to seek the head back into the device file to do fresh work and perform reads and writes, the device EOF would be nowhere in sight. The burden of the "read only after write" rule would then fall on the shoulders of the programmer, as would the task of structuring the data.
-Core memory, and later system memory, was random access and initially fully accessible. The data would be whatever scrambled mess the machine booted with, or in early virtual memory systems, whatever was left over from the prior use of the page. The approach of recycling pages was a security hazard, so today a page is initially allocated from a read-only zero page, and due to a copy-on-write trap, a new page will be created in memory then the original page copied to it, thus scrubbing it with zeros. For pointers the zero pointer is an a sense an empty symbol, and an attempt to dereference it will cause a fault. However, on real machines, there are many integer values used, and these can also be zero. Thus the zeros of the new page are not identical to saying the page contains all empty symbols. In this system, the programmer is again burdened with maintaining the "read only after write" rule. Compilers and interpreters will attempt to help with this by throwing errors upon the use of uninitialized data that they detect.
+Core memory, and later system memory, was random access and initially fully accessible. The data would be whatever scrambled mess the machine booted with, or in early virtual memory systems, whatever was left over from the prior use of the page. The approach of recycling pages was a security hazard, so today a page is initially allocated from a read-only zero page, and due to a copy-on-write trap, a new page will be created in memory then the original page copied to it, thus scrubbing it with zeros. The zero pointer is in a sense an empty symbol, as an attempt to dereference it will cause a fault. However, on real machines, there are many integer values used, and these can also be zero. Thus the zeros of the new page are not identical to saying the page contains all empty symbols. In this system, the programmer is again burdened with maintaining the "read only after write" rule. Compilers and interpreters often help with this by attempting to detecting the use of uninitialized data and throwing an error.
A violation of "read only after write" could be detected by a modified computation theoretic Turing Machine if, instead of an empty symbol, the initial tape is filled with the symbol. The end objective is to detect an erroneous condition, which is useful for debugging and testing. Conventionally, mathematicians do not concern themselves with the test and debug phases of programming a Turing Machine, but rather concern themselves with answering computation theoretic questions about known working Turing Machine programs. Though perhaps an algorithm could be studied for this very quality of not ever making decisions based on unspecified data. Nor do real machines have an symbol; rather, a program reads garbage from memory locations with unspecified data. There is precedent for an , unknown, logic state in hardware simulators.
-Like the symbol, is a meta-symbol. It describes the data, or lack thereof, rather than being the data. Specifically, the symbol says that another machine, a machine A, would have a singular alphabet symbol at the memory location, but our machine B is not being instructed as to which symbol it is. Because the Turing Machine state transition function requires a specific symbol value, reading an symbol would break the machine. Of course, that would be a bad thing, so some sort of modification to the Turing Machine definition is required for working with an symbol.
+Like the symbol, is a meta-symbol. It describes the data, or lack thereof, rather than being the data. Specifically, the symbol says that another machine, a machine A, would have a singular alphabet symbol at the memory location, but our machine B is not being informed as to which symbol it is. Because the Turing Machine state transition function requires a specific symbol value, reading an symbol, and then using it to make a decision as though it were a concrete symbol, would be an error, unless that control path was for the very purpose of detecting this error.
Reasons that memory can be include:
An example of effectively unspecified data would be a program that reverses a string without looking at the values being reversed. A string reverse function need not inspect the value of the string; it only needs to recognize the structural boundaries established by the writing protocol. Yet the conventional Turing Machine is incapable of doing this, and worse, as we saw, there is a proportional increase in the number of states for the reverse string controller when the number of symbols, symbols that could have been ignored for control purposes, is expanded.
+An example of effectively unspecified data would be a program that reverses a string without looking at the values being reversed. A string reverse function need not inspect the value of the string; it only needs to recognize the structural boundaries established by the writing protocol. Yet the conventional Turing Machine is incapable of doing this, and worse, as we saw, there is an explosion in the number of states for the reverse string controller against word length.
Recall the suggestion earlier in this section that "perhaps an algorithm could be studied for this very quality of not ever making decisions based on unspecified data." In this capacity, the symbol functions as a . Such an analysis can be done with a two-layer architecture: a first-order machine under study and a second-order machine performing the analysis. The symbol resides within the alphabet of the second-order machine, which possesses the authority not only to move the symbol but also to base logic upon it. However, demoting the marker from a meta-symbol to a standard decision symbol leaves the second-order machine without a meta-symbol of its own. In a strictly layered architecture, analogous to Russell and Whitehead's hierarchy of types, a programmer could define , , and so forth, explicitly embedding the order as a unique identifier. However, if the system lacks this strict stratification, the layering strategy collapses. This occurs when a statement operates as an independent island of meaning, analogous to Gödel's unprovable truths, or when an analyzer is tasked with evaluating itself, as in Turing's halting proof. Therefore, whether an meta-symbol can be deployed successfully depends entirely upon the structural boundaries of the specific system under test.
@@ -656,30 +659,34 @@Here the subscript is a device used to emphasize that and can be any members of the total set of states, . State refers specifically to the initial state. Also note, later the spartan will be used to denote the contents of the , the current state register.
+ +The Hopcroft and Ullman machine definition specified a next state function, . Here we instead use next state tables that cascade, and as tables are containers, we denote these using a capital letter as , , , and . +
The new machine evaluates next-state transitions through these four layers, in order, progressing to the next layer only when no transition is found in the prior layer:
Programmers will typically use the Global Default arc, , to take the machine to an error state when they have mistakenly left the next state transition undefined. However, it is conceivable for some machines that if no other next state is defined, there is a single logical state that should be visited, and this condition is not an error. If no Global Default arc is specified, and no next state is found, the machine hangs.
-This approach of cascading next-state decisions does more than merely make the machine more convenient to program; it also enables a programmer to support an symbol. For example, a programmer can incorporate a first-order symbol by first adding it to the alphabet , adding a state to , and then adding a status default arc to of . Finally, the programmer adds to the set of halting states. Then, if the machine attempts to make a decision upon the symbol, the machine will transition to the state and halt. Such a machine can then be analyzed to see if it ever visits the state, although the analyst must take care, because if he puts some thought into this, he will realize that no such universal analyzer can exist.
+This approach of cascading next-state decisions does more than merely make the machine more convenient to program; it also enables a programmer to support an symbol. For example, a programmer can incorporate a first-order symbol by first adding it to the alphabet , adding a state to , and then adding a status default arc to of . Finally, the programmer adds to the set of halting states. Then, if the machine attempts to make a decision upon the symbol, the machine will transition to the state and halt. Such a machine can then be analyzed to see if it ever visits the state, although the analyst must take care, because if he puts some thought into this, he will realize that no such universal analyzer can exist.
The formal definition that follows will be partitioned according to the separation of concerns. The first section defines the fixed parts of the Turing Machine definition. The second section defines the memory elements (variables). The third section describes the programmable components, which vary between specific Turing Machines depending on their purposes.
@@ -689,23 +696,23 @@In the following, the middle dot acts as a namespace operator, . By doing this we assure there will be no aliasing with the symbols provided by the programmer when he defines a programmed state controller.
+In the following, the middle dot acts as a namespace operator, . By doing this we assure there will be no aliasing with the symbols provided by the programmer when he defines a programmed state controller.
The set of predefined states:
The state controller always starts in the state. This is a symbol representing the state; it is not a register that holds a state. The 'F' values are all fixed.
-The programmer cannot add actions to the machine definition, so there are only fixed actions:
+The programmer cannot add actions to the machine definition, so there are no aliasing issues here:
The reverse string machine spends a lot of time shuttling the head between two context areas. One context area for the original string, and one for the resulting reversed string. This suggests that a two head version would be faster. The following is the two head state machine definition:
+The reverse string machine spends a lot of time shuttling the head between two context areas: one for the original string, and one for the resulting reversed string. This suggests that a two-head version would be faster. The following is the two-head state machine definition:
- The number of states has dropped from 24 to 17, while the speed increase is dramatic, with the former quadratic performance becoming linear performance. The total number of steps for reversing an
The number of states has dropped from 24 to 18, while the speed increase is dramatic, with the former quadratic performance becoming linear performance. The total number of steps for reversing an
This machine has a single tape with two heads marking two separate context areas. Because the areas do not overlap, this situation is indistinguishable from the case of the machine having two separate tapes, each with its own head. Hartmanis and Stearns established the original proof that simulating a Turing Machine with multiple tapes, each with its own head, on a single-tape single-head machine incurs a quadratic time penalty
This machine has a single tape with two heads marking two separate context areas. Because the areas do not overlap, this situation is indistinguishable from the case of the machine having two separate tapes, each with its own head. Hartmanis and Stearns established the original proof that simulating a Turing Machine with multiple tapes, each with its own head, on a single-tape, single-head machine incurs a quadratic time penalty
The time complexity of the longest compute time input of length
Adding heads is not a general method for improving performance complexity. A quadratic performance improvement does not always occur and when it does it is not strong enough to change the asymptotic performance if there are higher-order terms in a step count polynomial. Furthermore, eliminating shuttling will never reduce a linear step count to a constant time step count; the simple reason is that
Adding heads functions as a specialized optimization rather than a universal method for improving performance complexity. Quadratic performance improvements manifest only under specific conditions. Even when they occur, the improvement remains insufficiently strong to alter the asymptotic performance if higher-order terms exist in the step-count polynomial. Furthermore, eliminating shuttling is structurally incapable of reducing a linear step count to a constant-time step count; the reason is that
- The prior chapter on the computation theoretic TTCA machine serves as the architectural template, with only a few modifications. The architecture has no 'unspecified' symbol. Rather, an actual value is transacted. Now that data and control have been separated, the controller is practical to implement, and even more so because it was defined in terms of tables that can be built in hardware. As the status command returns the cell type, it will in its current form be able to return 'rightmost', so the right end of the tape can be detected. In order to extend the tape, the machine will stop and ask the operator to mount a new reel. This could be signaled when the user attempts to step right of rightmost, either by a panel light that illuminates upon the machine finding a rightmost status, or by the program printing a message on the console teletype. As this is a constant time operation, it is computation theoretic inconsequential.
+The prior chapter on the computation theoretic TTCA machine serves as the architectural template, with only a few modifications. The architecture requires explicit data rather than accepting meta-symbols like 'unspecified' as presumed initial values 'by definition'. Actual values are transacted. Now that data and control have been separated, the controller is practical to implement, and even more so because it was defined in terms of tables that can be built in hardware. As the status command returns the cell type, it will in its current form be able to return 'rightmost', so the right end of the tape can be detected. In order to extend the tape, the machine will stop and ask the operator to mount a new reel. This could be signaled when the user attempts to step right of rightmost, either by a panel light that illuminates upon the machine finding a rightmost status, or by the program printing a message on the console teletype. As this is a constant-time operation, it is computation theoretic inconsequential.
Because a Turing Machine can only reach another cell further out on the tape by stepping to it, space complexity and time complexity are related. A program that runs for ten steps can consume at most ten cells of tape. However, if that program merely bounces between two cells, it will require less space, precisely two cells. As another example, a program that counts the number of characters on its input tape using Arabic notation will execute in asymptotically linear time, as demonstrated later in the section analyzing the increment operation. Its working footprint, however, will be logarithmic in space complexity, because that is how fast an Arabic representation grows with a count.
-If a program executed at the speed of a human operator, the operator would likely abandon the process before it finished. This highlights a necessary attribute of good software:
If a program executed at the speed of a human operator, the operator would likely abandon the process before it finished. This highlights a necessary attribute of good software:
The same can be said for space complexity. Suppose a program doubled its memory footprint each time its input string increased by one. If an individual proton could hold one bit of memory, say via its spin, an input increase of merely 270 characters for such a program would exhaust all the protons in the universe. Allocating a cell of space requires the machine to take a step, so time complexity is at least equal to space complexity. If a computer ran at 10 GHz and a step required
This book provides the transformational steps needed to go from the Turing Machine to real machines, and one objective is to recover some correspondence between the machine steps of the model and the wall-clock time the machine takes to run. Given this, the system operator changing tapes creates a step that is disproportionately longer than the other steps, a factor that requires architectural mediation, but will always remain. For example, this structural penalty resurfaces in the form of cache misses causing a machine to reach into system memory, or worse, page faults, requiring a machine to go back to disk. -
+This book provides the transformational steps needed to go from the Turing Machine to real machines, and one objective is to recover some correspondence between the machine steps of the model and the wall-clock time the machine takes to run. Given this, the system operator changing tapes creates a step that is disproportionately longer than the other steps, a factor that requires architectural mediation, but will always remain. For example, this structural penalty resurfaces in the form of cache misses causing a machine to reach into system memory, or worse, page faults, requiring a machine to go back to disk.
-As a possible practical solution, note that if the program does not exhaust the current tape, the operator will never be called. How much tape is required to ensure this? An analyst could choose worst-case operands and measure the footprint when the program runs. At first, this appears to be the familiar 'my number is bigger than your number, I'll tell you mine after you tell me yours' game, which can be viewed as the definition for the countable infinity. However, there is a loophole. Running the system once with the worst-case operands to establish time and space ceilings guarantees the program can be allocated sufficient resources later for other operands. This is a practical approach, provided the program is a workhorse utility rather than an algorithm searching for a solution to an unsolved problem, so it only needs to run once.
+As a possible practical solution, note that if the program does not exhaust the current tape, the operator will never be called. How much tape is required to ensure this? An analyst could choose worst-case operands and measure the footprint when the program runs. At first, this appears to be the familiar 'my number is bigger than your number, I'll tell you mine after you tell me yours' game, which can be viewed as the definition for the countable infinity. However, there is a loophole. Running the system once with the worst-case operands to establish time and space ceilings guarantees the program can be allocated sufficient resources later for other operands. This is a practical approach, provided the program is a workhorse utility rather than an algorithm searching for a solution to an unsolved problem, and thus only needs to be run once.
-Another practical solution, one that also applies to the first run of the program, is to analyze the logic to compute the time per step and extrapolate the total execution time. This is not universally possible; for some programs, tracing a path through the execution logic is as computationally complex as running the program itself, taking us back to the analysis in the prior paragraph. However, this phenomena does not apply to all programs. Consider the previously mentioned examples of the ten step machine, the machine bouncing between two cells, and the Arabic counting machine.
+Another practical solution, one that also applies to the first run of the program, is to analyze the logic to compute the time per step and extrapolate the total execution time. This is structurally viable only for specific programs; for others, tracing a path through the execution logic is as computationally complex as running the program itself, taking us back to the analysis in the prior paragraph. However, this phenomenon restricts itself to specific programmatic classes. Consider the previously mentioned examples of the ten step machine, the machine bouncing between two cells, and the Arabic counting machine. All of those programs can be, indeed were, analyzed before they were run.
-Suppose a controller is not analyzed to determine its computation theoretic complexity, or even tested against worst-case inputs, but is instead run with random or everyday input to gather performance measurements. This process is called
Suppose a controller is not analyzed to determine its computation theoretic complexity, or even tested against worst-case inputs, but is instead run with random or everyday input to gather performance measurements. This process is called
An
On this model of machine, the
A computation theoretic Turing Machine would never encounter a status of
For a realized
Because values can only be read or written to a tape when the tape is in motion, it is advantageous to exaggerate the motion of step commands and to cache a small number of values. In addition, most architectures that make use of a tape drive will attempt to leverage high throughput in an effort to hide high latency by reading or writing blocks of symbols per tape access. Note though, the basic TTCA machine organization lacks the core memory required for buffering blocks.
+ +Because values can only be read or written to a tape when the tape is in motion, it is advantageous to exaggerate the motion of step commands and to cache a small number of values. In addition, most architectures that make use of a tape drive will attempt to leverage high throughput in an effort to hide high latency by reading or writing blocks of symbols per tape access. Note, however, that the basic TTCA Machine organization lacks the core memory required for buffering blocks.
The
For the first three commands, the head argument multiplexes the command to the specified head. If the
The head argument multiplexes the command to the specified head. If the
The controller is programmed via patch panels. The panels would look something like what is shown in the following ASCII art blocks. Note that
The controller is programmed via patch panels. The panels would look something like what is shown in the following ASCII art blocks. Note that
[ CONTROL PANEL ]
@@ -1329,68 +1351,65 @@
- [ State Transition Table ]
- +-----------------------------------+
- current state | S0 S1 S2 S3 S4 S5 |
- indicator lights | â â â â â â |
- halting toggles | [/] [/] [/] [/] [/] [/] |
- +-----------------------------------+
- â g0 (Sym 0) | ( ) ( ) ( ) ( ) ( ) ( ) |
- â g1 (Sym 1) | ( ) ( ) ( ) ( ) ( ) ( ) |
- â g2 (Sym 2) | ( ) ( ) ( ) ( ) ( ) ( ) |
- â g3 (Sym 3) | ( ) ( ) ( ) ( ) ( ) ( ) |
- â g4 (Sym 4) | ( ) ( ) ( ) ( ) ( ) ( ) |
- | |
- destination state | ( ) ( ) ( ) ( ) ( ) ( ) |
- | ( ) ( ) ( ) ( ) ( ) ( ) |
- | ( ) ( ) ( ) ( ) ( ) ( ) |
- | |
- default transition| ( ) ( ) ( ) ( ) ( ) ( ) |
- global transition | ( ) |
- +-----------------------------------+
+ [ State Transition Table ]
+ +-------------------------------------------+
+ current state | def q0 q1 q2 q3 q4 q5 |
+ | â â â â â â |
+ halt | [/] [/] [/] [/] [/] [/] |
+ +-------------------------------------------+
+ def | ( ) ( ) ( ) ( ) ( ) ( ) ( ) |
+ â s0 | ( ) ( ) ( ) ( ) ( ) ( ) ( ) |
+ â s1 | ( ) ( ) ( ) ( ) ( ) ( ) ( ) |
+ â s2 | ( ) ( ) ( ) ( ) ( ) ( ) ( ) |
+ â s3 | ( ) ( ) ( ) ( ) ( ) ( ) ( ) |
+ â s4 | ( ) ( ) ( ) ( ) ( ) ( ) ( ) |
+ | |
+ destination state | ( ) ( ) ( ) ( ) ( ) ( ) |
+ +-------------------------------------------+
[ Action ]
- +-----------------------------------+
- | S0 S1 S2 S3 S4 S5 |
- Src | ( ) ( ) ( ) ( ) ( ) ( ) |
- +-----------------------------------+
- right | ( ) ( ) ( ) ( ) ( ) ( ) |
- left | ( ) ( ) ( ) ( ) ( ) ( ) |
- read_g | ( ) ( ) ( ) ( ) ( ) ( ) |
- read_d | ( ) ( ) ( ) ( ) ( ) ( ) |
- write_g | ( ) ( ) ( ) ( ) ( ) ( ) |
- write_d | ( ) ( ) ( ) ( ) ( ) ( ) |
- write_Ï | ( ) ( ) ( ) ( ) ( ) ( ) |
- +-----------------------------------+
+ +-----------------------------------+
+ | q0 q1 q2 q3 q4 q5 |
+ Src | ( ) ( ) ( ) ( ) ( ) ( ) |
+ +-----------------------------------+
+ right | ( ) ( ) ( ) ( ) ( ) ( ) |
+ left | ( ) ( ) ( ) ( ) ( ) ( ) |
+ read('s') | ( ) ( ) ( ) ( ) ( ) ( ) |
+ read('d') | ( ) ( ) ( ) ( ) ( ) ( ) |
+ write('s')| ( ) ( ) ( ) ( ) ( ) ( ) |
+ write('d')| ( ) ( ) ( ) ( ) ( ) ( ) |
+ write('Ï')| ( ) ( ) ( ) ( ) ( ) ( ) |
+ +-----------------------------------+
- [ Sigma Select for write_Ï ]
- +-----------------------------------+
- | S0 S1 S2 S3 S4 S5 |
- Src | ( ) ( ) ( ) ( ) ( ) ( ) |
- +-----------------------------------+
- g0 (Sym 0) | ( ) ( ) ( ) ( ) ( ) ( ) |
- g1 (Sym 1) | ( ) ( ) ( ) ( ) ( ) ( ) |
- g2 (Sym 2) | ( ) ( ) ( ) ( ) ( ) ( ) |
- g3 (Sym 3) | ( ) ( ) ( ) ( ) ( ) ( ) |
- g4 (Sym 4) | ( ) ( ) ( ) ( ) ( ) ( ) |
- +-----------------------------------+
+ [ Sigma Select for write('Ï') ]
+ +-----------------------------------+
+ | q0 q1 q2 q3 q4 q5 |
+ Src | ( ) ( ) ( ) ( ) ( ) ( ) |
+ +-----------------------------------+
+ s0 | ( ) ( ) ( ) ( ) ( ) ( ) |
+ s1 | ( ) ( ) ( ) ( ) ( ) ( ) |
+ s2 | ( ) ( ) ( ) ( ) ( ) ( ) |
+ s3 | ( ) ( ) ( ) ( ) ( ) ( ) |
+ s4 | ( ) ( ) ( ) ( ) ( ) ( ) |
+ +-----------------------------------+
- The top section has two toggle switches. One turns the machine on, and the other selects run or single-step mode. Immediately to the right of the two toggles are indicator lights. To the right of the indicator lights are two push buttons. One is for reset, which sends the machine back to state
The top section has two toggle switches. One turns the machine on, and the other selects run or single-step mode. Immediately to the right of the two toggles are indicator lights. To the right of the indicator lights are two push buttons. One is for reset, which sends the machine back to state
The second section is the state transition panel. At the top of this panel are the state indicator lights and a row of halting toggles; if flipped closed, the corresponding state becomes a halting state. Below this is the transition condition matrix, consisting of holes that fit the banana plug ends of a patch cord. Each column corresponds to a current state, and each row corresponds to a gate symbol.
+The second section is the state transition panel. At the top of this panel are the state indicator lights and a row of halting toggles; if flipped closed, the corresponding state becomes a halting state. Below this is the transition condition matrix, consisting of holes that fit the banana plug ends of a patch cord. Each column corresponds to a current state, and each row corresponds to a status symbol.
-Below the transition condition matrix is the destination state panel. All three rows of this panel are functionally identical; they merely provide physical space so multiple patch cords can be plugged into a single state column.
+The transition condition matrix integrates the default fallback logic structurally. The
Below the destination state panel are the default state transition panels. There is one for the state default transition, and one for the global default transition, as described by the computation theoretic TTCA machine.
+Below the transition condition matrix is the destination state row. If the fan-in for a state requires multiple patch cords, a special banana plug adapter can be used, or the patch cords themselves can feature stackable sockets on the back of the plugs, allowing multiple incoming transitions to bridge into a single destination hole.
-To program the controller, the programmer connects the patch cords. For example, routing a patch cord from the
To program the controller, the programmer connects the patch cords. For example, routing a patch cord from the
Below the transition panel are the action selection and symbol selection panels. To enforce the rule that each state executes exactly one action, each state column on the action panel features a single source hole at the top. The programmer routes a patch cord from this source hole down to the desired action row. If the selected action requires a symbol argument, such as
Below the transition panel are the action selection and symbol selection panels. To enforce the rule that each state executes exactly one action, each state column on the action panel features a single source hole at the top. The programmer routes a patch cord from this source hole down to the desired action row. If the selected action requires a symbol argument, such as
This section describes the TTCA machine organization. The diagram above shows the major components and their channels of communications. This instructs designers who will later draft schematics that will specify all of the connections.
+Components
This section describes the TTCA machine organization. The diagram above shows the major components and their channels of communications. This instructs designers who will later draft schematics that will specify all of the connections.
-As described in the computation theoretic section that is being used as the architectural template, "Computation theoretic TTCA Machine executor", the executor guides the machine through initialization, programmed control, and halting stages of execution. When in the programmed control stage, the
The
The symbols of the alphabet are enumerated such that each symbol corresponds to a specific row index on the control panel. The value on of the
The current state register
Upon reset, the current state register initializes to a one-hot configuration with the bit for state
Upon reset, the current state register initializes to a one-hot configuration with the bit for state
This design assumes that releasing the reset line causes the machine to begin execution immediately. While adequate for our baseline model, a deluxe variant would integrate a dedicated 'go' button and associated transition logic. @@ -1727,7 +1746,7 @@
- Mathematically, a Turing Machine tape is a specialized path graph. The neighbor properties are the edges. In this special form, properties are attached to the edges. A Turing Machine has a clock based state controller. Taking a step is an atomic operation. The machine is either in state
An example of a non-Turing tape like model is the Emacs vertical line cursor model, where a cursor is said to be between characters. An ASCII file offers no such feature as 'in between' characters. Like a Turing Machine tape, a medial character in an ASCII file has a left neighbor and a right neighbor character. Any attempt to represent an in between cursor within the file itself would require inserting more characters into the file under the same model of every medial character having a left and a right character. Consequently, though emacs presents a model where cursor is located in between two characters, this model is only due to the interpretation of the functions' actual effects presented to users in the documentation. For example, instead of saying a cursor is located upon a character, and that inserting a character inserts the character to the right of the given character, the manual gives the description that the new character is inserted at the cursor location, where said cursor is in between the given character and its right neighbor. Thus the documentation presents the user with one model, which by necessity of using standard library calls to work with files, is built upon another model.
@@ -2035,7 +2054,7 @@
- The divide machine cannot be run to produce a value, as any value from the field assigned to it would lead to contradictions. Stated more precisely, for
To find the average cost per increment to reach each maximum, an analyst divides by the total number of increments, which is
- 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. + 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.
@@ -2972,10 +2991,10 @@ 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.
-- 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. + 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.
@@ -2983,7 +3002,7 @@
- In contrast,