Outline 2. 1 Elementary Cellular Automata. 2 Analysis of Cellular Automata. 3 A Huge Surprise. Generalizations? 4



Similar documents
Representing Reversible Cellular Automata with Reversible Block Cellular Automata

CAs and Turing Machines. The Basis for Universal Computation

Notes on Complexity Theory Last updated: August, Lecture 1

CELLULAR AUTOMATA AND APPLICATIONS. 1. Introduction. This paper is a study of cellular automata as computational programs

Genetic Algorithm Evolution of Cellular Automata Rules for Complex Binary Sequence Prediction

Polynomial Invariants

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

T Reactive Systems: Introduction and Finite State Automata

Math 4310 Handout - Quotient Vector Spaces

6.080/6.089 GITCS Feb 12, Lecture 3

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

Lecture 2: Universality

Automata and Computability. Solutions to Exercises

CS 3719 (Theory of Computation and Algorithms) Lecture 4

Testing LTL Formula Translation into Büchi Automata

Mathematical Induction

The Classes P and NP

Outline 2. 1 Turing Machines. 2 Coding and Universality. 3 The Busy Beaver Problem. 4 Wolfram Prize. 5 Church-Turing Thesis.

Methods for Finding Bases

The Halting Problem is Undecidable

Year 9 set 1 Mathematics notes, to accompany the 9H book.

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Reading 13 : Finite State Automata and Regular Expressions

Runtime Verification - Monitor-oriented Programming - Monitor-based Runtime Reflection

Arrangements And Duality

Automata and Formal Languages

6 Scalar, Stochastic, Discrete Dynamic Systems

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

1 if 1 x 0 1 if 0 x 1

Artificial Neural Networks and Support Vector Machines. CS 486/686: Introduction to Artificial Intelligence

System Interconnect Architectures. Goals and Analysis. Network Properties and Routing. Terminology - 2. Terminology - 1

Factoring & Primality

CHAPTER 3 Boolean Algebra and Digital Logic

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 4 Nancy Lynch

Continued Fractions and the Euclidean Algorithm

Some Minesweeper Configurations

3515ICT Theory of Computation Turing Machines

Lecture 8: Synchronous Digital Systems

Solutions to Math 51 First Exam January 29, 2015

Systems of Linear Equations

Overview. Swarms in nature. Fish, birds, ants, termites, Introduction to swarm intelligence principles Particle Swarm Optimization (PSO)

Solving Systems of Linear Equations

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

Introduction. What is RAID? The Array and RAID Controller Concept. Click here to print this article. Re-Printed From SLCentral

with functions, expressions and equations which follow in units 3 and 4.

Graph Theory Problems and Solutions

Sudoku puzzles and how to solve them

Regular Languages and Finite Automata

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

1 Norms and Vector Spaces

Introduction to nonparametric regression: Least squares vs. Nearest neighbors

Cellular Automaton: The Roulette Wheel and the Landscape Effect

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

Scicos is a Scilab toolbox included in the Scilab package. The Scicos editor can be opened by the scicos command

(Refer Slide Time: 2:03)

Remarks on the computational complexity of small universal Turing machines

Turing Machines: An Introduction

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Computability Theory

Introduction to computer science

Introduction to the Smith Chart for the MSA Sam Wetterlin 10/12/09 Z +

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

Lecture 3: Linear methods for classification

SECTION 5: Finalizing Your Workbook

Encoding Text with a Small Alphabet

Introduction to Logic in Computer Science: Autumn 2006

C H A P T E R Regular Expressions regular expression

Three Effective Top-Down Clustering Algorithms for Location Database Systems

Scheduling. Getting Started. Scheduling 79

NP-Completeness and Cook s Theorem

Automata-based Verification - I

Chapter 6: Episode discovery process

The components. E3: Digital electronics. Goals:

Several Views of Support Vector Machines

BOOLEAN ALGEBRA & LOGIC GATES

Linear Codes. Chapter Basics

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

CHAPTER 5 Round-off errors

Theory of Computation Chapter 2: Turing Machines

Memory Allocation Technique for Segregated Free List Based on Genetic Algorithm

CALCULATIONS & STATISTICS

Models of Sequential Computation

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Linear Programming. Solving LP Models Using MS Excel, 18

Lecture 13 - Basic Number Theory.

Competitive Analysis of On line Randomized Call Control in Cellular Networks

The fundamental question in economics is 2. Consumer Preferences

Systolic Computing. Fundamentals

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

Session 7 Bivariate Data and Analysis

Transcription:

Outline 2 CDM Cellular Automata Klaus Sutner 1 Elementary Cellular Automata 2 Analysis of Cellular Automata Fall 2013 3 A Huge Surprise Recall: Feedback Shift-Registers 3 Generalizations? 4 r3 r2 r1 r0 So simple Boolean functions can create rather complicated and useful behavior when iterated. Can One Exploit This Phenomenon? c1 c2 c3 c4 Are there are other interesting systems of similar type? Can one develop a good theory of the systems? A few bit-registers and a simple feedback function. Iteration produces complicated and useful behavior: selecting the taps in a judicious manner, we can obtain bit-sequences with very long periods (near-hamiltonian sequences). Can they be used to solve computational tasks? Efficiently? We will consider one fairly straightforward generalization: linear cellular automata. Configurations 5 Localize 6 We start with a linear sequence of 1-bit registers, called cells in this context. Each cell communicates with its 2 immediate neighbors: To update a configuration X in position i we can only use the current values of the immediate neighbors of cell i: X i 1, X i, X i+1 X i r0 r1 r2 r3 r4 r5 r6 r7 Clearly we can describe this update operation by a ternary Boolean function ρ : 2 2 2 2 A configuration of this system is an assignment of Boolean values to all the cells C, a map X : C 2 We write C for the space of all configurations. The idea is to apply this map at all cells to update a given configuration. First, a closer look at the cell layout.

A Taxonomy 7 Two-Way Infinite is Easier 8 In the picture we can think of C = {0, 1,..., n 1}. So, configurations are just finite bit sequences (or words if you like). But it also makes sense to consider C = N. In this case a configuration is an ω-sequence, a one-way infinite sequence. Lastly, we could have C = Z. In this case a configuration is a bi-infinite sequence, sometimes called a ζ-sequence. So there is a finite type, a (one-way) infinite type and a bi-infinite type. We have a local map ρ : 2 3 2 that we need to extend to a global map G ρ : C C This is straightforward in the bi-infinite case: G ρ(x)(i) = ρ(x(i 1), X(i), X(i + 1)) In other words, apply the local map simultaneously (there is a global clock) and in parallel at all cells to get the next configuration. So this system is homogeneous: the same law applies everywhere. Elementary Cellular automata 9 Information Flow 10 So as a data structure, a one-dimensional, bi-infinite, elementary cellular automaton (ECA) is simply a ternary Boolean function. One-dimensional is clear: we are not dealing with higher dimensional grids. Bi-infinite : well... The elementary comes from the fact that we only consider Boolean values and immediate neighbors. Obviously one could use larger alphabets and/or larger neighborhoods. Pleasant Surprise: ECA already display many of the interesting features of these more complicated systems. Note that there is a speed of light in this system: information cannot propagate from instantaneously from a cell to a far-away cell: every cell has its own light cone. Einstein 11 Boundary Conditions 12 Cellular automata are often referred to as physics-like models of computation. By homogeneity, the laws of physics in a CA are the same everywhere. By locality, there is no spooky action at a distance. Since the local rule is deterministic, so is the whole system. Einstein might have liked cellular automata. Of course, to get something vaguely resembling some aspect of physics one needs to deal with 2-dim or 3-dim cellular automata. For example, there are interesting ways to simulate fluid-dynamics. And we have to ignore quantum physics. Note that our definition of the global map does not directly apply to (one-way) infinite and finite grids of cells: the border cells don t have enough neighbors. There are two standard solutions (and variations thereof): Fixed boundary conditions: assume there is another cell in state 0. This works for infinite and finite grids. Cyclic boundary conditions: assume the grid wraps around (circle of cells). This only works for finite grids. We will use cyclic boundary conditions unless mentioned otherwise.

Cellular Automata 13 Ranking ECA 14 So, in order to specify a general (one-dimensional, elementary) cellular automaton we need the following information: the local map ρ, a ternary Boolean function a description of the grid topology for the infinite/finite case a specification of boundary conditions. It is not too surprising that the critical part is the Boolean function, the topology does not matter that much (for some definition of much ). So we are dealing with 256 basic ECA, plus variants. Since every ternary Boolean function is given by its list of values, eight bits a 0, a 1,..., a 7 we can think of these bits as a number written in reverse binary. For example, ECA number 160 corresponds to (0, 0, 0, 0, 0, 1, 0, 1). Less cryptically, the local map is ρ(x, y, z) = x z Go to WolframAlpha to see the Boolean functions corresponding to the 256 ECA. Additive ECA 15 ECA 90 16 Recall that we started with feedback shift registers which are based on exclusive or. One might wonder what happens when the local map of a ECA is based on xor. There are two interesting cases: rule 90 and 150 ρ 90(x, y, z) = x z ρ 150(x, y, z) = x y z It is easy to see that in this case the global map is also linear with respect to F 2: G ρ(x + Y ) = G ρ(x) + G ρ(y ). So it suffices in a sense to understand their behavior on one-point configurations (corresponding to unit vectors). Alas, linear in connection with CA means one-dimensional. So, these rules are called additive. ECA 150 17 Exercise 18 Exercise Compute the fractal dimension of the pattern generated by ECA 90. Exercise Give a real proof that your computation is correct. Exercise Compute the fractal dimension of the pattern generated by ECA 150. Exercise Give a real proof that your computation is correct.

Typical Pictures 20 Elementary Cellular Automata 2 Analysis of Cellular Automata A Huge Surprise Wolfram s Classes 21 Automatic Classification 22 A characterization based on heuristics (aka looking at pictures). W1: Evolution leads to homogeneous fixed points. W2: Evolution leads to periodic configurations. W3: Evolution leads to chaotic, aperiodic patterns. W4: Evolution produces persistent, complex patterns of localized structures. Since there are lots of CA (if we drop the constraint of being elementary) it would be very nice to have automatic tools to check their properties. Amoroso and Patt 1972: decidability of reversibility and surjectivity. KS 1991: efficient quadratic time algorithm, automata theory. J. Kari 1990: undecidable in dimensions 2 and higher. Bad News 23 Local Theory 24 Stronger classifications along the lines of Wolfram s Classes are quite hopeless. Theorem It is Π 2-complete to test if all orbits end in fixed points. Theorem It is Σ 3-complete to test if all orbits are decidable. Theorem It is Σ 4-complete to test if a CA is computationally universal. If orbits are too complicated, maybe one can still handle weaker properties, just like injectivity and surjectivity. Think of a cellular automaton as a first-order structure: A ρ = C, where the configurations C are words (finite, infinite, bi-infinite) and X Y indicates that G ρ(x) = Y.

Keeping Things Simple 25 Some Formulae 26 FOL can only handle boundedly many applications of the global map, so in a sense we are looking at local properties of A. x y (y x) x, y, z (x z y z x = y) x y, z (y x z x u (u x u = y u = z)) But these require stronger logic (MSO,TrCL,... ): x (x 0) x z (x z z z) Decidability 27 The Spectrum 28 Theorem The first-order theory of one-dimensional cellular automata is decidable. For finite CA one needs to be a bit careful, we have to deal with additional parameter n. Ideally, given any sentence ϕ, we would like to understand its spectrum: Unfortunately, the complexity is not elementary: nested complementation wreaks havoc on efficiency. spec(ϕ) = { n N A n ρ = ϕ } There are tricks that can help, bug the sad truth is that only a tiny fragment of first-order logic is decidable in the real world. So spec(ϕ) = N means always true, spec(ϕ) = means always false. Regular Spectra 29 Graphical Computing 30 ECA 90: spec(injective) =. ECA 154: spec(injective) = odd. ECA 150: spec(injective) = N 3N. So how does one analyze ECAs? One important method is simulation: compute the orbit of some/all configurations on finite grids of different sizes. Plot a 2-dimensional picture of these orbits and hope to find some patterns by visual inspection. Theorem Spectra are regular: the language { 0 n n spec(ϕ) } is regular. Moreover, a corresponding finite automaton can be constructed effectively. We can also look at phasespace, the directed graph obtained from the global map applied to all configurations of some rather limited size. For larger configurations we can only sample. Of course, in the end pictures mean little: one has to be able to turn the pictures into theorems. Alas, it can be a long, long way from pretty pictures to a theorem.

Example: ECA 28 31 ECA 28 32 Transients 33 Line of Attack 34 A table of all transient/period pairs, and the number of configurations that attain them. t p count t p count 1 1 21 5 1 80 1 2 160 5 2 40 2 1 40 6 1 10 2 2 115 7 1 30 3 1 150 8 1 10 3 2 235 9 1 10 4 1 40 4 2 20 Probably not a good idea to try to find a closed form for the actual counts, but the length of the transients should be OK. Also note that long transients seem to lead to fixed points. Every configuration in C n other than 0 can be written in the form where n = k i=1 (ni + 1) and 1 k. X = 10 n1 10 n2... 10 n k 1 10 n k Then the transient is essentially max n i and the period is 1 or 2 essentially depending on the parity of the n i. Note the qualifier essentially, things are bit more complicated than that (one has to deal with special cases for small values of n i). Exercise Carry out the details of this argument. Make sure to verify your results experimentally. ECA 54 35 But be warned, things do not always work out so nicely. How about this one? Multiple Seeds 36 Apparently not bad. More complicated seeds don t seem to cause too much trouble, either.

Disaster 37 ECA 73 38 Another apparently hopeless case. n = 23, t = 24, p = 690 The entry point to the limit cycle is marked in purple (first and last column). ECA 45 39 Pseudo-Random Bits 40 This one seems even more intimidating. Feedback-shift registers can be used to produce cheap pseudo-random bits. Is there an ECA that could produce reasonable pseudo-random bits? One might suspect that binary nearest neighbor CA are too restricted to produce anything useful. But actually there is a candidate: ECA number 30. This CA was used in the Connection Machine as a PRN generator and is still used in Mathematica. ECA 30 41 ECA 30 42

Computation and CA 44 Elementary Cellular Automata Analysis of Cellular Automata In the glory days when people were building actual CA hardware one could use these CA-machines to do simulations in physics. Of course, without massively parallel hardware CA are not a particularly useful model. But how about other computations? Is there anything one can do nicely on a CA, not necessarily an elementary one? 3 A Huge Surprise For example, how about the most basic non-regular language, the Dyck language of balanced parentheses? Computing By Pictures 45 The Local Map 46 For convenience, use a three-symbol alphabet Σ = {L, R, b} where b stands for blank, L for ( and R for ). The basic idea is very simple: LR turns into bb: matching parens disappear. br turns into Rb: a right paren moves left in free space. Everything else does not change. This can be handled by a width 3, 3 state CA. Here is the local replacement rule (where means any symbol). (, L, R) b (L, R, ) b (, b, R) R (b, R, ) b (, x, ) x Using the standard ranking this is (3, 3)-CA number 7391985410304. An Accepting Computation 47 Two Non-Accepting Computations 48 Correctness proof by picture. Both computations below fail, but for different reasons. On the left: unmatched right parens, on the right unmatched left parens. Here blue is L, red is R.

Majority 49 Majority CA 50 Here is another simple task: build a CA that determines Majority. In other words, the CA should be able to detect whether a given binary input configuration has more 0 s or more 1 s (lets assume we are working on a grid of odd length). As usual, it is not clear how the CA should signal it s output, so let s agree to the following. If the input configuration has more 1 s than 0 s, evolve to all 1 s. Otherwise evolve to all 0 s. Here is the catch: the CA itself should also be binary. Clearly, width 3 won t go very far here, so one typically uses a neighborhood of size 7: there are 2 128 such CAs, perhaps one of them will work. Standard application of genetic programming. Firing Squad Problems 51 Moews 52 Here is a type of computation more closely linked to multiple-processor devices: what is the best way to synchronize all the processors in a one-dimensional grid when communication is strictly local? In the classical form of the FSP we have n soldiers lined up, but the number n is unknown to them. At time 0 soldier number 1 (the general) is in a special state, all others are quiescent. At time t all soldiers are in a special firing state, and no one has been in the firing state at any time prior to t. It is not hard to come up with solutions if each soldier is allowed to have many internal states the hard part is to have few states and keep t small. A width 3 CA with 13 states. Note the signal used to partition the line into smaller and smaller blocks. Waksman 53 Mazoyer 54 A width 3 CA with 9 states. Again width 3 but only 6 states.

Universal Computation 55 Intrinsically Universal CA 56 So we can build certain cellular automata for special purpose computations, but how about a universal computer? A cellular automaton that can simulate any Turing machine? Actually, slightly more ambitious: a cellular automaton that can simulate any other CA? These are called intrinsically universal cellular automata. This may sound hard, but it s actually not that bad: it is trivial to simulate a Turing machine by a one-dimensional CA. And with more sweat, we can simulate arbitrary CAs on an appropriately constructed one. So we get universal computation. An example of an intrinsically universal CA, simulating ECA 90. It uses k = 19 and w = 5. Langton s CA 57 Zoom 58 Zoom 59 Zoom 60

The Real Question 61 ECA 110 62 More interesting is this question: how small can the neighborhood and alphabet be to get universality? The intrinsically universal one was constructed, every part of the local rule is carefully planned. Langton s machine was discovered in the sense that he searched through lots of machines on 8 states and width 5. It looks universal, but no one has a proof. Wild Idea: Could there possibly be an elementary cellular automaton that is universal? ECA 110 63 A Huge Surprise 64 Theorem (Cook) Elementary cellular automaton number 110 is universal. Of course, the computation is very slow, and the initial configuration horribly complicated. This is the first example of a small universal machine that was discovered, not constructed. One technical complication: this only works for configurations of the form ω u w v ω The details are quite messy, see Cook s paper in Complex Systems. By now the proof has undergone enough scrutiny to be generally accepted as correct. It cannot be verified by a proof checker at this point, though. Incidentally, it seems that rule 110 is not intrinsically universal.