ON DETERMINISTIC 1-LIMITED 5′ → 3′ SENSING WATSON–CRICK FINITE-STATE TRANSDUCERS

Finite automata and finite state transducers belong to the bases of (theoretical) computer science with many applications. On the other hand, DNA computing and related bio-inspired paradigms are relatively new fields of computing. Watson–Crick automata are in the intersection of the above fields. These finite automata have two reading heads as they read the upper and lower strands of the input DNA molecule, respectively. In 5′ → 3′ Watson–Crick automata the two reading heads move in the same biochemical direction, that is, from the 5′ end of the strand to the direction of the 3′ end. However, in the double-stranded DNA, the DNA strands are directed in opposite way to each other, therefore 5′ → 3′ Watson–Crick automata read the input from the two extremes. In sensing 5′ → 3′ automata the automata sense if the two heads are at the same position, moreover, the computing process is finished at that time. Based on this class of automata, we define WK transducers such that, at each transition, exactly one input letter is being processed, and exactly one output letter is written on a normal output tape. Some special cases are defined and analyzed, e.g., when only one of the reading heads is being used and when the transducer has only one state. We also show that the minimal transducer is uniquely defined if the transducer is deterministic and it has marked output, i.e., the output letter written in a step identifies the reading head that is used in that transition. We have also used the functions ‘processing order’ and ‘reading heads’ to analyze these transducers. Mathematics Subject Classification. 68Q45. Received December 21, 2019. Accepted March 25, 2021.

in the respective positions of the strands when their 5 to 3 direction is opposite. Consequently, finite state WK automata, which are working on DNA molecules, have two reading heads. The first head is reading the upper strand, while the second head is reading the lower strand. Therefore, the names first/upper head and second/lower head can be used to identify them. There are several variants of WK automata analyzed in [23]. We recall here the most important ones. From biological point of view there are good reasons to consider special WK automata with restrictions on their sets of states: A WK automaton is called all-final if each of its states is an accepting state. A more specific variant of WK automata is the stateless WK automaton. A stateless WK automaton has exactly one state. Based on the reading process, in arbitrary WK automata the heads may read strings in a transition, in simple WK automata in each transition at most one of the heads can read, while the 1-limited variants are further restricted, in these models, in each transition exactly one input letter is being read (by either head). One may also consider mixed constraints, i.e., one for the set of states and other for the reading process. Deterministic and nondeterministic variants were also studied. In a double-stranded DNA, as we have mentioned, the 5 to 3 direction of the two strands are opposite. The sensing 5 → 3 WK automata are introduced in [12]. In these automata, the two reading heads move in the same biochemical direction, that is, from the 5 end of the strand to the direction of the 3 end, respectively; this means that the heads read the input from the two extremes and they are moving in opposite mathematical/physical/computational direction. Moreover, the processing of the input is finished when the heads meet. It can be done, since by the Watson-Crick complementarity relation, at that time, every place of the input was read by one of the heads: the first part till the meeting point of the heads was read by the first head while the second part from this position to the end of the input was read by the second head. This model has a straight connection with the class Lin of linear languages: sensing 5 → 3 WK automata accept exactly this class of the Chomsky hierarchy, and, in fact, it is equivalent to linear automata [10,14]. Several variations were investigated and analyzed in [8,9,13,15,21,22]. The above listed all-final, stateless, simple and 1-limited restrictions have also been studied for 5 → 3 WK automata. Moreover, the determinism is a feature that is independent of the previously mentioned constraints. Deterministic sensing 5 → 3 WK automata accept the language class 2detLin that is strictly included in Lin, it strictly includes the class Reg of regular languages, and it is incomparable with detLin, i.e., the class accepted by one-turn pushdown automata. The features of 5 → 3 WK automata are mixed with jumping automata, with automata with translucent letters and with pushdown automata in [7], in [18,19], and in [16], respectively. In this paper, we go in another direction: we connect the idea of 5 → 3 WK automata to the concept of transducers. We use the input tape as a Watson-Crick tape, i.e., the input is a DNA molecule, while the output is a normal tape, as Watson-Crick transducers are considered in this form in [23]. However, in our transducers the reading heads move in the way as they move in a sensing 5 → 3 WK automaton. Several variants of sensing 5 → 3 WK transducers can be investigated; we start our analysis by relatively simple ones. We will study 1-limited WK transducers such that they read and write exactly one letter in every transition. Moreover, our transducers are completely defined: every input can be processed by them. We mainly focus on deterministic variants. (We note here that, in our previous study [17], we have used the term 'simple' for our WK transducers, however, in fact, they were more restricted, since the process went by reading the input letter by letter and also to build the output letter by letter, thus, we feel that the term '1-limited' also fits, and, therefore, in this paper we use this better-fit term.) Since transducers are not about accepting languages, the all-final restriction has no meaning. In contrast, using no states, i.e., having a WK transducer with only one state, makes sense, and indeed we also study these stateless variants of deterministic sensing 1-limited 5 → 3 WK transducers.
In the next section, we give our definitions: Mealy and Moore-type WK transducers and we prove their equivalences. Then, we show some properties of the mappings they could realize and also we define two functions, the 'reading heads' and the 'processing order' which will be helpful for further studies. In Section 3 we investigate special variants (such as the traditional finite state transducers, the stateless model or the transducers with marked output). In Section 4 we detail some more properties of our WK transducers and we also relate our transducers to computing by observing. Then, concentrating on some special variants of WK transducers, in Section 5 we define equivalent classes among the states of marked-output transducers, and this relation is used in Section 6 to show that the minimal transducers are uniquely defined analogously to the normal, usual (Mealy and Moore) finite state transducers. Some conclusions and thoughts about future work closes the paper.

5 → 3 WK transducers
We assume that the reader is familiar with the basic concepts of automata theory, otherwise she/he is referred to [5,6,24]. Let V be an alphabet, e.g., V = {A, C, G, T }. The Watson-Crick complementarity relation assigns A and T to each other, and C and G to each other. We describe a double-stranded DNA molecule over V by w , the two strands are Watson-Crick complements of each other. For two substrands that are not necessarily Watson-Crick complements of each other we use the notation u v , where u, v ∈ V * . The relation on V generalizes the Watson-Crick complementarity relation, and it defines DNA strings used in the next two definitions and later on. We use λ to denote the empty word.
Further in this section we define new types of finite state transducers. A sketch of a 5 → 3 WK transducer is shown in Figure 1.
Definition 2.1. A (nondeterministic) 5 → 3 sensing finite Mealy-type Watson-Crick transducer (MeWK transducer) A is a sextuple (V, , T, Q, s 0 , δ) where V is the input (tape) alphabet, ⊆ V × V is a symmetric relation, T is the output alphabet, Q is the finite set of states, s 0 ∈ Q is the initial state and δ is the transition mapping Q × V * V * → 2 Q×T * , such that δ(q, u v ) is non-empty only for finitely many triplets (q, u, v) ∈ Q × V * × V * . The interpretation of (p, z) ∈ δ(q, u v ) is as follows: in state q, the upper head of the transducer reads the word u and the lower head of the transducer reads the word v, the transducer produces output z and it enters into the state p. A MeWK transducer is 1-limited if δ(q, u v ) is non-empty implies |u| + |v| = 1 and |z| = 1. Let w ∈ V * V * be an input DNA string and A is a 1-limited MeWK transducer. A configuration of A is a triplet (u, q, z) ∈ V * V * × Q × T * including the remaining part of the input u, the current state q and the output z generated so far. The computation on w starts with the initial configuration (w, s 0 , λ). The configuration ( a a u b b , q, z) can be followed by the configuration (u, q , zx) if (q , x) ∈ δ(q, a b ) where |ab| = 1. It is denoted by ( a a u b b , q, z) ⇒ (u, q , zx). The reflexive and transitive closure of this relation is denoted by ⇒ * . The 1-limited MeWK transducer is sensing if it finishes the process when its heads meet. Consequently, the final configuration on input w is ( λ λ , q, z) such that (w, s 0 , λ) ⇒ * ( λ λ , q, z) for some state q ∈ Q. The word z ∈ T * is called an output of A on w.
Analogously we extend the definition of Moore-automata. Definition 2.2. A (nondeterministic) 5 → 3 sensing finite Moore-type Watson-Crick transducer (MoWK transducer) A is a septuple (V, , T, Q, s 0 , δ, µ) where the first five components are the same as in Definition 2.1, moreover δ is the transition mapping Q × V * V * → 2 Q , such that δ(q, u v ) is non-empty only for finitely many triplets (q, u, v) ∈ Q × V * × V * and µ is the output mapping Q → T * . The interpretation p ∈ δ(q, u v ) is the following: in the state q the upper head of the transducer reads the word u and the lower head of the transducer reads the word v, the transducer enters into the state p, and right after a transition it produces output z, where z = µ(p). A MoWK transducer is 1-limited if δ(q, u v ) is non-empty implies |u| + |v| = 1 and |µ(p)| = 1 for every p ∈ Q. For an input DNA string w ∈ V * V * a configuration of A is the same as in Definition 2.1 and the computation on w starts with the initial configuration (w, s 0 , λ). If A is 1-limited, the configuration ( a a u b b , q, z) can be followed by the configuration (u, q , zx) if q ∈ δ(q, a b ) and µ(q ) = x where |ab| = 1. The notations ( a a u b b , q, z) ⇒ (u, q , zx), and ⇒ * are used subsequently. The 1-limited MoWK transducer is sensing if it finishes the process when its heads meet: the final configuration on input w is ( λ λ , q, z) such that (w, s 0 , λ) ⇒ * ( λ λ , q, z) for some state q ∈ Q. The word z ∈ T * is called an output of A on w.
When a MeWK transducer (MoWK transducer) A processes an input w ∈ V * V * , it generates an output z ∈ T * , then a mapping can be defined γ : Although the two types of transducers work in a slightly different way, the mapping from the set of possible inputs to the possible outputs are of the same nature. Let A 1 be a MeWK transducer or a MoWK transducer, and A 2 be a MeWK transducer or a MoWK transducer. Let γ 1 be the mapping defined by A 1 and γ 2 be defined similarly by A 2 . We say that A 1 is equivalent with A 2 if the mappings γ 1 , γ 2 are the same.
In [3] there are various ways to define deterministic WK automata playing with the complementary relation as well. However, at sensing 5 → 3 WK automata, since exactly one of the strands is read at every pair when the input is fully processed, there is only one usual concept of determinism [20,22]. Based on this fact, we are using the following definition for our WK transducers.  Proof. Let A 1 = (V, , T, Q, s 0 , δ) be a MeWK transducer. Then we construct the MoWK transducer A 2 = (V, , T, Q , s 0 , δ , µ), where Q , s 0 , δ , µ are defined in the following way. Let Q = Q × T . If q = (q, x) ∈ Q , then µ(q ) = x. Let us fix s 0 = (s 0 , x) for a fixed letter x ∈ T (any letter x can be chosen). If (p, y) ∈ δ(q, a b ), then for every x ∈ T let δ ((q, x ), a b ) (p, y), where (p, y) ∈ Q . By this construction it is easy to check that A 2 generates the same mapping as A 1 . Considering a deterministic MeWK transducer A 1 = (V, , T, Q, s 0 , δ), let A 2 = (V, , T, Q , s 0 , δ , µ) be defined as follows. Q , µ and s 0 as above. If (p, y) = δ(q, a b ), then for every Consequently A 2 is also deterministic and equivalent to A 1 .
Lemma 2.5. For each 1-limited MoWK transducer A 1 there is a 1-limited MeWK transducer A 2 such that A 1 and A 2 are equivalent. Moreover, if the MoWK-transducer A 1 is deterministic, then there is a deterministic 1-limited MeWK-transducer A 2 such that they are equivalent.
Proof. Let A 1 = (V, , T, Q, s 0 , δ, µ) be a MoWK transducer. Then we construct the MeWK transducer A 2 = (V, , T, Q, s 0 , δ ), where δ is defined in the following way. For every transition p ∈ δ(q, a b ) and output µ(p) of A 1 , let (p, µ(p)) ∈ δ (q, a b ) be a transition in A 2 . By this construction it is easy to check that A 2 generates the same mapping as A 1 . Considering a deterministic MoWK transducer A 1 = (V, , T, Q, s 0 , δ, µ), let A 2 = (V, , T, Q, s 0 , δ ) be defined as follows. For every transition p = δ(q, a b ) and output µ(p) let (p, µ(p)) = δ (q, a b ) is the transition mapping of A 2 . Consequently A 2 is also deterministic and equivalent to A 1 .
By the above lemmas, the family of 1-limited and sensing MeWK transducers are equivalent to the family of 1-limited and sensing MoWK transducers. Further we will use the notation WK transducers for 1-limited and sensing MeWK transducers but our results hold for 1-limited and sensing MoWK transducers also.
As we have already mentioned, in sensing 5 → 3 WK transducers exactly one of the heads read an input letter of a pair a a in every position of the input and the other letter of this pair is not read by any of the heads. Assuming that is a bijection on V , as it is on the set of nucleotides {A, C, G, T }, the transducer has all information about the processed input double string. Unless otherwise mentioned, in the following, by a WK transducer we always mean a completely defined deterministic WK transducer with the identity relation = ι (for simplicity). Since we will read only one component of each pair on any position of the double-stranded DNA string in the deterministic case we can use the identity relation ι as the complementarity relation without loss of generality.
One important advantage of the identity relation in role of is that we can simplify our notation. Since the complement of any word w is itself, the input DNA string is w w , and can simply be written as w. According to this, the notation of δ and the configurations are also simplified. Furthermore, the mapping of a WK transducer is considered of the form γ : V * → T * .
We have an analogous result to [22] where it is proven for 1-limited deterministic WK automata that in each state only one of the reading heads can move. In fact, the next lemma formally describes what determinism means for 1-limited WK transducers. Lemma 2.6. Let A be a deterministic WK transducer. Then Q = Q 1 ∪ Q 2 with Q 1 ∩ Q 2 = ∅ with the following properties. For every pair q ∈ Q 1 , a ∈ V : there is a pair p ∈ Q, z ∈ T such that δ(q, a λ ) = (p, z) and δ(q, λ a ) = ∅. Furthermore, for every pair q ∈ Q 2 , a ∈ V : δ(q, a λ ) = ∅ and there is a pair p ∈ Q, z ∈ T such that δ(q, λ a ) = (p, z).
Proof. The proof goes by contradiction. Let us assume that A is deterministic and Q = Q 1 ∪ Q 2 such that for each state q ∈ Q 1 there is a ∈ V such that δ q, a λ = ∅ and for each state p ∈ Q 2 there is b ∈ V such that δ p, λ b = ∅. Contrary to the statement of the lemma, assume that Q 1 ∩ Q 2 = ∅. Then there exists q ∈ Q 1 ∩ Q 2 , i.e., δ(q, a λ ) = (p a , x a ) and δ(q, λ b ) = (p b , x b ). In this case for the configuration (aub, q, z) ∈ V * × Q × T * there are at least two possible transitions: (δ(q, a λ ) = (p a , x a ) or δ(q, λ b ) = (p b , x b )), so that the transducer is not deterministic.
We continue this section by results about the possible mappings that WK transducers can do.
Proof. The proof goes by induction. Let w ∈ V * be the input string and (w, s 0 , λ) ⇒ * (λ, q, z) be the configuration of A as in the theorem. Then the output of A on w is z. First, as the base case, we assume that |w| = 0 so w = λ and therefore z = λ. Now, let |w| = 1. Since A is 1-limited, only one of the following transitions is allowed at state s 0 ∈ Q: either δ(s 0 , w λ ) or δ(s 0 , λ w ), and furthermore the output |z| = 1. Now, as the induction hypothesis, let us assume that |w| = |γ(w)| ≤ n holds for every possible w ∈ V * up to this length. Let us compute |γ(w)| when |w| = n + 1. Let w = w 1 aw 2 where (w 1 aw 2 , s 0 , λ) ⇒ * (a, q , z ) ⇒ (λ, q, z), i.e., A processes first the n letters of w 1 w 2 by producing z which has length n by the hypothesis. Since A is 1-limited, only one of the following transitions is allowed at state q ∈ Q: either δ(q , a λ ) or δ(q , λ a ), let (q, x) be the pair assigned to the allowed transition. Hence (w 1 aw 2 , s 0 , λ) ⇒ * (λ, q, z) with z = z x and |x| = 1. The output of A on w is z such that |z| = |z x| = n + 1. Thus, by induction on the length n, the statement of the theorem is proven.
The mapping γ that can be defined by a sensing 5 → 3 WK transducer has the property that the prefix of the output depends only on the prefix and the suffix of the input, more formally we have the following theorem.
Theorem 2.8. Let A = (V, ι, T, Q, s 0 , δ) be a WK transducer and γ be the mapping V * → T * defined by A. Let w ∈ V * be an input word and let z = γ(w). Then for any z 1 , z 2 ∈ T * with z = z 1 z 2 , w can be written of the form w 1 w 2 w 3 such that γ(w 1 w 3 ) = z 1 (moreover by the previous theorem: |w 1 w 3 | = |z 1 | and consequently |w 2 | = |z 2 |).
Proof. We will prove a stronger statement by induction on the length. So let w ∈ V * be an arbitrary input string. Then z is defined by the WK transducer A: γ(w) = z. Let the length of z 1 be zero, i.e., z 1 = λ, and thus, w 1 = w 3 = λ, z 2 = z, w 2 = w. In this case clearly γ(λ) = λ and it makes our statement true.
As the induction hypothesis, let us assume that for any prefix z 1 of z (z 1 = z), there is a decomposition w 1 w 2 w 3 of w such that γ(w 1 w 3 ) = z 1 . Let the length of z 1 be n (clearly, n < |z|). Then we are proving the statement for the prefix z 1 with length |z 1 | = n + 1. Then, let q be the state of A when it finishes the process of w 1 w 3 and let , the upper head reads in state q) and a = λ, b ∈ V if q ∈ Q 2 (i.e., the lower head reads in state q). Then |w 1 abw 2 | = n + 1 and γ(w 1 abw 2 ) = z 1 x since the deterministic process first proceeds the prefix w 1 and the suffix w 2 of the input and in state q the letter ab is being read (since one of a and b is λ, ab denotes a string of a sole letter). In this way, z 2 = xz 2 and therefore the statement is proven. Moreover, it is also true that the process goes letter by letter in a deterministic manner, and therefore, if γ(w 1 w 3 ) = z 1 such that w 1 is processed by the upper head and w 3 is processed by the lower head, then for any Based on the previous result we see that WK transducers are a kind of "border-prefix" transducers, i.e., they map the prefix/suffix (or their combination) to the prefix of the output.
Furthermore, we define two functions for WK transducers. The function reading heads (denoted by r) gives information about the working order of the heads of the transducer on any given input: it tells at every step which head was reading in the process. Formally: Definition 2.9. Let A be a deterministic 5 → 3 sensing WK transducer. The function associated to A of the form r : V * → {u, l} * is called reading heads if for every w ∈ V * : r(w) = r 1 r 2 ...r n , where r i = u if the upper head was reading at i-th step and r i = l if the lower head was reading at i-th step, for every i ∈ {1, 2, ..., n}.
Actually, function r also exhibits the strong relation established between linear grammars and languages with Watson-Crick automata, see, e.g., [12,21,25,26]. The function processing order (denoted by p) can be used to know for each letter of the input word in which step it was read. Its formal definition can be found below.
Definition 2.10. Let A be a deterministic 5 → 3 sensing WK transducer. The function called processing order is of the form p : V * → N * and for each word w ∈ V * (where |w| is n) p takes each of the values of N ∩ [1, n] exactly once: let w = w 1 ...w n where w 1 , ..., w n ∈ V , then p(w) is the concatenation of the processing orders of the letters of w, i.e., it is p 1 , ..., p n , where p j = i if the i-th step of the computation on w is either Remark 2.11. For every WK transducer, for any input word w ∈ V * : |w| = |r(w)| = |p(w)|.
In the next section we show 1-limited 5 → 3 sensing Watson-Crick finite-state transducers with some special properties.

Special WK transducers
Since the model is still very general, in this paper, we start to analyze some more specific variants. In this section, we list these variants with some examples to highlight their power.
First let us analyze the variant with marked-output. In the following definition we still refer to the notation Q 1 and Q 2 defined in Lemma 2.6.
Notice that in every transition when the first reading head is used, then a letter from T 1 is written to the output, and when the second reading head is used, then a letter from T 2 is written to the output.  Figure 2 gives the transition function δ. In states q 0 , q 2 , the upper head reads an input letter and the output of the WK transducer is an overlined letter, furthermore, in state q 1 , the lower head reads an input letter and the output of the WK transducer is an underlined letter. (Using the notations as before we have: q 0 , q 2 ∈ Q 1 , q 1 ∈ Q 2 .) If for an input DNA string w ∈ V * the mapping γ(w) = z has only letters 0 and 1, then w is in the form of 0 n 1 n or 0 n+1 1 n . This means the string w started with some 0's and then followed by the same number or one less of 1's. The upper head reads the 0's and the lower head reads the 1's. If x = 2 or x = 2 for some letter x ∈ z, then w is not in the mentioned form. The graph of this WK transducer is shown in Figure 3.
For example, if the input string is w 1 = 000111, then γ(w 1 ) = 010101 and if the input string is w 2 = 00111, then γ(w 2 ) = 01012. Therefore, one can identify which of the reading heads read a letter in a transition by the letter written to the output: for w 1 the first, second, first, second, first, second order and for w 2 the first, second, first, second, first order.
It is obvious that there is not any traditional Mealy/Moore transducer that is able to count arbitrarily large number of 0's and 1's, and thus the mapping γ of the previous example cannot be computed by these traditional models.
Theorem 3.3. For any mapping γ : V * → T * defined by a WK transducer A, there is a WK transducer A with marked output, defining γ : V * → (T ) * , and the homomorphism h : where δ is defined as follows. For each transition (p, x) ∈ δ q, a λ , let (p, x) ∈ δ q, a λ and for each transition (p, x) ∈ δ q, λ a let (p, x) ∈ δ q, λ a . Clearly, A is a WK transducer with marked output. Now, by letting h a homomorphism that assigns x ∈ T to each x ∈ T 1 and assigns x ∈ T to each x ∈ T 2 , for any input w ∈ V * , γ(w), i.e., the output word for w by the WK transducer A is the same as h(γ (w)), i.e., the homomorphic map of the output word of A .
Based on the previous result we can say that WK transducers with marked output are almost (with resp. of a homomorphism) as powerful as our general WK transducers.
On the other hand, knowing the image γ(w) of a word w (but not the WK transducer behind), generally, it is not straightforward to see in which transition which of the heads is moving. Since h is not injective, it could be a hard task to discover how the mapping is provided. However, knowing the output γ(w) and also the value of the associated reading heads function, r(w), we can state the following.
Proposition 3.4. Let w ∈ V * be an input word. If the output γ(w) and also r(w) are given for a specific WK transducer A, then one can construct also the marked output of A on w.
Proof. Let us analyze the computation of A on the input w where |w| = n. Let γ(w) = γ 1 ...γ n and r(w) = r 1 ...r n . We will use the notation γ (w) = γ 1 ...γ n for the marked output of w. If at step i we have r i = u then γ i = γ i and if r i = l then γ i = γ i . Example 3.5. Let A be a WK transducer such that after processing the input word w = abaab we have γ(w) = xyxyx and the output of the reading heads function r(w) = uulul. Based on Proposition 3.4 we can construct the marked output: γ (w) = xyxyx.

Using only the upper head
If the transition function δ(q, a b ) is non-empty only when |a| = 1, i.e., b = λ in every possible transition, then the transducer using only the upper head to read the input. It is easy to see that transducers with this property are equivalent to the classical (Mealy) transducers.
Note that WK transducers using only the upper reading head can also be seen as special cases of WK transducers with marked output choosing T 1 = T and T 2 = ∅.
This together with Example 3.2 shows that WK transducers and WK transducers with marked output are more powerful than traditional finite state transducers (Mealy and Moore automata).
Moreover, we can see that there are special properties when we use only the upper head. First, we can see that the result stated in Theorem 2.8 is also specialized. In this case, we map the prefix of the input to the prefix of the output and the suffix, in fact, is not used. Proposition 3.6. Let A = (V, ι, T, Q, s 0 , δ) be a special WK transducer where only the upper head reads the input and γ be the mapping V * → T * defined by A. Let w ∈ V * be an input word and let z = γ(w). Then for any z 1 , z 2 ∈ T * with z = z 1 z 2 , w can be written of the form w 1 w 2 such that γ(w 1 ) = z 1 (moreover by the Theorem 2.7: |w 1 | = |z 1 | and consequently |w 2 | = |z 2 |).
Furthermore, the functions reading heads r and processing order p also show the speciality of transducers having this special form.
Proposition 3.7. Let A = (V, ι, T, Q, s 0 , δ) be a special WK transducer where only the upper head reads the input and γ be the mapping V * → T * defined by A. Let w ∈ V * be an input word such that |w| = n and let z = γ(w). Then r(w) contains only the letter u and p(w) has the numbers from 1 to n in increasing order, i.e., r(w) = u n and p(w) = 1, 2, ..., n.

Using only the lower head
If the transition function δ(q, a b ) is non-empty only when |b| = 1, i.e., a = λ in every possible transition, then the transducer using only the lower head to read the input. The next example shows the power of such WK transducers.
Alur and Cerný defined the streaming transducers in [1]. They argued that reversing a string is a hard task by finite state transducers. They solved this problem by introducing a single data variable and a single data string variable and they highlighted the power of the streaming string transducer by this example. In our model the string reversing can be solved in the way presented in the next example.  Figure 4. We also need only one state to do reversing the input strings, just like Alur and Cerný but we do not need any sophisticated data structure (variables).
We note here that the class of WK transducers mentioned in this subsection also belongs to the class of WK transducers with marked output by choosing T 1 = ∅ and T 2 = T .
Similarly to the previous special case when we used only the upper head, we can see that there are special properties when we use only the lower head also.
First, one can see that the statement of Theorem 2.8 can be strengthened. In fact, these transducers map the suffix of the input to the prefix of the output and the prefix of the input is not used. Formally, we can state the following. Proposition 3.9. Let A = (V, ι, T, Q, s 0 , δ) be a special WK transducer where only the lower head reads the input and γ be the mapping V * → T * defined by A. Let w ∈ V * be an input word and let z = γ(w). Then for any z 1 , z 2 ∈ T * with z = z 1 z 2 , w can be written of the form w 1 w 2 such that γ(w 2 ) = z 1 (moreover by the Theorem 2.7: |w 2 | = |z 1 | and consequently |w 1 | = |z 2 |).
(Note: Since the lower head reads the input with the direction from the last letter to the first, then z has a more special property: the first letter of z 1 belongs to the last letter of w 2 etc.) Moreover, the functions reading heads r and processing order p also shows the speciality of these transducers by having special forms. Proposition 3.10. Let A = (V, ι, T, Q, s 0 , δ) be a special WK transducer where only the lower head reads the input and γ be the mapping V * → T * defined by A. Let w ∈ V * be an input word such that |w| = n and let z = γ(w). Then r(w) contains only the letter l and p(w) has the numbers from 1 to n in decreasing order, i.e., r(w) = l n and p(w) = n, n − 1, ..., 1.

Stateless WK transducers
In this subsection we consider deterministic WK transducers with the set of states as a singleton set (i.e. Q = {q}). In fact, these transducers are the counterpart of the no-state (or stateless) 1-limited 5 → 3 WK automata. In these transducers there is no state memory, i.e., they cannot store any information in their states.
By analysing these transducers, first of all, by Lemma 2.6, one can see that either only the upper, or only the lower head can be used in all transitions. In this sense, each no-state WK transducer belongs to one of the previously described classes, i.e., it uses only its upper or only its lower head. On the other hand, since there is no state memory, we can state a more concrete result about them. As we will see, in this case, Moore-type WK transducers are more restricted than the Mealy-type WK transducers.  1. If A uses only its upper head, then the mapping γ realizes just an alphabetic morphism (similar to the mappings of stateless Mealy automata), that is, for each a ∈ V , there is exactly one γ(a) ∈ T , and for each word w = w 1 w 2 ...w n with w 1 , w 2 , ..., w n ∈ V , A maps γ(w 1 )γ(w 2 )...γ(w n ) to w.

If
A uses only its lower head, then γ is a reversed alphabetic morphism, i.e., it is an alphabetic morphism of the reversal of the input word, that is, for each a ∈ V , there is exactly one γ(a) ∈ T , and for each word w = w 1 w 2 ...w n with w 1 , ..., w n ∈ V , A maps γ(w n )...γ(w 2 )γ(w 1 ) to w.
Proof. Since A is a deterministic 1-limited transducer, at each step for every input letter a we have exactly one transition δ(q, a) = (q, x). Hence the output mapping γ(a) = x. A assigns γ(w i ) to every w i for i = 1, ..., n and in the first case the upper head reads w letter by letter from the first letter till the last one so after reading w we have γ(w) = γ(w 1 )...γ(w n ). If only the lower head was used, then it reads w from the last letter till the first letter, hence γ(w) = γ(w n )...γ(w 1 ).
We underline here that Example 3.8 shows a stateless MeWK transducer. In contrast to Mealy-type transducers, the stateless constraint is much stronger for Moore-type transducers: Theorem 3.12. Let A = (V, ι, T, {q}, q, δ, µ) be a stateless Moore-type WK transducer. Then, independently of the fact if A uses only its upper head or its lower head, there is a letter b ∈ T such that the mapping γ just give the length of the input in unary code, i.e., for any w ∈ V * , γ(w) = b |w| .
Proof. Since there is only one state q, the output in each step of the computation is µ(q) ∈ T . Let b = µ(q). Then, A is just counting the length of the input word and puts as many b's to the output as the length of the input.
Since, in fact, each of our stateless WK transducers is either using only its upper head or only its lower head, about the functions r and p Proposition 3.7 and 3.10 can be applied, respectively.

Using the heads alternately
The following example is connected to the well-known problem of words: one has to decide whether a word is the same as its reverse, i.e., it is a palindrome or not.
Example 3.13. Let A = ({a, b}, ι, {0, 1}, {q 0 , q a , q b }, q 0 , δ) be a WK transducer such that δ(q 0 , a λ ) = (q a , 1), δ(q 0 , b λ ) = (q b , 1), δ(q a , λ a ) = (q 0 , 1), δ(q b , λ b ) = (q 0 , 1), δ(q a , λ b ) = (q 0 , 0) and δ(q b , λ a ) = (q 0 , 0). See Figure 5. In state q 0 the upper head reads an input letter and the output of the WK transducer is in this transition the letter x = 1, furthermore in state q a , q b the lower head reads an input letter and the output of the WK transducer in these transitions is the letter y: if the lower head reads the same letter which just read by the upper head in the previous transition, then the output letter is y = 1, in the other cases the output letter is y = 0. (Using the notations as before we have: q 0 ∈ Q 1 , q a , q b ∈ Q 2 .) If for an input DNA string w ∈ V * the mapping γ(w) = z has only letters 1's, then w is a palindrome. If 0 is a letter of the output z, then w is not a palindrome.
For example, if the input string is w 1 = abaaaba, then γ(w 1 ) = 1111111 and if the input string is w 2 = abbaba, then γ(w 2 ) = 111110. This means w 1 is a palindrome and w 2 is not a palindrome.
In fact, by measuring the longest even prefix of the output built up by only 1's, i.e., the maximal value of n such that (11) n is a prefix of the output, one gets the measure of how long palindrome border the input word has. Formally, for an input w it is the maximal length of v such that w = vuv −1 , where v −1 is the reversal of v. If w is a palindrome, then n = |w| 2 , i.e., the integer part of the halflength of w.
Proposition 3.14. Let A = (V, ι, T, Q, q 0 , δ) be a WK transducer which uses its reading heads alternately. Then A has a bipartite graph.
Proof. The set of states is partitioned to Q 1 and Q 2 (as defined in Lem. 2.6). Moreover, in these transducers, if δ(q, a) = p, then either q ∈ Q 1 , p ∈ Q 2 or p ∈ Q 1 , q ∈ Q 2 .
Although the WK transducers of this subsection are not WK transducers with marked output by default, since it is clearly known that the even/odd positions of the output are written by transitions using one and the other reading head respectively. We can write this fact more formally in the following way. Remember, that Q 1 is the subset of states Q where the first reading head is allowed to move. Proposition 3.15. Let γ be a mapping defined by the WK transducer A = (V, ι, T, Q, q 0 , δ) that uses its reading heads alternately. Further, let T , the mapping γ and the homomorphism h be defined as in Theorem 3.3. Although h is not injective, γ (w) can be determined from γ(w) based on the fact whether q 0 ∈ Q 1 or not (without actually computing the WK transducer A with marked output).
Proof. If q 0 ∈ Q 1 , then the first letter of the output h(w) is written in a transition by the first head, and thus, the corresponding first letter of γ (w) is in T 1 (overlined). Then based on the bipartite graph of the transducer, each even position of γ (w) is underlined and all odd positions are overlined.
In the case q 0 ∈ Q 1 , i.e., q 0 ∈ Q 2 , every odd position of γ (w) is written by a letter from the underlined output alphabet T 2 and each even position with an overlined letter.
In fact, by partitioning the positions of the output letters, as odd and even positions, by using the alphabetical morphisms h o : T 1 → T and h e : T 2 → T if q 0 ∈ Q 1 (h o : T 2 → T and h e : T 1 → T if q 0 ∈ Q 2 , respectively), they are bijections.
In the case of alternately reading heads, Theorem 2.8 can be applied and, in this special case, we can give the algorithm of how the prefix of the output can be constructed from the prefix and suffix of the input.
There are two versions of this transducer depending on which head starts reading the input. If the upper head starts reading, we say it is the case U L; and if the lower head stars reading, we say it is the LU case. Let w = w 1 w 2 ...w n ∈ V * be an input word and let the output be z = γ(w) with z = z 1 z 2 for some z 1 , z 2 ∈ T * . In the U L case the z 1 = γ(w 1 )γ(w n )γ(w 2 )γ(w n−1 ).... Thus, basically, the prefix of the output corresponds to the prefix and the suffix of the input letter by letter alternately: first one letter from the prefix, then one letter from the suffix, etc. In the LU case the difference is that the lower head starts the reading so z 1 is created in the way When the heads are reading alternately we can see that the reading heads function r(w) can be either in the form ulululul... or in the form lulululu.... In the U L case the p(w) will have the following structure: first we can see the odd numbers in increasing order from 1 to |w|/2 and then the even numbers in decreasing order from |w|/2 to 2. In the LU case we can see the even numbers from 2 to |w|/2 and then the odd numbers in decreasing order from |w|/2 to 1.
One may ask what are the possible values of the functions r and p that can occur for our WK transducers. Let us answer this question.
Theorem 4.2. Let m ∈ {u, l} * be an arbitrary word. There exists a WK transducer A = (V, ι, T, Q, q 0 , δ) and an input word w ∈ V * such that the associated function, reading heads r assigns m to w, i.e., r(w) = m.
Proof. We prove the statement by construction. Let m = m 1 ...m n with m 1 , ..., m n ∈ {u, l} be given, where the length of m is |m| = n. Let A = ({a}, ι, {b}, {q 0 , q 1 , ..., q n }, q 0 , δ) and w = a n such that there is only 1 transition from each state: from q i only to q i+1 (i < n) and from q n only to q n itself. Further by Lemma 2.6, we know that Q = Q 1 ∪ Q 2 where all transitions in states of Q 1 are defined only for the upper head and for all states in Q 2 transitions are defined only for the lower head. Now, set Q 1 = {q j | m j+1 = u}, and Q 2 = Q \ Q 1 . Clearly, when w is processed by A, in the first step the upper head is used if and only if q 0 ∈ Q 1 that is if and only if m 1 = u, etc. Consequently, it is easy to see that r(w) = m.
The function processing order is onto and one-to-one, i.e., every value of the target {1, 2, ..., n} is used exactly once for the given input word w = w 1 w 2 ...w n (with |w| = n). In fact, it is a permutation of these values (i.e. p(w) ∈ S n where S n is a symmetric group, the set of all permutations with n element), but not every permutation can occur for WK transducers. For being a processing order function output p(w) for an input word w, the permutation should be in a special form according to the next theorem. We use s i,j to denote the sequence of numbers from position i till position j of a permutation s (where i < j). Further, we use smin i,j to denote the smallest number in the sequence of numbers s i , ..., s j . (Furthermore smin i,i = s i that is when we have only one element s i .) Theorem 4.3. Let s = s 1 ...s n ∈ S n be an arbitrary permutation. There exists a WK transducer A and an input word w = w 1 ...w n , where the remaining subword of the input w is denoted by w with |w | = l+1 and w = w k ...w k+l . The processing order function may assign s to w, i.e. p(w) = s if and only if for every remaining subword w either s k = smin k,k+l or s k+l = smin k,k+l .
Proof. First let A = (V, ι, T, Q, q 0 , δ) be a WK transducer and w = w 1 ...w n ∈ V * such that the assigned processing order function p(w) = s. It means that for every i = 1, ..., n we have p i = s i . Since the transducer is 1-limited and deterministic we know that at first step either the upper head reads the first letter of w hence the configuration (w, q 0 , λ) will be followed by (w 2 ....w n , q, x) where (q, x) = δ(q 0 , w1 λ ) and p 1 = 1; or the lower head reads the last letter of w hence the configuration (w, q 0 , λ) will be followed by (w 1 ....w n−1 , q, x) where (q, x) = δ(q 0 , λ wn ) and p n = 1 for some state q ∈ Q and output letter x ∈ T . The minimum of the numbers 1, ..., n denoted by smin 1,n is 1 and if the upper head starts the readings then s 1 = p 1 = 1 = smin 1,n and if the lower head starts the reading then s n = p n = 1 = smin 1,n . At step i (where i = 2, ..., n) we have a remaining word w = w k ...w k+l with the length |w | = n − i + 1 and in the computation, the configuration (w , q , z) can be followed by either (w k+1 ...w k+l , q , zy) where (q , y) = δ(q , w k λ ) by reading with the upper head the first letter of w or (w k ...w k+l−1 , q , zy) where (q , y) = δ(q , λ w k+l ) by reading the last letter of w with the lower head, for some states q , q ∈ Q and output letter y ∈ T . If the upper head reads w k then p k = i and if the lower head reads w k+l then p k+l = i. Therefore s k = p k = i or s k+l = p k+l = i and since smin k,k+l = i we proved the first direction of the statement.
Second, we prove the existence of A by construction. Let A = (V, ι, T, Q, q 0 , δ) be a WK transducer and w = w 1 ...w n ∈ V * be an input word of A where the transition δ can be constructed based on s in the following way. We assume based on the second part of the theorem that either s 1 = smin 1,n (first case) or s n = smin 1,n (second case). Hence at step 1, if s 1 = smin 1,n then the configuration (w, q 0 , λ) will be followed by (w 2 ....w n , q, x) where (q, x) = δ(q 0 , w1 λ ) and if s n = smin 1,n then the configuration (w, q 0 , λ) will be followed by (w 1 ....w n−1 , q, x) where (q, x) = δ(q 0 , λ wn ) for some state q ∈ Q and output letter x ∈ T . In the first case we have p 1 = 1 and in the second case we have p n = 1. At the i-th step (where i = 2, ..., n) we have a remaining word w = w k ....w k+l with length l = n − i + 1 moreover smin k,k+l = i and we know from the theorem that either s k = smin k,k+l (first case) or s k+l = smin k,k+l . In the computation, the configuration (w , q , z ) will be followed by either (in the first case) (w k+1 ...w k+l , q , z y) where (q , y) = δ(q , w k λ ) or (in the second case) (w k ...w k+l−1 , q , z y) where (q , y) = δ(q , λ w k+l ) for some states q , q ∈ Q and output letter y ∈ T . In the first case we have p k = i and in the second case we have p k+l = i.
Further, we see how the functions processing order and reading heads relates to each other.

Producing p(w) from r(w)
Algorithm 1 gives the formal description of the process of producing the string value of the processing order function from the given string value of the reading heads function on an input word w for a given WK transducer. Algorithm 1. Computing the processing order from reading heads. input: r /*the string value of the reading heads function on w for a given WK transducer A*/ output: p /*the string value of the processing order function on w for the WK transducer A*/ let n = |w|

Producing r(w) from p(w)
Algorithm 2 gives the formal description of the method of producing the string value of the reading heads function from the given string value of the processing order function on an input word w for a given WK transducer.
If p(w) is known for an input word w for a given WK transducer, then we can create two r(w) string values because it is undecidable using only these data which head read the last letter. Since Algorithm 2 at first checks if the certain p i value is equal to u, it means the output r will contain a u at the position of the last letter hence it gives the solution when it was read by the upper head. Algorithm 2. Computing the reading heads from processing order. input: p /*the string value of the processing order function on w for a given WK transducer A*/ output: r /*the string value of the reading heads function on w for the WK transducer A*/ let n = |w| If an arbitrary r(w) is given then we can always create p(w) without any restrictions. The order of the heads can be changed at any moment of the process depending on the given WK transducer and on its input as we shown in Theorem 4.2. However, the other case requires a little investigation since processing an input by reading it from the extremes implies that the numbers cannot be in an arbitrary order, as we have shown in Theorem 4.3.

Control word of the computation
An important language associated to a Watson-Crick automaton was defined in [23]: taking into account the transitions, not the recognized string. They considered a labeling on the edges of the graph of a Watson-Crick finite automaton M, i.e., to every transition of the automaton a label is assigned. Then the control word of a computation was given by the sequence of labels of transitions of the computation. The languages and language classes of control words of accepting computations were defined and analyzed based on this definition for variants of the automata. While these control word languages were extensively studied in [23] for traditional WK automata, so far they have not been studied for 5 → 3 WK automata. Here, we define and use the control word language of the computations by deterministic sensing 5 → 3 WK automata. In fact, deterministic 1limited 5 → 3 sensing WK automata and our WK transducers are in a close correspondence based on control words as we formalize below.
Definition 4.4. Let A be a deterministic 5 → 3 sensing WK automaton or a WK transducer. Let Lab be the alphabet (set) of labels and let us assign a label to each transition of A, i.e., let the graph of the automaton be edge labelled. Let w be an input, then the sequence of labels of the transitions of the computation on w is called the control word of the computation, it is in fact, a word in Lab * . Proposition 4.5. Let A = (V, ι, T, Q, q 0 , δ) be a 5 → 3 WK transducer in the following way: let the set of labels on the transitions be T such that on transition (p, x) ∈ δ q, a b the label is exactly x. In this way the control word of a computation of A from the configuration (w, q 0 , λ) to the configuration (λ, q, z) is exactly the output word z.
Considering deterministic 1-limited all-final 5 → 3 sensing WK automata M = (V, ι, Q, q 0 , δ, Q) and the label set Lab such that there is a unique label x ∈ Lab assigned for each transition p ∈ δ q, a b . The control words of the computations on any input word w can be observed as the words over Lab which are exactly the same as the output words of the 5 → 3 Mealy WK transducer A = (V, ι, Lab, Q, q 0 , δ ) working on input w where δ is defined as follows: (p, x) ∈ δ ( q, a b if and only if p ∈ δ q, a b and x ∈ Lab is assigned to this transition.
Proof. The first statement of the proposition is obvious, while the second statement, the connection between the control words and control word language of deterministic 1-limited all-final 5 → 3 WK automata and deterministic 1-limited 5 → 3 WK transducers follow from the first statement and the construction shown in the proposition.
Based on the previous proposition, WK transducers can also be connected to the concept of computing by observing ( [2]) as the transition sequence in a bio-inspired system can be connected to a sequence of observations that can be done outside of the system during the process it computes. Actually, the WK transducers can make explicit the observation as the output of the computation.
Special subtypes of WK transducers are also presented: at WK transducers with marked-output it is explicitly given which of the heads moved in which transition. In some other cases one also can identify which of the reading heads are used in which transition. Here we can see another approach related to this issue. By using unique labels for every transition it is clear again that the output letter (label) identifies the reading head that moves during this transition.
In the next section we analyze transducers in which we can infer from the output which of the heads was moving in each transition.

Equivalence relation among the states of WK transducers
In this section we investigate equivalence relation among the states of a WK transducer and among the states of two WK transducers (with marked-output).
If two states are distinguishable, intuitively, we may distinguish them by input words which are processed without state repetition, this fact can be formalised as follows.
Theorem 5.2. Let A = (V, ι, T, Q, p 0 , δ) be a WK transducer with marked-output. Let n = |Q| and p, q ∈ Q. If p and q are distinguishable, then there is a word w of length at most n − 1 such that it distinguishes p and q.
Proof. The proof goes by induction. For every non-negative integer k we define a relation η k on the set of states Q of the given WK transducer as follows: (p, q) ∈ η k if and only if p and q cannot be distinguished by any words of length at most k. Denote c k the number of η k -classes. Naturally, (p, q) ∈ η 0 for every p, q ∈ Q, thus c 0 = 1, there is only one class.
In this way it is clear that η k+1 is a refinement of the classification η k (allowing longer input there can be more classes of states).
There is a value m ∈ N such that m ≤ n − 1 and η m = η m+1 = η m+i for every i ∈ N, because the set Q is finite. (If there would be no such value m, then in each step of the refinement we obtain more and more classes, and after n steps some classes with only one state would be divided which is clearly impossible.) Denote η = η m this final equivalence relation among the states.
The method to get this final classification also confirms the proof.
The next theorem allows us to compare the states of two transducers.
Theorem 5.3. Let A 1 = (V, ι, T, Q, p 0 , δ) and A 2 = (V, ι, T, Q , q 0 , δ ) be two different WK transducers with marked-output, with common input and output alphabets. Let A = (V, ι, T, Q ∪ Q , p 0 , δ ), where δ is defined in the following way: δ (q, a) = δ(q, a) if q ∈ Q and δ (q, a) = δ (q , a) if q ∈ Q . Let p ∈ Q and q ∈ Q . If p and q are distinguishable, then there is a word w of length at most |Q| + |Q | − 1 such that it distinguishes p and q.
Proof. The proof is a direct consequence of the definition of WK transducer A and Theorem 5.2.
Definition 5.4. Let A 1 = (V, ι, T, Q, p 0 , δ) and A 2 = (V, ι, T, Q , q 0 , δ ) be two not necessarily different WK transducers with common input and output alphabets. We say that p ∈ Q and q ∈ Q are equivalent if they are not distinguishable with any word w ∈ V * . By Theorems 5.2 and 5.3 if one wants to know whether two states are equivalent, then it is enough to check their behavior for input words with at most a certain length.
Theorem 5.5. Let A 1 = (V, ι, T, Q, p 0 , δ) and A 2 = (V, ι, T, Q , q 0 , δ ) be two WK transducers with markedoutput, with common input and output alphabets. A 1 is equivalent to A 2 if and only if p 0 and q 0 are equivalent.
Proof. Let γ 1 be the mapping defined by A 1 and γ 2 be defined similarly by A 2 . By definition, A 1 and A 2 are equivalent if γ 1 identical to γ 2 . If p 0 is not distinguishable from q 0 , then for every word w ∈ V * γ 1 (w) = γ 2 (w).

Canonical WK transducers
Canonical, i.e., minimal WK transducers will be defined for WK transducers with marked-output. In this section we deal with WK transducers such that every of their state is reachable from the initial states. (For each state q there exists an input string w such that (w, q 0 , λ) ⇒ * (λ, q , z) where q 0 is the initial state and z is the output of the computation on w.) Lemma 6.1. Let A 1 = (V, ι, T, Q, p 0 , δ) and A 2 = (V, ι, T, Q , q 0 , δ ) be two WK transducers with markedoutput and the same input and output alphabets, such that every of their state is reachable from the initial states, respectively. The WK transducers A 1 and A 2 are equivalent if and only if p 0 and q 0 are equivalent, moreover for every state in Q there is an equivalent state in Q and for every state in Q there is an equivalent state in Q.
Proof. By Theorem 5.5 it is clear that A 1 and A 2 are equivalent if their initial states are equivalent. Let us prove the other part of the statement by contradiction. Without loss of generality, let us assume that there is a state p ∈ Q such that there is no equivalent state in Q with p ; but A 1 and A 2 are equivalent. By the assumption that p can be reached from p 0 , there is an input word w ∈ V * such that: (w, p 0 , λ) ⇒ * (λ, p , z) and (w, q 0 , λ) ⇒ * (λ, q , z) for a state q ∈ Q . Since q and p are not equivalent, there is a word u such that (u, p , λ) ⇒ * (λ, p , z 1 ), (u, q , λ) ⇒ * (λ, q , z 2 ) and z 1 = z 2 . Then (w 1 uw 2 , p 0 , λ) ⇒ * (λ, p , zz 1 ), (w 1 uw 2 , q 0 , λ) ⇒ * (λ, q , zz 2 ) with some w 1 , w 2 ∈ V * such that w = w 1 w 2 . This contradicts to the fact that A 1 and A 2 are equivalent. Definition 6.2. Let A = (V, ι, T, Q, p 0 , δ) be a WK transducer and γ be the mapping defined by A. If we consider all the WK transducers which induce mapping γ and A has the minimal number of states among them, then we say that A is minimal (or canonical).
In the following theorem we will use the notation η which we have defined in the proof of Theorem 5.2. Theorem 6.3. Let A 1 = (V, ι, T, Q 1 , p 0 , δ) be a WK transducer with marked output, γ 1 be the mapping defined by A 1 . Let A 2 = (V, ι, T, Q 2 , p 0 , δ ). If A 2 is a minimal WK transducer and equivalent with A 1 , then the number of states of A 2 is the same as the number of classes in η for A 1 .
Proof. The proof consists of two parts. First we show that there is a WK transducer A 2 that is equivalent with A 1 and has the same number of states as the number of classes in η for A 1 .
Denotep the equivalence class of η containing p, i.e.,p = {q|(p, q) ∈ η}. Let Q 2 = {p|p ∈ Q 1 }. Let A 2 = (V, ι, T, Q 2 ,p 0 , δ ) be a WK transducer such that δ is defined in the following way: δ (p, a) = (q, x) if δ(p, a) = (q , x) where q ∈q. (Note that |Q 2 | = |Q 1 | when A 1 is minimal.) It is clear by the construction and the equivalence relation among the states that A 2 defines the same mapping γ as A 1 . Moreover in A 2 every class is represented by a unique state.
The second part of the proof goes by contradiction. We prove that A 2 is minimal. Let us assume that A 3 = (V, ι, T, Q 3 , p 0 , δ) is a minimal WK transducer and equivalent with A 1 , but |Q 3 | > |Q 2 |. Then it is a contradiction, since A 2 is also equivalent with A 1 and has smaller number of states.
Consider now the case when A 3 has less states than A 2 , i.e., |Q 3 | < |Q 2 |. This means that there is at least one state in q 2 ∈ Q 2 such that there is no equivalent state to q 2 in Q 3 . Then A 3 cannot be equivalent to A 2 and to A 1 by Lemma 6.1. Thus any minimal WK transducer that is equivalent to A 1 has the same number of states that is the number identical to the number of classes of η for A 1 .

Conclusions
Deterministic one-limited 5 → 3 Mealy and Moore type Watson-Crick transducers were investigated. We have shown that for each Moore type WK transducer, there is an equivalent Mealy type WK transducer in the sense that the same mapping is realized by them and vice versa. Based on that, we mostly detailed only the Mealy type variants. In contrast, when the number of states is limited to one, i.e., considering the stateless variants, it is shown that the Moore type transducers are more restricted than the Mealy type transducers. In fact, stateless Moore type WK transducers cannot do more than stateless Moore automata (with only one reading head). On the other hand, stateless Mealy type WK transducers can do everything that stateless Mealy automata (with one reading head) can do, moreover, they can also realize some other mappings. In fact, they can already do reversing the input word (that is defined as a hard task in [1] with -finite state -transducers). We have restricted our study to 1-limited and deterministic WK transducers, i.e., in every configuration with nonempty input they read exactly one letter (by one of the two heads) and write exactly one letter on the output tape. Consequently, it is shown that at every state exactly one head can read (and move), i.e., in all possible transitions from that state the same head can read a letter. It was shown that the mappings realized by this model has length preserving property and also a kind of border-to-prefix property in the sense that the prefix of the output depends only on a combination of the prefix and the suffix of the input.
By releasing the 1-limited condition, i.e., allowing to read and/or to write longer strings or the empty word in a transition a generalization of the studied models can be understood which generalize also the streaming transducers (because of the two reading heads). Non-deterministic variants can also be interesting. While variants with non-injective WK-complementarity relation can also be analyzed, especially in the case when both reading heads must read their strands entirely.
We have also presented canonical 5 → 3 WK transducers for variants with marked output. In these transducers, the output symbol does identify the reading head used in that transition. We have used the functions processing order and reading head to analyze WK transducers. Extension of the study of a larger class of WK transducers is also a task of a future research. We believe that a much larger class of mapping can be defined and analyzed by automata using our approach, as Lin and 2detLin are classes including much more interesting languages than Reg.