2-State 2-Symbol Turing Machines with Periodic Support Produce Regular Sets

. We say that a Turing machine has periodic support if there is an inﬁnitely repeated word to the left of the input and another inﬁnitely repeated word to the right. In the search for the smallest universal Turing machines, machines that use periodic support have been signiﬁcantly smaller than those for the standard model (i.e. machines with the usual blank tape on either side of the input). While generalising the model allows us to construct smaller universal machines it makes proving decidability results for the various state-symbol products that restrict program size more diﬃcult. Here we show that given an arbitrary 2-state 2-symbol Turing machine and a conﬁguration with periodic support the set of reachable conﬁgurations is regular. Unlike previous decidability results for 2-state 2-symbol machines we included in our consideration machines that do not reserve a transition rule for halting, which further adds to the diﬃculty of giving decidability results.


Introduction
The search for Turing machines with small states-symbol products has received attention for a number of different variations of the model [2,8,12,13].The variant that has received the most attention is what we call here the standard model [1,5,6,11] (single-tape Turing machines with the usual blank symbol and a specially reserved halt instruction).As one might expect if we generalise the standard model or the type of encoding it may use we can give machines with smaller state-symbol products.One generalisation used in the literature is to allow periodic support (an infinitely repeated word to the left of the input and another infinitely repeated word to the right).Universal machines that use such a generalisation are call weakly universal.Watanabe gave a number of small semi-weakly universal machines [13] (a repeated word only appears on one side of the input).Later, Cook [2] gave small weakly universal machines that simulate the cellular automaton Rule 110, and these were improved upon in [7] to give weakly universal machines for the state-symbol pairs of (6, 2), (3,3) and (2,4).
For the standard model a number of authors have given lower bounds on the size of the smallest possible universal Turing machines by proving the halting problem decidable for machines with the following state-symbol pairs: (2, 2) [4,9], (3,2) [10], (2, 3) (claimed by Pavlotskaya [9]), (1, n) [3] and (n, 1) (trivial), where n 1.Unfortunately, these results do not provide lower bounds relevant to the weak and semi-weak machines mentioned above, and while generalising the encoding can simplify the task of finding machines with smaller state-symbol products the task of giving decidability results becomes more difficult.In this work we give decidability results for 2-state 2-symbol machines with periodic support.Our main result is as follows: Theorem 1.Given an arbitrary 2-state, 2-symbol, single-tape Turing machine with periodic support, the set of reachable configurations from an arbitrary configuration is regular.
This result implies the decidability of many questions for 2-state 2-symbol machines with periodic support such as (1) Will a computation halt?(2) Does word w appear on the tape during a computation?(3) Given a number x does a computation enter a repeating sequence of configurations of length x?The halting property in question 1 is the standard way of signaling the end of a computation in Turing machines.Each of the properties in ( 2) and ( 3) above have been used as a means to signal the end of a computation in universal machines [2,12].The weakly universal machines in [2,7] use the appearance of a special word to simulate a halting Turing machine and so our results show that there exists no 2-state 2-symbol weakly universal machine that ends its computation in this way.Our proof does not assume that there is a transition rule reserved for halting which further adds to the difficulty when compared to previous decidability proofs for 2-state 2-symbol machines.
The layout of the paper is as follows: In Section 2 we explain notation and give some definitions including definitions for two types of computation, periodic and semi-periodic, and we then show that if a computation is periodic or semiperiodic the set of reachable configurations is regular.In Section 3 we reduce the number of cases to be considered leaving the cases only in Figure 1 to be solved, and in Section 4 we solve the Figure 1 cases to prove Theorem 1.

Turing Machines with Periodic Support
Definition 1.A Turing machine with periodic support is a tuple M = (Q, Σ, f, l, r).Here Q = {q 1 , . . .q |Q| } and Σ are the finite sets of states and tape symbols respectively, and l, r ∈ Σ * are the left and right blank words respectively, where |r| > 0 and |l| > 0. The transition function is of the form We write f as a list of transition rules.Each transition rule is a quintuple (q x , σ 1 , σ 2 , d, q y ), with initial state q x , read symbol σ 1 ∈ Σ, write symbol σ 2 ∈ Σ, move direction d ∈ {L, R} and next state q y .Definition 2. A configuration c of a Turing machine with periodic support has the form c = u q x α v where q x is the current state, the tape head is reading the symbol α, and the words u, v ∈ Σ * .
For a machine with periodic support, when the tape head moves to the right of v the word r is appended to the right of v and when the tape head moves to the left of u the word l is prepended to the left of u.When l = r = 0 we have the classic Turing machine with blank symbol 0. We write c 1 c 2 to denote that configuration c 2 is obtained via a single Turing machine computation step on c 1 and we write c 1 * c t if there exists a sequence of 0 or more computations steps of the form c 1 c 2 . . .c t−1 c t .We say that c t is reachable from c 1 and call c 1 c 2 . . .c t−1 c t a computation sequence.
We label each Turing machine tape cell with an index.The cell with index i, which we will call cell i, has cell i − 1 immediately to its left and cell i + 1 immediately to its right.The position function p(t) gives the index of the cell being read by the tape head at time t.The rightmost position up to time t is a cell index P r (t) = max t t (p(t ), p r ) and the leftmost position up to time t is a cell index P l (t) = min t t (p(t ), p l ), where p l and p r are respectively the leftmost and rightmost cells occupied by the input w.

Definition 3 (Periodic computation).
Let M be a Turing machine with periodic support.The computation of M is periodic if there is a sequence s of transition rules and a time t, such that sequence s is executed between times t + i|s| and t + (i + 1)|s| for all i ∈ N, where |s| is the number of rules in s.
Proof.After t time steps M has gone through a sequence of configurations c 1 c 2 . . .c t .There are two possible cases for the repeated sequence s, the sequence has either an equal or unequal number of left and right instructions.If there is an equal number of left and right instructions then after a further |s| time steps we get c t , c t+1 , . . ., c t+s where c t and c t+s are identical.So in this case the set of configurations reachable from c 1 is the finite regular set {c 1 , c 2 , . . ., c t+s−1 }.
If the number of left and right instructions in s are not equal, then we need only consider the case where there are more right than left instructions (as the case of more left than right instructions is symmetric).At time t we have a configuration c t = uu 1 q x,1 α 1 v 1 such that the tape head visits the leftmost symbol in u 1 but does not revisit any symbol in u. Between times t and t + s sequence s is executed giving the configuration sequence c t c t+1 . . .c t+s where c t+i = uu i q x,i α i v i for 0 i < s and c t+|s| = uu u 1 q x,1 α 1 v 1 .In configuration c t+|s| the words u 1 and v 1 must appear immediately to the left and right of the tape head position as the sequence of symbols read when executing s in the |s| time steps following c t+|s| is identical to the sequence of symbols read in the |s| time steps following c t .Since the tape head will not visit any cell to the left of the leftmost symbol in u 1 when executing s the word u is not revisited by the tape head and is not altered for the remainder of the computation.For each subsequent execution of s another u is placed on the tape and so on iteration j + 1 of s we get a configuration sequence of the form c t+|s|j c t+|s|j+1 c t+|s|j+2 . . .c t+|s|(j+1) where c t+|s|j+i = u(u ) j u i q x,i α i v i and 0 i < s.So the set of configurations reachable from c 1 is the regular set {c 1 , c 2 , . . ., c t } ∪ u i (u ) * u i q x,i α i v i where 0 i < s.Lemma 2. Let M be a 2-state, 2-symbol Turing machine with periodic support.If, when M is started on a configuration c 1 , there exists an m ∈ N such that on more than |r|2 m+1 occasions the tape head of M is over a cell P r (t) and does not visit cell P r (t) − m after time t, then the set {c i |c 1 * c i } is regular.
Proof.Let uu q x αv r be a configuration at time t with |u | = m and the tape head over cell P r (t).If no cell to the left of P r (t) − m is visited after time t, then the future computation depends only on u q x αv r .By definition of P r (t) no cell to the right of the tape head's location at symbol α has yet been read and so v r must be a suffix of r.As a result, there are only |r|2 m+1 possible values for u q x αv r .So, after |r|2 m+1 times where the tape head is over cell P r (t) and no longer visits cell P r (t) − m, there are two times t j and t k that have the same value for u q x αv r .Since the future computation depends only on u q x αv r , the sequence of transition rules executed between times t j and t k are repeated ad infinitum.So from Lemma 1 the set Using a similar argument to the one used in Lemma 2 we get Comment 1.
Comment 1 Let M be a 2-state, 2-symbol Turing machine with periodic support.If, when M is started on a configuration c 1 , there exists an m ∈ N such that on more than |l|2 m+1 occasions the tape head of M is over a cell P l (t) and does not visit cell P l (t) + m after time t, then the set Comment 2 Let M be a Turing machine with periodic support.If M started on configuration c does not make at least 2 consecutive right moves an inifinite number of times and at least 2 consecutive left moves an infinite number of times, then it either enters a loop or gives a computation of the type describe by Lemma 1 or Comment 1, and so the set of reachable configurations is regular.
Definition 4 (Semi-periodic computation).Let M be a Turing machine with periodic support.The computation of M is semi-periodic if there are 2x + 2 sequences of transition rules, s r , s l , e 1 , e 2 . . .e x , h 1 , h 2 . . .h x , such that there is a time z where the sequence is executed between times t(i) and t(i + 1) for all i ∈ N, where 0, and −m < f (S) 0 where f (s) =(number of right instructions in sequence s)−(number of left instructions in sequence s).Also, for every instruction sequence y that is a prefix of s l we have f (y) −m, and for every instruction sequence y that is a prefix of s r we have f (y) m.
Proof.At time t(i) the sequence S is about to be executed by M for the (i + 1) th time.The configuration at time t(i) is given below on the left side of (1).From S in Definition 4 the execution begins with (s r ) i+1 , and so between times t(i)+|s r |k and t(i) + |s r |(k + 1) we execute the sequence s r , for 0 k i.In Equation ( 1) during the execution of each s r the tape head does not move to the left of the word u r,1 or to the right of the word v r,1 , and so since s r has more right move than left move instructions we can use an argument similar to the one used in Lemma 1 to show that after k iterations of s r (|s r |k time steps) the configuration on the right side of Equation ( 1) is produced.Continuing on, the left side of Equation (2) gives the configuration after i iterations of s r , and one further iteration of s r gives the configuration on the right.In the configuration on the right of Equation ( 2) the word v e1,1 = v r ,1 v e 1 , where v r ,1 is the length |v r,1 | − m word that appears immediately to the right of the tape head after the last s r in (s r ) i+1 has executed (recall that each s r shifts the tape head m cells to the right in the word v r,1 ).The leftmost (s r ) i+1 instruction sequence in S has now completed and so e 1 , the next sequence in S, executes.
In Equation ( 3) we show the |e 1 | times steps that complete the execution of e 1 .Before we proceed we explain the presence of the word u 1 (the length f (e 1 ) prefix of u ) that appears in the configuration on the right of Equation (3).Immediately following the execution of e 1 we execute the sequence (s l ) i+1 , and as usual we give words u l,1 and v l,1 such that during the execution of each s l the tape head does not move to the left of u l,1 or to the right of v l,1 .From Definition 4 we know that executing e 1 shifts the tape head f (e 1 ) cells to the right.So from Equation (3) after the execution of e 1 (before the first s l is about to execute) the tape head is at least f (e 1 ) cells to the right of the rightmost u subword in (u ) i+1 .For every prefix y of s l we have f (y) −m and so when executing s l the tape head does not visit cells more than m positions to the left of its initial location when it began s l .So since |u | = m and the initial tape head location is at least f (e 1 ) cells to the right of the rightmost u , the leftmost f (e 1 ) symbols in the rightmost u (i.e. the prefix word u 1 ) are not entered when executing the first s l and so we have u 1 to the left of u l,1 in Equation (3).Note that in Equation (3) permitting the tape head to enter cells to the left of u e1,1 when executing e 1 will not effect the value of u 1 , as it is only possible to iterate s l if u 1 is a prefix of u (see Equation ( 4)) and so the prefix value of u 1 is implied by the fact that (s l ) i+1 is executed immediately after e 1 .
The execution of sequence (s l ) i+1 as shown in Equation ( 4) proceeds in a manner similar to that of (s r ) i+1 .The main difference is that s l has more left move than right move instructions and so each successive s l sequence begins m cells further to the left.Following the execution of (s l ) i+1 , the sequence h 1 is executed as shown in Equation ( 5).In the configuration on the left of Equation ( 5) the word u h1,1 = u h 1 u 1 u l 1 , where u l 1 is the length |u l,1 | − m word that appears immediately to the left of the tape head after the last s l in (s l ) i+1 has executed (recall each s l shifts the tape head m cells to the left in the word u l,1 ).The word v 1 that appears in the configuration on the right of Equation ( 5) is the length f (h 1 ) suffix of v and its presence can be explained in a manner similar to that of u 1 in the previous paragraph.Continuing with the execution of sequence S, on the right side of Equation ( 5) following the execution of h 1 the configuration is ready to allow the next (s r ) i+1 sequence to execute.Note that unlike the configuration on the left of Equation ( 1), the configuration on the right of Equation ( 5) has the word v 1 to the left of (v ) i .This implies that (v ) i is a prefix of v 1 (v ) i as to execute (s r ) i+1 we must have the word (v ) i to the right of v r1,1 .This prefix property holds for each v j word produced by executing a h j sequence.Similarly all words of the form (u ) i u j share a suffix that allows (s r ) i+1 to execute, where u j is a word produced by executing an e j sequence (see Equation ( 3)).Returning to Equation ( 5), at the right end of the configuration v e 2 is of the correct form to allow e 2 to execute at the end of the (s r ) i+1 scan right, and following this we once again scan left with (s l ) i+1 where u h 2 allows the execution of h 2 .So the process of scanning right with (s r ) i+1 and left with (s l ) i+1 is repeated with the n th scan right given in Equation ( 6).This continues until the sequence S is completed for the value i, whereupon S begins for i + 1.The configurations for the n th iteration of S can be obtained from the configurations for the first iteration of S simply by increasing the number of u and/or the number of v words in each configuration.So the set of configurations reachable by M is the union of the finite set of configurations before the first iteration of S and the configurations indicated in Equations ( 1) to (6).

Reducing the Number of Cases through Symmetries
There are 4096 possible 2-state 2-symbol machines and in this section we show how to reduce the number of cases to the 378 machines given in Figure 1.Equation ( 7) below gives the form of an arbitrary 2-state 2-symbol Turing machine where σ i ∈ {0, 1}, d j ∈ {L, R} and q k ∈ {q a , q b }.In the sequel we denote each possible machine as a triple (Σ, D, Q) where Σ = {σ 1 , σ 2 , σ 3 , σ 4 }, D = {d 1 , d 2 , d 3 , d 4 }, and Q = {q 1 , q 2 , q 3 , q 4 }.Each Σ, D and Q has 16 possible values and here we show how to reduce the number of cases under consideration to 6, 7, and 9, respectively (see Tables 1 to 3).We do this by identifying symmetries using the notion of regular equivalent machines which we define below, and we also solve some of the simplest cases from Σ, D and Q.
Before we proceed we give some preliminary definitions and notation.Given a set with two elements {y, z} we define y = z and z = y.Given w = w 0 w 1 . . .w m ∈ {0, 1} * , we write w = w 0 w 1 . . .w m to denote the word obtained by flipping each bit w i ∈ {0, 1} in w .We define three functions g reverse , g b-flip and g s-flip each of which map a configuration c = u q x α v to another configuration as follows where if w = w 0 w 1 . . .w m then w = w m w m−1 . . .w 0 .
Definition 5. Given Turing machines M and M with periodic support, we say that M and M are regular equivalent if for every computation sequence c 1 c 2 . . .c t of M there is a computation sequence g(c 1 ) g(c 2 ) . . .g(c t ) of M and vice versa, where g ∈ {g reverse , g b-flip , g s-flip }.
Showing one direction of the equivalence is sufficient to prove that a pair of machines are regular equivalent as each function from g is its own inverse.Comment 3 follows from Definition 5 as regularity is closed under g, and used with Lemma 4 reduces the number of cases for Theorem 1.
Comment 3 Let M be a Turing machine with periodic support such that the set of configurations reachable from any arbitrary configuraiton is regular.Then if Turing machines M and M are regular equivalent, for every configuration of M with periodic support, the set of configurations reachable for M is regular.
Lemma 4. Let M be an arbitrary 2-state, 2-symbol Turing machine with periodic support.Then applying any one of the mappings in Equations ( 8) to (10) to all transition rules in M gives a regular equivalent Turing machine M .
f d-flip (q x , σ, σ , D, q y ) → (q x , σ, σ , D, q y ) ( f b-flip (q x , σ, σ , D, q y ) → (q x , σ, σ , D, q y ) ( f s-flip (q x , σ, σ , D, q y ) → (q x , σ, σ , D, q y ) ( Proof.To prove this lemma we show that for each mapping on M given by Equations ( 8) to (10) there is a g ∈ {g reverse , g b-flip , g s-flip }, such that for each computation sequence c 1 c 2 . . .c t of M there is a computation sequence g(c 1 ) g(c 2 ) . . .g(c t ) of M satisfying Definition 5 (recall that it is sufficient to prove only one direction of the equivalence).For each of the translations in Equations ( 8), ( 9) and (10) we set g to g reverse , g b-flip , or g s-flip , respectively.For example, if we apply the translation in Equation ( 8) to M , then for each computation sequence c 1 c 2 . . .c t of M there is a computation sequence g reverse (c 1 ) g reverse (c 2 ) . . .g reverse (c t ) of M .Each of the three cases (i.e.applying Equations ( 8), ( 9) or ( 10)) can easily be verified using an inductive argument showing that if M gives c i c i+1 then M gives g(c i ) g(c i+1 ).
It is a straightforward matter to apply the mappings in Lemma 4 to the cases in Tables 1 to 3 to show that every case not given in the tables is regular equivalent to a case that is in the tables.Applying the mapping in (9) to machines for Σ 1 , Σ 2 , Σ 3 and Σ 4 gives machines for the Σ cases (1, 1, 1, 1), (1, 1, 0, 1), (1, 1, 1, 0) and (1, 1, 0, 0) respectively1 .Applying the mapping in (10) to Σ 2 , Σ 3 and Σ 5 gives the Σ cases (0, 1, 0, 0), (1, 0, 0, 0), and (1, 0, 0, 1) respectively, and applying the mapping (9) and then (10) to Σ 2 and Σ 3 gives cases (0, 1, 1, 1) and (1, 0, 1, 1) respectively.We have now shown that 9 of the 10 possible Σ values not given in Table 1 are regular equivalent to cases in the table, and now the only case not covered is (0, 1, 0, 1).For Σ = (0, 1, 0, 1) the read symbol is the same as the write symbol for each transition rule and so it never changes the tape contents.It follows that if machines for the case (0, 1, 0, 1) enter the same cell more than twice they enter a loop and so computations for this case either loop or scan in one direction only never making 2 consecutive moves in the opposite direction and are thus covered by Comment 2. 1.The 16 possible cases for the 4 read symbols in (7) reduced to 6 cases.2. The 16 possible cases for the 4 move values in (7) reduced to 7 cases.Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 q1 = qa q b qa qa q b q b q b q b q b q2 = q b qa q b q b qa qa q b q b q b q3 = qa qa qa q b qa q b qa qa q b q4 = qa qa q b qa q b qa qa q b qa Table 3.The 16 possible cases for the 4 next state values in (7) reduced to 9 cases.
Applying the mapping in (8) to cases D 1 to D 7 in Table 2 gives 7 regular equivalent cases.The remaining cases, (R, R, R, R) and (L, L, L, L), need not be included in Table 2 as they are covered by Comment 2.
The 16 possible cases for Q are reduced to the 9 given in Table 3 by omitting the 7 cases where q 1 = q 2 = q a or q 3 = q 4 = q b .These 7 cases are not included in Table 3 as the behaviour for these cases is easily explained.To see this note that when we have q 1 = q 2 = q a state q a is a trap state where if we enter q a we never again enter state q b and so from that point on the computation is essentially that of a 1-state 2-symbol Turing machine.Taking the case q 1 = q 2 = q a , if the pair of transition rules for q a both have the same write symbol (i.e.σ 1 = σ 2 ) or shift direction (i.e.d 1 = d 2 ), or if the write symbol is the same as the read symbol for both rules (i.e.σ 1 = 0, σ 2 = 1) then when the machine enters q a the computation is periodic and from Lemma 1 this means that the set of reachable configurations is regular.For the remaining cases of q 1 = q 2 = q a we need only consider machines with the rules q a , 0, 1, R, q a and q a , 1, 0, L, q a as such machines are regular equivalent to all remaining cases for q 1 = q 2 = q a .When in state q a this machine scans right changing 0's to 1's until it reads a 1, and then it scans Fig. 1.An overview of the 378 cases given by Tables 1 to 3, which were obtained from the reduction in the number of cases given in Section 3.Each small square in the above figure represents a Turing machine.There is a 3 × 3 block of small squares for each (Σi, Dj) pair which gives the 9 possible values for Qi.Letter A indicates a reduction to a symmetric case, B is for machines that have periodic computations, C is for machines that give semi-periodic computations, and E is for machines that are binary counters.
left changing 1's to 0's until it reads a 0, and this left scan right scan behaviour is repeated ad infinitum giving a semi-periodic computation.So from Lemma 3 the set of reachable configurations for machines with q 1 = q 2 = q a is regular.The same argument is applicable to the case q 3 = q 4 = q b .
4 Solving Cases in Figure 1 4

.1 Case A: Reduce the Number of Cases Using Symmetries
From Comment 3 we know that if a pair of machines M and M are regular equivalent we need only consider one of the two machines in our list of open cases.Table 4 shows that if the square in Figure 1 for a machine (Σ i , D j , Q k ) contains an A then it is regular equivalent to another machine in the figure whose square does not contain an A. This means that we need not consider Case A machines because by solving the remaining cases each machine in Case A will be regular equivalent to a case that has been solved.
Table 4. Lemma 4 mappings that map each A case in Figure 1 to a non-A case in Figure 1.The mappings given on the left of each row are applied to the cases in that row to show that each case is regular equivalent to another case in Figure 1.Here Q ∈ {Q1, Q2, . . .Q9}, Qm ∈ {Q2, Q5, Q6, Q9}, Q l ∈ {Q6, Q8, Q9}, and Qp ∈ {Q5, Q8, Q9}.Keep in mind Footnote 1 when applying f b-flip .

Cases B: Machines That Give Periodic Computations
In Figure 1, if the square for a machine (Σ i , D j , Q k ) contains a B then the machine's computation is periodic.From Lemma 2 and Comment 1, periodicity can be proved by showing that a machine eventually scans right never again visiting cell i−m after it visits cell i, or alternatively that the head scans left never again visiting cell i + m after cell i.To achieve this we consider what happens after the tape head attempts to scan in the opposite direction after either 2 consecutive right moves or 2 consecutive left moves.Comment 2 allows us to consider only machines that make consecutive left moves and consecutive right moves.As an example of the above technique we show that after machine (Σ 5 , D 6 , Q 8 ) (given in (11)) makes 2 or more consecutive left moves it scans left for the rest of the computation never again visiting cell i + 3 after it visits cell i. q a , 0, 0, L, q b q a , 1, 1, R, q b q b , 0, 1, L, q a q b , 1, 0, R, q b (11) If the tape head is about to make a right move that follows 2 consecutive left moves then either the configuration has the form given on the left of (12) or it has the form given on the left of (13) (where σ i , σ −i ∈ {0, 1}).On the right of (12) we see that after 4 time steps the configuration has the same form as the configuration on the left side of (13) (so we need consider only the case in ( 13)).
On the right of ( 13) we see that after 3 time steps the tape head is now reading σ −1 , one cell to the left of its original position.If σ −1 = 0 the tape head will move left again to make its second consecutive left move and so if we wish to make a right move in the future it will follow 2 consecutive left moves and we will repeat the entire sequence of steps we have just described.Alternatively, if σ −1 = 1 then we have the same case as the left side of (13) and the 3 steps in (13) are repeated.For both cases ( 12) and ( 13) the process repeats with the tape head moving left never visiting cell i + 3 after it has entered cell i, and so from Comment 1 the computation is periodic.The technique given here can be applied to all B cases in Figure 1 to show that they have periodic computations.

Cases C: Machines That Give Semi-Periodic Computation
From the proof of Lemma 3 a semi-periodic machine operates by scanning right using a repeating sequence of rules that print a repeating pattern until some sequence of symbols is met on the tape that causes the machine to end the scan right, and following this the machine scans left printing out another repeating pattern until it meets another sequence of symbols on the tape that causes the scan left to end.The entire process is then repeated.The behaviour of the machine when ending a rightward scan depends on the sequence of symbols it reads when it ends the scan right.The scan length increases with each subsequent pass and the sequence of symbols that ends each scan is provided by the blank word that is repeated to the right of the input.Since there is only a finite number of positions at which a scan right can end in relation to the right blank word the behaviour of the machine at the end of scans to the right becomes periodic over time.This can be seen in Definition 4 and Lemma 3 where the first scan right ends with e 1 , the second scan ends with e 2 , the third with e 3 , and so on until scan x which ends with e x .Following scan x the process is repeated with e 1 ending the next scan right.The same is true for scans left with the sequence h 1 , h 2 , . . .h x being repeated once for every x scans to the left.When a 2-state 2symbol machine is executing a semi-periodic computation the patterns it prints during leftward and rightward scans have length 2 and the behaviour at the end of left and right scans are repeated periodically as described above.For this reason it is straightforward to determine when a 2-state 2-symbol machine is executing a semi-periodic computation.
As an example let us consider the machine (Σ 6 , D 6 , Q 3 ) given in (14).It is easy to determine the behaviour of this machine just by looking at its instructions.The machine scans left in state q a reading 0's and printing 1's to the tape until it reads a 1, then it scans right in state q b reading 1's and printing 0's until it reads a 0, and then it begins another scan left in q a .We now show how this behaviour matches the behaviour of the sequence S given in Definition 4. In the scans mentioned above the growth to the left depends on the position of 1s in the left blank word as each 1 terminates a scan left, and similarly the growth to the right depends on the position of 0s in the right blank word.Since the left and right blank words are repeated periodically the growth is periodic for some constant number of scans right, this constant is the x value in sequence S. We set sequences s r and s l so that f (s r ) = m and f (s l ) = −m (see Definition 4) where m is the growth over the x scans left and right during an iteration of S, and this means that during iteration i of S, scans right have the form (s r ) i+1 and scans left have the form (s l ) i+1 .To account for the growth between successive left and right scans during a single iteration of S, we define each e j and h j so that the extra distance traveled between each successive execution of (s r ) i+1 or (s l ) i+1 during S is considered part of e j or h j .This completes our explanation of how to give the 2x+2 sequence that define S in Definition 4. All the machines for Case C can be shown to be semi-periodic using similar analysis to that given above.q a , 0, 1, L, q a q a , 1, 0, R, q b q b , 0, 1, L, q a q b , 1, 0, R, q b (14)

Cases E: Binary counters
The two binary machines in Figure 1 compute in a similar manner and so we will just look at machine (Σ 5 , D 6 , Q 3 ) given in (15).Below we show (Σ 5 , D 6 , Q 3 ) incrementing from 4 to 8. The left most 1 is not part of the number and the most significant bit is on the right.To increment a number the machine scans right in q b changing 1's to 0's until it reads a 0 which it changes to a 1 and it then scans left in q a until it reads a 1, which signals the beginning of the next increment.
It is easy to see that when started on any configuration the set of configurations generated by this machine is regular as it generates all possible strings and the scans left and right that increment the number have a simple form.If the machine has periodic support then the set of reachable configurations remains regular.
The repeated words on the left have no effect on the computation as the tape head can not move left over a 1.On the right when each blank words becomes part of the computation it effects the form of only a constant number of bits at the right end of the number and so the set of reachable configurations is regular.