Malaya Journal of Matematik S(1)(2013) 49–55
Deterministic finite H-Automata and ω-regular partial languages R. Arulprakasam∗, V.R. Dare† and S. Gnanasekaran
‡
Department of Mathematics, SRM University, Kattankulathur-603 203, Kancheepuram-Dt, Tamilnadu, India. Department of Mathematics, Madras Christian College, Tambaram, Chennai-600 059, Tamilnadu, India. Department of Mathematics, Periyar Arts College, Cuddalore-607 001, Tamilnadu, India.
Abstract Partial words, that is, finite words with holes, were introduced in the 70s by Fischer and Paterson, with respect to bioinformatics applications. Infinite partial words were introduced later. Recently, Dassow et al.’s connected partial words and regular languages. In this paper, we extend the local partial languages to local ω-partial languages and study their closure properties. We introduce the subclass of ω-regular partial languages called B¨ uchi local ω-partial languages and we define deterministic finite H-automaton with acceptance condition on ω-partial words and deterministic finite H-local automaton. Further, we establish relationships between deterministic finite H-local automaton, local ω-partial languages and B¨ uchi local ω-partial languages. Finally, we show that every ω-regular partial languages is a projection of a B¨ uchi local ω-partial languages. Keywords:
Partial word, infinite partial word, local partial languages, partial finite automaton, regular partial
languages. 2010 MSC: 68Q45.
1
c 2012 MJM. All rights reserved.
Introduction
Partial words, first appeared in 1974 and are also known under the name of strings with don’t cares [5]. In 1999, Berstel and Boasson [1] initiated their combinatorics under the name partial words. The main motivation for the introduction of partial words came from molecular biology of nucleic acids. There, among other things, one tries to determine properties of the DNA or RNA sequences encountered in nature. Quite recently, BlanchetSadri [3] has made a first step towards investigating languages of partial words by introducing the concept of p-codes, which are sets of partial words preserving the uniqueness of factorization of partial words. The recent paper of Dassow et al.’s [4] proposed a connection between regular languages and partial words and BlanchetSadri et al.’s [2] investigated a questions of Dassow et al. as to how these sizes are related. In [10], V.R. Dare et al.’s studied the regular partial languages and local partial languages. In [6], Mercas and Manea have extended the concept of partial word to infinite partial word. Regular languages can be represented by deterministic finite automata, non-deterministic finite automata and regular expression [7, 8, 9]. They have found a number of important applications such as compiler design. In many applications the length of the words investigated can be arbitrarily large, so it is natural to study of an infinite words (words of infinite length). Motivated by the work of [4, 6, 10], in this paper, we extend the local partial languages to local ω-partial languages. The basic definitions of this paper is given in Section 2. In Section 3, we introduce two subclasses of ω-regular partial languages called local ω-partial languages and B¨ uchi local ω-partial languages and study their closure properties. We define deterministic finite H-automaton with acceptance condition on ω-partial word ∗ E-mail
addresses:
[email protected](R. Arulprakasam) addresses:
[email protected](V.R.Dare) ‡ E-mail addresses:
[email protected](S. Gnanasekaran) † E-mail
50
R. Arulprakasam et al. / Deterministic Finite...
and we characterize the subclasses of ω-regular partial languages by deterministic finite H-local automaton. Further, we show that every ω-regular partial languages is a projection of a B¨ uchi local ω-partial languages. Finally, conclusion is given in Section 4.
2
Preliminaries
In this section,some basic concepts are recalled. Let Σ be a finite non-empty set of alphabet. The empty word is denoted by λ. The set of all finite words over Σ is denoted by Σ∗ . An infinite word α over Σ is a function α : N → Σ from the set N of all positive integers to Σ. We represent the infinite word α as α = a1 a2 · · · where α(i) = ai ∈ Σ, for all i. The collection of all infinite words over Σ is denoted by Σω . A word of length n over Σ can be defined by a total function u : {1, . . . , n} → Σ and is usually represented as u = a1 a2 . . . an with ai ∈ Σ. An infinite word of the form uv ω where u ∈ Σ∗ and v ∈ Σ+ is called an ultimately periodic infinite word over Σ. A fine (alphabetic) morphism is a mapping from a set Σ to a set ∆ and a projection map f is extended in a usual fashion to Σω as follows: f () = , f (au) = f (a)f (u), for a ∈ Σ and u ∈ Σω . Setting Σ = Σ ∪ {}, where ∈ / Σ represents undefined positions or holes, a partial word over Σ is a sequence of symbols from Σ . The length of a partial word u is denoted by |u| and represents the total number of symbols in u. The number of occurrences of a symbol a in a partial word u is denoted |u|a . The empty partial word is the sequence of length zero and is denoted by λ. A partial word u of length n over Σ is a partial function u : {1, . . . , n} → Σ. For 1 ≤ i ≤ n, if u(i) is defined, then we say that i belongs to the domain of u (denoted by i ∈ Domain(u) ), otherwise we say that i belongs to the set of holes of u (denoted by i ∈ Hole(u) ). If u is a partial word of length n over Σ, then the companion of u (denoted by u ) is the total function u : {1, . . . , n} → Σ defined by ( u(i) if i ∈ Domain(u), u (i) = otherwise. where is a new symbol not in the alphabet Σ. The bijectivity of the map u 7→ u , allows us to define, for partial words, concepts such as concatenation in a trivial way. The word u = abb b cbb is the companion of the partial word u of length 9 where Domain(u) = {1, 2, 3, 5, 7, 8, 9} and Hole(u) = {4, 6}. Denoting the set of all finite partial words over Σ by Σ∗ and the set of non-empty partial words over Σ by Σ+ . A partial language L0 over Σ is a subset of Σ∗ and it is regular if it is regular when being considered over Σ . An infinite partial word α over Σ is a partial map α : N → Σ from the set N of all positive integers to Σ. For 1 ≤ i < ∞, if an infinite partial word α = a1 a2 · · · where α(i) = ai ∈ Σ, then we say that i belongs to the domain of u (denoted by i ∈ Domain(u)), otherwise we say that i belongs to the set of holes of u (denoted by i ∈ Hole(u)). The companion of the infinite partial word α is the total function (the full infinite word), α : N → Σ defined by the same relation as in the case of finite partial words. We denote by Σω , the set of all infinite partial words over Σ . For each u ∈ Σ∗ , we denote by P1 (u) be the prefix of u of length 1 in Σ , S1 (u) be the suffix of u of length 1 in Σ , F2 (u) be the set of factor of u of length 2 in Σ, P F2 (u) be the set of partial factor of u of length in 2 in H2 (Setting H2 = {(Σ) ∪ (Σ)}) and inf2 (α) denotes the set of all elements of F2 (α) and P F2 (α), which repeats infinite number of times in α.
3
Deterministic Finite H-Automaton and Subclasses of ω-Regular Partial Languages
In this section, we define two subclasses of ω-regular partial languages called local ω-partial languages, B¨ uchi local ω-partial languages and study their properties. We define deterministic finite H-automaton with acceptance condition on ω-partial words, deterministic finite H-local automaton and we obtain the automaton characterization of the subclasses of ω-regular partial languages. Definition 3.1. An ω-partial language L ⊆ Σω is called local ω-partial language, if there exists a local system S = (I, H, C) where I ⊆ Σ, H ⊆ H2 and C ⊆ Σ2 such that L = {α ∈ (Σ ∪ {})ω : P1 (α) ∈ I, P F2 (α) ⊆ ω H, F2 (α) ⊆ C}. In this case, we write L = Lω L (S). The class of all local ω-partial languages is denoted by LL .
R. Arulprakasam et al./ Deterministic Finite...
51
Example 3.1. Consider the ω-partial language L = {b(a b)ω } over Σω where Σ = {a, b}. Let us consider S = (I, H, C), where I = {b}, H = {a, b} and C = {ba}. Then L = Lω L (S) and therefore L is a local ω-partial language. ω Theorem 3.1. If L1 and L2 are local ω-languages over Σω , then L1 ∩ L2 is a local ω-partial language over Σ .
Proof. If L1 and L2 are local ω-partial languages, then L1 = Lω L (S1 ) for some local system S1 = (I1 , H1 , C1 ) and L2 = Lω (S ) for some local system S = (I , H , C ). Consider the local system S = (I, H, C) where 2 2 2 2 2 L ω I = I1 ∩ I2 , H = H1 ∩ H2 and C = C1 ∩ C2 , then Lω (S) = L (S ) ∩ Lω 1 L L L (S1 ). Therefore L1 ∩ L2 is a local ω-partial language. Theorem 3.2. If Σ1 and Σ2 are two disjoint subsets of the alphabet over Σ whose union is Σ and if L1 ⊆ Σω 1 and L2 ⊆ Σω are local ω-partial languages, then L ∪ L is also local ω-partial language. 1 2 2 ω ω Proof. Since L1 and L2 are local ω-partial languages over Σω 1 and Σ2 , we have L1 = LL (S1 ) for some local ω system S1 = (I1 , H1 , C1 ) and L2 = LL (S2 ) for some local system S2 = (I2 , H2 , C2 ). Consider the local system S = (I, H, C) where I = I1 ∪ I2 , H = H1 ∪ H2 and C = C1 ∪ C2 . Here L1 and L2 are defined on disjoint ω ω ω ω domains Σω 1 and Σ2 , respectively. Hence LL (S) = LL (S1 ) ∪ LL (S1 ). Therefore L1 ∪ L2 is a local ω-partial language. 0
Definition 3.2. An ω-partial language L over Σ is called B¨ uchi local if there exists 4-tuple (I, H, C, C ), 0 2 2 where I ⊆ Σ, H ⊆ H , C ⊆ Σ and C ⊆ H ∪ C such that L = {α ∈ Σω : P1 (α) ∈ I, P F2 (α) ⊆ H, F2 (α) ⊆ 0 C, inf2 (α) ∩ C 6= φ}. In this case, we write L = Lω (S). The class of all B¨ uchi local ω-partial languages is B denoted by Lω . B Example 3.2. Consider the ω-partial language L = {(a b)n bω : n ≥ 1} over Σ where Σ = {a, b}. Let us 0 consider S = (I, H, C, C ) where I = {a}, H = {a, a, b}, C = {ba, bb} and 0
C = {bb}. Then L = Lω uchi local ω-partial language. B (S) and therefore L is a B¨ Remark 3.1. The family of B¨ uchi local ω-partial languages Lω B contains the class of all local ω-partial languages ω LL . Example 3.3. The ω-partial language L in Example (3.2) is a B¨ uchi local ω-partial language. But L is not a ω local ω-partial language, otherwise (a b)ω ∈ L. Therefore Lω ⊂ L L B. Definition 3.3. A deterministic finite H-automaton is a 5-tuple M = (Q , Σ , δ, q0 , F ), where • Q = Q ∪ Qh and Q ∩ Qh = ∅. Here Q is a finite set of states and Qh is a finite set of hole states, • Σ is a finite input alphabet, where ∈ / Σ represents undefined positions or holes, • q0 in Q is the initial state, • δ : Q × Σ → Q is the transition function defined as follows: For all p, qh ∈ Q and a, ∈ Σ , (i). δ(p, a) = q, for some q ∈ Q (ii). δ(p, ) = qh , for some qh ∈ Qh (iii). δ(qh , ) = qh , for some qh ∈ Qh and
52
R. Arulprakasam et al. / Deterministic Finite...
• F ⊆ Q is the set of final states. If α = a1 a2 · · · ∈ Σω , the sequence ρ = q0 q1 q2 · · · of states from Q is called a run of M for α, if for each n ≥ 1, qn = δ(qn−1 , an ). The range of ρ, denoted by ran(ρ), is the set ran(ρ) = {q0 , q1 , · · · } and inf(ρ) denotes the set of all states which occur infinitely often in ρ. We say that (i). the run ρ is accepted by M in (ran, ⊆)-mode, if ran(ρ) ⊆ F and (ii). the run ρ is accepted by M in (inf, ∩)-mode, if inf (ρ) ∩ F 6= ∅. An ω-partial language L ⊆ Σω is said to be recognized by a deterministic finite H-automaton M in X-mode, if ω L = {α ∈ Σ : there exists a run ρ f or α is accepted by M in X-mode}. We the notation RX to represent the class of all ω-partial languages accepted by deterministic finite H-automaton in X-mode. An ω-partial language L is said to be a ω-regular partial language if there exists a deterministic finite H-automaton M in (inf, ∩)-mode, such that L = Lω (M ). Example 3.4. Consider the deterministic finite H-automaton M = (Q , Σ , δ, q0 , F ), where Q = {q0 , q1 , q2 , qh }, Σ = {a, b} ∪ {}, q0 = {q0 }, F = {q2 }, and the transition function defined as follows: δ(q0 , a) = q0 , δ(q0 , a) = q1 , δ(q1 , ) = qh , δ(qh , b) = q2 , δ(q2 , ) = qh . Then the deterministic finite H-automaton M is recognized the ω-partial language L = {a+ (b)ω } in (inf, ∩)mode. Definition 3.4. A deterministic finite H-automaton M is said to be local, if for every a ∈ Σ , the set {δ(q, a) : q ∈ Q} contains at most one element and for any ∈ Σ , the set {δ(q, ) : q ∈ Qh } contains at most one element. Theorem 3.3. An ω-partial language L ⊆ Σω is local if and only if L is recognized by a deterministic finite H-local automaton in (ran, ⊆)-mode. Proof. Let L be a local ω-partial language. Then there exists a local system S = (I, H, C), where I ⊆ Σ, H ⊆ H2 and C ⊆ Σ2 such that L = {α ∈ Σω : P1 (α) ∈ I, P F2 (α) ⊆ H, F2 (α) ⊆ C}. Consider the deterministic finite H-local automaton M = (Q , Σ , δ, q0 , F ) where • Q = {[λ] ∪ {[a] : a ∈ I} ∪ {[a1 a2 ] : a1 a2 ∈ C} ∪ {[b1 b2 ] : b1 b2 ∈ H}}, • q0 = [λ], • F = Q and • δ is defined as follows: For all a1 ∈ I and a, ∈ Σ , δ ([λ] , a1 ) = [a1 ] , δ ([a1 ] , a) = [a1 a] , if [a1 a] ∈ C, δ ([a1 ] , ) = [a1 ] , if [a1 ] ∈ H,
53
R. Arulprakasam et al./ Deterministic Finite...
For all a1 a2 ∈ H and a, ∈ Σ , δ ([a1 a2 ] , a) = [a2 a] , if a2 = and [a2 a] ∈ H, δ ([a1 a2 ] , a) = [a2 a] , if a2 6= and [a2 a] ∈ C, δ ([a1 a2 ] , ) = [a2 ] , if [a2 ] ∈ H, For all a1 a2 ∈ C and a, ∈ Σ , δ ([a1 a2 ] , a) = [a2 a] , if [a2 a] ∈ C, δ ([a1 a2 ] , ) = [a2 ] , if [a2 ] ∈ H. Then L = Lω (M ). Conversely, assume that L ⊆ Σω is recognized by deterministic finite H-local automaton M = (Q , Σ , δ, q0 , F ) in (ran, ⊆)-mode. Consider the local system S = (I, H, C) where, I = {a1 ∈ Σ : δ(q0 , a1 ) ∈ Q}, H = {a1 a2 ∈ H2 : a1 a2 is a partial f actor of the label of successf ul run of M }, C = {a1 a2 ∈ Σ2 : a1 a2 is a f actor of the label of successf ul run of M }. Then Lω (M ) = Lω L (S). Theorem 3.4. If L ⊆ Σω uchi local, then L is recognized by a deterministic finite H-local automaton in is a B¨ (inf, ∩)-mode. 0
Proof. Let L be a local ω-partial language. Then there exists a 4-tuple (I, H, C, C ), where I ⊆ Σ, H ⊆ H2 , 0 0 C ⊆ Σ2 and C ⊆ H ∪ C such that L = {α ∈ Σω : P1 (α) ∈ I, P F2 (α) ⊆ H, F2 (α) ⊆ C, inf2 (α) ∩ C 6= φ}. Consider the deterministic finite H-local automaton M = (Q , Σ , δ, q0 , F ) where • Q = {[λ] ∪ {[a] : a ∈ I} ∪ {[a1 a2 ] : a1 a2 ∈ C} ∪ {[b1 b2 ] : b1 b2 ∈ H}}, • q0 = [λ], 0
• F = {[a1 a2 ] : a1 a2 ∈ C } and • δ is defined as follows: For all a1 ∈ I and a, ∈ Σ , δ ([λ] , a1 ) = [a1 ] , δ ([a1 ] , a) = [a1 a] , if [a1 a] ∈ C, δ ([a1 ] , ) = [a1 ] , if [a1 ] ∈ H, For all a1 a2 ∈ H and a, ∈ Σ , δ ([a1 a2 ] , a) = [a2 a] , if a2 = and [a2 a] ∈ H, δ ([a1 a2 ] , a) = [a2 a] , if a2 6= and [a2 a] ∈ C, δ ([a1 a2 ] , ) = [a2 ] , if [a2 ] ∈ H, For all a1 a2 ∈ C and a, ∈ Σ , δ ([a1 a2 ] , a) = [a2 a] , if [a2 a] ∈ C, δ ([a1 a2 ] , ) = [a2 ] , if [a2 ] ∈ H. Then L = Lω (M ). Theorem 3.5. Every ω-regular partial languages is a projection of a B¨ uchi local ω-partial languages. Proof. Let the ω-regular partial language L be recognized by deterministic finite H-automaton M = (Q , Σ , δ, q0 , F ) in (inf, ∩)-mode. Let
54
R. Arulprakasam et al. / Deterministic Finite...
• Γ = Q × Σ × Q , • I = {q0 } × Σ × Q , • H = {{(q1 , a, q2 )(q2 , , qh ) ∈ Γ2 : q2 = δ(q1 , a), qh = δ(q2 , )} ∪ {(q1 , , qh )(qh , a, q2 ) ∈ Γ21 : qh = δ(q1 , ), q2 = δ(qh , a)} ∪ {(q1 , , qh1 )(qh1 , , qh2 ) ∈ Γ2 : qh1 = δ(q1 , ), qh2 = δ(qh1 , )}}, • C = {(q1 , a, q2 )(q2 , b, q3 ) ∈ Γ2 : q2 = δ(q1 , a), q3 = δ(q2 , b)} and 0
• C = {(q1 , a, q2 )(q2 , b, q3 ) ∈ C ∪ H : q3 ∈ F }. 0
ω Let L1 = Lω B (S), where S is the local system S = (I, H, C, C ) over Σ . Then L1 ∈ LP . Let f : Γ → Σ be defined by
(i) f (q1 , a, q2 ) = a, for q1 ∈ Q , q2 ∈ Q, and (ii) f (q1 , , qh ) = , for q1 ∈ Q , qh ∈ Qh . This map can be extended to Γω , then f (L1 ) = L.
4
Conclusion
In this paper, extension of local partial languages to local ω-partial languages are carried out. Some closure properties of local ω-partial languages under union and intersection are discussed. We have defined deterministic finite H-automaton with acceptance condition on ω-partial words and deterministic finite H-local automaton and also established relationships between deterministic finite H-local automaton, local ω-partial languages and B¨ uchi local ω-partial languages. Finally, we have shown that every ω-regular partial languages is a projection of a B¨ uchi local ω-partial languages. This work can be further investigated by giving learning algorithms to identify the class of ω-regular partial in the limit from positive data.
References [1] J. Berstel and L. Boasson, Partial words and theorem of Fine and Wilf, Theoretical Computer Science., 218 (1999), 135-141. [2] E. Balkanski, F. Blanchet-Sadri, M. Kilgore and B. J. Wyatt, Partial Word DFAs, Proc. 18th International Conference on Implementation and Application of Automata., Lecture Notes in Computer Science, Springer-Verlag, Berlin, Heidelberg, 7982 (2013), 36-47. [3] F. Blanchet-Sadri, Codes, orderings and partial words, Theoretical Computer Science., 329 (2004), 177-202. [4] J.Dassow, F. Manea and R. Mercas, Connecting Partial Words and Regular Languages. In: S.B. Cooper, A. Dawar and B. L¨ owe (eds.) CiE(2012), Springer-Verlag, Berlin, Heidelberg, 151-161. [5] M. Fischer and M. Paterson, String matching and other products, In: Karp, R. (eds.) 7th SIAM-AMS Complexity of Computation., (1974), 113-125. [6] R.Mercas and F. Manea, Freeness of Partial Words, Theoretical Computer Science., 389 (2007), 265-277. [7] M. Harrison, Introduction to Formal Languages Theory., Addison-Wesley, Reading Mass, 1978. [8] S. Yu, Regular languages, In : G. Rozenberg and A. Salomaa, (eds.) Handbook of Formal Languages., Springer-Verlag, Berlin, Heidelberg, 1( 1997). [9] J.E. Hopcroft, R. Motwani and J.D. Ullman, Introduction to Automata Theory, Formal Languages and Computation- international edition (2nd ed)., Addison-Wesley (2003). [10] K. Sasikala, V.R. Dare and D.G. Thomas, Learning of partial languages, Engineering Letters, 14:2, EL− 14− 2− 9 (2007).
R. Arulprakasam et al./ Deterministic Finite...
Received: August 15, 2013; Accepted: September 1, 2013
UNIVERSITY PRESS
55