HAL Id: hal-00619330
https://hal-upec-upem.archives-ouvertes.fr/hal-00619330
Submitted on 6 Sep 2011
HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub-
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non,
On the bound of the synchronization delay of a local automaton
Marie-Pierre Béal, Jean Senellart
To cite this version:
Marie-Pierre Béal, Jean Senellart. On the bound of the synchronization delay of a local automaton.
Theoretical Computer Science, Elsevier, 1998, 205 (1-2), pp.297-306. �hal-00619330�
On the bound of the synchronization delay of a local automaton
Marie-Pierre Beal Institut Gaspard Monge, Universite Paris 7 et CNRS
Jean Senellart
Laboratoire d'Automatique Documentaire et Linguistique October 30, 1997
Abstract
The synchronization delay of anN-state local automaton is known to beO(N2). It has been conjectured by S. Kim, R. McNaughton and R. McCloskey that, for deterministic local automata, it isO(N1:5) on a two-letter alphabet and no less thanO(N2) in the general case. We prove that this conjecture is false and that the synchronization delay is (N2) in all cases.
1 Introduction
Local automata are nite automata with a very strong synchronizing prop- erty: there are integers
k
andd
(0d
k
), such that two paths of lengthk
with the same label go through the same state at timed
. The small- est integerk
satisfying this property is called the synchronizing delay of the local automaton. Local automata recognize strictly locally testable lan- guages of nite words, that is languagesL
on an alphabetA
withL
fg=UA
\A
V A
WA
, whereU;V;W
are nite subsets ofA
. They also recognize subshifts of nite type, if we consider the bi-innite words recog- nized (see [6]). They are heavily used to construct transducers and coding schemes adapted to constrained channels. When the output of the trans- ducer is a local automaton, the decoding can be done with a sliding window, and the size of the window is bounded by the synchronization delay of the automaton. Finding adapted transducers with short synchronization delay in output, to get a short window in order to limit the error propagation, is one of the main goals when building codes for constrained channels (see for example [8],[6],[2]).The local property means that all long enough blocks are synchronizing words, also called resolving blocks or reset sequences. A non-synchronizing sequence of a deterministic local automaton is a word which is the label of two paths ending in (and going through) dierent states. The synchroniza- tion delay is then equal to the length of one of the longest non-synchronizing
sequence plus 1. For a given automatonAwith
N
-states, this delay can be computed in a polynomial time by using the product automaton, whose states are pairs of states ofA. The product automaton restricted to pairs of distinct states ofAhas no cycle. The delay of a local deterministic automa- ton A is then the height of this directed acyclic graph plus 1. It is known that the delay isO
(N
2) forN
-state local automata, andO
(N
) for deter- ministic complete local automata. But it is was not known if this bound could be improved.This problem can be related to a similar (but dierent) question about synchronizing sequences known as the Cerny-Pin conjecture. One has here to nd automata with very long non-synchronizing sequences, (the locality implying that this length is bounded), where the Cerny problem is to show that there are short synchronizing words (of length at most (
N
1)2) forN
-state complete synchronizing automata, (that is automata that admit at least one synchronizing word).In two papers about locally testable languages ([4] and [5]) S. Kim, R.
McNaughton and R. McCloskey conjectured that this synchronization delay is
O
(N
1:5) on a two-letter alphabet, and they gave an example of a family of automata leading to this bound. More precisely, their conjecture stated that if a locally testable automaton over a binary alphabet hasN
states then its orderk
(the smallestk
for which the automaton isk
-testable) isO
(N
1:5). What we prove in this paper, that is relevant to this conjecture, is about a proper subset of the locally testable automata. We explicitly prove that the order of a local automaton over a binary alphabet is (N
2), whereN
is the number of its states. This result disproves the conjecture by Kim et al. because the set of local automata is a subset of the set of locally testable automata. In order to prove our result, we give an example of a family ofN
-states local automata, that has a synchronization delay that is (N
2). We also mention that the example, given in [2], of a family ofN
- state local automata on a two-letter alphabet with (N
2) synchronization delay, is false.It is easy to construct
N
-state automata with (N
2) synchronization delay when the alphabet size is unbounded. This leads us to consider only the bounded case. We rst give a general method to construct a local automaton on a two-letter alphabet from a local automaton on ar
-letter alphabet, by encoding ther
-letter alphabet in a circular code on the two- letter alphabet. We use this construction to prove, independently from the example we give after, that the complexity of the bound is the same in the case of a two-letter alphabet and in the case of ar
-letter one, wherer
2.We then give in section 4 an example of automata which shows the main result, that is that the bound is (
N
2).We thank the referee for helpful comments.
We rst make precise notations used to compare the complexities.
If
f
andg
are two functions from IN to IR+, we say thatf
g
if and only iff
=O
(g
) andg
=O
(f
). We say thatf
= (g
) if and only if there is a positive constantK
such for all integerm
, there is an integern > m
such thatf
(n
)> Kg
(n
).A nite automaton is said to be local if there are two integers
k
andd
, with 0d
k
, such that if twonite paths of lengthk
, ((p
i;a
i;p
i+1))0ik 1and ((
p
0i;a
i;p
0i+1))0ik 1, have the same label, thenp
d =p
0d. A determin- istic automaton is local if and only if the previous condition is satised withd
=k
. Deterministic nite automata have also been called denite automata in [9]. We call synchronization delay of a local automaton the smallest integerk
satisfying the conditions of the denition.A nite automaton is said to be unambiguous if for any states
p
andq
(q
may be equal top
), there are not two distinct equally labeled paths going fromp
toq
.The following properties are known (see for example [2] p.44-46 for proofs).
Proposition 1
Let A be an automaton with a strongly connected graph.The two following properties are equivalent:
1) the automaton A is local.
2) the automaton A does not admit two distinct equally labeled cycles.
In this proposition, 1) =) 2) is true even if the graph is not strongly con- nected, and 1) () 2) remains true if one suppose that the automaton is unambiguous instead of being strongly connected. A local strongly con- nected automaton is unambiguous.
Proposition 2
LetAbe anN
-state local automaton which is unambiguous or has a strongly connected graph. Its synchronization delay is upper bounded by (N
2N
).We briey recall the proof given in [2] p.45.
Proof
: We denem
= N(N2 1) andk
= 2m
. We consider two paths of lengthk
: ((p
i;a
i;p
i+1))0ik 1 and ((p
0i;a
i;p
0i+1))0ik 1, with the same label. There are at mostm
distinct pairs fp;q
g of distinct states. As A is local, it does not admit two equally labeled cycles. This implies that there are not two distinct indicesi;j
, with 0i;j
m
, such that (p
i 6=p
0i;p
j 6=p
0j) and (((p
i;p
0i) = (p
j;p
0j))or((p
i;p
0i) = (p
0j;p
j))). It follows that there is an indexi
, with 0i
m
, such thatp
i =p
0i. There is also an indexj
withm
j
k
such thatp
j =p
0j. As A is local and has a strongly connected graph, it is also unambiguous, and thenp
m =p
0m. The condition of locality is satised with paths of lengthk
andd
=m
. 2As a consequence, an
N
-state deterministic local automaton has a syn- chronization delay which isO
(N
2).Proposition 3
LetAbe anN
-state deterministic local automaton. Its syn- chronization delay is upper bounded by N(N2 1).Proof
: We denek
= N(N2 1). We consider two paths of lengthk
and with the same label : ((p
i;a
i;p
i+1))0ik 1 and ((p
0i;a
i;p
0i+1))0ik 1. Like in previous proof, there is an indexi
, with 0i
k
, such thatp
i=p
0i. AsAis deterministic, we get
p
k =p
0k. 2We recall that an automaton on an alphabet
A
is a complete deterministic automaton if each state admits exactly one outgoing edge labeled by each letter of the alphabetA
. A proof of the following known result can be found in [2] p.46:Proposition 4
Let A be anN
-state automaton which is complete deter- ministic and local. Its synchronization delay is upper bounded by(N
1).3 Link with circular codes
We now present a general method to encode the letters of a local automaton on an alphabet of
n
letters into a code on a two-letter alphabet, in such a way that the composed automaton is still local. We will use circular codes.Let
A
be an alphabet. A subsetC
ofA
+ is said to be a circular code if for alln;m
1 andx
1;x
2;:::;x
n 2C
,y
1;y
2;:::;y
m 2C
, andp
2A
ands
2A
+, the equalitiessx
2:::x
np
=y
1y
2:::y
mx
1 =ps
implyn
=m;p
=;
andx
i =y
i (1i
n
)Circular codes are codes such that words of
A
have at most one decom- position in the codewords on a cycle. LetAbe an automaton on an alphabetA
. We choose a stateq
of A. The subsetX
q ofA
of rst returns to stateq
is dened as the set of labels of all paths going from stateq
to stateq
, without going through stateq
between the extremities. As the automaton is nite, the setX
q is rational.We will call a 1-pole automaton an automaton which has the following property: there is a state
q
such that all cycles go through stateq
. The set of rst returns to stateq
is then nite.The link between local automata and circular codes is given in the two following known propositions (see for example [3] or [2] for a proof):
Proposition 5
If A is local thenX
q is a circular code, for any stateq
ofA. In the other direction, if
C
is a nite circular code, there is a 1-pole automaton A and a stateq
of A such thatX
q =C
. One can choose the ower automaton of the codeC
. IfC
is a nite circular code which isthe set of rst returns of a 1-pole unambiguous automaton, then this 1-pole automaton is local.
A very pure monoid
M
is a monoid with the following property:uv;vu
2M
=)u;v
2M
Proposition 6
A setC
A
is a circular code if and only ifC
is a very pure monoid andCC
\C
= .An example of circular code is the subset
X
0 = fAAC;AAT;ACC;
ATC;ATT;CAG;CTC;CTG;GAA;GAC;GAG;GAT;GCC;GGC;GGT;
GTA;GTC;GTT;TAC;TTC
gdiscovered by D. Arques and C. Michel. It is the set of 20 trinucleotides having a preferential occurrence in the frame 0 of protein (coding) genes of both prokariotes and eukariotes. The reading frame is established by the ATG start trinucleotide (see [1]). The synchronization delay of its local ower automaton is 13, and it is the set of rst returns of a 1-pole automaton on a 4-letter alphabet with 11 states. Similar circular codes also exist for the two other frames.We now dene the notion of composition of two codes and of composition of an automaton with a code. Let
Z
A
andY
B
, whereA
andB
are nite alphabets, be two codes together with a bijection fromB
ontoZ
. Then denes an injective morphism :B
!A
. The setX
=(Y
) is obtained by composition ofY
andZ
and is denoted byX
=Y
Z
. The setX
is obtained by coding the letters ofY
by the corresponding words ofZ
. It is known that ifY
andZ
are composable circular codes,X
=Y
Z
is a circular code (see [3]).We will prove a similar result about a composition of an automaton with a circular code.
Let A be a an automaton on an alphabet
B
. LetZ
be a nite circular code on an alphabetA
with a bijection fromB
ontoZ
. Thendenes an injective morphism :B
!A
. We call composition of the automatonAwith
, the automaton denoted byA, and obtained by replacing each edge (p;b;q
) of Aby the edges:p
a!1 a!2 a!3 an!1 a!nq
with
(b
) =a
1a
2:::a
n, and where (n
1) new intermediate states have been added.IfAis deterministic, we can dene a deterministic version of the compo- sition ofAwith
, whenZ
=(B
) is a prex circular code. Under this hy- pothesis, letp
be state ofAand let (p;b
i;q
i)1isbe its outgoing edges. LetT
p be a labeled tree representing the prex codeZ
p =(fb
1;:::;b
sg)Z
: the edges ofT
p are labeled in the alphabetA
, and each word ofZ
p is the label of exactly one path from the root to a leaf. We label the root byp
and each leaf corresponding to (b
i) byq
i. We now dene Adet as the au- tomaton obtained fromA by replacing, for each statep
, the outgoing edgesq3 a
q1
q2
q4
a b
b b
b
a p
Figure 1: Tree
T
pof
p
in A by the edges of the treeT
p. The internal nodes ofT
p will be new intermediate states inAdet. Figure 1 shows the treeT
p when the outgoing edges ofp
are (p;b
i;q
i)1i4,A
=fa;b
g, andZ
p= (aa;aba;abb;bb
).Proposition 7
If A is a local automaton that either has a strongly con- nected graph or is unambiguous, and ifZ
=(B
) is a circular code, A is local. Moreover, ifA is a local deterministic automaton and ifZ
is prex circular, Adet is local and deterministic.Proof
: We prove the rst part of the proposition. The second one is a consequence of the rst one, asAdet can be seen as a projection ofA. We consider two distinct and equally labeled cycles of A, one begin- ning at (and ending in) a statep
, the other one beginning at (and ending in) a stateq
. We can suppose thatp
6=q
. Without loss of generality we also can assume that at least one of them is also a state ofA (not an intermediate added state). If they are both states ofA, we get inA two distinct equally labeled cycles, which contradicts the locality ofA. We now suppose thatp
is a state ofA andq
is not. We can remark that each cycle of A goes through a state ofA. Letr
be the rst state belonging to the states ofAin the cycle beginning atq
. This cycle is composed of a path labeledu
fromq
tor
, concatenated to a path labeledv
fromr
toq
. The worduv
is also the label of the other cycle beginning atp
. We getuv;vu
2Z
. AsZ
is a circular code,Z
is a very pure monoid. We getu;v
2Z
. This forcesp;q;r
to be states ofA, which concludes the proof. 2We will use an encoding of the alphabet of A in a particular class of circular codes: the comma-free codes. A subset
C
ofA
+ is a comma-free code if and only if, for allw
2C
+,u;v
2A
,uwv
2C
=)u;v
2C
We refer to [3] for this notion and the following result due to Golomb et al.
and Eastman:
Theorem 1
For any alphabetA
withr
letters for any odd integerm
1, there exits a comma-free codeC
A
m such that Card(C
) =l
m(r
), wherel
m(r
) is number of conjugacy classes of primitive words of lengthm
inA
. Moreover, we havel
m(2) 2mThis theorem implies that it is possible to nd a comma-free (thus cir-
m :
cular) code on a two-letter alphabet composed ofl
words of lengthm
withm
log(l
). As the codewords have the same length, the code is also a prex code. By considering the case of an alphabetA
of sizer
, we get the following result:Proposition 8
Letr
be an xed integer and letf
be an increasing function from IN to IR+ such that for any positive constantc
,f
(N
)f
(cN
). If the synchronization delay of anN
-state local deterministic automaton on ar
-letter alphabet is(f
(N
)), then the synchronization delay ofN
-state local deterministic automaton on a 2-letter alphabet is (f
(N
)).Proof
: Let An be a family ofN
-state local deterministic automata on ar
-letter alphabet, withN
n
, and with a synchronization delay at leastk
(N
), wherek
(N
) is (f
(N
)). LetBn the familyAndetnof deterministic automata on the two-letter alphabet, where n denes a coding from the alphabet of An in a prex circular code of words of a xed lengthm
on the two-letter alphabet. AsAn is deterministic, the number of its edges isF
rN
. The number of states of Bn isN
0(N
+F
)m
N
r
m:
The synchronization delay ofBn is greater than (
k
(N
) 1)m
, at least (k
(N
0rm
) 1)m:
As
r
andm
are constants, the synchronization delay ofBnis then (f
(rmN0))= (
f
(N
0)). 2This proposition applies in particular in the case where
f
(N
) =N
2. This proposition shows that the complexity of the synchronization delay in the case of a 2-letter alphabet is the same as in the case of ar
-letter one, for anyr
2. In the next section we give an example of a family of automata with (N
2) synchronization delay on a two-letter alphabet.4 Upper bound of the synchronization delay
We now go to the case of a xed alphabet with two letters
A
=fa;b
g. LetAn be the following family of
N
-state local deterministic automata on thep2
q1 q2
pn qn
a a a a
a a
a
a
a
a b
b
b b b b
p1 p2
Figure 2: Ladder automaton
alphabet
A
. The set of states of An is fp
1;p
2;:::;p
n;q
1;q
2;:::;q
ng. We then haveN
= 2n
. The edges ofAn areq
k a!
q
k 1;
2k
n p
k a!
p
k+1;
1k
n
1p
k b!
q
k 1;
2k
n q
1 b!p
1The automatonAn is given in Figure 2.
For a deterministic automaton, we call a non-synchronizing sequence a nite word
u
such that there are two paths labeled byu
, (p
i;a
i;p
i+1)0ik 1and (
p
0i;a
i;p
0i+1)0ik 1, withp
i 6=p
0i for all indicesi
.Proposition 9
The above denedN
-state automaton An is local and its synchronization delay is (N
2).Proof
: We rst prove that An is local. We can prove this directly by using the denition of local automata. We give here a proof that uses circular codes. We remark thatAnis a 1-pole automaton and we can choose statep
1 as pole. ThenAnis local if and only if the nite code of rst returns to statep
1 is circular. This code isC
= fa
kba
(k 1)b;
1k
n
g. Let us suppose that this code is not circular. We then have two circular decompositions:sx
2:::x
rp
=y
1y
2:::y
mx
=ps
with
x
1;x
2;:::;x
r 2C
,y
1;y
2;:::;y
m 2C
andp
2A
+ ands
2A
+. These two decompositions in wordsa
kba
(k 1)b
ofC
are:a
|kba
{z(k 1)b
}y1
a
|(k 2)ba
{z(k 3)b
}y2
a
|(k 2m+2)ba
{z(k 2m+1)b
}ym
ps
z }| {
a
kb
x2
z }| {
a
(k 1)ba
(k 2)ba
(k 3)b
za
(kx}|r2m+2)b
{ps
z }| {
a
(k 2m+1)b
and we get
r
=m
. This implies thats
=a
kb
andp
=a
(k 2m+1)b
andps
cannot belong toC
.By considering the paths beginning at states
p
1 andq
n labeled byu
=a
(n 1)ba
(n 2)b
ab
, one sees thatu
is a non-synchronizing sequence. The synchronization delay ofAn is then greater than or equal to the length ofu
plus 1, that is to n(n2+1). AsN
= 2n
, it is (N
2). 2We now briey describe the relationship between this example and the conjecture by Kim et al. (see also the rst section). Let us consider the above automaton with
p
1 as initial state and the sole accepting state. We can discard the stateq
n so that the automaton is strongly connected. The language of nite words recognized by this automaton is locally testable but notk
-testable withk
= ((n
2n
)=
2). So the example disproves the conjecture by Kim et al.References
[1] D. Arques and C. Michel. A complementary circular code in the protein coding genes. J. Theor. Biol., 182:45{58, 1996.
[2] M.-P. Beal. Codage Symbolique. Masson, 1993.
[3] J. Berstel and D. Perrin. Theory of Codes. Academic Press, 1985. (also available on http://www-litp.ibp.fr/berstel/LivreCodes).
[4] S. Kim and R. McNaughton. Computing the order of a locally testable automaton. SIAM J. Comput., 23(6):1193{1215, 1994.
[5] S. Kim, R. McNaughton, and R. McCloskey. A polynomial time algo- rithm for the local testability problem of determinitic nite automata.
I.E.E.E. Trans. Comput., 40:1087{1093, 1991. (see also L.N.C.S. 382 (1989) pp. 420-436).
[6] D. Lind and B. Marcus. An Introduction to Symbolic Dynamics and Coding. Cambridge, 1995.
[7] A. D. Luca and A. Restivo. A characterization of strictly locally testable languages and its application to subsemigroups of a free semigroup. In- form. and Control, 44:300{319, 1980.
[8] B. Marcus, P. Siegel, and J. Wolf. Finite-state modulation codes for date storage. IEEE J. Selected Areas Commun., 10(1):5{37, 1992.
[9] M. Perles, M. O. Rabin, and E. Shamir. The theory of denite automata.
I.E.E.E. Trans. Electr. Comp., EC 12:233{243, 1963.