Random Latin squares: Difference between revisions
Content added Content deleted
Line 1,564: | Line 1,564: | ||
the first row, and then adds cells one-by-one by making a calculated |
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, |
but fallible selection based on the values in its row and column, |
||
backtracking on failure. The method |
backtracking on failure. The method scales quite well, though 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 |
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. |
takes from 0.11 to 0.14 seconds (u+s) on my 3GHz machine. |
||
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 |
To generate LS(15), the jq program typically takes 0.15 to 0.21s; to |