Search for pairs.
[ X , C , L ] = sudoku_findtwocolors ( X , C , L ) [ X , C , L ] = sudoku_findtwocolors ( X , C , L , stopatfirst ) [ X , C , L ] = sudoku_findtwocolors ( X , C , L , stopatfirst , verbose )
a 9-by-9 matrix, with 0 for unknown entries
a 9 x 9 cell of candidates
the 9 x 9 matrix of number candidates
if %t, then stop when one or more candidates have been removed. (default = %t)
a boolean. Set to %t to display the state of the matrix. (default = %f)
Color the sudoku with 2 colors and find inconsistencies. The algorithm is the following: * compute conjugate pairs (i.e. pairs of two cells which are the only 2 candidates in their rows, columns or blocks), * add coloring with 2 colors, * make deductions: * strategy #1 : if there are two colored cells with color X in the same row, column or block, remove the candidate d in these cells, * strategy #2 : if there exist one uncolored cell A visible by two colored cells, then A is not a candidate of the uncolored cell. The Turbot-fish strategy is superseded by the 2-colors strategy.
Angus Johnson, http://www.angusj.com/sudoku/hints.php