Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!bellcore!faline!thumper!ulysses!andante!princeton!phoenix!rjchen
From: rjchen@phoenix.Princeton.EDU (Raymond Juimong Chen)
Newsgroups: comp.graphics
Subject: Re: Hodgepodge (Computer Recreations 8/88)
Message-ID: <3749@phoenix.Princeton.EDU>
Date: 24 Sep 88 14:55:07 GMT
References: <12032@dhw68k.cts.com>
Organization: Princeton University, NJ
Lines: 67

(Apologies if this got posted twice.  inews and I don't get along well.)

From article <12032@dhw68k.cts.com>, by thecloud@dhw68k.cts.com (Ken McLeod):
>  Has anyone else on the net tried to implement the Hodgepodge
> algorithm described in the August issue of Scientific American
> (A. K. Dewdney's column)...?

I don't have the article with me, but I have implemented the HP algorithm.

> The formula is [S/A] + g. When A = 0, obviously you need
> to assume something else for the new cell state value!

As I recall, S was the sum of the infectedness of all of its neighbors.
One workaround (which is in keeping with the spirit of the algorithm)
is simply to include the infected cell itself in the sum.  That way,
A will always be at least 1 (namely, itself).  

A more fatal flaw in the algorithm as presented in the article is as
follows:

Suppose all of your "infected" cells can be enclosed in a "bounding box",
that is, a rectangular region (x_0, y_0) - (x_1, y_1).  Then I claim that
the infection can never spread beyond that box.  This means that, if
you let your CA run for a while, it will gradually break up into little
rectangular clumps.  (If it never does, then just consider the entire 
set of infected cells a "clump" for the purposes of the description
below.)

It follows, then, that if ever a clump "shrinks" (i.e., all of the 
cells on one of the edges becomes healthy all at once, so that the 
bounding box gets smaller), then it can never "expand" to its original
size.

This is, I feel, contrary to the phenomenon which the CA is attempting
to model.

Proof:

Look at the transition formula for a healthy cell.  Observe that
with the choices of k_1 and k_2 suggested in the article, that it
requires at least two "infected" cells to induce a healthy cell to
become infected.

But each cell on the bounding box is in contact with only one cell of the
interior.  (And cells at the corners are in contact with none.)  Thus, those
cells can never become infected.

It is clear that if you have a "wall of health", then the infection can
never spread past that wall.

End of proof.

I observed this phenomenon after running a few CAs.  I saw that the "active"
region was gradually shrinking, and I at first assumed that I had coded
the program incorrectly!

If there is sufficient demand for the source code, I'll post it generally,
else I'll just send it to Ken.  (The code is written for Turbo C 1.5 on
an IBM PC, but it can easily become curses-ized for those with other
machines.)


-- 
Raymond Chen	UUCP: ...allegra!princeton!{phoenix|pucc}!rjchen
		BITNET: rjchen@phoenix.UUCP, rjchen@pucc
		ARPA: rjchen@phoenix.PRINCETON.EDU, rjchen@pucc.PRINCETON.EDU
"Say something, please!  ('Yes' would be best.)" - The Doctor