1
$\begingroup$

The following question arose when I thought about this question:
Art hobbyist seeking maximally dispersed Latin Square of order 7


A latin square of size $n$ is a $n\times n$ matrix containing $n$ distinct elements, where each element appears in exactly one row and exactly one column.

Let $L$ be a latin square and $f(L)$ the sum of all squared distances of all equal elements, formally:

with $L=(x_{ij})_{i,j=1\dots n}$, let

$$f(L)=\sum_{\{x_{ij}=x_{kl}, i

where $d((a,b),(c,d))=\sqrt{(a-c)^2+(b-d)^2}$.

Prove that

$f(L)=(n^5-n^3)/6$ for any latin square $L$ of size $n$

(or give a counterexample).


Example:

1 2 3 4
4 1 2 3
2 3 4 1
3 4 1 2

The squared distances between the ones sum up to $(1^2+1^2)+(3^2+2^2)+(2^2+3^2)+(2^2+1^2)+(1^2+2^2)+(1^2+1^2) = 40\text.$ Likewise for the twos, threes and fours, yielding a total of 160 (=$(4^5-4^3)/6$).

It feels pretty "clear" that the assertion holds for all $n$, but I'm having trouble writing down a formal proof.


1 Answers 1

1

Here is what I have, but the parts in red need some refinement


For $x\in L$, let

$$f_x(L) = \sum_{\{x_{ij}=x_{kl}=x, i

Then, $$f(L)=\sum_{x\in L}f_x(L).$$

For each $x$, we have

$$f_x(L) = \sum_{\{x_{ij}=x_{kl}=x, i

Since, by definition, $x$ appears once in each row,

$$(*) \color{red}{\underset{\text{why?}}{=}} \sum_{i,k=1\dots n, i < k}(i-k)^2=\sum_{k=2}^n\sum_{i=1}^{k-1}(i-k)^2=\sum_{k=2}^n\sum_{t=1}^{k-1}t^2=\sum_{k=2}^n\frac 16(k^3-k^2-k)=\frac{n^4-n^2}{12}\text,$$

where the last two equalities are obtained from well-known sum formulas.

$\color{red}{\text{Likewise}}$, since $x$ appears in each column, $$(**)=\frac{n^4-n^2}{12}\text,$$

so

$$f_x(L)=2\cdot\frac{n^4-n^2}{12}$$

for all $x$, and

$$f(L)=\sum_{x\in L}f_x(L)=\sum_{x\in L}\frac{n^4-n^2}6=\frac{n^5-n^3}6.$$

  • 0
    To make the arguments bullet-proof, I feel like we need to work with some bijective mapping column -> row that gives the location of $x$.2017-02-09