On a chessboard, every square has a chair. Now there are couples who need to be seated, with each person occupying one seat. Define the distance between a couple as the sum of the number of rows and the number of columns by which their seats differ (for example: if a couple sit at (3,3) and (2,5) respectively, then their distance is ). Define the total distance of all couples as the sum of the distances of these couples. Find the maximum value of the total distance.
Solution
The maximum value is .
1. First consider the maximum value of the sum of horizontal distances: project everyone onto the same column, and connect the two people of each couple with a line segment. Consider two possibilities:
- There exist two couples whose connecting segments do not overlap: then take one person from each of the two couples and swap their positions, and the sum of horizontal distances becomes larger.
- The connecting segments of any two couples overlap: without loss of generality, assume that in every couple the man is to the left of the woman. We find that all the men must lie within the left columns, otherwise:
* If there is a couple with both the man and the woman in the right columns, then the right columns have only seats remaining, but there are still another couples that need to be seated.
* Therefore there must be a couple both of whom are in the left columns. However, a couple both of whom are in the left columns cannot have their connecting segment overlap with that of a couple both of whom are in the right columns, a contradiction!
In other words, the man of every couple must belong to the left columns, and the woman of every couple must belong to the right columns. It is easy to compute that the sum of horizontal distances in this case must be .
2. Similarly, the maximum value of the sum of vertical distances is also , so the total distance is at most .
3. Finally, we show that there is a way to achieve . Consider dividing the couples into two groups , each with couples, and dividing the seats into four quadrants (each quadrant being an grid). Let the first quadrant be seated entirely with men, the second quadrant with women, the third quadrant with women, and the fourth quadrant with men. Then one can verify that this construction achieves the maximum value estimated above, which completes the proof.