[New Question about Rule 122R] - A New Kind of Science: The NKS Forum

A New Kind of Science: The NKS Forum

Pages:1



New Question about Rule 122R

(Click here to view the original thread with full colors/images)



Posted by: Erik21

At page 442 , there is an image about irreversibility and the second law of themodynamics and at down of image, he say :
"The specific cellular automaton used here is rule 122R"

Which is the rule 122R? What different with the rule 122?



Posted by: Jason Cawley

The enumeration for these is explained in the note on page 1017 that is titled "Second-order cellular automata". The integer digits of the rule number in base 2 specify the actual rule, according to the scheme explained on page 437.

Notice that the new requirement that the cell color be reversed if the cell immediately above was black 2 steps back, means these rule numbers do not directly correspond to the numbers for the ECAs. Also notice that these rules require two steps as an "initial" condition, since the evolution is not fully specified by only one preceding step. The "2" in the function names refers to this dependence on more than one previous step.

Attached is a Mathematica notebook for exploring these rules. The functions are the same as those given in the back of the book, in the note mentioned above. I've added a few helper functions to speedily display their evolution from random initial conditions, and an example that generates multiple pictures at once, including all the rule numbers shown in the book on pages 438 to 443. I hope it helps.



Posted by: Erik21

When i read the file reversibleca2s.nb with Notebook, give this error:" You used animate selected graphics without having a selected graphics cell visible. Animations are always shown in one of the slected cells" And i dont' see nothing.



Posted by: Jason Cawley

The file is a Mathematica 5.1 notebook, meant to be opened with that program. There are no graphics in it as it stands - all cells are unevaluated. I've downloaded it myself and it works fine. There are two cells within it that produce graphics when evaluated, which require previous cells in the order they occur in the notebook. The last of these, only, produces multiple graphics.

The only context I can see for an "animate graphics" question arising at all, is if you evaluate the whole notebook, collapse the last cell to a single picture instead of a series of them, and then double click within the final picture. Which would animate the last graphic, cycling through the various rules. But this would be a purely optional way of viewing it, and nothing in the code requires it.

The full code is -

CA2Step[rule_List, {a_, b_}] := {b, Mod[a + rule[[8 - (RotateLeft[b] + 2(b + 2 RotateRight[b]))]], 2]}

CA2EvolveList[rule_List, {a_List, b_List}, t_Integer] := Map[First, NestList[CA2Step[rule, #] &, {a, b}, t]]

rule122R = IntegerDigits[122, 2, 8]

{0, 1, 1, 1, 1, 0, 1, 0}

firstinitial = Table[Random[Integer], {50}];

secondinitial = Table[1, {50}];

data = CA2EvolveList[rule122R, {firstinitial, secondinitial}, 100];

ArrayPlot[data]

plotCA2[rulenumber_] := ArrayPlot[CA2EvolveList[
  IntegerDigits[rulenumber, 2, 8], {Table[Random[
      Integer], {50}], Table[Random[Integer], {50}]}, 100]]

Map[plotCA2, {13, 30, 37, 67, 73, 90, 122, 142, 150, 154, 173, 190, 197, 214}]






Forum Sponsored by Wolfram Research

© 2004-2008 Wolfram Research, Inc. | Powered by vBulletin 2.3.0 © 2000-2002 Jelsoft Enterprises, Ltd. | Disclaimer
vB Easy Archive Final - Created by Xenon and modified/released by SkuZZy from the Job Openings