6 x (1 of 3)

Post puzzles for others to solve here.

6 x (1 of 3)

Postby dobrichev » Wed Jul 30, 2014 4:57 pm

Code: Select all
... ... ..1
... ..2 .3.
..4 .5. 6..

... .6. 57.
..5 ..8 4.6
.9. .47 .8.

..3 1.. ...
51. ... ...
64. .3. ... 9.6/1.2/1.2
dobrichev
2016 Supporter
 
Posts: 1863
Joined: 24 May 2010

Re: 6 x (1 of 3)

Postby denis_berthier » Thu Jul 31, 2014 5:09 am

dobrichev wrote:
Code: Select all
... ... ..1
... ..2 .3.
..4 .5. 6..

... .6. 57.
..5 ..8 4.6
.9. .47 .8.

..3 1.. ...
51. ... ...
64. .3. ... 9.6/1.2/1.2



Hi Dobrichev,

This is much harder than the puzzles usually proposed in this section of the forum.
Using the T&E vs Braids and the gT&E vs g-Braids theorems, it can easily be checked that it can't be solved by braids, but it can be solved by g-braids.
Indeed, it can be solved by g-whips of length <= 9.
Adding Subsets and finned-fish in the rules doesn't change the rating.

Code: Select all
*************************************************************************************************************
***  SudoRules 20.0.s based on CSP-Rules 2.0.s, using CLIPS 6.30-r179, config = gW+SFin
*************************************************************************************************************
24 givens, 227 candidates
singles ==> r6c4 = 5, r6c3 = 6, r4c1 = 4
216 candidates, 1489 csp-links and 1489 links. Density = 6.41
hidden-pairs-in-a-block: b3{r1c8 r2c9}{n4 n5} ==> r2c9 ≠ 9, r2c9 ≠ 8, r2c9 ≠ 7, r1c8 ≠ 9, r1c8 ≠ 2
hidden-pairs-in-a-column: c2{n5 n6}{r1 r2} ==> r2c2 ≠ 8, r2c2 ≠ 7, r1c2 ≠ 8, r1c2 ≠ 7, r1c2 ≠ 3, r1c2 ≠ 2
finned-x-wing-in-rows: n1{r4 r3}{c6 c3} ==> r2c3 ≠ 1
singles ==> r4c3 = 1, r4c2 = 8, r5c5 = 1, r3c6 = 1, r2c1 = 1, r6c7 = 1, r8c7 = 3, r9c8 = 1
whip[1]: c5n2{r8 .} ==> r8c4 ≠ 2, r9c4 ≠ 2
naked-pairs-in-a-column: c8{r3 r5}{n2 n9} ==> r8c8 ≠ 9, r8c8 ≠ 2, r7c8 ≠ 9, r7c8 ≠ 2
biv-chain[2]: r6n2{c1 c9} - c8n2{r5 r3} ==> r3c1 ≠ 2
naked-triplets-in-a-row: r2{c3 c5 c7}{n9 n8 n7} ==> r2c4 ≠ 9, r2c4 ≠ 8, r2c4 ≠ 7
hidden-triplets-in-a-row: r7{n4 n5 n6}{c8 c9 c6} ==> r7c9 ≠ 9, r7c9 ≠ 8, r7c9 ≠ 7, r7c9 ≠ 2
naked-pairs-in-a-column: c9{r2 r7}{n4 n5} ==> r9c9 ≠ 5
hidden-single-in-a-row ==> r9c6 = 5
naked-pairs-in-a-column: c9{r2 r7}{n4 n5} ==> r8c9 ≠ 4
hidden-triplets-in-a-row: r7{n4 n5 n6}{c6 c9 c8} ==> r7c6 ≠ 9
biv-chain[3]: r7n6{c6 c8} - c8n5{r7 r1} - r1c2{n5 n6} ==> r1c6 ≠ 6
whip[1]: c6n6{r8 .} ==> r8c4 ≠ 6
whip[4]: b5n9{r5c4 r4c6} - c6n3{r4 r1} - b2n4{r1c6 r2c4} - c4n6{r2 .} ==> r1c4 ≠ 9
whip[7]: r7c2{n7 n2} - c5n2{r7 r8} - c3n2{r8 r1} - c3n7{r1 r2} - c5n7{r2 r1} - c7n7{r1 r9} - c7n2{r9 .} ==> r7c1 ≠ 7
whip[8]: c5n2{r7 r8} - c3n2{r8 r1} - c2n2{r3 r5} - r7c2{n2 n7} - c3n7{r9 r2} - c5n7{r2 r1} - c7n7{r1 r9} - c7n2{r9 .} ==> r7c1 ≠ 2
whip[9]: r3c8{n2 n9} - r5c8{n9 n2} - c2n2{r5 r7} - r9n2{c3 c7} - c7n9{r9 r7} - r7c1{n9 n8} - r3n8{c1 c4} - c5n8{r2 r8} - r8n2{c5 .} ==> r3c9 ≠ 2
g-whip[9]: b3n9{r3c9 r123c7} - r7n9{c7 c5} - c5n2{r7 r8} - c5n8{r8 r123} - r3n8{c4 c9} - c9n7{r3 r789} - r7n7{c7 c2} - r3n7{c2 c4} - b8n7{r8c4 .} ==> r3c1 ≠ 9
whip[8]: r5n9{c4 c8} - r3n9{c8 c9} - r8n9{c9 c3} - r7c1{n9 n8} - r3n8{c1 c4} - b8n8{r8c4 r8c5} - r8n2{c5 c9} - b6n2{r4c9 .} ==> r9c4 ≠ 9
whip[8]: b6n9{r4c9 r5c8} - r3n9{c8 c4} - b8n9{r8c4 r7c5} - r7c1{n9 n8} - r3n8{c1 c9} - b9n8{r8c9 r9c7} - r9c4{n8 n7} - c9n7{r9 .} ==> r8c9 ≠ 9
g-whip[8]: r9n2{c9 c3} - r1n2{c3 c1} - c1n9{r1 r7} - b7n8{r7c1 r8c3} - r8c9{n8 n7} - c3n7{r8 r123} - r9n7{c3 c4} - r3n7{c4 .} ==> r7c7 ≠ 2
whip[6]: r7c1{n9 n8} - r7c7{n8 n7} - b3n7{r1c7 r3c9} - c2n7{r3 r5} - c2n3{r5 r3} - r3c1{n3 .} ==> r7c5 ≠ 9
whip[1]: b8n9{r8c6 .} ==> r8c3 ≠ 9
whip[6]: r9c4{n8 n7} - r7c5{n7 n2} - r7c2{n2 n7} - r5n7{c2 c1} - r3n7{c1 c9} - r8n7{c9 .} ==> r8c5 ≠ 8
whip[5]: c1n8{r3 r7} - b7n9{r7c1 r9c3} - b9n9{r9c7 r7c7} - r2n9{c7 c5} - c5n8{r2 .} ==> r1c3 ≠ 8
whip[6]: r3c8{n9 n2} - c7n2{r1 r9} - r9n9{c7 c3} - r7c1{n9 n8} - r3n8{c1 c4} - b8n8{r9c4 .} ==> r3c9 ≠ 9
x-wing-in-rows: n9{r3 r5}{c4 c8} ==> r8c4 ≠ 9, r4c4 ≠ 9
whip[4]: b8n8{r9c4 r7c5} - r7n2{c5 c2} - r3n2{c2 c8} - r3n9{c8 .} ==> r3c4 ≠ 8
whip[3]: b2n8{r1c5 r2c5} - b1n8{r2c3 r3c1} - r7n8{c1 .} ==> r1c7 ≠ 8
whip[4]: r3n2{c2 c8} - r3n9{c8 c4} - c5n9{r1 r8} - c5n2{r8 .} ==> r7c2 ≠ 2
singles ==> r7c2 = 7, r5c1 = 7, r7c5 = 2
whip[1]: b8n8{r9c4 .} ==> r1c4 ≠ 8
whip[1]: b7n2{r9c3 .} ==> r1c3 ≠ 2
x-wing-in-columns: n2{c2 c8}{r3 r5} ==> r5c4 ≠ 2
hidden-single-in-a-block ==> r4c4 = 2
finned-x-wing-in-rows: n8{r7 r3}{c1 c7} ==> r2c7 ≠ 8
singles to the end
GRID SOLVED. rating-type = gW+SFin, MOST COMPLEX RULE = gW[9]
867394251
159682734
324751698
481263579
735918426
296547183
973126845
518479362
642835917

denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: 6 x (1 of 3)

Postby dobrichev » Thu Jul 31, 2014 7:13 am

Hi Denis,

Thank you for the analysis.

The special thing I found in this puzzle is that my solver, which recognises only singles, needs T&E from 3-position candidate in a house.
There are no such puzzles in the list of 800 K hardest - it is always possible to try for several times from a 2-value cell or 2-position candidate and solve with direct eliminations.
When running over a 2GB lot of puzzles derivative of the hardest, 39 such puzzles appeared. Others require a single 3-position try but this requires 6 (which could be an artefact of the sequence of trials and not puzzle characteristic at all).
Here are all 39 exemplars.
Hidden Text: Show
Code: Select all
000000000000001002003040150000500040051300600700016030040000006106008000305400000
000000000000001002003040150000500041050300600700016030040000006106008000305400000
000000000000001002003040150001500600005300040070016030004000006530400000610008000
000000000000001002003040560000050406064130050700000300001800000040060010350004000
000000000000001002003240560000050040042600030700030206006000008050006000304000050
000000000000001002003240560000050040042600030705030200006000008050006000304000050
000000000000001002003240560000050040042600035700030200006000008050006000304000050
000000000000001002003240560005000007034000600600005000050060400080030020402500300
000000000001002003004050260000600050005001040067400102002008000050000001406500000
000000000001002003004050260000600050020001040607400102002008000046500000500000001
000000000001002003040050160000004002007000000400560000012800050500016200600200040
000000000001002003040050160000004002007020000400560000012800050500016200600000040
000000000001002003040050160000004002007020000400560000012800056500010200600000040
000000000001002003040150260000600050026400100700020040005000001010008000460500000
000000001000002030000045260004070000032060050500003040005400020006000003080300600
000000001000002030000045260004070000032060050500203040005400020006000003080000600
000000001000002030000045260004070000032060050500203040005406020006000003080000000
000000001000002030000140560000500000016000003350000740043600015060004000800030000
000000001000002030003045260004070000032060050500003040005400020006000003080000600
000000001000002030004050006000600025060400100700021004050000010201008000406500000
000000001000002030004050206002007000046500000500000010005001004010600005608400020
000000001000002030004050206002600000006400005070021004005000010120008000640500000
000000001000002030004050600000000007060300100450000360016500400300061500800040000
000000001000002030004050600000000007060300100450010360010500400300061500800040000
000000001000002030004050600000060570005008406090047080003100000510000000640030000 *
000000001000002030004050600000061500016500403700040000003000008060300100450000060
000000001000002030004050600010000007540000360600300000030061500080040010100500400
000000001000002030004050600010000007540000360600300100030061500080040000100500400
000000001000002030004150206000600005062400100700020004001008000050000010406500000
000000001000002030004150600000000007060300100450010360010500400300060500800040000
000000001000002030004150600001600500005003400030400017046500000500000300800001000
000000001000002030004150600010000007540000360600300100030060500080040000100500400
000000001000002030034050600001600500005003400300400017050000300080001000406500000
000000001000002340001050006000003000036000204700060010003600002020014008040000060
000000001000002340001050060000004600040000023700060100004600002120003000630000800
000000001000023450004005600000000006030200500700600040003006200020080000650040300
000000001001002030040050600000600500050003400300400017008001000105000300460500000
000000001001002030040050600005000300007001000460500000010600500050003400300400018
000000001002003040010560300000020030000070200300106005050201006060030000108000000
dobrichev
2016 Supporter
 
Posts: 1863
Joined: 24 May 2010

Re: 6 x (1 of 3)

Postby denis_berthier » Thu Jul 31, 2014 9:19 am

dobrichev wrote:The special thing I found in this puzzle is that my solver, which recognises only singles, needs T&E from 3-position candidate in a house.
There are no such puzzles in the list of 800 K hardest - it is always possible to try for several times from a 2-value cell or 2-position candidate and solve with direct eliminations.


As you're speaking of the hardest puzzles, what you call T&E must be what I call T&E(2), i.e. there must be two levels of T&E.

For the hard puzzles in T&E(1) or g-T&E(1), the heuristics consisting of looking first for eliminations in bivalue/bilocal cells is generally counter-productive. This can be seen from the resolution paths: such an elimination would be followed by a single; but singles rarely appear in the long sequences of whips or g-whips leading to the solution (as in my above solution).

For the very rare (in percentage) puzzles in T&E(2), it may be the case that things are different, but the question is: after selecting the first candidate for T&E at level 1 in a bivalue/bilocal cell, many candidates may be (locally) eliminated by this first selection, and at the time when you select a second candidate for the second level of T&E, it may appear to be bivalue/bilocal only because of these level 1 local eliminations.
Could you be more precise about your T&E procedure?
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: 6 x (1 of 3)

Postby champagne » Thu Jul 31, 2014 12:19 pm

that puzzle starts with relatively easy moves.

I would propose instead that one

........11....2.3...4.516..481.6.57...5.184.6.9654718...31.....51....3..64..35.1.

the same just before hard moves.

Then, interesting things can be seen.
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: 6 x (1 of 3)

Postby daj95376 » Thu Jul 31, 2014 4:32 pm

[Withdrawn: excessive!]
Last edited by daj95376 on Fri Aug 01, 2014 2:38 pm, edited 1 time in total.
daj95376
2014 Supporter
 
Posts: 2624
Joined: 15 May 2006

Re: 6 x (1 of 3)

Postby dobrichev » Thu Jul 31, 2014 6:00 pm

denis_berthier wrote:As you're speaking of the hardest puzzles, what you call T&E must be what I call T&E(2), i.e. there must be two levels of T&E.

No, for these puzzles I am not counting the T&E depth. Also I don't try to follow a kind of optimal solution path with the only exception that I am chosing for T&E a bivalue cell, and if no bivalue is found, I am searching for a n-local, stopping at first bi-local, or chosing cell/value from the first occurence of min(n).

denis_berthier wrote:For the hard puzzles in T&E(1) or g-T&E(1), the heuristics consisting of looking first for eliminations in bivalue/bilocal cells is generally counter-productive. This can be seen from the resolution paths: such an elimination would be followed by a single; but singles rarely appear in the long sequences of whips or g-whips leading to the solution (as in my above solution).

For the very rare (in percentage) puzzles in T&E(2), it may be the case that things are different, but the question is: after selecting the first candidate for T&E at level 1 in a bivalue/bilocal cell, many candidates may be (locally) eliminated by this first selection, and at the time when you select a second candidate for the second level of T&E, it may appear to be bivalue/bilocal only because of these level 1 local eliminations.

Agree, but what are the computationally cheaper alternatives? Chosing a random cell/value within the candidates is proven to work for several times slower, and chosing the first/last candidate is even worse.

denis_berthier wrote:Could you be more precise about your T&E procedure?


Note: I preffer not to discuss the differences between T&E and guessing. If you consider this is guessing, I fully agree.

General algorithm is
1) Init. Exit if all cells are givens.
2) Deal with singles. Exit if the necessary number of solutions are found. On solution and contradiction goto step 4.
3) Choose a cell/value pair for T&E. Clone the puzzle context and eliminate the chosen cell/value from the cloned context. Add the chosen cell/value as part of the solution in the curreent context and goto step 2 using the current context.
4) Backtrack by restoring the latest context with the tried candidate removed in step 3. Exit if there is no context to restore.

More precise explanation of the T&E procedure is
3.a) Scan the context for bi-value cells. Fast. If none found go to step 3.c.
3.b) Chose the first value which pencilmarks have non-empty intersection with the bi-values. Find the first cell from the intersection. Goto step 3.d.
3.c) Iterate trough all values and all unsolved houses for the respective value. Count the number of candidates n for the respective value/house. If n < previous n then find the first unsolved cell from that house and store the best so far n/value/cell. If n = 2 then goto step 3.d else continue with next house then value.
3.d) There is a chosen "best" cell/value for T&E set either from step 3.b or 3.c. Copy the 160-bytes long context in a stack. Eliminate the chosen cell/value in the stack. Mark the chosen cell/value as "solved" in the current context.
3.e) Go to step 1 (solve singles).

Yet more precise T&E is the code itself, available at https://github.com/dobrichev/fsss2/, at the time of writing this post it is close to the end of the file fsss2.cpp.
There is a topic for discussion of the solver in the Programmers forum (http://www.setbb.com/sudoku/viewtopic.php?t=2482&mforum=sudoku).
Below is a piece of the actual code
Hidden Text: Show
Code: Select all
void fsss2::doEliminations() {
nakedAgain:
   doNakedSingles();
   if(mode) goto backtrack;

   //hidden singles
   {
............
   } //end of hidden singles

   //Prepare a guess
   {
      int optDigit;
      int optCell;

      //find first bi-value cell and return first of the two values
      findBiValueCell(optDigit, optCell);
      if(optDigit != -1) {
         ;
      }
      else {
         //find house with less candidates from a particular digit, exit on first bi-position house/digit
         findBiPositionDigit(optDigit, optCell);
      }

      {
         bm128* gg = &contexts[guessDepth++][0];
         gg[0] = grid[0];
         gg[1] = grid[1];
         gg[2] = grid[2];
         gg[3] = grid[3];
         gg[4] = grid[4];
         gg[5] = grid[5];
         gg[6] = grid[6];
         gg[7] = grid[7];
         gg[8] = grid[8];
         gg[9] = solved;
         //later continue with this possibility eliminated
         gg[optDigit].clearBit(optCell);

         if(sol)
            sol[optCell] = optDigit + 1; //store the digit if solution buffer is given
         solved.setBit(optCell); //mark cell as "solved"
         grid[optDigit].clearBits(visibleCells[optCell]); //mark visible cells as forbidden for the same digit, mark the 3 houses as solved
         goto nakedAgain;
      }
   }

backtrack:
   if(mode & MODE_STOP_GUESSING) { //no need to restore context
      return;
   }
contradiction:
   if(guessDepth-- == 0) { //nothing to restore
      return;
   }
   {
      //We are done with the guess.
      //The caller is notified for each of the the possible solutions found so far
      //Now restore the context. The just guessed candidate has been removed from the context earlier.
      bm128* gg = &contexts[guessDepth][0];
      grid[0] = gg[0];
      grid[1] = gg[1];
      grid[2] = gg[2];
      grid[3] = gg[3];
      grid[4] = gg[4];
      grid[5] = gg[5];
      grid[6] = gg[6];
      grid[7] = gg[7];
      grid[8] = gg[8];
      solved = gg[9];
      mode = 0;
   }
   goto nakedAgain;
}
dobrichev
2016 Supporter
 
Posts: 1863
Joined: 24 May 2010

Re: 6 x (1 of 3)

Postby JC Van Hay » Thu Jul 31, 2014 6:09 pm

3 Singles; Skyscraper(1R34) => +1r4c3; 8 Singles
(27)C357 + (27)L7C2 exclude 27L7C1
L7C1=8 -> Contradiction(Basics) :=> L7C1=9; Basics to the end.

where Basics = N-tuples + N-single digit SIS
JC Van Hay
 
Posts: 719
Joined: 22 May 2010

Re: 6 x (1 of 3)

Postby eleven » Thu Jul 31, 2014 8:17 pm

champagne wrote:I would propose instead that one

........11....2.3...4.516..481.6.57...5.184.6.9654718...31.....51....3..64..35.1.

the same just before hard moves.

Then, interesting things can be seen.

Nice puzzle. No chains required.
eleven
 
Posts: 3151
Joined: 10 February 2008

Re: 6 x (1 of 3)

Postby Leren » Thu Jul 31, 2014 10:14 pm

After basics + a Skycraper 1r34 I reached the following grid.

Code: Select all
                 v                v                v
*-----------------------------------------------------------------------*
| 23789  56     2789    | 346789 789    3469    | 2789   45     1       |
| 1      56     789     | 46     789    2       | 789    3      45      |
| 23789  237    4       | 3789   5      1       | 6      29     2789    |
|-----------------------+-----------------------+-----------------------|
| 4      8      1       | 239    6      39      | 5      7      239     |
| 237    237    5       | 239    1      8       | 4      29     6       |
| 23     9      6       | 5      4      7       | 1      8      23      |
|-----------------------+-----------------------+-----------------------|
|B789-2 B7-2    3       | 1      2789   46      | 2789   456    45      |
| 5      1      2789    | 46789 T789-2  469     | 3      46     2789    |
| 6      4      2789    | 789    3      5       |T789-2  1      2789    |
*-----------------------------------------------------------------------*
                 ^               ^                 ^

I found a four digit JExocet (2789) r7c1 r7c2 r8c5 r9c7 except that there is only 1 truth for digit 2 in the cross columns.

Putting 2 in a base cell forces 2 into both Target cells and therefore a contradiction in whichever other digit is in the base cells, so 2 can be removed from the base cells.

The pattern then reduces to a 3 digit JExocet (789) and 2 can be removed from the target cells.

The puzzle then solves with 3 more skyscrapers.

This Exocet pattern (a digit with 1 truth in the cross rows can be removed from the base cells) was previously proposed by David P Bird. He then claimed to have found a counterexample and withdrew the proposal, but the counterexample doesn't look valid to me. Details can be found in the JExocet Definition thread.

Leren
Leren
 
Posts: 5117
Joined: 03 June 2012

Re: 6 x (1 of 3)

Postby David P Bird » Thu Jul 31, 2014 11:44 pm

Leren, I don't remember all the details of the discussion you mention, and don't have time to go there right now. However here's my first reaction to your post.

Using (2789) as the base digits doesn't produce a valid JExocet as you say because (2) would be forced into two target cells.
However you say that ignoring the 2 and using (789) the JExocet conditions are all met.

You have therefore found an Almost JExocet and there is a strong link between that and (2)r7c12
You can therefore make any eliminations that are common to both cases, but I don't think there are any.

Your reasoning then seems to boil down to saying if (2)r7c12 is false then, using JExocet, the puzzle reduces to a single solution. In other words a trial and error approach.

I have a busy week end ahead so won't be able to take this any further or a while. I did do some chain hunting on this puzzle earlier though and came up with these:
(1)r2c3 = (1)r4c3 - (1)r4c6 = (1)r3c6 => r2c5 <> 1
(2)r3c8 = (2)r5c8 - (2)r6c9 = (2)r6c1 => r2c1 <> 2
(6=5)r1c2 - (5)r1c8 = (5-6)r7c8 = (6)r7c6 => r1c6 <> 6
(9)r8c6 = (46)r78c6 -[UR]- (46=5)r78c8 - (5=4)r1c8 - (4=6)r8c8 => r8c6 <> 6
(4)r1c8 = (46)r78c8 -[AR]- (46)r78c6 = (4)r8c4 => r1c4 <> 4
(9)r45c4 = (9)r4c6 - (9=4)r8c6 - (4)r8c4 = (4-6)r2c4 = (6)r1c4 => r1c4 <> 9

After each step I handled any naked or hidden tuples, line/box eliminations that resulted. (I would also normally include simple fish but I don't recall finding any.)

In haste,
David PB
David P Bird
2010 Supporter
 
Posts: 1043
Joined: 16 September 2008
Location: Middle England

Re: 6 x (1 of 3)

Postby JC Van Hay » Fri Aug 01, 2014 1:55 am

An Xsudo analysis of the puzzle :

3 Singles; Skyscraper(1R34) => +1r4c3; 8 Singles
Code: Select all
+--------------------------+--------------------------+---------------------------+
| 389-27   356-27  (789-2) | 346-789  (789)     346-9 | (+2-789)  459-2   1       |
| 1        56-7    (789)   | 46-789   (89-7)    2     | (789)     3       45-789  |
| 2389-7   23-7    4       | 3789     5         1     | 6         9-2     789-2   |
+--------------------------+--------------------------+---------------------------+
| 4        8       1       | 239      6         39    | 5         7       239     |
| 237      23-7    5       | 239      1         8     | 4         29      6       |
| 23       9       6       | 5        4         7     | 1         8       23      |
+--------------------------+--------------------------+---------------------------+
| (89-27)  (+7-2)  3       | 1        (+2-789)  456-9 | (89-27)   456-29  45-2789 |
| 5        1       (289-7) | 46789-2  (789-2)   469   | 3         246-9   24-789  |
| 6        4       (289-7) | 89-27    3         59    | (789-2)   1       25789   |
+--------------------------+--------------------------+---------------------------+
"Exocet" : {2789C3 2789C5 2789C7 7N12} :=> 52 eliminations; 35 Singles
Skyscraper(4R28) => +4r2c9; stte

Note : Details of the previous solutions here.
JC Van Hay
 
Posts: 719
Joined: 22 May 2010

Re: 6 x (1 of 3)

Postby denis_berthier » Fri Aug 01, 2014 3:49 am

dobrichev wrote:
denis_berthier wrote:As you're speaking of the hardest puzzles, what you call T&E must be what I call T&E(2), i.e. there must be two levels of T&E.

No, for these puzzles I am not counting the T&E depth. Also I don't try to follow a kind of optimal solution path with the only exception that I am chosing for T&E a bivalue cell, and if no bivalue is found, I am searching for a n-local, stopping at first bi-local, or chosing cell/value from the first occurence of min(n).

Now I understand what you meant by "T&E": it is a variant of what's usually called DFS (depth-first search) in Computer Science.
"Variant" because:
- you propagate local constraints at each depth (using direct contradictions and Singles)
- you choose a smart next value for increasing depth

dobrichev wrote:
denis_berthier wrote:For the hard puzzles in T&E(1) or g-T&E(1), the heuristics consisting of looking first for eliminations in bivalue/bilocal cells is generally counter-productive. This can be seen from the resolution paths: such an elimination would be followed by a single; but singles rarely appear in the long sequences of whips or g-whips leading to the solution (as in my above solution).

For the very rare (in percentage) puzzles in T&E(2), it may be the case that things are different, but the question is: after selecting the first candidate for T&E at level 1 in a bivalue/bilocal cell, many candidates may be (locally) eliminated by this first selection, and at the time when you select a second candidate for the second level of T&E, it may appear to be bivalue/bilocal only because of these level 1 local eliminations.

Agree, but what are the computationally cheaper alternatives? Chosing a random cell/value within the candidates is proven to work for several times slower, and chosing the first/last candidate is even worse.
[...]
Note: I preffer not to discuss the differences between T&E and guessing. If you consider this is guessing, I fully agree.

My remarks about bivalue heuristics applied only to my definition of T&E - which, as I've always claimed, is a mere formalisation of what's usually meant by T&E in the Sudoku world. With my definition, there's no guessing (in the technical sense that a candidate is asserted as the true value only if all the other candidates for the same cell have been proven impossible) and I've shown that going to depth 2 is enough for all the known (and very likely all the) puzzles.

Unrestricted-depth DFS (even modified as above) is a totally different algorithm. Undoubtedly, it uses guessing - but, contrary to many, I don't use this word as an insult (no more than "T&E"). It merely describes a technical fact: if a solution is found, accept it even if other possibilities haven't been excluded. As your purpose is speed, I can't see why you wouldn't be allowed to use this technique.

What I said in my previous post about bivalue/bilocal can only be amplified at deeper levels: what appears to be bivalue/bilocal at such levels will often be the result of having eliminated lots of candidates at shallower levels.
When I saw your findings of only 39 puzzles not being amenable to pure bivalue/bilocal treatment, I was surprised because you said "T&E". I'm much less surprised with DFS.
Nevertheless, there may remain something interesting to dig: do these puzzles have any special intrinsic property?
As for the best alternatives, as I've never tried to optimise the DFS procedure for Sudoku, I'm not the best person to propose an answer.
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: 6 x (1 of 3)

Postby Leren » Fri Aug 01, 2014 3:53 am

David P Bird wrote : Your reasoning then seems to boil down to saying if (2)r7c12 is false then, using JExocet, the puzzle reduces to a single solution. In other words a trial and error approach.

What I was trying to say was that if 2 is in r7c12 then the other digit (7, 8 or 9) in those cells is forced into r12c357, so there is no valid solution. So r7c12 <> 2 by contradiction and then the 789 JExocet applies.

I agree that there is no 4 digit JExocet, nor a 4 digit in Exocet in the more general sense. I hadn't realised that a truth count of 1 in the cross rows does not guarantee that the digit will occupy exactly 1 Target cell.

Leren
Leren
 
Posts: 5117
Joined: 03 June 2012

Re: 6 x (1 of 3)

Postby blue » Fri Aug 01, 2014 5:17 am

FWIW, I think it is a 4 digit Exocet in the general sense. There's nothing in the definition (such as it is) that says "Oh, by the way, if one of the base cell digits would be forced into both target cells if it were true in a base cell, then it isn't an Exocet".
As for JExocet, I guess the bottom line is that it's David's definition, and if he says it isn't, then it isn't. To me, since the the 2's in the "swordfish columns", don't appear more than 2 rows (outside the base band), it should qualify a JExocet as well.

Leren: Nice find, by the way !
blue
 
Posts: 1045
Joined: 11 March 2013

Next

Return to Puzzles