Shift rule: Difference between revisions
(Add some applications) |
(Added the definition of a shift rule, tried to correct some vertical spaces) |
||
Line 1: | Line 1: | ||
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 '''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 TM with transition <math>(S, 1) \to (0, R, S)</math> then using [[directed head notation]]: | |||
<math display="block"> | |||
\vphantom{\int}\textrm{S>} \; 1^n \xrightarrow{n} 0^n \; \textrm{S>} | |||
</math> | |||
In other words, if the TM is in state S reading the leftmost of a sequence of n ones, then n 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, | |||
and assume that for some state S the machine transitions from <math>t \; \textrm{S>} \; r</math> to <math>r' t \; \textrm{S>}</math>. Then we have a ''right'' shift rule | |||
<math display="block"> | |||
\vphantom{\int} t \; \textrm{S>} \; r \to r' t \; \textrm{S>}. | |||
\ | </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 | |||
<math display="block"> | |||
\vphantom{\int} r \; \textrm{<S} \; t \to \textrm{<S} \; r' t. | |||
</math> | |||
== General Shift Rules == | == General Shift Rules == | ||
Shift rules can | Shift rules can jump over larger blocks. For example [[Skelet 1|Skelet #1]] (<code>1RB1RD_1LC0RC_1RA1LD_0RE0LB_---1RC</code>) exhibits the following transitions: | ||
<math display="block"> | |||
\begin{array}{c} | |||
\\ | \\ | ||
011 \; \textrm{<C} & \xrightarrow{3} & \textrm{<C} \; 101 \\ | 011 \; \textrm{<C} & \xrightarrow{3} & \textrm{<C} \; 101 \\ | ||
\textrm{A>} \; 110 110 & \xrightarrow{10} & 011 011 \; A> | \textrm{A>} \; 110 110 & \xrightarrow{10} & 011 011 \; A> | ||
\end{array}</math>and so each of these can be repeated an arbitrary number of times as<math display="block">\begin{array}{c} | \end{array} | ||
</math> | |||
and so each of these can be repeated an arbitrary number of times as | |||
<math display="block"> | |||
\begin{array}{c} | |||
\\ | \\ | ||
011^n \; \textrm{<C} & \xrightarrow{3n} & \textrm{<C} \; 101^n \\ | 011^n \; \textrm{<C} & \xrightarrow{3n} & \textrm{<C} \; 101^n \\ | ||
\textrm{A>} \; {110 110}^n & \xrightarrow{10n} & {011 011}^n \; A> \\ | \textrm{A>} \; {110 110}^n & \xrightarrow{10n} & {011 011}^n \; A> \\ | ||
\end{array}</math>Shift rules can also depend upon additional "local context". For example Skelet #1 also exhibits transition:<math display="block"> | \end{array} | ||
\\ | </math> | ||
Shift rules can also depend upon additional "local context". For example Skelet #1 also exhibits transition: | |||
<math display="block"> | |||
\vphantom{\int} 01 \; \textrm{<C} \, 1 \xrightarrow{6} \textrm{<C} \, 1 \; 01 | |||
</math> | |||
and since the resulting config has the same "context" (a 1 behind the TM head), this can be repeated as well to produce the shift rule: | |||
<math display="block"> | |||
\vphantom{\int} 01^n \; \textrm{<C} \, 1 \xrightarrow{6n} \textrm{<C} \, 1 \; 01^n. | |||
</math> | |||
== Inductive Rules == | == Inductive Rules == |
Revision as of 11:30, 15 June 2024
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 TM with transition then using directed head notation:
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 S the machine transitions from to . Then we have a right shift rule
General Shift Rules
Shift rules can jump over larger blocks. For example Skelet #1 (1RB1RD_1LC0RC_1RA1LD_0RE0LB_---1RC
) exhibits the following transitions:
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 TM transition or an inductive application of the rule being proven (but do not use any other previously proven rules).
Simulation Acceleration
One of the main uses of shift rules is to accelerate simulation of TMs. For example, consider the simple Bouncer: 1RB1LA_1LA1RB
using the shift rules:
Prove Non-halting
Shift rules can be used to prove non-halting. For example, if you have a shift rule