Directed head notation: Difference between revisions
(Created page with "'''Directed head notation''' is a notation for specifying a Turing machine configuration using tape compression and a TM head which "points" either to the left or right. Directed head notation may be used for a complete tape configuration<math display="block">0^\infty \; 1 \; \textrm{ <B } \; 0^3 \; 13^{10} \; 2 \; 0^\infty</math> or for a partial configuration <math display="block">101 \; \textrm{ A> } \; 1^n</math> == Tape Compression == This nota...") |
(Add section on Configuration Transitions) |
||
Line 12: | Line 12: | ||
== Directed Head == | == Directed Head == | ||
Traditionally, the Turing machine head is considered to be located "on" a tape cell, for example some common traditional notation for a TM configurations include:<math display="block">\dots 0110 \underset{A}{\underline{2}} 01110 \dots</math>or<math display="block">\dots 0110 (A2) 01110 \dots</math>which indicate that the TM is in state A and currently positioned on the tape cell containing the 2. In these notations there are 3 groupings of symbols: those to the left (<math>\dots 0110</math>), those to the right (<math>01110 \dots</math>) and the single current symbol (2). | Traditionally, the Turing machine head is considered to be located "on" a tape cell, for example some common traditional notation for a TM configurations include:<math display="block">\dots 0110 \underset{A}{\underline{2}} 01110 \dots</math>or<math display="block">\dots 0110 (A2) 01110 \dots</math>which indicate that the TM is in state A and currently positioned on the tape cell containing the 2. In these notations there are 3 groupings of symbols: those to the left (<math>\dots 0110</math>), those to the right (<math>01110 \dots</math>) and the single current symbol (2). | ||
In directed head notation, we instead conceptualize the TM head as in the process of moving from one tape cell to another. So the above configuration could be represented by either<math display="block">\dots 0110 \; \textrm{A>} \; 2 01110 \dots</math>or<math display="block">\dots 0110 2 \; \textrm{<A} \; 01110 \dots</math>depending on which direction it moved immediately previous to this config. In many contexts these may be considered equivalent configurations (since the forward behavior is identical for either). Here the notation "A>" means that the TM is in state A moving toward the right and "<A" means that it is moving to the left. The "current symbol" is the symbol "small end" of these "directed head" arrows. | In directed head notation, we instead conceptualize the TM head as in the process of moving from one tape cell to another. So the above configuration could be represented by either<math display="block">\dots 0110 \; \textrm{A>} \; 2 01110 \dots</math>or<math display="block">\dots 0110 2 \; \textrm{<A} \; 01110 \dots</math>depending on which direction it moved immediately previous to this config. In many contexts these may be considered equivalent configurations (since the forward behavior is identical for either). Here the notation "A>" means that the TM is in state A moving toward the right and "<A" means that it is moving to the left. The "current symbol" is the symbol "small end" of these "directed head" arrows. | ||
== Configurations == | == Partial Configurations == | ||
A directed head configuration includes a directed head and zero or more tape segments on each side. | A directed head configuration includes a directed head and zero or more tape segments on each side. If it includes <math>0^\infty</math> at both ends, then it is a complete configuration (specifying precisely the entire tape), otherwise it is a partial configuration (specifying only a limited context around the TM head). For example, the partial configuration<math display="block">101 \; \textrm{ C> } \; 1^3</math>matches any of these complete configurations<math display="block">\begin{array}{rcl} | ||
0^\infty \; 101 & \textrm{ C> } & 1^3 \; 0^\infty \\ | |||
0^\infty \; 11101 & \textrm{ C> } & 1^8 \; 0^\infty \\ | |||
0^\infty \; 01^3 & \textrm{ C> } & 11^2 \; 0^\infty \\ | |||
\end{array}</math>Partial configurations may have no segments specified even on the side the TM head is facing. For example<math display="block">\textrm{<C} \; 101</math>is a valid partial configuration. In these cases, we cannot tell what "current symbol" is until we know the complete configuration. These configurations are common as the result of configuration transitions as described below. | |||
== Configuration Transitions == | |||
One of the most common use cases for directed head notation is for specifying configurations transition rules. For example, the rule<math display="block">\begin{array}{c} | |||
\\ | |||
0^\infty \; 011 \; \textrm{<C} \; 0^\infty \; \xrightarrow{3} \; 0^\infty \; \textrm{<C} \; 101 \; 0^\infty \\ | |||
\end{array}</math>indicates that if the TM starts in config <math> 0^\infty \; 011 \; \textrm{<C} \; 0^\infty</math>, 3 steps later it will be in configuration <math> 0^\infty \; \textrm{<C} \; 101 \; 0^\infty</math>. It is common to define these rules for partial configurations. For example,<math display="block">\begin{array}{c} | |||
\\ | |||
011 \; \textrm{<C} \; \xrightarrow{3} \; \textrm{<C} \; 101 \\ | |||
\end{array}</math>which means that for any complete configuration <math> w \; 011 \; \textrm{<C} \; u</math> (where <math> w, u</math> are any valid left and right half-tapes), 3 steps later it will be in configuration <math> w \; \textrm{<C} \; 101 \; u</math>. | |||
Transition rules become especially useful once you use induction to prove them over an arbitrary repetition counts. For example [[Shift rule|shift rules]] like for all <math> n \ge 0</math>:<math display="block">\begin{array}{c} | |||
\\ | |||
011^n \; \textrm{<C} \; \xrightarrow{3n} \; \textrm{<C} \; 101^n \\ | |||
\end{array}</math> |
Revision as of 19:38, 12 June 2024
Directed head notation is a notation for specifying a Turing machine configuration using tape compression and a TM head which "points" either to the left or right. Directed head notation may be used for a complete tape configuration
or for a partial configuration
Tape Compression
This notation supports run-length encoding for tape compression using "exponents". Given a "word" (sequence of tape symbols) and a count , represents repetitions of concatenated. So for example, and .
It is important to note here that the words "2" and "10" in these examples are sequences of tape symbols and not integers and that the counts "4" and "3" are integer repetition counts, not representing integer exponentiation. It is perhaps unfortunate that these compressed blocks look identical to integer mathematical expressions, generally it should be obvious from the context that this is a tape configuration and not a math expression.
Segments of the tape may also be specified without exponents which represent unrepeated (or 1 repeat) of that segment. The notation is used to represent the infinite sequence of blank symbols at either end of a configuration. In general, there will be many different notations for identical tape segments. For example:
Directed Head
Traditionally, the Turing machine head is considered to be located "on" a tape cell, for example some common traditional notation for a TM configurations include:
In directed head notation, we instead conceptualize the TM head as in the process of moving from one tape cell to another. So the above configuration could be represented by either
Partial Configurations
A directed head configuration includes a directed head and zero or more tape segments on each side. If it includes at both ends, then it is a complete configuration (specifying precisely the entire tape), otherwise it is a partial configuration (specifying only a limited context around the TM head). For example, the partial configuration
Configuration Transitions
One of the most common use cases for directed head notation is for specifying configurations transition rules. For example, the rule
Transition rules become especially useful once you use induction to prove them over an arbitrary repetition counts. For example shift rules like for all :