0 views

Uploaded by Dennis La Cotera

Cellular Automata with Mathematica 11.3

- Presentation 1
- st305x2007sols
- Approximate Pattern Matching Using Fuzzy Logic
- Annotating Search Results From Web Databases
- SY Lecture015.Cellular Automata
- Pass
- 2353073 Pinned Base Plates 12
- 01487884
- transportation problem.docx
- VLSI Testing
- Solution Manual for Switching and Finite Automata Theory PDF
- Peter Linz an Introduction to Formal Languages and Automata Solution Manual
- Maurice Margenstern- Universal Cellular Automata in the Hyperbolic Spaces
- tmpDBB7.tmp
- Untitled
- Maths Studies topic 2
- Semester 2 Schedule
- 8.problem_solving_methods
- Solving Linear Rational Expectations Importante
- Bdc5101 Assignment 1 _ho Sijie

You are on page 1of 9

Cellular Automata

Cellular automata provide a convenient way to represent many kinds of systems in which the values of cells in an array are updated in discrete

steps according to a local rule.

This starts with the list given, then evolves rule 30 for four steps.

autómata celular

Out[1]= 0, 0, 0, 1, 0, 0, 0 , 0, 0, 1, 1, 1, 0, 0 , 0, 1, 1, 0, 0, 1, 0 , 1, 1, 0, 1, 1, 1, 1 , 0, 0, 0, 1, 0, 0, 0

This shows 100 steps of rule 30 evolution from random initial conditions.

representac autómata celular entero aleatorio

Out[2]=

a1 ,a2 , ,b values ai superimposed on a b background

a1 ,a2 , ,blist values ai superimposed on a background of repetitions

of blist

a11 ,a12 , , d1 , ,blist values aij at offsets di

If you give an explicit list of initial values, CellularAutomaton will take the elements in this list to correspond to all the cells in the system,

arranged cyclically.

The right neighbor of the cell at the end is the cell at the beginning.

autómata celular

Out[3]= 1, 0, 0, 0, 0 , 1, 1, 0, 0, 1

It is often convenient to set up initial conditions in which there is a small "seed" region, superimposed on a constant "background". By default,

CellularAutomaton automatically fills in enough background to cover the size of the pattern that can be produced in the number of steps of

evolution you specify.

Printed from the Complete Wolfram Language Documentation 2

This shows rule 30 evolving from an initial condition containing a single black cell.

representac autómata celular

Out[4]=

This shows rule 30 evolving from an initial condition consisting of a 1, 1 seed on a background of repeated 1, 0, 1, 1 blocks.

representac autómata celular

Out[5]=

Particularly in studying interactions between structures, you may sometimes want to specify initial conditions for cellular automata in which

certain blocks are placed at particular offsets.

In[6]:= ArrayPlot CellularAutomaton 30, 1 , 40 , 1 , 40 , 0 , 100

representac autómata celular

Out[6]=

n k 2, r 1, elementary rule

n,k,r general rule with k colors and range r

n, k,1 k-color nearest-neighbor totalistic rule

n, k,1 ,r k-color range r totalistic rule

n, k, wt1 ,wt2 , ,r rule in which neighbor i is assigned weight wti

n,kspec, off1 , off2 , , offs rule with neighbors at specified offsets

lhs1 rhs1 ,lhs2 rhs2 , explicit replacements for lists of neighbors

fun, ,rspec rule obtained by applying function fun to each neighbor

list

Printed from the Complete Wolfram Language Documentation 3

In the simplest cases, a cellular automaton allows k possible values or "colors" for each cell, and has rules that involve up to r neighbors on each

side. The digits of the "rule number" n then specify what the color of a new cell should be for each possible configuration of the neighborhood.

autómata celular

Out[7]= 1, 1, 0 , 1, 0, 0

In[8]:= Tuples 1, 0 , 3

tuplas

Out[8]= 1, 1, 1 , 1, 1, 0 , 1, 0, 1 , 1, 0, 0 , 0, 1, 1 , 0, 1, 0 , 0, 0, 1 , 0, 0, 0

This shows the new color of the center cell for each of the 8 neighborhoods.

apl autómata celular

Out[9]= 0, 0, 0, 1, 1, 1, 1, 0

For rule 30, this sequence corresponds to the base-2 digits of the number 30.

In[10]:= FromDigits ,2

de dígitos a número

Out[10]= 30

In[11]:= ArrayPlot CellularAutomaton 921 408, 3, 1 , 1 , 0 , 100

representac autómata celular

Out[11]=

For a general cellular automaton rule, each digit of the rule number specifies what color a different possible neighborhood of 2 r 1 cells should

yield. To find out which digit corresponds to which neighborhood, one effectively treats the cells in a neighborhood as digits in a number. For an

r 1 cellular automaton, the number is obtained from the list of elements neig in the neighborhood by neig. k ^ 2, k, 1 .

It is sometimes convenient to consider totalistic cellular automata, in which the new value of a cell depends only on the total of the values in its

neighborhood. One can specify totalistic cellular automata by rule numbers or "codes" in which each digit refers to neighborhoods with a given

total value, obtained for example from neig. 1, 1, 1 .

In general, CellularAutomaton allows one to specify rules using any sequence of weights. Another choice sometimes convenient is k, 1, k ,

which yields outer totalistic rules.

Printed from the Complete Wolfram Language Documentation 4

In[12]:= ArrayPlot CellularAutomaton 867, 3, 1 , 1 , 1 , 0 , 100

representac autómata celular

Out[12]=

Rules with range r involve all cells with offsets r through r. Sometimes it is convenient to think about rules that involve only cells with specific

offsets. You can do this by replacing a single r with a list of offsets.

Any k 2 cellular automaton rule can be thought of as corresponding to a Boolean function. In the simplest case, basic Boolean functions like

And or Nor take two arguments. These are conveniently specified in a cellular automaton rule as being at offsets 0 , 1 . Note that for

compatibility with handling higher-dimensional cellular automata, offsets must always be given in lists, even for one-dimensional cellular

automata.

This generates the truth table for 2-cell-neighborhood rule number 7, which turns out to be the Boolean function Nand.

apl autómata celular

Out[13]= 0, 1, 1, 1

Rule numbers provide a highly compact way to specify cellular automaton rules. But sometimes it is more convenient to specify rules by giving

an explicit function that should be applied to each possible neighborhood.

This runs an additive cellular automaton whose rule adds all values in each neighborhood modulo 4.

representac autómata celular op aplica suma

Out[14]=

representac autómata celular op total

Out[15]=

Printed from the Complete Wolfram Language Documentation 5

When you specify rules by functions, the values of cells need not be integers.

representac autómata celular operació aplica suma

Out[16]=

simplifica autómata celular op aplica suma números enteros

CellularAutomaton rnum,init, t evolve for t steps, keeping only the last step

CellularAutomaton rnum,init, spect keep only steps specified by spect

CellularAutomaton rnum,init evolve rule for one step, giving only the last step

This runs rule 30 for 5 steps, keeping only the last step.

autómata celular

Out[18]= 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1

autómata celular

Out[19]= 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0 , 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1

autómata celular

Out[20]= 0, 1, 1, 1, 0

The step specification spect works very much like taking elements from a list with Take . One difference, though, is that the initial condition for

the cellular automaton is considered to be step 0. Note that any step specification of the form must be enclosed in an additional list.

u steps 0 through u

u step u

u1 ,u2 steps u1 through u2

u1 ,u2 ,du steps u1 , u1 du,

Printed from the Complete Wolfram Language Documentation 6

This evolves for 100 steps, but keeps only every other step.

representac autómata celular

Out[21]=

CellularAutomaton rnum,init, spect ,spec x

Much as you can specify which steps to keep in a cellular automaton evolution, so also you can specify which cells to keep. If you give an initial

condition such as a1 , a2 , , blist , then rd is taken to have offset 0 for the purpose of specifying which cells to keep.

condition

Automatic all cells in the region that differs from the background

default

0 cell aligned with beginning of aspec

x cells at offsets up to x on the right

x cells at offsets up to x on the left

x cell at offset x to the right

x cell at offset x to the left

x1 ,x2 cells at offsets x1 through x2

x1 ,x2 ,dx cells x1 , x1 dx,

This keeps all steps, but drops cells at offsets more than 20 on the left.

representac autómata celular

Out[22]=

Printed from the Complete Wolfram Language Documentation 7

autómata celular

Out[23]= 1 , 1 , 0 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 1 , 1 , 0 , 0 , 1 , 0

If you give an initial condition such as a1 , a2 , , blist , then CellularAutomaton will always effectively do the cellular automaton as if there

were an infinite number of cells. By using a specx such as x1 , x2 you can tell CellularAutomaton to include only cells at specific offsets x1

through x2 in its output. CellularAutomaton by default includes cells out just far enough that their values never simply stay the same as in the

background blist.

In general, given a cellular automaton rule with range r, cells out to distance rt on each side could in principle be affected in the evolution of the

system. With spec x being All , all these cells are included; with the default setting of Automatic , cells whose values effectively stay the same as in

blist are trimmed off.

By default, only the parts that are not constant black are kept.

representac autómata celular

Out[24]=

Using All for specx includes all cells that could be affected by a cellular automaton with this range.

representac autómata celular todo

Out[25]=

CellularAutomaton generalizes quite directly to any number of dimensions. Above two dimensions, however, totalistic and other special types of

rules tend to be more useful, since the number of entries in the rule table for a general rule rapidly becomes astronomical.

Printed from the Complete Wolfram Language Documentation 8

neighborhood

n, k,1 , 1,1 two-dimensional 9-neighbor totalistic rule

n, k, 0,1,0 , 1,1,1 , 0,1,0 , 1,1

n, k, 0,k,0 , k,1,k , 0,k,0 , 1,1

This is the rule specification for the two-dimensional 9-neighbor totalistic cellular automaton with code 797.

autómata celular

Out[27]= 0, 0, 0 , 0, 1, 0 , 0, 0, 0 , 0, 0, 0 , 0, 0, 0 , 0, 0, 0

representac primero autómata celular

70

Out[28]=

representac apl primero

CellularAutomaton code797, 1 , 0 ,

autómata celular

70, 0 , All

todo

Out[29]=

Printed from the Complete Wolfram Language Documentation 9

Related Tutorials

- Presentation 1Uploaded byvisdhoni
- st305x2007solsUploaded byKenLim
- Approximate Pattern Matching Using Fuzzy LogicUploaded byMauliadi
- Annotating Search Results From Web DatabasesUploaded byanoop185r
- SY Lecture015.Cellular AutomataUploaded bydafer_dani
- PassUploaded bybojo1234
- 2353073 Pinned Base Plates 12Uploaded bypawkom
- 01487884Uploaded byapi-3705060
- transportation problem.docxUploaded byRishabh Tank
- VLSI TestingUploaded byVinod Khera
- Solution Manual for Switching and Finite Automata Theory PDFUploaded byKimberly Greene
- Peter Linz an Introduction to Formal Languages and Automata Solution ManualUploaded byKimberly Greene
- Maurice Margenstern- Universal Cellular Automata in the Hyperbolic SpacesUploaded byIrokk
- tmpDBB7.tmpUploaded byFrontiers
- UntitledUploaded byAnil Thakur
- Maths Studies topic 2Uploaded byZabbyy
- Semester 2 ScheduleUploaded by03067ok
- 8.problem_solving_methodsUploaded byPriyanka Chandane
- Solving Linear Rational Expectations ImportanteUploaded byFlávio Dias
- Bdc5101 Assignment 1 _ho SijieUploaded byKaizen188
- homewk2SolsUploaded bySongya Pan
- Mathematics.pdfUploaded byUcacue Quimica
- PGDORM Sem 2 2017-18.pdfUploaded byZiroh
- Yearly ShecaduleUploaded byVintz Hon
- hw1Uploaded byThan
- Monte Carlo SimulationUploaded bypremseoul
- EWEA RA2013 Dublin 2 1 Michael Brower AWS TruepowerUploaded byluis.koc
- 094094CUploaded bygurugeudayangi
- Distributed SystemsUploaded byPhú Lê
- MatLab - Data Search Optimization With AlgorithmsUploaded byJosh Chiu

- Which GPU(s) to Get for Deep Learning: My Experience and Advice for Using GPUs in Deep LearningUploaded byDennis La Cotera
- ECONOMIA EMPRESARIALUploaded byDennis La Cotera
- A Full Hardware Guide to Deep LearningUploaded byDennis La Cotera
- Pro Ducci OnUploaded byisabelkdm_24_1797900
- Summary of New Features in 12.0Uploaded byDennis La Cotera
- MacroUploaded byDennis La Cotera
- Mathematica 12. Insetting Objects in GraphicsUploaded byDennis La Cotera
- Run Neural Network Training on GpusUploaded byDennis La Cotera
- Numerical Optimization with MathematicaUploaded byDennis La Cotera
- AP Estadistica y Probabilidad 11Uploaded byFer Lepe
- Modelo Solow-Swan con MathematicaUploaded byDennis La Cotera
- probabilidad_teor_a_y_pr_ctica_1360062923562 (1).docUploaded byIlseSarahiMartinez
- Oferta y Demanda con MathematicaUploaded byDennis La Cotera
- Probabilidades de una varaible distribuida normalmente con Mathematica 11.3Uploaded byDennis La Cotera
- ESTADISTICA_DESCRIPTIVA2Uploaded byfredy41
- TENSORS IN MATHEMATICAUploaded byDennis La Cotera
- Complete List of Data Science ResourcesUploaded byDennis La Cotera

- Oscilloscope 0002Uploaded byDr Ravi Kumar A V
- CON10-1217.pdfUploaded byDma Chem Eng
- Or BreakoutUploaded byRushaank Shukla
- ResearchUploaded byAlexander Klein
- Lecture 3Uploaded byTom Holden
- Final Exam CEng 6209 TE Final Exam [2006]Uploaded byAshebir Asrat
- GB7 Drilled ShaftsUploaded byjimandgreen
- 14588L-011Uploaded bymckinneychurch
- Accurate Quantitative Analysis of Clay and Other Minerals by XRDUploaded bylfilip
- Benbasat, I., And Weber, R. 1996. “Rethinking ‘Diversity’ in Information Systems Research”.Uploaded byboxymydog
- Mediation and Multi-group Moderation.pptxUploaded byalylanuza
- Theory of Metal Cuttingmechanics of Metal CuttingUploaded byznovak77
- Adi Multimetre CalibrareUploaded bybioteky
- Www.beakbane.co.Uk Documents Beakbane Nylatrac Open Plastic CarriersUploaded byDavi Laureano
- AQA AS CHEMSITRY CHAPTER 3Uploaded bykhan.inayat2
- Offset AlgorithmUploaded bysanthosh_6584
- Communication Complexity Kushilevitz PDFUploaded byDawn
- Summasign Maintenance ManualUploaded byMo_DaviesUK
- A Research Project on the Economic Order Quantity of Retail OutletsUploaded byaavinash31
- 37982104.pdfUploaded byTaniaGhina
- A Comparative Analysis of Different Finishing and Polishing Devices on Nanofilled Microfilled and Hybrid Composite a Scanning Electron Microscopy and Profilometric StudyUploaded bymuchlis fauzi
- General Drawing Procedures for IsobarsUploaded byShazard Mohammed
- Over Clocking GuideUploaded byEdward Velasquez
- Understanding Shortwave Radio and Antennas by KV5RUploaded byfrankdog
- Math - AppelUploaded bykrastanov
- 1917 - Treatise Analytical DynamicsUploaded byJamesFarrugia
- DUNLOP RUBBER COVER GRADE QUALITIESUploaded byjonodo89
- 1Z0-883Uploaded byjavier
- datastrucure-150802122219-lva1-app6891.pptxUploaded byAnonymous igVRM2mA6k
- NetBackup761 Commands Ver2Uploaded byamirbahram