Logic of XY Chain

Post the puzzle or solving technique that's causing you trouble and someone will help

Logic of XY Chain

Postby enxio27 » Fri Jul 03, 2020 1:49 am

Would someone please explain the logic here? The "hint" I got from SudokuSolver is:

XY-Chain r3c9(1/9)-r7c9=r7c1-r5c1(9/1)


Sudok-o-rama Very Hard 2018 12 07 progress.png
Sudok-o-rama Very Hard 2018 12 07 progress.png (22.92 KiB) Viewed 1271 times
User avatar
enxio27
 
Posts: 532
Joined: 13 November 2007

Re: Logic of XY Chain

Postby yzfwsf » Fri Jul 03, 2020 4:57 am

It is a AIC, xy-chains use bi-value cells only.
AIC.png
AIC.png (25.29 KiB) Viewed 1265 times
yzfwsf
 
Posts: 905
Joined: 16 April 2019

Re: Logic of XY Chain

Postby SpAce » Fri Jul 03, 2020 10:12 am

enxio27 wrote:Would someone please explain the logic here? The "hint" I got from SudokuSolver is:

XY-Chain r3c9(1/9)-r7c9=r7c1-r5c1(9/1)

The logic is correct (that of a W-Wing), but the name of the technique is wrong. It's not an XY-Chain.

yzfwsf wrote:It is a AIC, xy-chains use bi-value cells only.

That's correct, but perhaps a bit misleading since XY-Chains are AICs too. It's more accurate to say that it's a mixed-link simple AIC (*), using both bivalue and bilocal strong links. More specifically it's a W-Wing.

(*) I really wish we had a specific name for generic simple mixed-link chains, like we have for X-Chains and XY-Chains. I'm suggesting "H-Chain" as an abbreviation of "Hybrid Chain", being a combo of biLocal and biValue links:

Code: Select all
                                      AIC
                                       |
                          +------------+------------+
                          |                         |
                       Simple                    Complex
                          |                         |
                          |                      ...+...
                          |
        +-----------------+----------------+
        |                 |                | 
     L-Chain           V-Chain          H-Chain
        |                 |                |
     X-Chain           XY-Chain         ...+...
   (=L1-Chain)            |
                     Remote-Pair
                     (=V2-Chain)                           

In other words, the AIC in question would be an H-Chain of length 3 (=the number of strong links) with two V-links at both ends and one L-link in the middle, using two digits and four cells:

    (a=b) - b=b - (b=a) => -a
(That's the signature of a W-Wing.)

Btw, adding one L-link would give us a W-Ring and a couple more eliminations:

W-Ring: (1=9)r3c9 - r7c9 = r7c1 - (9=1)r5c1 - r2c1 = (1)r2c7 - loop => -1 r3c17, -9 r9c9
-SpAce-: Show
Code: Select all
   *             |    |               |    |    *
        *        |=()=|    /  _  \    |=()=|               *
            *    |    |   |-=( )=-|   |    |      *
     *                     \  ¯  /                   *   

"If one is to understand the great mystery, one must study all its aspects, not just the dogmatic narrow view of the Jedi."
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Logic of XY Chain

Postby enxio27 » Fri Jul 03, 2020 2:35 pm

Ok, would someone please break it down for me, Barney-style? I don't even understand what that hint is trying to tell me. I understand the cell references, but that's about it. What does that pattern eliminate, and why? (My current technique repertoire is limited to X-wings, locked candidates, and N/H sets. I sort of understand swordfish, but I have yet to find one that actually eliminated a candidate.)
User avatar
enxio27
 
Posts: 532
Joined: 13 November 2007

Re: Logic of XY Chain

Postby Hajime » Fri Jul 03, 2020 3:48 pm

Humans will have trouble to detect AICs.
The picture of yzfwsf shows the blue and green candidates.
Try blue is false so green is true. Follow the chain starting in r3c9 and you will end up with r3c1 can not be a 1. Otherwise if r3c9 is a 1 also r3c1 cannot be a 1. So in both cases not a 1. Each cell that 'sees' both ends of a chain with 2 colours cannot be that candidate.
User avatar
Hajime
 
Posts: 1375
Joined: 20 April 2018
Location: Fryslân

Re: Logic of XY Chain

Postby SpAce » Fri Jul 03, 2020 4:01 pm

enxio27 wrote:Ok, would someone please break it down for me, Barney-style? I don't even understand what that hint is trying to tell me. I understand the cell references, but that's about it. What does that pattern eliminate, and why?

It eliminates 1 from r3c1. It could also eliminate 1 from r5c9 but there isn't any. The reason is that the pattern proves that there must be a 1 in r3c9 or r5c1 (or both), and thus there can't be a 1 in any cell that sees both of those.

Code: Select all
..82.1..6..95...2..5..7..3..25.8...4.6.....7.8...4.26..1..5..8..8...93..4..7.85..
.-----------------.----------------.---------------.
|  37    347  8   | 2    9     1   | 47   5    6   |
|  16    47   9   | 5    36    346 | 147  2    8   |
|  26-1  5    12  | 8    7     46  | 149  3   a1'9 |
:-----------------+----------------+---------------:
|  37    2    5   | 36   8     67  | 19   19   4   |
| d1"9   6    4   | 139  12    25  | 8    7    35  |
|  8     379  13  | 139  4     57  | 2    6    35  |
:-----------------+----------------+---------------:
| c29    1    237 | 4    5     23  | 6    8   b279 |
|  5     8    267 | 16   126   9   | 3    4    127 |
|  4     39   236 | 7    1236  8   | 5    19   129 |
'-----------------'----------------'---------------'

As an AIC (W-Wing):

(1=9)r3c9 - r7c9 = r7c1 - (9=1)r5c1 => -1 r3c1

The chain proves that one or the other end-node must be true. In other words it proves a derived OR between 1r3c9 and 1r5c1. The confusing '=' and '-' are markers for strong links (OR) and weak links (NAND) between the nodes, and they must alternate for the chain to be a valid AIC. I don't know if it helps you at all, but here's the above chain as boolean logic (| & -) being (OR, AND, NOT):

(1r3c9|9r3c9) & (-9r3c9|-9r7c9) & (9r7c9|9r7c1) & (-9r7c1|-9r5c1) & (9r5c1|1r5c1) & (-1r3c9|-1r3c1) & (-1r5c1|-1r3c1)

=> 1r3c9 | 1r5c1
=> -1r3c1

Another way to see it is if you look at the possibilities for digit 9 in row 7, and what follows from each. There are only two (9r7c1 and 9r7c9), so they're strongly linked (one or the other must be true). If 9r7c1 is true, then 1r5c1 must be true; and if 9r7c9 is true, then 1r3c9 must be true. Neither way 1r3c1 can be true, so it can be eliminated. As a Kraken Row:

Code: Select all
(9)r7c1 - (9=1)r5c1 - \
||                     - (1)r3c1
(9)r7c9 - (9=1)r3c9 - /

(My current technique repertoire is limited to X-wings, locked candidates, and N/H sets. I sort of understand swordfish, but I have yet to find one that actually eliminated a candidate.)

And you probably won't any time soon, unless you specifically generate Swordfish puzzles and specifically look for fishes in them. In practice, useful fishes are rare and hard to spot (unless they're also chains).

I recommend you save fishes for last and learn everything else first, starting with basic AICs. My recommended order is first X-Chains, second XY-Chains, and third mixed-link (hybrid) chains like the W-Wing here.
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Logic of XY Chain

Postby SpAce » Fri Jul 03, 2020 4:07 pm

Hajime wrote:Humans will have trouble to detect AICs.

By default, yes. It's a totally learnable skill, though.
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Logic of XY Chain

Postby Pupp » Wed Jul 22, 2020 5:44 am

Sudoku Explainer is good for rating games, but isn't ideal to figure out how to solve a puzzle. IMOHO.

It seems, to me anyway, that it evaluates a problem based on the easiest techniques to use... thereby adding extra steps to a puzzle intended to be solved in a more efficient manner. Making it somewhat useless to actually explain a difficult problem.

The only suggestion I have is to learn more techniques, and find an app that slowly gets harder puzzles.

I use Sudoku 10,000 Plus (android for sure) most of the time. There is a definate leap going from Advanced 5 to Hard 1 levels.


I'm at Hard 1 for now, but the jump from Advance 5 to Hard 1 is steep.

The difference between Advance 1 and Advance 5, is you have to pay be more focused to solve an Advanced 5, but the principles are not much different than even the moderate puzzles.

But starting with Hard 1, you have to apply several techniques, loke X-wing, XY-chain, hidden triples, quads, etcetera in order to solve the puzzles. At Hard 1, they limit the most difficult technique to only 1 per puzzle, but there are 250 puzzles to practice with.

For learning techniques, if you have an android, then ANDOKU 3 is phenomenal with tutorials.
Pupp
 
Posts: 246
Joined: 18 October 2019

Re: Logic of XY Chain

Postby 1to9only » Wed Jul 22, 2020 8:22 am

Pupp wrote:Sudoku Explainer is good for rating games, but isn't ideal to figure out how to solve a puzzle.

In GUI, clicking on 'Get all hints' shows all possible next steps. Other programs have similar features.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Logic of XY Chain

Postby denis_berthier » Thu Jul 23, 2020 2:29 am

enxio27 wrote:Would someone please explain the logic here? The "hint" I got from SudokuSolver is:
XY-Chain r3c9(1/9)-r7c9=r7c1-r5c1(9/1)


If you use some sensible notation, where the bivalue/bilocal relations are considered the same way, the chain becomes obvious:

biv-chain[3]: r3c9{n1 n9} - r7n9{c9 c1} - r5c1{n9 n1} => r3c1 ≠ 1
denis_berthier
2010 Supporter
 
Posts: 4209
Joined: 19 June 2007
Location: Paris

Re: Logic of XY Chain

Postby Pupp » Fri Aug 21, 2020 11:37 pm

1to9only wrote:
Pupp wrote:Sudoku Explainer is good for rating games, but isn't ideal to figure out how to solve a puzzle.

In GUI, clicking on 'Get all hints' shows all possible next steps. Other programs have similar features.


I can't say this about anybody else, but I generally do better, if I'm stuck at a spot, is to get the puzzle to that point in app,then see what technique is suppose to be used there. Then look at the puzzle to see if there is any related techniques to that spot, then look up an online tutorial or two, and study those.

The reason is because computer apps can only solve from that point, and they assume you did every possible move correctly before that, or perhaps the human has more understanding at that point than the person really does.

Perfect example was a recent problem in which the step needed an X-wing to solve. The problem was there where extra pencil marks I needed to have removed to see the X-wing. Computer apps are not good at looking at a problem and explaining why you missed excluding a pencil mark from (probably) several moves earlier. So highlighting an X-wing wasn't very useful to me. If I was teaching someone Sudoku and they were stuck at a point, I'd be able to if they went wrong earlier, and explain that step first. Another problem is that humans often, especially in the easier stages of a puzzle, often just randomly pick which cells to fill with pencil marks, and solve steps as they see them. This is especially true after you fill in all the really easy cells, and get to the point where you have to start filling in the rest of the unused cells in the puzzle. That exact sequence could be random, might be due to the symmetry of the puzzle, or perhaps the person just likes to do it certain way.
Someone might start with the center box of 9, and then after that, go the the upper left hand corner, and start filling in cells clockwise. Or maybe the human always starts in the upper left, fills in all the pencil marks in the top third of the puzzle, then the middle third of the puzzle, then the bottom third of the puzzle. Needless to say, regardless of how they pencilmark the cells, it's very probably that they will find some cells to fill in. A computer app will always take the step that's most logical and easy, when looking at the entire 81 squares at once. Some algorithm will decide that some cell is easiest to fill in, so that MUST be the next step. A human being pencilmarking cells in the opposite side of the board will find the next cell to fill in when they happen to spot a way to FILL A CELL, regardless if it's the easiest cell or not in the entire puzzle to solve.

This is less likely a problem with the easiest puzzles, or the harder puzzles, but for many puzzles with mostly singles and only a very few harder techniques, if any at all, it's very easy to find cells sprinkled over the board you can fill in as your filling in pencil marks.
Pupp
 
Posts: 246
Joined: 18 October 2019


Return to Help with puzzles and solving techniques