Stateless Multicounter 5′ → 3′ Watson-Crick
Automata
Ömer Eğecioğlu1 , László Hegedüs2 and Benedek Nagy2
1: Department of Computer Science, University of California,
Santa Barbara, CA 93106, USA
Email:
[email protected]
2: Department of Computer Science, Faculty of Informatics,
University of Debrecen, Debrecen, 4032 Hungary
Email:
[email protected],
[email protected]
Abstract—The model we consider are stateless counter
machines which mix the features of one-head counter
machines and special two-head Watson-Crick automata
(WK-automata). These biologically motivated machines
have reading heads that read the input starting from
the two extremes. The reading process is finished when
the heads meet. The machine is realtime or non-realtime
depending on whether the heads are required to advance at
each move. A counter machine is k-reversal if each counter
makes at most k alternations between increasing mode
and decreasing mode on any computation, and reversal
bounded if it is k-reversal for some k. In this paper we
concentrate on the properties of deterministic stateless
realtime WK-automata with counters that are reversal
bounded. We give examples and establish hierarchies with
respect to counters and reversals. Even 1-counter stateless
WK-automata turn out to be quite powerful.
I. I NTRODUCTION
Watson-Crick automata ([3], [15]) are finite state
machines motivated by nature. They work on DNA
molecules, i.e., on double stranded sequences of
bases. The strands of a DNA molecule have directions as a resut of the underlying chemical bonds,
determining the 5′ and 3′ ends of a strand. The two
strands of a molecule are paired by hydrogen bonds
if they have opposite directions and the sequence
of bases match each-other, i.e., there is a one-toone correspondence given by the so-called WatsonCrick complementarity relation. In this way a strand
of the molecule uniquely defines the other, and
therefore the DNA molecules can be described by
ordinary strings (as, for instance, in [9], [10]). In
5′ → 3′ Watson-Crick automata the reading heads
start from the 5′ ends of their strands, i.e. from
opposite ends of the molecule regarding its physical
body or mathematical description. These automata
have been used to characterize linear context-free
languages in [12]. In this paper we consider only
5′ → 3′ Watson-Crick automata, and consequently
use the terminology WK-automata and omit the
qualification 5′ → 3′ .
Stateless machines (i.e. machines with only one
state) have been the subject of recent investigation
because of their connection to to certain aspects
of membrane computing and P systems, a subarea
of molecular computing that was introduced by
Gheorge Păun [13], [14]. A membrane in a P
system consists of a multiset of objects drawn from
a given finite type set {a1 , . . . , am }. The system
has no global state and works on the evolution of
objects in a massively parallel way. Thus, the membrane can be modeled as having counters c1 , . . . , cm
to represent the multiplicities of objects of types
a1 , . . . , am , respectively. The P system can then be
thought of as a counter machine in a nontraditional
form: without states, and with parallel counter increments/decrements. It is therefore natural to consider
the model of computation which has no states but is
equipped with counters. These are the two features
that motivate the study of stateless multicounter
WK-automata.
Stateless machines have no states to store information, and the move of such a machine depends
only on the symbol(s) scanned by the input head(s)
and the local portion of the memory unit(s). Since
there are no final states, acceptance of an input
string has to be defined in a different way. It is
well known that nondeterministic PDA with states
are equivalent to stateless nondeterministic PDA
(where acceptance is by “null” stack) although this
is not true for the deterministic case [4], [7]. In
[6], [16] the computing power of stateless multihead
automata with respect to decision problems and
head hierarchies were investigated. The machine can
be deterministic, nondeterministic, one-way, twoway, etc. In [8], various types of stateless restarting
automata and two-pushdown automata were compared to the corresponding machines with states.
If the machine is not allowed to make moves
without moving at the read head, then the model
is called realtime. Otherwise the machine is nonrealtime and can make moves that depend only
on the contents of the counters without moving
the head. A counter machine is k-reversal if each
counter makes at most k “full” alternations between
increasing mode and decreasing mode and viceversa on any computation (accepting or not), and
is reversal bounded if it is k-reversal for some k.
Deterministic stateless (one-way) m-counter machines were investigated in [1], where hierarchies
with respect to the number of counters and number
of reversals were studied. Similar hierarchy results
and characterizations are reported in [5] for the
non-realtime versions. Hierarchies of the accepted
language families by WK-automata are presented in
[11] including stateless versions without counters.
In this paper we concentrate on deterministic stateless realtime WK-automata with counters. We give
examples and establish hierarchies of WK-automata
with respect to counters and reversals.
II. S TATELESS MULTICOUNTER WK- AUTOMATA
The version of stateless WK-automata with counters has the following components. The input is
of the form cw$ with w ∈ Σ∗ and c and $ are
endmarkers that are not in Σ. The machine has two
read-only heads H1 , H2 . H1 moves from left to right
and H2 moves from right to left. Originally, H1
is on c and H2 is on $. The machine is equipped
with m counters, that are initially all zero. A move
of the machine depends on the symbols under
the heads and the signs of the counters (zero or
positive), and consists of moving the heads and at
the same time incrementing or decrementing each
of the counters. Depending on the types of head
movements allowed, we obtain different classes of
machines. Since there are no states, the acceptance
of the input cannot be defined by final state. Instead,
the input w is accepted by M if the counters are
again zero when the heads meet.
The essence of when the heads H1 and H2 meet is
captured best by making use of a function φ which
indicates whether the heads are close or far apart in
processing the input. This locality requirement can
be justified in part by biological properties that give
rise to WK-automata. For the model it suffices to
know if there are zero, one, two, or more than two
letters between the heads. Define
p
if there are p letters between
the two heads of M and p ≤ 2,
φ(M ) =
∞
if there are more than two letters
between the heads of M .
We use the notation φ(M ) although φ is actually a
function of the current positions of the heads of M .
For a deterministic stateless multicounter WKautomaton M , a move
(x, y; s1 , s2 , . . . , sm ; p) → (d1 , d2 ; e1 , e2 , . . . , em )
(1)
has the following parameters: x, y ∈ Σ ∪ {c, $} are
the symbols under the heads H1 and H2 , respectively; si is the sign of counter Ci : si = 0 if the i-th
counter is zero, si = 1 if it is positive. s1 s2 · · · sm is
referred to as a sign vector; d1 , d2 ∈ {0, 1} indicate
the direction of move of the heads with d1 +d2 ≤ p.
A 0 value signifies that the head stays where it is.
d1 = 1 means that H1 moves one cell to the right,
and d2 = 1 means that H2 moves one cell to the left;
ei = +, −, or 0, corresponding to the operations
of increment, decrement, or leave unchanged the
contents of the i-th counter. Here ei = − applicable
only if si = 1. A move (1) is possible if and only if
φ(M ) = p. It should be noted that φ(M ) is not part
of the system, nor it is a counter, just a technical
parameter. M is nondeterministic if multiple choices
are allowed for the right hand side of (1).
The machine is realtime if not both d1 and d2 are
zero for any move of the machine. Otherwise it is
non-realtime. Thus in a realtime machine at least
one of the heads must move at every step of the
computation. In this paper we focus on deterministic
realtime WK-automata with counters.
The machine is k-reversal if for a specified k,
no counter makes more than k alternations between
increasing mode and decreasing mode (i.e. k pairs
of increase followed by decrease stages) in any computation, accepting or not. The machine is reversal
bounded if it is k-reversal for some k.
We denote the set of all realtime (deterministic)
k-reversal m counter non-realtime WK-automata by
WKCkm , and the realtime versions by RWKCkm . The
reversal bounded versions are given by
WKC∗m =
∞
∪
k=0
WKCkm , RWKC∗m =
∞
∪
RWKCkm ;
k=0
while the unbounded reversal versions are denoted
∞
by WKC∞
m and RWKCm . This notation is also used
for the corresponding language classes.
The formal definition of deterministic stateless
multicounter WK automata is as follows.
Definition 1: A deterministic stateless multicounter WK-automaton is a quadruple M =
(Σ, δ, c, $) where Σ is a nonempty alphabet, δ is a
mapping from (Σ ∪ {c, $})2 ×{1, 0}m ×{0, 1, 2, ∞}
to {0, 1}2 ×{0, +, −}m and c, $ ̸∈ Σ are two specia
symbols called endmarkers.
Note that in the nondeterministic case, δ is a
mapping from (Σ ∪ {c, $})2 ×{1, 0}m ×{0, 1, 2, ∞}
to P ({0, 1}2 ×{0, +, −}m ) i.e., to the subsets of
{0, 1}2 ×{0, +, −}m .
(d1 , d2 ; e1 , e2 , . . . , em ), x must be equal to y. This
is because both heads would read the same symbol,
so x ̸= y is not possible.
An instantaneous description (ID) of M with
input cw$ is a tuple
(s1 , s2 , , . . . , sm , cx⌈y⌋z$)
where si is the sign of the i-th counter and w = xyz
with the left head reading the first letter of y and
the right head reading the last letter of y. The initial
ID of M is (0, 0, . . . , 0, ⌈cw$⌋). We use ID1 ⊢ ID2
to indicate the change in the ID after a single move
of M . ⊢∗ denotes the reflexive, transitive closure of
⊢. The language accepted by M is
{w ∈ Σ∗ | (0, 0, . . . , 0, ⌈cw$⌋) ⊢∗
(0, 0, . . . , 0, cx⌋⌈z$) with w = xz} .
III. E XAMPLES AND THE 1- REVERSAL CASE
We start with the following examples.
Example
The language of palindromes L = {w|w = wR }
over an alphabet Σ is accepted by a stateless deterministic realtime WK-automaton without counters.
The machine only makes a move when the symbols under both heads are equal. If the length of the
input word is odd, the last symbol can be read by
either head. This way the machine accepts exactly
the palindromes over Σ.
Remark
The language family det-2Lin (see [11], for more
In the examples, the ⌈ and ⌋ symbols are used to
details on this family) is accepted by deterministic
indicate the read heads H1 and H2 respectively.
2-head automata in such a way that the heads start
Thus, while an automaton is reading some word
from the opposite ends of the input and proceed
a1 a2 . . . an over Σ∗ , the string
until they meet.
a1 a2 . . . ak−1 ⌈ak ak+1 . . . al−1 al ⌋al+1 . . . an
By simulating deterministic finite automata, or
deterministic 2-head (i.e., deterministic 5′ → 3′
with w = a1 a2 · · · an signifies that the left head is
WK) automata, it is easy to show that all regular and
reading the symbol ak and the right head is reading
all det-2Lin languages can be accepted by determinthe symbol al .
istic non-realtime multicounter WK-automata with
Note that if one of the heads never moves, then
unbounded reversals. The simulation goes by binary
the machine is of the type already considered in [1],
counters, i.e., every counter refers for a unique
[5]. If both heads of M move, then ⌈, H1 and ⌋, H2
state of the simulated automaton, noting that the
can be used synonymously.
initial configuration refers also for the starting state.
Remark
When the machine senses that the input is fully read
If there is only one symbol between the two heads, (i.e., in the last step), the counters used to simulate
in any move of the form (x, y; s1 , s2 , . . . , sm ; 1) → accepting states can be emptied.
Stateless deterministic realtime WK-automata of the word, at least one of the counters must be
with counters that are 1-reversal are already quite increased/decreased for otherwise a word with an
powerful as the following examples show:
additional a or b would also be accepted. It follows
that after at most 3m increasing steps there must
Example
be a one in which at least one counter decreases.
Let Σ = {a, b, c, d}. Consider the stateless WKFollowing this, after at most 3m decreasing steps
automaton M with two counters whose moves are
there must be a step when a counter increases again.
Then after at most 3m steps a counter must decrease
(c, $; 0, 0; ∞) → (1, 1; 0, 0)
again, and so on. Therefore for enough long word
(a, d; 0, 0; ∞) → (1, 1; +, +)
2
((ab)7m k works) we can find a counter which makes
(a, d; 1, 1; ∞) → (1, 1; +, 0)
more than k reversals. This contradiction gives the
(b, c; 1, 1; ∞) → (1, 1; −, 0)
proof of the theorem for this case. If only the second
head moves in M , the proof is similar.
(b, c; 1, 1; 2) → (1, 1; −, −)
Now we consider the case in which both heads
Then M is 1-reversal and accepts the language
move in the accepting computation on (ab)n . Then
{an bn cn dn | n ≥ 0}.
there are two possibilities: if the machine M
senses that their heads are close to each other
The well known mildly context-sensitive, non- when only one letter is being read to finish the
context-free language {an bn cn | n ≥ 0} can also input, then at this point every counter must be
be accepted in a similar way.
0 or 1. Before this configuration both of the
Therefore non context-free languages can be ac- heads moved. There were three letters between
cepted by a small number of counters and with only them (configurations (c , c , . . . , c , cu⌈aba⌋v$) or
1 2
m
one reversal.
(c1 , c2 , . . . , cm , cu⌈bab⌋v$)) and every counter value
IV. R ESTRICTION OF REVERSAL BOUNDEDNESS ci was 0, 1 or 2. Since M has no knowledge that the
For w ∈ Σ∗ and a ∈ Σ, define |w|a as the input will be processed in two steps, the last but one
number of occurrences of a in w and consider the configuration is reached in a deterministic manner,
language L = {w | w ∈ {a, b}∗ , |w|a = |w|b }. It is even if the input is rlonger. Thus,r working on longer
v (or ub(ab) v) (with r > 1) the
known that L can be accepted by a stateless non- input words ua(ba)
r−1
′
′
′
⌋av$) (or
configuration
(c
,
c
,
1 2 . . . , cm , cua⌈b(ab)
realtime 1-reversal 2-counter machine M but not by
′
′
r−1
′
a stateless realtime k-reversal m-counter machine (c1 , c2 , . . . , cm , cub⌈a(ba) ⌋bv$) is obtained with
for any k, m ≥ 1. We show that this result also counters having possible values only 0’s and 1’s.
Then if r = 2, then the input must be accepted in
holds for WK-automata.
at most 3 steps, therefore not any counters can have
Theorem 1: The language L = {w | w ∈ value more than 3 in this computation. Moreover
{a, b}∗ , |w|a = |w|b } cannot be accepted by a state- at least one counter is changed in every step of the
less realtime k-reversal m-counter WK-automaton computation. When there are two letters between the
for any k, m ≥ 1.
heads when they sense their distance is small, then
Proof: Suppose L is accepted by some realtime at this configuration the value of every counter is 0,
k-reversal m-counter WK-automaton M . Then ev- 1 or 2. For longer input words the same holds if the
ery word of the regular language (ab)∗ is accepted. heads read the same prefix and suffix of the input
If a word (ab)n is accepted by the machine in a way word. Therefore in this computation the possible
that only one of the heads moves while the other values of counters cannot exceed 3.
stays put, then the value of every counter is among In both cases for long enough words the accepting
0, 1, 2, 3 at any time. This is because arbitrarily long computation has more than k reversals, by a similar
words in (ab)∗ are accepted and when the machine argument as we showed for the case when only one
senses that there are at most 2 letters to finish the head moves during the computation.
input, it must be possible to decrease all counters
to zero in two steps. Moreover reading any letter
reversals.
Remark
∗
The language L = {w ∈ {a, b} | |w|a = |w|b }
given in Theorem 1 can be accepted with a stateWe briefly consider the following combinatorial
less deterministic realtime WK-automaton with un- question: For 1-reversal stateless WK-automata with
bounded reversals.
m counters over Σ = {a} that accept singletons,
what is the length of the longest string an that can
be accepted as a function of m? A similar consideration was used to establish the counter hierarchy in
V. T HE UNARY CASE
the case of stateless deterministic realtime reversal
A number of interesting combinatorial issues bounded multicounter machines in [1]. We omit the
arise in the case of the unary alphabet Σ = {a}. It is proof of the following result that holds for the WKknown that the language L = {a2n | n ≥ 1} cannot automata case.
be accepted by any stateless deterministic nonTheorem 3: The maximal length of the word
realtime reversal bounded multicounter machine.
n
a
accepted by stateless deterministic 1-reversal mHowever this language can be accepted by a stateless realtime WK-automaton without counters, with counter WK-automaton that accepts a singleton is
the following three deterministic rules:
n = (m − 1)2m+1 + 2m.
(c, $; ; ∞) → (1, 1; )
(a, a; ; ∞) → (1, 1; )
(a, a; ; 2) → (1, 1; )
On the other hand if the length is required to be a
multiple of an integer i ≥ 3, then the WK-automata
can no longer accept this language as the following
theorem shows.
Theorem 2: For fixed i ≥ 3, languages in the
form L = {ain | n ≥ 0}, cannot be accepted by
any stateless deterministic realtime reversal bounded
WK-automaton.
Proof: Let i be fixed. The language L is
infinite. Since the machine is deterministic realtime
and it senses that the input is nearly processed only
when the heads are close enough (their distance is
not greater than 2), in any accepting run the value
of a counter cannot be more than i. This can be
shown by the same method as used in the proof of
Theorem 1. At every step of the machine some (at
least one) counters change their values in order not
to accept words with one or two additional a’s. Then
by similar argument as in the proof of Theorem 1
one can show that for long enough words of L the
machine makes more than k reversals for any given
k.
Note that the languages in Theorem 2 are
regular, therefore they can be accepted by stateless
deterministic realtime machine with unbounded
In fact the case of k reversals can be treated
similarly following the proof sketch in [1]. The
maximum value of n in the case of stateless deterministic k-reversal m-counter WK-automata is
found to be
n = ((2k − 1)m − 1)2(2k−1)m+1 + 2(2k − 1)m.
This dependence on m and k can be exploited to
prove the hierarchy results with respect to realtime
stateless multicounter WK-automata as given in
Theorem 9.
VI. N ON - REALTIME MACHINES
We give a number of results for the non-realtime
case mostly without proofs.
The language L = {w ∈ {a, b}∗ | |w|a = |w|b }
given in Theorem 1 can trivially be accepted by a
1-reversal non-realtime WK-automaton by accumulating the number of a’s and b’s in two counters,
then simultaneously decreasing the counters after
the heads meet.
Theorem 4: The language L = {an |n ≥ 0} is
accepted by a non-realtime deterministic stateless
WK-automaton with four counters and unbounded
reversals.
Proof: We use the fact that n2 is the sum
of the first n odd numbers. The main task is to
read consecutive odd number of a’s with a certain
sequence of moves called an iteration. We will
2
use a parity counter denoted by Cp . We need 3
more counters C1 , C2 , Cm respectively. The counter
values Cm = 0 and Cm = 1 indicate whether C1 , or
C2 is to be used in the iteration.
Each odd number is of the form 2k + 1 where
k is 0, 1, 2, . . .. In the first iteration, only the Cp
counter is incremented and we have the following
sign vector: (1, 0, 0, 0). If there are no more a’s to
be read, the machine can now behave non-realtime
and decrement Cp . Since 1 is a square, the word of
only one a is accepted by the machine. If there are
more a’s to be read, first both heads move simultaneously each reading an a, decrementing Cp , while
incrementing C1 . Then we get to the (0, 1, 0, 0) sign
vector. Since Cp is zero, which indicates, that the
machine has read an even number of a’s in the
iteration, one additional a must be read by one of
the heads, while incrementing Cp and incrementing
Cm . Now we have read the word aaaa and got the
sign vector (1, 1, 0, 1). Then, like before, if there are
no a’s left, the counters are decremented in nonrealtime mode, else the operation is continued.
A general move can be described as follows.
The parity counter is always 1 at the beginning of
the iteration except the first one, but that case is
specified above. At the first step, Cp is decremented,
while reading two a’s and incrementing C1 if Cm is
0 or C2 if Cm is 1. Then we get two similar cases:
1) Cm = 0: in each step both heads move
simultaneously, reading a’s, while C2 is decremented and C1 is incremented. Thus the content of C2 is moved to C1 . When C2 is zero,
C1 contains the former contents of C2 plus 1.
2) Cm = 1: Exactly the same as the Cm = 0
case, with the roles of C1 and C2 changed.
To finish the iteration, one additional a must be read,
while Cp is incremented and Cm is decremented if
it’s value is 1, incremented if it’s value is 0.
During the computation, at the end of any iteration, if no a’s can be read, the machine can behave
in non-realtime mode and decrements its counters.
(0, 0, 0, 0, ⌈caaaaaaaaaaaaaaaa$⌋) ⊢
(0, 0, 0, 0, c⌈aaaaaaaaaaaaaaaa⌋$) ⊢
(1, 0, 0, 0, ca⌈aaaaaaaaaaaaaaa⌋$) ⊢
(0, 1, 0, 0, caa⌈aaaaaaaaaaaaa⌋a$) ⊢
(1, 1, 0, 1, caaa⌈aaaaaaaaaaaa⌋a$) ⊢
(0, 1, 1, 1, caaaa⌈aaaaaaaaaa⌋aa$) ⊢
(0, 0, 2, 1, caaaaa⌈aaaaaaaa⌋aaa$) ⊢
(1, 0, 2, 0, caaaaaa⌈aaaaaaa⌋aaa$) ⊢
(0, 1, 2, 0, caaaaaaa⌈aaaaa⌋aaaa$) ⊢
(0, 2, 1, 0, caaaaaaaa⌈aaa⌋aaaaa$) ⊢
(0, 3, 0, 0, caaaaaaaaa⌈a⌋aaaaaa$) ⊢
(1, 3, 0, 1, caaaaaaaaaa⌋⌈aaaaaa$) ⊢∗
(0, 0, 0, 0, caaaaaaaaaa⌋⌈aaaaaa$)
Note that each time, if Cp is 1, a square number
of a’s have been read. Since the machine can only
decrease it’s counters when Cp is 1, only words
consisting of square number of a’s are accepted by
it.
Thus the machine works in the expected way.
It would be interesting to see if this language can
be accepted with fewer than four counters. Similar
to the above result, we can prove:
Theorem 5: L = {a2 −1 | n ≥ 0} can be
accepted by a non-realtime deterministic stateless
WK-automaton with four counters and unbounded
reversals.
n
The machine has four counters, C1 , C2 , C3 , Cm
respectively. In the case of i = 0, one step is
made by one of the heads, reading an a, while the
counters C1 and Cm increased. Now, the sign vector
is (1, 0, 0, 1). The other steps are made as follows:
If C1 and Cm are both not zero, then decrease
C1 , while increasing C2 and C3 simultaneously and
reading a’s with both heads. If C1 is zero and Cm is
one, that means the machine has read the next power
of two number of a’s, which may be called j and can
start setting C1 to 2j. This is done, when C1 is zero,
Cm is one and C2 , C3 both contain some number. So
the sign vector is (0, 1, 1, 1). Then in non-realtime
Example
mode, C2 is decreased, while C1 is increased. Note,
We give an example of an execution of the machine that Cm has to be decreased to zero in the first step
described in the proof of Theorem 4 Suppose the too. After a few steps, the sign vector is (1, 0, 1, 0).
input is a16 . Then the machine makes the following Now, the contents of C3 must be moved to C1 in
sequence of moves:
a similar way, giving the sign vector (1, 0, 0, 0) and
C1 now contains the sum of the values of C2 and C3 .
Then Cm is increased by one, so that the following
iteration can be started.
We specified, that in the first iteration, one a is
read and C1 ’s value is set to one. By induction, if
C1 ’s value is j and C2 , C3 are both zero, a2j is read,
while C2 , C3 are set to j. In the next iteration C1
will contain j +j and a4j is read and so on. . . . Thus
in each iteration the machine reads twice the a’s as
in the previous iteration.
The computation can be ended using non-realtime
mode, when C1 is zero and no more a’s can be read.
Example
The machine does the following steps in the case
of a15 :
(0, 0, 0, 0, ⌈caaaaaaaaaaaaaaa$⌋) ⊢
(0, 0, 0, 0, c⌈aaaaaaaaaaaaaaa⌋$) ⊢
(1, 0, 0, 1, ca⌈aaaaaaaaaaaaaa⌋$) ⊢
(0, 1, 1, 1, caa⌈aaaaaaaaaaaa⌋a$) ⊢
(1, 0, 1, 0, caa⌈aaaaaaaaaaaa⌋a$) ⊢
(2, 0, 0, 0, caa⌈aaaaaaaaaaaa⌋a$) ⊢
(2, 0, 0, 1, caa⌈aaaaaaaaaaaa⌋a$) ⊢
(1, 1, 1, 1, caaa⌈aaaaaaaaaa⌋aa$) ⊢
(0, 2, 2, 1, caaaa⌈aaaaaaaa⌋aaa$) ⊢
(1, 1, 2, 0, caaaa⌈aaaaaaaa⌋aaa$) ⊢
(2, 0, 2, 0, caaaa⌈aaaaaaaa⌋aaa$) ⊢∗
(4, 0, 0, 1, caaaa⌈aaaaaaaa⌋aaa$) ⊢
(3, 1, 1, 1, caaaaa⌈aaaaaa⌋aaaa$) ⊢∗
(0, 4, 4, 1, caaaaaaaa⌋⌈aaaaaaa$) ⊢∗
(0, 0, 0, 0, caaaaaaaa⌋⌈aaaaaaa$)
As our previous examples show, there are nonsemilinear languages that are accepted by nonrealtime WK-automata. The following theorem
holds both for realtime and non-realtime machines
and analogous with the results of [1], [5].
Theorem 6: For every stateless deterministic (realtime/non-realtime) WK-automaton with
k reversals and m counters, there exists a
1-reversal stateless (realtime/non-realtime) WKautomaton with (2k − 1)m counters that accepts the
same language.
The proof is given in [1] in the proof of Theorem
4 of that paper for stateless multicounter automata,
which can be applied to WK-automata as well. The
main idea is that if a counter does one reversal and
would increase again, some other counter can take
its place thus avoiding multiple reversals. This way
one counter with k reversals can be substituted by k
counters with one reversal. Further (k − 1) counters
are needed to indicate which additional counter is
being used. Thus to simulate m counters, k + (k −
1) = 2k − 1 times m counters are needed.
Theorem 7: There exist infinitely many regular
languages that are not accepted by any realtime,
or non-realtime k-reversal m-counter stateless WKautomaton for any fixed m, k ≥ 0.
Proof: By Theorem 6 we can assume that
k = 1. Consider a finite language L over some
alphabet V , which can be accepted by a stateless
WK-automaton with m counters and 1 reversal.
Select some word s ∈ L, which is accepted by using
the most counters. Then s can be written in the form
xyz, where y is some subword, which is processed
by using l counters, x, z are some (possibly empty)
words over V . Then the language L′ = {xy i z|i ≥ 0}
is regular and any word in the form xy i z can only
be accepted by m + l(i − 1) counters. Since there
are infinitely many non negative integers, there is
always a word w ∈ L′ that can not be accepted by
m counters for any fixed m ≥ 0.
Example
The language (ab)∗ is a simple regular language,
but it cannot be accepted by any (realtime or
non-realtime) stateless multicounter WK-automaton
which is reversal bounded. (See the proof of Theorem 1 also.)
Theorem 8: The language L = {ww | w ∈
{a, b}∗ } cannot be accepted by any stateless deterministic non-realtime multicounter k-reversal WKautomaton with m counters for any fixed k, m ≥ 0.
Proof: Suppose that some stateless WKautomaton M accepts L. Then there exists some
x ∈ {0, 1}∗ such that xx ∈ L and is accepted by M
doing k reversals and using all m counters.
We can assume, that there is a sequence 01 (or
10) in x. As seen in Theorem 7, these sequences
can only be processed while using some (at least
one) counters because we don’t have any states to
indicate that there is a 1 to be read in the next step.
Then x can be written in the form x′ 01x′′ .
If the machine accepts the language L, it should
also accept x′ (01)i x′′ x′ (01)i x′′ for all i ≥ 1, thus
making more than k reversals, which is a contradiction.
We have the following hierarchy results:
Theorem 9: The following hierarchy results
hold:
∞
1) RWKC∞
∗ ⊂ WKC∗ ,
∗
∗
2) RWKC∗ ⊂ WKC∗ ,
3) WKCkm ⊆ WKC1(2k−1)m ,
4) WKCkm ⊂ WKCkm+1 .
5) WKCkm ⊂ WKCk+1
(for k < 2m−1 /m).
m
It can also be shown that stateless WK-automata
without counters can only accept a proper subset of
linear context-free languages. We omit this discussion.
VII. F UTURE WORK
The power of WK-automata lies somewhere between stateless one-head counter machines and
stateless two-head counter machines. There remain
a number of interesting aspects of the hierarchy of
languages accepted by stateless multicounter WKautomata: non-realtime, nondeterministic versions
and the case of unbounded reversals are among
these. It is also of interest to identify the nature of
separating languages for each of these classes. Work
is in progress on various extensions of the properties
considered in the present paper, as well as closure
properties of the corresponding language classes. A
detailed study of these will appear elsewhere [2].
R EFERENCES
[1] Ö. Eğecioğlu and O. H. Ibarra, On stateless multicounter
machines. TR2009-01, Department of Computer Science, UCSB,
Proceedings of Computability in Europe 2009 (CiE), LNCS
5635, 2009, pp. 178–187.
[2] Ö. Eğecioğlu, L. Hegedüs and B. Nagy, Hierarchy results on
stateless multicounter 5′ → 3′ Watson-Crick Automata. Preprint,
2010.
[3] R. Freund, Gh. Păun, G. Rozenberg and A. Salomaa, WatsonCrick Finite Automata, Proceedings of the Third Annual DIMACS Symposium on DNA Based Computers, Philadelphia,
1994, pp. 535–546.
[4] J. E. Hopcroft and J. D. Ullman, Introduction to Automata
Theory, Languages and Computation. Addison-Wesley, Reading,
MA, 1979.
View publication stats
[5] O. H. Ibarra and Ö. Eğecioğlu, Hierarchies and characterizations
of stateless multicounter machines. Proceedings of 15th International Computing and Combinatorics Conference (COCOON
2009), LNCS 5609, 2009, pp. 408–417.
[6] O. H. Ibarra, J. Karhumaki and A. Okhotin, On stateless
multihead automata: hierarchies and the emptiness problem.
Proceedings of 8th Latin American Symposium, LNCS 4957,
2008, pp. 94–105.
[7] A. J. Korenjak and J. E. Hopcroft, Simple deterministic
languages. Proc. of IEEE 7th Ann. Symp. on Switching and
Automata Theory, 1966, pp. 36–46.
[8] M. Kutrib, H. Messerschmidt and Friedrich Otto, On stateless two-pushdown automata and restarting automata. PreProceedings of the 8th Automata and Formal Languages, May,
2008, pp. 257–268.
[9] P. Leupold and B. Nagy, 5′ → 3′ Watson-Crick automata with
several runs. Workshop on Non-Classical Models of Automata
and Applications (NCMA), Wroclaw, Poland, 2009, pp. 167–180.
[10] P. Leupold and B. Nagy, 5′ → 3′ Watson-Crick automata with
several runs. Fundamenta Informaticae, accepted, (extended
version of [9]).
[11] B. Nagy, On a hierarchy of 5′ → 3′ sensing WK finite automata
languages, CiE 2009: Mathematical Theory and Computational
Practice, Abstract Booklet, University of Heidelberg, Germany,
pp. 266–275.
[12] B. Nagy, On 5′ → 3′ sensing Watson-Crick finite automata,
Proceedings of DNA 13, LNCS 4848, 2008, pp. 256–262.
[13] Gh. Păun, Computing with Membranes. Journal of Computer
and System Sciences, 61, 1, 2000, pp. 108–143 (and Turku
Center for Computer Science-TUCS Report 208, November
1998, www.tucs.fi).
[14] Gh. Păun, Computing with Membranes: An Introduction,
Springer, Berlin, 2002.
[15] Gh. Păun, G. Rozenberg and A. Salomaa, DNA Computing
New Computing Paradigms, Springer-Verlag, Berlin Heidelberg,
1998.
[16] L. Yang, Z. Dang and O.H. Ibarra, On stateless automata and P
systems. Pre-Proceedings of Workshop on Automata for Cellular
and Molecular Computing, August 2007, pp. 144–157.