Cellular Automata/Mathematical Model

From testwiki
Revision as of 00:42, 14 July 2020 by 124.169.211.244 (talk) (correct spelling)
(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
  • N 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 cells on a finite number of dimensions. Each cell is defined by its discrete position (an integer number for each dimension) and by its 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 surrounding the observed cell 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 k=|S|< of cell states cS, for formalization purposes the states are enumerated S={0,1,,k1}. The lattice Z is 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

Finite configurations and their parts can be generally written as strings denominated by small Greek letters from the beginning of the alphabet (α, β, ...).

The number notation for strings

Strings can be compactly written as numbers. A string of N characters C from a set of |S| symbols is translated into a N-digit base |S| number. Usually strings are indexed from the left to the right but for the number notation indexing from right to left is more intuitive.

α=i=0N1kN1ici=kN1c0++k1cN2+k0cN1

Neighborhood, local transition function and rule

The neighborhood size and position

Neighborhood

The neighborhood A of size m=|A| is defined by the set of relative positions inside the configuration.

A={a0,a1,,am1}

By applying the set A onto an observed cell cx the neighborhood of this cell is obtained.

nx=cx+a0cxa1cx+am1

The name neighborhood can be used for booth the set of relative distances and for the actual substring of cells related to an observed cell.

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

nx=i=0m1km1icx+ai=cx+a0km1+cx+a1km2++cx+am1k0
The neighborhood cell indexing and the local transition function

For definitions of common neighborhoods see Neighborhoods.

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(nxt)

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 m digits base k.

f=i=1km1f(i)ki=f(km1)kkm1++f(1)k1+f(0)k0
See also

Template:AnchorTemplate:TextBox

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(nx1)f(nx)f(nx+1)

Finite lattices and lattice boundaries

The lattice boundary sizes (left and right)

Infinite cellular automata have no boundary, so its 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

Cellular automata on groups

One further generalization of the concept of a CA extends the n-dimensional construct. Given a finitely generated group, G, and a alphabet, A, we may define the configuration space to be C=AG. That is, each configuration is a map from G into A. If G is abelian, then the group is isomorphic to some quotient space of Zn and may be regarded as a n-dimensional lattice with possibly periodic boundary conditions. This space admits a group action, where cg(h)=c(gh) where g is the inverse of g. Any finitely generated group is a metric space, in which the distance between any two elements, d(g,h) can be defined to be the minimum length of the set of paths connecting g and h on the groups Cayley graph. We define a metric on the configuration space, d(c,c) to be 0 if the two configurations are identical, and the infimum of 1/(1+d(e,h)) over the set of h such that c and c disagree at h and where e denotes the identity element of the group. We define a cellular automata to be a continuous mapping, f:CC, that commutes with the group action and an initial configuration c0. The evolution of the system is defined by cn+1=f(cn).

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.

Template:BookCat