Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

proj06_functions.h #ifndef PROJ06_AUTOMATA #define PROJ06_AUTOMATA #include using std::string; #include using std::vector; string to_binary(int val); int next_val (const vector &v, const string &binary_rule_string); vector one_iteration(const vector

image text in transcribedimage text in transcribedimage text in transcribedproj06_functions.h #ifndef PROJ06_AUTOMATA #define PROJ06_AUTOMATA #include using std::string; #include using std::vector; string to_binary(int val); int next_val (const vector &v, const string &binary_rule_string); vector one_iteration(const vector &v, const string &binary_rule_string); string vector_to_string(const vector &v); void read_vector(vector &v, string file_str); // string pretty_print(vector & v); #endif 
The Problem A cellular automaton (see https://en.wikipedia.org/wiki/Cellular automaton) is specialized approach to computing. It consists of a set of cells, each of which is in either an on or off state, symbolized by the values 1 or 0 respectively. These cells can change their state over time based on a set of update rules. The change of states of the cells can be used to do a kind of computing. Each cell is updated during each iteration of the algorithm, potentially changing the state of all the cells in the automaton. The Game of Life The most popular cellular automaton you might have heard of is called "The Game of Life" (https://en.wikipedia.org/wiki/Conway%27s Game of Life) invented by the English mathematician John Conway in 1970. It is played on a two-dimensional grid cells and the game-of-life update rule provides for a very complex, and entertaining, development of cell states over time. Wolfram 1D cellular automata Stephen Wolfram is an English mathematician/scientist who founded Wolfram, maker of Mathematica and Wolfram Alpha. He quantized the concept of a 1D cellular automaton as discussed here ://mathworld,wolfram.com/CellularAutomaton,html), The basic idea is this. The simplest version of a 1D cellular automaton consists of the central cell, whose state might change during an iteration, and its two neighbors. We can construct 8 possible rules for update of a cell based on the value of the central cell and its two neighbors. We label the rule based on a binary enumeration of the values of the 3 cells 22 21 20 cell to neighbors update 6 4 2 These are the possible patterns, but we now need to provide how the central cell changes for each of the 8 rules. We can do that by specifying rule number, an 8-bit number, range 0-255, that labels how the central cell should change for each rule based on a binary representation, in 8 bits, of that rule number. Consider the rule number 30 (used in the wolfram example). Its binary representation is 00011110. We mark below each of the 8 the rules the binary value of the rule number. This binary value indicates, if that rule applies, the value (0 or 1) the central cell takes on in the next iteration. The Problem A cellular automaton (see https://en.wikipedia.org/wiki/Cellular automaton) is specialized approach to computing. It consists of a set of cells, each of which is in either an on or off state, symbolized by the values 1 or 0 respectively. These cells can change their state over time based on a set of update rules. The change of states of the cells can be used to do a kind of computing. Each cell is updated during each iteration of the algorithm, potentially changing the state of all the cells in the automaton. The Game of Life The most popular cellular automaton you might have heard of is called "The Game of Life" (https://en.wikipedia.org/wiki/Conway%27s Game of Life) invented by the English mathematician John Conway in 1970. It is played on a two-dimensional grid cells and the game-of-life update rule provides for a very complex, and entertaining, development of cell states over time. Wolfram 1D cellular automata Stephen Wolfram is an English mathematician/scientist who founded Wolfram, maker of Mathematica and Wolfram Alpha. He quantized the concept of a 1D cellular automaton as discussed here ://mathworld,wolfram.com/CellularAutomaton,html), The basic idea is this. The simplest version of a 1D cellular automaton consists of the central cell, whose state might change during an iteration, and its two neighbors. We can construct 8 possible rules for update of a cell based on the value of the central cell and its two neighbors. We label the rule based on a binary enumeration of the values of the 3 cells 22 21 20 cell to neighbors update 6 4 2 These are the possible patterns, but we now need to provide how the central cell changes for each of the 8 rules. We can do that by specifying rule number, an 8-bit number, range 0-255, that labels how the central cell should change for each rule based on a binary representation, in 8 bits, of that rule number. Consider the rule number 30 (used in the wolfram example). Its binary representation is 00011110. We mark below each of the 8 the rules the binary value of the rule number. This binary value indicates, if that rule applies, the value (0 or 1) the central cell takes on in the next iteration

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

Compute the derivative f(x)=(x-a)(x-b)

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago