Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

A (one dimensional) cellular automaton is a function1 F : Σ → Σ with the property that there is a K > 0 such that F (x)i depends only on the 2K + 1 coordinates xi−K , xi−K+1, . . . , xi−1, xi, xi+1, . . . , xi+K . A periodic point of σ is any x such that σ^p (x) = x for some p ∈ N, and a periodic point of F is any x such that F^q (x) = x for some q ∈ N. Given a cellular automaton F, a point x ∈ Σ is jointly periodic if there are p, q ∈ N such that σ^p (x) = F^q (x) = x, that is, it is a periodic point under both functions.

This project aims to explore the nature of one-dimensional Cellular Automata, in the hope of finding the structure of cellular automata through its periodic points.

2034 views
License: MIT
ubuntu2004
1
/*
2
* Copyright (C) 2004 Bryant Lee
3
*
4
* This file is part of FPeriod.
5
*
6
* FPeriod is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* FPeriod is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with FPeriod; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
/**
22
* Represents a composition of poly functions
23
*
24
* Written by: Bryant Lee
25
* Date: 11/22/04
26
**/
27
28
#ifndef COMP_H
29
#define COMP_H
30
31
#include "Func.h"
32
33
#include <map>
34
#include <vector>
35
#include <string>
36
37
#include <fstream> //used in printDefinitions()
38
39
class Comp {
40
private:
41
int shiftSize; //#symbols in shift
42
map<string, Func *> funcStore; //available functions for composition
43
vector<Func *> composition; //the functions in the order to apply them
44
vector<string> compNames; //the composition as a list of names
45
46
//delete Func objects whose ptrs are in the funcStore map
47
void clearFuncStore();
48
49
public:
50
//constructor
51
Comp(int iShiftSize);
52
53
//destructor
54
~Comp();
55
56
//returnName
57
string returnName();
58
59
//printDefinitions
60
void printDefinitions(ofstream & fout);
61
62
//print
63
void print();
64
65
//set the composition
66
bool setComposition(const string & inStr);
67
68
//add a function available for composing
69
void addFunc(const string & inStr, string name, bool opt);
70
71
//return image of word x
72
void image(byte *word, int wordLength, byte *output);
73
74
//return image of word x
75
void image(unsigned int *word, int wordLength, unsigned int *output,
76
unsigned int blocks);
77
78
};
79
80
#endif
81
82
83
84
85
86