<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Linear-Time Limited Automata</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Extended Abstract?</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dipartimento di Informatica, Universit degli Studi di Milano</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The time complexity of 1-limited automata is investigated from a descriptional complexity view point. Though the model recognizes regular languages only, it may use quadratic time in the input length. We show that, with a polynomial increase in size and preserving determinism, each 1-limited automaton can be transformed into an halting lineartime equivalent one. We also obtain polynomial transformations into related models, including weight-reducing Hennie machines, and we show exponential gaps for converse transformations in the deterministic case.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        ? This work is an extended abstract of the conference paper [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
1 In nondeterministic linear-time devices each accepting computation has linear length.
point of view, this means that providing two-way nite automata (2nfas) with
the ability to overwrite the tape cells, does not extend the expressiveness of the
model, as long as the time is linearly bounded in the length of the input.
      </p>
      <p>
        Unfortunately, Hennie proved that it is undecidable, given a deterministic
one-tape Turing machine, to check whether it works in linear time over all input
strings, namely, whether it is actually a Hennie machine. To avoid this drawback,
Pr•†a proposed a variant of Hennie machine, called weight-reducing Hennie
machine, in which the time limitation is syntactic [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. In this model, each visit of a
cell should overwrite its content with a symbol in a decreasing way, with respect
to some xed order on the working alphabet. As a consequence, the number of
visits of a cell by the head is bounded by some constant ( i.e., not depending on
the input length) whence the device works in linear time over every input string.
      </p>
      <p>
        By contrast to Hennie machines, the d-limited automata (d-la) introduced
by Hibbard, restrict nondeterministic linear bounded automata by allowing
overwriting of each tape cell during its rst d visits only, for some xed d 0 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
Contrary to weight-reducing Hennie machines, the head is still allowed to visit
a cell after the d-th visit, but it cannot rewrite its content anymore. This allows
to use super-linear time, as shown in the following example.
      </p>
      <p>Example 1. We consider the language</p>
      <p>Ln = fx0x1</p>
      <p>xk j k 2 N; xi 2 fa; bgn; #fi &gt; 0 j xi = x0g is oddg.</p>
      <p>A deterministic 1-la An may recognize Ln as follows. It rst overwrites the
factor x0, replacing each input symbol with a marked copy. Then, An repeats a
subroutine which overwrites a factor xi with some xed symbol ], while checking
in the meantime whether xi equals x0 or not. This can be achieved as follows.
Before overwriting the j-th symbol of xi, rst, An, with the help of a counter
modulo n, moves the head leftward to the position j of x0 and stores the
unmarked scanned symbol in its nite control; second, it moves the head
rightward until reaching the position j of xi, namely, the leftmost position that has
not been overwritten so far. At this point, An compares the scanned symbol ( i.e.,
the j-th symbol of xi) with (i.e., the j-th symbol of x0). By counting modulo 2
the number of factors equal to x0, and nally checking that the input string has
length multiple of n, An can decide the membership of the input to Ln.</p>
      <p>It is possible to implement An with a number of states linear in n and # +1
working symbols. Since for each position of a factor xi, i &gt; 0, the head has to
move back to the factor x0, we observe that An works in quadratic time in the
length of the input string.</p>
      <p>
        For each d 2, Hibbard proved that d-la recognize exactly the class of
context-free languages . He furthermore showed the existence of an innite
hierarchy of deterministic d-la, whose rst level ( i.e., corresponding to deterministic
2-la) has been later proved to coincide with the class of deterministic context-free
languages [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. (See [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and references therein for further connections between
limited automata and context-free languages.)
      </p>
      <p>
        Clearly, 0-limited automata are no more than two-way nite automata. Hence,
they characterize the class of regular languages. Wagner and Wechsung extended
this result to the case d = 1: 1-la recognize exactly the class of regular
languages [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. From that point, the question of the cost of their simulation by
classical nite automata has been studied by Pighizzini and Pisoni in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], where
a tight doubly-exponential simulation by deterministic one-way nite automata
is proved. This cost reduces to a single exponential when starting from a
deterministic 1-la. Also, an exponential lower bound, using a single-letter input
alphabet, has been obtained in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], for the simulation of deterministic 1-la
by 2nfa.
      </p>
      <p>Like d-limited automata, 1-limited automata can operate in super-linear time
(cf., Example 1). This contrasts with Hennie machines which operate in linear
time by denition. The question we address in this paper is whether this ability
of 1-limited automata with respect to Hennie machines yields a gap between the
two models in terms of the size of their representations.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Results</title>
      <p>
        We show that, with a polynomial increase in size, each 1-limited automaton can
be transformed into an halting linear-time 1-limited automaton. This is achieved
by augmenting the exponential cost simulation of 1-la by 2nfa given in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
(which in turn augments Shepherdson’s classic conversion of 2dfas to 1dfas [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ])
with a method for storing and accessing a carefully chosen subcollection of the
many Shepherdson tables that a 1nfa would need to remember in its states:
the simulating automaton can both store the tables (despite the 1-limitation)
and access them eciently (in both size and time).
      </p>
      <p>Theorem 1. For each 1-la A, there exists an equivalent 1-la A0 satisfying:
1. A0 has polynomial size with respect to A;
2. in every computation of A0, each tape cell is visited a number of times which
is bounded by some polynomial in the size of A;
3. A0 works in linear time: on every input string w, it halts within O(jwj) steps;
4. if A is deterministic, then so is A0.</p>
      <p>Linear-time 1-las are particular cases of Hennie machines, hence, it follows
from the above result that any 1-la can be transformed into a Hennie machine of
size polynomial in the size of the 1-la. Using Item 2 we can actually strengthen
the result: each 1-la can be transformed into a weight-reducing Hennie machine
of polynomial size.</p>
      <p>Corollary 1. For each 1-la A, there exists an equivalent weight-reducing
Hennie machine A0 of size polynomial in the size of A. Furthermore, if A is
deterministic, then so is A0.</p>
      <p>
        We also observe that the 1-limited automaton resulting from the construction
of Theorem 1 can be easily transformed into an equivalent one whose behavior
can be divided into two phases: (1) an initial phase consisting in a left-to-right
exp [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
exp
one-way traversal of the input, during which each input symbol is
nondeterministically overwritten; (2) a second phase consisting in a read-only two-way
computation. Similar behaviors have been considered in the context of regular
transductions (i.e., transductions computed by, for instance, two-way
transducers), because of their correspondence with global existential quantication in
monadic second order logic , see, e.g. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Using terminology from [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], we dene
the model of two-way automaton with common guess (2nfa+cg) in order to
capture these particular behaviors of 1-limited automata. Formally, such machines
are not 1-limited automata, but the composition of an initial common guess
(i.e., a nondeterministic marking of the input symbols using symbols from a
nite alphabet, computed, for instance, by a 1-state letter-to-letter
nondeterministic one-way transducer ) with a two-way automaton working on the enriched
alphabet. Notice that a deterministic two-way automaton with common guess
(2dfa+cg), is not a deterministic device, since it initially performs a common
guess which is nondeterministic by denition. We also point out that 2dfa+cgs
correspond to synchronous two-way deterministic nite veriers [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
Corollary 2. For each 1-la (resp., deterministic 1-la), there exists an
equivalent halting 2nfa+cg (resp., 2dfa+cg) of polynomial size.
      </p>
      <p>A direct consequence of this last result, is that reversing a 1-limited
automaton, i.e., transforming it into another one recognizing the reverse of its accepted
language, has polynomial cost. This fails in the deterministic case, for which
we exhibit an exponential lower bound. As a consequence, we obtain
exponential lower bounds for the simulation of deterministic weight-reducing Hennie
machines or deterministic two-way automata with common guess by
deterministic 1-limited automata.</p>
    </sec>
    <sec id="sec-3">
      <title>Theorem 2. Let Ln be the language of Example 1. Hence</title>
      <p>Lnr = fxkxk 1</p>
      <p>x0 j k &gt; 0; xi 2 fa; bgn; #fi &gt; 0 j xi = x0g is oddg.</p>
      <p>The results are summarized in Figure 1.</p>
      <p>Acknowledgement. We are very indebted to Giovanni Pighizzini for suggesting
the problem and for many stimulating conversations.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. Boja«czyk,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Daviaud</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Guillon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Penelle</surname>
          </string-name>
          ,
          <string-name>
            <surname>V.</surname>
          </string-name>
          :
          <article-title>Which classes of origin graphs are generated by transducers</article-title>
          .
          <source>In: ICALP 2017. LIPIcs</source>
          , vol.
          <volume>80</volume>
          , pp.
          <volume>114</volume>
          :
          <issue>113</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Guillon</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prigioniero</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Linear-time limited automata</article-title>
          .
          <source>In: DCFS 2018. LNCS</source>
          , vol.
          <volume>10952</volume>
          . Springer (
          <year>2018</year>
          ), to appear.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Hennie</surname>
            ,
            <given-names>F.C.</given-names>
          </string-name>
          :
          <article-title>One-tape, o-line Turing machine computations</article-title>
          .
          <source>Information and Control</source>
          <volume>8</volume>
          (
          <issue>6</issue>
          ),
          <volume>553578</volume>
          (
          <year>1965</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Hibbard</surname>
            ,
            <given-names>T.N.:</given-names>
          </string-name>
          <article-title>A generalization of context-free determinism</article-title>
          .
          <source>Information and Control</source>
          <volume>11</volume>
          (
          <issue>1</issue>
          /2),
          <volume>196238</volume>
          (
          <year>1967</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Hopcroft</surname>
            ,
            <given-names>J.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ullman</surname>
            ,
            <given-names>J.D.</given-names>
          </string-name>
          :
          <article-title>Introduction to Automata Theory, Languages and Computation</article-title>
          .
          <string-name>
            <surname>Addison-Wesley</surname>
          </string-name>
          (
          <year>1979</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Kapoutsis</surname>
            ,
            <given-names>C.A.</given-names>
          </string-name>
          :
          <article-title>Predicate Characterizations in the Polynomial-Size Hierarchy</article-title>
          . In: Conference on Computability in Europe. pp.
          <fpage>234244</fpage>
          . Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Kutrib</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pighizzini</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wendlandt</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Descriptional complexity of limited automata</article-title>
          .
          <source>Inf. Comput</source>
          .
          <volume>259</volume>
          (
          <issue>2</issue>
          ),
          <volume>259276</volume>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Pighizzini</surname>
          </string-name>
          , G.:
          <article-title>Nondeterministic one-tape o-line Turing machines</article-title>
          .
          <source>Journal of Automata, Languages and Combinatorics</source>
          <volume>14</volume>
          (
          <issue>1</issue>
          ),
          <volume>107124</volume>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Pighizzini</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pisoni</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Limited automata and regular languages</article-title>
          .
          <source>International Journal of Foundations of Computer Science</source>
          <volume>25</volume>
          (
          <issue>07</issue>
          ),
          <volume>897916</volume>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Pighizzini</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pisoni</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Limited automata and context-free languages</article-title>
          .
          <source>Fundamenta Informaticae</source>
          <volume>136</volume>
          (
          <issue>1-2</issue>
          ),
          <volume>157176</volume>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Pighizzini</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prigioniero</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Limited automata and unary languages</article-title>
          .
          <source>In: DLT 2017. LNCS</source>
          , vol.
          <volume>10396</volume>
          , pp.
          <volume>308319</volume>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Pr</surname>
          </string-name>
          <article-title>•†a, D.: Weight-reducing Hennie machines and their descriptional complexity</article-title>
          .
          <source>In: LATA 2014. LNCS</source>
          , vol.
          <volume>8370</volume>
          , pp.
          <volume>553564</volume>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Shepherdson</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          :
          <article-title>The reduction of two-way automata to one-way automata</article-title>
          .
          <source>IBM J. Res. Dev</source>
          .
          <volume>3</volume>
          (
          <issue>2</issue>
          ),
          <volume>198200</volume>
          (
          <year>1959</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Tadaki</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yamakami</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>J.C.H.</given-names>
          </string-name>
          :
          <article-title>Theory of one-tape linear-time Turing machines</article-title>
          .
          <source>Theor. Comput. Sci</source>
          .
          <volume>411</volume>
          (
          <issue>1</issue>
          ),
          <volume>2243</volume>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Wagner</surname>
            ,
            <given-names>K.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wechsung</surname>
            ,
            <given-names>G.: Computational</given-names>
          </string-name>
          <string-name>
            <surname>Complexity</surname>
          </string-name>
          . D. Reidel Publishing Company, Dordrecht (
          <year>1986</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>