## PROBLEM 47. RED AND BLUE POINTS

Consider points arranged in a square of 20 columns and 20 rows, each of which is colored either red or blue. Whenever two points of the same color are adjacent in some row or column, they are connected by a segment of the same color. Adjacent points of different colors are connected by black segments. Among the points, 219 are red, 39 of which are on the boundary of the square, but none are in the corners. There are also 237 black segments. How many blue segments are there?
Solution. Each row contains 19 segments, so we get $19 \cdot 20=380$ horizontal segments. There are as many vertical segments, so their total number is 760. Since 237 of them are black, the remaining 523 are blue or red.

Let $k$ be the number of red segments and let's count how many times red points are endpoints of segments. Each black segment has one red end, and each red segment has both ends red, so in total

$237+2k$ red ends.

But 39 red points are on the boundary and are endpoints of three segments, while each of the other 180 red points is inside and is an endpoint of four segments. Thus, the number of cases where a red point is an endpoint of a segment is

$$
39 \cdot 3 + 180 \cdot 4 = 837
$$

Therefore,

$$
237 + 2k = 837 \text{ and } k = 300
$$

The number of blue segments is then $523 - 300 = 223$.

A similar problem was proposed in the journal "American Mathematical Monthly" (1971) by T. S. Brown and solved by Stefan B. Maurer.

Consider a rectangular arrangement of red and blue points with an even number of rows and an even number of columns. In each row, half the points are red and half are blue; the same is true for the columns. Whenever two points of the same color are adjacent in a row or column, they are connected by a segment of the same color. Show that the total number of red segments equals the total number of blue segments.

Solution:

![](https://cdn.mathpix.com/cropped/2024_05_21_2f4fa61a46fbb276c744g-86.jpg?height=216&width=865&top_left_y=463&top_left_x=601)

Consider two adjacent rows of points, say the $i$-th and $(i+1)$-th. If two points of the same color are one above the other, then this pair is connected by a segment. Call such points "paired," and pairs of different colored points "unpaired." Now recall that in each row, half the points are red and the other half are blue. Therefore, the rows have the same number of red points. It is clear that adjacent rows have the same number of paired red points, and therefore the same number of unpaired red points. Since under each unpaired red point in the $i$-th row there is an unpaired blue point in the $(i+1)$-th row, we have that the number of unpaired blue points in the $(i+1)$-th row =

= the number of unpaired red points in the $i$-th row =

= the number of unpaired red points in the $(i+1)$-th row.

Then in the $(i+1)$-th row, we have the same number of unpaired red points and unpaired blue points. Since the $(i+1)$-th row contains the same total number of red and blue points, it follows that there will be the same number of paired red points and paired blue points. This implies that the number of blue and red segments connecting the rows is equal. The same is true for adjacent columns, from which the final conclusion follows.