A085000
Maximal determinant of an n X n matrix using the integers 1 to n^2.
Original entry on oeis.org
1, 10, 412, 40800, 6839492, 1865999570, 762150368499
Offset: 1
The following 3 X 3 matrix is one of 36 whose determinant is 412 (there are also 36 whose determinant is -412):
9 3 5
4 8 1
2 6 7
Results from a specially adapted hill-climbing algorithm strongly suggest that a(5) = 6839492. a(6) is at least 1862125166. Heuristically, a(n) is approximately 0.44*n^(2.06*n), suggesting that a(7) is close to 6.8*10^11. - Tim Paulden (timmy(AT)cantab.net), Sep 21 2003
a(5) confirmed by _Robert Israel_ and _Hugo Pfoertner_. A corresponding matrix is ((25 15 9 11 4) (7 24 14 3 17) (6 12 23 20 5) (10 13 2 22 19) (16 1 18 8 21) ). - _Hugo Pfoertner_, Sep 23 2003
a(6) found with FORTRAN program given at Pfoertner link. A corresponding matrix is ((36 24 21 17 5 8) ( 3 35 25 15 23 11) (13 7 34 16 10 31) (14 22 2 33 12 28) (20 4 19 29 32 6) (26 18 9 1 30 27) ). - _Hugo Pfoertner_, Sep 23 2003
a(7) is the determinant of the matrix ((46 42 15 2 27 24 18) (9 48 36 30 7 14 31) (39 11 44 34 13 29 5) (26 22 17 41 47 1 21) (20 8 40 6 33 23 45) (4 28 19 25 38 49 12) (32 16 3 37 10 35 43)). Although no proof for the optimality of a(7) is available, the results of an extensive computational search make the existence of a better solution extremely unlikely. A total of approximately 15 CPU years on SGI Origin 3000 and of 3.8 CPU years on SGI Altix 3000 computers was used for this result.
- Sela Fried and Toufik Mansour, On the maximal sum of the entries of a matrix power, arXiv:2308.00348 [math.CO], 2023.
- Ortwin Gasper, Hugo Pfoertner and Markus Sigg, An Upper Bound for the Determinant of a Matrix with given Entry Sum and Square Sum, JIPAM, Journal of Inequalities in Pure and Applied Mathematics, Volume 10, Issue 3, Article 63, 2008.
- Hugo Pfoertner, Maximal determinant of matrix with elements 1..n. FORTRAN program.
- Markus Sigg, Gasper's determinant theorem, revisited, arXiv:1804.02897 [math.CO], 2018.
- Eric Weisstein's World of Mathematics, Square Matrix
- Index entries for sequences related to maximal determinants
Cf.
A088214,
A088215,
A088216,
A088217,
A088237,
A180087 [upper bounds for a(n)],
A180128,
A221976,
A301371,
A301532,
A301533,
A309985,
A325900,
A350566.
-
Needs["DiscreteMath`Combinatorica`"]; n=3; n2=n^2; dMax=0; mMax={}; p=Range[n2]; Do[m=Partition[p, n]; d=Det[m]; If[d>dMax, dMax=d; mMax=m]; p=NextPermutation[p], {k, n2!}]; {dMax, mMax} (* T. D. Noe *)
-
vectomat(v)=my(n=sqrtint(#v));matrix(n,n,i,j,v[n*(i-1)+j])
a(n)=my(m,t,M); n*=n; for(k=0,(n-1)!-1, t=matdet(M=vectomat(numtoperm(n,k))); if(abs(t)>m, m=abs(t); print(t" "M)));m \\ Charles R Greathouse IV, Sep 13 2013
a(4) from Marsac Laurent (jko(AT)rox0r.net), Sep 15 2003
Entry edited by
N. J. A. Sloane, Nov 22 2006, to remove some erroneous entries. Further edits Nov 25 2006.
A301371
Maximum determinant of an n X n matrix with n copies of the numbers 1 .. n.
Original entry on oeis.org
1, 1, 3, 18, 160, 2325, 41895, 961772, 27296640, 933251220
Offset: 0
Matrices with maximum determinants:
a(2) = 3:
(2 1)
(1 2)
a(3) = 18:
(3 1 2)
(2 3 1)
(1 2 3)
a(4) = 160:
(4 3 2 1)
(1 4 3 2)
(3 1 4 3)
(2 2 1 4)
a(5) = 2325:
(5 3 1 2 4)
(2 5 4 1 3)
(4 1 5 3 2)
(3 4 2 5 1)
(1 2 3 4 5)
a(6) = 41895:
(6 1 4 2 3 5)
(3 6 2 1 5 4)
(4 5 6 3 2 1)
(5 3 1 6 4 2)
(1 2 5 4 6 3)
(2 4 3 5 1 6)
a(7) = 961772:
(7 2 3 5 1 4 6)
(3 7 6 4 2 1 5)
(2 1 7 6 4 5 3)
(4 5 1 7 6 3 2)
(6 3 5 1 7 2 4)
(5 6 4 2 3 7 1)
(1 4 2 3 5 6 7)
a(8) = 27296640:
(8 8 3 5 4 3 4 1)
(1 8 6 3 1 6 6 5)
(5 3 8 1 7 6 4 2)
(5 1 6 8 2 4 7 3)
(1 5 2 7 8 6 4 3)
(7 3 2 4 3 8 2 7)
(5 4 2 2 6 2 8 7)
(4 5 7 6 5 1 1 7)
a(n) is an upper bound for the determinant of an n X n Latin square. a(n) = A309985(n) for n <= 7. a(8) > A309985(8). - _Hugo Pfoertner_, Aug 26 2019
From _Hugo Pfoertner_, Nov 04 2020: (Start)
a(9) = 933251220, achieved by a Non-Latin square:
(9 5 5 3 3 2 2 8 8)
(4 9 2 6 7 5 3 1 8)
(4 7 9 2 1 8 6 3 5)
(6 3 7 9 4 1 8 2 5)
(6 2 8 5 9 7 1 4 3)
(7 4 1 8 2 9 5 6 3)
(7 6 3 1 8 4 9 5 2)
(1 8 6 7 5 3 4 9 2)
(1 1 4 4 6 6 7 7 9)
found by Oleg Vlasii as an answer to the IBM Ponder This Challenge November 2019. See links. (End)
- Ortwin Gasper, Hugo Pfoertner and Markus Sigg, An Upper Bound for the Determinant of a Matrix with given Entry Sum and Square Sum, JIPAM, Journal of Inequalities in Pure and Applied Mathematics, Volume 10, Issue 3, Article 63, 2008.
- IBM Research, Large 9x9 determinant, Ponder This Challenge November 2019.
- Markus Sigg, Gasper's determinant theorem, revisited, arXiv:1804.02897 [math.CO], 2018.
- Oleg Vlasii, Determinant-OEIS-A301371-9, program and description, 4 Dec 2019.
- Index entries for sequences related to maximal determinants
A308853
a(n) is the minimum absolute value of nonzero determinants of order n Latin squares.
Original entry on oeis.org
1, 3, 18, 80, 75, 126, 196, 144, 405
Offset: 1
For n=2, the only Latin squares of order 2 are [[1, 2], [2, 1]] and [[2, 1], [1, 2]]. Therefore, the minimum absolute value of the determinants of order 2 Latin squares is 3.
-
# Takes a string and turns it into a square matrix of order n
def make_matrix(string,n):
m = []
row = []
for i in range(0,n * n):
if string[i] == '\n':
continue
if string[i] == ' ':
continue
row.append(Integer(string[i]) + 1)
if len(row) == n:
m.append(row)
row = []
return matrix(m)
# Reads a file and returns a list of the matrices in the file
def fetch_matrices(file_name,n):
matrices = []
with open(file_name) as f:
L = f.readlines()
for i in L:
matrices.append(make_matrix(i,n))
return matrices
# Takes a matrix and permutates each symbol in the matrix
# with the given permutation
def permute_matrix(matrix, permutation,n):
copy = deepcopy(matrix)
for i in range(0, n):
for j in range(0 , n):
copy[i,j] = permutation[copy[i][j] - 1]
return copy
"""
Creates a determinant list with the following triples,
[Isotopy Class Representative, Permutation, Determinant]
The Isotopy class representatives come from a file that
contains all Isotopy classes.
"""
def create_determinant_list(file_name,n):
the_list = []
permu = (Permutations(n)).list()
matrices = fetch_matrices(file_name,n)
for i in range(0,len(matrices)):
for j in permu:
copy = permute_matrix(matrices[i],j,n)
the_list.append([i,j,copy.determinant()])
print(len(the_list))
return the_list
# Froylan Maldonado, Jun 28 2019
A309258
a(n) is the number of distinct absolute values of determinants of order n Latin squares.
Original entry on oeis.org
1, 1, 1, 3, 6, 197, 3684, 159561
Offset: 1
For n = 5, the set of absolute values of determinants is {75, 825, 1200, 1575, 1875, 2325}, so a(5) = 6.
A328030
Maximum determinant of a circulant n X n matrix whose rows are permutations of [1,2,..,n].
Original entry on oeis.org
1, 1, 3, 18, 160, 2325, 41895, 961772, 26978400, 929587995, 36843728625, 1705290814194, 89802671542272, 5336424046419557, 354379732734283200, 26173529641406219400
Offset: 0
A328029
Lexicographically earliest permutation of [1,2,...,n] maximizing the determinant of an n X n circulant matrix that uses this permutation as first row, written as triangle T(n,k), k <= n.
Original entry on oeis.org
1, 2, 1, 1, 2, 3, 2, 1, 4, 3, 1, 2, 4, 3, 5, 2, 1, 6, 3, 5, 4, 1, 2, 4, 6, 5, 3, 7, 2, 1, 5, 4, 8, 3, 6, 7, 1, 2, 4, 8, 6, 7, 5, 3, 9, 1, 2, 10, 7, 8, 3, 9, 5, 4, 6, 1, 2, 6, 11, 7, 9, 4, 8, 5, 3, 10, 2, 1, 7, 3, 12, 5, 9, 10, 4, 6, 11, 8, 1, 2, 12, 13, 5, 10, 6, 11, 3, 9, 8, 4, 7
Offset: 1
The triangle starts
1;
2, 1;
1, 2, 3;
2, 1, 4, 3;
1, 2, 4, 3, 5;
2, 1, 6, 3, 5, 4;
1, 2, 4, 6, 5, 3, 7;
2, 1, 5, 4, 8, 3, 6, 7;
1, 2, 4, 8, 6, 7, 5, 3, 9;
1, 2, 10, 7, 8, 3, 9, 5, 4, 6;
.
The 4th row of the triangle T(4,1)..T(4,4) = a(7)..a(10) is [2,1,4,3] because this is the lexicographically earliest permutation of [1,2,3,4] producing a circulant 4 X 4 matrix with maximum determinant A328030(4) = 160.
[2, 1, 4, 3;
3, 2, 1, 4;
4, 3, 2, 1;
1, 4, 3, 2].
All lexicographically earlier permutations lead to smaller determinants, with [1,2,3,4] and [1,4,3,2] producing determinants = -160.
-
f[n_] := (p = Permutations[Table[i, {i, n}]]; L = Length[p]; det = Max[Table[Det[Reverse /@ Partition[p[[i]], n, 1, {1, 1}]], {i, 1, L}]]; mat = Table[Reverse /@ Partition[p[[i]], n, 1, {1, 1}], {i, 1, L}]);
n = 1; While[n <= 10, ClearSystemCache[[]]; f[n]; triangle = Parallelize[Select[mat, Max[Det[#]] == det &]]; Print[SortBy[triangle, Less][[1]][[1]]]; n++]; (* Kebbaj Mohamed Reda, Dec 03 2019; edited by Michel Marcus, Dec 24 2023 *)
A309984
Number of n X n Latin squares with determinant 0, divided by 2.
Original entry on oeis.org
0, 0, 0, 16, 0, 2088, 5752, 199600889
Offset: 1
a(4)=16: There are 2*a(4) = 32 4 X 4 Latin squares with determinant = 0, one of which is
[1 4 3 2]
[4 1 2 3]
[3 2 1 4]
[2 3 4 1].
An example of a 6 X 6 Latin square with determinant = 0 is
[1 3 4 6 5 2]
[3 2 6 5 4 1]
[4 6 3 2 1 5]
[6 5 1 3 2 4]
[5 4 2 1 3 6]
[2 1 5 4 6 3].
A328031
Upper bound for the determinant of an n X n matrix whose entries are a permutation of the multiset {1^n,...,n^n}.
Original entry on oeis.org
1, 1, 3, 18, 172, 2343, 42439, 976050, 27583338, 934173632, 37180409223, 1711870023666, 90007747560742, 5346164992890599, 355442084718552178, 26244000000000000000, 2137205155719002036203, 190811368062993357765186, 18577775646585813239195436, 1963166636163973976912956096
Offset: 0
-
for(n=1,20,print1(floor(n^n*((n+1)/2)*((n+1)/12)^((n-1)/2)),", "))
Showing 1-8 of 8 results.
Comments