pjb, to answer your question:
When we partition the rows and columns into two sets we create 4 cell sets which can be coloured. The colours I use are yellow and blue for the selected rows and columns, green for their intersection cells, and white for cells that are in neither set. If we wanted we could then rearrange the rows and columns to give four colour blocks:
White Blue
Yellow Green
We can then
a) grey out any cells that can't contain any of the N digits in the focus set
b) add a # symbol to any cell that must contain one of them
We can now calculate the maximum and minimum truth holding capacity of the colour sets working first by rows and then by columns
The rows must all hold N truths but the number the blue cells can hold is reduced by any # cells in the white cells. If there are sufficient blue cells (that haven't been greyed) in the row to hold this number there is no constraint but otherwise a minimum number of truths that must be held in the white cells will be imposed. This can then be repeated in reverse to see if there is a minimum number of truths the blue cells must hold.
When this is done for every row and column and the minimum numbers for each colour added the larger of the (minimum by rows) and (minimum by columns) will apply to each colour set. Where this equals the number of coloured cells available, we know that all non-member candidates in that set must be false.
This may then establish that member candidates must be false in some complementary cells in the same row or column but this needs to be checked.
The calculations here are over-kill but will work for any way the rows and columns are split and any number of selected digits. Most splits will yield nothing, and the trick seems to be organising the divisions to concentrate the grey and # cells in 'diagonal' colour sets. This is what I'm currently trying to explore in the limited time I have available.
The method I described earlier is just a simplification that applies in a special case.
This is the puzzle you referenced with the selected rows and columns marked:
98.7..6....5.4.......9...8.7.....8.336......9..2....1..3.6....8....2.........1.40;11.60;11.60;10.00
- Code: Select all
v v v v v
*--------------------*--------------------*-------------------*
>| x x 14 | x 15 25 | x 25 1245# | < 1
| 12 12 5 # | 12 4 # 2 | 12 2 12 |
>| 124 124 14 | x 15 25 | 1245 x 1245 | < 4
*--------------------*--------------------*-------------------*
>| x 145 14 | 1245 # 15 245 | x 25 x | < 2
>| x x 14 | 1245 15 245 | 245 25 x | < 2
| 45 45 2 # | 45 5 45 | 45 1 # 45 |
*--------------------*--------------------*-------------------*
>| 1245 # x 14 | x 5 45 | 125 25 x | < 2
| 145 145 14 | 45 2 # 45 | 15 5 15 |
| 25 25 x | 5 5 1 # | 25 4 # 25 |
*--------------------*--------------------*-------------------*
^ ^ ^ ^ ^
As you say there are a total of 10 rows & columns selected and to rectify the count one of them should be taken out for the simple calculation to apply. The figures on the right hand side show the number of the intersection cells in the selected rows that can hold a member digit and row 3 has the most. Deselecting this row therefore reduces the count of the eligible intersection cells down to 7 which matches the number of givens and so produces the same exclusions as
ronk's diagram.
It's an approach I haven't considered before so I don't know how general it would be.
champagne's approach is effectively the same as a truth-and-link-sets one which I believe can refine the method further by considering if any of the member digits are confined to one colour set because they form locked sets with non-member digits. I'm not sure if that means that the rank then goes up to 1.
DPB