study of the cellular automaton function and the rewriting system demo