home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Corel 10 Texture (image/corel10Texture)
| ext
| Unsupported |
1%
| dexvert
| Croteam texture file (image/croteamTextureFile)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text
| default
| |
100%
| TrID
| LaTeX 2e document (with rem)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/x-matlab
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 20 74 75 74 6f 72 | 69 61 6c 2e 74 65 78 0a |% tutor|ial.tex.|
|00000010| 25 20 20 43 6f 70 79 72 | 69 67 68 74 20 28 43 29 |% Copyr|ight (C)|
|00000020| 20 31 39 39 32 20 20 4a | 20 44 61 6e 61 20 45 63 | 1992 J| Dana Ec|
|00000030| 6b 61 72 74 0a 25 0a 25 | 20 20 54 68 69 73 20 70 |kart.%.%| This p|
|00000040| 72 6f 67 72 61 6d 20 69 | 73 20 66 72 65 65 20 73 |rogram i|s free s|
|00000050| 6f 66 74 77 61 72 65 3b | 20 79 6f 75 20 63 61 6e |oftware;| you can|
|00000060| 20 72 65 64 69 73 74 72 | 69 62 75 74 65 20 69 74 | redistr|ibute it|
|00000070| 20 61 6e 64 2f 6f 72 20 | 6d 6f 64 69 66 79 0a 25 | and/or |modify.%|
|00000080| 20 20 69 74 20 75 6e 64 | 65 72 20 74 68 65 20 74 | it und|er the t|
|00000090| 65 72 6d 73 20 6f 66 20 | 74 68 65 20 47 4e 55 20 |erms of |the GNU |
|000000a0| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|000000b0| 69 63 65 6e 73 65 20 61 | 73 20 70 75 62 6c 69 73 |icense a|s publis|
|000000c0| 68 65 64 20 62 79 0a 25 | 20 20 74 68 65 20 46 72 |hed by.%| the Fr|
|000000d0| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|000000e0| 64 61 74 69 6f 6e 3b 20 | 65 69 74 68 65 72 20 76 |dation; |either v|
|000000f0| 65 72 73 69 6f 6e 20 31 | 2c 20 6f 72 20 28 61 74 |ersion 1|, or (at|
|00000100| 20 79 6f 75 72 20 6f 70 | 74 69 6f 6e 29 0a 25 20 | your op|tion).% |
|00000110| 20 61 6e 79 20 6c 61 74 | 65 72 20 76 65 72 73 69 | any lat|er versi|
|00000120| 6f 6e 2e 0a 25 0a 25 20 | 20 54 68 69 73 20 70 72 |on..%.% | This pr|
|00000130| 6f 67 72 61 6d 20 69 73 | 20 64 69 73 74 72 69 62 |ogram is| distrib|
|00000140| 75 74 65 64 20 69 6e 20 | 74 68 65 20 68 6f 70 65 |uted in |the hope|
|00000150| 20 74 68 61 74 20 69 74 | 20 77 69 6c 6c 20 62 65 | that it| will be|
|00000160| 20 75 73 65 66 75 6c 2c | 0a 25 20 20 62 75 74 20 | useful,|.% but |
|00000170| 57 49 54 48 4f 55 54 20 | 41 4e 59 20 57 41 52 52 |WITHOUT |ANY WARR|
|00000180| 41 4e 54 59 3b 20 77 69 | 74 68 6f 75 74 20 65 76 |ANTY; wi|thout ev|
|00000190| 65 6e 20 74 68 65 20 69 | 6d 70 6c 69 65 64 20 77 |en the i|mplied w|
|000001a0| 61 72 72 61 6e 74 79 20 | 6f 66 0a 25 20 20 4d 45 |arranty |of.% ME|
|000001b0| 52 43 48 41 4e 54 41 42 | 49 4c 49 54 59 20 6f 72 |RCHANTAB|ILITY or|
|000001c0| 20 46 49 54 4e 45 53 53 | 20 46 4f 52 20 41 20 50 | FITNESS| FOR A P|
|000001d0| 41 52 54 49 43 55 4c 41 | 52 20 50 55 52 50 4f 53 |ARTICULA|R PURPOS|
|000001e0| 45 2e 20 20 53 65 65 20 | 74 68 65 0a 25 20 20 47 |E. See |the.% G|
|000001f0| 4e 55 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |NU Gener|al Publi|
|00000200| 63 20 4c 69 63 65 6e 73 | 65 20 66 6f 72 20 6d 6f |c Licens|e for mo|
|00000210| 72 65 20 64 65 74 61 69 | 6c 73 2e 0a 25 0a 25 20 |re detai|ls..%.% |
|00000220| 20 59 6f 75 20 73 68 6f | 75 6c 64 20 68 61 76 65 | You sho|uld have|
|00000230| 20 72 65 63 65 69 76 65 | 64 20 61 20 63 6f 70 79 | receive|d a copy|
|00000240| 20 6f 66 20 74 68 65 20 | 47 4e 55 20 47 65 6e 65 | of the |GNU Gene|
|00000250| 72 61 6c 20 50 75 62 6c | 69 63 20 4c 69 63 65 6e |ral Publ|ic Licen|
|00000260| 73 65 0a 25 20 20 61 6c | 6f 6e 67 20 77 69 74 68 |se.% al|ong with|
|00000270| 20 43 45 4c 4c 55 4c 41 | 52 2d 32 2e 30 3b 20 73 | CELLULA|R-2.0; s|
|00000280| 65 65 20 74 68 65 20 66 | 69 6c 65 20 43 4f 50 59 |ee the f|ile COPY|
|00000290| 49 4e 47 2e 20 20 49 66 | 20 6e 6f 74 2c 20 77 72 |ING. If| not, wr|
|000002a0| 69 74 65 20 74 6f 20 74 | 68 65 20 0a 25 20 20 46 |ite to t|he .% F|
|000002b0| 72 65 65 20 53 6f 66 74 | 77 61 72 65 20 46 6f 75 |ree Soft|ware Fou|
|000002c0| 6e 64 61 74 69 6f 6e 2c | 20 49 6e 63 2e 2c 20 36 |ndation,| Inc., 6|
|000002d0| 37 35 20 4d 61 73 73 20 | 41 76 65 2c 20 43 61 6d |75 Mass |Ave, Cam|
|000002e0| 62 72 69 64 67 65 2c 20 | 4d 41 20 30 32 31 33 39 |bridge, |MA 02139|
|000002f0| 2c 20 55 53 41 2e 0a 0a | 5c 64 6f 63 75 6d 65 6e |, USA...|\documen|
|00000300| 74 73 74 79 6c 65 5b 31 | 32 70 74 5d 7b 61 72 74 |tstyle[1|2pt]{art|
|00000310| 69 63 6c 65 7d 0a 0a 25 | 20 53 65 74 75 70 20 74 |icle}..%| Setup t|
|00000320| 68 65 20 64 65 73 69 72 | 65 64 20 70 61 67 65 20 |he desir|ed page |
|00000330| 73 74 79 6c 65 2e 0a 5c | 70 61 67 65 73 74 79 6c |style..\|pagestyl|
|00000340| 65 7b 70 6c 61 69 6e 7d | 0a 5c 73 65 74 6c 65 6e |e{plain}|.\setlen|
|00000350| 67 74 68 7b 5c 74 65 78 | 74 77 69 64 74 68 7d 7b |gth{\tex|twidth}{|
|00000360| 36 2e 35 69 6e 7d 0a 5c | 73 65 74 6c 65 6e 67 74 |6.5in}.\|setlengt|
|00000370| 68 7b 5c 74 65 78 74 68 | 65 69 67 68 74 7d 7b 39 |h{\texth|eight}{9|
|00000380| 2e 31 35 69 6e 7d 0a 5c | 73 65 74 6c 65 6e 67 74 |.15in}.\|setlengt|
|00000390| 68 7b 5c 6f 64 64 73 69 | 64 65 6d 61 72 67 69 6e |h{\oddsi|demargin|
|000003a0| 7d 7b 30 6d 6d 7d 0a 5c | 73 65 74 6c 65 6e 67 74 |}{0mm}.\|setlengt|
|000003b0| 68 7b 5c 65 76 65 6e 73 | 69 64 65 6d 61 72 67 69 |h{\evens|idemargi|
|000003c0| 6e 7d 7b 30 6d 6d 7d 0a | 5c 73 65 74 6c 65 6e 67 |n}{0mm}.|\setleng|
|000003d0| 74 68 7b 5c 74 6f 70 6d | 61 72 67 69 6e 7d 7b 2d |th{\topm|argin}{-|
|000003e0| 30 2e 33 69 6e 7d 0a 5c | 73 65 74 6c 65 6e 67 74 |0.3in}.\|setlengt|
|000003f0| 68 7b 5c 68 65 61 64 68 | 65 69 67 68 74 7d 7b 30 |h{\headh|eight}{0|
|00000400| 6d 6d 7d 0a 5c 73 65 74 | 6c 65 6e 67 74 68 7b 5c |mm}.\set|length{\|
|00000410| 68 65 61 64 73 65 70 7d | 7b 30 6d 6d 7d 0a 0a 5c |headsep}|{0mm}..\|
|00000420| 73 65 74 6c 65 6e 67 74 | 68 7b 5c 63 6f 6c 75 6d |setlengt|h{\colum|
|00000430| 6e 73 65 70 7d 7b 35 6d | 6d 7d 0a 0a 25 20 53 65 |nsep}{5m|m}..% Se|
|00000440| 74 75 70 20 74 68 65 20 | 64 65 73 69 72 65 64 20 |tup the |desired |
|00000450| 70 61 72 61 67 72 61 70 | 68 20 73 74 79 6c 65 2e |paragrap|h style.|
|00000460| 0a 5c 73 65 74 6c 65 6e | 67 74 68 7b 5c 70 61 72 |.\setlen|gth{\par|
|00000470| 69 6e 64 65 6e 74 7d 7b | 30 6d 6d 7d 0a 5c 73 65 |indent}{|0mm}.\se|
|00000480| 74 6c 65 6e 67 74 68 7b | 5c 70 61 72 73 6b 69 70 |tlength{|\parskip|
|00000490| 7d 7b 33 6d 6d 7d 0a 5c | 62 65 67 69 6e 7b 64 6f |}{3mm}.\|begin{do|
|000004a0| 63 75 6d 65 6e 74 7d 0a | 0a 25 20 41 20 6e 65 77 |cument}.|.% A new|
|000004b0| 20 63 6f 6d 6d 61 6e 64 | 20 74 6f 20 64 65 66 69 | command| to defi|
|000004c0| 6e 65 20 61 20 63 6f 6e | 73 74 61 6e 74 20 74 61 |ne a con|stant ta|
|000004d0| 62 62 69 6e 67 20 64 69 | 73 74 61 6e 63 65 20 66 |bbing di|stance f|
|000004e0| 6f 72 20 63 6f 64 65 20 | 65 78 61 6d 70 6c 65 73 |or code |examples|
|000004f0| 2e 0a 5c 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 74 |..\newco|mmand{\t|
|00000500| 61 62 7d 7b 5c 68 73 70 | 61 63 65 7b 35 6d 6d 7d |ab}{\hsp|ace{5mm}|
|00000510| 7d 0a 0a 5c 74 69 74 6c | 65 7b 41 20 7b 5c 65 6d |}..\titl|e{A {\em|
|00000520| 20 43 65 6c 6c 75 6c 61 | 72 7d 20 41 75 74 6f 6d | Cellula|r} Autom|
|00000530| 61 74 61 20 53 69 6d 75 | 6c 61 74 69 6f 6e 20 53 |ata Simu|lation S|
|00000540| 79 73 74 65 6d 3a 5c 5c | 56 65 72 73 69 6f 6e 20 |ystem:\\|Version |
|00000550| 32 2e 30 7d 0a 5c 61 75 | 74 68 6f 72 7b 4a 20 44 |2.0}.\au|thor{J D|
|00000560| 61 6e 61 20 45 63 6b 61 | 72 74 5c 5c 0a 20 20 20 |ana Ecka|rt\\. |
|00000570| 20 20 20 20 20 52 61 64 | 66 6f 72 64 20 55 6e 69 | Rad|ford Uni|
|00000580| 76 65 72 73 69 74 79 7d | 0a 5c 64 61 74 65 7b 7d |versity}|.\date{}|
|00000590| 0a 5c 6d 61 6b 65 74 69 | 74 6c 65 0a 0a 5c 73 65 |.\maketi|tle..\se|
|000005a0| 63 74 69 6f 6e 7b 49 6e | 74 72 6f 64 75 63 74 69 |ction{In|troducti|
|000005b0| 6f 6e 7d 0a 57 69 74 68 | 20 74 68 65 20 67 72 6f |on}.With| the gro|
|000005c0| 77 69 6e 67 20 70 6f 70 | 75 6c 61 72 69 74 79 20 |wing pop|ularity |
|000005d0| 6f 66 20 63 65 6c 6c 75 | 6c 61 72 20 61 75 74 6f |of cellu|lar auto|
|000005e0| 6d 61 74 61 20 69 6e 20 | 62 6f 74 68 20 72 65 63 |mata in |both rec|
|000005f0| 72 65 61 74 69 6f 6e 0a | 5c 63 69 74 65 7b 6c 69 |reation.|\cite{li|
|00000600| 66 65 7d 5c 63 69 74 65 | 7b 77 69 72 65 77 6f 72 |fe}\cite|{wirewor|
|00000610| 6c 64 7d 5c 63 69 74 65 | 7b 66 6c 75 69 64 73 7d |ld}\cite|{fluids}|
|00000620| 5c 63 69 74 65 7b 63 72 | 79 73 74 61 6c 73 7d 20 |\cite{cr|ystals} |
|00000630| 0a 61 6e 64 20 74 68 65 | 20 6d 6f 64 65 6c 69 6e |.and the| modelin|
|00000640| 67 20 6f 66 20 70 68 79 | 73 69 63 61 6c 20 0a 73 |g of phy|sical .s|
|00000650| 79 73 74 65 6d 73 5c 63 | 69 74 65 7b 74 6f 66 66 |ystems\c|ite{toff|
|00000660| 6f 6c 69 7d 5c 63 69 74 | 65 7b 57 6f 6c 66 2d 47 |oli}\cit|e{Wolf-G|
|00000670| 6c 61 64 72 6f 77 7d 5c | 63 69 74 65 7b 43 68 65 |ladrow}\|cite{Che|
|00000680| 6e 7d 5c 63 69 74 65 7b | 4c 61 76 61 6c 6c 65 65 |n}\cite{|Lavallee|
|00000690| 7d 5c 63 69 74 65 7b 4c | 69 6d 7d 2c 0a 74 68 65 |}\cite{L|im},.the|
|000006a0| 20 6e 65 65 64 20 66 6f | 72 20 61 6e 20 65 61 73 | need fo|r an eas|
|000006b0| 79 2d 2d 74 6f 2d 2d 75 | 73 65 20 73 79 73 74 65 |y--to--u|se syste|
|000006c0| 6d 20 66 6f 72 20 63 65 | 6c 6c 75 6c 61 72 20 61 |m for ce|llular a|
|000006d0| 75 74 6f 6d 61 74 61 20 | 70 72 6f 67 72 61 6d 6d |utomata |programm|
|000006e0| 69 6e 67 0a 69 73 20 67 | 72 65 61 74 65 72 20 74 |ing.is g|reater t|
|000006f0| 68 61 6e 20 65 76 65 72 | 2e 20 20 7b 5c 65 6d 20 |han ever|. {\em |
|00000700| 43 65 6c 6c 75 6c 61 72 | 7d 20 69 73 20 61 20 73 |Cellular|} is a s|
|00000710| 79 73 74 65 6d 20 64 65 | 73 69 67 6e 65 64 20 61 |ystem de|signed a|
|00000720| 6e 64 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 0a 62 |nd imple|mented.b|
|00000730| 79 20 74 68 65 20 61 75 | 74 68 6f 72 20 74 6f 20 |y the au|thor to |
|00000740| 6d 65 65 74 20 74 68 65 | 73 65 20 6e 65 65 64 73 |meet the|se needs|
|00000750| 2e 20 20 54 68 65 20 73 | 79 73 74 65 6d 20 63 6f |. The s|ystem co|
|00000760| 6e 73 69 73 74 73 20 6f | 66 3a 20 61 20 70 72 6f |nsists o|f: a pro|
|00000770| 67 72 61 6d 6d 69 6e 67 | 0a 6c 61 6e 67 75 61 67 |gramming|.languag|
|00000780| 65 2c 20 7b 5c 65 6d 20 | 43 65 6c 6c 61 6e 67 20 |e, {\em |Cellang |
|00000790| 32 2e 30 7d 5c 66 6f 6f | 74 6e 6f 74 65 7b 0a 09 |2.0}\foo|tnote{..|
|000007a0| 20 20 20 20 20 20 20 20 | 50 72 6f 6e 6f 75 6e 63 | |Pronounc|
|000007b0| 65 64 20 63 65 6c 6c 20 | 27 20 61 6e 67 2e 0a 20 |ed cell |' ang.. |
|000007c0| 20 20 20 20 20 20 20 7d | 2c 0a 61 6e 64 20 61 73 | }|,.and as|
|000007d0| 73 6f 63 69 61 74 65 64 | 20 63 6f 6d 70 69 6c 65 |sociated| compile|
|000007e0| 72 2c 20 7b 5c 74 74 20 | 63 65 6c 6c 63 7d 3b 0a |r, {\tt |cellc};.|
|000007f0| 61 6e 20 60 60 61 62 73 | 74 72 61 63 74 27 27 20 |an ``abs|tract'' |
|00000800| 76 69 72 74 75 61 6c 20 | 6d 61 63 68 69 6e 65 5c |virtual |machine\|
|00000810| 66 6f 6f 74 6e 6f 74 65 | 7b 0a 09 09 54 68 65 20 |footnote|{...The |
|00000820| 63 6f 6e 73 74 72 75 63 | 74 69 6f 6e 20 6f 66 20 |construc|tion of |
|00000830| 61 6e 20 61 63 74 75 61 | 6c 20 6d 61 63 68 69 6e |an actua|l machin|
|00000840| 65 20 65 6d 62 6f 64 79 | 69 6e 67 20 74 68 65 0a |e embody|ing the.|
|00000850| 09 09 70 65 2d 2d 73 63 | 61 6d 20 61 72 63 68 69 |..pe--sc|am archi|
|00000860| 74 65 63 74 75 72 65 20 | 69 73 20 75 6e 64 65 72 |tecture |is under|
|00000870| 20 64 65 76 65 6c 6f 70 | 6d 65 6e 74 2e 5c 63 69 | develop|ment.\ci|
|00000880| 74 65 7b 70 65 2d 73 63 | 61 6d 7d 0a 09 7d 0a 66 |te{pe-sc|am}..}.f|
|00000890| 6f 72 20 65 78 65 63 75 | 74 69 6f 6e 2c 20 7b 5c |or execu|tion, {\|
|000008a0| 74 74 20 70 65 2d 73 63 | 61 6d 7d 3b 20 61 6e 64 |tt pe-sc|am}; and|
|000008b0| 20 61 20 76 69 65 77 65 | 72 2c 20 7b 5c 74 74 20 | a viewe|r, {\tt |
|000008c0| 63 65 6c 6c 76 69 65 77 | 7d 2e 0a 43 6f 6d 70 69 |cellview|}..Compi|
|000008d0| 6c 65 64 20 7b 5c 65 6d | 20 43 65 6c 6c 61 6e 67 |led {\em| Cellang|
|000008e0| 20 32 2e 30 7d 20 70 72 | 6f 67 72 61 6d 73 20 63 | 2.0} pr|ograms c|
|000008f0| 61 6e 20 62 65 20 72 75 | 6e 0a 77 69 74 68 20 69 |an be ru|n.with i|
|00000900| 6e 70 75 74 20 70 72 6f | 76 69 64 65 64 20 61 74 |nput pro|vided at|
|00000910| 20 61 6e 79 20 73 70 65 | 63 69 66 69 65 64 20 74 | any spe|cified t|
|00000920| 69 6d 65 20 64 75 72 69 | 6e 67 20 74 68 65 20 65 |ime duri|ng the e|
|00000930| 78 65 63 75 74 69 6f 6e | 2e 20 20 54 68 65 0a 72 |xecution|. The.r|
|00000940| 65 73 75 6c 74 73 20 6f | 66 20 61 6e 20 65 78 65 |esults o|f an exe|
|00000950| 63 75 74 69 6f 6e 20 63 | 61 6e 20 65 69 74 68 65 |cution c|an eithe|
|00000960| 72 20 62 65 20 76 69 65 | 77 65 64 20 64 69 72 65 |r be vie|wed dire|
|00000970| 63 74 6c 79 20 6f 72 20 | 6f 75 74 70 75 74 20 61 |ctly or |output a|
|00000980| 73 0a 61 20 73 74 72 65 | 61 6d 20 6f 66 20 63 65 |s.a stre|am of ce|
|00000990| 6c 6c 20 6c 6f 63 61 74 | 69 6f 6e 73 20 61 6e 64 |ll locat|ions and|
|000009a0| 20 76 61 6c 75 65 73 2e | 20 20 54 68 69 73 20 73 | values.| This s|
|000009b0| 74 72 65 61 6d 20 6f 66 | 20 6f 75 74 70 75 74 0a |tream of| output.|
|000009c0| 64 61 74 61 20 63 61 6e | 20 74 68 65 6e 20 62 65 |data can| then be|
|000009d0| 20 66 65 64 20 69 6e 74 | 6f 20 7b 5c 74 74 20 63 | fed int|o {\tt c|
|000009e0| 65 6c 6c 76 69 65 77 7d | 20 66 6f 72 20 76 69 65 |ellview}| for vie|
|000009f0| 77 69 6e 67 2c 20 6f 72 | 20 69 74 20 6d 61 79 0a |wing, or| it may.|
|00000a00| 62 65 20 70 61 73 73 65 | 64 20 74 68 72 6f 75 67 |be passe|d throug|
|00000a10| 68 20 61 20 66 69 6c 74 | 65 72 20 74 68 61 74 20 |h a filt|er that |
|00000a20| 63 6f 6d 70 69 6c 65 73 | 20 73 74 61 74 69 73 74 |compiles| statist|
|00000a30| 69 63 73 2c 20 6d 61 73 | 73 61 67 65 73 20 74 68 |ics, mas|sages th|
|00000a40| 65 0a 64 61 74 61 2c 20 | 6f 72 20 6d 65 72 65 6c |e.data, |or merel|
|00000a50| 79 20 61 63 74 73 20 61 | 73 20 61 20 76 61 6c 76 |y acts a|s a valv|
|00000a60| 65 20 74 6f 20 63 6f 6e | 74 72 6f 6c 20 74 68 65 |e to con|trol the|
|00000a70| 20 66 6c 6f 77 20 6f 66 | 20 64 61 74 61 20 66 72 | flow of| data fr|
|00000a80| 6f 6d 20 74 68 65 0a 63 | 65 6c 6c 75 6c 61 72 20 |om the.c|ellular |
|00000a90| 61 75 74 6f 6d 61 74 6f | 6e 20 70 72 6f 67 72 61 |automato|n progra|
|00000aa0| 6d 20 74 6f 20 74 68 65 | 20 76 69 65 77 65 72 2e |m to the| viewer.|
|00000ab0| 20 20 54 68 69 73 20 73 | 69 6d 70 6c 65 20 55 4e | This s|imple UN|
|00000ac0| 49 58 5c 66 6f 6f 74 6e | 6f 74 65 7b 0a 20 20 20 |IX\footn|ote{. |
|00000ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 55 4e 49 | | UNI|
|00000ae0| 58 20 69 73 20 61 20 72 | 65 67 69 73 74 65 72 65 |X is a r|egistere|
|00000af0| 64 20 74 72 61 64 65 6d | 61 72 6b 20 6f 66 20 41 |d tradem|ark of A|
|00000b00| 54 5c 26 54 2e 0a 20 20 | 20 20 20 20 20 20 7d 0a |T\&T.. | }.|
|00000b10| 74 6f 6f 6c 6b 69 74 20 | 76 69 65 77 20 6f 66 20 |toolkit |view of |
|00000b20| 74 68 65 20 73 69 6d 75 | 6c 61 74 69 6f 6e 20 70 |the simu|lation p|
|00000b30| 72 6f 63 65 73 73 20 70 | 72 6f 76 69 64 65 73 20 |rocess p|rovides |
|00000b40| 67 72 65 61 74 65 72 20 | 63 6f 6e 74 72 6f 6c 0a |greater |control.|
|00000b50| 74 68 61 6e 20 73 79 73 | 74 65 6d 73 20 77 68 69 |than sys|tems whi|
|00000b60| 63 68 20 63 6f 6d 62 69 | 6e 65 20 74 68 65 20 6c |ch combi|ne the l|
|00000b70| 61 6e 67 75 61 67 65 20 | 61 6e 64 20 76 69 65 77 |anguage |and view|
|00000b80| 65 72 20 28 69 2e 65 2e | 0a 63 65 6c 6c 73 69 6d |er (i.e.|.cellsim|
|00000b90| 5c 63 69 74 65 7b 63 65 | 6c 6c 73 69 6d 7d 20 61 |\cite{ce|llsim} a|
|00000ba0| 6e 64 20 43 41 4d 2d 2d | 36 5c 63 69 74 65 7b 74 |nd CAM--|6\cite{t|
|00000bb0| 6f 66 66 6f 6c 69 7d 29 | 2e 20 20 7b 5c 65 6d 20 |offoli})|. {\em |
|00000bc0| 43 65 6c 6c 61 6e 67 20 | 32 2e 30 7d 0a 70 72 6f |Cellang |2.0}.pro|
|00000bd0| 76 69 64 65 73 20 67 72 | 65 61 74 65 72 20 66 6c |vides gr|eater fl|
|00000be0| 65 78 69 62 69 6c 69 74 | 79 2c 20 70 61 72 74 69 |exibilit|y, parti|
|00000bf0| 63 75 6c 61 72 6c 79 20 | 69 6e 20 74 68 65 20 66 |cularly |in the f|
|00000c00| 6f 72 6d 61 74 69 6f 6e | 20 6f 66 0a 6e 65 69 67 |ormation| of.neig|
|00000c10| 68 62 6f 72 68 6f 6f 64 | 73 2c 20 74 68 61 6e 20 |hborhood|s, than |
|00000c20| 64 6f 65 73 20 7b 5c 65 | 6d 20 43 61 6c 7d 20 28 |does {\e|m Cal} (|
|00000c30| 70 61 72 74 20 6f 66 20 | 74 68 65 20 7b 5c 65 6d |part of |the {\em|
|00000c40| 20 53 63 61 6d 70 65 72 | 7d 20 0a 73 79 73 74 65 | Scamper|} .syste|
|00000c50| 6d 29 5c 63 69 74 65 7b | 53 63 61 6d 70 65 72 7d |m)\cite{|Scamper}|
|00000c60| 2e 20 20 41 6e 64 20 61 | 6c 74 68 6f 75 67 68 20 |. And a|lthough |
|00000c70| 74 68 65 20 7b 5c 65 6d | 20 53 4c 41 4e 47 7d 5c |the {\em| SLANG}\|
|00000c80| 63 69 74 65 7b 53 4c 41 | 4e 47 7d 20 73 79 73 74 |cite{SLA|NG} syst|
|00000c90| 65 6d 0a 73 75 70 70 6f | 72 74 73 20 70 72 6f 62 |em.suppo|rts prob|
|00000ca0| 61 62 6c 69 73 74 69 63 | 20 70 6f 73 73 69 62 69 |ablistic| possibi|
|00000cb0| 6c 69 74 69 65 73 2c 20 | 7b 5c 65 6d 20 43 65 6c |lities, |{\em Cel|
|00000cc0| 6c 61 6e 67 20 32 2e 30 | 7d 20 69 73 20 61 20 66 |lang 2.0|} is a f|
|00000cd0| 61 72 0a 73 69 6d 70 6c | 65 72 20 6c 61 6e 67 75 |ar.simpl|er langu|
|00000ce0| 61 67 65 20 66 6f 72 20 | 63 6f 6e 73 74 72 75 63 |age for |construc|
|00000cf0| 74 69 6e 67 20 64 65 74 | 65 72 6d 69 6e 69 73 74 |ting det|erminist|
|00000d00| 69 63 20 63 65 6c 6c 75 | 6c 61 72 20 61 75 74 6f |ic cellu|lar auto|
|00000d10| 6d 61 74 61 2e 0a 0a 5c | 73 65 63 74 69 6f 6e 7b |mata...\|section{|
|00000d20| 54 68 65 20 4c 61 6e 67 | 75 61 67 65 7d 0a 0a 50 |The Lang|uage}..P|
|00000d30| 72 6f 67 72 61 6d 73 20 | 77 72 69 74 74 65 6e 20 |rograms |written |
|00000d40| 69 6e 20 7b 5c 65 6d 20 | 43 65 6c 6c 61 6e 67 20 |in {\em |Cellang |
|00000d50| 32 2e 30 7d 20 68 61 76 | 65 20 74 77 6f 20 6d 61 |2.0} hav|e two ma|
|00000d60| 69 6e 20 63 6f 6d 70 6f | 6e 65 6e 74 73 2c 20 61 |in compo|nents, a|
|00000d70| 20 63 65 6c 6c 0a 64 65 | 73 63 72 69 70 74 69 6f | cell.de|scriptio|
|00000d80| 6e 20 61 6e 64 20 61 20 | 73 65 74 20 6f 66 20 73 |n and a |set of s|
|00000d90| 74 61 74 65 6d 65 6e 74 | 73 2e 20 20 54 68 65 20 |tatement|s. The |
|00000da0| 63 65 6c 6c 20 64 65 73 | 63 72 69 70 74 69 6f 6e |cell des|cription|
|00000db0| 20 64 65 74 65 72 6d 69 | 6e 65 73 0a 68 6f 77 20 | determi|nes.how |
|00000dc0| 6d 61 6e 79 20 64 69 6d | 65 6e 73 69 6f 6e 73 20 |many dim|ensions |
|00000dd0| 74 68 65 72 65 20 61 72 | 65 2c 20 77 68 61 74 20 |there ar|e, what |
|00000de0| 66 69 65 6c 64 28 73 29 | 20 65 61 63 68 20 63 65 |field(s)| each ce|
|00000df0| 6c 6c 0a 63 6f 6e 74 61 | 69 6e 73 2c 20 61 6e 64 |ll.conta|ins, and|
|00000e00| 20 74 68 65 20 72 61 6e | 67 65 20 6f 66 20 61 73 | the ran|ge of as|
|00000e10| 73 69 67 6e 61 62 6c 65 | 20 76 61 6c 75 65 73 20 |signable| values |
|00000e20| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00000e30| 65 61 63 68 20 66 69 65 | 6c 64 2e 20 20 0a 53 74 |each fie|ld. .St|
|00000e40| 61 74 65 6d 65 6e 74 73 | 20 6f 63 63 75 72 20 69 |atements| occur i|
|00000e50| 6e 20 6f 6e 6c 79 20 74 | 77 6f 20 76 61 72 69 65 |n only t|wo varie|
|00000e60| 74 69 65 73 3a 0a 61 73 | 73 69 67 6e 6d 65 6e 74 |ties:.as|signment|
|00000e70| 20 61 6e 64 20 69 66 2e | 20 20 54 68 65 20 61 73 | and if.| The as|
|00000e80| 73 69 67 6e 6d 65 6e 74 | 0a 73 74 61 74 65 6d 65 |signment|.stateme|
|00000e90| 6e 74 20 69 73 20 75 6e | 75 73 75 61 6c 20 69 6e |nt is un|usual in|
|00000ea0| 20 74 68 61 74 20 69 74 | 20 70 72 6f 76 69 64 65 | that it| provide|
|00000eb0| 73 20 63 6f 6e 64 69 74 | 69 6f 6e 61 6c 20 61 73 |s condit|ional as|
|00000ec0| 73 69 67 6e 6d 65 6e 74 | 3b 0a 74 68 65 20 69 66 |signment|;.the if|
|00000ed0| 20 73 74 61 74 65 6d 65 | 6e 74 20 69 73 20 6f 66 | stateme|nt is of|
|00000ee0| 20 61 20 63 6f 6e 76 65 | 6e 74 69 6f 6e 61 6c 20 | a conve|ntional |
|00000ef0| 6e 61 74 75 72 65 2e 0a | 0a 54 68 65 72 65 20 69 |nature..|.There i|
|00000f00| 73 20 6f 6e 6c 79 20 6f | 6e 65 20 70 72 69 6d 69 |s only o|ne primi|
|00000f10| 74 69 76 65 20 64 61 74 | 61 20 74 79 70 65 20 69 |tive dat|a type i|
|00000f20| 6e 20 7b 5c 65 6d 20 43 | 65 6c 6c 61 6e 67 20 32 |n {\em C|ellang 2|
|00000f30| 2e 30 7d 2c 20 69 6e 74 | 65 67 65 72 2e 20 0a 56 |.0}, int|eger. .V|
|00000f40| 61 72 69 61 62 6c 65 73 | 20 61 72 65 0a 64 65 63 |ariables| are.dec|
|00000f50| 6c 61 72 65 64 20 62 79 | 20 74 68 65 69 72 20 66 |lared by| their f|
|00000f60| 69 72 73 74 20 75 73 61 | 67 65 20 77 68 69 63 68 |irst usa|ge which|
|00000f70| 20 69 73 20 75 73 75 61 | 6c 6c 79 20 61 73 20 74 | is usua|lly as t|
|00000f80| 68 65 20 6c 65 66 74 20 | 68 61 6e 64 20 73 69 64 |he left |hand sid|
|00000f90| 65 20 6f 66 20 61 6e 0a | 61 73 73 69 67 6e 6d 65 |e of an.|assignme|
|00000fa0| 6e 74 20 73 74 61 74 65 | 6d 65 6e 74 2e 20 20 43 |nt state|ment. C|
|00000fb0| 6f 6e 64 69 74 69 6f 6e | 61 6c 20 65 78 70 72 65 |ondition|al expre|
|00000fc0| 73 73 69 6f 6e 73 20 66 | 6f 6c 6c 6f 77 20 74 68 |ssions f|ollow th|
|00000fd0| 65 0a 72 75 6c 65 73 20 | 6f 66 20 7b 5c 65 6d 20 |e.rules |of {\em |
|00000fe0| 43 7d 5c 63 69 74 65 7b | 68 61 72 62 69 73 6f 6e |C}\cite{|harbison|
|00000ff0| 7d 2c 0a 74 68 75 73 20 | 30 20 76 61 6c 75 65 73 |},.thus |0 values|
|00001000| 20 63 6f 72 72 65 73 70 | 6f 6e 64 20 74 6f 20 66 | corresp|ond to f|
|00001010| 61 6c 73 65 20 61 6e 64 | 20 6e 6f 6e 2d 2d 30 20 |alse and| non--0 |
|00001020| 76 61 6c 75 65 73 20 69 | 6e 64 69 63 61 74 65 0a |values i|ndicate.|
|00001030| 74 72 75 65 2e 20 20 54 | 68 65 20 61 72 69 74 68 |true. T|he arith|
|00001040| 6d 65 74 69 63 20 61 6e | 64 20 6c 6f 67 69 63 61 |metic an|d logica|
|00001050| 6c 20 6f 70 65 72 61 74 | 6f 72 73 20 61 76 61 69 |l operat|ors avai|
|00001060| 6c 61 62 6c 65 20 61 72 | 65 3a 20 2d 2d 2c 20 2b |lable ar|e: --, +|
|00001070| 2c 20 2a 2c 20 2f 2c 0a | 5c 25 20 28 72 65 6d 61 |, *, /,.|\% (rema|
|00001080| 69 6e 64 65 72 29 2c 20 | 21 20 28 6c 6f 67 69 63 |inder), |! (logic|
|00001090| 61 6c 20 6e 6f 74 29 2c | 20 5c 26 20 28 6c 6f 67 |al not),| \& (log|
|000010a0| 69 63 61 6c 20 61 6e 64 | 29 2c 20 24 7c 24 20 28 |ical and|), $|$ (|
|000010b0| 6c 6f 67 69 63 61 6c 20 | 6f 72 29 2c 20 0a 3d 2c |logical |or), .=,|
|000010c0| 20 21 3d 2c 20 24 3c 3d | 24 20 61 6e 64 20 24 3e | !=, $<=|$ and $>|
|000010d0| 3d 24 2e 20 20 54 68 65 | 20 66 69 65 6c 64 20 76 |=$. The| field v|
|000010e0| 61 6c 75 65 73 20 6f 66 | 20 63 65 6c 6c 73 20 0a |alues of| cells .|
|000010f0| 6e 65 69 67 68 62 6f 72 | 69 6e 67 20 74 68 65 20 |neighbor|ing the |
|00001100| 0a 63 75 72 72 65 6e 74 | 20 63 65 6c 6c 20 6d 61 |.current| cell ma|
|00001110| 79 20 62 65 20 61 63 63 | 65 73 73 65 64 20 62 79 |y be acc|essed by|
|00001120| 20 70 6c 61 63 69 6e 67 | 20 74 68 65 69 72 20 72 | placing| their r|
|00001130| 65 6c 61 74 69 76 65 20 | 70 6f 73 69 74 69 6f 6e |elative |position|
|00001140| 20 77 69 74 68 69 6e 20 | 73 71 75 61 72 65 0a 62 | within |square.b|
|00001150| 72 61 63 6b 65 74 73 20 | 28 5b 20 5d 29 2c 20 66 |rackets |([ ]), f|
|00001160| 6f 6c 6c 6f 77 65 64 20 | 62 79 20 61 6e 20 6f 70 |ollowed |by an op|
|00001170| 74 69 6f 6e 61 6c 20 64 | 6f 74 20 28 2e 29 20 61 |tional d|ot (.) a|
|00001180| 6e 64 20 66 69 65 6c 64 | 20 6e 61 6d 65 2e 0a 0a |nd field| name...|
|00001190| 54 68 69 73 20 76 65 72 | 73 69 6f 6e 20 28 32 2e |This ver|sion (2.|
|000011a0| 30 29 20 69 73 20 61 6e | 20 69 6e 63 6f 6d 70 61 |0) is an| incompa|
|000011b0| 74 69 62 6c 65 20 75 70 | 67 72 61 64 65 20 74 6f |tible up|grade to|
|000011c0| 20 74 68 65 20 70 72 65 | 76 69 6f 75 73 20 0a 76 | the pre|vious .v|
|000011d0| 65 72 73 69 6f 6e 20 28 | 31 2e 30 29 2e 5c 63 69 |ersion (|1.0).\ci|
|000011e0| 74 65 7b 63 65 6c 6c 61 | 6e 67 20 31 2e 30 7d 0a |te{cella|ng 1.0}.|
|000011f0| 54 68 65 20 64 69 66 66 | 65 72 65 6e 63 65 73 20 |The diff|erences |
|00001200| 61 72 65 20 70 72 69 6d | 61 72 69 6c 79 3a 0a 5c |are prim|arily:.\|
|00001210| 62 65 67 69 6e 7b 69 74 | 65 6d 69 7a 65 7d 0a 0a |begin{it|emize}..|
|00001220| 5c 69 74 65 6d 0a 7b 5c | 65 6d 20 43 65 6c 6c 61 |\item.{\|em Cella|
|00001230| 6e 67 20 32 2e 30 7d 20 | 64 6f 65 73 20 4e 4f 54 |ng 2.0} |does NOT|
|00001240| 20 70 65 72 6d 69 74 20 | 74 68 65 20 73 70 65 63 | permit |the spec|
|00001250| 69 66 69 63 61 74 69 6f | 6e 20 6f 66 20 64 69 6d |ificatio|n of dim|
|00001260| 65 6e 73 69 6f 6e 20 69 | 6e 64 65 78 20 72 61 6e |ension i|ndex ran|
|00001270| 67 65 73 0a 28 77 68 65 | 72 65 61 73 20 7b 5c 65 |ges.(whe|reas {\e|
|00001280| 6d 20 43 65 6c 6c 61 6e | 67 20 31 2e 30 7d 20 64 |m Cellan|g 1.0} d|
|00001290| 69 64 29 3b 0a 0a 5c 69 | 74 65 6d 0a 7b 5c 65 6d |id);..\i|tem.{\em|
|000012a0| 20 43 65 6c 6c 61 6e 67 | 20 32 2e 30 7d 20 64 6f | Cellang| 2.0} do|
|000012b0| 65 73 20 4e 4f 54 20 70 | 65 72 6d 69 74 20 74 68 |es NOT p|ermit th|
|000012c0| 65 20 75 73 65 20 6f 66 | 20 64 69 6d 65 6e 73 69 |e use of| dimensi|
|000012d0| 6f 6e 20 6e 61 6d 65 73 | 20 74 6f 20 64 65 74 65 |on names| to dete|
|000012e0| 72 6d 69 6e 65 20 61 0a | 63 65 6c 6c 27 73 20 65 |rmine a.|cell's e|
|000012f0| 78 61 63 74 20 6c 6f 63 | 61 74 69 6f 6e 20 77 69 |xact loc|ation wi|
|00001300| 74 68 69 6e 20 74 68 65 | 20 75 6e 69 76 65 72 73 |thin the| univers|
|00001310| 65 20 28 61 73 20 64 69 | 64 20 7b 5c 65 6d 20 43 |e (as di|d {\em C|
|00001320| 65 6c 6c 61 6e 67 20 31 | 2e 30 7d 29 3b 0a 0a 5c |ellang 1|.0});..\|
|00001330| 69 74 65 6d 0a 7b 5c 65 | 6d 20 43 65 6c 6c 61 6e |item.{\e|m Cellan|
|00001340| 67 20 32 2e 30 7d 20 44 | 4f 45 53 20 61 6c 6c 6f |g 2.0} D|OES allo|
|00001350| 77 20 6d 75 6c 74 69 70 | 6c 65 20 66 69 65 6c 64 |w multip|le field|
|00001360| 73 20 74 6f 20 62 65 20 | 61 73 73 6f 63 69 61 74 |s to be |associat|
|00001370| 65 64 20 77 69 74 68 20 | 65 61 63 68 20 63 65 6c |ed with |each cel|
|00001380| 6c 0a 6f 66 20 74 68 65 | 20 75 6e 69 76 65 72 73 |l.of the| univers|
|00001390| 65 20 28 75 6e 6c 69 6b | 65 20 7b 5c 65 6d 20 43 |e (unlik|e {\em C|
|000013a0| 65 6c 6c 61 6e 67 20 31 | 2e 30 7d 20 77 68 69 63 |ellang 1|.0} whic|
|000013b0| 68 20 68 61 64 20 6f 6e | 6c 79 20 6f 6e 65 20 66 |h had on|ly one f|
|000013c0| 69 65 6c 64 20 70 65 72 | 20 63 65 6c 6c 29 3b 0a |ield per| cell);.|
|000013d0| 0a 5c 69 74 65 6d 0a 7b | 5c 65 6d 20 43 65 6c 6c |.\item.{|\em Cell|
|000013e0| 61 6e 67 20 32 2e 30 7d | 20 52 45 51 55 49 52 45 |ang 2.0}| REQUIRE|
|000013f0| 53 20 61 20 72 61 6e 67 | 65 20 6f 66 20 6c 65 67 |S a rang|e of leg|
|00001400| 61 6c 20 76 61 6c 75 65 | 73 20 62 65 20 67 69 76 |al value|s be giv|
|00001410| 65 6e 20 66 6f 72 20 61 | 6c 6c 20 63 65 6c 6c 20 |en for a|ll cell |
|00001420| 66 69 65 6c 64 73 20 0a | 28 77 68 65 72 65 61 73 |fields .|(whereas|
|00001430| 20 74 68 69 73 20 77 61 | 73 20 6f 70 74 69 6f 6e | this wa|s option|
|00001440| 61 6c 20 69 6e 20 7b 5c | 65 6d 20 43 65 6c 6c 61 |al in {\|em Cella|
|00001450| 6e 67 20 31 2e 30 7d 29 | 2e 0a 0a 5c 65 6e 64 7b |ng 1.0})|...\end{|
|00001460| 69 74 65 6d 69 7a 65 7d | 0a 0a 5c 62 65 67 69 6e |itemize}|..\begin|
|00001470| 7b 66 69 67 75 72 65 7d | 5b 74 5d 0a 5c 62 65 67 |{figure}|[t].\beg|
|00001480| 69 6e 7b 63 65 6e 74 65 | 72 7d 0a 5c 62 65 67 69 |in{cente|r}.\begi|
|00001490| 6e 7b 76 65 72 62 61 74 | 69 6d 7d 0a 32 20 64 69 |n{verbat|im}.2 di|
|000014a0| 6d 65 6e 73 69 6f 6e 73 | 20 6f 66 20 30 2e 2e 31 |mensions| of 0..1|
|000014b0| 0a 0a 73 75 6d 20 3a 3d | 20 5b 30 2c 20 31 5d 20 |..sum :=| [0, 1] |
|000014c0| 2b 20 5b 31 2c 20 31 5d | 20 2b 20 5b 31 2c 20 30 |+ [1, 1]| + [1, 0|
|000014d0| 5d 20 2b 20 5b 2d 31 2c | 20 31 5d 20 2b 20 5b 2d |] + [-1,| 1] + [-|
|000014e0| 31 2c 20 30 5d 20 2b 20 | 0a 20 20 20 20 20 20 20 |1, 0] + |. |
|000014f0| 5b 2d 31 2c 20 2d 31 5d | 20 2b 20 5b 30 2c 20 2d |[-1, -1]| + [0, -|
|00001500| 31 5d 20 2b 20 5b 31 2c | 20 2d 31 5d 0a 0a 63 65 |1] + [1,| -1]..ce|
|00001510| 6c 6c 20 3a 3d 20 31 20 | 77 68 65 6e 20 28 73 75 |ll := 1 |when (su|
|00001520| 6d 20 3d 20 32 20 26 20 | 63 65 6c 6c 20 3d 20 31 |m = 2 & |cell = 1|
|00001530| 29 20 7c 20 73 75 6d 20 | 3d 20 33 0a 20 20 20 20 |) | sum |= 3. |
|00001540| 20 3a 3d 20 30 20 6f 74 | 68 65 72 77 69 73 65 0a | := 0 ot|herwise.|
|00001550| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0a 5c |\end{ver|batim}.\|
|00001560| 65 6e 64 7b 63 65 6e 74 | 65 72 7d 0a 5c 63 61 70 |end{cent|er}.\cap|
|00001570| 74 69 6f 6e 7b 54 68 65 | 20 67 61 6d 65 20 6f 66 |tion{The| game of|
|00001580| 20 4c 69 66 65 7d 0a 5c | 6c 61 62 65 6c 7b 73 69 | Life}.\|label{si|
|00001590| 6d 70 6c 65 20 6c 69 66 | 65 7d 0a 5c 65 6e 64 7b |mple lif|e}.\end{|
|000015a0| 66 69 67 75 72 65 7d 0a | 0a 54 68 65 20 67 61 6d |figure}.|.The gam|
|000015b0| 65 20 6f 66 20 4c 69 66 | 65 2c 20 70 6f 70 75 6c |e of Lif|e, popul|
|000015c0| 61 72 69 7a 65 64 20 62 | 79 20 47 61 72 64 65 6e |arized b|y Garden|
|000015d0| 65 72 5c 63 69 74 65 7b | 6c 69 66 65 7d 2c 0a 64 |er\cite{|life},.d|
|000015e0| 65 6d 6f 6e 73 74 72 61 | 74 65 73 20 6d 61 6e 79 |emonstra|tes many|
|000015f0| 20 6f 66 20 74 68 65 20 | 66 65 61 74 75 72 65 73 | of the |features|
|00001600| 20 6f 66 20 7b 5c 65 6d | 20 43 65 6c 6c 61 6e 67 | of {\em| Cellang|
|00001610| 20 32 2e 30 7d 2e 20 20 | 0a 46 69 67 75 72 65 7e | 2.0}. |.Figure~|
|00001620| 5c 72 65 66 7b 73 69 6d | 70 6c 65 20 6c 69 66 65 |\ref{sim|ple life|
|00001630| 7d 0a 73 68 6f 77 73 20 | 74 68 65 20 74 68 69 73 |}.shows |the this|
|00001640| 20 70 72 6f 62 6c 65 6d | 2e 20 20 4e 6f 74 65 0a | problem|. Note.|
|00001650| 74 68 61 74 20 74 68 65 | 20 75 6e 69 76 65 72 73 |that the| univers|
|00001660| 65 20 6f 66 20 63 65 6c | 6c 73 20 69 73 20 32 2d |e of cel|ls is 2-|
|00001670| 2d 64 69 6d 65 6e 73 69 | 6f 6e 61 6c 20 65 61 63 |-dimensi|onal eac|
|00001680| 68 20 68 61 76 69 6e 67 | 20 65 69 74 68 65 72 20 |h having| either |
|00001690| 61 20 30 20 6f 72 0a 31 | 20 76 61 6c 75 65 2e 20 |a 0 or.1| value. |
|000016a0| 20 43 6f 6d 6d 65 6e 74 | 73 20 62 65 67 69 6e 0a | Comment|s begin.|
|000016b0| 77 69 74 68 20 61 20 73 | 68 61 72 70 20 28 5c 23 |with a s|harp (\#|
|000016c0| 29 20 61 6e 64 20 63 6f | 6e 74 69 6e 75 65 20 74 |) and co|ntinue t|
|000016d0| 6f 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 61 |o the en|d of tha|
|000016e0| 74 20 6c 69 6e 65 2e 20 | 20 54 68 65 20 70 72 65 |t line. | The pre|
|000016f0| 64 65 66 69 6e 65 64 20 | 76 61 72 69 61 62 6c 65 |defined |variable|
|00001700| 0a 7b 5c 74 74 20 63 65 | 6c 6c 7d 20 69 73 20 73 |.{\tt ce|ll} is s|
|00001710| 70 65 63 69 61 6c 20 61 | 73 20 69 74 20 72 65 66 |pecial a|s it ref|
|00001720| 65 72 73 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |ers to t|he curre|
|00001730| 6e 74 20 63 65 6c 6c 20 | 6f 66 20 74 68 65 20 75 |nt cell |of the u|
|00001740| 6e 69 76 65 72 73 65 20 | 75 6e 64 65 72 20 0a 63 |niverse |under .c|
|00001750| 6f 6e 73 69 64 65 72 61 | 74 69 6f 6e 2e 0a 41 73 |onsidera|tion..As|
|00001760| 73 69 67 6e 6d 65 6e 74 | 20 74 6f 20 74 68 65 20 |signment| to the |
|00001770| 76 61 72 69 61 62 6c 65 | 20 7b 5c 74 74 20 63 65 |variable| {\tt ce|
|00001780| 6c 6c 7d 20 69 73 20 74 | 68 65 20 6f 6e 6c 79 20 |ll} is t|he only |
|00001790| 77 61 79 20 69 6e 20 77 | 68 69 63 68 20 74 68 65 |way in w|hich the|
|000017a0| 20 76 61 6c 75 65 20 0a | 6f 66 20 74 68 65 20 63 | value .|of the c|
|000017b0| 75 72 72 65 6e 74 20 63 | 65 6c 6c 20 28 6f 72 20 |urrent c|ell (or |
|000017c0| 6f 6e 65 20 6f 66 20 69 | 74 73 20 66 69 65 6c 64 |one of i|ts field|
|000017d0| 73 29 0a 63 61 6e 20 62 | 65 20 61 6c 74 65 72 65 |s).can b|e altere|
|000017e0| 64 2e 20 20 46 75 72 74 | 68 65 72 6d 6f 72 65 2c |d. Furt|hermore,|
|000017f0| 20 74 68 65 20 6e 65 77 | 20 76 61 6c 75 65 20 6f | the new| value o|
|00001800| 66 20 7b 5c 74 74 20 63 | 65 6c 6c 7d 20 64 6f 65 |f {\tt c|ell} doe|
|00001810| 73 6e 27 74 20 74 61 6b | 65 20 65 66 66 65 63 74 |sn't tak|e effect|
|00001820| 0a 75 6e 74 69 6c 20 74 | 68 65 20 62 65 67 69 6e |.until t|he begin|
|00001830| 6e 69 6e 67 20 6f 66 20 | 74 68 65 20 6e 65 78 74 |ning of |the next|
|00001840| 20 63 79 63 6c 65 2e 20 | 20 4e 6f 74 69 63 65 20 | cycle. | Notice |
|00001850| 74 68 61 74 20 74 68 65 | 20 73 74 61 6e 64 61 72 |that the| standar|
|00001860| 64 20 4d 6f 6f 72 65 20 | 0a 6e 65 69 67 68 62 6f |d Moore |.neighbo|
|00001870| 72 68 6f 6f 64 20 75 73 | 65 64 20 62 79 20 74 68 |rhood us|ed by th|
|00001880| 65 0a 67 61 6d 65 20 6f | 66 20 4c 69 66 65 20 6d |e.game o|f Life m|
|00001890| 75 73 74 20 62 65 20 67 | 69 76 65 6e 20 62 79 20 |ust be g|iven by |
|000018a0| 72 65 6c 61 74 69 76 65 | 20 69 6e 64 65 78 69 6e |relative| indexin|
|000018b0| 67 2e 5c 66 6f 6f 74 6e | 6f 74 65 7b 0a 20 20 20 |g.\footn|ote{. |
|000018c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 52 65 6c | | Rel|
|000018d0| 61 74 69 76 65 20 69 6e | 64 65 78 69 6e 67 20 73 |ative in|dexing s|
|000018e0| 70 65 63 69 66 69 65 73 | 20 61 20 63 65 6c 6c 20 |pecifies| a cell |
|000018f0| 72 65 6c 61 74 69 76 65 | 20 74 6f 20 74 68 65 0a |relative| to the.|
|00001900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001910| 63 75 72 72 65 6e 74 20 | 63 65 6c 6c 2e 20 20 54 |current |cell. T|
|00001920| 68 75 73 20 74 68 65 20 | 72 65 6c 61 74 69 76 65 |hus the |relative|
|00001930| 20 69 6e 64 65 78 20 60 | 60 5b 2d 31 2c 20 31 5d | index `|`[-1, 1]|
|00001940| 27 27 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |''. | |
|00001950| 20 20 20 72 65 66 65 72 | 73 20 74 6f 20 74 68 65 | refer|s to the|
|00001960| 20 62 6f 72 64 65 72 69 | 6e 67 20 6e 6f 72 74 68 | borderi|ng north|
|00001970| 77 65 73 74 20 63 65 6c | 6c 2e 0a 20 20 20 20 20 |west cel|l.. |
|00001980| 20 20 20 7d 0a 57 68 69 | 6c 65 20 72 65 6c 61 74 | }.Whi|le relat|
|00001990| 69 76 65 20 69 6e 64 65 | 78 69 6e 67 20 6d 61 79 |ive inde|xing may|
|000019a0| 20 73 65 65 6d 20 63 75 | 6d 62 65 72 73 6f 6d 65 | seem cu|mbersome|
|000019b0| 2c 0a 69 74 20 70 72 6f | 76 69 64 65 73 20 67 72 |,.it pro|vides gr|
|000019c0| 65 61 74 20 66 6c 65 78 | 69 62 69 6c 69 74 79 2e |eat flex|ibility.|
|000019d0| 20 20 54 68 65 20 6f 6e | 6c 79 20 70 72 61 63 74 | The on|ly pract|
|000019e0| 69 63 61 6c 20 72 65 73 | 74 72 69 63 74 69 6f 6e |ical res|triction|
|000019f0| 20 6f 6e 20 72 65 6c 61 | 74 69 76 65 20 0a 69 6e | on rela|tive .in|
|00001a00| 64 69 63 65 73 20 69 73 | 20 74 68 61 74 20 74 68 |dices is| that th|
|00001a10| 65 79 20 62 65 20 69 6e | 74 65 67 65 72 20 63 6f |ey be in|teger co|
|00001a20| 6e 73 74 61 6e 74 73 2e | 0a 0a 42 65 63 61 75 73 |nstants.|..Becaus|
|00001a30| 65 20 74 68 65 72 65 20 | 61 72 65 20 6e 6f 20 6c |e there |are no l|
|00001a40| 61 6e 67 75 61 67 65 20 | 73 70 65 63 69 66 69 63 |anguage |specific|
|00001a50| 20 6c 69 6d 69 74 73 20 | 6f 6e 20 74 68 65 20 73 | limits |on the s|
|00001a60| 69 7a 65 20 6f 66 20 72 | 65 6c 61 74 69 76 65 20 |ize of r|elative |
|00001a70| 69 6e 64 69 63 65 73 2c | 0a 69 74 20 69 73 20 70 |indices,|.it is p|
|00001a80| 6f 73 73 69 62 6c 65 20 | 74 6f 20 65 78 70 6c 6f |ossible |to explo|
|00001a90| 72 65 20 61 20 77 69 64 | 65 20 72 61 6e 67 65 20 |re a wid|e range |
|00001aa0| 6f 66 20 6e 65 69 67 68 | 62 6f 72 68 6f 6f 64 73 |of neigh|borhoods|
|00001ab0| 2e 0a 4e 65 69 67 68 62 | 6f 72 68 6f 6f 64 73 20 |..Neighb|orhoods |
|00001ac0| 77 68 69 63 68 20 75 73 | 65 20 66 69 65 6c 64 20 |which us|e field |
|00001ad0| 76 61 6c 75 65 73 20 7b | 5c 65 6d 20 6e 7d 20 63 |values {|\em n} c|
|00001ae0| 65 6c 6c 73 20 61 77 61 | 79 20 61 72 65 20 70 6f |ells awa|y are po|
|00001af0| 73 73 69 62 6c 65 20 0a | 66 6f 72 20 61 6e 79 20 |ssible .|for any |
|00001b00| 76 61 6c 75 65 20 6f 66 | 20 69 6e 74 65 67 65 72 |value of| integer|
|00001b10| 20 76 61 6c 75 65 20 7b | 5c 65 6d 20 6e 7d 2e 0a | value {|\em n}..|
|00001b20| 49 6e 20 61 64 64 69 74 | 69 6f 6e 2c 20 74 68 65 |In addit|ion, the|
|00001b30| 72 65 20 69 73 20 6e 6f | 20 72 65 73 74 72 69 63 |re is no| restric|
|00001b40| 74 69 6f 6e 20 74 68 61 | 74 20 6e 65 69 67 68 62 |tion tha|t neighb|
|00001b50| 6f 72 68 6f 6f 64 73 0a | 62 65 20 73 79 6d 6d 65 |orhoods.|be symme|
|00001b60| 74 72 69 63 61 6c 20 6f | 72 20 68 61 76 65 20 61 |trical o|r have a|
|00001b70| 6e 79 20 6f 74 68 65 72 | 20 73 70 65 63 69 61 6c |ny other| special|
|00001b80| 20 74 6f 70 6f 67 72 61 | 70 68 69 63 61 6c 20 70 | topogra|phical p|
|00001b90| 72 6f 70 65 72 74 69 65 | 73 2e 0a 0a 41 6e 20 61 |ropertie|s...An a|
|00001ba0| 64 64 69 74 69 6f 6e 61 | 6c 20 70 72 65 64 65 66 |dditiona|l predef|
|00001bb0| 69 6e 65 64 20 76 61 72 | 69 61 62 6c 65 2c 0a 7b |ined var|iable,.{|
|00001bc0| 5c 74 74 20 74 69 6d 65 | 7d 2c 20 63 61 6e 20 6f |\tt time|}, can o|
|00001bd0| 6e 6c 79 20 61 70 70 65 | 61 72 20 77 69 74 68 69 |nly appe|ar withi|
|00001be0| 6e 20 65 78 70 72 65 73 | 73 69 6f 6e 73 2e 0a 54 |n expres|sions..T|
|00001bf0| 68 75 73 20 61 20 70 72 | 6f 67 72 61 6d 20 63 61 |hus a pr|ogram ca|
|00001c00| 6e 20 6e 6f 74 20 63 68 | 61 6e 67 65 20 7b 5c 74 |n not ch|ange {\t|
|00001c10| 74 20 74 69 6d 65 7d 2c | 20 62 75 74 20 7b 5c 74 |t time},| but {\t|
|00001c20| 74 20 74 69 6d 65 7d 20 | 63 61 6e 20 62 65 20 75 |t time} |can be u|
|00001c30| 73 65 64 20 74 6f 20 0a | 69 6e 66 6c 75 65 6e 63 |sed to .|influenc|
|00001c40| 65 0a 63 6f 6d 70 75 74 | 61 74 69 6f 6e 2e 20 20 |e.comput|ation. |
|00001c50| 54 68 65 20 69 6e 69 74 | 69 61 6c 20 76 61 6c 75 |The init|ial valu|
|00001c60| 65 20 6f 66 20 7b 5c 74 | 74 20 74 69 6d 65 7d 20 |e of {\t|t time} |
|00001c70| 69 73 20 30 20 61 6e 64 | 20 69 74 20 69 73 20 69 |is 0 and| it is i|
|00001c80| 6e 63 72 65 6d 65 6e 74 | 65 64 20 62 79 20 31 20 |ncrement|ed by 1 |
|00001c90| 0a 65 61 63 68 20 74 69 | 6d 65 20 61 6c 6c 20 74 |.each ti|me all t|
|00001ca0| 68 65 20 63 65 6c 6c 73 | 20 6f 66 20 74 68 65 20 |he cells| of the |
|00001cb0| 75 6e 69 76 65 72 73 65 | 20 68 61 76 65 20 62 65 |universe| have be|
|00001cc0| 65 6e 20 75 70 64 61 74 | 65 64 2e 0a 54 68 69 73 |en updat|ed..This|
|00001cd0| 20 66 65 61 74 75 72 65 | 20 61 6c 6c 6f 77 73 20 | feature| allows |
|00001ce0| 6e 65 69 67 68 62 6f 72 | 68 6f 6f 64 73 20 77 68 |neighbor|hoods wh|
|00001cf0| 69 63 68 0a 61 72 65 20 | 74 69 6d 65 20 64 65 70 |ich.are |time dep|
|00001d00| 65 6e 64 65 6e 74 2e 20 | 20 46 69 67 75 72 65 7e |endent. | Figure~|
|00001d10| 5c 72 65 66 7b 74 69 6d | 65 20 64 65 70 65 6e 64 |\ref{tim|e depend|
|00001d20| 65 6e 74 20 6c 69 66 65 | 7d 20 64 65 6d 6f 6e 73 |ent life|} demons|
|00001d30| 74 72 61 74 65 73 20 74 | 68 69 73 0a 70 6f 73 73 |trates t|his.poss|
|00001d40| 69 62 69 6c 69 74 79 2e | 20 20 53 69 6d 69 6c 61 |ibility.| Simila|
|00001d50| 72 6c 79 20 69 74 20 69 | 73 20 61 6c 73 6f 20 70 |rly it i|s also p|
|00001d60| 6f 73 73 69 62 6c 65 20 | 74 6f 20 68 61 76 65 20 |ossible |to have |
|00001d70| 63 65 6c 6c 20 66 69 65 | 6c 64 20 76 61 6c 75 65 |cell fie|ld value|
|00001d80| 73 20 63 68 61 6e 67 65 | 0a 77 69 74 68 20 64 65 |s change|.with de|
|00001d90| 70 65 6e 64 65 6e 63 65 | 20 75 70 6f 6e 20 74 69 |pendence| upon ti|
|00001da0| 6d 65 2e 0a 54 68 65 20 | 74 69 6d 65 20 64 65 70 |me..The |time dep|
|00001db0| 65 6e 64 65 6e 74 20 6e | 65 69 67 68 62 6f 72 68 |endent n|eighborh|
|00001dc0| 6f 6f 64 73 20 63 61 6e | 20 62 65 20 75 73 65 64 |oods can| be used|
|00001dd0| 20 74 6f 20 72 65 70 72 | 65 73 65 6e 74 20 62 6f | to repr|esent bo|
|00001de0| 74 68 0a 68 79 62 72 69 | 64 20 6e 65 69 67 68 62 |th.hybri|d neighb|
|00001df0| 6f 72 68 6f 6f 64 73 0a | 6f 72 20 69 6e 20 73 69 |orhoods.|or in si|
|00001e00| 74 75 61 74 69 6f 6e 73 | 20 77 68 65 72 65 20 74 |tuations| where t|
|00001e10| 68 65 20 70 68 79 73 69 | 63 61 6c 20 73 79 73 74 |he physi|cal syst|
|00001e20| 65 6d 20 62 65 68 61 76 | 65 73 0a 61 63 63 6f 72 |em behav|es.accor|
|00001e30| 64 69 6e 67 20 74 6f 20 | 64 69 66 66 65 72 65 6e |ding to |differen|
|00001e40| 74 20 72 75 6c 65 73 2f | 6e 65 69 67 68 62 6f 72 |t rules/|neighbor|
|00001e50| 68 6f 6f 64 73 20 61 73 | 20 69 74 20 61 67 65 73 |hoods as| it ages|
|00001e60| 2e 0a 0a 5c 62 65 67 69 | 6e 7b 66 69 67 75 72 65 |...\begi|n{figure|
|00001e70| 7d 5b 74 5d 0a 5c 62 65 | 67 69 6e 7b 63 65 6e 74 |}[t].\be|gin{cent|
|00001e80| 65 72 7d 0a 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 |er}.\beg|in{verba|
|00001e90| 74 69 6d 7d 0a 32 20 64 | 69 6d 65 6e 73 69 6f 6e |tim}.2 d|imension|
|00001ea0| 73 20 6f 66 20 30 2e 2e | 31 0a 0a 69 66 20 74 69 |s of 0..|1..if ti|
|00001eb0| 6d 65 20 25 20 32 20 3d | 20 30 20 74 68 65 6e 0a |me % 2 =| 0 then.|
|00001ec0| 20 20 20 73 75 6d 20 3a | 3d 20 5b 30 2c 20 31 5d | sum :|= [0, 1]|
|00001ed0| 20 2b 20 5b 31 2c 20 30 | 5d 20 2b 20 5b 2d 31 2c | + [1, 0|] + [-1,|
|00001ee0| 20 30 5d 20 2b 20 5b 30 | 2c 20 2d 31 5d 0a 65 6c | 0] + [0|, -1].el|
|00001ef0| 73 65 0a 20 20 20 73 75 | 6d 20 3a 3d 20 5b 31 2c |se. su|m := [1,|
|00001f00| 20 31 5d 20 2b 20 5b 2d | 31 2c 20 31 5d 20 2b 20 | 1] + [-|1, 1] + |
|00001f10| 5b 2d 31 2c 20 2d 31 5d | 20 2b 20 5b 31 2c 20 2d |[-1, -1]| + [1, -|
|00001f20| 31 5d 0a 65 6e 64 0a 0a | 63 65 6c 6c 20 3a 3d 20 |1].end..|cell := |
|00001f30| 31 20 77 68 65 6e 20 28 | 73 75 6d 20 3d 20 32 20 |1 when (|sum = 2 |
|00001f40| 7c 20 73 75 6d 20 3d 20 | 33 29 20 26 20 63 65 6c || sum = |3) & cel|
|00001f50| 6c 20 3d 20 31 0a 20 20 | 20 20 20 3a 3d 20 31 20 |l = 1. | := 1 |
|00001f60| 77 68 65 6e 20 73 75 6d | 20 3d 20 33 20 26 20 63 |when sum| = 3 & c|
|00001f70| 65 6c 6c 20 3d 20 30 0a | 20 20 20 20 20 3a 3d 20 |ell = 0.| := |
|00001f80| 30 20 6f 74 68 65 72 77 | 69 73 65 0a 5c 65 6e 64 |0 otherw|ise.\end|
|00001f90| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 5c 65 6e 64 7b |{verbati|m}.\end{|
|00001fa0| 63 65 6e 74 65 72 7d 0a | 5c 63 61 70 74 69 6f 6e |center}.|\caption|
|00001fb0| 7b 41 6e 20 61 6c 74 65 | 72 6e 61 74 65 20 67 61 |{An alte|rnate ga|
|00001fc0| 6d 65 20 6f 66 20 6c 69 | 66 65 20 77 69 74 68 20 |me of li|fe with |
|00001fd0| 61 20 74 69 6d 65 20 64 | 65 70 65 6e 64 65 6e 74 |a time d|ependent|
|00001fe0| 20 28 68 79 62 72 69 64 | 29 20 6e 65 69 67 68 62 | (hybrid|) neighb|
|00001ff0| 6f 72 68 6f 6f 64 7d 0a | 5c 6c 61 62 65 6c 7b 74 |orhood}.|\label{t|
|00002000| 69 6d 65 20 64 65 70 65 | 6e 64 65 6e 74 20 6c 69 |ime depe|ndent li|
|00002010| 66 65 7d 0a 5c 65 6e 64 | 7b 66 69 67 75 72 65 7d |fe}.\end|{figure}|
|00002020| 0a 0a 5c 62 65 67 69 6e | 7b 66 69 67 75 72 65 7d |..\begin|{figure}|
|00002030| 5b 74 5d 0a 5c 62 65 67 | 69 6e 7b 63 65 6e 74 65 |[t].\beg|in{cente|
|00002040| 72 7d 0a 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |r}.\begi|n{verbat|
|00002050| 69 6d 7d 0a 32 20 64 69 | 6d 65 6e 73 69 6f 6e 73 |im}.2 di|mensions|
|00002060| 20 6f 66 0a 20 20 20 20 | 20 20 20 20 78 2c 20 79 | of. | x, y|
|00002070| 20 6f 66 20 30 2e 2e 32 | 35 35 0a 65 6e 64 0a 0a | of 0..2|55.end..|
|00002080| 63 65 6c 6c 2e 78 20 3a | 3d 20 28 5b 31 2c 20 30 |cell.x :|= ([1, 0|
|00002090| 5d 2e 79 20 2b 20 5b 30 | 2c 20 31 5d 2e 79 20 2b |].y + [0|, 1].y +|
|000020a0| 20 5b 2d 31 2c 20 30 5d | 2e 79 20 2b 20 5b 30 2c | [-1, 0]|.y + [0,|
|000020b0| 20 2d 31 5d 2e 79 29 20 | 25 20 32 35 36 20 0a 20 | -1].y) |% 256 . |
|000020c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 77 | | w|
|000020d0| 68 65 6e 20 74 69 6d 65 | 20 25 20 32 0a 0a 63 65 |hen time| % 2..ce|
|000020e0| 6c 6c 2e 79 20 3a 3d 20 | 28 5b 2d 31 2c 20 31 5d |ll.y := |([-1, 1]|
|000020f0| 2e 78 20 2b 20 5b 31 2c | 20 31 5d 2e 78 20 2b 20 |.x + [1,| 1].x + |
|00002100| 5b 2d 31 2c 20 2d 31 5d | 2e 78 20 2b 20 5b 31 2c |[-1, -1]|.x + [1,|
|00002110| 20 2d 31 5d 2e 78 29 20 | 25 20 32 35 36 20 0a 20 | -1].x) |% 256 . |
|00002120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 77 | | w|
|00002130| 68 65 6e 20 28 74 69 6d | 65 20 2b 20 31 29 20 25 |hen (tim|e + 1) %|
|00002140| 20 32 0a 5c 65 6e 64 7b | 76 65 72 62 61 74 69 6d | 2.\end{|verbatim|
|00002150| 7d 0a 5c 65 6e 64 7b 63 | 65 6e 74 65 72 7d 0a 5c |}.\end{c|enter}.\|
|00002160| 63 61 70 74 69 6f 6e 7b | 41 6e 20 65 78 61 6d 70 |caption{|An examp|
|00002170| 6c 65 20 70 72 6f 67 72 | 61 6d 20 77 69 74 68 20 |le progr|am with |
|00002180| 6d 75 6c 74 69 2d 2d 66 | 69 65 6c 64 20 63 65 6c |multi--f|ield cel|
|00002190| 6c 73 2e 7d 0a 5c 6c 61 | 62 65 6c 7b 6d 75 6c 74 |ls.}.\la|bel{mult|
|000021a0| 69 70 6c 65 20 63 65 6c | 6c 20 66 69 65 6c 64 73 |iple cel|l fields|
|000021b0| 7d 0a 5c 65 6e 64 7b 66 | 69 67 75 72 65 7d 0a 0a |}.\end{f|igure}..|
|000021c0| 7b 5c 65 6d 20 43 65 6c | 6c 61 6e 67 20 32 2e 30 |{\em Cel|lang 2.0|
|000021d0| 7d 20 70 72 6f 67 72 61 | 6d 73 20 6d 61 79 20 61 |} progra|ms may a|
|000021e0| 6c 73 6f 20 63 6f 6e 74 | 61 69 6e 20 6d 6f 72 65 |lso cont|ain more|
|000021f0| 20 74 68 61 6e 20 61 20 | 73 69 6e 67 6c 65 20 66 | than a |single f|
|00002200| 69 65 6c 64 0a 70 65 72 | 20 63 65 6c 6c 2e 20 20 |ield.per| cell. |
|00002210| 54 68 65 20 70 72 6f 67 | 72 61 6d 20 67 69 76 65 |The prog|ram give|
|00002220| 6e 20 69 6e 20 46 69 67 | 75 72 65 7e 5c 72 65 66 |n in Fig|ure~\ref|
|00002230| 7b 6d 75 6c 74 69 70 6c | 65 20 63 65 6c 6c 20 66 |{multipl|e cell f|
|00002240| 69 65 6c 64 73 7d 20 73 | 68 6f 77 73 20 0a 61 20 |ields} s|hows .a |
|00002250| 70 72 6f 67 72 61 6d 20 | 77 69 74 68 20 33 20 66 |program |with 3 f|
|00002260| 69 65 6c 64 73 20 70 65 | 72 20 63 65 6c 6c 2e 0a |ields pe|r cell..|
|00002270| 4e 6f 74 65 20 74 68 61 | 74 20 74 68 65 20 64 6f |Note tha|t the do|
|00002280| 74 20 6e 6f 74 61 74 69 | 6f 6e 20 66 61 6d 69 6c |t notati|on famil|
|00002290| 69 61 72 20 66 72 6f 6d | 20 6d 61 6e 79 20 6f 74 |iar from| many ot|
|000022a0| 68 65 72 20 6c 61 6e 67 | 75 61 67 65 73 20 66 6f |her lang|uages fo|
|000022b0| 72 20 75 73 65 0a 77 69 | 74 68 20 72 65 63 6f 72 |r use.wi|th recor|
|000022c0| 64 73 2f 73 74 72 75 63 | 74 75 72 65 73 2c 20 69 |ds/struc|tures, i|
|000022d0| 73 20 75 73 65 64 20 68 | 65 72 65 20 74 6f 20 64 |s used h|ere to d|
|000022e0| 65 74 65 72 6d 69 6e 65 | 20 77 68 69 63 68 20 6f |etermine| which o|
|000022f0| 66 20 73 65 76 65 72 61 | 6c 0a 63 65 6c 6c 20 66 |f severa|l.cell f|
|00002300| 69 65 6c 64 73 20 69 73 | 20 62 65 69 6e 67 20 64 |ields is| being d|
|00002310| 65 6e 6f 74 65 64 2e 20 | 20 49 66 2c 20 6f 6e 20 |enoted. | If, on |
|00002320| 74 68 65 20 6f 74 68 65 | 72 20 68 61 6e 64 2c 20 |the othe|r hand, |
|00002330| 74 68 65 20 66 69 65 6c | 64 20 6e 61 6d 65 20 69 |the fiel|d name i|
|00002340| 73 20 0a 6e 6f 74 20 70 | 72 65 73 65 6e 74 2c 20 |s .not p|resent, |
|00002350| 74 68 65 6e 20 61 6c 6c | 20 66 69 65 6c 64 73 20 |then all| fields |
|00002360| 6f 66 20 74 68 65 20 63 | 65 6c 6c 20 61 72 65 20 |of the c|ell are |
|00002370| 75 73 65 64 20 69 6e 0a | 61 73 73 69 67 6e 6d 65 |used in.|assignme|
|00002380| 6e 74 20 61 6e 64 20 66 | 6f 72 20 74 65 73 74 73 |nt and f|or tests|
|00002390| 20 6f 66 20 65 71 75 61 | 6c 69 74 79 20 61 6e 64 | of equa|lity and|
|000023a0| 20 69 6e 65 71 75 61 6c | 69 74 79 2e 0a 0a 46 69 | inequal|ity...Fi|
|000023b0| 6e 61 6c 6c 79 2c 20 62 | 6f 74 68 20 74 68 65 20 |nally, b|oth the |
|000023c0| 69 6e 70 75 74 20 61 6e | 64 20 6f 75 74 70 75 74 |input an|d output|
|000023d0| 20 6f 66 20 7b 5c 65 6d | 20 43 65 6c 6c 61 6e 67 | of {\em| Cellang|
|000023e0| 20 32 2e 30 7d 20 70 72 | 6f 67 72 61 6d 73 0a 61 | 2.0} pr|ograms.a|
|000023f0| 6c 6c 6f 77 20 74 68 65 | 20 75 73 65 72 20 74 6f |llow the| user to|
|00002400| 20 6d 61 6e 69 70 75 6c | 61 74 65 20 63 65 6c 6c | manipul|ate cell|
|00002410| 75 6c 61 72 20 61 75 74 | 6f 6d 61 74 61 20 64 61 |ular aut|omata da|
|00002420| 74 61 20 69 6e 20 77 61 | 79 73 20 74 68 61 74 20 |ta in wa|ys that |
|00002430| 6d 61 6e 79 0a 73 79 73 | 74 65 6d 73 20 64 6f 20 |many.sys|tems do |
|00002440| 6e 6f 74 20 70 65 72 6d | 69 74 2e 20 20 42 6f 74 |not perm|it. Bot|
|00002450| 68 20 69 6e 70 75 74 20 | 61 6e 64 20 6f 75 74 70 |h input |and outp|
|00002460| 75 74 20 61 72 65 20 6f | 66 20 69 64 65 6e 74 69 |ut are o|f identi|
|00002470| 63 61 6c 20 66 6f 72 6d | 2c 0a 74 68 75 73 20 61 |cal form|,.thus a|
|00002480| 6c 6c 6f 77 69 6e 67 20 | 61 75 74 6f 6d 61 74 61 |llowing |automata|
|00002490| 20 74 6f 20 62 65 20 63 | 68 61 69 6e 65 64 20 74 | to be c|hained t|
|000024a0| 6f 67 65 74 68 65 72 2e | 20 20 42 6f 74 68 0a 69 |ogether.| Both.i|
|000024b0| 6e 70 75 74 20 61 6e 64 | 20 6f 75 74 70 75 74 20 |nput and| output |
|000024c0| 61 72 65 20 67 69 76 65 | 6e 20 61 73 20 61 20 73 |are give|n as a s|
|000024d0| 65 71 75 65 6e 63 65 20 | 6f 66 20 74 69 6d 65 20 |equence |of time |
|000024e0| 62 6c 6f 63 6b 73 2e 20 | 20 41 20 74 69 6d 65 20 |blocks. | A time |
|000024f0| 62 6c 6f 63 6b 0a 62 65 | 67 69 6e 73 20 77 69 74 |block.be|gins wit|
|00002500| 68 20 61 20 74 69 6d 65 | 20 28 61 20 6e 6f 6e 2d |h a time| (a non-|
|00002510| 2d 6e 65 67 61 74 69 76 | 65 20 69 6e 74 65 67 65 |-negativ|e intege|
|00002520| 72 20 76 61 6c 75 65 29 | 20 66 6f 6c 6c 6f 77 65 |r value)| followe|
|00002530| 64 20 62 79 20 7a 65 72 | 6f 20 6f 72 20 6d 6f 72 |d by zer|o or mor|
|00002540| 65 0a 63 65 6c 6c 20 6c | 6f 63 61 74 69 6f 6e 20 |e.cell l|ocation |
|00002550| 61 6e 64 20 76 61 6c 75 | 65 20 70 61 69 72 73 2e |and valu|e pairs.|
|00002560| 20 20 57 68 65 6e 20 6d | 75 6c 74 69 70 6c 65 20 | When m|ultiple |
|00002570| 74 69 6d 65 20 62 6c 6f | 63 6b 73 20 61 72 65 20 |time blo|cks are |
|00002580| 67 69 76 65 6e 2c 0a 73 | 75 63 63 65 73 73 69 76 |given,.s|uccessiv|
|00002590| 65 20 74 69 6d 65 73 20 | 6d 75 73 74 20 62 65 20 |e times |must be |
|000025a0| 73 74 72 69 63 74 6c 79 | 20 67 72 65 61 74 65 72 |strictly| greater|
|000025b0| 20 74 68 61 6e 20 61 6c | 6c 20 70 72 65 76 69 6f | than al|l previo|
|000025c0| 75 73 20 74 69 6d 65 73 | 2e 0a 41 6e 20 65 78 61 |us times|..An exa|
|000025d0| 6d 70 6c 65 20 73 65 74 | 20 6f 66 20 74 69 6d 65 |mple set| of time|
|000025e0| 20 62 6c 6f 63 6b 73 20 | 66 6f 72 20 61 20 32 2d | blocks |for a 2-|
|000025f0| 2d 64 69 6d 65 6e 73 69 | 6f 6e 61 6c 20 61 75 74 |-dimensi|onal aut|
|00002600| 6f 6d 61 74 61 20 69 73 | 20 67 69 76 65 6e 20 69 |omata is| given i|
|00002610| 6e 0a 46 69 67 75 72 65 | 7e 5c 72 65 66 7b 74 69 |n.Figure|~\ref{ti|
|00002620| 6d 65 20 62 6c 6f 63 6b | 73 7d 2e 20 20 49 74 20 |me block|s}. It |
|00002630| 73 70 65 63 69 66 69 65 | 73 20 74 68 61 74 20 61 |specifie|s that a|
|00002640| 6c 74 68 6f 75 67 68 0a | 61 6c 6c 20 74 68 65 20 |lthough.|all the |
|00002650| 63 65 6c 6c 73 20 6f 66 | 20 74 68 65 20 75 6e 69 |cells of| the uni|
|00002660| 76 65 72 73 65 20 68 61 | 76 65 20 61 20 64 65 66 |verse ha|ve a def|
|00002670| 61 75 6c 74 20 76 61 6c | 75 65 20 6f 66 20 30 20 |ault val|ue of 0 |
|00002680| 61 74 20 74 69 6d 65 0a | 30 2c 20 74 68 65 20 63 |at time.|0, the c|
|00002690| 65 6c 6c 20 61 74 20 61 | 62 73 6f 6c 75 74 65 20 |ell at a|bsolute |
|000026a0| 6c 6f 63 61 74 69 6f 6e | 20 33 2c 20 33 20 77 69 |location| 3, 3 wi|
|000026b0| 6c 6c 20 68 61 76 65 20 | 61 20 76 61 6c 75 65 20 |ll have |a value |
|000026c0| 6f 66 20 31 2e 20 20 46 | 75 72 74 68 65 72 6d 6f |of 1. F|urthermo|
|000026d0| 72 65 2c 0a 69 74 20 73 | 70 65 63 69 66 69 65 73 |re,.it s|pecifies|
|000026e0| 20 74 68 61 74 20 61 74 | 20 74 68 65 20 62 65 67 | that at| the beg|
|000026f0| 69 6e 6e 69 6e 67 20 6f | 66 20 74 69 6d 65 20 31 |inning o|f time 1|
|00002700| 30 30 20 28 62 65 66 6f | 72 65 20 61 6e 79 20 63 |00 (befo|re any c|
|00002710| 65 6c 6c 73 20 68 61 76 | 65 20 62 65 65 6e 0a 75 |ells hav|e been.u|
|00002720| 70 64 61 74 65 64 29 2c | 20 74 68 65 20 63 65 6c |pdated),| the cel|
|00002730| 6c 20 61 74 20 61 62 73 | 6f 6c 75 74 65 20 6c 6f |l at abs|olute lo|
|00002740| 63 61 74 69 6f 6e 20 32 | 34 2c 20 35 36 20 68 61 |cation 2|4, 56 ha|
|00002750| 73 20 69 74 73 20 66 69 | 72 73 74 20 66 69 65 6c |s its fi|rst fiel|
|00002760| 64 20 73 65 74 20 74 6f | 20 30 2c 0a 74 68 65 20 |d set to| 0,.the |
|00002770| 63 65 6c 6c 20 61 74 20 | 61 62 73 6f 6c 75 74 65 |cell at |absolute|
|00002780| 20 6c 6f 63 61 74 69 6f | 6e 20 35 30 2c 20 35 30 | locatio|n 50, 50|
|00002790| 20 68 61 73 20 69 74 73 | 20 66 69 72 73 74 20 66 | has its| first f|
|000027a0| 69 65 6c 64 20 73 65 74 | 20 74 6f 20 35 20 61 6e |ield set| to 5 an|
|000027b0| 64 20 69 74 20 73 65 63 | 6f 6e 64 0a 66 69 65 6c |d it sec|ond.fiel|
|000027c0| 64 20 73 65 74 20 74 6f | 20 36 2c 20 61 6e 64 20 |d set to| 6, and |
|000027d0| 74 68 65 20 63 65 6c 6c | 20 61 74 20 6c 6f 63 61 |the cell| at loca|
|000027e0| 74 69 6f 6e 20 32 2c 20 | 33 32 20 68 61 73 20 69 |tion 2, |32 has i|
|000027f0| 74 73 20 74 68 69 72 64 | 20 66 69 65 6c 64 20 73 |ts third| field s|
|00002800| 65 74 20 74 6f 20 33 2e | 0a 54 68 69 73 20 63 65 |et to 3.|.This ce|
|00002810| 6c 6c 20 76 61 6c 75 65 | 20 69 6e 70 75 74 20 70 |ll value| input p|
|00002820| 72 6f 63 65 73 73 20 63 | 6f 6e 74 69 6e 75 65 73 |rocess c|ontinues|
|00002830| 20 66 6f 72 0a 61 73 20 | 6d 61 6e 79 20 74 69 6d | for.as |many tim|
|00002840| 65 20 62 6c 6f 63 6b 73 | 20 61 73 20 61 72 65 20 |e blocks| as are |
|00002850| 69 6e 20 74 68 65 20 69 | 6e 70 75 74 2e 20 20 54 |in the i|nput. T|
|00002860| 68 65 20 6f 75 74 70 75 | 74 20 6f 66 20 61 20 7b |he outpu|t of a {|
|00002870| 5c 65 6d 20 43 65 6c 6c | 61 6e 67 20 32 2e 30 7d |\em Cell|ang 2.0}|
|00002880| 0a 70 72 6f 67 72 61 6d | 20 68 61 73 20 74 68 65 |.program| has the|
|00002890| 20 73 61 6d 65 20 66 6f | 72 6d 20 61 6e 64 20 63 | same fo|rm and c|
|000028a0| 61 6e 20 74 68 75 73 20 | 61 70 70 65 61 72 20 61 |an thus |appear a|
|000028b0| 73 20 69 6e 70 75 74 20 | 74 6f 20 61 6e 6f 74 68 |s input |to anoth|
|000028c0| 65 72 0a 61 75 74 6f 6d | 61 74 61 2e 20 20 49 66 |er.autom|ata. If|
|000028d0| 20 65 61 63 68 20 63 65 | 6c 6c 20 68 61 73 20 73 | each ce|ll has s|
|000028e0| 65 76 65 72 61 6c 20 76 | 61 6c 75 65 73 20 77 68 |everal v|alues wh|
|000028f0| 69 63 68 20 6d 75 73 74 | 20 62 65 20 73 65 74 2c |ich must| be set,|
|00002900| 20 74 68 65 6e 20 74 68 | 65 0a 6d 75 6c 74 69 70 | then th|e.multip|
|00002910| 6c 65 20 76 61 6c 75 65 | 73 20 61 72 65 20 73 65 |le value|s are se|
|00002920| 70 61 72 61 74 65 64 20 | 62 79 20 63 6f 6d 6d 61 |parated |by comma|
|00002930| 73 20 61 6e 64 20 61 72 | 65 20 61 73 73 69 67 6e |s and ar|e assign|
|00002940| 65 64 20 69 6e 20 74 68 | 65 20 6f 72 64 65 72 20 |ed in th|e order |
|00002950| 69 6e 0a 77 68 69 63 68 | 20 74 68 65 79 20 77 65 |in.which| they we|
|00002960| 72 65 20 64 65 63 6c 61 | 72 65 64 20 69 6e 20 74 |re decla|red in t|
|00002970| 68 65 20 61 73 73 6f 63 | 69 61 74 65 64 20 7b 5c |he assoc|iated {\|
|00002980| 65 6d 20 43 65 6c 6c 61 | 6e 67 20 32 2e 30 7d 20 |em Cella|ng 2.0} |
|00002990| 70 72 6f 67 72 61 6d 2e | 20 20 57 68 65 6e 0a 6f |program.| When.o|
|000029a0| 6e 6c 79 20 73 6f 6d 65 | 20 6f 66 20 74 68 65 20 |nly some| of the |
|000029b0| 70 6f 73 73 69 62 6c 65 | 20 66 69 65 6c 64 20 76 |possible| field v|
|000029c0| 61 6c 75 65 73 20 61 72 | 65 20 67 69 76 65 6e 2c |alues ar|e given,|
|000029d0| 20 74 68 65 6e 20 74 68 | 65 20 76 61 6c 75 65 73 | then th|e values|
|000029e0| 0a 61 72 65 20 61 73 73 | 69 67 6e 65 64 20 69 6e |.are ass|igned in|
|000029f0| 20 6f 72 64 65 72 20 75 | 6e 74 69 6c 20 6e 6f 20 | order u|ntil no |
|00002a00| 6d 6f 72 65 20 61 72 65 | 20 61 76 61 69 6c 61 62 |more are| availab|
|00002a10| 6c 65 2c 20 74 68 65 20 | 75 6e 73 70 65 63 69 66 |le, the |unspecif|
|00002a20| 69 65 64 20 63 65 6c 6c | 20 66 69 65 6c 64 73 20 |ied cell| fields |
|00002a30| 0a 74 68 75 73 20 72 65 | 74 61 69 6e 20 74 68 65 |.thus re|tain the|
|00002a40| 69 72 20 70 72 65 76 69 | 6f 75 73 20 76 61 6c 75 |ir previ|ous valu|
|00002a50| 65 73 2e 0a 5c 62 65 67 | 69 6e 7b 66 69 67 75 72 |es..\beg|in{figur|
|00002a60| 65 7d 5b 74 5d 0a 5c 62 | 65 67 69 6e 7b 63 65 6e |e}[t].\b|egin{cen|
|00002a70| 74 65 72 7d 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 |ter}.\be|gin{verb|
|00002a80| 61 74 69 6d 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |atim}. | |
|00002a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002aa0| 20 20 20 30 0a 20 20 20 | 20 20 20 20 20 20 20 20 | 0. | |
|00002ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ac0| 20 20 5b 33 2c 20 33 5d | 20 3d 20 31 0a 20 20 20 | [3, 3]| = 1. |
|00002ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ae0| 20 20 20 20 20 20 20 20 | 20 20 31 30 30 0a 20 20 | | 100. |
|00002af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002b00| 20 20 20 20 20 20 20 20 | 20 20 20 5b 32 34 2c 20 | | [24, |
|00002b10| 35 36 5d 20 3d 20 30 0a | 20 20 20 20 20 20 20 20 |56] = 0.| |
|00002b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002b30| 20 20 20 20 20 5b 35 30 | 2c 20 35 30 5d 20 3d 20 | [50|, 50] = |
|00002b40| 35 2c 20 36 0a 20 20 20 | 20 20 20 20 20 20 20 20 |5, 6. | |
|00002b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002b60| 20 20 5b 32 2c 20 33 32 | 5d 20 3d 20 2c 20 2c 20 | [2, 32|] = , , |
|00002b70| 33 0a 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |3.\end{v|erbatim}|
|00002b80| 0a 5c 65 6e 64 7b 63 65 | 6e 74 65 72 7d 0a 5c 63 |.\end{ce|nter}.\c|
|00002b90| 61 70 74 69 6f 6e 7b 41 | 6e 20 65 78 61 6d 70 6c |aption{A|n exampl|
|00002ba0| 65 20 69 6e 70 75 74 2f | 6f 75 74 70 75 74 20 66 |e input/|output f|
|00002bb0| 6f 72 20 61 20 7b 5c 65 | 6d 20 43 65 6c 6c 61 6e |or a {\e|m Cellan|
|00002bc0| 67 20 32 2e 30 7d 20 70 | 72 6f 67 72 61 6d 7d 0a |g 2.0} p|rogram}.|
|00002bd0| 5c 6c 61 62 65 6c 7b 74 | 69 6d 65 20 62 6c 6f 63 |\label{t|ime bloc|
|00002be0| 6b 73 7d 0a 5c 65 6e 64 | 7b 66 69 67 75 72 65 7d |ks}.\end|{figure}|
|00002bf0| 0a 0a 5c 73 65 63 74 69 | 6f 6e 7b 54 68 65 20 56 |..\secti|on{The V|
|00002c00| 69 65 77 65 72 7d 0a 0a | 54 68 65 20 76 69 65 77 |iewer}..|The view|
|00002c10| 65 72 2c 20 77 68 69 63 | 68 20 69 73 20 75 73 65 |er, whic|h is use|
|00002c20| 64 20 74 6f 20 65 78 61 | 6d 69 6e 65 20 74 68 65 |d to exa|mine the|
|00002c30| 20 63 65 6c 6c 20 76 61 | 6c 75 65 73 20 69 6e 20 | cell va|lues in |
|00002c40| 61 20 67 72 61 70 68 69 | 63 20 6d 61 6e 6e 65 72 |a graphi|c manner|
|00002c50| 2c 20 69 73 0a 69 6e 64 | 65 70 65 6e 64 65 6e 74 |, is.ind|ependent|
|00002c60| 20 6f 66 20 74 68 65 20 | 7b 5c 65 6d 20 43 65 6c | of the |{\em Cel|
|00002c70| 6c 61 6e 67 20 32 2e 30 | 7d 20 6c 61 6e 67 75 61 |lang 2.0|} langua|
|00002c80| 67 65 20 61 6e 64 20 63 | 6f 6d 70 69 6c 65 72 2e |ge and c|ompiler.|
|00002c90| 20 20 54 68 65 20 69 6e | 70 75 74 0a 74 6f 20 74 | The in|put.to t|
|00002ca0| 68 65 20 76 69 65 77 65 | 72 20 69 73 20 69 64 65 |he viewe|r is ide|
|00002cb0| 6e 74 69 63 61 6c 20 69 | 6e 20 66 6f 72 6d 20 74 |ntical i|n form t|
|00002cc0| 6f 20 74 68 65 20 6f 75 | 74 70 75 74 20 28 61 6e |o the ou|tput (an|
|00002cd0| 64 20 74 68 75 73 20 74 | 68 65 20 69 6e 70 75 74 |d thus t|he input|
|00002ce0| 29 0a 6f 66 20 7b 5c 65 | 6d 20 43 65 6c 6c 61 6e |).of {\e|m Cellan|
|00002cf0| 67 20 32 2e 30 7d 20 70 | 72 6f 67 72 61 6d 73 2e |g 2.0} p|rograms.|
|00002d00| 20 20 54 68 65 20 63 75 | 72 72 65 6e 74 20 76 69 | The cu|rrent vi|
|00002d10| 65 77 65 72 20 61 6c 6c | 6f 77 73 20 74 68 65 20 |ewer all|ows the |
|00002d20| 76 69 65 77 69 6e 67 20 | 6f 66 0a 61 20 73 69 6e |viewing |of.a sin|
|00002d30| 67 6c 65 20 66 69 65 6c | 64 20 61 6c 6f 6e 67 20 |gle fiel|d along |
|00002d40| 63 6f 6e 74 69 67 75 6f | 75 73 20 70 6f 72 74 69 |contiguo|us porti|
|00002d50| 6f 6e 73 20 6f 66 20 61 | 6e 79 20 74 77 6f 20 64 |ons of a|ny two d|
|00002d60| 69 6d 65 6e 73 69 6f 6e | 73 2e 0a 54 68 65 20 76 |imension|s..The v|
|00002d70| 61 6c 75 65 73 20 63 61 | 6e 20 62 65 20 64 69 73 |alues ca|n be dis|
|00002d80| 70 6c 61 79 65 64 20 61 | 73 20 65 69 74 68 65 72 |played a|s either|
|00002d90| 20 63 68 61 72 61 63 74 | 65 72 73 0a 28 76 69 61 | charact|ers.(via|
|00002da0| 20 63 75 72 73 65 73 29 | 20 6f 72 20 63 6f 6c 6f | curses)| or colo|
|00002db0| 72 65 64 20 73 71 75 61 | 72 65 73 20 28 76 69 61 |red squa|res (via|
|00002dc0| 20 58 2d 2d 57 69 6e 64 | 6f 77 73 29 2e 20 20 41 | X--Wind|ows). A|
|00002dd0| 20 6c 69 6d 69 74 65 64 | 20 64 65 62 75 67 67 69 | limited| debuggi|
|00002de0| 6e 67 0a 61 69 64 20 28 | 61 76 61 69 6c 61 62 6c |ng.aid (|availabl|
|00002df0| 65 20 6f 6e 6c 79 20 77 | 69 74 68 20 74 68 65 20 |e only w|ith the |
|00002e00| 58 2d 2d 57 69 6e 64 6f | 77 73 20 76 69 65 77 69 |X--Windo|ws viewi|
|00002e10| 6e 67 20 6f 70 74 69 6f | 6e 29 20 61 6c 73 6f 20 |ng optio|n) also |
|00002e20| 61 6c 6c 6f 77 73 20 74 | 68 65 20 6e 75 6d 65 72 |allows t|he numer|
|00002e30| 69 63 20 0a 76 61 6c 75 | 65 73 20 6f 66 20 61 20 |ic .valu|es of a |
|00002e40| 6e 65 69 67 68 62 6f 72 | 68 6f 6f 64 20 6f 66 20 |neighbor|hood of |
|00002e50| 63 65 6c 6c 73 20 28 61 | 73 20 6f 70 70 6f 73 65 |cells (a|s oppose|
|00002e60| 64 0a 74 6f 20 74 68 65 | 20 63 6f 6c 6f 72 20 61 |d.to the| color a|
|00002e70| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 74 |ssociate|d with t|
|00002e80| 68 69 73 20 76 61 6c 75 | 65 29 20 74 6f 20 62 65 |his valu|e) to be|
|00002e90| 20 76 69 65 77 65 64 2e | 0a 0a 54 68 65 20 69 64 | viewed.|..The id|
|00002ea0| 65 61 20 6f 66 20 73 65 | 70 61 72 61 74 69 6e 67 |ea of se|parating|
|00002eb0| 20 74 68 65 20 6c 61 6e | 67 75 61 67 65 20 28 61 | the lan|guage (a|
|00002ec0| 6e 64 20 74 68 75 73 20 | 74 68 65 20 63 65 6c 6c |nd thus |the cell|
|00002ed0| 75 6c 61 72 20 61 75 74 | 6f 6d 61 74 61 0a 73 69 |ular aut|omata.si|
|00002ee0| 6d 75 6c 61 74 6f 72 29 | 20 61 6e 64 20 74 68 65 |mulator)| and the|
|00002ef0| 20 76 69 65 77 65 72 20 | 61 6c 6c 6f 77 73 0a 67 | viewer |allows.g|
|00002f00| 72 65 61 74 65 72 20 66 | 6c 65 78 69 62 69 6c 69 |reater f|lexibili|
|00002f10| 74 79 20 62 6f 74 68 20 | 69 6e 20 74 68 65 20 76 |ty both |in the v|
|00002f20| 69 65 77 69 6e 67 20 6f | 66 20 64 61 74 61 20 61 |iewing o|f data a|
|00002f30| 6e 64 20 69 6e 20 74 68 | 65 20 63 72 65 61 74 69 |nd in th|e creati|
|00002f40| 6f 6e 20 6f 66 0a 63 65 | 6c 6c 75 6c 61 72 20 61 |on of.ce|llular a|
|00002f50| 75 74 6f 6d 61 74 61 2e | 20 20 54 68 65 72 65 20 |utomata.| There |
|00002f60| 69 73 20 6e 6f 20 72 65 | 73 74 72 69 63 74 69 6f |is no re|strictio|
|00002f70| 6e 20 74 68 61 74 0a 74 | 68 65 20 69 6e 70 75 74 |n that.t|he input|
|00002f80| 20 74 6f 20 74 68 65 20 | 76 69 65 77 65 72 20 62 | to the |viewer b|
|00002f90| 65 20 67 65 6e 65 72 61 | 74 65 64 20 62 79 20 61 |e genera|ted by a|
|00002fa0| 20 7b 5c 65 6d 20 43 65 | 6c 6c 61 6e 67 20 32 2e | {\em Ce|llang 2.|
|00002fb0| 30 7d 20 70 72 6f 67 72 | 61 6d 2c 20 61 6e 64 20 |0} progr|am, and |
|00002fc0| 69 74 0a 69 73 20 70 6f | 73 73 69 62 6c 65 20 74 |it.is po|ssible t|
|00002fd0| 68 61 74 20 70 72 6f 67 | 72 61 6d 73 20 6f 66 20 |hat prog|rams of |
|00002fe0| 6f 74 68 65 72 20 73 6f | 72 74 73 20 77 69 6c 6c |other so|rts will|
|00002ff0| 20 62 65 20 64 65 76 65 | 6c 6f 70 65 64 0a 74 6f | be deve|loped.to|
|00003000| 20 65 78 61 6d 69 6e 65 | 2c 20 67 61 74 68 65 72 | examine|, gather|
|00003010| 20 61 6e 64 20 72 65 70 | 6f 72 74 20 73 74 61 74 | and rep|ort stat|
|00003020| 69 73 74 69 63 73 20 63 | 6f 6e 63 65 72 6e 69 6e |istics c|oncernin|
|00003030| 67 20 74 68 65 20 72 65 | 73 75 6c 74 73 20 6f 66 |g the re|sults of|
|00003040| 0a 7b 5c 65 6d 20 43 65 | 6c 6c 61 6e 67 20 32 2e |.{\em Ce|llang 2.|
|00003050| 30 7d 20 70 72 6f 67 72 | 61 6d 73 2e 20 20 60 60 |0} progr|ams. ``|
|00003060| 56 61 6c 76 65 27 27 20 | 66 69 6c 74 65 72 73 0a |Valve'' |filters.|
|00003070| 63 6f 75 6c 64 20 62 65 | 20 69 6e 73 65 72 74 65 |could be| inserte|
|00003080| 64 20 62 65 74 77 65 65 | 6e 20 74 68 65 20 6f 75 |d betwee|n the ou|
|00003090| 74 70 75 74 20 67 65 6e | 65 72 61 74 65 64 20 62 |tput gen|erated b|
|000030a0| 79 20 61 20 7b 5c 65 6d | 20 43 65 6c 6c 61 6e 67 |y a {\em| Cellang|
|000030b0| 20 32 2e 30 7d 0a 70 72 | 6f 67 72 61 6d 20 61 6e | 2.0}.pr|ogram an|
|000030c0| 64 20 74 68 65 20 69 6e | 70 75 74 20 74 6f 20 74 |d the in|put to t|
|000030d0| 68 65 20 76 69 65 77 65 | 72 2e 20 20 53 75 63 68 |he viewe|r. Such|
|000030e0| 20 61 20 76 61 6c 76 65 | 20 70 72 6f 67 72 61 6d | a valve| program|
|000030f0| 20 63 6f 75 6c 64 20 61 | 6c 6c 6f 77 0a 74 68 65 | could a|llow.the|
|00003100| 20 70 72 65 73 65 6e 74 | 61 74 69 6f 6e 20 73 70 | present|ation sp|
|00003110| 65 65 64 20 74 6f 20 62 | 65 20 74 61 69 6c 6f 72 |eed to b|e tailor|
|00003120| 65 64 20 74 6f 20 74 68 | 65 20 72 65 73 65 61 72 |ed to th|e resear|
|00003130| 63 68 65 72 27 73 20 6e | 65 65 64 73 2e 0a 53 69 |cher's n|eeds..Si|
|00003140| 6e 63 65 20 74 68 65 20 | 6f 75 74 70 75 74 20 6f |nce the |output o|
|00003150| 66 20 7b 5c 65 6d 20 43 | 65 6c 6c 61 6e 67 20 32 |f {\em C|ellang 2|
|00003160| 2e 30 7d 20 70 72 6f 67 | 72 61 6d 73 20 61 72 65 |.0} prog|rams are|
|00003170| 20 77 72 69 74 74 65 6e | 0a 74 6f 20 74 68 65 20 | written|.to the |
|00003180| 73 74 61 6e 64 61 72 64 | 20 6f 75 74 70 75 74 2c |standard| output,|
|00003190| 20 69 74 20 63 61 6e 20 | 62 65 20 70 69 70 65 64 | it can |be piped|
|000031a0| 20 64 69 72 65 63 74 6c | 79 0a 69 6e 74 6f 20 74 | directl|y.into t|
|000031b0| 68 65 20 76 69 65 77 65 | 72 20 77 69 74 68 20 6e |he viewe|r with n|
|000031c0| 6f 20 6e 65 65 64 20 66 | 6f 72 20 69 6e 74 65 72 |o need f|or inter|
|000031d0| 6d 65 64 69 61 74 65 20 | 73 74 6f 72 61 67 65 20 |mediate |storage |
|000031e0| 66 69 6c 65 73 2e 20 20 | 54 68 65 0a 75 73 65 20 |files. |The.use |
|000031f0| 6f 66 20 61 20 74 70 69 | 70 65 20 66 69 6c 74 65 |of a tpi|pe filte|
|00003200| 72 20 77 6f 75 6c 64 20 | 65 6e 61 62 6c 65 20 73 |r would |enable s|
|00003210| 74 6f 72 61 67 65 20 6f | 66 20 61 6c 6c 20 6f 72 |torage o|f all or|
|00003220| 20 70 61 72 74 20 6f 66 | 20 74 68 65 0a 70 72 6f | part of| the.pro|
|00003230| 64 75 63 65 64 20 63 65 | 6c 6c 20 76 61 6c 75 65 |duced ce|ll value|
|00003240| 73 20 69 6e 74 6f 20 61 | 20 66 69 6c 65 2e 0a 0a |s into a| file...|
|00003250| 5c 62 65 67 69 6e 7b 66 | 69 67 75 72 65 7d 5b 74 |\begin{f|igure}[t|
|00003260| 5d 0a 5c 62 65 67 69 6e | 7b 63 65 6e 74 65 72 7d |].\begin|{center}|
|00003270| 0a 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |.\begin{|verbatim|
|00003280| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}. | |
|00003290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000032a0| 20 20 20 20 20 20 20 35 | 30 0a 20 20 20 20 20 20 | 5|0. |
|000032b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000032c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2b | | +|
|000032d0| 31 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1. | |
|000032e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000032f0| 20 20 20 20 20 20 20 31 | 30 30 0a 20 20 20 20 20 | 1|00. |
|00003300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003320| 35 30 30 21 0a 5c 65 6e | 64 7b 76 65 72 62 61 74 |500!.\en|d{verbat|
|00003330| 69 6d 7d 0a 5c 65 6e 64 | 7b 63 65 6e 74 65 72 7d |im}.\end|{center}|
|00003340| 0a 5c 63 61 70 74 69 6f | 6e 7b 41 6e 20 65 78 61 |.\captio|n{An exa|
|00003350| 6d 70 6c 65 20 74 69 6d | 65 20 66 69 6c 65 20 66 |mple tim|e file f|
|00003360| 6f 72 20 72 65 70 6f 72 | 74 69 6e 67 20 63 65 6c |or repor|ting cel|
|00003370| 6c 20 76 61 6c 75 65 73 | 7d 0a 5c 6c 61 62 65 6c |l values|}.\label|
|00003380| 7b 72 65 70 6f 72 74 20 | 74 69 6d 65 73 7d 0a 5c |{report |times}.\|
|00003390| 65 6e 64 7b 66 69 67 75 | 72 65 7d 0a 0a 5c 73 65 |end{figu|re}..\se|
|000033a0| 63 74 69 6f 6e 7b 43 6f | 6d 70 69 6c 69 6e 67 20 |ction{Co|mpiling |
|000033b0| 5c 26 20 56 69 65 77 69 | 6e 67 7d 0a 0a 53 75 70 |\& Viewi|ng}..Sup|
|000033c0| 70 6f 73 65 20 74 68 65 | 20 7b 5c 65 6d 20 43 65 |pose the| {\em Ce|
|000033d0| 6c 6c 61 6e 67 20 32 2e | 30 7d 20 70 72 6f 67 72 |llang 2.|0} progr|
|000033e0| 61 6d 20 66 6f 72 20 74 | 68 65 20 67 61 6d 65 20 |am for t|he game |
|000033f0| 6f 66 20 4c 69 66 65 20 | 74 68 61 74 20 61 70 70 |of Life |that app|
|00003400| 65 61 72 73 20 69 6e 20 | 0a 46 69 67 75 72 65 7e |ears in |.Figure~|
|00003410| 5c 72 65 66 7b 73 69 6d | 70 6c 65 20 6c 69 66 65 |\ref{sim|ple life|
|00003420| 7d 20 69 73 20 69 6e 20 | 74 68 65 20 66 69 6c 65 |} is in |the file|
|00003430| 20 7b 5c 74 74 20 6c 69 | 66 65 7d 2e 0a 41 20 63 | {\tt li|fe}..A c|
|00003440| 6f 6d 70 69 6c 65 64 20 | 76 65 72 73 69 6f 6e 20 |ompiled |version |
|00003450| 6f 66 20 74 68 65 20 63 | 6f 64 65 20 69 73 20 6f |of the c|ode is o|
|00003460| 62 74 61 69 6e 65 64 20 | 62 79 20 64 6f 69 6e 67 |btained |by doing|
|00003470| 20 7b 5c 74 74 20 63 65 | 6c 6c 63 20 6c 69 66 65 | {\tt ce|llc life|
|00003480| 7d 0a 77 68 69 63 68 20 | 70 6c 61 63 65 73 20 74 |}.which |places t|
|00003490| 68 65 20 6f 62 6a 65 63 | 74 20 63 6f 64 65 20 69 |he objec|t code i|
|000034a0| 6e 74 6f 20 61 20 66 69 | 6c 65 20 63 61 6c 6c 65 |nto a fi|le calle|
|000034b0| 64 20 7b 5c 74 74 20 61 | 2e 70 65 2d 73 63 61 6d |d {\tt a|.pe-scam|
|000034c0| 7d 2e 0a 54 68 65 20 6f | 62 6a 65 63 74 20 63 6f |}..The o|bject co|
|000034d0| 64 65 20 69 73 20 65 78 | 65 63 75 74 65 64 20 61 |de is ex|ecuted a|
|000034e0| 6e 64 20 64 69 73 70 6c | 61 79 65 64 20 62 79 20 |nd displ|ayed by |
|000034f0| 74 68 65 20 7b 5c 74 74 | 20 70 65 2d 73 63 61 6d |the {\tt| pe-scam|
|00003500| 7d 20 0a 61 62 73 74 72 | 61 63 74 20 6d 61 63 68 |} .abstr|act mach|
|00003510| 69 6e 65 20 76 69 61 3a | 0a 5c 62 65 67 69 6e 7b |ine via:|.\begin{|
|00003520| 76 65 72 62 61 74 69 6d | 7d 0a 70 65 2d 73 63 61 |verbatim|}.pe-sca|
|00003530| 6d 20 2d 63 20 61 2e 70 | 65 2d 73 63 61 6d 20 2d |m -c a.p|e-scam -|
|00003540| 72 20 74 69 6d 65 73 20 | 2d 78 31 31 20 2d 6d 61 |r times |-x11 -ma|
|00003550| 70 20 6c 69 66 65 2e 63 | 6f 6c 6f 72 73 20 3c 20 |p life.c|olors < |
|00003560| 6c 69 66 65 2e 64 61 74 | 61 0a 5c 65 6e 64 7b 76 |life.dat|a.\end{v|
|00003570| 65 72 62 61 74 69 6d 7d | 0a 77 68 65 72 65 20 7b |erbatim}|.where {|
|00003580| 5c 74 74 20 6c 69 66 65 | 2e 64 61 74 61 7d 20 69 |\tt life|.data} i|
|00003590| 73 20 61 20 64 61 74 61 | 20 66 69 6c 65 20 63 6f |s a data| file co|
|000035a0| 6e 74 61 69 6e 69 6e 67 | 20 74 68 65 20 0a 69 6e |ntaining| the .in|
|000035b0| 69 74 69 61 6c 20 63 6f | 6e 66 69 67 75 72 61 74 |itial co|nfigurat|
|000035c0| 69 6f 6e 20 6f 66 20 6c | 69 76 65 20 63 65 6c 6c |ion of l|ive cell|
|000035d0| 73 20 61 6e 64 0a 7b 5c | 74 74 20 6c 69 66 65 2e |s and.{\|tt life.|
|000035e0| 63 6f 6c 6f 72 73 7d 0a | 63 6f 6e 74 61 69 6e 73 |colors}.|contains|
|000035f0| 20 61 20 73 75 69 74 61 | 62 6c 65 20 63 6f 6c 6f | a suita|ble colo|
|00003600| 72 20 6d 61 70 2e 0a 41 | 6e 20 6f 70 74 69 6f 6e |r map..A|n option|
|00003610| 61 6c 20 70 61 72 61 6d | 65 74 65 72 2c 20 7b 5c |al param|eter, {\|
|00003620| 74 74 20 2d 66 7d 2c 0a | 69 73 20 75 73 65 64 20 |tt -f},.|is used |
|00003630| 74 6f 20 69 6e 64 69 63 | 61 74 65 20 77 68 69 63 |to indic|ate whic|
|00003640| 68 20 66 69 65 6c 64 20 | 28 73 74 61 72 74 69 6e |h field |(startin|
|00003650| 67 20 66 72 6f 6d 20 31 | 20 66 6f 72 20 74 68 65 |g from 1| for the|
|00003660| 20 66 69 72 73 74 20 66 | 69 65 6c 64 29 20 74 6f | first f|ield) to|
|00003670| 20 0a 75 73 65 20 61 73 | 20 74 68 65 20 76 61 6c | .use as| the val|
|00003680| 75 65 20 74 6f 20 64 69 | 73 70 6c 61 79 20 66 6f |ue to di|splay fo|
|00003690| 72 20 74 68 65 20 63 65 | 6c 6c 73 2e 0a 54 68 65 |r the ce|lls..The|
|000036a0| 20 7b 5c 74 74 20 2d 72 | 7d 20 6f 70 74 69 6f 6e | {\tt -r|} option|
|000036b0| 20 69 6e 64 69 63 61 74 | 65 73 20 61 20 66 69 6c | indicat|es a fil|
|000036c0| 65 20 77 68 69 63 68 20 | 63 6f 6e 74 61 69 6e 73 |e which |contains|
|000036d0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 61 62 6f | informa|tion abo|
|000036e0| 75 74 0a 77 68 69 63 68 | 20 67 65 6e 65 72 61 74 |ut.which| generat|
|000036f0| 69 6f 6e 73 20 74 6f 20 | 72 65 70 6f 72 74 20 63 |ions to |report c|
|00003700| 65 6c 6c 20 76 61 6c 75 | 65 73 20 66 6f 72 2e 20 |ell valu|es for. |
|00003710| 20 0a 0a 49 66 20 74 68 | 65 20 7b 5c 74 74 20 2d | ..If th|e {\tt -|
|00003720| 72 7d 20 6f 70 74 69 6f | 6e 20 69 73 20 6e 6f 74 |r} optio|n is not|
|00003730| 20 67 69 76 65 6e 0a 74 | 68 65 6e 20 74 68 65 20 | given.t|hen the |
|00003740| 63 65 6c 6c 20 76 61 6c | 75 65 73 20 77 68 69 63 |cell val|ues whic|
|00003750| 68 20 68 61 76 65 20 63 | 68 61 6e 67 65 64 20 77 |h have c|hanged w|
|00003760| 69 6c 6c 20 62 65 20 72 | 65 70 6f 72 74 65 64 20 |ill be r|eported |
|00003770| 66 6f 72 20 65 61 63 68 | 20 67 65 6e 65 72 61 74 |for each| generat|
|00003780| 69 6f 6e 2e 0a 41 20 73 | 61 6d 70 6c 65 20 74 69 |ion..A s|ample ti|
|00003790| 6d 65 20 66 69 6c 65 20 | 61 70 70 65 61 72 73 20 |me file |appears |
|000037a0| 69 6e 20 46 69 67 75 72 | 65 7e 5c 72 65 66 7b 72 |in Figur|e~\ref{r|
|000037b0| 65 70 6f 72 74 20 74 69 | 6d 65 73 7d 2e 20 20 41 |eport ti|mes}. A|
|000037c0| 20 74 69 6d 65 20 66 69 | 6c 65 20 69 73 20 61 20 | time fi|le is a |
|000037d0| 6c 69 73 74 0a 6f 66 20 | 74 69 6d 65 20 69 6e 64 |list.of |time ind|
|000037e0| 69 63 61 74 69 6f 6e 73 | 20 67 69 76 65 6e 20 6f |ications| given o|
|000037f0| 6e 65 20 70 65 72 20 6c | 69 6e 65 2e 20 20 41 20 |ne per l|ine. A |
|00003800| 6e 75 6d 62 65 72 20 69 | 6e 64 69 63 61 74 65 73 |number i|ndicates|
|00003810| 20 61 20 0a 74 69 6d 65 | 20 77 68 65 6e 20 74 68 | a .time| when th|
|00003820| 65 20 76 61 6c 75 65 73 | 20 73 68 6f 75 6c 64 20 |e values| should |
|00003830| 62 65 0a 72 65 70 6f 72 | 74 65 64 2c 20 77 68 69 |be.repor|ted, whi|
|00003840| 6c 65 20 61 20 60 60 2b | 27 27 20 65 6e 74 72 79 |le a ``+|'' entry|
|00003850| 20 63 61 75 73 65 73 20 | 74 68 65 73 65 20 76 61 | causes |these va|
|00003860| 6c 75 65 73 20 74 6f 20 | 62 65 20 70 72 6f 64 75 |lues to |be produ|
|00003870| 63 65 64 20 61 74 20 74 | 68 65 20 0a 69 6e 64 69 |ced at t|he .indi|
|00003880| 63 61 74 65 64 20 74 69 | 6d 65 20 69 6e 74 65 72 |cated ti|me inter|
|00003890| 76 61 6c 73 2e 20 20 46 | 69 6e 61 6c 6c 79 20 61 |vals. F|inally a|
|000038a0| 20 60 60 21 27 27 20 65 | 6e 74 72 79 20 64 65 74 | ``!'' e|ntry det|
|000038b0| 65 72 6d 69 6e 65 73 20 | 74 68 65 20 74 69 6d 65 |ermines |the time|
|000038c0| 20 61 74 0a 77 68 69 63 | 68 20 74 68 65 20 6c 61 | at.whic|h the la|
|000038d0| 73 74 20 73 65 74 20 6f | 66 20 76 61 6c 75 65 73 |st set o|f values|
|000038e0| 20 73 68 6f 75 6c 64 20 | 62 65 20 70 72 6f 64 75 | should |be produ|
|000038f0| 63 65 64 20 61 6e 64 20 | 74 68 65 20 73 69 6d 75 |ced and |the simu|
|00003900| 6c 61 74 69 6f 6e 20 73 | 74 6f 70 73 2e 0a 4e 6f |lation s|tops..No|
|00003910| 74 65 20 74 68 61 74 20 | 61 20 74 69 6d 65 20 66 |te that |a time f|
|00003920| 69 6c 65 20 6e 65 65 64 | 20 6e 6f 74 20 63 6f 6e |ile need| not con|
|00003930| 74 61 69 6e 20 61 20 60 | 60 21 27 27 20 65 6e 74 |tain a `|`!'' ent|
|00003940| 72 79 2e 20 20 49 6e 20 | 74 68 65 20 65 78 61 6d |ry. In |the exam|
|00003950| 70 6c 65 2c 0a 54 68 65 | 20 66 69 72 73 74 20 73 |ple,.The| first s|
|00003960| 65 74 20 6f 66 20 76 61 | 6c 75 65 73 20 28 61 66 |et of va|lues (af|
|00003970| 74 65 72 20 74 69 6d 65 | 20 30 29 20 69 73 20 70 |ter time| 0) is p|
|00003980| 72 6f 64 75 63 65 64 20 | 61 74 20 74 69 6d 65 20 |roduced |at time |
|00003990| 35 30 2c 20 74 68 65 6e | 20 61 74 20 65 61 63 68 |50, then| at each|
|000039a0| 20 0a 74 69 6d 65 20 74 | 68 65 72 65 61 66 74 65 | .time t|hereafte|
|000039b0| 72 20 75 6e 74 69 6c 20 | 74 69 6d 65 20 31 30 30 |r until |time 100|
|000039c0| 20 61 74 20 77 68 69 63 | 68 20 70 6f 69 6e 74 20 | at whic|h point |
|000039d0| 6e 6f 20 76 61 6c 75 65 | 73 20 61 72 65 20 72 65 |no value|s are re|
|000039e0| 70 6f 72 74 65 64 20 0a | 75 6e 74 69 6c 20 74 69 |ported .|until ti|
|000039f0| 6d 65 20 35 30 30 20 61 | 6e 64 20 74 68 65 20 73 |me 500 a|nd the s|
|00003a00| 69 6d 75 6c 61 74 69 6f | 6e 20 73 74 6f 70 73 2e |imulatio|n stops.|
|00003a10| 0a 0a 41 6c 74 65 72 6e | 61 74 69 76 65 6c 79 2c |..Altern|atively,|
|00003a20| 20 7b 5c 74 74 20 70 65 | 2d 73 63 61 6d 7d 20 63 | {\tt pe|-scam} c|
|00003a30| 61 6e 20 6a 75 73 74 20 | 6f 75 74 70 75 74 20 74 |an just |output t|
|00003a40| 68 65 20 63 65 6c 6c 20 | 76 61 6c 75 65 73 20 77 |he cell |values w|
|00003a50| 68 69 63 68 20 63 61 6e | 20 62 65 0a 66 69 6c 74 |hich can| be.filt|
|00003a60| 65 72 65 64 20 61 6e 64 | 2f 6f 72 20 76 69 65 77 |ered and|/or view|
|00003a70| 65 64 20 77 69 74 68 20 | 7b 5c 74 74 20 63 65 6c |ed with |{\tt cel|
|00003a80| 6c 76 69 65 77 7d 2e 20 | 20 41 6e 20 65 78 61 6d |lview}. | An exam|
|00003a90| 70 6c 65 20 6f 66 20 74 | 68 69 73 20 73 74 79 6c |ple of t|his styl|
|00003aa0| 65 20 6f 66 0a 75 73 65 | 20 69 73 3a 0a 5c 62 65 |e of.use| is:.\be|
|00003ab0| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0a 63 61 |gin{verb|atim}.ca|
|00003ac0| 74 20 20 6c 69 66 65 2e | 64 61 74 61 20 7c 20 70 |t life.|data | p|
|00003ad0| 65 2d 73 63 61 6d 20 2d | 72 20 74 69 6d 65 73 20 |e-scam -|r times |
|00003ae0| 2d 6f 20 7c 0a 20 20 20 | 20 20 20 20 20 20 20 20 |-o |. | |
|00003af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 63 65 | | ce|
|00003b00| 6c 6c 76 69 65 77 20 2d | 78 31 31 20 2d 6d 61 70 |llview -|x11 -map|
|00003b10| 20 6c 69 66 65 2e 63 6f | 6c 6f 72 73 20 2d 64 69 | life.co|lors -di|
|00003b20| 6d 20 30 2e 2e 36 33 2c | 30 2e 2e 36 33 0a 5c 65 |m 0..63,|0..63.\e|
|00003b30| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0a 57 68 65 |nd{verba|tim}.Whe|
|00003b40| 72 65 20 74 68 65 20 7b | 5c 74 74 20 2d 6f 7d 20 |re the {|\tt -o} |
|00003b50| 6f 70 74 69 6f 6e 20 69 | 6e 64 69 63 61 74 65 73 |option i|ndicates|
|00003b60| 20 74 68 61 74 20 63 65 | 6c 6c 20 76 61 6c 75 65 | that ce|ll value|
|00003b70| 73 20 62 65 20 77 72 69 | 74 74 65 6e 20 74 6f 20 |s be wri|tten to |
|00003b80| 74 68 65 0a 73 74 61 6e | 64 61 72 64 20 6f 75 74 |the.stan|dard out|
|00003b90| 70 75 74 2e 20 20 54 68 | 65 20 60 60 2d 63 20 61 |put. Th|e ``-c a|
|00003ba0| 2e 70 65 2d 2d 73 63 61 | 6d 27 27 20 68 61 73 20 |.pe--sca|m'' has |
|00003bb0| 62 65 65 6e 20 6c 65 66 | 74 20 6f 75 74 2c 20 73 |been lef|t out, s|
|00003bc0| 69 6e 63 65 20 74 68 65 | 0a 74 68 65 20 63 6f 64 |ince the|.the cod|
|00003bd0| 65 66 69 6c 65 20 69 73 | 20 61 73 73 75 6d 65 64 |efile is| assumed|
|00003be0| 20 74 6f 20 62 65 20 60 | 60 61 2e 70 65 2d 73 63 | to be `|`a.pe-sc|
|00003bf0| 61 6d 27 27 20 62 79 20 | 64 65 66 61 75 6c 74 2e |am'' by |default.|
|00003c00| 0a 4e 6f 74 65 20 74 68 | 61 74 20 6e 6f 77 2c 20 |.Note th|at now, |
|00003c10| 68 6f 77 65 76 65 72 2c | 20 74 68 65 20 64 69 6d |however,| the dim|
|00003c20| 65 6e 73 69 6f 6e 73 20 | 6f 66 20 74 68 65 20 63 |ensions |of the c|
|00003c30| 65 6c 6c 20 75 6e 69 76 | 65 72 73 65 20 6d 75 73 |ell univ|erse mus|
|00003c40| 74 20 62 65 20 6b 6e 6f | 77 6e 2e 0a 42 79 20 63 |t be kno|wn..By c|
|00003c50| 6f 6e 76 65 6e 74 69 6f | 6e 2c 20 7b 5c 74 74 20 |onventio|n, {\tt |
|00003c60| 70 65 2d 73 63 61 6d 7d | 27 73 20 63 65 6c 6c 20 |pe-scam}|'s cell |
|00003c70| 75 6e 69 76 65 72 73 65 | 20 62 65 67 69 6e 73 20 |universe| begins |
|00003c80| 6e 75 6d 62 65 72 69 6e | 67 20 61 74 20 30 20 66 |numberin|g at 0 f|
|00003c90| 6f 72 0a 65 61 63 68 20 | 64 69 6d 65 6e 73 69 6f |or.each |dimensio|
|00003ca0| 6e 2e 20 20 54 68 65 20 | 73 69 7a 65 20 61 6e 64 |n. The |size and|
|00003cb0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 64 69 6d 65 6e | number |of dimen|
|00003cc0| 73 69 6f 6e 73 20 69 73 | 20 69 6d 70 6c 65 6d 65 |sions is| impleme|
|00003cd0| 6e 74 61 74 69 6f 6e 0a | 64 65 70 65 6e 64 65 6e |ntation.|dependen|
|00003ce0| 74 20 28 61 6e 64 20 63 | 61 6e 20 62 65 20 63 6f |t (and c|an be co|
|00003cf0| 6e 66 69 67 75 72 65 64 | 20 61 74 20 69 6e 73 74 |nfigured| at inst|
|00003d00| 61 6c 6c 61 74 69 6f 6e | 20 74 69 6d 65 20 69 6e |allation| time in|
|00003d10| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 72 65 6c | the cur|rent rel|
|00003d20| 65 61 73 65 0a 6f 66 20 | 74 68 65 20 73 6f 66 74 |ease.of |the soft|
|00003d30| 77 61 72 65 29 2e 0a 0a | 5c 62 65 67 69 6e 7b 66 |ware)...|\begin{f|
|00003d40| 69 67 75 72 65 7d 5b 74 | 5d 0a 5c 62 65 67 69 6e |igure}[t|].\begin|
|00003d50| 7b 63 65 6e 74 65 72 7d | 0a 5c 73 65 74 6c 65 6e |{center}|.\setlen|
|00003d60| 67 74 68 7b 5c 75 6e 69 | 74 6c 65 6e 67 74 68 7d |gth{\uni|tlength}|
|00003d70| 7b 33 70 74 7d 0a 5c 62 | 65 67 69 6e 7b 70 69 63 |{3pt}.\b|egin{pic|
|00003d80| 74 75 72 65 7d 28 33 31 | 2c 20 33 31 29 28 30 2c |ture}(31|, 31)(0,|
|00003d90| 20 30 29 0a 5c 6e 6f 72 | 6d 61 6c 73 69 7a 65 0a | 0).\nor|malsize.|
|00003da0| 0a 5c 70 75 74 28 30 2c | 20 32 30 29 7b 5c 66 72 |.\put(0,| 20){\fr|
|00003db0| 61 6d 65 62 6f 78 28 31 | 30 2c 20 31 30 29 7b 30 |amebox(1|0, 10){0|
|00003dc0| 7d 7d 0a 5c 70 75 74 28 | 31 30 2c 20 32 30 29 7b |}}.\put(|10, 20){|
|00003dd0| 5c 66 72 61 6d 65 62 6f | 78 28 31 30 2c 20 31 30 |\framebo|x(10, 10|
|00003de0| 29 7b 31 7d 7d 0a 5c 70 | 75 74 28 31 30 2c 20 31 |){1}}.\p|ut(10, 1|
|00003df0| 30 29 7b 5c 66 72 61 6d | 65 62 6f 78 28 31 30 2c |0){\fram|ebox(10,|
|00003e00| 20 31 30 29 7b 33 7d 7d | 0a 5c 70 75 74 28 30 2c | 10){3}}|.\put(0,|
|00003e10| 20 31 30 29 7b 5c 66 72 | 61 6d 65 62 6f 78 28 31 | 10){\fr|amebox(1|
|00003e20| 30 2c 20 31 30 29 7b 32 | 7d 7d 0a 0a 5c 70 75 74 |0, 10){2|}}..\put|
|00003e30| 28 31 31 2c 20 39 29 7b | 5c 64 61 73 68 62 6f 78 |(11, 9){|\dashbox|
|00003e40| 28 31 30 2c 20 31 30 29 | 7b 7d 7d 0a 5c 70 75 74 |(10, 10)|{}}.\put|
|00003e50| 28 32 31 2c 20 39 29 7b | 5c 64 61 73 68 62 6f 78 |(21, 9){|\dashbox|
|00003e60| 28 31 30 2c 20 31 30 29 | 7b 32 7d 7d 0a 5c 70 75 |(10, 10)|{2}}.\pu|
|00003e70| 74 28 32 31 2c 20 2d 31 | 29 7b 5c 64 61 73 68 62 |t(21, -1|){\dashb|
|00003e80| 6f 78 28 31 30 2c 20 31 | 30 29 7b 30 7d 7d 0a 5c |ox(10, 1|0){0}}.\|
|00003e90| 70 75 74 28 31 31 2c 20 | 2d 31 29 7b 5c 64 61 73 |put(11, |-1){\das|
|00003ea0| 68 62 6f 78 28 31 30 2c | 20 31 30 29 7b 31 7d 7d |hbox(10,| 10){1}}|
|00003eb0| 0a 0a 5c 65 6e 64 7b 70 | 69 63 74 75 72 65 7d 0a |..\end{p|icture}.|
|00003ec0| 5c 65 6e 64 7b 63 65 6e | 74 65 72 7d 0a 5c 63 61 |\end{cen|ter}.\ca|
|00003ed0| 70 74 69 6f 6e 7b 4d 61 | 72 67 6f 6c 75 73 20 6e |ption{Ma|rgolus n|
|00003ee0| 65 69 67 68 62 6f 72 68 | 6f 6f 64 7d 0a 5c 6c 61 |eighborh|ood}.\la|
|00003ef0| 62 65 6c 7b 4d 61 72 67 | 6f 6c 75 73 20 6e 65 69 |bel{Marg|olus nei|
|00003f00| 67 68 62 6f 72 68 6f 6f | 64 7d 0a 5c 65 6e 64 7b |ghborhoo|d}.\end{|
|00003f10| 66 69 67 75 72 65 7d 0a | 0a 5c 62 65 67 69 6e 7b |figure}.|.\begin{|
|00003f20| 66 69 67 75 72 65 7d 5b | 74 5d 0a 5c 62 65 67 69 |figure}[|t].\begi|
|00003f30| 6e 7b 63 65 6e 74 65 72 | 7d 0a 5c 62 65 67 69 6e |n{center|}.\begin|
|00003f40| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 20 20 20 20 20 |{verbati|m}. |
|00003f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f60| 20 20 20 20 20 20 20 20 | 30 20 31 20 30 20 31 20 | |0 1 0 1 |
|00003f70| 30 20 31 20 30 20 31 20 | 30 20 31 0a 20 20 20 20 |0 1 0 1 |0 1. |
|00003f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f90| 20 20 20 20 20 20 20 20 | 20 32 20 33 20 32 20 33 | | 2 3 2 3|
|00003fa0| 20 32 20 33 20 32 20 33 | 20 32 20 33 0a 20 20 20 | 2 3 2 3| 2 3. |
|00003fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fc0| 20 20 20 20 20 20 20 20 | 20 20 30 20 31 20 30 20 | | 0 1 0 |
|00003fd0| 31 20 30 20 31 20 30 20 | 31 20 30 20 31 0a 20 20 |1 0 1 0 |1 0 1. |
|00003fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ff0| 20 20 20 20 20 20 20 20 | 20 20 20 32 20 33 20 32 | | 2 3 2|
|00004000| 20 33 20 32 20 33 20 32 | 20 33 20 32 20 33 0a 5c | 3 2 3 2| 3 2 3.\|
|00004010| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0a 5c 65 |end{verb|atim}.\e|
|00004020| 6e 64 7b 63 65 6e 74 65 | 72 7d 0a 5c 63 61 70 74 |nd{cente|r}.\capt|
|00004030| 69 6f 6e 7b 54 68 65 20 | 70 61 74 74 65 72 6e 20 |ion{The |pattern |
|00004040| 6f 66 20 7b 5c 74 74 20 | 77 68 69 63 68 7d 20 66 |of {\tt |which} f|
|00004050| 69 65 6c 64 20 76 61 6c | 75 65 73 20 66 6f 72 20 |ield val|ues for |
|00004060| 74 68 65 20 4d 61 72 67 | 6f 6c 75 73 20 6e 65 69 |the Marg|olus nei|
|00004070| 67 68 62 6f 72 68 6f 6f | 64 7d 0a 5c 6c 61 62 65 |ghborhoo|d}.\labe|
|00004080| 6c 7b 77 68 69 63 68 20 | 4d 61 72 67 6f 6c 75 73 |l{which |Margolus|
|00004090| 7d 0a 5c 65 6e 64 7b 66 | 69 67 75 72 65 7d 0a 0a |}.\end{f|igure}..|
|000040a0| 5c 73 65 63 74 69 6f 6e | 7b 41 64 76 61 6e 63 65 |\section|{Advance|
|000040b0| 64 20 45 78 61 6d 70 6c | 65 73 7d 0a 54 68 69 73 |d Exampl|es}.This|
|000040c0| 20 73 65 63 74 69 6f 6e | 20 65 78 61 6d 69 6e 65 | section| examine|
|000040d0| 73 20 74 77 6f 20 65 78 | 61 6d 70 6c 65 20 70 72 |s two ex|ample pr|
|000040e0| 6f 67 72 61 6d 73 20 74 | 68 61 74 20 64 65 6d 6f |ograms t|hat demo|
|000040f0| 6e 73 74 72 61 74 65 20 | 74 65 63 68 6e 69 71 75 |nstrate |techniqu|
|00004100| 65 73 20 66 6f 72 0a 67 | 65 6e 65 72 61 74 69 6e |es for.g|eneratin|
|00004110| 67 20 74 68 65 20 4d 61 | 72 67 6f 6c 75 73 20 61 |g the Ma|rgolus a|
|00004120| 6e 64 20 68 65 78 61 67 | 6f 6e 61 6c 20 6e 65 69 |nd hexag|onal nei|
|00004130| 67 68 62 6f 72 68 6f 6f | 64 73 2e 20 20 54 68 65 |ghborhoo|ds. The|
|00004140| 20 4d 61 72 67 6f 6c 75 | 73 0a 6e 65 69 67 68 62 | Margolu|s.neighb|
|00004150| 6f 72 68 6f 6f 64 20 77 | 69 6c 6c 20 62 65 20 75 |orhood w|ill be u|
|00004160| 73 65 64 20 69 6e 20 74 | 68 65 20 73 69 6d 75 6c |sed in t|he simul|
|00004170| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 64 69 66 |ation of| the dif|
|00004180| 66 75 73 69 6f 6e 20 6f | 66 20 61 20 0a 67 61 73 |fusion o|f a .gas|
|00004190| 2c 5c 66 6f 6f 74 6e 6f | 74 65 7b 0a 09 09 54 68 |,\footno|te{...Th|
|000041a0| 65 20 70 72 6f 67 72 61 | 6d 20 69 73 20 6d 6f 64 |e progra|m is mod|
|000041b0| 65 6c 65 64 20 63 6c 6f | 73 65 6c 79 20 6f 6e 20 |eled clo|sely on |
|000041c0| 74 68 65 20 76 65 72 73 | 69 6f 6e 0a 09 09 64 65 |the vers|ion...de|
|000041d0| 73 63 72 69 62 65 64 20 | 62 79 20 5c 63 69 74 65 |scribed |by \cite|
|000041e0| 7b 74 6f 66 66 6f 6c 69 | 7d 20 6f 6e 20 70 61 67 |{toffoli|} on pag|
|000041f0| 65 20 31 35 36 2e 0a 09 | 7d 0a 77 68 69 6c 65 20 |e 156...|}.while |
|00004200| 74 68 65 20 68 65 78 61 | 67 6f 6e 61 6c 20 6e 65 |the hexa|gonal ne|
|00004210| 69 67 68 62 6f 72 68 6f | 6f 64 20 69 73 20 75 73 |ighborho|od is us|
|00004220| 65 64 20 74 6f 20 63 61 | 6c 63 75 6c 61 74 65 20 |ed to ca|lculate |
|00004230| 64 69 73 74 61 6e 63 65 | 2e 0a 0a 5c 62 65 67 69 |distance|...\begi|
|00004240| 6e 7b 66 69 67 75 72 65 | 7d 5b 74 62 70 5d 0a 5c |n{figure|}[tbp].\|
|00004250| 62 65 67 69 6e 7b 63 65 | 6e 74 65 72 7d 0a 5c 66 |begin{ce|nter}.\f|
|00004260| 6f 6f 74 6e 6f 74 65 73 | 69 7a 65 0a 5c 62 65 67 |ootnotes|ize.\beg|
|00004270| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0a 32 20 64 |in{verba|tim}.2 d|
|00004280| 69 6d 65 6e 73 69 6f 6e | 73 20 6f 66 20 0a 20 20 |imension|s of . |
|00004290| 20 20 20 20 20 20 77 68 | 69 63 68 20 6f 66 20 30 | wh|ich of 0|
|000042a0| 2e 2e 33 0a 20 20 20 20 | 20 20 20 20 72 61 6e 64 |..3. | rand|
|000042b0| 20 20 6f 66 20 30 2e 2e | 31 0a 20 20 20 20 20 20 | of 0..|1. |
|000042c0| 20 20 67 61 73 20 20 20 | 6f 66 20 30 2e 2e 31 0a | gas |of 0..1.|
|000042d0| 65 6e 64 0a 0a 23 20 43 | 61 6c 63 75 6c 61 74 65 |end..# C|alculate|
|000042e0| 20 74 68 65 20 73 68 61 | 72 65 64 20 72 61 6e 64 | the sha|red rand|
|000042f0| 6f 6d 20 76 61 6c 75 65 | 20 69 6e 20 74 68 65 20 |om value| in the |
|00004300| 62 6c 6f 63 6b 20 6f 66 | 20 34 20 63 65 6c 6c 73 |block of| 4 cells|
|00004310| 2e 0a 72 61 6e 64 6f 6d | 20 3a 3d 20 63 65 6c 6c |..random| := cell|
|00004320| 2e 72 61 6e 64 20 2b 20 | 5b 31 2c 20 30 5d 2e 72 |.rand + |[1, 0].r|
|00004330| 61 6e 64 20 2b 20 5b 31 | 2c 20 2d 31 5d 2e 72 61 |and + [1|, -1].ra|
|00004340| 6e 64 20 2b 20 5b 30 2c | 20 2d 31 5d 2e 72 61 6e |nd + [0,| -1].ran|
|00004350| 64 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d. | |
|00004360| 20 20 77 68 65 6e 20 28 | 63 65 6c 6c 2e 77 68 69 | when (|cell.whi|
|00004370| 63 68 20 3d 20 30 20 26 | 20 74 69 6d 65 25 32 20 |ch = 0 &| time%2 |
|00004380| 3d 20 31 29 20 7c 20 28 | 63 65 6c 6c 2e 77 68 69 |= 1) | (|cell.whi|
|00004390| 63 68 20 3d 20 33 20 26 | 20 74 69 6d 65 25 32 20 |ch = 3 &| time%2 |
|000043a0| 3d 20 30 29 0a 0a 20 20 | 20 20 20 20 20 3a 3d 20 |= 0).. | := |
|000043b0| 5b 2d 31 2c 20 30 5d 2e | 72 61 6e 64 20 2b 20 63 |[-1, 0].|rand + c|
|000043c0| 65 6c 6c 2e 72 61 6e 64 | 20 2b 20 5b 30 2c 20 2d |ell.rand| + [0, -|
|000043d0| 31 5d 2e 72 61 6e 64 20 | 2b 20 5b 2d 31 2c 20 2d |1].rand |+ [-1, -|
|000043e0| 31 5d 2e 72 61 6e 64 0a | 20 20 20 20 20 20 20 20 |1].rand.| |
|000043f0| 20 20 20 20 20 20 20 20 | 77 68 65 6e 20 28 63 65 | |when (ce|
|00004400| 6c 6c 2e 77 68 69 63 68 | 20 3d 20 31 20 26 20 74 |ll.which| = 1 & t|
|00004410| 69 6d 65 25 32 20 3d 20 | 31 29 20 7c 20 28 63 65 |ime%2 = |1) | (ce|
|00004420| 6c 6c 2e 77 68 69 63 68 | 20 3d 20 32 20 26 20 74 |ll.which| = 2 & t|
|00004430| 69 6d 65 25 32 20 3d 20 | 30 29 0a 0a 20 20 20 20 |ime%2 = |0).. |
|00004440| 20 20 20 3a 3d 20 5b 2d | 31 2c 20 31 5d 2e 72 61 | := [-|1, 1].ra|
|00004450| 6e 64 20 2b 20 5b 30 2c | 20 31 5d 2e 72 61 6e 64 |nd + [0,| 1].rand|
|00004460| 20 2b 20 63 65 6c 6c 2e | 72 61 6e 64 20 2b 20 5b | + cell.|rand + [|
|00004470| 2d 31 2c 20 30 5d 2e 72 | 61 6e 64 0a 20 20 20 20 |-1, 0].r|and. |
|00004480| 20 20 20 20 20 20 20 20 | 20 20 20 20 77 68 65 6e | | when|
|00004490| 20 28 63 65 6c 6c 2e 77 | 68 69 63 68 20 3d 20 33 | (cell.w|hich = 3|
|000044a0| 20 26 20 74 69 6d 65 25 | 32 20 3d 20 31 29 20 7c | & time%|2 = 1) ||
|000044b0| 20 28 63 65 6c 6c 2e 77 | 68 69 63 68 20 3d 20 30 | (cell.w|hich = 0|
|000044c0| 20 26 20 74 69 6d 65 25 | 32 20 3d 20 30 29 0a 0a | & time%|2 = 0)..|
|000044d0| 20 20 20 20 20 20 20 3a | 3d 20 5b 30 2c 20 31 5d | :|= [0, 1]|
|000044e0| 2e 72 61 6e 64 20 2b 20 | 5b 31 2c 20 31 5d 2e 72 |.rand + |[1, 1].r|
|000044f0| 61 6e 64 20 2b 20 5b 31 | 2c 20 30 5d 2e 72 61 6e |and + [1|, 0].ran|
|00004500| 64 20 2b 20 63 65 6c 6c | 2e 72 61 6e 64 0a 20 20 |d + cell|.rand. |
|00004510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6f 74 | | ot|
|00004520| 68 65 72 77 69 73 65 0a | 0a 23 20 41 6c 74 65 72 |herwise.|.# Alter|
|00004530| 6e 61 74 65 20 62 65 74 | 77 65 65 6e 20 74 68 65 |nate bet|ween the|
|00004540| 20 6f 76 65 72 6c 61 70 | 70 69 6e 67 20 34 20 63 | overlap|ping 4 c|
|00004550| 65 6c 6c 20 62 6c 6f 63 | 6b 73 0a 69 66 20 74 69 |ell bloc|ks.if ti|
|00004560| 6d 65 25 32 20 3d 20 31 | 20 74 68 65 6e 0a 20 20 |me%2 = 1| then. |
|00004570| 20 20 20 20 20 20 69 66 | 20 72 61 6e 64 6f 6d 25 | if| random%|
|00004580| 32 20 3d 20 31 20 74 68 | 65 6e 0a 20 20 20 20 20 |2 = 1 th|en. |
|00004590| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 43 6c 6f | | # Clo|
|000045a0| 63 6b 77 69 73 65 20 72 | 6f 74 61 74 69 6f 6e 0a |ckwise r|otation.|
|000045b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000045c0| 63 65 6c 6c 2e 67 61 73 | 20 3a 3d 20 5b 30 2c 20 |cell.gas| := [0, |
|000045d0| 2d 31 5d 2e 67 61 73 20 | 77 68 65 6e 20 63 65 6c |-1].gas |when cel|
|000045e0| 6c 2e 77 68 69 63 68 20 | 3d 20 30 0a 20 20 20 20 |l.which |= 0. |
|000045f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004600| 20 20 20 20 20 3a 3d 20 | 5b 2d 31 2c 20 30 5d 2e | := |[-1, 0].|
|00004610| 67 61 73 20 77 68 65 6e | 20 63 65 6c 6c 2e 77 68 |gas when| cell.wh|
|00004620| 69 63 68 20 3d 20 31 0a | 20 20 20 20 20 20 20 20 |ich = 1.| |
|00004630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004640| 20 3a 3d 20 5b 30 2c 20 | 31 5d 2e 67 61 73 20 77 | := [0, |1].gas w|
|00004650| 68 65 6e 20 63 65 6c 6c | 2e 77 68 69 63 68 20 3d |hen cell|.which =|
|00004660| 20 33 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 3. | |
|00004670| 20 20 20 20 20 20 20 20 | 20 20 20 20 3a 3d 20 5b | | := [|
|00004680| 31 2c 20 30 5d 2e 67 61 | 73 20 77 68 65 6e 20 63 |1, 0].ga|s when c|
|00004690| 65 6c 6c 2e 77 68 69 63 | 68 20 3d 20 32 0a 20 20 |ell.whic|h = 2. |
|000046a0| 20 20 20 20 20 20 65 6c | 73 65 0a 20 20 20 20 20 | el|se. |
|000046b0| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 43 6f 75 | | # Cou|
|000046c0| 6e 74 65 72 2d 63 6c 6f | 63 6b 77 69 73 65 20 72 |nter-clo|ckwise r|
|000046d0| 6f 74 61 74 69 6f 6e 0a | 20 20 20 20 20 20 20 20 |otation.| |
|000046e0| 20 20 20 20 20 20 20 20 | 63 65 6c 6c 2e 67 61 73 | |cell.gas|
|000046f0| 20 3a 3d 20 5b 31 2c 20 | 30 5d 2e 67 61 73 20 77 | := [1, |0].gas w|
|00004700| 68 65 6e 20 63 65 6c 6c | 2e 77 68 69 63 68 20 3d |hen cell|.which =|
|00004710| 20 30 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 0. | |
|00004720| 20 20 20 20 20 20 20 20 | 20 20 20 20 3a 3d 20 5b | | := [|
|00004730| 30 2c 20 2d 31 5d 2e 67 | 61 73 20 77 68 65 6e 20 |0, -1].g|as when |
|00004740| 63 65 6c 6c 2e 77 68 69 | 63 68 20 3d 20 31 0a 20 |cell.whi|ch = 1. |
|00004750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004760| 20 20 20 20 20 20 20 20 | 3a 3d 20 5b 2d 31 2c 20 | |:= [-1, |
|00004770| 30 5d 2e 67 61 73 20 77 | 68 65 6e 20 63 65 6c 6c |0].gas w|hen cell|
|00004780| 2e 77 68 69 63 68 20 3d | 20 33 0a 20 20 20 20 20 |.which =| 3. |
|00004790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000047a0| 20 20 20 20 3a 3d 20 5b | 30 2c 20 31 5d 2e 67 61 | := [|0, 1].ga|
|000047b0| 73 20 77 68 65 6e 20 63 | 65 6c 6c 2e 77 68 69 63 |s when c|ell.whic|
|000047c0| 68 20 3d 20 32 0a 20 20 | 20 20 20 20 20 20 65 6e |h = 2. | en|
|000047d0| 64 0a 65 6c 73 65 0a 20 | 20 20 20 20 20 20 20 69 |d.else. | i|
|000047e0| 66 20 72 61 6e 64 6f 6d | 25 32 20 3d 20 31 20 74 |f random|%2 = 1 t|
|000047f0| 68 65 6e 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |hen. | |
|00004800| 20 20 20 20 23 20 43 6c | 6f 63 6b 77 69 73 65 20 | # Cl|ockwise |
|00004810| 72 6f 74 61 74 69 6f 6e | 0a 20 20 20 20 20 20 20 |rotation|. |
|00004820| 20 20 20 20 20 20 20 20 | 20 63 65 6c 6c 2e 67 61 | | cell.ga|
|00004830| 73 20 3a 3d 20 5b 30 2c | 20 2d 31 5d 2e 67 61 73 |s := [0,| -1].gas|
|00004840| 20 77 68 65 6e 20 63 65 | 6c 6c 2e 77 68 69 63 68 | when ce|ll.which|
|00004850| 20 3d 20 33 0a 20 20 20 | 20 20 20 20 20 20 20 20 | = 3. | |
|00004860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3a 3d | | :=|
|00004870| 20 5b 2d 31 2c 20 30 5d | 2e 67 61 73 20 77 68 65 | [-1, 0]|.gas whe|
|00004880| 6e 20 63 65 6c 6c 2e 77 | 68 69 63 68 20 3d 20 32 |n cell.w|hich = 2|
|00004890| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000048a0| 20 20 20 20 20 20 20 20 | 20 20 3a 3d 20 5b 30 2c | | := [0,|
|000048b0| 20 31 5d 2e 67 61 73 20 | 77 68 65 6e 20 63 65 6c | 1].gas |when cel|
|000048c0| 6c 2e 77 68 69 63 68 20 | 3d 20 30 0a 20 20 20 20 |l.which |= 0. |
|000048d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048e0| 20 20 20 20 20 3a 3d 20 | 5b 31 2c 20 30 5d 2e 67 | := |[1, 0].g|
|000048f0| 61 73 20 77 68 65 6e 20 | 63 65 6c 6c 2e 77 68 69 |as when |cell.whi|
|00004900| 63 68 20 3d 20 31 0a 20 | 20 20 20 20 20 20 20 65 |ch = 1. | e|
|00004910| 6c 73 65 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |lse. | |
|00004920| 20 20 20 20 23 20 43 6f | 75 6e 74 65 72 2d 63 6c | # Co|unter-cl|
|00004930| 6f 63 6b 77 69 73 65 20 | 72 6f 74 61 74 69 6f 6e |ockwise |rotation|
|00004940| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004950| 20 63 65 6c 6c 2e 67 61 | 73 20 3a 3d 20 5b 31 2c | cell.ga|s := [1,|
|00004960| 20 30 5d 2e 67 61 73 20 | 77 68 65 6e 20 63 65 6c | 0].gas |when cel|
|00004970| 6c 2e 77 68 69 63 68 20 | 3d 20 33 0a 20 20 20 20 |l.which |= 3. |
|00004980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004990| 20 20 20 20 20 3a 3d 20 | 5b 30 2c 20 2d 31 5d 2e | := |[0, -1].|
|000049a0| 67 61 73 20 77 68 65 6e | 20 63 65 6c 6c 2e 77 68 |gas when| cell.wh|
|000049b0| 69 63 68 20 3d 20 32 0a | 20 20 20 20 20 20 20 20 |ich = 2.| |
|000049c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000049d0| 20 3a 3d 20 5b 2d 31 2c | 20 30 5d 2e 67 61 73 20 | := [-1,| 0].gas |
|000049e0| 77 68 65 6e 20 63 65 6c | 6c 2e 77 68 69 63 68 20 |when cel|l.which |
|000049f0| 3d 20 30 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |= 0. | |
|00004a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3a 3d 20 | | := |
|00004a10| 5b 30 2c 20 31 5d 2e 67 | 61 73 20 77 68 65 6e 20 |[0, 1].g|as when |
|00004a20| 63 65 6c 6c 2e 77 68 69 | 63 68 20 3d 20 31 0a 20 |cell.whi|ch = 1. |
|00004a30| 20 20 20 20 20 20 20 65 | 6e 64 0a 65 6e 64 0a 0a | e|nd.end..|
|00004a40| 23 20 53 74 69 72 20 74 | 68 65 20 72 61 6e 64 6f |# Stir t|he rando|
|00004a50| 6d 20 76 61 6c 75 65 73 | 2c 20 73 6f 20 74 68 61 |m values|, so tha|
|00004a60| 74 20 74 68 65 79 20 6b | 65 65 70 20 63 68 61 6e |t they k|eep chan|
|00004a70| 67 69 6e 67 2e 0a 63 65 | 6c 6c 2e 72 61 6e 64 20 |ging..ce|ll.rand |
|00004a80| 3a 3d 20 28 5b 31 2c 20 | 30 5d 2e 72 61 6e 64 20 |:= ([1, |0].rand |
|00004a90| 2b 20 5b 30 2c 20 31 5d | 2e 72 61 6e 64 20 2b 20 |+ [0, 1]|.rand + |
|00004aa0| 5b 2d 31 2c 20 30 5d 2e | 72 61 6e 64 20 2b 20 5b |[-1, 0].|rand + [|
|00004ab0| 30 2c 20 2d 31 5d 2e 72 | 61 6e 64 20 2b 20 63 65 |0, -1].r|and + ce|
|00004ac0| 6c 6c 2e 72 61 6e 64 29 | 25 32 0a 5c 65 6e 64 7b |ll.rand)|%2.\end{|
|00004ad0| 76 65 72 62 61 74 69 6d | 7d 0a 5c 65 6e 64 7b 63 |verbatim|}.\end{c|
|00004ae0| 65 6e 74 65 72 7d 0a 5c | 63 61 70 74 69 6f 6e 7b |enter}.\|caption{|
|00004af0| 47 61 73 20 64 69 66 66 | 75 73 69 6f 6e 20 75 73 |Gas diff|usion us|
|00004b00| 69 6e 67 20 61 20 4d 61 | 72 67 6f 6c 75 73 20 6e |ing a Ma|rgolus n|
|00004b10| 65 69 67 68 62 6f 72 68 | 6f 6f 64 7d 0a 5c 6c 61 |eighborh|ood}.\la|
|00004b20| 62 65 6c 7b 67 61 73 20 | 64 69 66 66 75 73 69 6f |bel{gas |diffusio|
|00004b30| 6e 7d 0a 5c 65 6e 64 7b | 66 69 67 75 72 65 7d 0a |n}.\end{|figure}.|
|00004b40| 0a 5c 73 75 62 73 65 63 | 74 69 6f 6e 7b 4d 61 72 |.\subsec|tion{Mar|
|00004b50| 67 6f 6c 75 73 20 4e 65 | 69 67 68 62 6f 72 68 6f |golus Ne|ighborho|
|00004b60| 6f 64 7d 0a 47 61 73 20 | 64 69 66 66 75 73 69 6f |od}.Gas |diffusio|
|00004b70| 6e 20 63 61 6e 20 62 65 | 20 73 69 6d 75 6c 61 74 |n can be| simulat|
|00004b80| 65 64 20 62 79 20 69 6d | 70 6c 65 6d 65 6e 74 69 |ed by im|plementi|
|00004b90| 6e 67 20 61 20 72 61 6e | 64 6f 6d 20 77 61 6c 6b |ng a ran|dom walk|
|00004ba0| 20 66 6f 72 20 65 61 63 | 68 0a 70 61 72 74 69 63 | for eac|h.partic|
|00004bb0| 6c 65 2f 6d 6f 6c 65 63 | 75 6c 65 20 6f 66 20 67 |le/molec|ule of g|
|00004bc0| 61 73 2e 0a 54 68 65 20 | 72 61 6e 64 6f 6d 20 77 |as..The |random w|
|00004bd0| 61 6c 6b 20 63 61 6e 20 | 62 65 20 69 6d 70 6c 65 |alk can |be imple|
|00004be0| 6d 65 6e 74 65 64 20 62 | 79 20 75 73 69 6e 67 20 |mented b|y using |
|00004bf0| 6e 6f 6e 2d 2d 6f 76 65 | 72 6c 61 70 70 69 6e 67 |non--ove|rlapping|
|00004c00| 0a 62 6c 6f 63 6b 73 20 | 6f 66 20 66 6f 75 72 20 |.blocks |of four |
|00004c10| 63 65 6c 6c 73 20 28 74 | 77 6f 20 6f 6e 20 61 20 |cells (t|wo on a |
|00004c20| 73 69 64 65 29 20 77 68 | 69 63 68 20 61 72 65 20 |side) wh|ich are |
|00004c30| 6f 66 66 73 65 74 20 61 | 74 20 61 6c 74 65 72 6e |offset a|t altern|
|00004c40| 61 74 65 20 74 69 6d 65 | 73 0a 28 4d 61 72 67 6f |ate time|s.(Margo|
|00004c50| 6c 75 73 20 6e 65 69 67 | 68 62 6f 72 68 6f 6f 64 |lus neig|hborhood|
|00004c60| 29 20 61 6e 64 20 68 61 | 76 69 6e 67 20 65 61 63 |) and ha|ving eac|
|00004c70| 68 20 62 6c 6f 63 6b 20 | 6f 66 20 63 65 6c 6c 73 |h block |of cells|
|00004c80| 20 72 61 6e 64 6f 6d 6c | 79 20 72 6f 74 61 74 65 | randoml|y rotate|
|00004c90| 20 74 68 65 69 72 20 0a | 67 61 73 20 70 61 72 74 | their .|gas part|
|00004ca0| 69 63 6c 65 73 20 65 69 | 74 68 65 72 20 63 6c 6f |icles ei|ther clo|
|00004cb0| 63 6b 77 69 73 65 20 6f | 72 20 0a 63 6f 75 6e 74 |ckwise o|r .count|
|00004cc0| 65 72 2d 2d 63 6c 6f 63 | 6b 77 69 73 65 2e 0a 0a |er--cloc|kwise...|
|00004cd0| 54 6f 20 62 65 74 74 65 | 72 20 75 6e 64 65 72 73 |To bette|r unders|
|00004ce0| 74 61 6e 64 20 74 68 65 | 20 4d 61 72 67 6f 6c 75 |tand the| Margolu|
|00004cf0| 73 20 6e 65 69 67 68 62 | 6f 72 68 6f 6f 64 2c 20 |s neighb|orhood, |
|00004d00| 63 6f 6e 73 69 64 65 72 | 20 0a 46 69 67 75 72 65 |consider| .Figure|
|00004d10| 7e 5c 72 65 66 7b 4d 61 | 72 67 6f 6c 75 73 20 6e |~\ref{Ma|rgolus n|
|00004d20| 65 69 67 68 62 6f 72 68 | 6f 6f 64 7d 2e 20 20 54 |eighborh|ood}. T|
|00004d30| 68 65 20 66 6f 75 72 20 | 63 65 6c 6c 20 62 6c 6f |he four |cell blo|
|00004d40| 63 6b 20 77 69 74 68 20 | 61 20 73 6f 6c 69 64 0a |ck with |a solid.|
|00004d50| 6f 75 74 6c 69 6e 65 2c | 20 61 6e 64 20 74 68 65 |outline,| and the|
|00004d60| 20 6f 74 68 65 72 20 77 | 69 74 68 20 74 68 65 20 | other w|ith the |
|00004d70| 64 61 73 68 65 64 20 6f | 75 74 6c 69 6e 65 2c 20 |dashed o|utline, |
|00004d80| 77 6f 75 6c 64 20 62 65 | 20 75 73 65 64 20 61 74 |would be| used at|
|00004d90| 0a 61 6c 74 65 72 6e 61 | 74 65 20 74 69 6d 65 73 |.alterna|te times|
|00004da0| 2e 20 20 41 74 20 61 6e | 79 20 70 61 72 74 69 63 |. At an|y partic|
|00004db0| 75 6c 61 72 20 74 69 6d | 65 2c 20 68 6f 77 65 76 |ular tim|e, howev|
|00004dc0| 65 72 2c 20 74 68 65 20 | 75 6e 69 76 65 72 73 65 |er, the |universe|
|00004dd0| 20 6f 66 20 63 65 6c 6c | 73 20 0a 69 73 20 63 6f | of cell|s .is co|
|00004de0| 6d 70 6c 65 74 65 6c 79 | 20 63 6f 76 65 72 65 64 |mpletely| covered|
|00004df0| 20 62 79 20 61 20 6e 6f | 6e 2d 2d 6f 76 65 72 6c | by a no|n--overl|
|00004e00| 61 70 70 69 6e 67 20 73 | 65 74 20 6f 66 20 62 6c |apping s|et of bl|
|00004e10| 6f 63 6b 73 2e 20 20 54 | 6f 20 69 6d 70 6c 65 6d |ocks. T|o implem|
|00004e20| 65 6e 74 0a 61 20 4d 61 | 72 67 6f 6c 75 73 20 6e |ent.a Ma|rgolus n|
|00004e30| 65 69 67 68 62 6f 72 68 | 6f 6f 64 20 69 6e 20 7b |eighborh|ood in {|
|00004e40| 5c 65 6d 20 43 65 6c 6c | 61 6e 67 20 32 2e 30 7d |\em Cell|ang 2.0}|
|00004e50| 20 72 65 71 75 69 72 65 | 73 20 75 73 65 20 6f 66 | require|s use of|
|00004e60| 20 74 68 65 20 7b 5c 74 | 74 0a 74 69 6d 65 7d 20 | the {\t|t.time} |
|00004e70| 76 61 72 69 61 62 6c 65 | 20 61 6e 64 20 73 6f 6d |variable| and som|
|00004e80| 65 20 77 61 79 20 6f 66 | 20 64 69 73 74 69 6e 67 |e way of| disting|
|00004e90| 75 69 73 68 69 6e 67 20 | 62 65 74 77 65 65 6e 20 |uishing |between |
|00004ea0| 64 69 66 66 65 72 65 6e | 74 20 62 6c 6f 63 6b 73 |differen|t blocks|
|00004eb0| 0a 6f 66 20 34 20 63 65 | 6c 6c 73 2e 20 20 54 68 |.of 4 ce|lls. Th|
|00004ec0| 65 20 6c 61 74 74 65 72 | 20 69 73 20 61 63 63 6f |e latter| is acco|
|00004ed0| 6d 70 6c 69 73 68 65 64 | 20 62 79 20 69 6e 74 72 |mplished| by intr|
|00004ee0| 6f 64 75 63 69 6e 67 20 | 61 20 66 69 65 6c 64 2c |oducing |a field,|
|00004ef0| 20 7b 5c 74 74 20 77 68 | 69 63 68 7d 2c 0a 74 68 | {\tt wh|ich},.th|
|00004f00| 61 74 20 63 6f 6e 74 61 | 69 6e 73 20 61 20 76 61 |at conta|ins a va|
|00004f10| 6c 75 65 2c 20 30 20 74 | 6f 20 33 2c 20 69 6e 64 |lue, 0 t|o 3, ind|
|00004f20| 69 63 61 74 69 6e 67 20 | 74 68 65 20 63 65 6c 6c |icating |the cell|
|00004f30| 73 20 72 65 6c 61 74 69 | 76 65 20 70 6f 73 69 74 |s relati|ve posit|
|00004f40| 69 6f 6e 20 69 6e 0a 74 | 68 65 20 62 6c 6f 63 6b |ion in.t|he block|
|00004f50| 2e 20 20 41 20 70 6f 72 | 74 69 6f 6e 20 6f 66 20 |. A por|tion of |
|00004f60| 74 68 65 20 63 65 6c 6c | 20 75 6e 69 76 65 72 73 |the cell| univers|
|00004f70| 65 20 7b 5c 74 74 20 77 | 68 69 63 68 7d 20 76 61 |e {\tt w|hich} va|
|00004f80| 6c 75 65 73 0a 61 72 65 | 20 73 68 6f 77 6e 20 69 |lues.are| shown i|
|00004f90| 6e 20 46 69 67 75 72 65 | 7e 5c 72 65 66 7b 77 68 |n Figure|~\ref{wh|
|00004fa0| 69 63 68 20 4d 61 72 67 | 6f 6c 75 73 7d 2e 0a 0a |ich Marg|olus}...|
|00004fb0| 4e 6f 77 20 74 68 61 74 | 20 74 68 65 20 66 6f 75 |Now that| the fou|
|00004fc0| 72 20 63 65 6c 6c 20 62 | 6c 6f 63 6b 20 63 61 6e |r cell b|lock can|
|00004fd0| 20 62 65 20 69 64 65 6e | 74 69 66 69 65 64 2c 20 | be iden|tified, |
|00004fe0| 61 20 72 61 6e 64 6f 6d | 20 6e 75 6d 62 65 72 2c |a random| number,|
|00004ff0| 20 63 6f 6d 6d 6f 6e 0a | 74 6f 20 65 61 63 68 20 | common.|to each |
|00005000| 63 65 6c 6c 20 69 6e 20 | 74 68 65 20 62 6c 6f 63 |cell in |the bloc|
|00005010| 6b 2c 20 6d 75 73 74 20 | 62 65 20 67 65 6e 65 72 |k, must |be gener|
|00005020| 61 74 65 64 2e 20 20 54 | 68 69 73 20 69 73 20 64 |ated. T|his is d|
|00005030| 6f 6e 65 20 62 79 20 68 | 61 76 69 6e 67 0a 65 61 |one by h|aving.ea|
|00005040| 63 68 20 63 65 6c 6c 20 | 6d 61 69 6e 74 61 69 6e |ch cell |maintain|
|00005050| 20 61 20 74 77 6f 20 76 | 61 6c 75 65 20 28 30 20 | a two v|alue (0 |
|00005060| 6f 72 20 31 29 20 7b 5c | 74 74 20 72 61 6e 64 7d |or 1) {\|tt rand}|
|00005070| 20 66 69 65 6c 64 2e 20 | 20 42 79 20 75 73 69 6e | field. | By usin|
|00005080| 67 20 7b 5c 74 74 20 74 | 69 6d 65 7d 0a 61 6e 64 |g {\tt t|ime}.and|
|00005090| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 7b 5c | the val|ue of {\|
|000050a0| 74 74 20 77 68 69 63 68 | 7d 20 61 20 72 61 6e 64 |tt which|} a rand|
|000050b0| 6f 6d 20 6e 75 6d 62 65 | 72 2c 20 60 60 73 68 61 |om numbe|r, ``sha|
|000050c0| 72 65 64 27 27 20 62 79 | 20 65 61 63 68 20 63 65 |red'' by| each ce|
|000050d0| 6c 6c 20 6f 66 20 74 68 | 65 0a 62 6c 6f 63 6b 2c |ll of th|e.block,|
|000050e0| 20 63 61 6e 20 62 65 20 | 63 61 6c 63 75 6c 61 74 | can be |calculat|
|000050f0| 65 64 2e 20 20 54 68 69 | 73 20 72 61 6e 64 6f 6d |ed. Thi|s random|
|00005100| 20 6e 75 6d 62 65 72 20 | 69 73 20 75 73 65 64 20 | number |is used |
|00005110| 74 6f 20 64 65 74 65 72 | 6d 69 6e 65 20 77 68 65 |to deter|mine whe|
|00005120| 74 68 65 72 0a 74 68 65 | 20 70 61 72 74 69 63 6c |ther.the| particl|
|00005130| 65 73 20 6f 66 20 67 61 | 73 2c 20 64 65 6e 6f 74 |es of ga|s, denot|
|00005140| 65 64 20 62 79 20 74 68 | 65 20 76 61 6c 75 65 20 |ed by th|e value |
|00005150| 6f 66 20 74 68 65 20 7b | 5c 74 74 20 67 61 73 7d |of the {|\tt gas}|
|00005160| 20 66 69 65 6c 64 73 2c | 0a 61 72 65 20 72 6f 74 | fields,|.are rot|
|00005170| 61 74 65 64 20 63 6c 6f | 63 6b 77 69 73 65 20 6f |ated clo|ckwise o|
|00005180| 72 20 63 6f 75 6e 74 65 | 72 2d 2d 63 6c 6f 63 6b |r counte|r--clock|
|00005190| 77 69 73 65 2e 0a 54 6f | 20 6d 61 69 6e 74 61 69 |wise..To| maintai|
|000051a0| 6e 20 61 6e 20 65 76 65 | 72 20 63 68 61 6e 67 69 |n an eve|r changi|
|000051b0| 6e 67 20 7b 5c 74 74 20 | 72 61 6e 64 7d 20 66 69 |ng {\tt |rand} fi|
|000051c0| 65 6c 64 0a 66 6f 72 20 | 65 61 63 68 20 63 65 6c |eld.for |each cel|
|000051d0| 6c 2c 20 61 20 6e 65 77 | 20 76 61 6c 75 65 20 69 |l, a new| value i|
|000051e0| 73 20 63 61 6c 63 75 6c | 61 74 65 64 20 75 73 69 |s calcul|ated usi|
|000051f0| 6e 67 20 74 68 65 20 56 | 6f 6e 20 4e 65 75 6d 61 |ng the V|on Neuma|
|00005200| 6e 6e 20 6e 65 69 67 68 | 62 6f 72 68 6f 6f 64 2e |nn neigh|borhood.|
|00005210| 0a 54 68 65 20 7b 5c 65 | 6d 20 43 65 6c 6c 61 6e |.The {\e|m Cellan|
|00005220| 67 20 32 2e 30 7d 20 70 | 72 6f 67 72 61 6d 20 74 |g 2.0} p|rogram t|
|00005230| 68 61 74 20 69 6d 70 6c | 65 6d 65 6e 74 73 20 67 |hat impl|ements g|
|00005240| 61 73 20 64 69 66 66 75 | 73 69 6f 6e 20 69 73 20 |as diffu|sion is |
|00005250| 73 68 6f 77 6e 20 69 6e | 20 0a 46 69 67 75 72 65 |shown in| .Figure|
|00005260| 7e 5c 72 65 66 7b 67 61 | 73 20 64 69 66 66 75 73 |~\ref{ga|s diffus|
|00005270| 69 6f 6e 7d 2e 20 20 0a | 0a 5c 62 65 67 69 6e 7b |ion}. .|.\begin{|
|00005280| 66 69 67 75 72 65 7d 5b | 74 62 70 5d 0a 5c 62 65 |figure}[|tbp].\be|
|00005290| 67 69 6e 7b 63 65 6e 74 | 65 72 7d 0a 5c 73 65 74 |gin{cent|er}.\set|
|000052a0| 6c 65 6e 67 74 68 7b 5c | 75 6e 69 74 6c 65 6e 67 |length{\|unitleng|
|000052b0| 74 68 7d 7b 34 70 74 7d | 0a 5c 62 65 67 69 6e 7b |th}{4pt}|.\begin{|
|000052c0| 70 69 63 74 75 72 65 7d | 28 38 30 2c 20 36 30 29 |picture}|(80, 60)|
|000052d0| 28 30 2c 20 30 29 0a 0a | 5c 6d 75 6c 74 69 70 75 |(0, 0)..|\multipu|
|000052e0| 74 28 31 30 2c 20 34 30 | 29 28 32 30 2c 20 30 29 |t(10, 40|)(20, 0)|
|000052f0| 7b 33 7d 7b 5c 66 72 61 | 6d 65 62 6f 78 28 31 30 |{3}{\fra|mebox(10|
|00005300| 2c 20 32 30 29 0a 09 7b | 5c 73 68 6f 72 74 73 74 |, 20)..{|\shortst|
|00005310| 61 63 6b 7b 5c 2c 6e 5c | 76 73 70 61 63 65 7b 31 |ack{\,n\|vspace{1|
|00005320| 65 78 7d 5c 5c 0a 09 09 | 09 5c 2c 20 6e 77 20 5c |ex}\\...|.\, nw \|
|00005330| 20 20 6e 65 20 5c 76 73 | 70 61 63 65 7b 36 2e 32 | ne \vs|pace{6.2|
|00005340| 65 78 7d 5c 5c 0a 09 09 | 09 5c 2c 20 73 77 20 5c |ex}\\...|.\, sw \|
|00005350| 20 5c 2c 20 73 65 20 5c | 76 73 70 61 63 65 7b 31 | \, se \|vspace{1|
|00005360| 65 78 7d 5c 5c 0a 09 09 | 09 73 7d 7d 7d 0a 5c 6d |ex}\\...|.s}}}.\m|
|00005370| 75 6c 74 69 70 75 74 28 | 31 30 2c 20 32 30 29 28 |ultiput(|10, 20)(|
|00005380| 32 30 2c 20 30 29 7b 33 | 7d 7b 5c 66 72 61 6d 65 |20, 0){3|}{\frame|
|00005390| 62 6f 78 28 31 30 2c 20 | 32 30 29 0a 09 7b 5c 73 |box(10, |20)..{\s|
|000053a0| 68 6f 72 74 73 74 61 63 | 6b 7b 5c 2c 6e 5c 76 73 |hortstac|k{\,n\vs|
|000053b0| 70 61 63 65 7b 31 65 78 | 7d 5c 5c 0a 09 09 09 5c |pace{1ex|}\\....\|
|000053c0| 2c 20 6e 77 20 5c 20 20 | 6e 65 20 5c 76 73 70 61 |, nw \ |ne \vspa|
|000053d0| 63 65 7b 36 2e 32 65 78 | 7d 5c 5c 0a 09 09 09 5c |ce{6.2ex|}\\....\|
|000053e0| 2c 20 73 77 20 5c 20 5c | 2c 20 73 65 20 5c 76 73 |, sw \ \|, se \vs|
|000053f0| 70 61 63 65 7b 31 65 78 | 7d 5c 5c 0a 09 09 09 73 |pace{1ex|}\\....s|
|00005400| 7d 7d 7d 0a 5c 6d 75 6c | 74 69 70 75 74 28 31 30 |}}}.\mul|tiput(10|
|00005410| 2c 20 30 29 28 32 30 2c | 20 30 29 7b 33 7d 7b 5c |, 0)(20,| 0){3}{\|
|00005420| 66 72 61 6d 65 62 6f 78 | 28 31 30 2c 20 32 30 29 |framebox|(10, 20)|
|00005430| 0a 09 7b 5c 73 68 6f 72 | 74 73 74 61 63 6b 7b 5c |..{\shor|tstack{\|
|00005440| 2c 6e 5c 76 73 70 61 63 | 65 7b 31 65 78 7d 5c 5c |,n\vspac|e{1ex}\\|
|00005450| 0a 09 09 09 5c 2c 20 6e | 77 20 5c 20 20 6e 65 20 |....\, n|w \ ne |
|00005460| 5c 76 73 70 61 63 65 7b | 36 2e 32 65 78 7d 5c 5c |\vspace{|6.2ex}\\|
|00005470| 0a 09 09 09 5c 2c 20 73 | 77 20 5c 20 5c 2c 20 73 |....\, s|w \ \, s|
|00005480| 65 20 5c 76 73 70 61 63 | 65 7b 31 65 78 7d 5c 5c |e \vspac|e{1ex}\\|
|00005490| 0a 09 09 09 73 7d 7d 7d | 0a 0a 5c 6d 75 6c 74 69 |....s}}}|..\multi|
|000054a0| 70 75 74 28 30 2c 20 33 | 30 29 28 32 30 2c 20 30 |put(0, 3|0)(20, 0|
|000054b0| 29 7b 34 7d 7b 5c 66 72 | 61 6d 65 62 6f 78 28 31 |){4}{\fr|amebox(1|
|000054c0| 30 2c 20 32 30 29 0a 09 | 7b 5c 73 68 6f 72 74 73 |0, 20)..|{\shorts|
|000054d0| 74 61 63 6b 7b 5c 2c 6e | 5c 76 73 70 61 63 65 7b |tack{\,n|\vspace{|
|000054e0| 31 65 78 7d 5c 5c 0a 09 | 09 09 5c 2c 20 6e 77 20 |1ex}\\..|..\, nw |
|000054f0| 5c 20 20 6e 65 20 5c 76 | 73 70 61 63 65 7b 36 2e |\ ne \v|space{6.|
|00005500| 32 65 78 7d 5c 5c 0a 09 | 09 09 5c 2c 20 73 77 20 |2ex}\\..|..\, sw |
|00005510| 5c 20 5c 2c 20 73 65 20 | 5c 76 73 70 61 63 65 7b |\ \, se |\vspace{|
|00005520| 31 65 78 7d 5c 5c 0a 09 | 09 09 73 7d 7d 7d 0a 5c |1ex}\\..|..s}}}.\|
|00005530| 6d 75 6c 74 69 70 75 74 | 28 30 2c 20 31 30 29 28 |multiput|(0, 10)(|
|00005540| 32 30 2c 20 30 29 7b 34 | 7d 7b 5c 66 72 61 6d 65 |20, 0){4|}{\frame|
|00005550| 62 6f 78 28 31 30 2c 20 | 32 30 29 0a 09 7b 5c 73 |box(10, |20)..{\s|
|00005560| 68 6f 72 74 73 74 61 63 | 6b 7b 5c 2c 6e 5c 76 73 |hortstac|k{\,n\vs|
|00005570| 70 61 63 65 7b 31 65 78 | 7d 5c 5c 0a 09 09 09 5c |pace{1ex|}\\....\|
|00005580| 2c 20 6e 77 20 5c 20 20 | 6e 65 20 5c 76 73 70 61 |, nw \ |ne \vspa|
|00005590| 63 65 7b 36 2e 32 65 78 | 7d 5c 5c 0a 09 09 09 5c |ce{6.2ex|}\\....\|
|000055a0| 2c 20 73 77 20 5c 20 5c | 2c 20 73 65 20 5c 76 73 |, sw \ \|, se \vs|
|000055b0| 70 61 63 65 7b 31 65 78 | 7d 5c 5c 0a 09 09 09 73 |pace{1ex|}\\....s|
|000055c0| 7d 7d 7d 0a 0a 5c 65 6e | 64 7b 70 69 63 74 75 72 |}}}..\en|d{pictur|
|000055d0| 65 7d 0a 5c 65 6e 64 7b | 63 65 6e 74 65 72 7d 0a |e}.\end{|center}.|
|000055e0| 5c 63 61 70 74 69 6f 6e | 7b 41 20 70 6f 72 74 69 |\caption|{A porti|
|000055f0| 6f 6e 20 6f 66 20 61 20 | 60 60 73 71 75 65 65 7a |on of a |``squeez|
|00005600| 65 64 27 27 20 68 65 78 | 61 67 6f 6e 61 6c 20 75 |ed'' hex|agonal u|
|00005610| 6e 69 76 65 72 73 65 7d | 0a 5c 6c 61 62 65 6c 7b |niverse}|.\label{|
|00005620| 68 65 78 61 67 6f 6e 73 | 7d 0a 5c 65 6e 64 7b 66 |hexagons|}.\end{f|
|00005630| 69 67 75 72 65 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |igure}..|\begin{f|
|00005640| 69 67 75 72 65 7d 5b 74 | 62 70 5d 0a 5c 62 65 67 |igure}[t|bp].\beg|
|00005650| 69 6e 7b 63 65 6e 74 65 | 72 7d 0a 5c 62 65 67 69 |in{cente|r}.\begi|
|00005660| 6e 7b 76 65 72 62 61 74 | 69 6d 7d 0a 20 20 20 20 |n{verbat|im}. |
|00005670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005680| 20 20 20 20 20 20 20 20 | 20 30 20 31 20 30 20 31 | | 0 1 0 1|
|00005690| 20 30 20 31 20 30 20 31 | 20 30 20 31 0a 20 20 20 | 0 1 0 1| 0 1. |
|000056a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000056b0| 20 20 20 20 20 20 20 20 | 20 20 31 20 30 20 31 20 | | 1 0 1 |
|000056c0| 30 20 31 20 30 20 31 20 | 30 20 31 20 30 0a 20 20 |0 1 0 1 |0 1 0. |
|000056d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000056e0| 20 20 20 20 20 20 20 20 | 20 20 20 30 20 31 20 30 | | 0 1 0|
|000056f0| 20 31 20 30 20 31 20 30 | 20 31 20 30 20 31 0a 20 | 1 0 1 0| 1 0 1. |
|00005700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005710| 20 20 20 20 20 20 20 20 | 20 20 20 20 31 20 30 20 | | 1 0 |
|00005720| 31 20 30 20 31 20 30 20 | 31 20 30 20 31 20 30 0a |1 0 1 0 |1 0 1 0.|
|00005730| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 0a 5c |\end{ver|batim}.\|
|00005740| 65 6e 64 7b 63 65 6e 74 | 65 72 7d 0a 5c 63 61 70 |end{cent|er}.\cap|
|00005750| 74 69 6f 6e 7b 54 68 65 | 20 70 61 74 74 65 72 6e |tion{The| pattern|
|00005760| 20 6f 66 20 7b 5c 74 74 | 20 77 68 69 63 68 7d 20 | of {\tt| which} |
|00005770| 66 69 65 6c 64 20 76 61 | 6c 75 65 73 20 66 6f 72 |field va|lues for|
|00005780| 20 74 68 65 20 68 65 78 | 61 67 6f 6e 61 6c 20 6e | the hex|agonal n|
|00005790| 65 69 67 68 62 6f 72 68 | 6f 6f 64 7d 0a 5c 6c 61 |eighborh|ood}.\la|
|000057a0| 62 65 6c 7b 77 68 69 63 | 68 20 68 65 78 61 67 6f |bel{whic|h hexago|
|000057b0| 6e 7d 0a 5c 65 6e 64 7b | 66 69 67 75 72 65 7d 0a |n}.\end{|figure}.|
|000057c0| 0a 5c 73 75 62 73 65 63 | 74 69 6f 6e 7b 48 65 78 |.\subsec|tion{Hex|
|000057d0| 61 67 6f 6e 61 6c 20 4e | 65 69 67 68 62 6f 72 68 |agonal N|eighborh|
|000057e0| 6f 6f 64 7d 0a 48 65 78 | 61 67 6f 6e 61 6c 20 6e |ood}.Hex|agonal n|
|000057f0| 65 69 67 68 62 6f 72 68 | 6f 6f 64 73 20 65 78 68 |eighborh|oods exh|
|00005800| 69 62 69 74 20 70 72 6f | 70 65 72 74 69 65 73 20 |ibit pro|perties |
|00005810| 64 65 73 69 72 61 62 6c | 65 20 69 6e 20 74 68 65 |desirabl|e in the|
|00005820| 20 73 69 6d 75 6c 61 74 | 69 6f 6e 0a 6f 66 20 6d | simulat|ion.of m|
|00005830| 61 6e 79 20 70 68 79 73 | 69 63 61 6c 20 73 79 73 |any phys|ical sys|
|00005840| 74 65 6d 73 2e 20 20 46 | 6f 72 74 75 6e 61 74 65 |tems. F|ortunate|
|00005850| 6c 79 2c 20 74 68 65 79 | 20 61 72 65 20 71 75 69 |ly, they| are qui|
|00005860| 74 65 20 65 61 73 79 20 | 74 6f 20 62 75 69 6c 64 |te easy |to build|
|00005870| 0a 69 6e 20 7b 5c 65 6d | 20 43 65 6c 6c 61 6e 67 |.in {\em| Cellang|
|00005880| 20 32 2e 30 7d 2e 20 20 | 53 69 6d 70 6c 79 20 69 | 2.0}. |Simply i|
|00005890| 6d 61 67 69 6e 65 20 74 | 61 6b 69 6e 67 20 61 20 |magine t|aking a |
|000058a0| 68 65 78 61 67 6f 6e 20 | 61 6e 64 20 73 71 75 65 |hexagon |and sque|
|000058b0| 65 7a 69 6e 67 20 69 6e | 0a 61 74 20 74 68 65 20 |ezing in|.at the |
|000058c0| 73 69 64 65 73 2c 20 79 | 69 65 6c 64 69 6e 67 20 |sides, y|ielding |
|000058d0| 61 20 74 77 6f 20 63 65 | 6c 6c 20 73 74 61 63 6b |a two ce|ll stack|
|000058e0| 2e 20 20 44 6f 69 6e 67 | 20 74 68 69 73 20 66 6f |. Doing| this fo|
|000058f0| 72 20 74 68 65 0a 65 6e | 74 69 72 65 20 63 65 6c |r the.en|tire cel|
|00005900| 6c 20 75 6e 69 76 65 72 | 73 65 20 69 73 20 64 65 |l univer|se is de|
|00005910| 70 69 63 74 65 64 20 69 | 6e 20 46 69 67 75 72 65 |picted i|n Figure|
|00005920| 7e 5c 72 65 66 7b 68 65 | 78 61 67 6f 6e 73 7d 2e |~\ref{he|xagons}.|
|00005930| 20 20 54 68 65 20 73 6f | 6c 69 64 0a 6c 69 6e 65 | The so|lid.line|
|00005940| 73 20 73 68 6f 77 20 74 | 68 65 20 62 6f 75 6e 64 |s show t|he bound|
|00005950| 61 72 79 20 6f 66 20 74 | 68 65 20 6f 72 69 67 69 |ary of t|he origi|
|00005960| 6e 61 6c 20 68 65 78 61 | 67 6f 6e 2e 20 20 54 68 |nal hexa|gon. Th|
|00005970| 65 20 73 69 64 65 73 20 | 6f 66 20 74 68 65 0a 68 |e sides |of the.h|
|00005980| 65 78 61 67 6f 6e 73 20 | 68 61 76 65 20 62 65 65 |exagons |have bee|
|00005990| 6e 20 6c 61 62 65 6c 65 | 64 2c 20 63 6c 6f 63 6b |n labele|d, clock|
|000059a0| 77 69 73 65 20 66 72 6f | 6d 20 74 68 65 20 74 6f |wise fro|m the to|
|000059b0| 70 2c 20 6e 20 28 6e 6f | 72 74 68 29 2c 20 6e 65 |p, n (no|rth), ne|
|000059c0| 20 28 6e 6f 72 74 68 0a | 65 61 73 74 29 2c 20 73 | (north.|east), s|
|000059d0| 65 20 28 73 6f 75 74 68 | 20 65 61 73 74 29 2c 20 |e (south| east), |
|000059e0| 73 20 28 73 6f 75 74 68 | 29 2c 20 73 77 20 28 73 |s (south|), sw (s|
|000059f0| 6f 75 74 68 20 77 65 73 | 74 29 20 61 6e 64 20 6e |outh wes|t) and n|
|00005a00| 77 20 28 6e 6f 72 74 68 | 20 77 65 73 74 29 2e 0a |w (north| west)..|
|00005a10| 0a 49 6e 20 6f 72 64 65 | 72 20 74 6f 20 68 61 76 |.In orde|r to hav|
|00005a20| 65 20 74 68 65 20 63 65 | 6c 6c 73 20 61 63 74 20 |e the ce|lls act |
|00005a30| 61 73 20 73 65 74 73 20 | 6f 66 20 32 20 62 6c 6f |as sets |of 2 blo|
|00005a40| 63 6b 20 73 74 61 63 6b | 73 2c 20 61 20 7b 5c 74 |ck stack|s, a {\t|
|00005a50| 74 20 77 68 69 63 68 7d | 0a 66 69 65 6c 64 20 77 |t which}|.field w|
|00005a60| 69 74 68 20 74 68 65 20 | 76 61 6c 75 65 20 70 61 |ith the |value pa|
|00005a70| 74 74 65 72 6e 20 64 65 | 70 69 63 74 65 64 20 69 |ttern de|picted i|
|00005a80| 6e 20 46 69 67 75 72 65 | 7e 5c 72 65 66 7b 77 68 |n Figure|~\ref{wh|
|00005a90| 69 63 68 20 68 65 78 61 | 67 6f 6e 7d 20 69 73 0a |ich hexa|gon} is.|
|00005aa0| 75 73 65 64 2e 20 20 54 | 68 65 20 76 61 6c 75 65 |used. T|he value|
|00005ab0| 20 31 20 72 65 70 72 65 | 73 65 6e 74 73 20 74 68 | 1 repre|sents th|
|00005ac0| 65 20 74 6f 70 20 63 65 | 6c 6c 20 69 6e 20 61 20 |e top ce|ll in a |
|00005ad0| 70 61 69 72 2c 20 77 68 | 69 6c 65 20 30 20 64 65 |pair, wh|ile 0 de|
|00005ae0| 6e 6f 74 65 73 0a 74 68 | 65 20 62 6f 74 74 6f 6d |notes.th|e bottom|
|00005af0| 20 63 65 6c 6c 2e 20 20 | 4e 6f 74 65 20 74 68 61 | cell. |Note tha|
|00005b00| 74 20 74 68 65 20 74 6f | 70 20 63 65 6c 6c 20 6f |t the to|p cell o|
|00005b10| 66 20 61 20 70 61 69 72 | 20 67 65 74 73 20 69 74 |f a pair| gets it|
|00005b20| 73 20 73 20 28 73 6f 75 | 74 68 29 0a 76 61 6c 75 |s s (sou|th).valu|
|00005b30| 65 20 62 79 20 73 6b 69 | 70 70 69 6e 67 20 6f 76 |e by ski|pping ov|
|00005b40| 65 72 20 74 68 65 20 62 | 6f 74 74 6f 6d 20 63 65 |er the b|ottom ce|
|00005b50| 6c 6c 20 6f 66 20 74 68 | 65 20 70 61 69 72 2c 20 |ll of th|e pair, |
|00005b60| 6c 69 6b 65 77 69 73 65 | 20 74 68 65 20 62 6f 74 |likewise| the bot|
|00005b70| 74 6f 6d 0a 63 65 6c 6c | 20 73 6b 69 70 73 20 6f |tom.cell| skips o|
|00005b80| 76 65 72 20 74 68 65 20 | 74 6f 70 20 6f 6e 65 20 |ver the |top one |
|00005b90| 66 6f 72 20 69 74 73 20 | 6e 20 28 6e 6f 72 74 68 |for its |n (north|
|00005ba0| 29 20 76 61 6c 75 65 2e | 20 20 54 68 75 73 20 65 |) value.| Thus e|
|00005bb0| 61 63 68 20 63 65 6c 6c | 0a 70 61 69 72 20 61 67 |ach cell|.pair ag|
|00005bc0| 72 65 65 73 20 6f 6e 20 | 74 68 65 20 72 65 6c 61 |rees on |the rela|
|00005bd0| 74 69 76 65 20 6c 6f 63 | 61 74 69 6f 6e 20 6f 66 |tive loc|ation of|
|00005be0| 20 6e 65 69 67 68 62 6f | 72 69 6e 67 20 76 61 6c | neighbo|ring val|
|00005bf0| 75 65 73 2e 20 20 4e 6f | 74 65 20 74 68 61 74 0a |ues. No|te that.|
|00005c00| 74 68 69 73 20 72 65 71 | 75 69 72 65 73 20 74 68 |this req|uires th|
|00005c10| 61 74 20 69 6e 69 74 69 | 61 6c 20 28 61 6e 64 20 |at initi|al (and |
|00005c20| 73 75 62 73 65 71 75 65 | 6e 74 29 20 76 61 6c 75 |subseque|nt) valu|
|00005c30| 65 73 20 66 6f 72 20 66 | 69 65 6c 64 73 20 6f 66 |es for f|ields of|
|00005c40| 20 63 65 6c 6c 73 0a 67 | 69 76 65 6e 20 61 73 20 | cells.g|iven as |
|00005c50| 69 6e 70 75 74 20 6d 75 | 73 74 20 62 65 20 63 6f |input mu|st be co|
|00005c60| 6f 72 64 69 6e 61 74 65 | 64 20 77 69 74 68 20 74 |ordinate|d with t|
|00005c70| 68 65 20 61 73 73 69 67 | 6e 6d 65 6e 74 20 74 6f |he assig|nment to|
|00005c80| 20 74 68 65 20 7b 5c 74 | 74 20 77 68 69 63 68 7d | the {\t|t which}|
|00005c90| 0a 66 69 65 6c 64 73 2c | 20 6f 74 68 65 72 77 69 |.fields,| otherwi|
|00005ca0| 73 65 20 6f 6e 65 20 6f | 72 20 6d 6f 72 65 20 63 |se one o|r more c|
|00005cb0| 65 6c 6c 20 70 61 69 72 | 73 20 77 69 6c 6c 20 68 |ell pair|s will h|
|00005cc0| 61 76 65 20 6f 6e 6c 79 | 20 6f 6e 65 20 6f 66 20 |ave only| one of |
|00005cd0| 74 68 65 20 70 61 69 72 | 0a 67 65 74 74 69 6e 67 |the pair|.getting|
|00005ce0| 20 74 68 65 20 64 65 73 | 69 72 65 64 20 76 61 6c | the des|ired val|
|00005cf0| 75 65 2e 5c 66 6f 6f 74 | 6e 6f 74 65 7b 0a 09 49 |ue.\foot|note{..I|
|00005d00| 6e 20 6f 72 64 65 72 20 | 74 6f 20 6d 6f 72 65 20 |n order |to more |
|00005d10| 61 63 63 75 72 61 74 65 | 6c 79 20 64 69 73 70 6c |accurate|ly displ|
|00005d20| 61 79 20 28 69 6e 20 58 | 2d 2d 57 69 6e 64 6f 77 |ay (in X|--Window|
|00005d30| 73 29 20 74 68 65 20 68 | 65 69 67 68 74 2d 2d 0a |s) the h|eight--.|
|00005d40| 09 77 69 64 74 68 20 72 | 61 74 69 6f 20 6f 66 20 |.width r|atio of |
|00005d50| 74 68 65 20 60 60 68 65 | 78 61 67 6f 6e 73 27 27 |the ``he|xagons''|
|00005d60| 2c 20 74 68 65 20 6f 70 | 74 69 6f 6e 20 60 60 2d |, the op|tion ``-|
|00005d70| 2d 73 20 35 2c 33 27 27 | 20 74 6f 0a 09 7b 5c 74 |-s 5,3''| to..{\t|
|00005d80| 74 20 70 65 2d 73 63 61 | 6d 7d 2f 7b 5c 74 74 20 |t pe-sca|m}/{\tt |
|00005d90| 63 65 6c 6c 76 69 65 77 | 7d 20 6d 61 6b 65 73 20 |cellview|} makes |
|00005da0| 74 68 65 20 64 69 73 70 | 6c 61 79 65 64 20 63 65 |the disp|layed ce|
|00005db0| 6c 6c 73 20 35 20 70 69 | 78 65 6c 73 0a 09 77 69 |lls 5 pi|xels..wi|
|00005dc0| 64 65 20 61 6e 64 20 33 | 20 70 69 78 65 6c 73 20 |de and 3| pixels |
|00005dd0| 68 69 67 68 2e 0a 7d 0a | 0a 5c 62 65 67 69 6e 7b |high..}.|.\begin{|
|00005de0| 66 69 67 75 72 65 7d 5b | 70 5d 0a 5c 62 65 67 69 |figure}[|p].\begi|
|00005df0| 6e 7b 63 65 6e 74 65 72 | 7d 0a 5c 62 65 67 69 6e |n{center|}.\begin|
|00005e00| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 23 20 20 20 20 |{verbati|m}.# |
|00005e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e20| 20 20 20 20 20 20 6e 6f | 72 74 68 0a 23 20 20 20 | no|rth.# |
|00005e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e40| 20 20 20 20 20 20 20 2d | 2d 2d 2d 2d 0a 23 20 20 | -|----.# |
|00005e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e60| 20 20 6e 77 20 20 2f 20 | 20 20 20 20 20 20 5c 20 | nw / | \ |
|00005e70| 20 6e 65 0a 23 20 20 20 | 20 20 20 20 20 20 20 20 | ne.# | |
|00005e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 20 20 20 | | / |
|00005e90| 20 20 20 20 20 20 5c 0a | 23 20 20 20 20 20 20 20 | \.|# |
|00005ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005eb0| 5c 20 20 20 20 20 20 20 | 20 20 2f 0a 23 20 20 20 |\ | /.# |
|00005ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005ed0| 20 73 77 20 20 5c 20 20 | 20 20 20 20 20 2f 20 20 | sw \ | / |
|00005ee0| 73 65 0a 23 20 20 20 20 | 20 20 20 20 20 20 20 20 |se.# | |
|00005ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2d 2d | | --|
|00005f00| 2d 2d 2d 0a 23 20 20 20 | 20 20 20 20 20 20 20 20 |---.# | |
|00005f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 73 | | s|
|00005f20| 6f 75 74 68 0a 23 0a 32 | 20 64 69 6d 65 6e 73 69 |outh.#.2| dimensi|
|00005f30| 6f 6e 73 20 6f 66 20 0a | 20 20 20 20 20 20 20 20 |ons of .| |
|00005f40| 77 68 69 63 68 20 6f 66 | 20 30 2e 2e 31 0a 20 20 |which of| 0..1. |
|00005f50| 20 20 20 20 20 20 64 69 | 73 74 20 20 6f 66 20 30 | di|st of 0|
|00005f60| 2e 2e 32 35 35 0a 65 6e | 64 0a 0a 23 20 49 64 65 |..255.en|d..# Ide|
|00005f70| 6e 74 69 66 69 63 61 74 | 69 6f 6e 20 6f 66 20 74 |ntificat|ion of t|
|00005f80| 68 65 20 6e 65 69 67 68 | 62 6f 72 69 6e 67 20 63 |he neigh|boring c|
|00005f90| 65 6c 6c 73 2e 0a 23 0a | 69 66 20 63 65 6c 6c 2e |ells..#.|if cell.|
|00005fa0| 77 68 69 63 68 20 3d 20 | 30 20 74 68 65 6e 0a 20 |which = |0 then. |
|00005fb0| 20 20 20 20 20 20 20 6e | 6f 72 74 68 20 3a 3d 20 | n|orth := |
|00005fc0| 5b 30 2c 20 31 5d 0a 20 | 20 20 20 20 20 20 20 6e |[0, 1]. | n|
|00005fd0| 65 20 20 20 20 3a 3d 20 | 5b 31 2c 20 30 5d 0a 20 |e := |[1, 0]. |
|00005fe0| 20 20 20 20 20 20 20 73 | 65 20 20 20 20 3a 3d 20 | s|e := |
|00005ff0| 5b 31 2c 20 2d 31 5d 0a | 20 20 20 20 20 20 20 20 |[1, -1].| |
|00006000| 73 6f 75 74 68 20 3a 3d | 20 5b 30 2c 20 2d 32 5d |south :=| [0, -2]|
|00006010| 0a 20 20 20 20 20 20 20 | 20 73 77 20 20 20 20 3a |. | sw :|
|00006020| 3d 20 5b 2d 31 2c 20 2d | 31 5d 0a 20 20 20 20 20 |= [-1, -|1]. |
|00006030| 20 20 20 6e 77 20 20 20 | 20 3a 3d 20 5b 2d 31 2c | nw | := [-1,|
|00006040| 20 30 5d 0a 65 6c 73 65 | 0a 20 20 20 20 20 20 20 | 0].else|. |
|00006050| 20 6e 6f 72 74 68 20 3a | 3d 20 5b 30 2c 20 32 5d | north :|= [0, 2]|
|00006060| 0a 20 20 20 20 20 20 20 | 20 6e 65 20 20 20 20 3a |. | ne :|
|00006070| 3d 20 5b 31 2c 20 31 5d | 0a 20 20 20 20 20 20 20 |= [1, 1]|. |
|00006080| 20 73 65 20 20 20 20 3a | 3d 20 5b 31 2c 20 30 5d | se :|= [1, 0]|
|00006090| 0a 20 20 20 20 20 20 20 | 20 73 6f 75 74 68 20 3a |. | south :|
|000060a0| 3d 20 5b 30 2c 20 2d 31 | 5d 0a 20 20 20 20 20 20 |= [0, -1|]. |
|000060b0| 20 20 73 77 20 20 20 20 | 3a 3d 20 5b 2d 31 2c 20 | sw |:= [-1, |
|000060c0| 30 5d 0a 20 20 20 20 20 | 20 20 20 6e 77 20 20 20 |0]. | nw |
|000060d0| 20 3a 3d 20 5b 2d 31 2c | 20 31 5d 0a 65 6e 64 0a | := [-1,| 1].end.|
|000060e0| 0a 6d 69 6e 5f 64 69 73 | 74 20 3a 3d 20 32 35 35 |.min_dis|t := 255|
|000060f0| 0a 6d 69 6e 5f 64 69 73 | 74 20 3a 3d 20 6e 6f 72 |.min_dis|t := nor|
|00006100| 74 68 2e 64 69 73 74 20 | 77 68 65 6e 20 6e 6f 72 |th.dist |when nor|
|00006110| 74 68 2e 64 69 73 74 20 | 3c 20 6d 69 6e 5f 64 69 |th.dist |< min_di|
|00006120| 73 74 20 26 20 6e 6f 72 | 74 68 2e 64 69 73 74 20 |st & nor|th.dist |
|00006130| 3e 20 30 0a 6d 69 6e 5f | 64 69 73 74 20 3a 3d 20 |> 0.min_|dist := |
|00006140| 6e 65 2e 64 69 73 74 20 | 20 20 20 77 68 65 6e 20 |ne.dist | when |
|00006150| 6e 65 2e 64 69 73 74 20 | 20 20 20 3c 20 6d 69 6e |ne.dist | < min|
|00006160| 5f 64 69 73 74 20 26 20 | 6e 65 2e 64 69 73 74 20 |_dist & |ne.dist |
|00006170| 20 20 20 3e 20 30 0a 6d | 69 6e 5f 64 69 73 74 20 | > 0.m|in_dist |
|00006180| 3a 3d 20 73 65 2e 64 69 | 73 74 20 20 20 20 77 68 |:= se.di|st wh|
|00006190| 65 6e 20 73 65 2e 64 69 | 73 74 20 20 20 20 3c 20 |en se.di|st < |
|000061a0| 6d 69 6e 5f 64 69 73 74 | 20 26 20 73 65 2e 64 69 |min_dist| & se.di|
|000061b0| 73 74 20 20 20 20 3e 20 | 30 0a 6d 69 6e 5f 64 69 |st > |0.min_di|
|000061c0| 73 74 20 3a 3d 20 73 6f | 75 74 68 2e 64 69 73 74 |st := so|uth.dist|
|000061d0| 20 77 68 65 6e 20 73 6f | 75 74 68 2e 64 69 73 74 | when so|uth.dist|
|000061e0| 20 3c 20 6d 69 6e 5f 64 | 69 73 74 20 26 20 73 6f | < min_d|ist & so|
|000061f0| 75 74 68 2e 64 69 73 74 | 20 3e 20 30 0a 6d 69 6e |uth.dist| > 0.min|
|00006200| 5f 64 69 73 74 20 3a 3d | 20 73 77 2e 64 69 73 74 |_dist :=| sw.dist|
|00006210| 20 20 20 20 77 68 65 6e | 20 73 77 2e 64 69 73 74 | when| sw.dist|
|00006220| 20 20 20 20 3c 20 6d 69 | 6e 5f 64 69 73 74 20 26 | < mi|n_dist &|
|00006230| 20 73 77 2e 64 69 73 74 | 20 20 20 20 3e 20 30 0a | sw.dist| > 0.|
|00006240| 6d 69 6e 5f 64 69 73 74 | 20 3a 3d 20 6e 77 2e 64 |min_dist| := nw.d|
|00006250| 69 73 74 20 20 20 20 77 | 68 65 6e 20 6e 77 2e 64 |ist w|hen nw.d|
|00006260| 69 73 74 20 20 20 20 3c | 20 6d 69 6e 5f 64 69 73 |ist <| min_dis|
|00006270| 74 20 26 20 6e 77 2e 64 | 69 73 74 20 20 20 20 3e |t & nw.d|ist >|
|00006280| 20 30 0a 0a 63 65 6c 6c | 2e 64 69 73 74 20 3a 3d | 0..cell|.dist :=|
|00006290| 20 6d 69 6e 5f 64 69 73 | 74 20 2b 20 34 20 77 68 | min_dis|t + 4 wh|
|000062a0| 65 6e 20 63 65 6c 6c 2e | 64 69 73 74 20 3d 20 30 |en cell.|dist = 0|
|000062b0| 20 26 20 6d 69 6e 5f 64 | 69 73 74 20 3c 20 32 35 | & min_d|ist < 25|
|000062c0| 35 0a 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |5.\end{v|erbatim}|
|000062d0| 0a 5c 65 6e 64 7b 63 65 | 6e 74 65 72 7d 0a 5c 63 |.\end{ce|nter}.\c|
|000062e0| 61 70 74 69 6f 6e 7b 43 | 61 6c 63 75 6c 61 74 69 |aption{C|alculati|
|000062f0| 6e 67 20 64 69 73 74 61 | 6e 63 65 20 77 69 74 68 |ng dista|nce with|
|00006300| 20 68 65 78 61 67 6f 6e | 61 6c 20 6e 65 69 67 68 | hexagon|al neigh|
|00006310| 62 6f 72 68 6f 6f 64 7d | 0a 5c 6c 61 62 65 6c 7b |borhood}|.\label{|
|00006320| 64 69 73 74 7d 0a 5c 65 | 6e 64 7b 66 69 67 75 72 |dist}.\e|nd{figur|
|00006330| 65 7d 0a 0a 5c 73 65 63 | 74 69 6f 6e 7b 48 6f 77 |e}..\sec|tion{How|
|00006340| 20 54 6f 20 46 69 6e 64 | 20 4f 75 74 20 4d 6f 72 | To Find| Out Mor|
|00006350| 65 7d 0a 0a 54 68 65 20 | 65 6e 74 69 72 65 20 7b |e}..The |entire {|
|00006360| 5c 65 6d 20 43 65 6c 6c | 75 6c 61 72 7d 20 73 79 |\em Cell|ular} sy|
|00006370| 73 74 65 6d 20 69 73 20 | 61 76 61 69 6c 61 62 6c |stem is |availabl|
|00006380| 65 20 66 72 6f 6d 20 74 | 68 65 20 61 75 74 68 6f |e from t|he autho|
|00006390| 72 2e 20 20 50 6c 65 61 | 73 65 0a 73 65 6e 64 20 |r. Plea|se.send |
|000063a0| 72 65 71 75 65 73 74 73 | 20 74 6f 20 65 69 74 68 |requests| to eith|
|000063b0| 65 72 3a 0a 5c 62 65 67 | 69 6e 7b 63 65 6e 74 65 |er:.\beg|in{cente|
|000063c0| 72 7d 0a 4a 20 44 61 6e | 61 20 45 63 6b 61 72 74 |r}.J Dan|a Eckart|
|000063d0| 5c 5c 0a 42 6f 78 20 36 | 39 33 33 5c 5c 0a 43 6f |\\.Box 6|933\\.Co|
|000063e0| 6d 70 75 74 65 72 20 53 | 63 69 65 6e 63 65 20 44 |mputer S|cience D|
|000063f0| 65 70 61 72 74 6d 65 6e | 74 5c 5c 0a 52 61 64 66 |epartmen|t\\.Radf|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.