I have rather no programming skills, neither with Matlab nor with other languages. I need a little "program" that shows me the evolution of a dynamical system when giving it some initial values. The system is at follows:
Consider $X=\left\{0,1,2\right\}^{\mathbb{Z}}$ and $T\colon X\to X$ is working as follows:
- 1 becomes 2,
- 2 becomes 0,
- 0 becomes 1 if at least one of its two neighbors is 1, else it remains 0.
Now I would like to start with some values - let's say 50 - i.e. with a configuration of the form $$ 01201020012000021020001201020001200102 $$ or something like this and then in the lines below I would like to have the evolution step by step, maybe 100 steps.
Is it possible to program something like this and then to get the result in a picture I could add to a LaTeX-Document?
Maybe Matlab or R are appropriate programs for that. But as I already said I have so less skills.
Could you please help me? I do not really have to understand how it works as long as it works. :-)
This is some quick code in python 2.7 (https://www.python.org/) which might help as a starter. Try putting it in a file my_script.py and run it with python. Hopefully if you look at it you can guess what some of it does. Roughly, for each line it goes through each number in turn and checks which case it belongs to and adds that the result.
I got the following result printed out as an example which you could copy into your document:
Edit: Some quick code to do Evgeny's suggestion without changing too much, it could be made neater. You may need to install some additional packages. Add the following to the bottom of the .py file It has red green and blue corresponding to one colour each and produces a .png you could use.