3.3. Characterizing Chaos in the Baker Map
Numerical solutions carry a fixed number of digits, 9, 17, and 36 for single-, double-, and quadruple-precision numbers on the unit interval. Chaos is characterized by the exponential growth of small perturbations. The Baker Map’s largest Lyapunov exponent is 0.63651, so that the differences seeded by roundoff between single- and double-precision, and between double- and quadruple-precision solutions can be estimated from
Figure 4 just as easily as from the analytic growth rates. That figure illustrates the offsets and
Figure 6 the trajectory differences between 50 and 75 iterations of the double and quadruple-precision maps. At 50 iterations, corresponding to multiplying by
, roundoff error has not yet amplified the difference between double and quadruple precision to visibility, while 75 iterations are more than sufficient to lose any visible correlation between the two solutions.
The right side of
Figure 3 shows that a stochastic view of the map, traceable to its chaos, is quite proper. Before the mapping shown at the top of
Figure 2 is executed we note that the white southeastern area is twice that of the northwestern red area so that compressive steps (into the highest-density lower third of the unit square) are twice as likely as expansive steps (into the upper two-thirds). The preponderance of the excess, lower–upper, is shown in
Figure 5 and approaches, on average,
as the number of iterations
t increases. We would expect the error in this statistical estimate to become visually negligible, say one percent, once the number of iterations is of order
. A look at the figure shows that the statistical bumpiness away from a straight line becomes visually negligible between 1000 and 10,000 iterations, just as one would expect for a stochastic, rather than deterministic, process.
It is an article of faith that the
x motion of the
map is completely random [
13]. This statistical view is consistent with our numerical work so that we believe it is fully justified. It is easily checked by comparing bin populations for the Map and the Walk after millions or billions or trillions of iterations. See
Figure 7 for a million-iteration sampling of 2187 bins for both approaches. Let us consider the confined random walk problem in more detail next [
5,
6,
13].
3.5. Nonuniform Convergence of the Information Dimensions
The definition of the information dimension
for a set of points describes the dependence of the probability density of points on the size of the sampling bins,
. Although other fractal dimensions can and have been defined and studied, the information dimension is uniquely significant. Unlike the correlation dimension
is unchanged by simple coordinate transformations [
14].
To seek uniqueness both the number of bins and the number of points per bin must approach infinity in averaging the bin probabilities:
. To visualize taking this limit we illustrate the result of iterating a set of one million equally-spaced initial points on confined random walks:
. We explore thirty iterations:
. The confined random-walk iterations are governed by the output of the FORTRAN random number generator
randomnumber(r). The dimensionality data are analyzed here using
bins, with
n varying from 0 to 10. The finest grid has
bins of equal width
. By combining the contents of 3, or 9, or 27, or…contiguous bins the entire set of 30 stepwise information dimensions for the ten binning choices can be obtained from a single run. The apparent information dimensions for the 300 problems (thirty iterations with ten bin sizes) are plotted as the ten lines shown in
Figure 9.
The Baker-Map function,
provides the same fractal as does the confined walk, penetrating, in both cases, to a scale smaller by a factor 3 with each iteration. For this reason powers of
are the “natural” bin sizes for analyzing the Baker-Map function [
5,
13] and the confined walk
. Although reciprocal bin widths which are powers of 3 are “natural” for the Baker Map and its confined walk analog, an embarrassing variety of choices is possible. As an example bin widths which are the first eight powers of 4 (a subset of bin widths which are powers of 2) provide the information dimension estimates shown in
Figure 10. Similar behaviour and convergence is observed in the case of
,
,
and
[
15], so the
case is chosen as representative in the comparison to the
case. For additional examples see Reference [
14]. The totality of these results is paradoxical because they indicate a limiting information dimension of
from the series of widths
and a
different limit,
, from the series of widths
. This difference suggests a persistent difference of distributions in the limiting case(s)
. This nonuniform convergence caught us completely by surprise.
The lines in both
Figure 9 and
Figure 10 appear to plateau to different fixed value depending on bin resolution. This is a consequence of the increased ability to resolve the phase space fractals as number of bins increases. For increasing numbers of bins, with enough iterations the plateau values becomes similar but the actual convergence is very slow, only appearing on logarithmic axes.
The dependence of the limiting information dimension on the bin-width power law, giving either
or
, suggests a look at the distributions themselves. As the limiting case(s) are singular everywhere, we arbitrarily choose to compare probability densities for both
and
bins in
Figure 8. Both simulations include exactly the same set of 100,000,000 iterations. The density steps with
bins are markedly sharper than those with
and the details of the boundaries between vertical strips are likewise better defined for the finer (65,536 rather than 59,049 bins) mesh.
A clearer picture of the binning dependence follows from the cumulative distributions of density and information, shown for the same data used in
Figure 8.
Figure 11 shows both the density and the information dimension as cumulative sums for two pairs of similar binnings,
and
. Because the underlying data are identical the densities always agree, within one bin width. The information dimensions are quite different with powers of 2 both giving
, significantly greater than
and 0.725 for the “natural choice" of powers of three, 243 and 2187 bins. Numerical work suggests that the difference persists even to infinitesimal bin widths.
3.6. Massively-Parallel Implementations of the Confined Walk
The Baker Map and Confined Walk problems appear to be ideally suited to parallel computation. Both these information-dimension problems are “embarrassingly parallel”. This means that during computation there is no need for communication between parallel processors. For both problems ergodicity implies that the long-time-averaged bin-dependent information dimensions,
are independent of the initial condition. The motivation for the current work was, in fact, our desire to apply a parallel computer to these problems. As the Map and Walk problems are equivalent in their fractal natures we will detail only the simpler case, the confined random walk.
Consider a parallel computer with N processors, each with its own separate memory storing an array of bin occupation numbers. Such a machine would reduce the computation time for a given number of iterations by a factor of N, provided the N initial conditions contain no duplicates and the streams of random numbers are unique on each processor. This optimal N-fold “speedup” would not apply to problems requiring the alternative “shared-memory” approach. Sharing a single memory, common to all processors, degrades performance dramatically as the N processors compete for access to the global storage. To take advantage of a parallel machine, it is necessary to note that N independent sets of bin populations must be separately stored, only to be combined at the completion of all the processors’ iterations.
Let us consider a numerical example to clarify the potential improvement in statistics of a parallel implementation. We imagine a parallel machine with 100 processors applied to the
bin problem. To determine an accurate answer to this problem we begin by carrying out a single serial calculation of 50,000,000,000 iterations. This provides an information dimension of
. The uncertainty in the last digit is 0.000001 or 0.000002. Next, we consider 100 serial computations (mocking up a 100-processor solution) of 1000, 10,000, and 100,000 iterations each, finding errors in
of 0.0322, 0.0048, and 0.0005. Further numerical exploration shows that a plot of ln(error) as a function of ln(iterations) has a straight-line slope near
. Evidently for runs of reasonable length the error varies inversely as the number of iterations.
Figure 12 shows errors for both the 729-bin case and the 531,441
-bin case suggesting that the inverse relationship is a good “rule of thumb”. For a slowly varying cumulative average twice the final value less that at the halfway point is a reasonable best-guess choice for
.
It is therefore clear that a parallel implementation can be used to improve statistics. The result of scaling up to 1536 processors is shown in
Figure 13 for a Confined Walk run over
iterations using
bins. The run time, approximately 600 s, is the calculation of the walk itself. This is seen to be independent of the number of processes, as expected from the embarrassingly parallel nature of the problem. The communication time covers the summing of the value in each bin on each processor to a master set of
bins on the root processor. The root processor then calculates the value of
from the set of bins which will contain
samples. This communication occurs only once at the end of the run, so despite taking more time as the number of processes
N grows, it would still be expected to be an insignificant part of a longer run time (e.g., a typical run of 48 h would spend less than
on communication with 1536 processors).
However, the information dimension requires a process of increasing bin resolution, which necessitates the number of bins be increased toward infinity. As a result, the problem of finding the information dimension quickly becomes memory limited. In the example given here, the 1536 processors are distributed on 24 core “nodes” (essentially a networked computer with a 24 core Central Processing Unit or CPU), each of which has 100 GB (GigaBytes) of random access memory ( bytes of Random-Access Memory or RAM). The bins’ contents must be stored on each processor. This allows them to run in parallel, which limits the number of bins to no more than 4 GB per processor. The choice here is of bins ≈ 1.4 GB, where the count in each bin is stored as a 4 byte integer and is within the limit of 100 GB of random access memory available for the 24 cores. The next power of three, , would result in storage requirements greater than 4 GB per process. As a result, the supercomputer has the potential to speed up the simulation but only for systems with modest memory requirements. Generally smaller numbers of bins converge rapidly, so compute time are not the limiting step. As a result, this “memory-limited” problem is not ideally suited for acceleration on a supercomputer.
A different approach would be needed if supercomputer speedup is to be possible when collecting the information dimension for the case where number of bins tends to infinity, for example using a dynamic data structure for binning (e.g., a binary tree) or some other way of calculating the information dimension which does not require the allocation of prohibitively large binning arrays. An alternative measure of the fractal dimension could also provide a way forward.