I'm an art hobbyist working on a painting that has a grid of $7$ rows and columns with a painted rectangle (rounded corners) at each grid position. I wanted to use $7$ colours and not have a colour repeat in any row or column. Googling I found this is called a Latin Square. Then to my surprise I learnt that there are $16$ million odd order $7$ Latin Squares. Rather than just pick one of those $16$ million I thought it would be interesting to use one of the more unique versions that has some additional constraint imposed on it. Then I wondered whether there is such a thing as a maximally dispersed Latin Square? By this I mean that the average physical distance between each element and the other $6$ elements of the same symbol is greatest when averaged over all $49$ elements.
So my question is:
Does a method exist for construction an order 7 Latin Square that is maximally dispersed in the sense I've tried to describe above?
This is not a method of construction, but a brute force exhaustive search. Not mathematically elegant, but may eventually give you a maximally dispersed Latin square.
Wikipedia says there are $16942080$ reduced Latin squares of order $7$. I suspect you want the first column to be permuted, which multiplies that by $6! = 720$, giving around 12 billion squares.
I wrote a computer program to exhaustively search the space of Latin squares with first row fixed. (There could possibly be more if rounding errors distorted the calculations, I only output when $\ge$ current best) the best $4$ each with a final score of $1199.824938649409432$ corresponding to average distance $4.081$ are:
The next nearest runner-up had score $1199.476574957478533$.
The Latin square with the least dispersion (score $1151.661909164740564$, corresponding to average distance $3.917$) was (two isomorphic variants of):
The nearest runner up had score $1152.143695276356539$.
Interestingly, using a slightly different measurement (summing squared distances), every single one of the 1 billion or so calculated so far has score $5488$.
Here is the source code for the search program: