Wolfram code

Thus, the Wolfram code for a particular rule is a number in the range from 0 to SS2n + 1 − 1, converted from S-ary to decimal notation.

It may be calculated as follows: The Wolfram code does not specify the size (nor shape) of the neighbourhood, nor the number of states — these are assumed to be known from context.

A code of this type suffixed by an R, such as "Rule 37R", indicates a second-order cellular automaton with the same neighborhood structure.

By convention, each such isomorphism class is represented by the rule with the lowest code number in it.

The number of possible rules, R, for a generalized cellular automaton in which each cell may assume one of S states as determined by a neighborhood size of n, in a D-dimensional space is given by: R=SS(2n+1)D The most common example has S = 2, n = 1 and D = 1, giving R = 256.