Definition of an xyt-chain, elementary example and indications for finding themThis has already been largely discussed in the UK forum
(http://www.sudoku.org.uk/discus/messages/29/4236.html?1185340042),
but since the participants are different, it may raise different reactions.
Also, since xyt-chains are a simple but very powerful extension of xy-chains, it may be of interest to a large number of players.
Contrary to complex chains, xyt-chains are, IMO, relatively easy to find (after some training, as for anything new).
In this first post, I'll define them, give a simple example and briefly say how to find them.
(If you also read my thread on Supersymmetries and hidden chains, then, combining the two ideas, you'll know how to find hxy and hxyt-chains)
1) DefinitionLet me first introduce my representation of a standard xy-chain (of length 4) and some vocabulary:
{1 2} - {2 3} - {3 4} - {4 1}.
All the cells must be different (in particular, the first and the last), i.e. the chain is "open" and has no internal loops (this apparent restriction is justified, because I have proven that loops would not allow more eliminations).
Here "-" stands for any type of link (row, column or block/box as you prefer) and 1, 2, 3, 4 are any candidates (they may be considered as shorthands for variables x1, x2, x3, x4). The curly brackets indicate that the sets of candidates in each cell of the chain are limited to the instantiations of the variables displayed.
Two variables in the same cell must have different values, but, for full generality, two variables in different cells, that never appear in the same cell, may be equal.
For xy-chains, all the cells must be "bivalued" (i.e. have exactly 2 candidates).
The xy-chain rule (as I have re-formulated it) says that one can eliminate x1 from any target cell (i.e. any cell that does not belong to the chain and that shares a unit with both of its endpoints).
Candidates x2 in cell 1, x3 in cell 2, x4 in cell 4, … I call the
right linking candidates of these cells, whereas candidates x1 in cell 1, x2 in cell 2, x3 in cell 3, … I call the
left linking candidates of these cells.
In my book ("The Hidden Logic of Sudoku", a long excerpt of which you can find on my web pages), I have introduced
xyt-chains, a simple but very powerful generalisation of xy-chains. The idea is that in an xy-chain a cell C in the chain may be allowed any additional candidate (i.e. other than the left and right linking candidates) provided that this candidate alraedy appears as the right linking candidate of a previous cell C' in the chain such that C shares a unit with C'. Note that, whereas xy-chains are symmetric (head and tail can be reversed), this is no longer the case for xyt-chains. But the underlying logic is very similar and proving the mathematical validity of the xyt-chain rule : (one can eliminate x1 from any target cell) can be done straightforwardly, along the same lines as for an xy-chain.
An xyt-chain (of length 4) is represented by the following pattern:
{1 2} - {2 3} - {3 4 (2#1)} - {4 1 (2#1)(3#2)} ,
where all the cells are still different and candidates between normal brackets inside a cell are optional and are allowed in a cell provided that this cell is linked to the cell whose number in the chain follows the # sign.
In details:
- cell 1 has exactly the 2 different values x1 and x2,
- cell 2 has exactly the 2 different values x2 and x3,
(therefore the first two cells are the same as in an xy-chain),
- cell 3 has the 2 different values x3 and x4 and it may have additional value x2, provided that cell 3 is linked to cell 1,
- cell 4 has the 2 different values x4 and x1 and it may have additional value x2 provided that it is linked to cell 1 and it may have additional value x3 provided that it is linked to cell 2.
Similar definitions and representations apply for longer chains. In any case, the farther we go towards the tail of the chain, the more additional values we may have.
Re-elaborating on a remark by Michael McWilliams in the UK forum, this can also be stated in a less formal way:
when you build an xyt-chain from head to tail, any candidate that has already been chosen as a right linking candidate of a previous cell in the chain allows you to forget its presence
as an extra candidate (but not as a potential right linking value) in any cell that it sees (i.e. it is linked to) further along the same chain.
Notice that, for full generality, some care must be taken in the formulation (because the same number can reappear in different cells as a linking candidate.
2) Elementary example(you can see much more complex ones in the UK forum or in the "online supplements" section in my web pages). (0 indicates an empty cell)
946512738
528600194
100849256
281405000
054000810
069108540
615084320
800201405
402050081
Solution path (as generated by my SudoRules solver):
number 6 : row R5 interaction with block B5
==> 6 eliminated from the candidates for R4C5
number 9 : xyt4-chain on cells R9C7*, R8C8, R8C3 and R8C2* with numbers 9, 6, 7 and 3
==> 9 eliminated from the candidates for R9C2number 9 : hidden-single-in-block B7 ==> R8C2 = 9
number 9 : column C5 interaction with block B5
==> 9 eliminated from the candidates for R5C4
numbers 3 and 7 : naked-pairs-in-row R5: R5C1-R5C4
==> 7 eliminated from the candidates for R5C9
==> 3 eliminated from the candidates for R5C9
==> 7 eliminated from the candidates for R5C6
==> 3 eliminated from the candidates for R5C6
...(Naked-Singles and Hidden-Singles)…
946512738
528637194
137849256
281475963
754396812
369128547
615784329
893261475
472953681
3) How to find xyt-chainsSince the first two cells of an xyt-chain satisfy the same conditions as those of an xy-chain, you start the same way, and you get {1 2} - {2 3}.
Call these two cells the seed of the chain.
Once you have chosen a seed (and you therefore know x1, x2 and x3), look for the third cell among those that are linked to the second, contain x3 among their candidates, another candidate x4 (which will be the right linking candidate of the new cell) and:
- either are are bivalued,
- or are trivalued, are also linked to the first cell and contain x2 as their third candidate,
Then look for the fourth cell among those that are linked to the third, contain x4 among their candidates, another candidate x5 (which will be the right linking candidate of the new cell) and:
- either are are bivalued,
- or are trivalued, are also linked to the first cell and contain x2 as their third candidate,
- or are trivalued, are also linked to the second cell and contain x3 as their third candidate,
- or are quadrivalued, are also linked to the first cell and contain x2 as their third candidate, are also linked to the second cell and contain x3 as their fourth candidate.
Of course you can always restrict your search to cells that are bi- or tri-valued. You won't find all the xyt-chains, but most of them. Indeed, xyt-chains that have two additional candidates in a cell are rare (because of the constraints this imposes on the links with previous cells).
Notice that a right linking candidate of a previous cell may reappear as the right linking candidate of a new cell (and not only as an additional candidate), so that some care must be taken in the proper formulation of the rule and the methods used to spot its occurences.
How do you do this in practice?
Personally, I simply draw an arrow from each cell to the next, with starting point on the right linking candidate (and, this is convenient but not really necessary, arriving on the left linking candidate of the next cell).
Instead of drawing arrows, you can also use a colouring technique that has recently been devised by John MacLeod (see his original post here:
http://www.sudoku.org.uk/discus/messages/29/4268.html?1185339098). I'll describe it as follows.
You still build the chain from head to tail, starting with the same two cells as above. Colour in blue their right linking candidates. Then:
- when looking for the next cell, search among those that are linked to the last and contain its right linking candidate, forgetting the presence
as an extra candidate (but not as a potential right linking value) of any candidate that sees the same number already coloured in blue,
- colour in blue the right linking candidate of the cell you have just added to the chain.
The relationship between the two methods is obvious: blue candidates correspond to starting points of arrows.
Each method has different advantages:
- with colouring, you avoid drawing arrows on the grid, but you loose the information on the ordering of the cells,
- with arrows, you can re-use the initial part of the chain to build another one, but you overload the grid with arrows.
4) ConclusionI think you now have all the information necessary to start using xyt-chains. But I can provide more if needed.