Cellular Automata/Mathematical Model

From testwiki
Revision as of 05:53, 20 September 2006 by imported>Eric119 (one of a finite set of integers)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Formally, a cellular automaton is represented by the 4-tuple {Z,S,N,f} where:

  • Z is the finite or infinite lattice
  • S is a finite set of cell states or values
  • I is the finite neighborhood
  • f is the local transition function defined by the transition table or the rule

The lattice is a finite or infinite discrete regular grid of finite number of dimensions, filled with cells. Each cell is defined by it's discrete position (an integer number) and by it's discrete value (one of a finite set of integers). Time is also discrete. The future state of a cell (time t+1) is a function of the present state (time t1) of a finite number of cells called the neighborhood.

One dimensional first order cellular automata

For the sake of readability the next definitions focus on one dimensional first order cellular automata.

Lattice, cell and configuration

The infinite global state is a configuration CSZ. S is the finite set |S|< of cell states cS, for formalization purposes the states are enumerated S={0,1,,|S|1}. Z is the lattice, the infinite cyclic group of integers {...,1,0,1,2,...}. The position of each cell inside the lattice is described by the position index xZ. Configurations are usually written as strings.

C=c1c0c1c2cx1cxcx+1

The finite global state is a finite configuration CSZ, where Z is a finite lattice, a finite set {0,1,2,,N1} of N integers.

C=c0c1cx1cxcx+1cN2cN1

Configurations and their parts can be generally written as strings denominated by small greek letters from the beginning of the alphabet. Strings can be compactly written as numbers. Forward Converter

Neighborhood, local transition function and rule

The neighborhood size and position

The cells in the neighborhood nx of the cell cx have indexes x+Ii, where IiI are values from the set of neighbors I={rL,rL+1,...,1,0,1,...,rR1,rR}. rL and rR are neighborhood sizes to the left and to the right since usually the neighborhood is symmetric a single radius r can be used. The size of the neighborhood is |I|=m=rL+1+rR=2r+1.

nx=cxrLcxrL+1cx+rR

A compact representation of the neighborhood value nx is a single integer defined as a number of k digits base |S|.

nx =i=0k1cx+Ni|S|k1i=i=0k1cxk0+i|S|k1i
=cxk0|S|k1+cxk0+1|S|k2++cxk0+k1|S|0
The neighborhood cell indexing and the local transition function

The local transition function

f:SNS

calculates the value of a single future cell cx from the neighborhood of the observed cell in the present.

cxt+1=f(cxrLt,cxrL+1t,,cx+rRt)

The transition table defines the local transition function by listing the output value for each input value.

 n  -> f(n)
-----------
000 -> 0
001 -> 0
........
111 -> 0

The rule f is a compact representation of the local transition function. It is a single integer defined as a number of k digits base |S|.

f=j=1|S|k1f(j)|S|j=f(|S|k1)|S||S|k1++f(1)|S|1+f(0)|S|0
See also

Template:Example

Global transition function

The global dynamics of CA are described by the global transition function

F:SZSZ

F translates the current (present) configuration Ct into the next (future) configuration Ct+1

Ct+1=F(Ct)

The global transition function F is defined by the local transition function f as

F(cx1cxcx+1)=f(cx1rL,cxrL,,cx1+rR)f(cxrL,cxrL+1,,cx+rR)f(cx+1rL,cx+2rL,,cx+1+rR)

Finite lattices and lattice boundaries

The lattice boundary sizes (left and right)

Infinite cellular automata have no boundary, so it's boundary description B is omitted. But there is no way to simulate an infinite system using a finite system. The simulation must focus on a finite part of length l.

The neighborhood used in the local transition function oversteps the lattice boundary for rL cells at the left and rR cells at the right.

There are two common solutions to the overstepping problem:

  1. the lattice is wrapped into a circle (torus for 2D CA)
  2. the values of the overstepping parts of the neighborhood are defined explicitly as the boundary B

Cyclic boundaries

Cyclic boundaries are frequently used as there is no need to explicitly define the boundary value and no external information is introduced into the CA that could otherwise cause interference at the boundaries.

The state of a finite lattice cellular automata is a configuration in the lattice SZ, where Z is a cyclic group of integers modulo N ({0,1,...,N1}).

C=c0c1cx1cicx+1cN1cS

The cyclic position index is calculated as

x=xmodNx0x>N

Explicitly defined boundaries

The lattice boundary (left and right)

Explicitly defined boundaries are less common as the simple constant values are useful only for CA where we observe events on a quiescent background with period 1. The boundary can be defined as a single set (the left and the right part combined) of cell values of length k1 (there is no boundary cell with index 0)

B={bk0,b2,b1,bl,bN+1,,bkk01}bS

For space and time periodic quiescent backgrounds time dependent boundaries can be used B=B(t).

Generalizations

Multidimensional cellular automata

Neighborhood in a 2D lattice

The definition of n-dimensional CA is similar to that of one dimensional CA, the lattice becomes n-dimensional and k and k0 become vectors of length n.

2D cellular automata

The 2D lattice can be tiled with cells in different ways:

2D cellular automata are often used to simulate real dynamic systems (fluid and gas dynamics)

See also

Higher order cellular automata

The CA is of higher order if not only the present but past configurations too are used to calculate the future. A second order local transition function is defined as

cxt+1=f(nxt,nxt1)

Second order local transition functions are often used to construct reversible rules.