Re: Get all combinations of n digits among m digits
- Posted by jmduro 1 week ago
- 66 views
I have tested your modifications on some hard to resolve grids.
It fails on this one:
{
{{1,3,6,7},{1,6},{1,3,5,6,7,8},{1,3,4,5,6,8},9,{1,3,4,5,8},2,{5,6,8},{4,5,6,8}},
{{2,3,6},4,{2,3,5,6,8,9},{3,5,6,8},{3,6},{3,5,8},1,7,{5,6,8,9}},
{{1,6},{1,6,9},{1,5,6,8,9},2,{1,4,6},7,3,{5,6,8,9},{4,5,6,8,9}},
{{1,2,4,6},3,{1,2,4,6},{1,4,6,8},5,{1,4,8},{6,7,8,9},{1,2,6,8,9},{2,6,7,8,9}},
{9,7,{1,2,4,6},{1,3,4,6,8},{1,2,3,4,6},{1,3,4,8},{6,8},{1,2,3,5,6,8},{2,3,5,6,8}},
{5,8,{1,2,6},9,{1,2,3,6,7},{1,3},{6,7},4,{2,3,6,7}},
{8,{1,6,9},{1,3,4,6,9},7,{1,3,4},2,5,{3,6,9},{3,4,6,9}},
{{1,2,3,4,7},{1,2,9},{1,2,3,4,7,9},{1,3,4,5},{1,3,4},6,{4,7,8,9},{2,3,8,9},{2,3,4,7,8,9}},
{{2,3,4,6,7},5,{2,3,4,6,7,9},{3,4},8,{3,4,9},{4,6,7,9},{2,3,6,9},1}
}
At the end of the game, some cells have no valid candidate at all because of bad tips. I did not check much more because I already had such kind of problems before. I suppose it is due to combinations such as {4,6,6} with repeated candidates that I do not manage. It does not happen with my proposal.
Jean-Marc

