Thinking about Bird's handling of Sudoku; it may be efficiently possible to represent colonies as lists (or trees). Then one just has to consider the merging and splitting of colonies. Usually, all the space in a cell array is not used anyway. :)