Random Latin squares: Difference between revisions

Line 1,564:
the first row, and then adds cells one-by-one by making a calculated
but fallible selection based on the values in its row and column,
backtracking on failure. The method ensuresscales uniformquite randomnesswell, andthough the running time is quite variable.
scales quite well, though the running time is quite variable.
 
For example, to generate a Latin Square of order 10 (LS(10)) typically
takes from 0.11 to 0.14 seconds (u+s) on my 3GHz machine. By comparison,
the Go program on this page using the "Reduced Form" method for
achieving uniform randomness is far more complicated and takes much
longer - execution was terminated after 50 minutes.
 
To generate LS(15), the jq program typically takes 0.15 to 0.21s; to
2,442

edits