Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This starts with the list given, then evolves rule 30 for four steps.

In[1]:= CellularAutomaton[30, {0, 0, 0, 1, 0, 0, 0}, 4]

Out[1]= {{0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 1, 1, 0, 0, 1, 
  0}, {1, 1, 0, 1, 1, 1, 1}, {0, 0, 0, 1, 0, 0, 0}}
share|improve this question

closed as off-topic by Michael E2, bobthechemist, m_goldberg, ciao, Yves Klett Mar 12 '14 at 10:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Michael E2, bobthechemist, m_goldberg, ciao, Yves Klett
If this question can be reworded to fit the rules in the help center, please edit the question.

Here's one way to specify your CA: – bill s Mar 11 '14 at 21:38
Please do not change the question or ask different questions after you have gotten answers. Open a new question instead. – R. M. Mar 11 '14 at 22:55
I really think this is all explained in the documentation. Cellular automata are not particularly easy to understand, since the rule number is an encoded (i.e. obfuscated) form of the automaton. I always find it takes a bit of concentration and work to figure out how to specify the automaton I want, but the docs have always given me the principles I need to work it out. – Michael E2 Mar 11 '14 at 23:10

The "rule" for CAs defines the mapping that is used to calculate successive generations. When you have 3-neighborhoods (one to each side of the current element) there are 8 patterns that can occur: 111, 110, 101, 100, 011, 010, 001, 000. Each of these patterns must be mapped to some binary value. For example the rule that takes 111->0, 110->0, 101->0, 100->1, 011->1, 010->1, 001->1, 000->0 is called rule 30, since the sequence of numbers 00011110, interpreted in base 2, is 30. Accordingly, there are 256 possible 3-neighbor CAs, and this number increases rapidly as the neighborhood increases in size.

share|improve this answer

Here is a visualization of what bill s told:

    {Style[2^#, Medium],
        {#, {0, CellularAutomaton[30, #, {{1}, {1}}][[1, 1]], 0}},
        Mesh -> All] &@IntegerDigits[#, 2, 3]}
    ] & /@ Range[0, 7]]

enter image description here

First row of cells represents eight 3-bit binary values from 0 to 7. The middle cell on the second row displays the result of rule 30 generated by three cells above it. If you sum up numbers above these visualizations for every black cell, you end up with 30, and this holds also for other automaton rules numbered this way.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.