Skip to main content
OlympiadHQ

Browse · MathNet

Print

Japan Mathematical Olympiad

Japan counting and probability

Problem

A square grid is given. Suppose we color each of the square boxes of the grid either red or blue. How many possible ways of coloring these boxes are there that satisfy the following conditions? Regard two patterns of colored boxes to be distinct if one of the patterns can be obtained from the other by rotating or flipping.

There is at least one box colored red and at least one box colored blue. The region determined by all the red colored boxes forms a connected region and the same is true for blue colored boxes. (Here we consider boxes to be connected if they share a side).

problem
Solution
Suppose all the square boxes of the grid were colored in such a way that the conditions specified for the problem were satisfied. There are points (let us call them vertex points), on the rectangle forming the perimeter of the grid, which are either a vertex of one of the square boxes or a common vertex of two adjacent square boxes of the grid. If we go around the entire grid along the perimeter rectangle starting at the lower left side corner and going clockwise, noticing the colors of boxes lying on our right as we go along, then we find that there is exactly one vertex point, where we see the color of the square boxes changes from red to blue as we go through this point, and exactly one other vertex point where the color of the squares change from blue to red. It is clear that these points where color change occurs must be common vertex points for two adjacent squares. There are exactly such points (out of points exclude points lying at the corner of the rectangle). These points are indicated by circular dots in the figures below.



Therefore, the number of ways of coloring the square boxes of the grid so as to satisfy the conditions of the problem corresponds to the number of ways of choosing one point where the coloring changes from red to blue and another point where the coloring changes from blue to red from the collection of points. This number is clearly, , which gives the desired answer to the problem.
Final answer
39800

Techniques

Recursion, bijectionColoring schemes, extremal arguments