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
aa 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.
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+1→S. 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,forastringv∈Smwithm≥ 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.LetusdefineanewsetofstatesS′suchthat
|
S′|
=|
S|
2r;thus,wecandefineabijectionfromS′toS2r.Withthis,therearebijectionsv→s1s2andw→s3 forsi∈S′suchthat:
ϕ
′(
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′+1→S such that ct(i)=ϕ
−1(ct+1(i)).Thisimpliesthatϕ
−1(ϕ
(ct(i)))=ct(i).Areversiblecellularautomatoncanbesimulatedbyanotherwithr=1/2forbothinvertiblerules,takingr⋆=max(r,r′) andusinganextendedsetofstatesS⋆with
|
S⋆|
=|
S|
2r⋆.Therefore,wehavetostudyonlyreversiblecellularautomatawithneighborhoodsize2inbothinvertiblerulesinordertounderstandtheothercases.
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.Foreverystringw∈SnthereisasetofstringsA⊂ Sn+1suchthat
|
A|
=|
S|
andeachv∈A holdsthatϕ
(v
)=w.Eachvisanancestorofw.2.Welchindices.ThereexistoL,oR∈Nsuchthatforeverystates∈StherearesetsLs,Rs⊂ Swith
|
Ls|
=oL and|
Rs|
=oR such thatϕ
(ab)=sforeacha∈Lsandeveryb∈Rs,andtheproductoLoR=|
S|
.TheseoL,oRarecalledWelchindices.3.Uniqueintersection.Everypairofstatesa,b∈Sholdsthat
|
Ra∩Lb|
=|
Rb∩La|
=1.Properties2and3definethattheancestorstringsofanysequenceof2ormorestatesshareacommoncentralpartand theirdifferencesareattheends.Thesepropertiesassuretheexistenceofaninverseevolutionruleabletoreverttheglobal dynamicsoftheautomaton.
ThesetsLsandRsare theWelchsets associatedwithstate s∈S.Noticethat indicesoL andoR areindependentofthe statedefiningLsandRs.Thatis,
|
Ls|
=oL and|
Rs|
=oRforalls∈S.Since
ϕ
andϕ
−1 aredefinedwithaneighborhoodsize 2,they canberepresentedbymatricesMϕ andMϕ−1 such that entriesMϕ(a,b)=ϕ
(ab)andMϕ−1(a,b)=ϕ
−1(ab)foreverypairofstatesa,b∈S.3. PropertiesofWelchsets
The previous propertiesgive a particularstructure for Mϕ andMϕ−1. Property1 guarantees that there are |S| entries equaltosinbothmatricesforeverys∈S.Property2establishesthatifM(s1,s2)=M(s3,s4)thenM(s1,s4)=M(s3,s2)for si∈S.Finally,Property3specifiesthatforeverystates∈Sthereisauniquestatea∈SsuchthatMϕ(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)=sforeverys∈Sbecausealltheothercasescanberepresentedbythisone.Since|
Ls|
=oL and|
Rs|
=oR,statesappearsinoL rowsofMϕ,atthesameoR columns.Fora∈S,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 foreacha∈S.Proof.SinceMϕ(a,∗)has|S|columnsandeverystatesholdsthat
|
Rs|
=oR,thenthereare|
S|
/oR=oL statesinMϕ(a,∗). ! AstraightforwardresultfromRemark1isthefollowingone.Corollary1.
|
Iϕ(a)|
=oR foreacha∈S.ArelevantpropertyofDϕ(a)andIϕ(a)isthenextone.
Remark2. Dϕ(a)∩Iϕ(a)=aforeverya∈S.
Proof.SinceMϕ(a,a)=awehavethata∈Dϕ(a)anda∈Iϕ(a).Ifthereisanotherstateb̸=asuchthatb∈Dϕ(a)andb∈ Iϕ(a),thena∈Lbanda∈Rb.Thisimpliesthat
ϕ
(aa)=b andthereforeMϕ(a,a)=b,whichisacontradiction. !Remark2saysthatDϕ(a)andIϕ(a)agreeonlyinthediagonal state.Foreachs∈S,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.
Proof. Forevery state s∈ S, we havethat a∈L−1i andb∈R−1i iff
ϕ
−1(ab)=s. Thisimpliesthat a ∈Iϕ(s) andb ∈Dϕ(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 a∈ U;otherwise,gU(a)=0.Withthis,wedefinetwomappings
α
(gU)=U andβ
(U)=gU.Thenext algorithmcomputesvalidWelchsets forevery states∈StofillupthematrixMϕ 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=GI=¬I, hD=hI=1, andMϕ=E=0. This stepspecifies that atthe beginning each states∈Sbelongsto 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,foreverya∈Ls,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,avalidRshasnotbeencalculatedafterlimitl∗limitr
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.
Algorithm1 GeneratereversibleautomatabyrandomWelchsets.
Require:Numberofstates|S|,s=1,andloopparameterslimitl,limitr∈N; 1: whiles<=|S|do
2: ifs=1then ◃Initializedatastructures
3: GL=GR=I,GD=GI=¬I,hD=hI=1,andMϕ=E=0; 4: endif
5: thresholdl=0; ◃SetloopvariabletofindavalidLs
6: whilethresholdl<=limitldo
7: Ls←oL− 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)=0foreverya∈Ls,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: Rs←oR− 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 21foreachs∈S.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.
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
Fors ∈S andits left Welch set Ls,a left Welch element isa pair (a, s) such that a ∈Ls. Analogously, a rightWelch elementisapair(s,a)suchthata∈Rs.
GiventhematricesGL,GRandMϕ,wecandefineabipartitegraphP=NL× NRwhereNListhesetofleftWelchelements andNRisthesetofrightWelchelementsforeverystateinS.
EveryleftWelchelement(a,b) ∈NL holdsthata ∈Lb fora,b ∈S.Analogously, everyrightWelchelement (d, e) ∈NR holdsthate∈Rdford,e∈S.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.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. Foreverys∈Sandfixedstatesa,e∈S,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 everya ∈S thereisa subset NL′⊂ NL with
|
NL′|
=oL such thatγ
(pL)=a foreach pL∈N′L.Analogously, for everye∈SthereisasubsetNR′⊂ NRwith|
N′R|
=oRsuchthatγ
(pR)=eforeachpR∈NR′.ThusthereareoLoR=|
S|
directededgesinPtorepresentallthesequencesaseforfixedstatesa,eandeverys∈S.Sincethereareexactly|S|stringsase,there isauniquepair(pL,pR)withpL∈NL′andpR∈NR′ suchthat
µ
(pL,pR)=s. !DirectresultsfromTheorem1isthenextone.
Corollary2. Foreverys∈Sandfixedstatesd,b∈S,thereisauniquepairofnodes(pR,pL)inPwith
δ
(pR)=d andδ
(pL)=b suchthatη
(pR,pL)=s.Corollary3. Foreverys∈Sandfixedstatese,a∈S,thereare|S| pairsofnodes(pR,pL)inPwith
γ
(pR)=e,γ
(pL)=asuch thatη
(pR,pL)=s.Proof.For every e∈Sthere isa subset NR′⊂ NR with
|
NR′|
=oR nodes suchthatγ
(pR)=eforeach pR∈N′R.Besides, for everya∈SthereisasubsetNL′⊂ NL with|
NL′|
=oL suchthatγ
(pL)=aforeach pL∈NL′.ThusthereareoRoL=|
S|
directededgesinPtorepresenttheneighborhoodeasuchthat
η
(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.
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
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,theforwardevolutionisobtainedfollowingthenextsteps:
1.Foreveryiwithmodulusmod(i,3)=1,takeeverystatec(i) andthesetofrowsN′i⊆ NL suchthat
γ
(p)=c(i)foreach p∈Ni′.2.Foreveryiwithmod(i,3)=0,takeeverystatec(i)andthesetofcolumnsNi′⊆ NRsuchthat
γ
(q)=c(i)foreachq∈Ni′. 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−1∈N′i−1 andqi+1∈Ni′+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)foreachq∈Ni′. 2.Foreveryiwithmod(i,3)=0,takeeverystatec(i)andthesetofcolumnsN′i⊆ NLsuchthatδ
(p)=c(i)foreach p∈Ni′. 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,everysequencew∈S3ismappedintoa 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.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 w∈S3 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 onlynecessarythattheblockmapsintoablockxywherex∈Xandy∈Y.
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|
.Noticethateverysequencew∈S3 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 xyforx∈Xandy∈Y.Analogously, everypairyxmapsintoaunique sequencew∈S3 applyingnowthebijectionfromY intoNRandfromXintoNL.
Forthe reversiblecellular automatoninTable 1,let usdefine aset ofbijectionsfrom Ls intoX andfromRs intoY in Table3.