Search for locked candidates.
[X,C,L] = sudoku_findlocked ( X , C , L ) [X,C,L] = sudoku_findlocked ( X , C , L , stopatfirst ) [X,C,L] = sudoku_findlocked ( X , C , L , stopatfirst , verbose )
a 9-by-9 matrix, with 0 for unknown entries
a cell array of candidate vectors for each cell.
the number of candidates for each cell
if %t, then stop after one or more candidates have been removed. (default = %t)
a boolean. Set to %t to display the state of the matrix. (default = %f)
Search for locked candidates of types 1 and 2 and eliminates them.
The type 1 algorithm searches in blocks (i.e. minigrids) for each occurence of the numbers n=1,2,...,9. It may happen that one candidate n appears in one single row or column. In this case, the candidate can be eliminated from other blocks in the same row or column. This is often called "Locked Candidate" of type 1 (Pointing).
Locked candidates of type 2 (Claiming) are also searched. The algorithm performs a loop for n=1,2,...,9 and for each row i. If there are cells which contains n as a candidate and are in one single block, we remove n from the candidates of the other cells in the same block. We also search for locked candidates of type 2 in columns.
The mathematics of Sudoku, Tom Davis, 2008
http://hodoku.sourceforge.net/en/tech_intersections.php#lc1