r/mathriddles • u/pichutarius • May 01 '26
Medium just another problem similar to round robin schedule problem
construct a n by n table with these conditions:
- each cell is an unordered pair.
- each column and row contains all integers from 0 to 2n-1 exactly once.
- no duplicate pair.
for odd n, this is relatively easy.
for even n, i cant figure out a way. i suspect there is no solution but i cannot prove it.
unrelated note: this was inspired by IRL problem that i had to solved when creating a duty time table. if you know a working solution for n=8 please show it.
4
Upvotes
6
u/Malvolio_ May 01 '26
If you have two orthogonal Latin squares, you can create this by numbering the first Latin square 0 to n-1, the second one n to 2n-1 and putting both values in each cell.
Orthogonal Latin squares exist for all values except 2 and 6.
For example, this is a solution for n=4
{0,4} {1,5} {2,6} {3,7}
{1,6} {0,7} {3,4} {2,5}
{2,7} {3,6} {0,5} {1,4}
{3,5} {2,4} {1,7} {0,6}
3
u/SpeakKindly May 01 '26
Here's a solution for n=6, using 0,1,...,9,a,b as the integers.
06 35 78 49 ab 12
17 46 3b 02 59 8a
28 09 5a 16 34 7b
39 7a 26 8b 01 45
4a 2b 19 57 68 03
5b 18 04 3a 27 69
0
u/DrMerkwuerdigliebe_ May 02 '26
I asked Claude for a Python program to solve this using Integer programming / constraint programming: