## 15202 Reputation

12 years, 70 days

## Corrected code...

Dear Markiyan! Thank you for finding error in my code. I did not notice the coefficients 2, 3 and so on before x_2, x_3, and so on. The corrected code:

P:=proc(k, i)

local L, s, M, K, m;

if not (k>=2*i and 2*i>=4) then

error `should be k>=2*i>=4` fi;

if not type(k, posint) or not type(i, posint) then

error `should be k is integer and i is integer` fi;

L:=[];

for s from k-2*i to k-i do

M:=combinat[composition](s+i, i);

K:=[seq([seq(M[j,l]-1, l=1..i)], j=1..nops(M))];

for m from 1 to nops(M) do

if convert([seq(type(K[m,t]/t, integer), t=2..i)], `and`) then

L:=[op(L), [K[m,1],seq(K[m,t]/t, t=2..i)]]; fi; od;

od;

L;

end proc;

## Corrected code...

Dear Markiyan! Thank you for finding error in my code. I did not notice the coefficients 2, 3 and so on before x_2, x_3, and so on. The corrected code:

P:=proc(k, i)

local L, s, M, K, m;

if not (k>=2*i and 2*i>=4) then

error `should be k>=2*i>=4` fi;

if not type(k, posint) or not type(i, posint) then

error `should be k is integer and i is integer` fi;

L:=[];

for s from k-2*i to k-i do

M:=combinat[composition](s+i, i);

K:=[seq([seq(M[j,l]-1, l=1..i)], j=1..nops(M))];

for m from 1 to nops(M) do

if convert([seq(type(K[m,t]/t, integer), t=2..i)], `and`) then

L:=[op(L), [K[m,1],seq(K[m,t]/t, t=2..i)]]; fi; od;

od;

L;

end proc;

## @Markiyan Hirnyk  Unfortunately, t...

Unfortunately, there is a limit in Maple on the length of the list. Run the following code (all permutations of 10 elements):

combinat[permute](10);

There are ways around this restriction, for example, dividing the list into several parts.

## @Markiyan Hirnyk  Unfortunately, t...

Unfortunately, there is a limit in Maple on the length of the list. Run the following code (all permutations of 10 elements):

combinat[permute](10);

There are ways around this restriction, for example, dividing the list into several parts.

That's right!

That's right!

## Question...

And where is your Maple  code and PDF?

## @Markiyan Hirnyk  1) Brief comment...

1) Brief comments can be found in the attached file.

2) The reason for the error in the Maple's calculation of the second integral G i don't understand.

## @Markiyan Hirnyk  1) Brief comment...

1) Brief comments can be found in the attached file.

2) The reason for the error in the Maple's calculation of the second integral G i don't understand.

## Of cause, it's way more difficult, but i...

Of cause, it's way more difficult, but i don't know different way.

## Of cause, it's way more difficult, but i...

Of cause, it's way more difficult, but i don't know different way.

## @Markiyan Hirnyk  You have given a ...

@Markiyan Hirnyk  You have given a definition by reference to Wikipedia: "A Latin square is said to be reduced (also, normalized or in standard form) if both its first row and its first column are in their natural order. " That is the definition I had in mind. If the condition is imposed only on the increase in the first row, the number of Latin squares is 8:

n:=0: NList:=[]:

for i from 1 to 960 do

if [seq(List[i][1,k], k=1..5)]=[1,2,3,4,5] then n:=n+1: NList:=[op(NList), List[i]]: fi:

od:

n;

op(NList[1..4]);

op(NList[5..8]);

## @Markiyan Hirnyk  You have given a ...

@Markiyan Hirnyk  You have given a definition by reference to Wikipedia: "A Latin square is said to be reduced (also, normalized or in standard form) if both its first row and its first column are in their natural order. " That is the definition I had in mind. If the condition is imposed only on the increase in the first row, the number of Latin squares is 8:

n:=0: NList:=[]:

for i from 1 to 960 do

if [seq(List[i][1,k], k=1..5)]=[1,2,3,4,5] then n:=n+1: NList:=[op(NList), List[i]]: fi:

od:

n;

op(NList[1..4]);

op(NList[5..8]);

## This is obvious...

@Markiyan Hirnyk  The number of normalized Latin squares with this property is 0, which is obvious without any calculations.

## This is obvious...

@Markiyan Hirnyk  The number of normalized Latin squares with this property is 0, which is obvious without any calculations.

 First 105 106 107 108 109 110 111 Page 107 of 112
﻿