From 1a52df9730e22452403004b3f7264c327a347e49 Mon Sep 17 00:00:00 2001
From: Thomas Walker Lynch
This definition comes from Hopcroft and Ullman's book with minor terminology changes to make it flow into the text here .
@@ -386,6 +384,8 @@So first the tape is , with the head over , and in state . Then after a step of the machine, the tape is , with the head over , and in state . Thus was overwritten with , and the head stepped left.
+Here is the programmed controller for a Turing Machine that reverses a binary string. Although by definition each state transition matches exactly one value under the head, as a practical matter, disjunctive selection is allowed via a comma list. A conjunctive phrasing for a state transition proposition would require stringing intermediate states in series.
@@ -506,6 +506,8 @@
done ⢠0 1 1
+ The total number of steps for reversing an symbol string:
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 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 preclude a programmer from using as an EOM marker, rather it removes the embedding of that protocol from the Turing Machine definition.
+ + +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 , and to more conveniently code 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.
@@ -634,13 +640,11 @@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.
-This section 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 , and to more conveniently code communication protocols.
+The specific architectural modifications are as follows:
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.
+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 . Then, if the machine attempts to make a decision upon the symbol, the machine will go to the state. Such a machine can then be analyzed to see if it ever visits the state.
+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.
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.
-There is a mechanical procedure for converting a Moore Machine into a Mealy Machine, and the reverse. Two such converted machines are equally expressive. Making the read operation an explicit action, instead of having it implied by a state transition, increases the number of states in a controller, and consequently the number of steps that must be taken. However, the new machine can do in two steps anything the former machine could do in one; consequently, this change affects the multiplier constant on the linear term of the step count formula but does not change the computation complexity class determined from such a step count. The layers of next-state functions can be collapsed into one layer, where the missing arguments are filled in with all possible unused values. This potentially increases the number of state transition arcs that must be specified, but the state transition logic and the number of states remain unchanged. Partitioning the machine definition by separation of concerns does not change the total specification. Hence, these modifications are computation theoretic inconsequential.
+There is a mechanical procedure for converting a Moore Machine into a Mealy Machine, and the reverse. Two such converted machines are equally expressive. Making the read operation an explicit action, instead of having it implied by a state transition, increases the number of states in a controller, and consequently the number of steps that must be taken. However, the new machine can do in two steps anything the former machine could do in one; consequently, this change scales the step count formula by a constant factor, leaving the order of the highest term unchanged. The layers of next-state functions can be collapsed into one layer, where the missing arguments are filled in with all possible unused values. This potentially increases the number of state transition arcs that must be specified, but the state transition logic and the number of states remain unchanged. Partitioning the machine definition by separation of concerns does not change the total specification. Hence, these modifications are computation theoretic inconsequential.
+ -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 defining the 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:
where must be in .
+where must be in .
The set of predefined symbols:
: is the current state of the machine.
-: is the data register.
+: is the status register value, also called the machine status.
-: is the status register.
+: is the data register value.
-A set of programmed data symbols:
The programmed actions. A set of pairs of the form:
where is matched to the current state, and is a member of .
+where is matched to the current state, and is a member of . The subscript is a device used to emphasize that can be any member of the total set of states, , not merely the initial state, which some readers might have misunderstood had the symbology of been used. Also note, the spartan is being reserved to denote the contents of the . +
The conditional transition table. A set of state transition triples; each triple is of the form:
where is matched to the current state of the machine. is a symbol in register , where is either or . is the next state. When matches the current state and the specified register holds , becomes the next state. Both and come from the total set . comes from the total set .
+Here and are two states from the total set of . They need not be distinct. While the machine is running, state is to be matched against the contents of the , the current state. Symbol is a member of the total set and is to be matched against the contents of the , the machine status. When matches the current state and matches the current status, then becomes the next state.
The state default transition table. A set of state transition pairs; each pair is of the form:
where is matched to the current state, and upon a match will be taken as the next state.
+where is matched to the current state, and upon a match will be taken as the next state.
The status default transition table. A set of state transition pairs; each pair is of the form:
where matches the symbol in register (either or ), and upon a match will be taken as the next state.
+where matches the symbol in register (either or ), and upon a match will be taken as the next state.
The global default next state:
This is the transition of last resort. It is unconditional; the next state becomes .
+This is the transition of last resort. It is unconditional; the next state becomes .
A set of programmer-defined halting states:
The complete set of symbols, uniting the fixed control symbols and the programmed data symbols:
The ordered sequence of next state transition rules:
The complete set of halting states, uniting the fixed predefined states and the programmed states:
-If the machine reaches a point where there is no next state, or the head has walked off of the tape, the machine hangs. If, after the state transition phase completes, the current state is a member of , the machine halts. Otherwise the cycle repeats.
-Because the TTCA Machine separates the data path from the control path, it is possible to reverse a string without inspecting the payload. The programmed controller only needs to recognize the structural boundaries of the data protocol. When a payload symbol is encountered, the controller executes a action, placing the value into a data register, which is not examined for decision-making purposes. When a value is used to base a decision upon, the controller executes a , placing the value into a register connected to the arc comparators. Because actions are bound to states rather than transitions, reading and stepping are distinct states. This combination of features results in a controller that has threads of serialized execution.
@@ -895,7 +894,7 @@ Q·Check_Boundary: λ: status δ: - (on_leftmost: Q·Done) + (leftmost: Q·Done) Q·Fetch_0 Q·Read_Data: @@ -906,7 +905,7 @@ Q·Check_Last_Char: λ: status δ: - (on_leftmost: Q·Place_Last) + (leftmost: Q·Place_Last) Q·Place_SP # Phase 3: Mark the location and carry the opaque data rightward. @@ -1008,7 +1007,7 @@ while(g == EOM || g == SP){ status(); // Termination: Short-circuit for empty string - if(g == on_leftmost) return; + if(g == leftmost) return; left(); read_g(); } @@ -1017,7 +1016,7 @@ status(); // Center Break: Q·Check_Last_Char routes to the final chain - if(g == on_leftmost) break; + if(g == leftmost) break; // Main Carry Loop: Mark, carry, drop, and return to pivot write_Ï(SP); @@ -1090,7 +1089,7 @@ Q·Check_Empty: λ: status(0) δ: - (on_leftmost: Q·Empty_Setup_1) + (leftmost: Q·Empty_Setup_1) Q·Setup_Write_1 Q·Empty_Setup_1: @@ -1117,7 +1116,7 @@ Q·Copy_Status: λ: status(0) δ: - (on_leftmost: Q·Copy_Last_Erase) + (leftmost: Q·Copy_Last_Erase) Q·Copy_Erase Q·Copy_Erase: @@ -1186,7 +1185,7 @@ // Phase 2: Setup pointers or short-circuit on empty string status(0); - if(g == on_leftmost){ + if(g == leftmost){ right(1); write_Ï(1, EOR); return; @@ -1201,7 +1200,7 @@ status(0); // Break out to process the final character - if(g == on_leftmost) break; + if(g == leftmost) break; write_Ï(0, SP); write_d(1); @@ -2037,9 +2036,9 @@The difference between adjacent function values in the above sequence is called the first finite difference. The forward first difference is defined as: - . + . While the backwards first difference is - . + . If 'forward' or 'backwards' is not specified, then the difference is taken to be 'forward'. Hence, extending a function is identical to adding the first difference. Thus a sequence of function values implies a sequence of first differences.
@@ -2060,8 +2059,8 @@- Here is the sequence of tape states as the machine is repeatedly called to extend the function from its initial conditions at . During each step, the machine adds to , and to , as there is no , it is taken to be zero, so is merely copied down. + Here is the sequence of tape states as the machine is repeatedly called to extend the function from its initial conditions at . During each step, the machine adds to , and to , as there is no , it is taken to be zero, so is merely copied down.