From: Thomas Walker Lynch Date: Mon, 20 Jul 2026 06:03:39 +0000 (+0000) Subject: . X-Git-Url: https://git.reasoningtechnology.com/%27%20%20%20full_path%20%20%20%27?a=commitdiff_plain;h=3e97014aaf291d8d479fddd058abf55fde69541d;p=TM-2026 . --- diff --git a/document/book/TM-2026.html b/document/book/TM-2026.html index 548d0cf..8f840b4 100644 --- a/document/book/TM-2026.html +++ b/document/book/TM-2026.html @@ -989,23 +989,24 @@ HU reverse machine +

With data payload examination removed from the controller, long strings of states with a few decision points emerge. There is a loop on the left, and a tail leading to done, on the right. The number of states and arcs is a constant independent of how much data is to be reversed.

+ void TTCA·reverse_string() { - // Phase 1: Scan right to EOM and initialize the EOR marker + // Initialization: Scan to EOM and setup the EOR boundary read_g(); while(g != EOM){right(); read_g();} right(); write_σ(EOR); - // Phases 2 through 5: The main shuttle cycle while(true){ - - // Phase 2: Fetch next unprocessed character and check boundaries + // The Fetch Pivot: Locate the next unprocessed character left(); read_g(); while(g == EOM || g == SP){ status(); - if(g == on_leftmost) return; + // Termination: Short-circuit for empty string + if(g == on_leftmost) return; left(); read_g(); } @@ -1013,19 +1014,10 @@ read_d(); status(); - // Phase 6: Final character carry and clean halt - if(g == on_leftmost){ - write_σ(SP); - right(); - read_g(); - while(g != EOR){right(); read_g();} - write_d(); - right(); - write_σ(EOR); - return; - } + // Center Break: Q·Check_Last_Char routes to the final chain + if(g == on_leftmost) break; - // Phase 3 & 4: Mark location, carry opaque data, advance EOR + // Main Carry Loop: Mark, carry, drop, and return to pivot write_σ(SP); right(); read_g(); @@ -1034,14 +1026,40 @@ right(); write_σ(EOR); - // Phase 5: Return left to EOM to begin the next fetch cycle left(); read_g(); while(g != EOM){left(); read_g();} } + + // Final Character Chain: Handle the last payload without a return sweep + write_σ(SP); + right(); + read_g(); + while(g != EOR){right(); read_g();} + write_d(); + right(); + write_σ(EOR); + + // Termination: Q·Done + return; } +

The total number of steps for reversing an n character string using the TTCA architecture:

+ +
+ + \text{steps} = + \begin{cases} + 7 & \text{if } n = 0 \\ + 4.5n^2 + 11.5n + 5 & \text{if } n \ge 1 + \end{cases} + +
+ +

This machine spends a lot of time shuttling the head between two context area. One with the original string, and one with the result reverse machine. This suggests that a two head version would be faster.

+ + The Turing Machine architecture/organization