Pencilmark Sudoku

Programs which generate, solve, and analyze Sudoku puzzles

Pencilmark Sudoku

Postby dobrichev » Wed Oct 02, 2019 8:25 pm

PencilmarkSudoku.v1.1 is released.
It includes C++ source code and Linux 64-bit binary.

The commands and options implemented so far
Code: Select all
 --solve             Solve puzzles
   --vanilla             Input is vanilla 81-char puzzles (default is 729-char pencilmarks)
   --minimals            Check puzzles for minimality
   --count               Print solution count and reduced pencilmarks
     --maxsolutioncount <n>  Solves up to <n>-th solution (INT_MAX)
 --backdoor          Print backdoors size & exemplar
   --vanilla             Input is vanilla 81-char puzzles (default is 729-char pencilmarks)
 --solrowminlex      Transform valid puzzles to their solution lexicographically minimal row morph
   --vanilla             Input is vanilla 81-char puzzles (default is 729-char pencilmarks)
 --minimizerandom    Remove all redundant constraints from valid puzzles randomly
   --vanilla             Input is vanilla 81-char puzzles (default is 729-char pencilmarks)
   --buffersize <n>      Number of random subgrids processed in each pass (100)

The source code contains several vicinity search procedures that are still not exposed as commands.
dobrichev
2016 Supporter
 
Posts: 1850
Joined: 24 May 2010

Re: Pencilmark Sudoku

Postby tarek » Thu Oct 03, 2019 6:40 am

Great work Mladen. I can see more and more tough sukakus appearing in the near future.

tarek
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Pencilmark Sudoku

Postby Mathimagics » Thu Oct 03, 2019 8:57 am

Just to report that compiling and linking under Win64 with MinGW GCC was trouble-free, with just one minor problem:

  • minimizer.cpp needs "#include <time.h>" (for clock_t, clock() etc)

Nice work with the source packaging!! 8-)
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: Pencilmark Sudoku

Postby tarek » Thu Oct 03, 2019 4:46 pm

Mathimagics wrote:Just to report that compiling and linking under Win64 with MinGW GCC was trouble-free, with just one minor problem:

  • minimizer.cpp needs "#include <time.h>" (for clock_t, clock() etc)

Nice work with the source packaging!! 8-)

I'll attempt it. I may need the step-by-step help if I fail though :lol:
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Pencilmark Sudoku

Postby dobrichev » Thu Oct 03, 2019 4:53 pm

Thank you Tarek and Mathimagics.

Good to know that the source compiles.
Even better would be to try directly the binary on 64-bit POSIX emulator. The binary doesn't depend on any external library and I am pretty sure it will run on most Linux clones.
dobrichev
2016 Supporter
 
Posts: 1850
Joined: 24 May 2010

Re: Pencilmark Sudoku

Postby tdillon » Sat Oct 05, 2019 12:23 am

Putting aside the question of how hard pencilmark Sudoku may be for humans, it's really interesting how much trouble they can be for solvers optimized for conventional Sudoku.

Most conventional Sudoku are solved by solvers like fsss2, jczsolve, or tdoku in a few usec, with even the very hardest puzzles solved in < 1ms. In contrast, while most pencilmark Sudoku are also solved by these tools in a few usec, for hard cases the times can easily blow up into minutes or maybe much more.

One way to understand what's different is to look at how many propositional variables are known to the solver at the start after elimination in visible cells and propagation of singles. For the hardest Sudoku this is usually in the vicinity of 500 out of 729, with 425 as the lowest I've seen**. For pencilmark Sudoku Mladen has shown this can be at least as low as 92 out of 729.

For conventional Sudoku, with so many variables known at the start, the search space is small enough that a solver with decent heuristics never backtracks more than a few hundred times. For pencilmark Sudoku it's easy to find cases where the same solver backtracks hundreds of millions of times.

Solvers like fsss2 and tdoku have different heuristics and will differ on which puzzles cause them the most trouble, but there's no getting around the fact that their limited forward inference tools will always leave them vulnerable to serious performance degradation in the (fairly common) pathological cases.

OTOH, among the solvers I've tested, two solvers that *do* seem to manage consistent performance with pencilmark Sudoku are the one based on minisat and the one using DPLL with strongly connected components (_tdev_dpll_triad_scc_ih). For vanilla Sudoku neither of these solvers is particularly fast, but for pencilmark Sudoku the power of conflict directed clause learning in the first case and SCC-based inference and heuristics in the second is enough to keep them out of trouble.

As an example, take this set of 100 pencilmark puzzles (by no means among the most pathological):

Both PencilmarkSudoku.v1.1 and tdoku take more than 5 minutes to solve the set of them.

Both minisat and _tdev_dpll_triad_scc_ih solve the set in in about 0.08 seconds.

I'd guess that solvers that incorporate lots of human patterns like rjami's RJSolBit.c will also do well with pencilmark, since these puzzles favor forward inference vs. backtracking.

[**] these numbers actually came from the dpll-triad solver which also propagates locked candidates and related things, so the number of known variables might be a bit lower if only propagating singles.
tdillon
 
Posts: 66
Joined: 14 June 2019

Re: Pencilmark Sudoku

Postby tdillon » Sat Oct 05, 2019 10:11 pm

Let me backpedal a little bit. After playing around with this some more it's clear that the example above paints too rosy a picture for minisat and the scc solver.

They do perform well on some datasets that were pathological for fsss2 and todku (e.g., the example given above; larger datasets from the same generator; and a set of killer patterns provided by Mladen), but they can still be quite a bit slower for other datasets (e.g., 30 puzzles/sec for minisat vs. 500 pps for tdoku on puzzles from a different generator).

It's probably still fair to say that they manage more consistent performance than fsss2 and tdoku and that they tend to avoid getting into deep trouble. i.e., they have lower coefficients of variation for solving time, and I haven't seen individual puzzles yet that are pathologically slow.

But they might still be slower on average for practical purposes, and it's hard to say any more without a use case.
tdillon
 
Posts: 66
Joined: 14 June 2019

Re: Pencilmark Sudoku

Postby Mathimagics » Sun Oct 06, 2019 3:21 am

Sudoku solvers are a bit like mousetraps ... 8-)
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: Pencilmark Sudoku

Postby dobrichev » Sun Oct 06, 2019 6:53 pm

Mathimagics wrote:Sudoku solvers are a bit like mousetraps ... 8-)

Sudoku generators are beehives.
tdillon wrote:OTOH, among the solvers I've tested, two solvers that *do* seem to manage consistent performance with pencilmark Sudoku are the one based on minisat and the one using DPLL with strongly connected components (_tdev_dpll_triad_scc_ih). For vanilla Sudoku neither of these solvers is particularly fast, but for pencilmark Sudoku the power of conflict directed clause learning in the first case and SCC-based inference and heuristics in the second is enough to keep them out of trouble.

Coloring?
(Jim surely likes your language)
dobrichev
2016 Supporter
 
Posts: 1850
Joined: 24 May 2010

Re: Pencilmark Sudoku

Postby dobrichev » Sun Oct 06, 2019 7:34 pm

Few improvements.
Code: Select all
 --minimizerandom    Remove all redundant constraints from valid puzzles randomly
   --vanilla             Input is vanilla 81-char puzzles (default is 729-char pencilmarks)
   --buffersize <n>      Breadth search <n> subgrids are passed to next stage (default 0=disable)
   --numresults <n>        Random search, stop after <n> puzzles are generated (10)
     --minsize <n>         Ignore puzzles smaller than <n> restrictions (0)
     --maxsize <n>         Ignore puzzles larger than <n> restrictions (729)
     --maxattempts <n>     Max attempts per input (INT_MAX)
     --maxretries <n>      Max subsequent unsuccessful attempts per input (INT_MAX)


PencilmarkSudoku --minimizerandom [--vanilla] --buffersize 200 < input > output 2> log
does breadth first search for every input (unique pencilmark or vanilla puzzle or solution grid).
At each pass one restriction is removed, and from survived (unique) puzzles buffersize are selected randomly and passed to the next iteration.
Minimal puzzle, when appeared, is printed.
This process trends to give low-clue puzzles - the low-clue cores generate more results in preceding steps and respectively have more chance to survive to the end.

PencilmarkSudoku --minimizerandom [--vanilla] --numresults 200 [--minsize 280] [--maxattempts 5000] [--maxretries 10] < input > output 2> log
does deep-first search using randomly predefined sequence of restriction removal. Works faster than the breadth-first search and hopefully gives unbiased results.
Reaching numresults advances to the next input, as well as reaching maxattempts per input or maxretries long sequence of unsuccessful attempts.

Some results for the high-clue end search performed on Pt grid.

Num miniimal puzzles, num of restrictions (=size)
Code: Select all
     47 280
     29 281
     31 282
     20 283
     12 284
     19 285
      7 286
      5 287
      2 288
      5 289
      2 291
      1 298

The bottom puzzle according to SE starts with elimination rated 12.5, so now we have a minimal pencilmark puzzle rated ER=?/12.9+/12.5.
Hidden Text: Show
Code: Select all
12..5..8..23.567..1.3.567891.345.78....45.78.1..4567.912.4567.....456789123.567.91.34567.9.23.5678..234..7.912......91.....78...34..7891.345...9.2...6...1....678..2.456789..34..7891234567891234.678..2.45.78.1..4..7..123....891...5.7...234567..123456.89..34.6.8.1234.67.91.3.56.....34...8912.4567..123..678912.4.67891.345.78.1...567.91234...8.1..45....12.45..8912.456..9123...78.1...56.8..23.56.89.2.45678..2.45678912....7.9..3.56.8..2.4567891.3456.89123.5...9123456.891234.6.8.1.34.6789..34567.912345.789.23.56789.23.5....12..56...1..45.7..12345...9..3..678.12.45.7...2..5.7..1.....7..1.34...8.12.4.6..9123.567.9.2..56.89.23.56...123.56.89123456..912...67.91.34.6....23.....9.2..567..12.4.6789123.5.78...34.67.91...567.9..345.789
12.5   DCFC+DFC   Contradiction Forcing Chain: r1c3.5 on ==> r6c2.7 both on & off
12..5..8..23.567..1.3..67891.345.78....45.78.1..4567.912.4567.....456789123.567.91.34567.9.23.5678..234..7.912......91.....78...34..7891.345...9.2...6...1....678..2.456789..34..7891234567891234.678..2.45.78.1..4..7..123....891...5.7...234567..123456.89..34.6.8.1234.67.91.3.56.....34...8912.4567..123..678912.4.67891.345.78.1...567.91234...8.1..45....12.45..8912.456..9123...78.1...56.8..23.56.89.2.45678..2.45678912....7.9..3.56.8..2.4567891.3456.89123.5...9123456.891234.6.8.1.34.6789..34567.912345.789.23.56789.23.5....12..56...1..45.7..12345...9..3..678.12.45.7...2..5.7..1.....7..1.34...8.12.4.6..9123.567.9.2..56.89.23.56...123.56.89123456..912...67.91.34.6....23.....9.2..567..12.4.6789123.5.78...34.67.91...567.9..345.789
12.5   DCFC+DFC   Contradiction Forcing Chain: r1c1.5 on ==> r9c2.1 both on & off
12.....8..23.567..1.3..67891.345.78....45.78.1..4567.912.4567.....456789123.567.91.34567.9.23.5678..234..7.912......91.....78...34..7891.345...9.2...6...1....678..2.456789..34..7891234567891234.678..2.45.78.1..4..7..123....891...5.7...234567..123456.89..34.6.8.1234.67.91.3.56.....34...8912.4567..123..678912.4.67891.345.78.1...567.91234...8.1..45....12.45..8912.456..9123...78.1...56.8..23.56.89.2.45678..2.45678912....7.9..3.56.8..2.4567891.3456.89123.5...9123456.891234.6.8.1.34.6789..34567.912345.789.23.56789.23.5....12..56...1..45.7..12345...9..3..678.12.45.7...2..5.7..1.....7..1.34...8.12.4.6..9123.567.9.2..56.89.23.56...123.56.89123456..912...67.91.34.6....23.....9.2..567..12.4.6789123.5.78...34.67.91...567.9..345.789
12.6   DCFC+DFC   Contradiction Forcing Chain: r1c6.7 on ==> r2c3.7 both on & off
12.....8..23.567..1.3..67891.345.78....45.78.1..456..912.4567.....456789123.567.91.34567.9.23.5678..234..7.912......91.....78...34..7891.345...9.2...6...1....678..2.456789..34..7891234567891234.678..2.45.78.1..4..7..123....891...5.7...234567..123456.89..34.6.8.1234.67.91.3.56.....34...8912.4567..123..678912.4.67891.345.78.1...567.91234...8.1..45....12.45..8912.456..9123...78.1...56.8..23.56.89.2.45678..2.45678912....7.9..3.56.8..2.4567891.3456.89123.5...9123456.891234.6.8.1.34.6789..34567.912345.789.23.56789.23.5....12..56...1..45.7..12345...9..3..678.12.45.7...2..5.7..1.....7..1.34...8.12.4.6..9123.567.9.2..56.89.23.56...123.56.89123456..912...67.91.34.6....23.....9.2..567..12.4.6789123.5.78...34.67.91...567.9..345.789
12.6   DCFC+DFC   Contradiction Forcing Chain: r2c1.9 on ==> r2c5.7 both on & off
12.....8..23.567..1.3..67891.345.78....45.78.1..456..912.4567.....456789123.567.91.34567...23.5678..234..7.912......91.....78...34..7891.345...9.2...6...1....678..2.456789..34..7891234567891234.678..2.45.78.1..4..7..123....891...5.7...234567..123456.89..34.6.8.1234.67.91.3.56.....34...8912.4567..123..678912.4.67891.345.78.1...567.91234...8.1..45....12.45..8912.456..9123...78.1...56.8..23.56.89.2.45678..2.45678912....7.9..3.56.8..2.4567891.3456.89123.5...9123456.891234.6.8.1.34.6789..34567.912345.789.23.56789.23.5....12..56...1..45.7..12345...9..3..678.12.45.7...2..5.7..1.....7..1.34...8.12.4.6..9123.567.9.2..56.89.23.56...123.56.89123456..912...67.91.34.6....23.....9.2..567..12.4.6789123.5.78...34.67.91...567.9..345.789
12.7   DCFC+DFC   Contradiction Forcing Chain: r2c3.9 on ==> r3c5.4 both on & off
12.....8..23.567..1.3..67891.345.78....45.78.1..456..912.4567.....456789123.567.91.34567...23.5678..234..7..12......91.....78...34..7891.345...9.2...6...1....678..2.456789..34..7891234567891234.678..2.45.78.1..4..7..123....891...5.7...234567..123456.89..34.6.8.1234.67.91.3.56.....34...8912.4567..123..678912.4.67891.345.78.1...567.91234...8.1..45....12.45..8912.456..9123...78.1...56.8..23.56.89.2.45678..2.45678912....7.9..3.56.8..2.4567891.3456.89123.5...9123456.891234.6.8.1.34.6789..34567.912345.789.23.56789.23.5....12..56...1..45.7..12345...9..3..678.12.45.7...2..5.7..1.....7..1.34...8.12.4.6..9123.567.9.2..56.89.23.56...123.56.89123456..912...67.91.34.6....23.....9.2..567..12.4.6789123.5.78...34.67.91...567.9..345.789
12.8   DCFC+DFC   Contradiction Forcing Chain: r5c8.8 on ==> r1c1.2 both on & off
12.....8..23.567..1.3..67891.345.78....45.78.1..456..912.4567.....456789123.567.91.34567...23.5678..234..7..12......91.....78...34..7891.345...9.2...6...1....678..2.456789..34..7891234567891234.678..2.45.78.1..4..7..123....891...5.7...234567..123456.89..34.6.8.1234.67.91.3.56.....34...8912.4567..123..678912.4.67891.345.78.1...567.91234...8.1..45....12.45..8912.456..9123...78.1...56.8..23.56..9.2.45678..2.45678912....7.9..3.56.8..2.4567891.3456.89123.5...9123456.891234.6.8.1.34.6789..34567.912345.789.23.56789.23.5....12..56...1..45.7..12345...9..3..678.12.45.7...2..5.7..1.....7..1.34...8.12.4.6..9123.567.9.2..56.89.23.56...123.56.89123456..912...67.91.34.6....23.....9.2..567..12.4.6789123.5.78...34.67.91...567.9..345.789
12.8   DCFC+DFC   Contradiction Forcing Chain: r1c6.1 on ==> r7c7.5 both on & off
12.....8..23.567..1.3..67891.345.78....45.78....456..912.4567.....456789123.567.91.34567...23.5678..234..7..12......91.....78...34..7891.345...9.2...6...1....678..2.456789..34..7891234567891234.678..2.45.78.1..4..7..123....891...5.7...234567..123456.89..34.6.8.1234.67.91.3.56.....34...8912.4567..123..678912.4.67891.345.78.1...567.91234...8.1..45....12.45..8912.456..9123...78.1...56.8..23.56..9.2.45678..2.45678912....7.9..3.56.8..2.4567891.3456.89123.5...9123456.891234.6.8.1.34.6789..34567.912345.789.23.56789.23.5....12..56...1..45.7..12345...9..3..678.12.45.7...2..5.7..1.....7..1.34...8.12.4.6..9123.567.9.2..56.89.23.56...123.56.89123456..912...67.91.34.6....23.....9.2..567..12.4.6789123.5.78...34.67.91...567.9..345.789
12.9   DCFC+DFC   Contradiction Forcing Chain: r3c4.7 on ==> r1c2.2 both on & off
12.....8..23.567..1.3..67891.345.78....45.78....456..912.4567.....456789123.567.91.34567...23.5678..234..7..12......91.....78...34..7891.345...9.2...6...1....678..2.456789..34..7891234567891234.6.8..2.45.78.1..4..7..123....891...5.7...234567..123456.89..34.6.8.1234.67.91.3.56.....34...8912.4567..123..678912.4.67891.345.78.1...567.91234...8.1..45....12.45..8912.456..9123...78.1...56.8..23.56..9.2.45678..2.45678912....7.9..3.56.8..2.4567891.3456.89123.5...9123456.891234.6.8.1.34.6789..34567.912345.789.23.56789.23.5....12..56...1..45.7..12345...9..3..678.12.45.7...2..5.7..1.....7..1.34...8.12.4.6..9123.567.9.2..56.89.23.56...123.56.89123456..912...67.91.34.6....23.....9.2..567..12.4.6789123.5.78...34.67.91...567.9..345.789
dobrichev
2016 Supporter
 
Posts: 1850
Joined: 24 May 2010

Re: Pencilmark Sudoku

Postby rjamil » Mon Oct 07, 2019 4:33 pm

Hi experts,

Tom wrote:I'd guess that solvers that incorporate lots of human patterns like rjami's RJSolBit.c will also do well with pencilmark, since these puzzles favor forward inference vs. backtracking.

Please note that, my solver is slower than as what you have tested other solvers in two ways as follows:
1) I used step by step recursion for forward searching, in case solution found, program returns from same number of recursion it forwarded; and
2) I used step by step backtracking instead of directly jumping back to last guess.

If I will convert my program from recursive to iterative; and, instead of forwarding and backtracking step by step, just jump forward after/backtrack before guessing (as JCZSolve do) then, maybe, my program becomes faster many folds.

Similarly, I will definitely think to upgrade my program in order to input batch puzzles from given/clues to pencil mark separately as RJSudoku and RJSukaku respectively. I am adding this to my todo list but with less priority.

However, my program IS faster in a sense that it will search patterns with zero (or minimal in case I missed any) duplicate searching criteria. Let me elaborate this as how it works:

Consider following WXYZ-Wing patterns:
Hidden Text: Show
Code: Select all
WXYZ-Wing Type 4a (2 exemplars, up to 4 exclusions):
  --------------+-------------+-----------  --------------+-------------+-----------
01) .  wz    .  | -Z  -Z  -Z  |  .  .   . 02) .  xyz   .  | -Z  -Z  -Z  |  .  .   .
   -Z  wxy  wxy |  .  xyz  .  |  .  .   .    -Z  wxy  wxy |  .  wz   .  |  .  .   .
    .   .    .  |  .   .   .  |  .  .   .     .   .    .  |  .   .   .  |  .  .   .
72--------------+-------------+-----------72--------------+-------------+-----------
WXYZ-Wing Type 4b (4 exemplars, 1 exclusion):
  --------------+-------------+-----------  --------------+-------------+-----------
01) .  wz    .  |  .   .   .  |  .  .   . 02) .  xyz   .  |  .   .   .  |  .  .   .
   -Z wxyz wxy  |  .  xyz  .  |  .  .   .    -Z wxyz wxy  |  .  wz   .  |  .  .   .
    .   .    .  |  .   .   .  |  .  .   .     .   .    .  |  .   .   .  |  .  .   .
72--------------+-------------+-----------72--------------+-------------+-----------

  --------------+-------------+-----------  --------------+-------------+-----------
03) .  wz    .  |  .   .   .  |  .  .   . 04) .  xyz   .  |  .   .   .  |  .  .   .
   -Z wxyz wxyz |  .  xyz  .  |  .  .   .    -Z wxyz wxyz |  .  wz   .  |  .  .   .
    .   .    .  |  .   .   .  |  .  .   .     .   .    .  |  .   .   .  |  .  .   .
72--------------+-------------+-----------72--------------+-------------+-----------

Please note that, I use single dimensional arrays of 81 elements; holding bitwise cell values and clue/solved separately.

I don't know how many times other solver search the above mentioned patterns (I guess, at least double) but, my program search as follows:
1) For each 1st apex in unsolved cells; (maximum 64 occurrences for proper vanilla puzzle)
2) If 1st apex contain more than 4 values then go to step 1;
3) for each 1st wing in 1st apex row but not box; (maximum 6 occurrences)
4) If either 1st wing is not unsolved or 1st apex and 1st wing contain more than 4 values in total then go to step 3;
5) For each 2nd wing in 1st apex box but not 1st wing row; (maximum 6 occurrences)
6) If either 2nd wing is not unsolved or 1st apex, 1st wing and 2nd wing contain more than 4 values in total then go to step 5;
7) For each 2nd apex in 1st apex mini-row; (duplicate occurrences found here)
8) If either 1st apex position is greater than 2nd apex position; or 2nd apex is not unsolved then go to step 7;
9) Now check if one of the above mentioned pattern found then perform eliminations accordingly.
(Row can be replaced by column)

Added as on 20191009: a good example to check duplicate occurences is August 26, 2019 puzzle.

Where as, Hodoku searches all occurrences, then sort and delete duplicate one by one, in find all steps processing. In case of batch puzzle processing, imagine if no above mentioned WXYZ-Wing pattern found then how many unnecessary duplicate occurrences searched!!

I think, duplicate searching happened in programming but not in manual solving.

Hope, I present my point of view clearly as why I prefer to code my solver as pattern based.

R. Jamil
Last edited by rjamil on Wed Oct 09, 2019 10:03 am, edited 3 times in total.
rjamil
 
Posts: 730
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Pencilmark Sudoku

Postby creint » Mon Oct 07, 2019 4:55 pm

Here are the solvetimes of my solver (using a single thread): https://pastebin.com/Tkfn2RLu from the dataset https://pastebin.com/4WWpYQS9. There is one puzzle with no solution (48).

A better comparison would be the 206 16x16 puzzles posted elsewhere on this forum.
In that case my solver is as fast as minisat.
creint
 
Posts: 393
Joined: 20 January 2018

Re: Pencilmark Sudoku

Postby m_b_metcalf » Mon Oct 07, 2019 6:55 pm

creint wrote:Here are the solvetimes of my solver (using a single thread): https://pastebin.com/Tkfn2RLu from the dataset https://pastebin.com/4WWpYQS9. There is one puzzle with no solution (48).

My solver solves the whole lot in 1.6s using logic only. It also finds a unique solution for puzzle 48, shown below. Number 9 is very easy.

Regards,

Mike

Code: Select all
  5  8  7  6  1  3  2  4  9
  9  3  6  2  7  4  8  5  1
  4  1  2  8  5  9  3  7  6
  1  9  5  7  2  6  4  3  8
  3  6  8  4  9  5  1  2  7
  2  7  4  3  8  1  6  9  5
  8  5  3  1  4  7  9  6  2
  6  2  9  5  3  8  7  1  4
  7  4  1  9  6  2  5  8  3
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13586
Joined: 15 May 2006
Location: Berlin

Re: Pencilmark Sudoku

Postby creint » Mon Oct 07, 2019 9:22 pm

Your puzzle 48 solution contains atleast 2 errors, you pasted solution from 47:
Code: Select all
  5  8  7  6  1  3  2  4  9
  9  3  6  2  7  4  8  [5]  1
  4  [1]  2  8  5  9  3  7  6
  1  9  5  7  2  6  4  3  8
  3  6  8  4  9  5  1  2  7
  2  7  4  3  8  1  6  9  5
  8  5  3  1  4  7  9  6  2
  6  2  9  5  3  8  7  1  4
  7  4  1  9  6  2  5  8  3


Number 9 is very easy, not the easiest one.
And the logic used is chains?
creint
 
Posts: 393
Joined: 20 January 2018

Re: Pencilmark Sudoku

Postby m_b_metcalf » Tue Oct 08, 2019 8:45 am

creint wrote:Your puzzle 48 solution contains at least 2 errors, you pasted solution from 47:

Sorry, yes, you're right. The partial solution I obtain is below (my O/P code didn't expect zero solutions):
Code: Select all
  6  4  7  3  1  .  2  5  8
  5  1  .  9  2  8  4  6  3
  9  2  3  6  5  4  1  .  7
  4  8  1  7  6  3  5  2  9
  2  7  9  8  4  5  3  1  6
  3  6  5  2  9  1  7  8  4
  7  3  2  5  8  6  9  4  1
  8  5  4  1  3  9  6  7  2
  1  9  6  4  7  2  8  3  5

But I still maintain that 9 is the easiest, it can be solved with naked pairs and pointing. In general, apart from basic logic techniques, many candidates in these puzzles can be eliminated by simple contradiction. None needed brute force (unlike Mladen's nightmares).

Regards,

Mike
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13586
Joined: 15 May 2006
Location: Berlin

Next

Return to Software