15.08.2015 Views

Introduction to the Modeling and Analysis of Complex Systems

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

12.2. PHASE SPACE VISUALIZATION 211For example, a one-dimensional binary CA model with L = 10 has 2 101 = 1024 possibleconfigurations, a two-dimensional binary CA model with L = 10 has 2 102 ≈ 1.27 × 10 30possible configurations. The latter is large, but it isn’t so huge compared <strong>to</strong> <strong>the</strong> size <strong>of</strong> <strong>the</strong>rule spaces you saw in <strong>the</strong> exercises above.Exercise 12.3 Calculate <strong>the</strong> number <strong>of</strong> all possible configurations <strong>of</strong> a twodimensional,three-state CA model with L = 100.12.2 Phase Space VisualizationIf <strong>the</strong> phase space <strong>of</strong> a CA model is not <strong>to</strong>o large, you can visualize it using <strong>the</strong> techniquewe discussed in Section 5.4. Such visualizations are helpful for underst<strong>and</strong>ing <strong>the</strong> overalldynamics <strong>of</strong> <strong>the</strong> system, especially by measuring <strong>the</strong> number <strong>of</strong> separate basins <strong>of</strong> attraction,<strong>the</strong>ir sizes, <strong>and</strong> <strong>the</strong> properties <strong>of</strong> <strong>the</strong> attrac<strong>to</strong>rs. For example, if you see only onelarge basin <strong>of</strong> attraction, <strong>the</strong> system doesn’t depend on initial conditions <strong>and</strong> will alwaysfall in<strong>to</strong> <strong>the</strong> same attrac<strong>to</strong>r. Or if you see multiple basins <strong>of</strong> attraction <strong>of</strong> about comparablesize, <strong>the</strong> system’s behavior is sensitive <strong>to</strong> <strong>the</strong> initial conditions. The attrac<strong>to</strong>rs may bemade <strong>of</strong> a single state or multiple states forming a cycle, which determines whe<strong>the</strong>r <strong>the</strong>system eventually becomes static or remains dynamic (cyclic) indefinitely.Let’s work on an example. Consider a one-dimensional binary CA model with neighborhoodradius r = 2. We assume <strong>the</strong> space is made <strong>of</strong> nine cells with periodic boundaryconditions (i.e., <strong>the</strong> space is a ring made <strong>of</strong> nine cells). In this setting, <strong>the</strong> size <strong>of</strong> its phasespace is just 2 9 = 512, so this is still easy <strong>to</strong> visualize.In order <strong>to</strong> enumerate all possible configurations, it is convenient <strong>to</strong> define functionsthat map a specific configuration <strong>of</strong> <strong>the</strong> CA <strong>to</strong> a unique configuration ID number, <strong>and</strong> viceversa. Here are examples <strong>of</strong> such functions:Code 12.1:def config(x):return [1 if x & 2**i > 0 else 0 for i in range(L - 1, -1, -1)]def cf_number(cf):return sum(cf[L - 1 - i] * 2**i for i in range(L))Here L <strong>and</strong> i are <strong>the</strong> size <strong>of</strong> <strong>the</strong> space <strong>and</strong> <strong>the</strong> spatial position <strong>of</strong> a cell, respectively.These functions use a typical binary notation <strong>of</strong> an integer as a way <strong>to</strong> create mapping

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!