Latin Rectangle

Author

Eric W. Weisstein
September 3, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Combinatorics/LatinRectangle.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/LatinRectangle.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

UniqueElementsQ[l_List]:=Equal@@(Length/@{l,Union[l]})

LatinRectangleQ[l_List?MatrixQ]:=And@@Flatten[Map[UniqueElementsQ,{m,Transpose[m]},{2}]]

Latin Rectangle Counts

latinnorm[1]:={1}
latinnorm[2]:={1,1}
latinnorm[3]:={1,1,1}
latinnorm[4]:={1,3,4,4}
latinnorm[5]:={1,11,46,56,56}
latinnorm[6]:={1,53,1064,6552,9408,9408}
latinnorm[7]:={1,309,36792,1293216,11270400,16942080,16942080}
latinnorm[8]:={1,2119,1673792,420906504,27206658048,335390189568,535281401856,
  535281401856}
latinnorm[9]:={1,16687,103443808,207624560256,112681643983776,12962605404381184,
  224382967916691456,377597570964258816,377597570964258816}
latinnorm[10]:={1,148329,8154999232,147174521059584,746988383076286464,
  870735405591003709440,177144296983054185922560,4292039421591854273003520,
  7580721482160132811489280,7580721482160132811489280}

LatinNorm[k_,n_]:=latinnorm[n][[k]]
Latin[k_,n_]:=n!(n-1)!LatinNorm[k,n]/(n-k)!
LatinPrint:=Module[{k,n},
  Do[
    Do[
      Print[n," & ",k," & ",LatinNorm[k,n],"\\cr"],
      {k,2,n-1}
    ],
    {n,1,10}
  ]
]

LatinPrint

LatinNorm[8,8]