Enumerating every Latin square of a specified order, without identifying row, column or symbol permutations as the same output. Arbitrary square generation visits candidates. Restricting every row to a permutation reduces this to candidates. Both counts follow by independent choices for positions or rows; neither count is the number of valid Latin squares.
Build a Latin square row by row, maintaining the symbols already used in each column. While choosing a row, remove each selected symbol from the row's available pool and reject any symbol already used in that column. The invariant proves every complete output valid. Conversely every valid target row survives the checks, proving completeness by induction. A partial branch may still have no completion; avoiding complete invalid outputs does not mean every explored list prefix is extendable.

Articles by others on the same topic (0)

There are currently no matching articles.