<li><RT·math>Q</RT·math>: The finite set of <em>states</em> of the programmed finite state machine controller.</li>
<li><RT·math>Σ</RT·math>: The finite set of <em>input symbols</em>.</li>
<li><RT·math>Γ</RT·math>: The complete set of <em>tape symbols</em>; <RT·math>Σ</RT·math> is always a subset of <RT·math>Γ</RT·math>.</li>
- <li><RT·math>□</RT·math>: The <em>empty</em> symbol. This symbol belongs exclusively to <RT·math>Γ</RT·math>, serving as a distinct tape marker rather than an input symbol. The empty symbol initially populates all cells except the finite number containing the input symbols.</li>
+ <li><RT·math>□</RT·math>: The <RT·code>empty</RT·code> symbol. This symbol belongs exclusively to <RT·math>Γ</RT·math>, serving as a distinct tape marker rather than an input symbol. The empty symbol initially populates all cells except the finite number containing the input symbols.</li>
<li><RT·math>δ</RT·math>: The next state function. The arguments of <RT·math>δ(q, X)</RT·math> are a state <RT·math>q</RT·math> and a tape symbol <RT·math>X</RT·math>. The value of <RT·math>δ(q, X)</RT·math>, if it is defined, is a triple <RT·math>(p, Y, D)</RT·math>, where:
<ol>
<li><RT·math>p</RT·math> is the next state in <RT·math>Q</RT·math>.</li>
<p>Although by definition each state transition matches one value under the head, as a practical matter, disjunctive selection is allowed via a comma list. A conjunctive phrasing for the state transition proposition would require stringing intermediate states in series.</p>
-<h2>Blank, empty, SP</h2>
+ <h2>Blank, empty, SP</h2>
<p>Turing described a clerk writing symbols into squares, with the option to erase them. He states, "In some of the configurations in which the scanned square is blank (i.e. bears no symbol) the machine writes down a new symbol on the scanned square: in other configurations it erases the scanned symbol."<RT·endnote>Alan M. Turing, "On Computable Numbers, with an Application to the Entscheidungsproblem," Proceedings of the London Mathematical Society, Series 2, Volume 42 (1936): 231.</RT·endnote> So initially Turing's original article uses <em>blank</em> to mean <em>no symbol</em>. However, later Turing says, "We also give numbers to the symbols ... in particular, blank = S₀ ." <RT·endnote>ibid: 239.</RT·endnote>.</p>
<p>Each tape member set is called a <RT·term>cell</RT·term>. So an empty tape has all empty cells.</p>
- <p>An empty sequence container is one that has zero length, so this definition for an empty tape is custom to Turing Machine tapes. An empty tape is not an empty sequence, rather it is an infinite sequence where every member is an empty set. In one sense this is a little peculiar that something said to be empty is infinite, in another sense it makes sense that an empty Turing Machine tape keeps its defining characteristics. That is, it remains a single ended Turing Machine tape, where any cell of the tape could be written with a symbol value, while the basic form of the tape will not change.</p>
+ <p>An empty sequence container is one that has zero length, so this definition for an empty tape is custom to Turing Machine tapes. An empty tape is not an empty sequence, rather it is an infinite sequence where every member is an empty set. In one sense this is a little peculiar that something said to be empty is infinite, in another sense it is consistent for the model that an empty Turing Machine tape keeps its defining characteristics. That is, it remains a single ended Turing Machine tape, where any cell of the tape could be written with a symbol value, while the basic form of the tape will not change.</p>
<p>A conventionally defined Turing Machine will break if reading a cell does not yield a symbol, because the next state function has the read symbol as an argument.</p>
<p>So we might imagine a tape machine, say called machine A, where, upon attempting to read an empty cell, the machine head instead returns a control symbol representing that the cell was empty. To accomplish this, the head would have to do some work; it would have to be able to detect emptiness, and then choose to return the empty symbol instead of a read value. This feature would fix the problem of not having any defined next state behavior for an empty cell. Furthermore, suppose the inverse process is also special in that upon attempting to write the empty symbol, the machine takes action, emptying the cell out. This would facilitate an erase operation.</p>
<RT·code>
- def read(c)
+ def read(c):
if is_empty(c):
return 'empty'
else:
<div style="margin-left: 2em;">
<RT·math>
- T_0 = \[ mathtt{empty}, mathtt{empty}, mathtt{empty}, \ldots \]
+ T_0 = [ \mathtt{empty}, \mathtt{empty}, \mathtt{empty}, \ldots ]
</RT·math>
</div>
- <p>For machine B, no modifications are required to the direct sequence read and write functions.</p>
+ <p>For machine B, no modifications are required to the native <RT·code>read</RT·code> and <RT·code>write</RT·code> functions.</p>
- <p>It is possible to build a mapping between the machine A and machine B approaches. 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 <RT·code>empty</RT·code> 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.</p>
+ <p>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 <RT·code>empty</RT·code> 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.</p>
- <p>If we view the <RT·math>empty</RT·math> symbol from within the definition of machine B, we have a paradox. A symbol represents that there is no symbol. Hence, if we are to keep the meaning of <RT·math>empty</RT·math> as that of no symbol, we must keep machine A, and the mapping. The empty symbol is named because in the isomorphism with machine A it corresponds to an empty set. However, this feels unsatisfactory, because in all other respects, machine B is a perfectly well defined Turing Machine, so in all other respects we do not need machine A.</p>
+ <p>If we view the <RT·code>empty</RT·code> 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 <RT·code>empty</RT·code> 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.</p>
- <p>Going back to Turing's moniker of <RT·code>blank</RT·code>, does not really help get rid of machine A because the original paper by Turing has it with the definition of "no symbol", it is merely the same name colored by the science of wood pulp. There is a pleasing property of the blank, i.e. the <RT·code>empty</RT·code> symbol, that is valuable and unique to it. It prints as a space in diagrams given in text books, and 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 <RT·code>empty</RT·code> symbol is <RT·code>SP</RT·code>.</p>
+ <p>Going back to Turing's moniker of <RT·code>blank</RT·code>, does not bring the focus solely to machine B, because the original paper by Turing states the definition of <RT·code>blank</RT·code> meaning "no symbol", as was already discussed. Calling it <RT·code>blank</RT·code> is merely the same name colored by the engineering of wood pulp. However, there is a pleasing property of the blank, i.e. the <RT·code>empty</RT·code> symbol, that is valuable and unique to it. It prints as a space in diagrams given in text books, and 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 <RT·code>empty</RT·code> symbol is <RT·code>SP</RT·code>.</p>
<p>There is more to consider about the former <RT·code>blank</RT·code>, former <RT·code>empty</RT·code>, now <RT·code>SP</RT·code> symbol. Computational theorists often describe a two-step process. First, a Turing Machine writes a string to be studied onto a tape initially filled with all <RT·code>SP</RT·code> symbols; second, the tape is moved to another Turing Machine whose purpose is to recognize a property of the string being studied. In this process, a tape is used as a communication medium, so it follows that communication theory can be applied to this messaging scenario. Messages sent on a channel must be formatted so they can be placed on the channel and later recovered. The specification for such structuring is called a communication <RT·term>protocol</RT·term>. The protocol implies a higher authority, as both the sender and the receiver must have knowledge of the same designed-in protocol. In a sense, a protocol is the meta-message sent before the message itself.</p>
- <p>The intention of the later innovation of placing the <RT·code>SP</RT·code> symbol in <RT·math>Γ</RT·math> but not in <RT·math>Σ</RT·math> appears to be that of making the <RT·code>SP</RT·code> symbol serve additional duty: firstly as a default value for a cell that has never been written to, secondly to effect erasure, and now thirdly as a control component of a communications protocol. Accordingly then, this protocol was designed by mathematicians with a specific goal. They intended to make it impossible for programmers to send 'to be studied' string messages that cannot always be recovered by a receiving recognizer Turing Machine. In short, the <RT·code>SP</RT·code> symbol doubling as an in-band EOM (end of message) symbol.</p>
+ <p>The intention of the later innovation of placing the <RT·code>SP</RT·code> symbol in <RT·math>Γ</RT·math> but not in <RT·math>Σ</RT·math> appears to be that of making the <RT·code>SP</RT·code> symbol serve additional duty: firstly as a default value for a cell that has never been written to, secondly to effect erasure, and now thirdly as a control component of a communications protocol. Accordingly then, this protocol was designed by mathematicians with a specific goal. They intended to make it impossible for programmers to send 'to be studied' string messages that cannot always be recovered by a receiving recognizer Turing Machine. In short, the <RT·code>SP</RT·code> symbol also serves as an in-band EOM (end of message) symbol.</p>
- <p>Firstly note that excluding <RT·code>SP</RT·code> from <RT·math>Σ</RT·math> does not prevent a Turing machine from writing <RT·code>SP</RT·code> to a tape to be used as a message. If an message writing machine wants to write an <RT·code>SP</RT·code> to the tape, it merely writes a different symbol then erases it.</p>
+ <p>Firstly note that excluding <RT·code>SP</RT·code> from <RT·math>Σ</RT·math> does not prevent a Turing machine from writing <RT·code>SP</RT·code> to a tape to be used as a message. If a message writing machine wants to write an <RT·code>SP</RT·code> to the tape, it merely writes a different symbol then erases it.</p>
- <p>Secondly, once it is realized that <RT·code>SP</RT·code> symbols can be written to tape as messages, the very reason of excluding it from <RT·math>Γ</RT·math>, to guarantee that received messages are parsable, is lost. A message authoring machine could, for example, happily output a variable length array of strings while using an arbitrary number of empty symbols to separate the elements. A receiving machine could then not know how many elements it should try to recover, or when to say a separator is sufficiently long to no longer be considered a separator. Nothing in the Turing Machine definition prevents this.</p>
+ <p>Secondly, once it is realized that <RT·code>SP</RT·code> symbols can be written to tape as messages, the very reason of excluding it from <RT·math>Γ</RT·math>, to guarantee that received messages are parsable, is lost. A message authoring machine could, for example, happily output a variable length array of strings while using an arbitrary number of empty symbols to separate the elements. A receiving machine could then not know how many elements it should try to recover, or when to say a string of <RT·code>SP</RT·code> symbols is sufficiently long to not be considered a separator. Nothing in the Turing Machine definition prevents this.</p>
<p>Furthermore, the Universal Turing Machine can act as the aforementioned higher authority. In this case, Turing Machines, and sometimes their tapes, are written to a Universal Turing Machine's tape. Consequently, it is not only possible to want to terminate multiple strings in series, as mentioned in the prior paragraph; the termination issue itself is embedded in proofs such as the Halting Problem.</p>
<p>A common technique programmers use for embedding strings with terminators within other strings is to embed escape characters. This is another in-band protocol, and it is inefficient. The escape sequences grow exponentially with nesting levels. Also, such strings with embedded escape sequences cannot be interpreted without knowledge of the intended nesting level of the string author, which requires the interpreter of the string to know the author's intentions.</p>
- <p>For the modified computational Turing machine presented later in this chapter, there will be a separate control alphabet of predefined symbols, as for the Hopcroft-Ullman interpretation. However, so as to support recursion, and because the current scheme doesn't work anyway, that alphabet will be part of the alphabet <RT·math>Σ</RT·math> rather than distinct from it. Programmers then must explicitly design communication protocols that suit the problems they are working on, and those protocols become opaque for examination by a higher authority. Using <RT·code>SP</RT·code> as an EOM provides a reasonable approach for specific problems, whereas the current discussion focuses on establishing a rigorous modified Turing Machine definition.</p>
+ <p>For the modified computational Turing machine presented later in this chapter, there will be a separate control alphabet of predefined symbols, as for the Hopcroft-Ullman interpretation. However, so as to support recursion, and because the current scheme does not achieve protocol guarantees, the predefined alphabet will be part of the alphabet <RT·math>Σ</RT·math> rather than distinct from it. Programmers then must explicitly design communication protocols that suit the problems they are working on, and those protocols become opaque for examination by a higher authority. Note that this does not exclude a programmer ssing <RT·code>SP</RT·code> as an EOM marker, rather it removes the embedding of that protocol from the Turing Machine definition.</p>
<h2>The <RT·code>unspecified</RT·code> symbol</h2>
- <p>In the first edition of this book, I introduced a "read only after write" rule while working towards an architectural Turing Machine because conventional architectures do not maintain a concept of empty memory. The approach described in this section moves the "read only after write" rule back into a computation theoretic machine by designing in the <em>unspecified</em> symbol, which then displaces the concept of an <em>empty</em> cell.</p>
+ <p>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 moves the "read only after write" rule back into a computation theoretic machine by designing in the concept of being <em>unspecified</em>, which then displaces the concept of a cell being <em>empty</em>.</p>
<p>The standard 9-track tape introduced by IBM in 1964 came from the factory unformatted. The format operation would write a header and an EOF marker to mark the end of the device file. Then, a standard library call such as open(), followed by write(), would write over the EOF marker, continue writing data, and finally append a new EOF marker, essentially pushing the EOF boundary back. EOF could be pushed back until the physical EOM marker was struck. This matches, in some ways, how the empty symbol is used on the computation theoretic Turing Machine in the Hopcroft and Ullman book if we consider it to be an EOF marker. However, a difference exists in that real machines do not use an EOF to erase data characters.</p>