in reply to colony splitting

If I understand the problem correctly, I think that Graph will help. Build a graph object with cells as vertices and insert edges to each neighbor cell containing the same type population. Then you will be able to use Graph's methods to extract and study connected components.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re:Graphs and colony splitting
by redbeard (Beadle) on Mar 13, 2003 at 06:15 UTC
    Hrm - yeah, that seems as if it would help...I guess a recursive scroll through all successor vertices? One could then check to see if all successive vertices generated where in the array of listed vertices, and any leftover would be turned out into a new colony. This doesn't sound terrible efficient....although it may be the only way. I guess infinite looping could be avoided by making this a directed graph....although that would mean that if certain vertices are eliminated, new colonies that should be merged with the old would be created, which I'm not entirely comfortable with. If it were an undirected graph, that sort of algorithm would seem to have the potential to loop back on itself, which worries me a tad. Any suggestions?
      One question; and I hope it doesn't throw a big monkey wrench into the problem for you; but what about formerly seperated colonies re-connecting?

      a a a
      a b a -- time=0
      a a a


      a a a
      b b b -- time=1
      c c c


      a a a
      b a b -- time=2
      c c c


      If the newly formed colony is shown as seperate (as above), then at time=1 they split into 3 colonies, not 2... they then remain 3 colonies through time=2. If, on the other hand, inheritance is an important part of your simulation (genetic code, etc..); then they would be time(0)=2 colonies, time(1)=3 colonies, and time(2)=2 colonies again...that might make it a bit more difficult to establish exactly which colonies are actually seperate from time frame to time frame.


      Are the individual colonies tagged with their appropriate parentage? That might make it a little easier to determine when a previously seperate colony was reconnected.

        In a later iteration of the model, I had planned to do just this, actually. It makes sense biologically (see Grosberg et al's work on colony mergin and genetics - its fascinating stuff). So, my answer is, yes. But merging is a far simpler issue than the initial splitting.