Shift rule: Difference between revisions
m add category |
m ╎| |
||
Line 3: | Line 3: | ||
A simple canonical example is that if we have a [[Turing machine]] with the transition <math>(\textrm{S}, 1) \to (0, R, \textrm{S})</math> then using [[directed head notation]]: | A simple canonical example is that if we have a [[Turing machine]] with the transition <math>(\textrm{S}, 1) \to (0, R, \textrm{S})</math> then using [[directed head notation]]: | ||
<math display="block"> | <math display="block"> | ||
\vphantom{\int}\textrm{S>} \; 1^n \xrightarrow{n} 0^n \; \textrm{S>} | \vphantom{\int}\textrm{S}\textrm{>}\;1^n \xrightarrow{n} 0^n\;\textrm{S}\textrm{>} | ||
</math> | </math> | ||
In other words, if the machine is in state <math>\textrm{S}</math> and the head is reading the leftmost of a sequence of <math>n</math> ones, then <math>n</math> steps later it will have moved to the right of this entire sequence of ones, converting them all to zeros. | In other words, if the machine is in state <math>\textrm{S}</math> and the head is reading the leftmost of a sequence of <math>n</math> ones, then <math>n</math> steps later it will have moved to the right of this entire sequence of ones, converting them all to zeros. | ||
To give a precise definition, suppose that there are words <math>t</math>, <math>r</math> and <math>r'</math> in the alphabet of the Turing machine in question, | To give a precise definition, suppose that there are words <math>t</math>, <math>r</math> and <math>r'</math> in the alphabet of the Turing machine in question, | ||
and assume that for some state <math>\textrm{S}</math> the machine transitions from <math>t \; \textrm{S>} \; r</math> to <math>r' t \; \textrm{S>}</math>. Then we have a ''right'' shift rule | and assume that for some state <math>\textrm{S}</math> the machine transitions from <math>t \; \textrm{S}\textrm{>} \; r</math> to <math>r' t \; \textrm{S}\textrm{>}</math>. Then we have a ''right'' shift rule | ||
<math display="block"> | <math display="block"> | ||
\displaystyle\vphantom{\int} t \; \textrm{S>} \; r \to r'\;t\;\textrm{S>}. | \displaystyle\vphantom{\int} t \; \textrm{S}\textrm{>} \; r \to r'\;t\;\textrm{S}\textrm{>}. | ||
</math> | </math> | ||
Similarly, if the machine transitions from <math> r \; \textrm{<S} \; t</math> to <math>\textrm{<S} \; t r'</math>, then we have a ''left'' shift rule | Similarly, if the machine transitions from <math> r \; \textrm{<}\textrm{S} \; t</math> to <math>\textrm{<}\textrm{S} \; t r'</math>, then we have a ''left'' shift rule | ||
<math display="block"> | <math display="block"> | ||
\vphantom{\int} r \; \textrm{<S} \; t \to \textrm{<S} \; t\;r'. | \vphantom{\int}r\;\textrm{<}\textrm{S}\;t\to\textrm{<}\textrm{S}\;t\;r'. | ||
</math> | </math> | ||
Line 21: | Line 21: | ||
<math display="block"> | <math display="block"> | ||
\begin{array}{rcl} | \begin{array}{rcl} | ||
\displaystyle\vphantom{\int} 011 \; \textrm{<C} & \xrightarrow{3} & \textrm{<C} \; 101 \\ | \displaystyle\vphantom{\int} 011 \; \textrm{<}\textrm{C} & \xrightarrow{3} & \textrm{<}\textrm{C} \; 101 \\ | ||
\textrm{A>} \; 110 110 & \xrightarrow{10} & 011 011 \;\textrm{A>} | \textrm{A}\textrm{>} \; 110 110 & \xrightarrow{10} & 011 011 \;\textrm{A}\textrm{>} | ||
\end{array} | \end{array} | ||
</math> | </math> | ||
Line 28: | Line 28: | ||
<math display="block"> | <math display="block"> | ||
\begin{array}{rcl} | \begin{array}{rcl} | ||
\displaystyle\vphantom{\int}011^n \; \textrm{<C} & \xrightarrow{3n} & \textrm{<C} \; 101^n \\ | \displaystyle\vphantom{\int}011^n \; \textrm{<}\textrm{C} & \xrightarrow{3n} & \textrm{<}\textrm{C} \; 101^n \\ | ||
\textrm{A>} \; {110 110}^n & \xrightarrow{10n} & {011 011}^n \;\textrm{A>} \\ | \textrm{A}\textrm{>} \; {110 110}^n & \xrightarrow{10n} & {011 011}^n \;\textrm{A}\textrm{>} \\ | ||
\end{array} | \end{array} | ||
</math> | </math> | ||
Shift rules can also depend upon additional "local context". For example, Skelet #1 also exhibits this transition: | Shift rules can also depend upon additional "local context". For example, Skelet #1 also exhibits this transition: | ||
<math display="block"> | <math display="block"> | ||
\vphantom{\int} 01 \; \textrm{<C} \; 1 \xrightarrow{6} \textrm{<C} \; 1 \; 01 | \vphantom{\int} 01 \; \textrm{<}\textrm{C} \; 1 \xrightarrow{6} \textrm{<}\textrm{C} \; 1 \; 01 | ||
</math> | </math> | ||
and since the resulting config has the same "context" (a 1 to the right of the head), this can be repeated as well to produce the shift rule: | and since the resulting config has the same "context" (a 1 to the right of the head), this can be repeated as well to produce the shift rule: | ||
<math display="block"> | <math display="block"> | ||
\vphantom{\int} 01^n \; \textrm{<C} \; 1 \xrightarrow{6n} \textrm{<C} \; 1 \; 01^n. | \vphantom{\int} 01^n \; \textrm{<}\textrm{C} \; 1 \xrightarrow{6n} \textrm{<}\textrm{C} \; 1 \; 01^n. | ||
</math> | </math> | ||
Line 47: | Line 47: | ||
One of the main uses of shift rules is to [[Accelerated Simulator|accelerate the simulation]] of Turing machines. For example, consider the simple [[bouncer]] {{TM|1RB1LA_1LA1RB}} using the shift rules: | One of the main uses of shift rules is to [[Accelerated Simulator|accelerate the simulation]] of Turing machines. For example, consider the simple [[bouncer]] {{TM|1RB1LA_1LA1RB}} using the shift rules: | ||
<math display="block">\begin{array}{rcl} | <math display="block">\begin{array}{rcl} | ||
\displaystyle\vphantom{\int}1^n \; \textrm{<A} & \xrightarrow{n} & \textrm{<A} \; 1^n \\ | \displaystyle\vphantom{\int}1^n \; \textrm{<}\textrm{A} & \xrightarrow{n} & \textrm{<}\textrm{A} \; 1^n \\ | ||
\textrm{B>} \; 1^n & \xrightarrow{n} & 1^n \; \textrm{B>} \\ | \textrm{B}\textrm{>} \; 1^n & \xrightarrow{n} & 1^n \; \textrm{B}\textrm{>} \\ | ||
\end{array}</math> | \end{array}</math> | ||
Line 54: | Line 54: | ||
<math display="block">\begin{array}{ll} | <math display="block">\begin{array}{ll} | ||
\text{Start}{:}&0^\infty \; \textrm{<A} \; 0^\infty \\ | \text{Start}{:}&0^\infty \; \textrm{<}\textrm{A} \; 0^\infty \\ | ||
\text{Step 1}{:}&0^\infty \; 1 \; \textrm{B>} \; 0^\infty \\ | \text{Step 1}{:}&0^\infty \; 1 \; \textrm{B}\textrm{>} \; 0^\infty \\ | ||
\text{Step 2}{:}&0^\infty \; 1 \; \textrm{<A} \; 1 \; 0^\infty \\ | \text{Step 2}{:}&0^\infty \; 1 \; \textrm{<}\textrm{A} \; 1 \; 0^\infty \\ | ||
\text{Step 3}{:}&0^\infty \; \textrm{<A} \; 1^2 \; 0^\infty \\ | \text{Step 3}{:}&0^\infty \; \textrm{<}\textrm{A} \; 1^2 \; 0^\infty \\ | ||
\qquad\qquad\qquad\vdots \\ | \qquad\qquad\qquad\vdots \\ | ||
\text{Step }2n^2+n{:}&0^\infty \; \textrm{<A} \; 1^{2n} \; 0^\infty \\ | \text{Step }2n^2+n{:}&0^\infty \; \textrm{<}\textrm{A} \; 1^{2n} \; 0^\infty \\ | ||
\text{Step }2n^2+n+1{:}&0^\infty \; 1 \; \textrm{B>} \; 1^{2n} \; 0^\infty \\ | \text{Step }2n^2+n+1{:}&0^\infty \; 1 \; \textrm{B}\textrm{>} \; 1^{2n} \; 0^\infty \\ | ||
\text{Step }2n^2+3n+1{:}&0^\infty \; 1^{2n+1} \; \textrm{B>} \; 0^\infty \\ | \text{Step }2n^2+3n+1{:}&0^\infty \; 1^{2n+1} \; \textrm{B}\textrm{>} \; 0^\infty \\ | ||
\text{Step }2n^2+3n+2{:}&0^\infty \; 1^{2n+1} \; \textrm{<A} \; 1 \; 0^\infty \\ | \text{Step }2n^2+3n+2{:}&0^\infty \; 1^{2n+1} \; \textrm{<}\textrm{A} \; 1 \; 0^\infty \\ | ||
\text{Step }2n^2+5n+3{:}&0^\infty \; \textrm{<A} \; 1^{2n+2} \; 0^\infty \\ | \text{Step }2n^2+5n+3{:}&0^\infty \; \textrm{<}\textrm{A} \; 1^{2n+2} \; 0^\infty \\ | ||
\qquad\qquad\qquad\vdots \\ | \qquad\qquad\qquad\vdots \\ | ||
\end{array}</math> | \end{array}</math> | ||
Line 71: | Line 71: | ||
Any Turing machine that has at least one of the two following types of shift rules: | Any Turing machine that has at least one of the two following types of shift rules: | ||
<math display="block"> | <math display="block"> | ||
\displaystyle\vphantom{\int}t\;\textrm{S>} \; 0^n \to r'\;t\;\textrm{S>}\qquad\text{or}\qquad \displaystyle\vphantom{\int}0^n\;\textrm{<S}\;t\to \textrm{<S}\;t\;r', | \displaystyle\vphantom{\int}t\;\textrm{S}\textrm{>} \; 0^n \to r'\;t\;\textrm{S}\textrm{>}\qquad\text{or}\qquad \displaystyle\vphantom{\int}0^n\;\textrm{<}\textrm{S}\;t\to \textrm{<}\textrm{S}\;t\;r', | ||
</math> | </math> | ||
and which eventually reaches the configuration <math>t\;\textrm{S>}\;0^\infty</math> (for the first rule) or <math>0^\infty\;\textrm{<S}\;t</math> (for the second rule) is non-halting, becoming a [[translated cycler]]. | and which eventually reaches the configuration <math>t\;\textrm{S}\textrm{>}\;0^\infty</math> (for the first rule) or <math>0^\infty\;\textrm{<}\textrm{S}\;t</math> (for the second rule) is non-halting, becoming a [[translated cycler]]. | ||
[[Category:Analysis Techniques]] | [[Category:Analysis Techniques]] |
Latest revision as of 23:07, 7 October 2025
A shift rule (also called a chain rule) is a finite sequence of transitions which may be repeated an arbitrary number of times to "jump" over an entire repeated block of symbols on a compressed tape.
A simple canonical example is that if we have a Turing machine with the transition then using directed head notation: In other words, if the machine is in state and the head is reading the leftmost of a sequence of ones, then steps later it will have moved to the right of this entire sequence of ones, converting them all to zeros.
To give a precise definition, suppose that there are words , and in the alphabet of the Turing machine in question, and assume that for some state the machine transitions from to . Then we have a right shift rule Similarly, if the machine transitions from to , then we have a left shift rule
General Shift Rules
Shift rules can jump over larger blocks. For example Skelet #1 (1RB1RD_1LC0RC_1RA1LD_0RE0LB_---1RC
(bbch)) exhibits the following transitions:
Each of these can be repeated an arbitrary number of times, producing the general shift rules:
Shift rules can also depend upon additional "local context". For example, Skelet #1 also exhibits this transition:
and since the resulting config has the same "context" (a 1 to the right of the head), this can be repeated as well to produce the shift rule:
Inductive Rules
Shift rules can be seen as the simplest example of inductive rules. Specifically, they are Level 0 Inductive rules which only use the inductive hypothesis once: Tape rewrite rules that can be proven using induction, where each step in the proof is either a basic Turing machine transition or an inductive application of the rule being proven that does not use any other previously proven rules).
Simulation Acceleration
One of the main uses of shift rules is to accelerate the simulation of Turing machines. For example, consider the simple bouncer 1RB1LA_1LA1RB
(bbch) using the shift rules:
We can accelerate the simulation like this:
In this case, they allow one to use simulator steps to simulate base steps, which is the best-case speedup using only shift rules. More general inductive rules that can further accelerate a Turing machine's simulation may build on top of shift rules.
Moving across an infinite line of 0s
Any Turing machine that has at least one of the two following types of shift rules: and which eventually reaches the configuration (for the first rule) or (for the second rule) is non-halting, becoming a translated cycler.