HAL Id: hal-00619216
https://hal-upec-upem.archives-ouvertes.fr/hal-00619216
Submitted on 5 Sep 2011
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of
sci-entific research documents, whether they are
pub-lished or not. The documents may come from
teaching and research institutions in France or
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,
émanant des établissements d’enseignement et de
recherche français ou étrangers, des laboratoires
Asynchronous sliding block maps
Marie-Pierre Béal, Olivier Carton
To cite this version:
Marie-Pierre Béal, Olivier Carton. Asynchronous sliding block maps. Informatique Théorique et
Applications, 2000, 34 (2), pp.139-156. �hal-00619216�
Marie-Pierre B
eal InstitutGaspardMonge
UniversitedeMarne-la-Vallee
Olivier Carton InstitutGaspard MongeandCNRS
UniversitedeMarne-la-Vallee
May 23,2000
Abstra t
We dene a notion of asyn hronous sliding blo k map that an be realizedby transdu erslabeled in A
B
. Weshowthat, under some onditions,itis possibleto syn hronizethistransdu erbystate splitting, in order to get atransdu er whi h denes thesamesliding blo k mapand whi his labeled in AB
k
, where k isa onstant in-teger. In the ase of a transdu er with a strongly onne ted graph, thesyn hronization pro ess an be onsidered asan implementation ofanalgorithm ofFrougnyandSakarovit hforsyn hronizationof ra-tional relations of bounded delay. The algorithm an be applied in the asewherethetransdu erhasa onstantintegertransmissionrate on y lesandhasastrongly onne tedgraph. Itkeepsthelo alityof theinputautomatonofthetransdu er. We showthat thesize ofthe slidingwindowofthesyn hronouslo almapgrowslinearlyduringthe pro ess,butthatthesizeofthetransdu erisintrinsi allyexponential. Inthe aseofnonstrongly onne tedgraphs,thealgorithmofFrougny andSakarovit hdoesnotkeepthelo alityof theinputautomatonof thetransdu er. Wegiveanotheralgorithm to solvethis asewithout losingthe good dynami properties that guarantythe state splitting pro ess.
1 Introdu tion
We deneanotionofasyn hronousslidingblo kmap. The lassi alnotion of sliding blo k map is the lass of maps from A
Z to B
Z
, where A and B
5boulevardDes artes,UniversitedeMarne-la-Vallee,F-77454Marne-la-ValleeCedex 2,Fran e, Email: Olivier.Cartonuniv-mlv.fr andMarie-Pierre.Bealuniv-mlv.f r, Url: http://www-igm.univ-mlv.fr/~ arto n/andhttp://www-igm.univ-mlv.fr/~bea l/
formation. The image of a bi-innitesequen e an beobtained byshifting a windowof xed length along the sequen e. We extend this denitionto asyn hronousslidingblo kmaps. Thesemapsstilluseaslidingwindowbut may output a variable number of symbols for ea h input symbol. These maps an be realized by automata labeled in AB
, alled transdu ers. Furthermore,theinputautomaton an be hosenlo al,thatis,itadmitsat mostone bi-innitepath labeledbya given bi-inniteword.
We studyhere theproblemof thesyn hronizationof these transdu ers, thatis,the onstru tionofasyn hronoustransdu erdeningthesamemap. A syn hronous transdu er is a transdu er labeled in AB
k
, where k is a positiveinteger. A syn hronizationofanasyn hronousslidingblo kmapis asyn hronousslidingblo kmapwhi hdenesthesamemapbetweenorbits ofbi-innitesequen es. Thegoalofthepaperisto syn hronizetransdu ers whilekeepingthelo alpropertyof theirinputautomaton.
Thequestionofthesyn hronizationoftransdu ersgoesba ktothepaper ofElgotand Mezei[12 ℄aboutrationalrelationsrealizedbyniteautomata, and to theresult of Eilenbergand S hutzenberger [11 ℄ whi h states that a lengthpreservingrationalrelationofA
B
isarationalsubsetof(AB)
, or,equivalently,isrealizedbyasyn hronousautomaton(labeledinAB). TheproofofEilenbergisee tivebutisdoneonregularexpressionsandnot dire tly on automata. In [13 ℄, Frougny and Sakarovit h give an algorithm forsyn hronizationofrelationswithboundedlengthdieren e,therelations beingbetweennitewordsorbetweenone-sidedinnitewords. This onsti-tutesanotherproofofthepreviousresult. Theiralgorithmoperatesdire tly onthe transdu erthatrealizes therelation.
Here we onsiderbi-innitesequen esre ognized by automata that are without any initial or nal states (or, more pre isely, with all states both initialandnal). Atransdu erissyn hronizableifithasa onstant integer transmissionrate on y les.
We show that the algorithm given in [13℄ for syn hronization of trans-du ers an be implemented with state splitting if the underlyinggraph of the automaton is strongly onne ted. It is moreover possible to use only output state splitting, or to use only input state splitting. A state split-ting is a transformation of a graph whi h is a an automorphism between the symboli dynami subshifts dened by the graph before and after the transformation. The notion of state splitting, appeared early in informa-tiontheory,hasbeenintrodu edto symboli dynami sbyWilliams. It has beensin e widelyused,forexampleto solvesome odingproblems(see for instan e [17 ℄, [1 ℄ and [15 ℄). A state splitting keeps good properties of an
is performed with state splittingand shiftingletters of the ouput, it keeps the lo alityof the inputautomaton of the transdu er. State splittingand shiftinghas already been used in oding theory to transform a transdu er whi h has an input with nite anti ipation into a transdu er that realizes thesame fun tion on bi-innitewords and whi h hasa deterministi input (see forinstan e[18 , p. 1720℄). However, thetwo problemsare dierent.
We give a detailed presentation of the syn hronization algorithm. We use the notion of balan e of a state introdu ed in [13 ℄, whi h ontrols the lookahead, i.e thenumberof symbolsread inoutput (upto a divisionby a onstant k) minusthe number of symbols read in input. In [13 ℄, the posi-tive balan es of states are de remented and the same treatment is applied afterreversingthe rolesoftheinputand outputautomata. We des ribean implementation of this algorithm whi h de rements the positive balan es, in rementsthenegative onesand simultaneouslyremovesthe"-transitions. We show that the size of the sliding window grows linearly during the pro ess. Thisinoneofthemaininterestofthealgorithm. However,wegive anexampleofan asyn hronousmaprealizedbyatransdu ersu hthatany syn hronizedtransdu erwithalo alinputautomatonthatrealizesithasan exponentialnumberofstates. The syn hronizationistherefore intrinsi ally exponentialin thenumberof states.
Inthelastse tion,weextendtheresulttothemoregeneral aseof trans-du ers with non strongly onne ted graphs. The algorithm of Sakarovit h andFrougny[13 ℄ isnotadequateto ourpurposesin eitdoesnotguarantee thelo alityoftheinputof thetransdu er. Thismakesthere overingofthe syn hronousmap,denedbythewayofaslidingblo kwindow,mu hmore diÆ ult. Wepresentanotheralgorithmwhi hkeepsthelo alityoftheinput ofthetransdu er butneedsa stronger syn hronizationhypothesis.
A shortversionof thispaperhasbeenpublishedin[6 ℄.
2 Asyn hronous maps and transdu ers
2.1 Asyn hronous and syn hronous sliding blo k maps Let A be an alphabet. A bi-innite word of A
Z is a bi-innite sequen e (a i ) i2Z
of letters of A. The spa e A Z
is endowed with the usual produ t topology. Thistopology an be denedbythedistan e d given by
d (a i ) i2Z ;(b i ) i2Z = ( 0 ifa i =b i foranyi2Z 2 minfjijja i 6=b i g otherwise:
Theshift is the ontinuous bije tionfromA to A denedby ((a i ) i2Z )=(a i+1 ) i2Z : Theorbitofawordx2A
Z
isthesetf n
(x)jn2Zg. Twowordsareinthe same orbitifthey dieronlyinsome shiftingof theindi es. Thus, anorbit may be seen as a bi-innitewordwithout expli itindexing. The set of all orbits is denoted by ! A ! . An element of ! A !
is also alled a word. In the sequel,weidentifyawordwithitsorbitbutinorderto avoidambiguity,we referto aword ofA Z orto awordof ! A ! .
We now ome to the denition of sliding blo k maps also alled lo al mapsintheliterature. Werstre allthe lassi aldenitionofslidingblo k maps from A
Z to B
Z
. Then we give the denition of asyn hronous and syn hronous sliding blo k maps from
! A ! to ! B !
. We nally explain the onne tionsbetweenthese denitions.
A fun tion f from A Z
to B Z
is a sliding blo k map if there are integers m;a,(misthememoryandaistheanti ipation),andafun tion
f :A
l !B, where l=m+a, su h that for all x 2 A
Z
,the image y = f(x) of x is the bi-inniteword of B Z dened by y n = f(x n (m 1) x n+a ) for all n 2 Z. Thus theletter y
n
onlydepends on the niteblo k x
n (m 1) x
n+a of x. The integer l =m+a is alledthe size of theso alled slidingwindow. A sliding blo k map f ommutes with the shift, i.e., satises f Æ = Æf. A tually, a fun tionfrom A
Z to B
Z
is a slidingblo kmap if and onlyif it is ontinuousand ommutes withtheshift.
x
f(x)
l
variablelength
f
Figure 1: Asyn hronousslidingblo kmap
A fun tion f from ! A ! to ! B !
is a asyn hronous sliding blo k map if there are an integer l and a fun tion
f :A
l ! B
su h that the image of a wordx of
! A
!
is the on atenation of the nitewords f(x n (l 1) x n ) for all n 2 Z (see Figure 1). The integer l is also alled the size of the slidingwindow. Thefun tion f is alled ak-syn hronous sliding blo k map ifthe fun tion
f is a tuallyuniform, that is a fun tionfrom A l
to B k
f(x) x
lengthk
f
Figure 2: A k-syn hronousslidingblo kmap
Figure 2) forsome xed integer k. It issyn hronous if it is k-syn hronous forsome integer k.
Bothdenitionsarevery similarbutinthe aseofmapsfromA Z
toB Z
, the image of a blo k by
f is always a letter while it an be an arbitrary wordin the ase of fun tions from
! A ! to ! B !
. Iff isa slidingblo k map from A Z to B Z where B = C k
for some integer k, it naturally indu es a syn hronous sliding blo k map from
! A ! to ! C !
. This fun tion maps a wordx tothewordobtainedby on atenating theblo ksoflengthk of the image of x by f. This fun tion, whi h is also alled f, is a k-syn hronous sliding blo k map. Conversely, if f is a k-syn hronous sliding blo k map from ! A ! to ! C !
,it also denes a slidingblo kmapfrom A Z to B Z where B =C k
. In the sequel, we only onsider asyn hronous slidingblo kmaps from ! A ! to ! B !
and wesimply allthem slidingblo kmaps. If f is a sliding blo k map from
! A ! to ! B !
, there may exist two dif-ferent fun tions f and f 0 from A l and A l 0 to B
su h that the image of a wordx of
! A
!
is the on atenation of thenite words f(x n (l 1) x n ) or f 0 (x n (l 0 1) x n
). Inparti ular,onefun tion,say f
0
,maybeuniformfrom A
l 0
to B k
whiletheother,
f,maynotbeuniform.
The purposeof thispaperis to explainhow to nda uniform fun tion
f 0
whi h yields the same fun tion f, when the asyn hronous sliding blo k mapf hassuitablepropertiesand isdes ribedbya fun tion
f whi hisnot uniform.
2.2 Transdu ers
In this se tion we onsider automata labeled in A
B
. Automata on-sideredintheliteratureareoftenlabeledinAB
insteadof A B but mostof the resultsthat we present here does not requirethis assumption. Theemptywordisdenoted by".
verti es, and E as set of edges labeled in A
B
. Ea h edge (p;(u;v);q) islabeledbyapairof words(u;v)whoserst omponentistheinputwhile these ond istheoutput. Thesumjuj+jvjisthesizeofthetransition. The size jTjofa transdu erT isthe sumof thesizesof its transitions.
Su h a transdu erdenes a relationfrom ! A ! to ! B !
made of all pairs (x;y) su hthat (x;y) isthe labelof abi-innitepathof thetransdu er.
We always assume that transdu ers are "-free, that is, have no ("; ")-labeled edges. Classi al algorithms from automata theory are known to removethe(";")-labeled edgeswithout hangingtherelationdenedbythe transdu er[2 ℄.
An automaton withoutany"-transition issaid to be(m;a)-lo al, where m and aareintegers, itwo nitepaths of lengthn=m+a and withthe same label: ((p i ;a i ;p i+1 )) 0in 1 and ((p 0 i ;a i ;p 0 i+1 )) 0in 1 satisfy p m = p 0 m
. An automaton is said to be lo al if it is (m;a)-lo al for some m and a. This property is equivalent to the property of the existen e of at most one bi-innitepathlabeledbyagiven bi-inniteword. Anautomaton with "-transitionsissaidtobelo al ifthereisatmostonebi-innitepathlabeled by agiven bi-inniteword.
The input automaton of the transdu er is the automaton obtained by removingthese ond omponentoftheedgelabel. Therelationdenedbya transdu ermaynot be a fun tion. This ishoweveralways trueifthe input automatonis a lo alautomaton.
Ea h asyn hronous sliding blo k map from ! A ! to ! B ! an be dened byatransdu erT labeledinAB
. Letf beanasyn hronousslidingblo k denedasabove and letlbethesizeof itsslidingwindow. Letmand abe non-negative integerssu hthat m+a=l 1. WedeneV asthesetA
l 1 . Theedges of T are
(a 1 :::a m+a ) am+1j f(a1:::am+aa l ) !(a 2 :::a m+a a l ):
The input automaton of this transdu er is a De Bruin graph whi h is in general not deterministi . It is deterministi whenever a = 0. It is an (m;a)-lo al automaton. Thistransdu errealizes thefun tionf.
Foranyasyn hronousslidingblo kmap,itismoreoverpossibleto hoose m=l 1 and a=0 inthedenitionofthe transdu erT. In this ase, the inputautomaton of T is adeterministi automaton.
Letk be a positiveinteger. A k-syn hronous transdu er is atransdu er labeled in AB
k
. On ea h edge, the number of output labels is k times thenumberof inputones: ithasa onstant transmissionrateon ea h edge
a k-syn hronous sliding blo k map from ! A ! to ! B ! an be dened by a k-syn hronoustransdu er.
We have onsideredmaps denedon !
A !
. Sometimes,maps aredened on theset of orbits ofa subshiftof nitetype S of A
Z
. A subshift of nite type is a subset of A
Z
whi h an be hara terized by a nite number of forbiddenniteblo ks. Itisa losedsubsetofA
Z
invariantbytheshift. A subshiftof nitetype an bere ognizedbyalo al automaton. A anoni al example of subshift of nite type is the set of bi-innite paths of a nite automaton. Itisin ludedinE
Z
,wherethealphabetE isthesetofedges of theautomaton. Equivalently,it is also the set of labelsof bi-innitepaths ofa niteautomaton inwhi hedges have distin tlabels.
If f is an asyn hronous sliding blo k map from S to !
B !
, it an be dened by an asyn hronous transdu er whose input automaton is a lo al automatonre ognizing S.
Converselyanyasyn hronoustransdu erlabeled inAB
witha lo al inputautomaton denes an asyn hronous sliding blo k map. If the input automatonis(m;a)-lo al, one an deneitwitha slidingwindowoflength m+a+1. If the transdu er is k-syn hronous, it denes a k-syn hronous slidingblo kmapfrom
! A ! to ! B ! . a b ajxx bjz ajtt bjy a a ? xy a b ? z b a ? tt b b ? y
Figure 3: Asyn hronoustransdu erand map
Example1 Let A =fa;bg and B = fx;y;z;tg. An example of an asyn- hronous slidingblo kmap from
! A ! to ! B !
realized by theasyn hronous transdu erofFigure 3.
Example2 Let A = fa;bg and B = fx;y;z;tg. An example of a 2-syn hronousslidingblo kmapfrom
! A ! to ! B !
realizedbythe2-syn hronous transdu erofFigure 4.
a b ajxx bjzt ajtt bjyy ? xy ? zt b a ? tt b b ? yy
Figure 4: Syn hronoustransdu erand map
3 Syn hronization of transitive transdu ers
Inthisse tion,we onsidertransitivetransdu ers,thatistransdu erswhose graphsarestrongly onne ted. Ifthe inputautomaton of the transdu eris alo alautomaton,itre ognizesatransitiveshiftofnitetype. Wedes ribe an algorithm whi h syn hronizestransdu ers with a onstant transmission rate on y les. The property of having a onstant transmission rate on y les ishen e asuÆ ient ondition. It is notalways a ne essary ondition sin eanytransdu erlabelledinA
b
anbesyn hronized. We onje ture that the ondition is a ne essary ondition if the fun tion realized by the transdu erisnot onstant.
Thisalgorithmsusesstate splittingand thuskeepsthelo alpropertyof theinputautomaton. Non-transitivetransdu ersare onsideredinSe tion4.
3.1 Transmission rate
Let T be a transdu er. We dene the transmission rate of a path labeled by (u;v) astheratiojvj=juj. Re allthat a y leis apathbeginningat and endingin a same state. A transdu er has a onstant transmission rate on y les if all y les have the same transmissionrate. This property an be he kedonsimple y lesonly. Atransdu erhasa onstant transmissionrate on on uent paths if for any states p and q, all paths beginning at p and endinginq have thesame transmissionrate (dependingonp and q). Ifthe transdu eristransitive,a onstant transmissionrateon y lesisequivalent to a onstant transmissionrate on on uent paths.
We rst give analgorithm to he kifa transitive transdu erhasa on-stant integer transmissionrate on on uent paths (oron y les). This an be done by a depth rst sear h. A rst exploration an be done to nd a y le and get then an integer k andidate to be the onstant transmis-sion rate. We begin the exploration of the graph at some state i. We dene a fun tion balan e from V to Z. This fun tion asso iates with any stateq an integerbalan e(q)su hthatforanystatespand q,thedieren e
beled(u;v). Sin ethegraphisstrongly onne ted,thispropertydenesthe fun tion balan e up to an additive onstant. The balan es are ompletely denedifwe xed balan e(i)=0.
Duringtheexplorationofthegraph,we an omputeforea hstate qan integer balan e(q) asfollows:
balan e(i)isequal to 0
balan e(q) is equal to jvj kjuj for any path from i to q labeled by (u;v).
Here is the algorithm to ompute the balan es of the states. The main pro edure Balan esets the value of balan e(i)and the re ursive fun tion Visitperformsthedepthrstsear h. Theboolean onstant-rateinitialized toTrueindi atesat theendifthetransdu erhasa onstantrateon y les. Balan e
begin
onstant-rate:= True;
for allstates q do visited[q℄:=False; balan e[i℄ := 0; Visit(i); end Visit(p) begin visited[p℄ := True;
for ea hedge (p;(u;v);q) do if visited[q℄=False then
begin
balan e[q℄:=balan e[p℄+jvj kjuj; Visit(q);
end
elseif balan e[q℄6=balan e[p℄+jvj kjuj then onstant-rate :=False;
end
Thevalueofthebalan eisnotimportant. Onlythedieren eoftwovalues isindependentof the explorationorder. If thetransdu erhas n statesand outputlabelsofedges oflengthat mostL,thedieren eof balan esofany two statesis boundedbyLn.
We now des ribe the algorithm whi h syn hronizes transitive transdu ers witha onstanttransmissionrate on y le. This algorithmuses state split-tingthatwenowdene. Werstdenetheoperationofoutputstatesplitting inaautomatonT =(V;E). LetqbeavertexofT andletO(resp. I)bethe setofedgesgoingoutofq(resp. ominginq). LetO=O
0 +O
00
beapartition ofO. Theoperationofoutputstatesplitting relativetothepartition(O
0 ;O
00 ) transforms T into thegraph T
0 =(V 0 ;E 0 ) where V 0 =(V nfqg)[fq 0 ;q 00 g isobtainedfromV bysplittingstate q into two statesq
0 and q 00 ,and where E 0 is denedasfollows.
alledges of E that arenotin identto q areleft un hanged. we give to bothq
0 and q
00
opies oftheinputedges ofq. we distribute the output edges of q between q
0 and q
00
a ording to thepartition of O into O
0 and O 00 . We denote U 0 and U 00 the sets of outputedges ofq 0 andq 00 respe tively: U 0 =f(q 0 ;x;p)j(q;x;p)2O 0 g andU 00 =f(q 0 0 ;x;p)j(q;x;p)2O 00 g, (seeFigure 5). q 6 ? O 0 ? 6 O 00 Before q 0 q 00 6 ? U 0 ? 6 U 00 After Figure 5: Outputstate splitting
The operationof inputstate splittingis obtainedbyreversingthe roles played by input and output edges. It is well-known that if an automa-tonis (m;a)-lo al, it is(m;a+1)-lo al after an output state splittingand (m+1;a)-lo alafteraninputstatesplitting. Adeterministi (resp. odeter-ministi )automaton remainsdeterministi (resp. odeterministi )after an output (resp. input)splitting. The denitions an be generalized to dene a multiple state splitting, when a state is split into more than two states a ordingto a partitionwhi hhasmore thantwo parts.
We doinput(resp. output)state splittingsof statesq ofatransdu erT onlyiftheinput(resp. output)edgesofqhaveanonemptyoutputlabeling. An inputstate splitting ofa state q is admissible ifit isdone a ording to
the last letter of their output label. An output state splittingof a state q is admissible if it is done a ording to a partition whi h is ner than the partitionoftheoutputedgesdenedbytherst letteroftheiroutputlabel. Unlessotherwisestated,wedoadmissibleinput(resp. output)statesplitting orresponding to thepartitiondened bythelastletter of theoutput label of input edges (resp. of the rst letter of the output label of the output edges).
Examples of these two operationsare des ribedin Figure 6, wherea, b and are lettersof B and u, u
0 ,v, v 0 , w,w 0 , r,r 0 ,t and t 0
arenitewords of B
. The state q is labeled by its balan e p, whi h remains un hanged afterthe transformation.
p uju 0 vjv 0 tjat 0 rjbr 0 wj w 0 Before p p p uju 0 uju 0 uju 0 vjv 0 vjv 0 vjv 0 rjbr 0 wj w 0 tjat 0 tjat 0 tjat 0 After Figure 6: An admissibleoutput state splitting
We now dene another operation on a transdu er T. In order to syn- hronizethetransdu er,wearegoingtode rementorin rementthebalan e ofsome states. p tjat 0 uju 0 vjv 0 rjar 0 wjaw 0 Before p+1 tjt 0 a uju 0 a vjv 0 a rjr 0 wjw 0 After Figure7: In rementationof astate
We rst des ribe theoperations alled in rementation and de rementa-tion inthe ase where all edges of the transdu erare labeled byA
+ B
. The general ase is a bit more te hni al and it will des ribed just after.
labels un hanged. An in rementation of a state of balan e p an be done ifand only ifall the output labels of its output edges begin with thesame rstletter. Thisletter isremoved and putaslastletter of theoutput label of the inputedges. The balan eis in rementedby 1. The de rementation is dened similarly. The in rementation is illustrated in Figure 7. In the gure,thestates arelabeled withtheirbalan e.
p tjat 0 uju 0 vjv 0 "ja wjaw 0 Before p+1 tjt 0 a uju 0 a vjv 0 a tjt 0 a wjw 0 uju 0 a vjv 0 a After Figure8: An "-free in rementation
We now des ribethe in rementationin the ase wheresome edges may be inputlabeled by". We have supposedthat the transdu eris "-free but some(";")-labelededgesmayappearinanin rementationmadeasdes ribed above. This anhappenifanoutputedgeislabeledby(";a). So,wedes ribe amodiedversion whi h keepsthe "-freepropertyofthe transdu er.
Ifan edge(q;(";");q 0
) appears inthein rementationof state q,itis re-movedandrepla edbyedges(q
00
;(u;v);q 0
),forea hinputedge(q 00
;(u;v);q) of q. If the input automaton is lo al before the in rementation, it is still lo alafter it. An "-freein rementationisillustratedinFigure8,where ais aletter of B and u,u 0 ,v, v 0 ,w, w 0 ,tand t 0
arenitewords ofB
.
We now des ribe the syn hronization algorithm by state splitting for a transitive transdu er labeled in A
B
, and with a onstant integer transmissionrate k on y les. A des ription of the inputand output data isthefollowing.
Input:
A transitive asyn hronous transdu er T labeled in A
B
with a onstant transmissionrate k on y les whi h denesan asyn hronous slidingblo kmapf from
! A ! to ! B ! . Output:
Atransitivesyn hronoustransdu erT 0 labeledinAB k . The trans-du er T 0
inputautomatonofT islo al, theinputautomatonofT isalsolo al. The transdu er T
0
is obtained by state splitting. Furthermore, it is possible to do only output (resp. input) state splitting. Then,if theinput automatonofT isdeterministi (resp. odeterministi )andlo al,theinput automatonof T
0
isalso deterministi (resp. odeterministi )and lo al. We denote de rement(q) and in rement(q) the pro edures orre-spondingtotheoperationsdes ribedabove,appliedtostateq. Wedenoteby input-split(q;q 1 ;q 2 ;:::;q r )andoutput-split(q;q 1 ;q 2 ;:::;q r )the orre-spondingpro eduresappliedto astate q,splitintostatesq
1 ;q 2 ;:::;q r . The syn hronizationalgorithm isthefollowing.
Syn hronize(T) begin
for i:=Ldownto1 do
forea h state q of balan eior ido if balan e(q)<0 then begin output-split(q;q 1 ;q 2 ;:::;q r ); for allq j (1jr) do in rement(q j ); end
else if balan e(q)>0 then begin input-split(q;q 1 ;q 2 ;:::;q r ); for allq j (1jr) do de rement(q j ); end end
The soundnessof thealgorithm isbased onthe followingpoints:
First, and thisis thekey point of the algorithm, a state with a neg-ative balan e, to be split and in remented, does not have outgoing edges with an empty output label. In fa t, su h an edge would ar-riveina state withastri tlylowerbalan e. Thisis notpossiblesin e stateswith lower balan earetreated rst. The same istrue (mutatis mutandis)forstates withpositive balan es.
Se ond,de rementations(resp. in rementations)ofstatesqorq 1
;q 2
;:::;q r are applied after an eventual admissible output (resp. input) state splitting, and they an a tually be done. The transdu eris syn hro-nizedwhen all balan esare equal(tozero).
put(or onlyinput) state splittings. To do only output state splittings for example,webeginwith apositive distributionof balan es.
Remark 4 For ea h value of i of the outer loop, all states with balan es equalto i(resp. i) aresplit and de remented (resp. in remented). A tu-ally all the splittings of these states are independent and an therefore be performed simultaneously. Su h a step is alled a round of state splitting (see [18, p. 1693℄). This also holds for in rementations and de rementa-tions. Whenin rementationsand de rementations aredonesimultaneously, thebeginning and the endof the output labels an be modied in parallel sin ethere isno on urrent write.
3.3 Evaluation of the omplexity
In this se tion, we study the omplexity of the pro edure Syn hronize when the input automaton of the transdu er is lo al. We rst show that thesizeoftheslidingwindowgrowslinearly. However, weexhibitexamples showingthat thereis an exponentialgrowth of thenumberofstates.
This result an be omparedto thatobtained byAshley in[4 ℄ (see also [3 ℄)whereheintrodu esanew onstru tionofnite-stateen odersforinput onstrained hannelsthatguarantees anen oderwithawindowlengththat is linear in the number n of states of the smallest graph representing the onstraint. His onstru tiongivesaspe i ationoftroundsofstatesplitting to beperformed on thegraph,where tis linear inn, even ifthe number of statesoftheen oderisexponential. Thesamesituationappearshere: evenif thenumberofstatesofthetransdu erthatwegethasanexponentialnumber of states, it ispossibleto do anumberof roundsof state splittingwhi h is boundedbythemaximaldieren ebetweenthebalan esofthestates. This result is interesting sin e the size of the window of the syn hronized map that we get depends on the number of rounds of state-splitting that are performed,and noton thenumberof statesof thetransdu er.
Let T be an asyn hronoustransdu er whose inputautomaton is lo al. Re allthat jTjis thesum ofthesizes of thetransitionsof T. Letn be the number of states of T. Let f be the asyn hronous map from
! A ! to ! B ! dened by the transdu er and let l be the size of its sliding window. It is known that l=O(n
2
) (see forexample [5 ℄). Let T 0
be the syn hronized transdu er. LetMbethemaximaldieren ebetweenthebalan esofstates.
Proposition 5 Thesizeof thewindow of thesyn hronizedmap obtained is bounded by M +l.
We point out that if the transdu er T is labeled in AB and the lengths of the output labels are bounded byK,the integer M is bounded by Kn. Indeed, the rate k is less than K, and for ea h edge (p;(a;v);q), thedieren e betweenthe balan es of p and q is lessthan jvj k K. In the ase where the sizes of the transitions are not bounded, the maximal dieren ebetweenthebalan es ofanytwo statesisboundedbythesum of the sizes of the transitions of a simple path in T, whi h is himself upper bounded by jTj. This shows that the size of the window grows linearly injTj.
Proof Let M +
be the maximum of positive balan es of T, and M the maximumof theabsolute valuesof negative balan es. Thus, theinteger M isequaltoM
+
+M . IftheinputautomatonofT is(m;a)-lo al,theinput automatonofT
0
is(m+M +
;a+M )-lo al. Indeed,asingleroundofoutput statesplittingin reasestheanti ipationofalo alautomatonbyatmostone and a single round of input state splitting in reases thememory of a lo al automatonbyatmostone. Thesizeofthewindowofthesyn hronizedmap isthenboundedbyM
+
+M +l=M+l.
Thefollowingexampleshowsthatthenumberofstatesofthetransdu er grows exponentially when it is syn hronized. It a tually proves that this blow up is intrinsi to the syn hronization. This does not depend of the algorithmused to onstru t thetransdu er.
Proposition 6 There are n-state syn hronizable transdu ers with a lo al input su h that any syn hronized transdu er with a lo al input that denes the same map from
! A ! to ! B !
has an exponential number of states.
::: ::: 3 n n+2 2 2n 1 n+1 aja bjb j" j" j" j" j" djd eje fjff fjff fjff fjff fjff Figure9: Transdu er T
Proof LetA be thealphabetfa;b; ;d;e;fg and let us onsiderthe trans-du er T of Figure 9. This transdu er has 2n states and is syn hronizable withrate1. LetT
0
beanysyn hronized(orletter-to-letter)transdu erwith alo alinputautomatonthat denesthe same mapasT from
! A ! to ! A ! .
We suppose that the input automaton of T is (m;a)-lo al. We an assumethatm=aandthatmisgreaterthann. Forea h stateq ofT
0 ,we denetheset E
q
astheset of pairs(u l
;u r
) orwords oflength m su h that u
l u
r
labels a path going through state q after reading u l
. Sin e the input automatonis(m;m)-lo al thesetsE
q
arepairwisedisjoint. Furthermore,if bothpairs(u l ;u r ) and(u 0 l ;u 0 r ) belongto E q ,bothpairs(u l ;u 0 r ) and(u 0 l ;u r ) also belong to E q . Let w l and w 0 l
be two dierent words of length n=4 over fa;bg and let w
r
and w 0 r
be two dierent words of length n=4 over fd;eg. Let us dene thewords u l ,u r ,u 0 l andu 0 r of lengthm by u l =a m 3n=4 w l n=2 u r = n=2 w r d m 3n=4 u 0 l =a m 3n=4 w 0 l n=2 u 0 r = n=2 w 0 r d m 3n=4 : Wesupposethatbothpairs(u
l ;u r )and(u 0 l ;u 0 r )belongtoE q
forsomestateq. There arefour paths
1 , 2 , 3 and 4
asshownin Figure 10 where v l ,v r , q q 0 q 00 3 d ! jx r w r jv r d ! jx 0 r w l jv l n=2 jt r n=2 jt l w 0 l jv 0 l n=2 jt 0 r n=2 jt 0 l w 0 r jv 0 r a ! jx 0 l a ! jx l 1 2 4 Figure10: Paths 1 , 2 , 3 and 4 v 0 l and v 0 r
are nitewords of lengthn=4, t l ,t r , t 0 l and t 0 r
are nitewords of lengthn=2,x
l and x
0 l
areleft-innitewordsand x r andx 0 r areright-innite words. Paths 1 and 2
end in q while paths 3
and 4
start at q. Sin e the respe tive images by f of
! aw l n w r d ! , ! aw 0 l n w 0 r d ! , ! aw l n w 0 r d ! and ! aw 0 l n w r d ! are ! aw l w r d ! , ! aw 0 l w 0 r d ! , ! aw l w 0 r d ! and ! aw 0 l w r d ! ,wegetthe followingequalitiesby onsideringthe paths
1 3 , 2 4 , 1 4 and 2 3 x l v l t l t r v r x r = ! aw l w r d ! x 0 l v 0 l t 0 l t 0 r v 0 r x 0 r = ! aw 0 l w 0 r d ! x l v l t l t 0 r v 0 r x 0 r = ! aw l w 0 r d ! x 0 l v 0 l t 0 l t r v r x r = ! aw 0 l w r d ! : Itfollowsthat we haveeither:
t r v r x r =xw r d ! t 0 r v 0 r x 0 r =xw 0 r d ! ;
wherex isa ommonsuÆx to w l and w l ,or: x l v l t l = ! aw l y x 0 l v 0 l t 0 l = ! aw 0 l y: wherey isa ommonprextow
r andw 0 r . Sin ew r andw 0 r
aredierentand thewordsw
l andw
0 l
arealsodierent,thewordst r
andt 0 r
mustbedierent. Thisimpliesthatthestates q
0 andq
00
arealso dierentsin etheautomaton isunambiguous(orlossless).
We nish theproof with a variant of the pigeon hole prin iple. Let us now hoose N = 2 n=4 distin t words w l ;1 ;v l ;2 ;:::w l ;N of length n=4 over fa;bgandletN distin twordsw
r;1 ;w
r;2
;:::;w r;N
oflengthn=4overfd;eg. Let 1 < < 2. Let us assume that we have always less than
n=4 pairs (w l ;i ;w r;i
) that belong to a same set E q
. Then the numberof states of T 0 is r > (2=)
(n=4)
, whi h is exponential. Otherwise, there is a state q su h that E q ontains at least n=4 pairs (w l ;i ;w r;i
). We have proved that this impliesthatthe
n=4
statesq v
i
arealldistin t. Wendagainanexponential numberof states. 3.4 Example 0 1 1 ajrt djz fjr jxy bjuvw ejtxyz 0 1 1 1 1 ajrt djz djz djz fjr jxy jxy jxy bjuvw ejtxyz
Figure11: Transdu erT and theoutput state splitting
We give an example of syn hronization. We onsiderthe transdu er T pi tured inthe left of Figure 11. In the gure,ea h symbol represents one letterandstatesarelabeledbytheirbalan e. Thistransdu erisa andidate to be syn hronized with k =2. The state with balan e 1 is output-split into three states (see theright of Figure 11). Then, ea h of the three new states arein remented and their balan ebe omes0 (see leftof Figure 12). Finally,thelaststate withbalan e1 doesnotneedto besplit sin eitonly
0 1 0 0 ajrt djzx djzu djzt fjr jyx jyu jyt bjvw ejxyz 0 0 0 0 ajrt djzx djzu djzt fjzr jyx jyu jyt bjvw ejxy
Figure 12: In rementationand de rementation
hasonein omingedge. Itisjustde remented. Thesyn hronizedtransdu er is pi tured in the right of Figure 12). The input automaton is (0;1)-lo al. The2-syn hronousslidingblo kmapf denedhasa windowof length2.
4 Syn hronization of non-transitive transdu ers
We nally onsider the ase of transdu ers labeled in A
B
with a not ne essarily strongly onne ted graph. An algorithm for syn hronizing a non-transitive transitive transdu er has already been given in [13 ℄. This algorithm uses a step of dupli ation of states whi his not a state splitting pro ess and therefore does not keep the important property of lo ality of theinputautomatonofthetransdu er. Wedes ribeanotheralgorithmthat syn hronizes a non-transitive transdu er. This algorithm keeps the lo al propertyof theinputautomaton butit needs a stronger hypothesis on the transdu er.
We give a new ondition for a transdu er to be syn hronizable while keepingthelo al propertyof theinputautomaton ofthetransdu er. Asin the ase of transitive transdu er, we rst supposethat the transdu er has a onstant transmission rate k on y les. However, this ondition is not suÆ ientfornon-transitivetransdu ers.
An undire ted y le of a transdu er T is a y le in T viewed as an undire ted graph. In su h a y le, ea h edge may be used in its usual dire tionorintheother dire tion.
Let T bea transdu erwhi h has a onstant transmission rate k. With ea h undire ted y le in the graph, we asso iate an integer val( ) alled thevaluationofthe y leand omputedasfollows. We xsome orientation for the y le and the valuation of the y le is equal to the sum of the valuations of all edges of the y le. The valuation of an edge (p;(u;v);q)
theedge, and is equalto its opposite otherwise. The valuation ofthe y le dependson theorientation hosenforthe y le.
It is well-known that the set of all undire ted y les of a graphs forms a ve tor spa e whose dimension is alled the y lomati number of the graph[8 ℄. Our valuationis thena linearform on thisve tor spa e.
We suppose that the transdu er T has a onstant transmission rate k on y les. Thetransdu erT issaid tohave a onstant transmission rate on undire ted y le ifthefollowingequalityholdsforanyundire ted y le
val( )=0:
We rst make some omments about thisproperty. We rst point out thatifthetransdu erT is onne ted, italways hasa onstanttransmission rate on undire ted y les if it already has a onstant transmission rate k on y les. Indeed, ifthegraph isstrongly onne ted, ea h undire ted y le an be de omposedas asum of dire ted y les. Se ond,itsuÆ es to he k thispropertyonsimpleundire ted y lessin ethevaluationisalinearform. This anbedonebyastraightforwardadaptationofthealgorithmBalan e givenin Se tion3.1. 0 1 xjab yj zjd tjef Figure13: Transdu er T Let and 0
are two paths from p to p 0
respe tively labeled by ujv and u
0 jv
0
. We an then onsider the undire ted y le ~ 0 where ~ 0 is the path 0
in reverse dire tion. If the transdu erhas a onstant transmission rateonundire ted y les,onehasjvj=jv
0
j. However,the onverse doesnot hold asshows the transdu er pi tured inFigure 13. Thistransdu er has a onstant transmission rate of 2 on y les but it does not have a onstant transmissionrate on undire ted y les. It an be proved that the fun tion realizedbythistransdu er annotberealizedbyatransdu erwhi hislo al andsyn hronous.
We laim that any transdu er whi h has a onstant transmission rate on undire ted y les an be syn hronized using state splittings and in re-mentations and de rementations. We just sket h the pro edure. It should be noti edthata onstant transmissionrateon undire ted y lesis neither
remains true along the pro edure. The pro edure treats su essively ea h onne ted omponent of the transdu er. A rst onne ted omponent is syn hronizedusingthealgorithmSyn hronizegiveninSe tion3.2. Then, at ea h step, a new onne ted omponent is also syn hronized in thesame way. However, it may happen that paths between the newly syn hronized onne ted omponent and the already syn hronized onne ted omponents do not have a transmission rate equal to k. In that ase, all states of the treated onne ted omponent are split and in remented as many times as neededsothatallpaths haveatransmissionrateequalto k. Thekeypoint to be noti ed is that the property of having a onstant transmission rate onundire ted y les insuresthatall paths betweenthenewlysyn hronized onne ted omponentand theoldones needthesame numberof in remen-tations. When all onne ted omponents have been treated that way, the transdu eris ompletelysyn hronized.
A knowledgment
We would like to thank the anonymous referees for very helpful omments and suggestions.
Referen es
[1℄ Adler, R. L.,Coppersmith, D., and Hassner,M. Algorithmsfor slidingblo k odes. IEEETrans. Inform. Theory IT-29 (1983), 5{22.
[2℄ Aho, A., Sethi, R., and Ullman, J. Compilers. Addison-Wesley, 1986.
[3℄ Ashley, J. J. Fa tors and extensions of full shifts I. IEEE Trans. Inform. Theory 34, 3 (1988), 389{399.
[4℄ Ashley, J. J. A linear bound for sliding-blo kde oderwindow size, II. IEEE Trans. Inform. Theory 42, 6 (1996), 1913{1924.
[5℄ B
eal, M.-P. Codage Symbolique. Masson, 1993.
[6℄ B
eal, M.-P., and Carton, O. Asyn hronousslidingblo kmaps. In pro eeding of DLT'99 (2000). Toappear.
[7℄ eal, M.-P., and Perrin, D. Symboli dynami s and nite au-tomata. In Handbookof Formal Languages,G. RosenbergandA. Salo-maa, Eds.,vol.2. Springer,1997, h.10.
[8℄ Berge, C. Graphes. Gauthier-Villar,1983.
[9℄ Berstel, J. Transdu tions and Context-Free Languages. B.G. Teub-ner, 1979.
[10℄ Berstel, J., and Perrin, D. Theory of Codes. A ademi Press, 1984.
[11℄ Eilenberg,S. Automata, LanguagesandMa hines,vol.A. A ademi Press, New York,1972.
[12℄ Elgot, C.C., and Mezei, J.E. Onrelationsdenedbygeneralized niteautomata. IBMJournal Res. and Dev.9 (1965), 47{68.
[13℄ Frougny,C., and Sakarovit h,J. Syn hronizedrelationsofnite words. Theoret. Comput. S i.108 (1993), 45{82.
[14℄ Frougny, C., and Sakarovit h, J. Syn hronisation deterministe desautomatesa delaiborne. Theoret. Comput.S i.191 (1998), 61{77.
[15℄ Immink,K.A.S.,Siegel,P. H.,andWolf,J.K.Codesfordigital re orders. IEEETrans. Inform. Theory 44, 6(1998), 2260{2300.
[16℄ Lind, D., and Mar us, B. An Introdu tion to Symboli Dynami s and Coding. Cambridge UniversityPress, 1995.
[17℄ Mar us, B. Fa tors and extensions of full shifts. Monats. Math 88 (1979), 239{247.
[18℄ Mar us, B., Roth, R., and Siegel, P. Handbook of Coding The-ory, vol. 2. Elsevier, 1998, h. Constrained Systems and Coding for Re ording Channels.