On The Language of Primitive Partial Words
On The Language of Primitive Partial Words
On The Language of Primitive Partial Words
Introduction
The outline of the rest of the paper is as follows. The next section contains
some basic concepts and describes the hierarchy of languages of partial words. In
Section 3, we prove that the language of primitive partial words is not regular,
not linear and not deterministic context-free language. In Section 4, we give a
2DPDA automaton that accepts the language of primitive partial words and
partial Lyndon words.
words with at most i holes as i and the language of partial words with arbitrary
number of holes as p over the alphabet {}. Thus, we define
p = 0 1 2 3
The root of a partial word w is defined as follows.
i = Qip Qip
2
Q2p
1
Q1p
Q2p
0
Q0p = Q
Q1p
In this section, we shall prove that the language of primitive partial words Qp
is not regular, not linear as well as not Deterministic Context-free Language
(DCFL). First we recall the pumping lemma for regular languages and linear
languages and also some of the properties of DCFL which are required to prove
our result.
Lemma 4 (Pumping Lemma for Regular Languages [10]). For a regular
language L, there exists an integer n > 0 such that for every word w L with
|w| n, there exist a decomposition of w as w = xyz such that the following
conditions holds.
(i) |y| > 0,
(ii) |xy| n, and
(iii) xy i z L for all i 0.
It is easy to observe that the language of primitive partial words with at
most i holes, Qip , is not regular. This is because pumping up a hole in a word
having at most i holes will give a word which is not in Qip . The following result
proves the claim in general. We use the similar idea as used in [7].
Lemma 5 ([7]). For any fixed integer k, there exist a positive integer m such
that the equation system (k j)xj + j = m, j = 0, 1, 2, . . . , k 1 has a nontrivial
solution with appropriate positive integers x1 , x2 , . . . , xj > 1.
Theorem 6. Qp is not regular.
Proof. Suppose that the language of primitive partial words Qp is regular. So
there exist a natural number n > 0 depending upon the number of states of
finite automaton for Qp .
Consider the partial word w = an am am b, m > n. Note that w is a primitive partial word over {}, where || 2 and a 6= b. Since w Qp
and |w| n, then it must satisfy the other conditions of pumping Lemma for
regular languages. So there exist a decomposition of w into x, y, z such that
w = xyz, |y| > 0 and xy i z Qp for all i 0.
Let x = ak , y = a(nj) , z = ajk am am b. Now choose i = xj and
since we know by Lemma 5 that for every j {0, 1, . . . , n 1}, there exists a positive integer xj > 1 such that xy xj z = ak a(nj)xj ajk am am b =
a(nj)xj +j am am b = am am am b (am b)3
/ Qp which is a contradiction.
Hence the language of primitive partial words Qp is not regular.
t
u
Next, we prove that the language of primitive partial words Qp is not linear.
Let us recall the pumping lemma for linear languages.
Lemma 7 (Pumping Lemma for Linear Languages [11]). Let L be a linear
language. There exists an integer n such that any word p L with |p| n, admits
a factorization p = uvwxy satisfying the following conditions.
(i) uv m wxm y L m N,
(ii) |vx| > 0, and
(iii) |uvxy| n.
Theorem 8. The language of primitive partial words Qp is not linear.
Proof. Suppose that the language Qp is linear. Let n > 0 be an integer. Consider
s = an bm am n Qp be a partial word and m > n and a 6= b. Since |s| n,
so there exists a factorization of s into u, v, w, x, y such that it satisfies the
conditions of pumping Lemma for linear languages.
Let u = ai , v = aj , x = bk , y = bl such that i + j + k + l n, j + k > 0,w =
r m m q
a b a and i, j, k, l, r, q 0. So 0 < i + j + k + l n. Also, i + j + r =
s + k + l = n. Now it must be that uv t wxt y Qp for all t N. However,
uv t wxt y = ai+tj+r bm am q+tk+l = am bm am m (am bm )2
/ Qp . It will happen
that i + tj + r = m = q + tk + l because if we consider the left hand side equality
we get,
i + tj + r = m
i + j + r + (t 1)j = m
n + (t 1)j = m
mn
+1
t=
j
It is true that there will be some integers m, n and j such that t is an integer.
So, uv t wxt y = am bm am m (am bm )2 for some t. Hence Qp is not linear.
t
u
Next we prove that the language of primitive partial words is not deterministic context-free language. We will use the closure properties of DCFL. In
particular, the set of DCFLs is closed under complementation.
Theorem 9. Qp is not deterministic context-free.
Proof. Suppose that the language of primitive partial words Qp is deterministic context-free. As the set of DCFLs is closed under complementation, the
complement of Qp , that is, Qp (set of partial periodic words) is also a DCFL.
Also, we know that the intersection of a DCFL with a regular language is also
DCFL. Therefore, Qp {a b a b } = {an bm an bm | m, n N } is also a DCFL.
But the language {an bm an bm | m, n N } is not a Context Free Language
(CFL) which can be proved by using pumping lemma for CFLs. Hence it is
a contradiction that the language of primitive partial words Qp is a DCFL.
Therefore the language Qp is not deterministic context-free.
t
u
2DPDA For Qp
In this section we define Partial Lyndon words denoted by Lp and prove that
the language of primitive partial words with 1-hole Q1p is accepted by Two-way
Pushdown Automaton (2DPDA). Next, we show that the language of primitive
partial words with at least two holes is accepted by a 2DPDA. Let us recall the
basic definition of 2DPDA and some of the results which are required in the
proof.
A 2DPDA is the same as ordinary DPDA but with an additional ability to
move its input head in both directions. We use Z0 as the bottom of stack and
one left end and one right end symbol as ` and a, respectively.
Definition 10 ([1]). A 2DPDA, P , consists of 7-tuple
P = hS, I, T, , s0 , Z0 , st i,
where
(a)
(b)
(c)
(d)
In these transitions, the machine enters in state s and moves its input head in
the direction d, where d = 1, +1 or 0, to indicate to move its head to left, right
or remain stationary, respectively. The operation push B means add the symbol
B on the top of pushdown list and pop means remove the topmost symbol from
the pushdown list.
Definition 11 ([3]). Let k and l be two positive integers satisfying k l.
For 0 i < k + l, we define the sequence of i relative to k, l as seqk,l (i) =
(i0 , i1 , . . . , in+1 ) where
(a) i0 = i = in+1
(b) For 1 j n, ij 6= i
(c) For 1 j n + 1, ij is defined as ij =
ij1 + k
ij1 l
if 6= ij1 < l,
otherwise.
References
1. Aho, A.V., Hopcroft, J.E.: Design & Analysis of Computer Algorithms. Pearson
Education India (1974)
10