Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hashlife
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Representation=== The field is typically treated as a theoretically [[infinity|infinite]] grid, with the [[pattern (CA)|pattern]] in question centered near the [[origin (mathematics)|origin]]. A [[quadtree]] (with [[hash consing|sharing]] of nodes) is used to represent the field. A node at the ''k''th level of the tree represents a square of 2<sup>2''k''</sup> cells, 2<sup>''k''</sup> on a side, by referencing the four ''k''β1 level nodes that represent the four <math>2^{k-1} \times 2^{k-1}</math> quadrants of that level ''k'' square. For example, a level 3 node represents an 8Γ8 square, which decomposes into four 4Γ4 squares. Explicit cell contents are only stored at level 0. The root node has to be at a high enough level that all live cells are found within the square it represents. While a quadtree naively seems to require far more [[computational overhead|overhead]] than simpler representations (such as using a [[matrix (mathematics)|matrix]] of [[bit]]s), it allows for various optimizations. Since each cell is either live or dead, there are only two possibilities for a node at level 0, so if nodes are allowed to be shared between parents, there is never a need for having more than 2 level 0 nodes in total. Likewise the 4 cells of a 2Γ2 square can only exhibit <math> 2^4 = 16 </math> different combinations, so no more than that many level 1 nodes are needed either. Going to higher levels, the number of possible ''k''th level squares grows as <math> 2^{2^k \cdot 2^k} = 2^{2^{2k}} </math>, but the number of distinct ''k''th level squares occurring in any particular run is much lower, and very often the same square contents appears in several places. For maximal sharing of nodes in the quadtree (which is not so much a [[tree (graph theory)|tree]] as a [[directed acyclic graph]]), we only want to use one node to represent all squares with the same content.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)