Pruned Latin square search
ID: pruned-latin-square-search
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.
New to topics? Read the docs here!