The Vlasii Determinant Problem asks what is the maximum value of the determinant of an \(n \times n\) matrix where the numbers \(1, \ldots, n\) are repeatedly precisely \(n\) times. The optimal determinant is known up to \(n = 9\). This problem asks you to come up with a \(16 \times 16\) matrix such that the determinant is as large as possible.
Please submit a CSV file that contains \(16 \times 16 = 256\) values. Furthermore, every \(16\) values of the CSV corresponds to a row of a matrix, call it \(M\). Therefore, each \(16\) values should be some permutation of \(1, \ldots, 16\). The best score corresponds to maximizing \(\frac{\det(M)}{10^{16}}\).
The following is a Python implementation of the score function to help you get started.
import numpy as np
from sympy import Matrix
from collections import Counter
async def score(mat: [int]):
N = 16
# Not the correct size.
if len(mat) != N * N:
return None
# Ensure there are 10 copies of 1, 10:
c = Counter(mat)
for i in range(1, N + 1):
if c[i] != N:
return None
np_mat = np.reshape(mat, (N, N))
sym_mat = Matrix(np_mat)
return int(sym_mat.det() / (10 ** 16))