You are on page 1of 5

MONOCHROMATIC COMPONENTS, REVISITED

JACOB RICHEY

This post revises and signicantly generalizes an old investigation regarding monochromatic regions on a two colored chessboard: a number of attempts were made at estimating the expected number of connected monochromatic components given an randomly colored m by n grid. (Figure 1 shows an example of such a coloring.) Some upper and lower bounds for the expectation were determined, though no no exact formula was found (and it seems likely that no closed form exists). We consider a natural generalization of this question, as follows: let G = (V, E ) be any graph, |V | = n, and choose a two-coloring c : V {0, 1} of the vertices. Then, take the subgraph H = (V, E ) formed by E = {(i, j ) E : c(i) = c(j )} E , i.e. we delete any edge in G that connects two vertices of dierent color. Then the number of disconnected components of the graph H is the number of connected monochromatic regions in G. We want to know about this number, which we denote mG (c): how does it depend on the graph G, and the coloring c? A useful notion will be the mochromatic component polynomial MG (z ) = c:V {0,1} z mG (c) , i.e. the ordinary generating function counting how many colorings give a xed number of regions for some graph G. (We may drop this notation and write G(z ) where there is no confusion.) There are a few observations that can be made without much work. First, there are a few graphs we can say a lot about: the complete graph Kn has MKn (z ) = 2z + (2n 2)z 2 , and the empty graph on n vertices Kn = ({1, 2, . . . , n}, ) has polynomial M (z ) = 2n z n . If we have two disjoint graphs H and K whose polynomials are given, then the graph formed as the disjoint union G = H K has MG (z ) = MH (z ) MK (z ), so it is sucient to only consider connected graphs. Note also that MG (z ) always has a factor of 2z , since for each

Figure 1. An example of a colored 6 x 6 chessboard: this one has 15 monochromatic components.


1

JACOB RICHEY

Figure 2. An example of a randomly generated graph (left), and its monochromatic component subgraph (right): it has two monochromatic regions. coloring c we can take the coloring 1 c to obtain the same number of regions, and there is always at least one region (hence 2 z ). In our original analysis, we saw that for a 1 by n block, i.e. the graph on the vertex set {1, . . . , n} with edges {(1, 2), (2, 3), . . . , (n 1, n)}, the expected number of monochromatic regions (over all 2n colorings) is n+1 . Let M (x, y ) = n,k1 mn,k xn y k , where mn,k is the 2 number of of 1 by n blocks with exactly k monochromatic regions, and dene the class M = Seq(M1 + M2 + . . .) M0 , where Mi is the set of 1 by s blocks that start with exactly i white squares and end with some number of black squares (from left to right, WLOG), and M is the class of all 1 by s blocks with all black squares. Here the variable y counts the number of regions an object has, and the variable x counts the number of squares in the object; multiplication of unlabeled classes is simple (non-commutative) concatenation of the blocks, i.e. attaching the second object to the right end of the rst object in the product. This gives all possible blocks that start with some positive number of white squares: to get the generating function M , well have to multiply by 2 (i.e. switch all the colors), and subtract 1 so we dont overcount the empty block. Converting to generating functions, we get that M (x, y ) = M (x, y ) =
1 1
i1

Mi (x,y )

(1 +

xy 1x

1), where

i1

Mi (x, y ) =

xy 2 1x

x , 1x

so we obtain

xxy 1 . x+xy 1

1 A bit of analysis gives mn,k = [xn y k ]M (x, y ) = 2 n , so we have our answer. A direct k 1 way to see this is to simply choose where division lines between black and white chunks in the 1 by n block: there are n 1 possible locations, and k 1 dividers, (and we must 1 choose the color of the rst square), i.e. 2 n ways. Perhaps more surprising is that the k1 n1 n+1 1 expected number of regions is 2 = 2n 2 k1 k mn,k = 2n1 1 k1 k k1 : I dont see an easy way to verify this fact.

There is another simple tool we have for dealing with graphs in general, which is surprisingly powerful: for any graph G = (V, E ), and any vertex v V of degree 1, if we let H be

MONOCHROMATIC COMPONENTS, REVISITED

Figure 3. Three plots of the expected number of regions in randomly generated graphs. The blue, purple and gold lines are for p = 1 , 2 , and 3 , 5 5 5 respectively. the graph with the vertex v (and its edge) removed, then G(z ) = (1 + z )H (z ). For any coloring of G is a coloring of H and of the vertex v : if u is the vertex in G that v connects to, then either c(v ) = c(u) or not. In the rst case, v belongs to the same region as u, so we add 0 regions, i.e. the number of regions in H is the same as the number in G with those colorings; in the other case, the vertex v is a region of its own, so we increase the number of regions by 1, i.e. multiply by z . Why is this so useful? First, it allows us to narrow our considerations slightly, to graphs with edges of degree at least 2. In particular, we can give the polynomial MT (z ) for any tree T: if T has n vertices, then MT (z ) = 2z (1 + z )n1 , since the graph with one vertex, K1 , has polynomial MK1 (z ) = 2z . Here we recover our formula for the 1 by n block: [z k ] 2z (1 + z )n1 = [z k1 ] 2
n n1 i=0 i

zi = 2

n1 k1

It is also somewhat surprising that all trees of the same size should have identical monochromatic component polynomials: I know of no other way to see this fact. Beyond these observations, I proved no other signicant facts about the monochromatic components (MC) statistic. I have written some code to simulate these colorings: given a graph and a vertex coloring, I can determine the the number of MCs in linear time with the number of edges in the graph (at worst O(n2 ) with n vertices). The method the program uses is an original creation: given a vertex-colored graph, it takes each edge and absorbs one of the vertices of that edge into the other, i.e. combines the two vertices into

JACOB RICHEY

Figure 4. A plot of the number of monochromatic regions for an n by n chessboard (blue) and a torus chessboard (purple), as well as the estimated best t line (gold).

one, deleting the edge between them, only if the two vertices have the same color. After this process, there will be some number of remaining vertices: this number is exactly the number of connected monochromatic components, with each vertex representing one such component. There are a number of issues in studying randomly generated graphs, and gathering data. The rst is how to generate random graphs: the simplistic method I have been using is simply to populate edges, randomly choosing to include each pair of vertices as an edge with a xed probability. I suspect there may be some higher level analysis to be applied here, i.e. a more apt probability measure on the space of graphs, and perhaps an induced measure on the set of graphs obtained when edges connecting vertices of dierent color are removed. If we knew about such a measure, we may be able to determine the probability that such a graph has a certain number of disjoint components, i.e. count the number of monochromatic components directly via such a probability distribution. Some simple trends have appeared: in particular, for random graphs it seems that on average there are only 2 regions: this matches our intuition, that as the number of vertices 2 grows large, (and so the number of edges grows like p n if p is our xed probability of 2 including any edge), then any two vertices of the same color are likely connected by some path, so there are two large regions (one of each color). I would like to prove such a central

MONOCHROMATIC COMPONENTS, REVISITED

limit result, that if the graph has a positive proportion of all possible edges as actual edges, then the expected number of monochromatic regions tends to 2. If such a result can be obtained, it leaves sparse graphs as the interesting case. I have done some numerical calculation with my new more general program for the chessboard and torus chessboard as done in my previous article, and obtained similar results, though with much less technical diculty. It seems that the number of regions on an n by n chessboard goes like n2 /6, i.e. to innity: the chessboard is certainly a sparse graph, with maximum degree of 4 for any vertex, so this is not surprising. One wonders if other special cases of sparse graphs may be considered: is there some special class of graphs whose expected number of components goes to a nite number greater than 2 in the limit? The computer can also calculate the polynomials MG (z ) by searching over all possible colorings, though this has not yielded any interesting results: some low-order polynomials seem to have some symmetry, though there doesnt seem to be any discernable pattern. I plan to investigate this problem more deeply, (as it seems likely that general graphs are too unstructured to reveal anything interesting), and to prove the conjectured asymptotic results. It may also be interesting to look at the sizes of these regions: the notion proved useful in considering the chessboards, and it has a simple interpretation on a graph, as a random walk on the vertices.
E-mail address : jacob.f.richey@dartmouth.edu

You might also like