A New Kind of Science: The NKS Forum (http://forum.wolframscience.com/index.php)
- Pure NKS (http://forum.wolframscience.com/forumdisplay.php?forumid=3)

Posted by M.Abdeldjalil on 03-03-2009 05:10 PM:

Van Neumann's Neighbors

For 2-d CA, and with von Neumann neighbors (5 cells), how we can count the cells(right, left, top, bottom), which is it right in this picture:

Posted by Jason Cawley on 03-03-2009 06:51 PM:

The order of the cells can be distinguished from their weight in a numbering scheme. They are related thus - the first is the highest digit, the second is the next highest, and so on, just as in the number 52481 the first digit is 5, the second is 2, the third is 4, the fourth is 8, and the fifth is 1. In that sense, this is the traditional standard way the cells are ordered -

0-1-0
2-3-4
0-5-0

Where a 0 is a placeholder only, that cell not being considered part of the neighborhood, or equivalently, having "weight zero" in any rule number.

For a 2 colors CA, the weight of the cell in location 1 is 2^(5-1) = 16 - because it is the leading binary digit of a 5 digit binary number. Similarly the weights of positions 2, 3, 4, and 5 as labeled, are 8, 4, 2, and 1 respectively. Those weights times the value of the cell (either 0 or 1), added together, gives you a specific number between 0 and 31, that will be distinct from each possible configuration of the neighborhood.

For a full rule, you then require a mapping that takes each of those 32 possibilities to an outcome, 0 or 1, for the center cell on the next time step. This may be considered a 32 digit binary number. Its decimal equivalent (FromDigits) is the rule number, for that 2D, 5 neighbor, general CA.

I hope this helps.