Jason Cawley
Wolfram Science Group
Phoenix, AZ USA
Registered: Aug 2003
Posts: 712 |
Yep, a well known issue. You basically have three choices - either to use "wrapped" boundary conditions, by treating the rightmost cell as the right-hand neighbor of the left-most cell, which effectively arranges the cells on a cylinder - or "infinite" boundary conditions, for which you treat any cell beyond those reached so far by the pattern as "padded out" with new additional sites of value zero - both of those are common solutions. A third possible, but uncommon solution is to treat the two boundaries as fixed at value 0 - so there are "neighbors" off the edge with value zero, but the pattern doesn't grow beyond its initial width.
In Mathematica, the default for a finite initial condition is to wrap the boundary, cylinder-style. The default for a periodic background, including a uniform background of 0s (the "simple iniital condition" of a single 1 on the 0 background, used in the book) is to use the infinite "sea of 0s" boundary condition. Note that to implement the second, infinite boundary condition, you have to be able to handle the growth of the pattern; the width is no longer fixed. For a fixed allocated array like you allude to, a wrapped boundary condition is the simplest thing.
I hope this helps.
Report this post to a moderator | IP: Logged
|