There is a $2n\times 2n$ rectangular grid and a chair in each cell of the grid. Now, there are $2n^2$ pairs of couple are going to take seats. Define the distance of a pair of couple to be the sum of column difference and row difference between them. For example, if a pair of couple seating at $(3,3)$ and $(2,5)$ respectively, then the distance between them is $|3-2|+|3-5|=3$. Moreover, define the total distance to be the sum of the distance in each pair. Find the maximal total distance among all possibilities.
Problem
Source: 2017 Taiwan TST
Tags: combinatorics
13.04.2018 17:49
We'll assume $x-$coordinate increases from left to right, and $y-$coordinate increases from top to bottom. First consider the $x-$coordinates of the couple; suppose the couples have $x-$coordinates $\{a_1,b_1\},\cdots ,\{a_{2n^2},b_{2n^2}\}$. Then the contribution of the $x-$coordinates to the overall sum of distances is $\textstyle\sum _{i=1}^{2n^2}|a_i-b_i|=\sum _{i=1}^{2n^2}(a_i+b_i)-2\sum _{i=1}^{2n^2}\min\{a_i,b_i\}.$ The first sum is clearly $(1+2+\cdots +2n)\cdot 2n=4n^3+2n^2$. Now since at most $2n$ terms of the form $\min\{a_i,b_i\}$ can be all equal, the minimum of $\textstyle\sum _{i=1}^{2n^2}\min\{a_i,b_i\}$ is $(2n\cdot 1+2n\cdot 2+\cdots +2n\cdot n)=n^3+n^2$. Therefore the contribution of the $x-$coordinates is at most $4n^3+2n^2-2(n^3+n^2)=2n^3$, so the total sum of distances is at most $2\cdot 2n^3=4n^3$. This can be achieved as follows: fill in the top half with with one member of each couple in each cell, and then for $(i,j)$ in the top-left quadrant, put it's partner at $(i+1,j+n)$, and for $(i,j)$ in the top-right quadrant, put it's partner at $(i-n,j+n)$. Then the distance for each couple is $n+n=2n$, so the total distance is $n\cdot 2n^2=4n^3. $ $\blacksquare$
14.04.2018 03:44
14.05.2020 22:33
a very easy problem number the columns $1,2 \dots n$ from left to right let every couple be $((a_i,b_i) , (c_i,d_i))$ for $i \le 2n^2$ so we want to maximize the amount $S=\sum{|a_i-c_i|}+\sum{|b_i-d_i|}$ but if we decompose every row into $n$ couple the sum $\sum{|a_i-c_i|} \le 2n+2n-1 \dots +n+1-(n+n+1 \dots 1)=n^2$ so the whole sum $\sum{|a_i-c_i|} \le 2n^3$ and so is $\sum{|b_i-d_i|}$ so $$S \le 4n^3$$and the construction is easy and we win
14.06.2022 02:13
The idea here is to ``reduce" the problem to one dimension. Let the couples have seating coordinates $X_1 = (a_1, b_1), X_2 = (a_2, b_2), \cdots$ such that $X_i$ and $X_{2n^2+i}$ are a couple. Then, the desired quantity is \begin{align*} \sum_{i=1}^{2n^2} \left(|a_i-a_{2n^2+i}|+|b_i-b_{2n^2+i}|\right) &= \sum |a_i - a_{2n^2+i}| + \sum | b_i - b_{2n^2+i}| \\ &\leq 2 \cdot 2n(2n+\cdots+n+1-1-2-\cdots-n) = 4n^3. \end{align*}The inequality holds because the value in the absolute value sign is at most the value when the largest $2n^2$ terms are all positive. In that case, we have $2n$ copies of $2n$, $2n$ copies of $2n-1$, and so on. Equality occurs when we divide the couples into two groups, and put all male members of the couples in the first group in the top-left corner and all female members in the bottom-right such that each female member is exactly a translation of $(n, -n)$ away from their counterpart; similarly, we repeat for the second group instead for the top-right and bottom-left. One can verify this gives a distance of $4n^3$.