• No se han encontrado resultados

Welch sets for random generation and representation of reversible one-dimensional cellular automata !

N/A
N/A
Protected

Academic year: 2022

Share "Welch sets for random generation and representation of reversible one-dimensional cellular automata !"

Copied!
15
0
0

Texto completo

(1)

ContentslistsavailableatScienceDirect

Information Sciences

journalhomepage:www.elsevier.com/locate/ins

Welch sets for random generation and representation of reversible one-dimensional cellular automata !

Juan Carlos Seck-Tuoh-Mora

a,

, Joselito Medina-Marin

a

,

Norberto Hernandez-Romero

a

, Genaro J. Martinez

b,c

, Irving Barragan-Vite

a

a AAI-ICBI-UAEH. Carr Pachuca-Tulancingo Km 4.5. Pachuca 42184 Hidalgo, Mexico

b Unconventional Computing Centre, University of the West of England, BS16 1QY Bristol, United Kingdom

c Escuela Superior de Computo, Instituto Politecnico Nacional, Mexico

a r t i c l e i n f o

Article history:

Received 28 June 2016 Revised 7 November 2016 Accepted 4 December 2016 Available online 7 December 2016 Keywords:

Cellular automata Reversibility Welch indices Bipartite graph Block mapping

a b s t r a c t

Reversibleone-dimensionalcellularautomataarestudiedfromtheperspectiveofWelch Sets.ThispaperpresentsanalgorithmtogeneraterandomWelch setsthatdefineare- versiblecellularautomaton.Then,propertiesofWelchsetsareusedinordertoestablish twobipartitegraphsdescribingtheevolutionruleofreversiblecellularautomata.Thefirst graphgivesanalternativerepresentationforthedynamicsofthesesystemsasblockmap- pingsandshifts.Thesecondgraphoffersacompactrepresentationfortheevolutionrule ofreversiblecellularautomata.Bothgraphsandtheirmatrixrepresentationsareillustrated bythegenerationofrandomreversiblecellularautomatawith6and18states.

© 2016ElsevierInc.Allrightsreserved.

1. Introduction

Cellularautomata arediscrete dynamical systemsableto generatecomplexbehaviorbased onsimplelocalinteraction amongtheir components.Reversiblecellularautomata arecharacterizedtoproducean invertibleglobalbehaviorprovoked byasetoflocalmappingswhicharenotreversible.

Inthe one-dimensional case, reversible cellular automata havebeen widely investigated in orderto understand their topological,combinatorialanddynamicalproperties.

Due to their property of keeping the original information of the system, concepts and alternative definitions of re- versible cellularautomata have beenemployed inthe specificationof differentcyphering systems [2,8,9,11,19,20,22],and error-correctingcodes[13].

Recentworkshavepresenteddifferentprocedures tocharacterizereversiblebehaviorincellularautomata.Forinstance:

thegeneralization ofreversibilitydefinedby linearrulesover thebinaryfield caseundernullboundary conditionsisex- plained in[21].Reversibility of elementarycellular automata rulenumber 150is describedby circulant matricesin[14]. Reversibilityincellularautomatawithmemoryhasbeenstudiedin[1]and[17].

! Dedicated to the memory of Harold V. McIntosh (1929–2015), a leader in the development of cellular automata theory, whose teaching and knowledge were essential to this work.

Corresponding author:

E-mail addresses: [email protected] (J.C. Seck-Tuoh-Mora), [email protected] (J. Medina-Marin), [email protected] (N. Hernandez-Romero), [email protected] (G.J. Martinez),[email protected] (I. Barragan-Vite).

http://dx.doi.org/10.1016/j.ins.2016.12.009 0020-0255/© 2016 Elsevier Inc. All rights reserved.

(2)

Fig. 1. Evolution of sequence v with four cells for r = 1 , in this case ϕ( v ) has two cells..

Thus,thereisacontinuousinvestigationtocharacterizethepropertiesofreversiblecellularautomata,bothfortheoretical researchandpracticalapplication.

The firsttopologicalstudyofreversiblecellular automataisdeveloped byHedlundin[10]establishingimportantcon- cepts for the one-dimensional case such asthe uniformmultiplicity of ancestors and Welch sets. Several investigations followedthispaperusingWelchsetstodefinenewgraphsrepresentingthelocalbehaviorinducingglobalreversibility[15], andusingtheirvectorrepresentationtogiveamaximumboundfortheminimuminformationneededtoobtainglobalin- vertibility[7].Anothertopicofinteresthasbeentoenumerateallthepossiblecasesofreversibleone-dimensionalcellular automata[3,4,18],thelasttwo referencestakingreversible automataasgroupoidswithalgebraicproperties.Inthissense, references[6]and[5]establishthepropertiesofthesegroupoidsandtheirrelationwithisotopyandCayleygraphs.

Based onthis previous work,the aimof thispaperis topresentan algorithm to createrandomWelchsets to define reversibleone-dimensionalcellularautomata.FromtheseWelchsets,wedefinetwobipartite graphs,bothforrepresenting theforwardandreverselocalmappingsoftheassociatedreversiblecellularautomaton.Wegiveexamplesshowingthatthe formergraphprovidesanalternativerepresentationforthedynamicsofreversibleautomatabyblockmappings andshifts firstlydemonstratedbyKariin[12],andthelatterneedslessspacethantheoriginalevolutionrule.

The paper is organized as follows: Section 2 explains the basic concepts of reversible one-dimensional cellular au- tomataandWelchsets. Section 3definestheproperties ofWelchSetsforreversible automatawithneighborhood size2.

Section4presentsthealgorithmgeneratingrandomWelchsetsandarbitraryreversiblecellularautomata.Section5exposes theconstructionofabipartitegraphbasedonWelchelementstocalculatetheevolutionofreversiblecellularautomataand representtheirdynamicsbyblockmappings andshifts.Section6specifiesashorterversion ofthisgraphinordertorep- resenttheevolutionofreversibleautomatawithareducednumberofelements.Thelastsectiongivesthefinal remarksof thestudy.

2. BasicconceptsofWelchsets

One-dimensionalcellularautomataaredefinedbyadiscretesetofstatesS,aneighborhoodradiusr∈N,aninitialcon- figuration c0:

{

1,2,...,m

}

S for some m∈N, andan evolution rule

ϕ

:S2r+1S. The dynamicsis givenapplying the evolution rule over every cell in c0, thus c1(i)=

ϕ

(c0(i− r)...c0(i+r)) taking periodic boundary conditions. In general ct+1(i)=

ϕ

(ct(i− r)...ct(i+r)).

Forsimplicityweshallrepresent

ϕ

(c(i− r)...c(i+r))justas

ϕ

(c(i)).Thus,forastringvSmwithm≥ 2r+1,wedefine

ϕ

(v)asfollows:

ϕ ( v )

=

ϕ ( v (

r+1

)) ϕ ( v (

r+2

))

. . .

ϕ ( v (

m− r

))

=w

(

1

)

w

(

2

)

. . .w

(

m− 2r

)

=w (1)

wherewistheevolutionofv.Eq.(1)showsthat

ϕ

(v)has2rcellslessthan v.Fig.1illustrates thecaseforasequenceof fourcellsandr=1;inthisworkweareusingcenteredevolutions.

Inordertosimplifyourstudy,wetakethesimulationofeverycellularautomatonbyanotherwithneighborhoodsize2.

ByEq.(1),for

v

=ct(i− 2r+1)...ct(i+2r)wehavethat

ϕ

(

v

)=w=ct+1(i− r+1)...ct+1(i+r).Then

| v |

=4r and

|

w

|

=2r.

LetusdefineanewsetofstatesSsuchthat

|

S

|

=

|

S

|

2r;thus,wecandefineabijectionfromStoS2r.Withthis,thereare

bijectionsvs1s2andws3 forsiSsuchthat:

ϕ

(

s1s2

)

=s3 (2)

Eq.(2) showsthat theoriginal evolution of acellular automaton canbe simulated by anotherevolution rule

ϕ

with neighborhoodsize2(orradius1/2)andanextendedsetofstates.Fig.2describesthissimulationforacellularautomaton withr=1;wheretindicatestimestep.

A cellular automatonis reversible ifthere exists an integerr∈N andan inverse mapping

ϕ

−1:S2r+1S such that ct(i)=

ϕ

−1(ct+1(i)).Thisimpliesthat

ϕ

−1(

ϕ

(ct(i)))=ct(i).

Areversiblecellularautomatoncanbesimulatedbyanotherwithr=1/2forbothinvertiblerules,takingr=max(r,r) andusinganextendedsetofstatesSwith

|

S

|

=

|

S

|

2r.Therefore,wehavetostudyonlyreversiblecellularautomatawith

neighborhoodsize2inbothinvertiblerulesinordertounderstandtheothercases.

(3)

Fig. 2. Evolution of a cellular automaton with r = 1 represented by another with r = 1 / 2 according to Eq. (2) .

ThemainpropertiesofreversiblecellularautomatawerefirstlydefinedintheseminalworksofHedlund[10]andNasu [15].Adetailedexplanationofhowthesepropertiesgeneratereversiblebehaviorforreversibleautomatawithneighborhood size2canbeconsultedin[18].

Thefeaturesofreversibleone-dimensionalcellularautomataaresummarisedinthreemainproperties:

1.Uniformmultiplicityofancestors.ForeverystringwSnthereisasetofstringsA⊂ Sn+1suchthat

|

A

|

=

|

S

|

andeachvA holdsthat

ϕ

(

v

)=w.Eachvisanancestorofw.

2.Welchindices.ThereexistoL,oR∈NsuchthatforeverystatesStherearesetsLs,Rs⊂ Swith

|

Ls

|

=oL and

|

Rs

|

=oR such that

ϕ

(ab)=sforeachaLsandeverybRs,andtheproductoLoR=

|

S

|

.TheseoL,oRarecalledWelchindices.

3.Uniqueintersection.Everypairofstatesa,bSholdsthat

|

RaLb

|

=

|

RbLa

|

=1.

Properties2and3definethattheancestorstringsofanysequenceof2ormorestatesshareacommoncentralpartand theirdifferencesareattheends.Thesepropertiesassuretheexistenceofaninverseevolutionruleabletoreverttheglobal dynamicsoftheautomaton.

ThesetsLsandRsare theWelchsets associatedwithstate sS.Noticethat indicesoL andoR areindependentofthe statedefiningLsandRs.Thatis,

|

Ls

|

=oL and

|

Rs

|

=oRforallsS.

Since

ϕ

and

ϕ

−1 aredefinedwithaneighborhoodsize 2,they canberepresentedbymatricesMϕ andMϕ−1 such that entriesMϕ(a,b)=

ϕ

(ab)andMϕ−1(a,b)=

ϕ

−1(ab)foreverypairofstatesa,bS.

3. PropertiesofWelchsets

The previous propertiesgive a particularstructure for Mϕ andMϕ−1. Property1 guarantees that there are |S| entries equaltosinbothmatricesforeverysS.Property2establishesthatifM(s1,s2)=M(s3,s4)thenM(s1,s4)=M(s3,s2)for siS.Finally,Property3specifiesthatforeverystatesSthereisauniquestateaSsuchthatMϕ(a,a)=s.Thus,inMϕ andMϕ−1 everystatehasarectangulararrangement,andbothmatricesdefinearectangulargroupoid[5].

For every reversible cellular automaton, we can define a state permutation such that Mϕ(s,s)=s. Due to

ϕ

(ss)=s, itishold that

ϕ

(sss)=ss.Therefore,

ϕ

−1(ss)=sandthesame state permutationimpliesthat Mϕ−1(s,s)=s.Thisfeature simplifiesevenmoreourstudy,wejustneedtoanalyzereversiblecellularautomatawithneighborhoodsize2anddiagonal elementsMϕ(s,s)=Mϕ−1(s,s)=sforeverysSbecausealltheothercasescanberepresentedbythisone.Since

|

Ls

|

=oL and

|

Rs

|

=oR,statesappearsinoL rowsofMϕ,atthesameoR columns.

ForaS,let Mϕ(a, ) andMϕ(, a) bethe a-throwandthea-thcolumnrespectivelyofmatrix Mϕ.LetDϕ(a) be the setofstatesinrowMϕ(a,) andlet Iϕ(a)be thesetofstatesincolumnMϕ(,a). Withthis, thefollowingremarkcanbe proved.

Remark1.

|

Dϕ(a)

|

=oL foreachaS.

Proof.SinceMϕ(a,)has|S|columnsandeverystatesholdsthat

|

Rs

|

=oR,thenthereare

|

S

|

/oR=oL statesinMϕ(a,). ! AstraightforwardresultfromRemark1isthefollowingone.

Corollary1.

|

Iϕ(a)

|

=oR foreachaS.

ArelevantpropertyofDϕ(a)andIϕ(a)isthenextone.

Remark2. Dϕ(a)Iϕ(a)=aforeveryaS.

Proof.SinceMϕ(a,a)=awehavethataDϕ(a)andaIϕ(a).Ifthereisanotherstateb̸=asuchthatbDϕ(a)andbIϕ(a),thenaLbandaRb.Thisimpliesthat

ϕ

(aa)=b andthereforeMϕ(a,a)=b,whichisacontradiction. !

Remark2saysthatDϕ(a)andIϕ(a)agreeonlyinthediagonal state.ForeachsS,let L−1s andR−1s betheWelchsets ofsassociatedwiththeinverseevolutionrule

ϕ

−1.Accordingly,letoL−1 andoR−1 betheWelchindicesrelatedto

ϕ

−1.The followingremarkestablishestherelationshipbetweentheWelchindicesof

ϕ

and

ϕ

−1.

Remark3. oL−1=oR andoR−1=oL.

(4)

Proof. Forevery state sS, we havethat aL−1i andbR−1i iff

ϕ

−1(ab)=s. Thisimpliesthat aIϕ(s) andbDϕ(s), henceL−1s =Iϕ(s)andR−1s =Dϕ(s).Remark1andCorollary1indicatethat

|

Iϕ(s)

|

=oR and

|

Dϕ(s)

|

=oL.ThereforeoL−1=oR andoR−1=oL. !

4. AlgorithmtogeneraterandomWelchsets

ForU⊆S,we canrepresenttheelementsofUbyabinaryvectorgU:S→0,1ofsize1× |S|suchthatgU(a)=1iff aU;otherwise,gU(a)=0.Withthis,wedefinetwomappings

α

(gU)=U and

β

(U)=gU.

Thenext algorithmcomputesvalidWelchsets forevery statesStofillupthematrixMϕ representingtheevolution ruleofareversiblecellularautomaton.ThealgorithmappliesthepropertiesofWelchsetsasvectorandmatrixoperations in orderto facilitatetheir computational implementation.The vectorsandmatricesused inthe algorithm aredefined as follows:

GL:|S|× |S|matrixrepresentingleftWelchvectorsasrowbinaryvectors.

GR:|S|× |S|matrixrepresentingrightWelchvectorsasrowbinaryvectors.

GD:|S|× |S|matrixwhereeverybinaryrowrepresentsthevalidstatesthatcanbeplacedatthesamerowinMϕ.

GI:|S|× |S|matrixwhereeverybinaryrowrepresentsthevalidstatesthatcanbeplacedatthecorrespondingcolumn inMϕ.

hD:1× |S|integervectorrepresentingthenumberofstatesusedineachrowofMϕ.

hI:1× |S|integervectorrepresentingthenumberofstatesusedineachcolumnofMϕ.

E: |S| × |S| matrix representing the sumof Kronecker products to validate that the Welch vectors calculated so far composeavalidevolutionrule.

LetusrepresenttheidentitymatrixasI,thezeromatrixas0,andtherowvectorofonesas1.ForabinarymatrixB,let usdefineitsnegationby¬BanditstransposebyBT.Withtheseelements,thealgorithmisdefinedasfollows:

1. Initializelimitl,limitr∈N(loopvariables).

2. Initialize s=1,GL=GR=I, GD=GII, hD=hI=1, andMϕ=E=0. This stepspecifies that atthe beginning each statesSbelongsto Ls andRs.Equally,theinitializationdetermines thatsbelongstoDs andIs andtherestofstates areavailabletofillupeachrowMϕ(s,)andeverycolumnMϕ(,s)respectively.

3. Setthresholdl=0and f lagl=1(controlvariables).

4. Calculateacandidateleft WelchsetLs takingstatesandoL− 1randomstatesfrom{

α

(hD <oL)∩

α

(GD(s,)> 0)}.Set GL(s,∗)=

β

(Ls).ValidateProperty3forcandidateLs:for1≤ i<s,ifanydotproductGR(i,)· GL(s,)̸=1then f lagl=0. 5. If f lagl=1,restrictthepossiblestatesforcandidateRs.ByRemark2,foreveryaLs,a̸=s,setGI(s,a)=0.For1≤ i

<s,takeeveryisuch that|

α

(GL(i,))∩

α

(GL(s,))|>0.Thenthestatesinthecorresponding

α

(GR(i,))cannotbepart ofRstoavoidthat thesameneighborhoodhasmultipleevolutions.Therefore,setGI(s,a)=0foreverya

α

(GR(i,)).

EnumeratethesetofpossiblestatesforthecandidaterightWelchsetRs:if

|{ α

(hI<oR)

α

(GI(s,∗)>0)

}|

<oR− 1then f lagl=0.

6. If f lagl=0,setthresholdl=thresholdl+1.Ifthresholdl <limitl thenset f lagl=1andreturntostep4,otherwisereturn tostep2.

7. Setthresholdr=0and f lagr=1(controlvariables).

8. Calculate a candidate right Welchset Rs takingstate sand oR− 1 random states from{

α

(hI < oR)∩

α

(GI(s, ) > 0)}.

SetGR(s,∗)=

β

(Rs).Validate Property3forcandidateRs: for1≤ i≤ s,ifanydot productGR(s,) · GL(i, ) ̸= 1then f lagr=0.

9. If f lagr=1,calculatetheKroneckerproductKs=GL(s,∗)T! GR(s,∗)andtakeK=Ks+E.IfK(i,j)>1for1≤ i≤ j≤ S then f lagr=0.Thismeansthatthereisaneighborhoodwithmultipleevolutions.

10. If f lagr=0setthresholdr=thresholdr+1.Ifthresholdr<limitrthenset f lagr=1andreturntostep8,otherwisegoto step4.

11. ValidWelchsetshavebeengeneratedforstates.UpdatehD(a)=hD(a)+1foreacha

{ α

(GL(s,∗))− s

}

,andanalogously hI(b)=hI(b)+1foreachb

{ α

(GR(s,∗))− s

}

.SetE=E+KsandMϕ(a,b)=s.Ifs<|S|thens=s+1andgotostep3.

OtherwisereturnmatricesGL,GRandMϕ.

TheassociatedpseudocodeispresentedinAlgorithm1.

In Algorithm1, loopparameters limitl andlimitr define the numberofiterationsto search valid Welchsets forevery states.IncasethatavalidRshasnotbeencalculatedafterlimitrattempts,anewLsiscalculatedtorestartthesearchofan appropriateRs.IfavalidLshasnotbeencalculatedafterlimitlattempts,avalidRshasnotbeencalculatedafterlimitllimitr

iterations.ThisimpliesthatthepreviouscalculatedWelchsetscouldnotbesoadequatetospecifyareversibleautomaton, especially forlarge valuesof limitl andlimitr. Therefore,the search restartsfroms=1.Notice that parameters limitl and limitrarenotdirectlyrelatedtothenumberofcellsintheconfigurationofthereversibleautomaton.

Theaimofthealgorithmproposedinthispaperisnottoenumeratereversibleautomatabutonlytogeneratearandom instancefora larger numberofstates.Infact, thealgorithm hasbeenableto calculaterandomWelchsets forreversible automataupto30states,withanycombinationofWelchindices.

(5)

Algorithm1 GeneratereversibleautomatabyrandomWelchsets.

Require:Numberofstates|S|,s=1,andloopparameterslimitl,limitr∈N; 1: whiles<=|S|do

2: ifs=1then ◃Initializedatastructures

3: GL=GR=I,GD=GII,hD=hI=1,andMϕ=E=0; 4: endif

5: thresholdl=0; ◃SetloopvariabletofindavalidLs

6: whilethresholdl<=limitldo

7: LsoL− 1randomstatesin{α(hD<oL)∩α(GD(s,∗)>0)}; ValidateRemark1

8: GL(s,∗)=β (Ls); f lagl=1; ◃ValidateProperty3forLs

9: ifGR(i,∗)· GL(s,∗)̸=1for1≤ i<sthen f lagl=0; 10: endif

11: if f lagl=1then

12: GI(s,a)=0foreveryaLs,a̸=s; ◃RestrictstatesforRstoholdRemark2 13: foralli∈{1...s− 1}suchthat|α(GL(i,∗))α(GL(s,∗))|>0do

14: GI(s,a)=0fora∈α(GR(i,∗)); ◃Toavoidneighborhoodswithmultipleevolutions

15: endfor

16: if|{α(hI<oR)α(GI(s,∗)>0)}|<oR− 1then f lagl=0

17: else ◃EnoughavailablestatesforRs

18: thresholdr=0; ◃SetloopvariabletofindavalidRs

19: whilethresholdr<=limitrdo

20: RsoR− 1randomstatesin{α(hI<oR)α(GI(s,∗)>0)}; ValidateCor.1

21: GR(s,∗)=β (Rs);f lagr=1; ◃ValidateProperty3forRs

22: ifGR(s,∗)· GL(i,∗)̸=1for1≤ i<=sthen f lagr=0;

23: endif

24: if f lagr=1then ◃Kroneckerproducttocheckneighborhoodsalreadytaken

25: Ks=GL(s,∗)T! GR(s,∗);K=Ks+E;

26: ifK(i,j)>1for1≤ i≤ j≤ Sthen f lagr=0;

27: else ◃ValidWelchsetshavebeengeneratedforstates

28: hD(a)=hD(a)+1fora∈{α(GL(s,∗))− s}; UpdatestatesusedinrowsofMϕ

29: hI(b)=hI(b)+1forb∈{α(GR(s,∗))− s}; UpdatestatesusedincolumnsofMϕ

30: E=E+Ks; ◃UpdatesumofKroneckerproducts

31: foralla∈{α(GL(s,∗))}andb∈{α(GR(s,∗))}do Updateevolutionrule

32: Mϕ(a,b)=s

33: endfor

34: ifs<|S|then Therearemorestatesremaining

35: s=s+1; ◃Advancetothenextstate

36: thresholdr=limitr+1;thresholdl=limitl+1; ◃Breakwhileloops

37: else returnGL,GRandMϕ; ◃Reversibleruleiscomplete

38: endif

39: endif

40: endif

41: if f lagr=0thenthresholdr=thresholdr+1; ◃IncorrectRs,searchagain

42: endif

43: endwhile

44: endif

45: endif

46: if f lagl=0thenthresholdl=thresholdl+1; ◃IncorrectLs,searchagain

47: ifthresholdl>limitlthens=1; ◃PreviousWelchsetsareinadequate,startagain

48: endif

49: endif

50: endwhile 51: endwhile

Thisalgorithmcanbeclassifiedasaconstrainedrandomlocalsearch[16],inthesamecategoryasrandomsearchheuris- ticsorevolutionaryalgorithms.Randomlocalsearchareappliedtoproblemswhosestructureisnotwell-understood,aswell astohardcombinatorialproblems,liketheenumerationofreversibleautomata.

Thisenumerationisstillan openproblem. Infact,asetofformulasorageneralalgorithmto enumerateall reversible automatawithr=1/2andanynumberofstateshavenotbeendefinedyet.Themaximumnumberofstatesreportedfor anyproceduresofaris12[3,18].

Propertiesofreversibleautomata areimplicitinthegenerationoftheWelchvectorsGL(s,)andGR(s,)inlines8and 21foreachsS.WehavethattheWelchsets

| α

(GL(s,∗))

|

=oL duetolines3and7,and

| α

(GR(s,∗))

|

=oR duetolines3 and20,holdingProperty2(Welchindices).Property1(Uniformmultiplicityofancestors)isfulfilledinlines31–33where

|S|ancestorsarespecifiedforeverys.Lines9and22validateProperty3foralltheproductsbetweenleft andrightWelch sets.Thus,theobtainedmatrixMϕ satisfiesProperties1,2and3andthereforegeneratesareversibleautomaton.

Oneimportantpointinthealgorithmisthesetofrestrictionsimplementedtovalidateandreducethesearch space.In particular,inthealgorithm,Remark1inline7,Remark2inline12,discardmultipleevolutionsforthesameneighborhood inline14,enoughavailablestatesforRsinline16andCorollary1inline20,areimplementedtorestricttherandomsearch ofWelchsets,makingpossiblethegenerationofreversibleautomatawithlargernumberofstates.Property3andKronecker productvalidatetheobtainedWelchsetsinlines9,22and26.

(6)

Start

Initialize s=1 and arrays

Initialize control variables for Ls

Calculate candidate Ls

Property 3

Restrict states for Rs

Enough states

Initialize control variables for Rs

Calculate candidate Rs

Property 3 Kronecker

s<|S|

s=s+1 Return

arrays Stop

Yes Loop limit No

No Yes

Yes No

Yes

Loop limit No

No Yes

Yes

Yes No

No

Valid Welch sets, update arrays

Fig. 3. Flow chart to generate random Welch sets.

The associatedflow chart is presentedinFig. 3.Severalexamples ofreversible automata generatedwiththe previous algorithm are displayedin Fig. 5 using limitl=limitr=100. The corresponding Welch indices are presented below each image.

5. Firstrepresentation:bipartitegraphwithWelchelements

ForsS andits left Welch set Ls,a left Welch element isa pair (a, s) such that aLs. Analogously, a rightWelch elementisapair(s,a)suchthataRs.

GiventhematricesGL,GRandMϕ,wecandefineabipartitegraphP=NL× NRwhereNListhesetofleftWelchelements andNRisthesetofrightWelchelementsforeverystateinS.

EveryleftWelchelement(a,b) ∈NL holdsthataLb fora,bS.Analogously, everyrightWelchelement (d, e) ∈NR holdsthateRdford,eS.Thereisadirectededgefrom(a,b)to(d,e)labeledby

ϕ

−1(bd).Similarly,thedirectededge from(d, e) to(a,b) islabeled by

ϕ

(ea). Fig.4presentstwo examplesofthe bipartitegraphs associatedwithareversible automatonof3states,oL=1andoR=3(leftside);andareversibleautomatonof4states,oL=2andoR=2.Edgesarecol- oredaccordingto

ϕ

−1fromNLtoNR,andusing

ϕ

fromNRtoNL.Sincethegraphicalrepresentationcanbeverycomplicated forlargervaluesofnumberofstatesandWelchindices,amatrixdefinitionwillbeusedforfurtheranalysis.

(7)

Fig. 4. Digraphs P related to reversible automata of 3 and 4 states respectively..

ForpL=(a,b)NL letusdefine

γ

(pL)=aand

δ

(pL)=b.Inthesameway,for pR=(d,e)NR letusdefine

γ

(pR)=e and

δ

(pR)=d.Thus,thedirectededge(pL,pR)islabeledby

µ

(pL,pR)=

ϕ

−1(

δ

(pL)

δ

(pR))andthedirectededge(pR,pL) is labeledby

η

(pR,pL)=

ϕ

(

γ

(pR)

γ

(pL)).

P can be representedby a matrix MP withrowindices NL andcolumnindices NR. Everyposition MP(pL, pR) has two entries,

µ

(pL,pR)and

η

(pR,pL).Withthis,thefollowingresultcanbeestablished.

Theorem1. ForeverysSandfixedstatesa,eS,thereisauniquepairofnodes(pL,pR)inPwith

γ

(pL)=aand

γ

(pR)=e suchthat

µ

(pL,pR)=s.

Proof.Every string in S3 is represented by a directed edge from a node in NL to other node in NR. By Property 2 and Remark1,for everyaS thereisa subset NL⊂ NL with

|

NL

|

=oL such that

γ

(pL)=a foreach pLNL.Analogously, for everyeSthereisasubsetNR⊂ NRwith

|

NR

|

=oRsuchthat

γ

(pR)=eforeachpRNR.ThusthereareoLoR=

|

S

|

directed

edgesinPtorepresentallthesequencesaseforfixedstatesa,eandeverysS.Sincethereareexactly|S|stringsase,there isauniquepair(pL,pR)withpLNLandpRNR suchthat

µ

(pL,pR)=s. !

DirectresultsfromTheorem1isthenextone.

Corollary2. ForeverysSandfixedstatesd,bS,thereisauniquepairofnodes(pR,pL)inPwith

δ

(pR)=d and

δ

(pL)=b suchthat

η

(pR,pL)=s.

Corollary3. ForeverysSandfixedstatese,aS,thereare|S| pairsofnodes(pR,pL)inPwith

γ

(pR)=e,

γ

(pL)=asuch that

η

(pR,pL)=s.

Proof.For every eSthere isa subset NR⊂ NR with

|

NR

|

=oR nodes suchthat

γ

(pR)=eforeach pRNR.Besides, for everyaSthereisasubsetNL⊂ NL with

|

NL

|

=oL suchthat

γ

(pL)=aforeach pLNL.ThusthereareoRoL=

|

S

|

directed

edgesinPtorepresenttheneighborhoodeasuchthat

η

(pR,pL)=s. !

Asan illustrative example,Table1 presentsa reversible cellularautomata with

|

S

|

=6, oL=3andoR=2withWelch setsgeneratedatrandomapplyingthealgorithmintheprevioussection.

Fig. 6 displayssome evolution examples of thisautomaton. The matrix MP associated with this rule is presented in Table2.

(8)

1 2 3 4 5 6

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

|S|=6, L=2, R=3 |S|=16, L=4, R=4

|S|=24, L=3, R=8 |S|=30, L=3, R=10

Fig. 5. Different reversible cellular automata with 6, 16, 24 and 30 cell-states generated by the algorithm. Every example is specified by a distinct combi- nation of Welch indices with 100 cells evolving in 120 steps. Cell-state colors are presented on the right side of every evolution.

Table 1

Random reversible cellular automata with 6 cell-states. Indexes of M ϕare implicitly defined, thus M ϕ( a, b ) indicates the evolution of the neighborhood ab .

Evolution rule M ϕ State s L s R s

4 1 4 1 6 6 1 1 2 6 2 4

3 1 5 1 3 5 2 3 4 5 2 4

3 2 5 2 3 5 3 2 3 5 1 5

4 2 4 2 6 6 4 1 4 6 1 3

3 2 5 2 3 5 5 2 3 5 3 6

4 1 4 1 6 6 6 1 4 6 5 6

(9)

1 2 3 4 5 6

Fig. 6. Evolution examples of the reversible automaton described in Table 1 for 100 cells in 100 time steps.

Table 2

Matrix M P for the evolution rule and Welch elements presented in Table 1 . For row and column indices p ∈ N L and q ∈ N R respectively, γ( p ) and γ( q ) are in bold. In the same way, every µ( p, q ) is in bold too.

N L / N R (1 ,2) (1 ,4) (2 ,2) (2 ,4) (3 ,1) (3 ,5) (4 ,1) (4 ,3) (5 ,3) (5 ,6) (6 ,5) (6 ,6) ( 1 ,1) ( 2 ,3) ( 2 ,4) ( 4 ,3) ( 4 ,4) ( 2 ,4) ( 2 ,3) ( 4 ,4) ( 4 ,3) ( 2 ,3) ( 2 ,4) ( 4 ,3) ( 4 ,4) ( 2 ,1) ( 2 ,1) ( 2 ,2) ( 4 ,1) ( 4 ,2) ( 2 ,1) ( 2 ,2) ( 4 ,1) ( 4 ,2) ( 2 ,2) ( 2 ,1) ( 4 ,2) ( 4 ,1) ( 6 ,1) ( 2 ,5) ( 2 ,6) ( 4 ,5) ( 4 ,6) ( 2 ,6) ( 2 ,5) ( 4 ,6) ( 4 ,5) ( 2 ,5) ( 2 ,6) ( 4 ,5) ( 4 ,6) ( 3 ,2) ( 2 ,5) ( 2 ,4) ( 4 ,5) ( 4 ,4) ( 2 ,4) ( 2 ,5) ( 4 ,4) ( 4 ,5) ( 2 ,5) ( 2 ,4) ( 4 ,5) ( 4 ,4) ( 4 ,2) ( 2 ,1) ( 2 ,2) ( 4 ,1) ( 4 ,2) ( 2 ,1) ( 2 ,2) ( 4 ,1) ( 4 ,2) ( 2 ,2) ( 2 ,1) ( 4 ,2) ( 4 ,1) ( 5 ,2) ( 2 ,3) ( 2 ,6) ( 4 ,3) ( 4 ,6) ( 2 ,6) ( 2 ,3) ( 4 ,6) ( 4 ,3) ( 2 ,3) ( 2 ,6) ( 4 ,3) ( 4 ,6) ( 2 ,3) ( 1 ,1) ( 1 ,2) ( 5 ,1) ( 5 ,2) ( 5 ,1) ( 5 ,2) ( 1 ,1) ( 1 ,2) ( 5 ,2) ( 5 ,1) ( 1 ,2) ( 1 ,1) ( 3 ,3) ( 1 ,5) ( 1 ,4) ( 5 ,5) ( 5 ,4) ( 5 ,4) ( 5 ,5) ( 1 ,4) ( 1 ,5) ( 5 ,5) ( 5 ,4) ( 1 ,5) ( 1 ,4) ( 5 ,3) ( 1 ,3) ( 1 ,6) ( 5 ,3) ( 5 ,5) ( 5 ,6) ( 5 ,3) ( 1 ,6) ( 1 ,3) ( 5 ,3) ( 5 ,6) ( 1 ,3) ( 1 ,6) ( 1 ,4) ( 1 ,3) ( 1 ,4) ( 3 ,3) ( 3 ,4) ( 3 ,4) ( 3 ,3) ( 1 ,4) ( 1 ,3) ( 3 ,3) ( 3 ,4) ( 1 ,3) ( 1 ,4) ( 4 ,4) ( 1 ,1) ( 1 ,2) ( 3 ,1) ( 3 ,2) ( 3 ,1) ( 3 ,2) ( 1 ,1) ( 1 ,2) ( 3 ,2) ( 3 ,1) ( 1 ,2) ( 1 ,1) ( 6 ,4) ( 1 ,5) ( 1 ,6) ( 3 ,5) ( 3 ,6) ( 3 ,6) ( 3 ,5) ( 1 ,6) ( 1 ,5) ( 3 ,5) ( 3 ,6) ( 1 ,5) ( 1 ,6) ( 2 ,5) ( 6 ,1) ( 6 ,2) ( 3 ,1) ( 3 ,2) ( 3 ,1) ( 3 ,2) ( 6 ,1) ( 6 ,2) ( 3 ,2) ( 3 ,1) ( 6 ,2) ( 6 ,1) ( 3 ,5) ( 6 ,5) ( 6 ,4) ( 3 ,5) ( 3 ,4) ( 3 ,4) ( 3 ,5) ( 6 ,4) ( 6 ,5) ( 3 ,5) ( 3 ,4) ( 6 ,5) ( 6 ,4) ( 5 ,5) ( 6 ,3) ( 6 ,6) ( 3 ,3) ( 3 ,6) ( 3 ,6) ( 3 ,3) ( 6 ,6) ( 6 ,3) ( 3 ,3) ( 3 ,6) ( 6 ,3) ( 6 ,6) ( 1 ,6) ( 6 ,3) ( 6 ,4) ( 5 ,3) ( 5 ,4) ( 5 ,4) ( 5 ,3) ( 6 ,4) ( 6 ,3) ( 5 ,3) ( 5 ,4) ( 6 ,3) ( 6 ,4) ( 4 ,6) ( 6 ,1) ( 6 ,2) ( 5 ,1) ( 5 ,2) ( 5 ,1) ( 5 ,2) ( 6 ,1) ( 6 ,2) ( 5 ,2) ( 5 ,1) ( 6 ,2) ( 6 ,1) ( 6 ,6) ( 6 ,5) ( 6 ,6) ( 5 ,5) ( 5 ,6) ( 5 ,6) ( 5 ,5) ( 6 ,6) ( 6 ,5) ( 5 ,5) ( 5 ,6) ( 6 ,5) ( 6 ,6)

Basedontheproof ofTheorem1,matrixMPcan beusedto obtaintheevolutionofa reversiblecellularautomatonin bothsenses.Foraninitialconfigurationcwith

|

c

|

=mand1≤ i≤ m,theforwardevolutionisobtainedfollowingthenext

steps:

1.Foreveryiwithmodulusmod(i,3)=1,takeeverystatec(i) andthesetofrowsNi⊆ NL suchthat

γ

(p)=c(i)foreach pNi.

2.Foreveryiwithmod(i,3)=0,takeeverystatec(i)andthesetofcolumnsNi⊆ NRsuchthat

γ

(q)=c(i)foreachqNi. 3.For every i with mod(i,3)=2 and from the previous row and column sets, take the unique pair holding that

µ

(pi−1,qi+1)=c(i)wherepi−1Ni−1 andqi+1Ni+1.Theevolutionofc(i− 1)c(i)c(i+1)isgivenby

δ

(pi−1)

δ

(qi+1). 4.Foreveryiwithmod(i,3)=0andjwithmod(i+1,3)=1,theevolutionofc(i)c(j)isobtainedtakingthedirectededge

η

(qi,pj).

Thebackwardsevolutioniscalculatedasfollows:

1.Foreveryiwithmod(i,3)=1,takeeverystatec(i)andthesetofcolumnsNi⊆ NR suchthat

δ

(q)=c(i)foreachqNi. 2.Foreveryiwithmod(i,3)=0,takeeverystatec(i)andthesetofcolumnsNi⊆ NLsuchthat

δ

(p)=c(i)foreach pNi. 3.Forevery i=mod(i,3)=2andfromtheprevious rowsandcolumns,takethe uniquepairwith

η

(qi− 1,pi+1)=c(i).

Theinverseevolutionofc(i− 1)c(i)c(i+1)isgivenby

γ

(qi−1)

γ

(pi+1).

4.Foreveryiwithmod(i,3)=0andjwithmod(i+1,3)=1,theinverseevolutionofc(i)c(j)isobtainedtakingthedirected edge

µ

(pi,qj).

Fig.7 describeshowthe previous algorithms are ableto calculatethe forwardandbackwardsevolution froma given randomconfiguration.

Inthisfigure,fortheforwarddirection,everysequencewS3ismappedintoa pairofnodes(p, q) suchthat

γ

(p)= w(1),

γ

(q)=w(3)and

µ

(p,q)=w(2)(boldfont).Thentheevolutionofwisgivenby

δ

(p)

δ

(q) (italicfont).Inthesecond partoftheprocess,themissingcell-statesareobtainedtakingeverydirectededge

η

(q,p)(italicfont)inordertocalculate thecompleteevolution.Thebackwardevolutioncanbeanalogouslydescribed.Noticethatthelast stateintheevolutionis repeatedtorepresentperiodicboundaryconditions.

(10)

6 1 3 2 4 5 5 3 4 6 2 2

6 1 3 2 4 5 5 3 4 6 2 2

4 4 1 6 5 2 1 1

6 5 5 4 6 2

4 4 2 1 6 5 2 1 1

2

3 2

3 6 5

5

5 4 4 2 1 6 3 5 2 6 1 1 5

Fig. 7. Forward and backward evolution obtained by means of the bipartite graph P . Table 3

Bijections from Welch elements of L s and R s into X and Y respectively.

L s Symbol L s Symbol L s Symbol R s Symbol R s Symbol ( 1 ,1) X 1 ( 2 ,3) X 7 ( 2 ,5) X 13 (1, 2 ) Y 1 (4, 1 ) Y 7

( 2 ,1) X 2 ( 3 ,3) X 8 ( 3 ,5) X 14 (1, 4 ) Y 2 (4, 3 ) Y 8

( 6 ,1) X 3 ( 5 ,3) X 9 ( 5 ,5) X 15 (2, 2 ) Y 3 (5, 3 ) Y 9

( 3 ,2) X 4 ( 1 ,4) X 10 ( 1 ,6) X 16 (2, 4 ) Y 4 (5, 6 ) Y 10

( 4 ,2) X 5 ( 4 ,4) X 11 ( 4 ,6) X 17 (3, 1 ) Y 5 (6, 5 ) Y 11

( 5 ,2) X 6 ( 6 ,4) X 12 ( 6 ,6) X 18 (3, 5 ) Y 6 (6, 6 ) Y 12

AlthoughthepreviousalgorithmsaremoretechnicalandcomplicatedthanusingthematrixMϕ toobtaintheevolution ofareversibleautomata,their relevanceistoshow thatinvertibleevolutionrules canberepresentedbyabipartite graph, whichopensafuturedirectionofresearch.

Withthe nodesof P we can obtaina reinterpretation ofKari’sproof about therepresentation ofthe dynamicsofre- versible cellularautomata by block permutationsandshifts [12].The original proof demonstrates thatthe evolution ofa reversiblecellularautomataisequivalenttomappingblocksof6rstatesintootherblockswiththesamelength,andfrom theseblocks,applyashiftof3rplacesandasecondmappingtootherblocksof6rstates.Thisdemonstrationiscompletely basedonthepropertiesofWelchindicesandonlytakesthecasewhenoL=1.

Supposethatwehaveareversibleautomatonwithr=1/2and

|

S

|

=4;ifoL=1then

|

NL

|

=4and

|

NR

|

=16.Thisimplies that we candefine a bijectionfromNL to SandfromNR toS2.Thus, a permutationfromblocks wS3 toblocksof the samelengthiseasilydefined.

However, ifoL ̸= 1a permutation cannot be defined. Forthe samecase assume that oL=oR=2, hence

|

NL

|

=8 and

|

NR

|

=8. In order to define a permutation, we should map blocks w into other blocks of the same size,such that they shouldhave8differentleftpartsand8distinctrightparts,whichisnotpossible.Thisfactdoesnotimplythattheoriginal resultiswrong,butitisrequiredtogeneralizetheideathattheevolutionofareversibleautomatonisequivalenttoperform twomappingsofblockswithashiftbetweenthem.

Inordertoobtainthisgeneralization, theelementsofNL andNR (orthenodesofP)canbe mappedintotwo different sets ofsymbolsXandYrespectively.Instead ofdefiningthat every blockwpermutesintoanotherblock of3states,itis onlynecessarythattheblockmapsintoablockxywherexXandyY.

Thus,itisnotmandatorythattheblockxyhasthesamelengththatw,thereforethesetsizes|X|and|Y|canbearbitrarily controlled to generalize the mappings ofblocks with a shiftbetween them forany combinationof oL andoR such that oLoR=

|

S

|

.

NoticethateverysequencewS3 mapsintoauniquepair(pL,pR)inP suchthat

µ

(pL,pR)=w(2).Thesamehappens intheinversedirection,there isauniquepair(pR,pL)inP suchthat

η

(pR,pL)=w(2).Thisimpliesthatevery leftWelch elementdefinedby

ϕ

isarightWelchelementdeterminedby

ϕ

−1.

Thus, we can define two sets ofsymbols X andYsuch that

|

X

|

=

|

NL

|

=

|

S

|

oL and

|

Y

|

=

|

NR

|

=

|

S

|

oR. Everyleft Welch set definedby

ϕ

canbe mappedbijectively intoan element ofX andconsequentlyeach rightWelchset canbe mapped bijectivelyintoanelementofY.

Then,everyconfigurationcanbepartitionedinblocksofthreecellsandeveryblockisrepresentedbyapairofsymbols xyforxXandyY.Analogously, everypairyxmapsintoaunique sequencewS3 applyingnowthebijectionfromY intoNRandfromXintoNL.

Forthe reversiblecellular automatoninTable 1,let usdefine aset ofbijectionsfrom Ls intoX andfromRs intoY in Table3.

Referencias

Documento similar

language produced by Rule 110, and besides this diagram can calculate Garden of Eden configurations [13] and surjective cellular automata [15].. In this way, the subset diagram has 2

The transitive closure of M ϕ gives the transitive behavior of a reversible one-dimensional cellular automaton of neighborhood size 2 for both invertible rules and Welch index L = 1

The embedding process of the image watermark in the audio signal is shown in Figure 1, where the game of life rules generate a list of indices, and the watermark image

• If a generation only contains a set of contiguous cells embraced by the left and the right markers and every cell that has not a marker has the symbol ◊, then the generation

Figure 15 shows an example using the blocks of this category to implement an Elementary Cellular Automata.. Figure 15: Elementary Cellular Automata implemented

When the HighLife rule is used with the initial conditions evolved for Life, the results are much less interesting (shorter life length; very few gliders and

• Therefore, the next state of each cell is a function of five binary variables (the state of the cell itself and its four neighbors). The number of different possible rules is

Following this work, this thesis shows that it is possible to solve non-trivial tasks with both theoretical and practical interest (for example, the design of a curve with a