Exotic patterns a resume

Advanced methods and approaches for solving Sudoku puzzles

Re: Exotic patterns a resume

Postby champagne » Wed Jun 19, 2013 7:40 am

blue wrote:The basic kind of pattern that David finds, can be put into a base/cover form in one of 8 different ways.

Below, D1 and D2 are complementary digit sets.
There is a set of "selected columns", and a set of "selected rows".
........


Hi blue,

Thanks for that long and detailed post. After a first reading, I have questions and comments. I am sure more will come later

You are speaking often of the Obi-Whan conversion. I would be sure to have the right understanding of that.
My understanding is that you fill the 81*81 table shown by Obi-Whan to see where are the eliminations;
You clearly it also to find alternative SLG's (Obi-Whan transformation) and here I have to dig in the corresponding thread and in your comments to understand what is behind.
As I said, if we have several equivalent SLG's, finding one of them is enough on my side.

Your different diagram show where eliminations lie. I have a global formula easy to use (and one concern regarding the SLG with quads is to check it is still valid in all situations).

My program does the following

a) collects all candidates in sets
b) collect all candidates in links
suppress form b) all candidates in a) and you have all eliminations.

I feel that I cover (may be after some code adjustments) you "row fish" and "column fish" diagrams.
So I am looking at the end for other SLGs not convertible to a row or column based SLG.

In fact accepting that we always have both forms (row based and column based) of SLG's if one exists, it is necessary to consider both to extract the smallest one (in my view, the solution a player would produce).
champagne
2017 Supporter
 
Posts: 7454
Joined: 02 August 2007
Location: France Brittany

Re: Exotic patterns a resume

Postby David P Bird » Wed Jun 19, 2013 9:33 am

I don't know if this will help or not, but here is the problem gird that Champagne gave showing the MSLS reductions.

.....67...5.1...3...9.2...42..........8.4...29.46..........7.6....3..1..8.......5;1426;elev;318
Code: Select all
      *-------------------------*-------------------------*-------------------------*
 (13) | #134    248-13  #123    | 4589    #3589   <6>     | <7>     2589-1  #189    |
 (67) | #467    <5>     #267    | <1>     #789    489     | 289-6   <3>     #689    |
      | 1367    13678   <9>     | 578     <2>     358     | 568     158     <4>     |
      *-------------------------*-------------------------*-------------------------*
      | <2>     1367    13567   | 5789    137-589 13589   | 345689  145789  1367-89 |
      | 13567   1367    <8>     | 579     <4>     1359    | 3569    1579    <2>     |
      | <9>     137     <4>     | <6>     137-58  2       | 358     1578    137-8   |
      *-------------------------*-------------------------*-------------------------*
 (13) | #1345   249-13  #1235   | 24589   #1589   <7>     | 2489-3  <6>     #389    | Box 7 (5)
 (67) | #4567   249-67  #2567   | <3>     #5689   4589    | <1>     2489-7  #789    |
      | <8>     1234679 1367-2  | 249     16-9    149     | 2349    2479    <5>     |
      *-------------------------*-------------------------*-------------------------*
         (4)             (2)              (589)                             (89)

MSLS r1278c1359:(13)r1,(67)r2,(13)r7,(67)r8,(4)c1,(2)c3,(589)c5,(89)c9,(5)b7: 16 digits/cells

=> r1c2 <> 13, r1c8 <> 1, r2c7 <> 6, r4c5 <> 589, r4c9 <> 89, r6c5 <> 58, r6c9 <> 8, r7c2 <> 13,
r7c7 <> 3, r8c2 <> 67, r8c8 <> 7, r9c3 <> 2, r9c5 <> 9 20 candidates in 13 cells

The candidates (1367) occur in diagonal pairs in boxes 2389 and we would like to use r37c59 to hold sets for (23589) and b2389 for (1367) but r9c5 is a problem cell as it needs to hold another given to allow that.

The sets used to cover the MSLS cells are close to those that would be found for a regular multi-fish, but (5) has been removed from the c13 cover sets and placed as a box cover in b7 to prevent both (5)r4c3 and (5)r6c1 being shown as eliminations which would leave b4 without a (5). It's possible this tactic could work with regular multi-fish too.

The advantage of this approach is that it's fast as rows all contain one digit set and columns always contain the other and any that contain a full set of candidates can be excluded when testing the combinations to use. However, both ways of choosing the digit sets for the rows and columns must be tried.

I've attempted to translate this into a XSudo representation but failed. What's the closest translation anyone can achieve?

[Edit] correction
Last edited by David P Bird on Wed Jun 19, 2013 9:24 pm, edited 1 time in total.
David P Bird
2010 Supporter
 
Posts: 1043
Joined: 16 September 2008
Location: Middle England

Re: Exotic patterns a resume

Postby ronk » Wed Jun 19, 2013 2:22 pm

David P Bird wrote:I don't know if this will help or not, but here is the problem gird that Champagne gave showing the MSLS reductions.

.....67...5.1...3...9.2...42..........8.4...29.46..........7.6....3..1..8.......5;1426;elev;318
Code: Select all
      *-------------------------*-------------------------*-------------------------*
 (13) | #134    248-13  #123    | 4589    #3589   <6>     | <7>     2589-1  #189    |
 (67) | #467    <5>     #267    | <1>     #789    489     | 289-6   <3>     #689    |
      | 1367    13678   <9>     | 578     <2>     358     | 568     158     <4>     |
      *-------------------------*-------------------------*-------------------------*
      | <2>     1367    13567   | 5789    137-589 13589   | 345689  145789  1367-89 |
      | 13567   1367    <8>     | 579     <4>     1359    | 3569    1579    <2>     |
      | <9>     137     <4>     | <6>     137-58  2       | 358     1578    137-8   |
      *-------------------------*-------------------------*-------------------------*
 (13) | #1345   249-13  #1235   | 24589   #1589   <7>     | 2489-3  <6>     #389    | Box 7 (5)
 (67) | #4567   249-67  #2567   | <3>     #5689   4589    | <1>     2489-7  #789    |
      | <8>     1234679 1367-2  | 249     16-9    149     | 2349    2479    <5>     |
      *-------------------------*-------------------------*-------------------------*
         (4)             (2)              (589)                             (89)

MSLS r1278c1359:(13)r1,(67)r2,(13)r7,(67)r8,(4)c1,(2)c3,(589)c5,(89)c9,(5)b7: 16 digits/cells

=> r1c2 <> 13, r1c8 <> 1, r2c7 <> 6, r4c5 <> 589, r4c9 <> 89, r6c5 <> 58, r6c9 <> 8, r7c2 <> 13,
r7c7 <> 3, r8c2 <> 67, r8c8 <> 7, r9c3 <> 2, r9c5 <> 9 20 candidates in 13 cells

I've attempted to translate this into a XSudo representation but failed. What's the closest translation anyone can achieve?

This "translation" has the same weak inference sets (Links, your MSLS) and exclusions (Eliminations).

Code: Select all
 16 Truths = {1278N1359}
 16 Links = {13r17 67r28 4c1 2c3 589c5 89c9 5b7}
 20 Eliminations --> r4c5<>589, r1c28<>1, r6c59<>8, r7c27<>3, r8c28<>7, r4c9<>89, r1c2<>3,
 r2c7<>6, r6c5<>5, r7c2<>1, r8c2<>6, r9c3<>2, r9c5<>9

[edit: add the following]
David P Bird wrote:... but r7c5 is a problem cell as it needs to hold another given to allow that.
r9c5 :?:
blue wrote:Hidden Set -- row/col truths covered by cell links
Still digesting the entirety of a fine post, but I'm sure you need "covered by cell links and box links" here. (I was thinking D1 row truths and D1 col truths, so your case is probably OK. :oops: )
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Exotic patterns a resume

Postby JC Van Hay » Wed Jun 19, 2013 6:53 pm

Thanks a lot David and Ronk to have shown that, up to now, all the equivalent Rank 0 Logic (in hard puzzle) are as I described them some time ago!
JC Van Hay
 
Posts: 719
Joined: 22 May 2010

Re: Exotic patterns a resume

Postby David P Bird » Wed Jun 19, 2013 9:20 pm

Right, thanks to Ronk's helpful contribution, it seems that in Xsudo all truths are best kept for the cells so that any mix of rows, columns and boxes can be used for the links sets. (I was trying to use house sets only.)

Regarding the problem cell, yes I should have said r9c5, thanks for picking that up.

Therefore to mimic the procedure I used, link sets, not truth sets should be defined first. The cell truth sets then will follow automatically wherever row and column link sets intersect.

When the total number of link sets is close to the number of truth sets then checks can be made for any digits that are only covered by link sets in any box. If so, these link sets can be removed and replaced by a box link set for the same digit where needed in the affected band. This may then bring the number of link sets down enough to reach a rank 0 pattern.

JC Van Hey, I did study truth and link set logic some time ago, but as I don't use the technique, I've forgotten some of the details. My goal here was to try to find an understandable procedure that could be followed. Regrettably it still won't suit Blue and Champagne because there's no guarantee that it will catch every rank 0 pattern.

I did look at your post <here> but (as usual with SLGs) it gives no hint as to the discovery method you used. The impression I get is that practitioners build up a repertoire of tactics they use that are far too intuitive to be turned into any sort of standard procedure. Or am I exaggerating?
David P Bird
2010 Supporter
 
Posts: 1043
Joined: 16 September 2008
Location: Middle England

Re: Exotic patterns a resume

Postby blue » Thu Jun 20, 2013 9:51 am

Hi champagne,

champagne wrote:Your different diagram show where eliminations lie. I have a global formula easy to use (and one concern regarding the SLG with quads is to check it is still valid in all situations).

My program does the following

a) collects all candidates in sets
b) collect all candidates in links
suppress form b) all candidates in a) and you have all eliminations.

With Obi-Wahn's scheme, you would do this (in effect):

a) For each "live" candidate in the puzzle, initialize a counter to zero.
b) Increment it once for each base sector that contains it.
c) Decrement it once for each cover sector that contains it.

Obi-Wahn's "Construction Rule", requires that the final counts are all <= 0 -- each candidate must appear in at least as many cover as base sectors.
Obi-Wahn's "Exclusion Rule", says that you can eliminate any candidate where the final count is less than (-R), where R is the number of cover sectors minus the number of base sectors.
For "rank 0" logic, R = 0, and you can eliminate any candidate where the count is < 0.

I don't know if that's exactly what you meant, or not.
For Obi-Wahn's rules, a candidate can be eliminated if it's in one "truth" and two "links".

You are speaking often of the Obi-Wahn conversion. I would be sure to have the right understanding of that.
My understanding is that you fill the 81*81 table shown by Obi-Wahn to see where are the eliminations;
You clearly it also to find alternative SLG's (Obi-Wahn transformation) and here I have to dig in the corresponding thread and in your comments to understand what is behind.


(I don't remember an 81*81 table).

Obi-Wahn gave only one "transformation" example, and it wasn't done exactly the way I've been suggesting -- but in a way that's equivalent.

First some basics (some of which you know, of course):
1) Obi-Wahn's thread was about single digit fish, but his principles are valid for any base/cover problem. The value "R" above, he called the "fin sector count".
2) Base sectors are like Alan Barker's "truth" sets, but with only the SIS requirement (and not the weak link requirement).
Candidates can be in more than one base sector.
3) Cover sectors are like Alan Barker's "link sets".
4) Sectors can occur multiple times as base sectors, and multiple times as cover sectors, and as both a base and cover sector
5) If a sector occurs as both a base and cover sector, it can be removed (once) from each list -- it wouldn't change the final values of the "counters" described above.
6) Similarly, a sector can be added as both a base and cover sector ... a "matching pair".

In the example that Obi-Wahn gave, there was one "problem" row truth ... 9r3 say ... he didn't specify the digit.
He wanted to make it go away (one instance of it), because it appeared twice in the base list.
He added 9r12 to both the base and the cover.
At that point, all three of the row truths were present -- 9r123.
Then he converted the 3 row truths, to 3 box truths -- 9b123.
The justification was that the 3 box truths contain the same candidates as the 3 row truths -- meaning that the final counter values (above), would be unchanged. The main point was that if the "Construction Rule" was satisfied originally, then it would still be satisfied after the changes.
At that point, 9b23 appeared as in matching pairs, and they were removed.
The end result, was that one of the 9r3 row truths, and two box links, 9b23, went away, and you were left with one new box truths, 9b1, and two new row links, 9r12.

The way I've been describing it, for that transformation, I would have said that you add box truths, 9b123, covered by row links, 9r123, and then let the new 9r3 row link, cancel with the original 9r3 row truth, and new 9b23 box truths cancel with the original 9b23 box links.

There are many kinds of transformations like that, that can be done.
I'll describe them the way I like to think of them, and let you think about how Obi-Wahn might describe them.
Each line should be followed by "allow matching pairs to cancel", and for each line, the truth/link roles can be reversed.

A) For a single digit: add row truths covered by box links for every row and box in a band.
B) For a single digit: add column truths covered by box links for every column and box in a stack.
C) For a single digit: add row truths covered by column links for every row and and column in the grid.
D) In a row: add row truths for every digit, covered by cell links.
E) In a column: add column truths for every digit, covered by cell links.
F) In a box: add box truths for every digit, covered by cell links.

For #6, say: Obi-Wahn might do it by adding matching truth/link pairs for cells, until every cell in the box has a cell truth, then convert the full set of cell truths to a full set of box truths, one for each digit. Then let box truths cancel with box links, if box links were present initially.

I feel that I cover (may be after some code adjustments) you "row fish" and "column fish" diagrams.
So I am looking at the end for other SLGs not convertible to a row or column based SLG.

It turns out that by using Obi-Wahn transformations, you can convert any base/cover pattern to any of these forms:

  • cell truths covered by row/col/box links
  • row truths covered by cell/col/box links
  • col truths covered by cell/row/box links
  • box truths covered by cell/row/col links
  • cell/row truths covered by col/box links
  • cell/col truths covered by row/box links
  • cell/box truths covered by row/col links
  • col/box truths covered by cell/row links
  • row/box truths covered by cell/col links
  • row/col truths covered by cell/box links
  • row/col/box truths covered by cell links
  • cell/col/box truths covered by row links
  • cell/row/box truths covered by col links
  • cell/row/col truths covered by box links
The only worry, is that you might get overlapping base sectors, or duplicate base or cover sectors.
There's nothing wrong with that, in theory ... but if you enter the result into XSudo, the truth and link counts
won't match, since XSudo won't allow multiple instances of the same item. You'll see all of the eliminations though.
You may see more eliminations too, since XSudo and SLG's aren't 100% equivalent to base/cover problems.

There is more to it too. You can get several equivalent patterns with the same overall type.
For example, for SK-loop, you can get lots of different patterns with only cell truths -- one with the cells in the 4 "corner boxes", and two more at the very least.

Regards,
Blue.
Last edited by blue on Fri Jun 21, 2013 2:16 am, edited 1 time in total.
blue
 
Posts: 1037
Joined: 11 March 2013

Re: Exotic patterns a resume

Postby champagne » Thu Jun 20, 2013 10:17 am

hi blue,

a lot of work with that, just a short comment


(I don't remember an 81*81 table).


Ok I was thinking of the 9 * 9 table filled with the values sets - links.

(As you write, this was with a unique floor).
champagne
2017 Supporter
 
Posts: 7454
Joined: 02 August 2007
Location: France Brittany

Re: Exotic patterns a resume

Postby David P Bird » Thu Jun 20, 2013 1:55 pm

HI Blue

Blue wrote:It turns out that by using Obi-Whan transformations, you can convert any base/cover pattern to any of these forms:
  • cell truths covered by row/col/box links .....

Thanks! That gives me a lot of encouragement that if we standardise on using link sets in the houses, the cell truths can automatically be created wherever two link sets intersect which is straightforward enough to implement. For Champagne, if all the possibilities have been exhausted then he can be confident that no other mix of truth and link sets would be any more successful.

Of course that fits in nicely with the scheme I use for MSLS. It also provides the opportunity to build in a fin cell check so when the pattern turns out to be rank 1 they can be eliminated.

Naturally enough it poses one more question in my mind - when working with complementary digit sets, would it be possible to confine one of the digit sets to just one type of house and still cover all the possibilities?

David
David P Bird
2010 Supporter
 
Posts: 1043
Joined: 16 September 2008
Location: Middle England

Re: Exotic patterns a resume

Postby blue » Thu Jun 20, 2013 4:43 pm

Hello Obi-Wahn,

I've seen your name listed in "online users", recently.
Have you been following these exchanges ?
I've been using your name a lot ... in other threads as well.
Ronk used the term "Obi-Wahn transformation", and I thought it seemed apt.
I wonder if you have more to add ?

Regards,
Blue.

P.S. Great work :!:

I'm only now, thinking about your ideas about combining "almost" patterns and adding a truth (or two), to produce a larger pattern. I wonder if there are good things to be learned from that, here, too.
Last edited by blue on Fri Jun 21, 2013 2:18 am, edited 2 times in total.
blue
 
Posts: 1037
Joined: 11 March 2013

Re: Exotic patterns a resume

Postby blue » Thu Jun 20, 2013 4:50 pm

Hi David,

David P Bird wrote:Of course that fits in nicely with the scheme I use for MSLS. It also provides the opportunity to build in a fin cell check so when the pattern turns out to be rank 1 they can be eliminated.

Naturally enough it poses one more question in my mind - when working with complementary digit sets, would it be possible to confine one of the digit sets to just one type of house and still cover all the possibilities?

I don't have much time to think about the last question right now.
My gut says no, but who knows. More later.

I liked your notion about looking for cells/houses that would left with no candidates if the "would be" rank 0 eliminations were performed, and adding base sets if for them if any are found. I think it won't always apply. If the base set(s) dont overlap (each other, or) any other base set, then it definitely works.

Regards,
Blue.
blue
 
Posts: 1037
Joined: 11 March 2013

Re: Exotic patterns a resume

Postby daj95376 » Thu Jun 20, 2013 5:26 pm

Try Obi-Wahn, but I think he only returned for a short period before disappearing again.
daj95376
2014 Supporter
 
Posts: 2624
Joined: 15 May 2006

Re: Exotic patterns a resume

Postby ronk » Thu Jun 20, 2013 6:23 pm

David P Bird wrote:Of course that fits in nicely with the scheme I use for MSLS. It also provides the opportunity to build in a fin cell check so when the pattern turns out to be rank 1 they can be eliminated.

There are "1-rank" patterns that cannot reasonably be reduced to 0-rank, so what do you mean?

[edit: question simplified]
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: Exotic patterns a resume

Postby David P Bird » Thu Jun 20, 2013 10:34 pm

Hi Blue,

blue wrote:I liked your notion about looking for cells/houses that would left with no candidates if the "would be" rank 0 eliminations were performed, and adding base sets if for them if any are found. I think it won't always apply. If the base set(s) don't overlap (each other, or) any other base set, then it definitely works.

Your twisting my words here somewhat because instead of adding a truth set I was taking the opportunity to reduce the link sets by using box links in place of row or column links so there would be no danger of a truth set overlap (the two methods have the same end effect though). This situation can arise when two column links in the same stack cover all the instances of a digit in a box, none of which are in an intersection cell.

David
David P Bird
2010 Supporter
 
Posts: 1043
Joined: 16 September 2008
Location: Middle England

Re: Exotic patterns a resume

Postby David P Bird » Thu Jun 20, 2013 10:43 pm

ronk wrote:
David P Bird wrote:Of course that fits in nicely with the scheme I use for MSLS. It also provides the opportunity to build in a fin cell check so when the pattern turns out to be rank 1 they can be eliminated.

There are "1-rank" patterns that cannot reasonably be reduced to 0-rank, so what do you mean?

What I had in mind is probably a remote possibility, but only experience will tell. Say we have a row/column intersetion cell that contains 1 digit that is doubly covered and all the others are uncovered, then we can't create a cell truth set for it (well, not in my mind anyway). So if the pattern proves to be a rank 1 rather than a rank 0, that doubly covered candidate can be eliminated.

I had also thought that it could happen in a cell covered by a truth set if a candidate was covered by three link sets, but now I can't envisage any circumstance where that could happen.
David P Bird
2010 Supporter
 
Posts: 1043
Joined: 16 September 2008
Location: Middle England

Re: Exotic patterns a resume

Postby blue » Fri Jun 21, 2013 2:11 am

Hi Danny,

daj95376 wrote:Try Obi-Wahn, but I think he only returned for a short period before disappearing again.

How embarassing. Thank you.
Apologies to Obi-Wahn.
Time for me to correct the spelling in some posts of mine ...

Blue.
blue
 
Posts: 1037
Joined: 11 March 2013

PreviousNext

Return to Advanced solving techniques