X-Cycles questions

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

Re: X-Cycles questions

Postby Mino21 » Sun Aug 28, 2022 2:54 pm

StrmCkr wrote:
Mino21 wrote: Even if you don't want to prove why my logic is wrong,

I did with the grouped 2 string kite the *, cell in that example would cause no elimination. Your rules would still trigger it.

Are you referring to this?
StrmCkr wrote:
Code: Select all
 
| X * X | \ \ \ | \ X \
|. X. |
|. X. |
_____
|. /. |
|. X. |.            - X
|. \. |

in that case I don't understand your notation ... could you translate the example into something like this
Code: Select all
.-------.-------.-------.
| 1   1 |       |   1   |
|   1   |       |       |
|   1   |       |       |
:-------+-------+-------:
|       |       |       |
|   1   |       |   1   |
|       |       |       |
:-------+-------+-------:
|       |       |       |
|       |       |       |
|       |       |       |
'-------'-------'-------'

and specify which chain you are referring to?



yzfwsf wrote:Assuming the number in your example is 1, the chain below is my solver output.
Code: Select all
Grouped X-Chain: 1r1c123 = r1c7 - r3c9 = r9c9 - r9c13 = r8c2 - r123c2 = 1r1c13 => r23c2,r1c7<>1

My solver delete first r1c7 for a loop rule 3 and then delete r23c2 with "intersection removal" technique, so even though the logic settings are different, the results look the same to me.
“Without education, we are in a horrible and deadly danger of taking educated people seriously.”
User avatar
Mino21
 
Posts: 35
Joined: 08 July 2022
Location: Draghistan

Re: X-Cycles questions

Postby yzfwsf » Sun Aug 28, 2022 3:42 pm

Mino21 wrote:2) the site say that a strong link, if necessary, can be converted into a weak one. Can we generalize that a loop can contain any number of odd sequences of consecutive strong links? From a practical point of view, can it happen to have a sequence of >3 (5, 7, etc...) consecutive strong links?

Please ignore this statement, only strong links composed of two single candidate nodes can always replace weak links, this conclusion does not hold for groupped links(overlapping)。
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: X-Cycles questions

Postby jco » Sun Aug 28, 2022 4:35 pm

Hi,

I just would like to show the problem with this plot.
This will be my only post. I will avoid mentioning strong link, weak link.
I will start at block 1:
if N (the digit in the X-cycle) is not true at r1c13, then it must be at r123c2
(only place left in the block). But if N is true in one of the cells of r123c2,
then it cannot be at r8c2, an this implies that in block 7, N must be at
r9c13 (one of these two cells, only place left). However, this implies that N cannot be
at r9c9, which in turn implies that N must be at r3c9 (because in column
9, there are only two places possible for N). However, if N at r3c9 implies
that N cannot be a r1c7. an then, looking at row 1, N must be at r1c123,
and this is not what you have in your drawing. N not being at r1c7 does
not imply that N must be at r1c13.
I hope this helps.

Best regards,

EDIT: this argument is only to show that a continuous loop cannot be formed with that setting,
that is, a continuous loop could not the "closed" (I had only continuous loops in mind).
@ Cenoman thanks for sending me a message about this.
Last edited by jco on Sun Aug 28, 2022 6:05 pm, edited 1 time in total.
JCO
jco
 
Posts: 709
Joined: 09 June 2020

Re: X-Cycles questions

Postby Cenoman » Sun Aug 28, 2022 5:08 pm

@Mino21,
I have tried to understand why our messages are still misunderstood. So I have read again X-Cycles articles, grouped X-Cycles and ER articles. I feared they were confusing, but that is not.

I'd like to draw your attention on the following sentences:
After explaining X-Cycles rule 1, Andrew Stuart wrote:
There are two interesting rules that lead to eliminations when we identify an imperfection in a loop which is called a discontinuity.

A discontinuity occurs when we find two strong links next to each other (that is, with no weak link between them) or two weak links next to each other (with no strong link dividing them). These rules work only if there is exactly one discontinuity, and such a loop will always have an odd number of nodes.

'Discontinuity' doesn't mean that the loop is broken or that it's not chain; it refers only to the imperfection that would otherwise make links alternate strong/weak/strong, and so on.


Note the role of discontinuities: in rule 2, x is placed at the discontinuity cell; in rule 3, x is eliminated at the discontinuity cell.

So in your example the discontinuity is clearly at r1c7 (the elimination, that have two weak links). So you have no right to a second discontinuity, neither on weak links, nor on strong links. The vertical link in c2 should be drawn as a weak link.

In the way you have drawn your candidates x, it would work because r123c2 and r8c2 are conjugates (r123c2 XOR r8c2 = True) so are also in a weak link.
But if you set this as a requirement you will miss all the X-Cycles with x in the mini-column r456c32
Code: Select all
 +---------------+---------------+---------------+
 |  x    x    x  |               |  x            |
 |       x       |            x  |  x            |
 |       x       |            x  |            x  |
 +---------------+---------------+---------------+
 |       x    x  |               |       x       |
 |       x       |               |               |
 |  x    x       |               |       x       |
 +---------------+---------------+---------------+
 |               |               |               |
 |       x       |               |  x            |
 |  x         x  |               |  x         x  |
 +---------------+---------------+---------------+

Written as an X-Cycle
(x): r1c7 - r1c13 = r123c2 - r8c2 = r9c13 - r9c9 = r4c9 - r1c7
Written as an AIC (my preference, of course) (x): r1c13 = r123c2 - r8c2 = r9c13 - r9c9 = r4c9 => r1c7<>x

So the rule is: in an X-Cycle, links must alternate strong/weak/strong and so on, at each node , except at a single node (the discontinuity) that may see links strong/strong or weak/weak

Edit: displayed clearly Andrew's quotation. Corrected last sentence (brackets at the right place) ... and typos
Last edited by Cenoman on Sun Aug 28, 2022 7:40 pm, edited 3 times in total.
Cenoman
Cenoman
 
Posts: 2754
Joined: 21 November 2016
Location: France

Re: X-Cycles questions

Postby StrmCkr » Sun Aug 28, 2022 5:21 pm

yzfwsf wrote:Assuming the number in your example is 1, the chain below is my solver output.
Code: Select all
Grouped X-Chain: 1r1c123 = r1c7 - r3c9 = r9c9 - r9c13 = r8c2 - r123c2 = 1r1c13 => r23c2,r1c7<>1


Yeah I can see that as r1 is also à strong link as displayed ... There is a few different ways the chain can be built directionally .


Grouped 2 STRING kite fixed for better reading
Code: Select all
 
|  X * X  |  /  /  /  |  /  X  /  |
| @  X  @  | . . . | . . . |
| @  X  @  | . . . | . . . |
-----------------
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
-----------------
| .  /  .  | . . . | . . . |
| .  X  . | . . . | . -x . |
| .  /  .  | . . . | . . . |
-----------------


/ has no x canddiate
. May contain an x candidate
@ may have an x canddiate

POTENTIAL -X ELIMINATION
* must be missing or this dosent work.

Your logic as written /interpreted
would have this scenario work If all the @ cells are also missing x and * has an x.
Which it dosent work.
too wordy here's the dipiction that won't work
Code: Select all
 
|  X X X  |  /  /  /  |  /  X  /  |
| /  X  /  | . . . | . . . |
| /  X  /  | . . . | . . . |
-----------------
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
-----------------
| .  /  .  | . . . | . . . |
| .  X  . | . . . | . -x . |
| .  /  .  | . . . | . . . |
-----------------
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1426
Joined: 05 September 2006

Re: X-Cycles questions

Postby Mino21 » Sun Aug 28, 2022 11:36 pm

jco wrote:Hi,

I just would like to show the problem with this plot.
[...]
N not being at r1c7 does not imply that N must be at r1c13.

Hi,
I know, and in fact I have never said anything like that! :|
The logical inferences you listed show that if r1c13 is false then r1c7 is false, if instead r1c13 is true then r1c7 is false, so that loop I drew tells us that we can eliminate the candidate in r1c7, since it is false in both cases.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Cenoman wrote:I have tried to understand why our messages are still misunderstood. So I have read again X-Cycles articles, grouped X-Cycles and ER articles. I feared they were confusing, but that is not.

In fact, the SudokuWiki site has nothing to do with it, as previously mentioned:
Mino21 wrote:it is true that I read something on SudokuWiki, but through the reasoning I tried to give myself an explanation, on which I then based the implementation of x-cycles in C++



Cenoman wrote:But if you set this as a requirement you will miss all the X-Cycles with x in the mini-column r456c32
Code: Select all
 +---------------+---------------+---------------+
 |  x    x    x  |               |  x            |
 |       x       |            x  |  x            |
 |       x       |            x  |            x  |
 +---------------+---------------+---------------+
 |       x    x  |               |       x       |
 |       x       |               |               |
 |  x    x       |               |       x       |
 +---------------+---------------+---------------+
 |               |               |               |
 |       x       |               |  x            |
 |  x         x  |               |  x         x  |
 +---------------+---------------+---------------+

Written as an X-Cycle
(x): r1c7 - r1c13 = r123c2 - r8c2 = r9c13 - r9c9 = r4c9 - r1c7
Written as an AIC (my preference, of course) (x): r1c13 = r123c2 - r8c2 = r9c13 - r9c9 = r4c9 => r1c7<>x

I know it's just an example, but I believe that the candidates configuration is not valid (and in the chain I think you wrote r4c9 instead of r3c9).
Anyway, assuming I'm not sure I understand what you mean, I really don't understand why my algorithm shouldn't be able to find the cycle you just reported?!

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

StrmCkr wrote:too wordy here's the dipiction that won't work
Code: Select all
 
|  X X X  |  /  /  /  |  /  X  /  |
| /  X  /  | . . . | . . . |
| /  X  /  | . . . | . . . |
-----------------
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
-----------------
| .  /  .  | . . . | . . . |
| .  X  . | . . . | . -x . |
| .  /  .  | . . . | . . . |
-----------------

Finally, maybe this time I'll understand why I'm wrong! :D

In this case with my approach I would get the following two chains:
r1c123=r1c8-r8c8-r8c2-r23c2=r1c123
r123c2=r8c2-r8c8-r1c8-r1c13=r123c2
that are both not valid loop cause they have three consecutive weak links.

instead I seem to understand that with your official approach you get a valid loop that allows an elimination in r8c8, rigth? And what exactly would this cycle be?
“Without education, we are in a horrible and deadly danger of taking educated people seriously.”
User avatar
Mino21
 
Posts: 35
Joined: 08 July 2022
Location: Draghistan

Re: X-Cycles questions

Postby yzfwsf » Mon Aug 29, 2022 12:06 am

Instead, you can set r8c8=1, my solver output is as follows.
Code: Select all
Grouped X-Chain: 1r8c8 = r8c2 - r123c2 = r1c13 - r1c8 = 1r8c8 => r8c8=1


btw:
sudokuwiki wrote:So, some Strong links can be reversed to give us a "link with weak inference" - if the occasion calls for it. It is perfectly logical to assert on a unit with two candidates of X both:
If Not A then B (!A =>B)
If A then Not B (A => !B)

That is, there are preconditions for using strong links instead of weak links。
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: X-Cycles questions

Postby Mino21 » Mon Aug 29, 2022 12:56 am

yzfwsf wrote:Instead, you can set r8c8=1, my solver output is as follows.
Code: Select all
Grouped X-Chain: 1r8c8 = r8c2 - r123c2 = r1c13 - r1c8 = 1r8c8 => r8c8=1

Why do you use strong link on r8 and c8? With
StrmCkr wrote:. May contain an x candidate

i deduced that in r8 and c8 we have more than two candidates.

If candidates on r8 an c8 are instead only the writted ones, with my approach i get the following chain:
r1c123=r1c8=r8c8=r8c2-r23c2=r1c123
that is a valid loop rule 2 that delete candidates in r1c8, r8c2 and r23c2 (which implies that r8c8 and r1c2 are 1).
“Without education, we are in a horrible and deadly danger of taking educated people seriously.”
User avatar
Mino21
 
Posts: 35
Joined: 08 July 2022
Location: Draghistan

Postby Pat » Mon Aug 29, 2022 1:43 am

in this diagram (r1c2 not containing the digit),
r8c8 can be excluded:
Code: Select all

| X  /  X  | / / / | / X / |
| /  X  /  | . . . | . . . |
| /  X  /  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  X  .  | . . . | . X . |
| .  /  .  | . . . | . . . |



but in this (allowing r1c2),
no such exclusion is possible:
Code: Select all

| X  X  X  | / / / | / X / |
| /  X  /  | . . . | . . . |
| /  X  /  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  X  .  | . . . | . X . |
| .  /  .  | . . . | . . . |


— and your idea to force the digit in r1c2 and r8c8
requires (as you said) many more "/" in r8 and c8
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Re: X-Cycles questions

Postby yzfwsf » Mon Aug 29, 2022 2:22 am

Mino21 wrote:
yzfwsf wrote:
StrmCkr wrote:. May contain an x candidate

i deduced that in r8 and c8 we have more than two candidates.

If so, no conclusions can be drawn。
I used 8 rows and 8 columns with only 2 x candidates as preconditions for the conclusion.
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: X-Cycles questions

Postby StrmCkr » Mon Aug 29, 2022 2:39 am

Code: Select all
 
| X  /  X  | / / / | / X / |
| /  X  /  | . . . | . . . |
| /  X  /  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  X  .  | . . . | . -X . |
| .  /  .  | . . . | . . . |

Grouped 2 string kite which is a x-cycle
The x cycle would include the elimination r8C8 as weakinks to R8C2 & r1c8 showing the loop

R8C8 - (R2C8 = R2C13) - (R34C2 =R8C2) - R8C8>> R8C8 <> X
IF R8C8 IS TRUE THEN R8C8 IS FALSE.

The AIC is grouped 2 string kite and dose t include the elimination.
R2C8 = R2C13 - R34C2 =R8C2 >> R8C8 <> X

Yes the ". “ means there is an x in the spot.
I did that to show you the elimination error with your code which is how I found my own.

Which goes back to your last post box 1 and box 7 are weak links not strong links as depicted and you won't generate errors like this small example.

Written as an X-Cycle
(x): r1c7 - r1c13 = r123c2 - r8c2 = r9c13 - r9c9 = r4c9 - r1c7
Written as an AIC (my preference, of course) (x): r1c13 = r123c2 - r8c2 = r9c13 - r9c9 = r4c9 => r1c7<>x


They must alternate between strong and weak - with the exception of the include elimination cells as you would notice the 2 string kite is
strong on Row 1
weak in the box between row and col
strong on Col 2
elimination is weak linked to r1 and col 2 { the first cell and the last cell}

go back to the quote and compare:
strong in box
weak on col to next box
strong in box
weak on row to next col
strong on col
elimination is weak to box 1 and col

x-cycles and nice loops usually start on a weak link compared to aic's that start on a strong link.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1426
Joined: 05 September 2006

Re:

Postby Mino21 » Mon Aug 29, 2022 11:19 am

@Pat
thanks for the clarification, so my approach, until proven otherwise, works ... I really don't understand why they say no!

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

yzfwsf wrote:If so, no conclusions can be drawn。
I used 8 rows and 8 columns with only 2 x candidates as preconditions for the conclusion.

Therefore, even if with different approaches, we continue to obtain the same results.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

@StrmCkr
I confess that the situation that has arisen makes me a little uncomfortable, but I really don't understand what you are contesting me!
In all the cycle examples posted so far, the result I get with my approach coincides with the "official" one... in this case too:
StrmCkr wrote:
Code: Select all
 
| X  /  X  | / / / | / X / |
| /  X  /  | . . . | . . . |
| /  X  /  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  X  .  | . . . | . -X . |
| .  /  .  | . . . | . . . |


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Just to be clear, my approach is as follows:

Mino21 wrote:a) only two candidates in an unit imply a strong link and hence the following two logical implications:
Code: Select all
 A => !B
!A =>  B

more than two candidates in a unit imply a weak link and hence the only following logical implication:
Code: Select all
 A => !B


b) a valid loop must have the following characteristics:
- at least 4 nodes;
- at least a weak link;
- at most an even subsequence of consecutive strong links or a subsequence of two consecutive weak links;
- (any number of odd subsequences of consecutive strong links).

c) loop rules (green=true and red=false; arrows indicate the starting point and the direction of the logical inferences):

Image
Image
Image

d) implemented recursive algorithm about x-cycles (not grouped):
- I always start from a strong link, of which a candidate will be the arrival node that closes the loop, while I pass the other to the recursive function that, node by node, tries to build a loop;
- at each recursive call, I first use the information on the part of the loop constructed so far to deduce if the next link can be weak or must necessarily be strong;
- then I derive the type of connection (weak or strong) that I would have in the other units to which the previous node belongs, and check that it is compatible with the result illustrated in the previous point;
- if it is compatible I consider the various candidates in that unit one at a time, and if the candidate considered is not already a node I add it to the cycle;
- at this point if the loop isn't closed I go on with other recursive calls.


with the specification that with grouped-x-cycles in the case of mini rows and mini columns that share a cell, it is necessary to consider the two cases obtained by assigning the common cell once to the horizontal group and once to the vertical one, as shown in the following image:

Image

I do not have the presumption to affirm that the aforementioned approach is certainly correct and completely equivalent to the official one, but so far I honestly have not understood why it would be logically wrong nor have I seen a concrete example of a cycle that proves it.
“Without education, we are in a horrible and deadly danger of taking educated people seriously.”
User avatar
Mino21
 
Posts: 35
Joined: 08 July 2022
Location: Draghistan

Re: Re:

Postby yzfwsf » Mon Aug 29, 2022 11:52 am

Mino21 wrote:with the specification that with grouped-x-cycles in the case of mini rows and mini columns that share a cell, it is necessary to consider the two cases obtained by assigning the common cell once to the horizontal group and once to the vertical one, as shown in the following image:
Image
I do not have the presumption to affirm that the aforementioned approach is certainly correct and completely equivalent to the official one, but so far I honestly have not understood why it would be logically wrong nor have I seen a concrete example of a cycle that proves it.

Your logic error is not in the 2 pictures, it's not wrong to have them as strong links, but it is wrong to have them as weak links. That is to say, overlapping group links can only be used as strong links but not as weak links.
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: X-Cycles questions

Postby StrmCkr » Mon Aug 29, 2022 2:02 pm

All of us have been the same thing pictures 1 and 2.
The blue lines in your picture can only be green.

If it is blue then you will generate errors

You are also not illustrating alternating strong - > weak
your code probably is doing it and you aren't aware of it as a strong link can act as a weak link but you need to be careful when using this as illustrated grouped types cannot substitue à weak link

Code: Select all
| X  X  X  | / / / | / X / |
| /  X  /  | . . . | . . . |
| /  X  /  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  X  .  | . . . | . X . |
| .  /  .  | . . . | . . . |

You said you found loops
you shouldn't this is why the blue line must be green and re affirms what we all said the links Alternate!
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1426
Joined: 05 September 2006

Re: X-Cycles questions

Postby Mino21 » Mon Aug 29, 2022 3:54 pm

StrmCkr wrote:The blue lines in your picture can only be green.

If it is blue then you will generate errors

I'm not agree and as proof I posted this:

Image

where r123c2=r8c2 is a strong link... and please don't tell me that it works also like a weak link, because they are your conventions (which I have not yet studied in deep neither in the genesis nor in the consequences), not mine ... the whole question of "strong links working as weak links" is totally absent in my logical setting.



StrmCkr wrote:
Code: Select all
| X  X  X  | / / / | / X / |
| /  X  /  | . . . | . . . |
| /  X  /  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |
| .  /  .  | . . . | . . . |

| .  /  .  | . . . | . . . |
| .  X  .  | . . . | . X . |
| .  /  .  | . . . | . . . |

You said you found loops
you shouldn't this is why the blue line must be green and re affirms what we all said the links Alternate!

I said:
Mino21 wrote:In this case with my approach I would get the following two chains:
r1c123=r1c8-r8c8-r8c2-r23c2=r1c123
r123c2=r8c2-r8c8-r1c8-r1c13=r123c2
that are both not valid loop cause they have three consecutive weak links.

Maybe I was unclear, maybe also because of my bad english, but the algorithm I implemented does not find either of the two aforementioned loops, as more than two consecutive weak links are not allowed; in fact once arrived at one of these points:
r1c123 = r1c8-r8c8-r8c2 ...
r123c2 = r8c2-r8c8-r1c8 ...
the search for the next node necessarily requires a strong link (in the description of my algorithm it is clearly explained).



So at the moment there is still no counter-proof that proves that my approach is wrong, and I rely on the experience of all of you precisely to understand if this possible counter-proof exists or not.
“Without education, we are in a horrible and deadly danger of taking educated people seriously.”
User avatar
Mino21
 
Posts: 35
Joined: 08 July 2022
Location: Draghistan

PreviousNext

Return to Help with puzzles and solving techniques