X-Cycles questions

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

Re: X-Cycles questions

Postby Mino21 » Wed Aug 31, 2022 2:57 pm

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

r8c123-r8c789=r79c8-r1c8-r1c123=r23c2-r79c2=r8c123
L.R.3: r1c8

the way i would read this is
R8C123(on) => r8c789{off} => r79c8 (on) => r1c8 (off). {stalls on the weak link here}
[...]
id read that you started on a weak link and not a strong link
[...]

As already said, my algorithm always starts from a strong link, in this case r79c2=r8c123 (but it could also have been r8c789=r79c8 or r1c123=r23c2), where r8c123 is the starting node and r79c2 the arrival node.
Proof that it is a loop rule 3 is specified here:
Mino21 wrote:
Image

loop rule 3 is characterized by:
1) at least one weak link;
2) one subsequence of two consecutive weak links;
3) no even subsequence of consecutive strong links;
4) any number of odd subsequences of consecutive strong links;
5) odd number of nodes (but this is a consequence of the previous points)

Proof: starting from the node that starts the subsequence of two consecutive weak links, and assuming once it is true and once it is false, we will obtain that the node that sees two weak links is false in both cases, which will allow us to eliminate the candidate in it;

But actually, now that I think about it, it can be proved even more simply: starting from the node that sees two weak links, and assuming is true, we will obtain a contradiction, which will allow us to eliminate the candidates in it.

That said, I don't really understand why you give so much importance to the order in which I write the cycle ... it's a cycle!
My search algorithm does not go on in terms of ON and OFF, but is simply based on the characteristics of the part of the cycle constructed so far, taking into account the following positions:
Mino21 wrote: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).


So is my approach equivalent to the "official" one? Or not? I still haven't figured it out! :lol:

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

@P.O. and @Pat
The basic problem is that you try to understand what I write through the filter constituted by the "official" conventions on x-cycles, ignoring my point of view on the problem reported in full in this post.

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

eleven wrote:
Mino21 wrote:It may seem strange to you, but I used the SudokuWiki site only to understand the basic idea of the various solving techniques, but then, both for x-cycles and some other techniques, I built my own logic settings and algorithms.

lol, you didn't even understand the most basic logic definition of a strong link, ignored all the posts addressing it and insisted on your own weird one. This is the cause of all your troubles.

You are not saying anything new, I myself have repeated several times that:
Mino21 wrote:the concepts of "alternating strong_link-weak_link", "discontinuity" and "strong links acting as weak links" are completely absent in my approach and were not necessary for my problem modeling

If those who did not want to deepen my point of view on the problem has avoided repeating the same things over and over, by answering questions never asked and forcing me to reiterate it, this topic would have 3-4 pages less!
I honestly think that a problem can also be interpreted with different models that still provide equivalent results ... I don't want to force anyone to answer me, but I was simply asking if my approach was correct from a logical point of view, and it makes no sense to answer this request by bringing up a different approach.
I hope I was clear this time...
“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 P.O. » Wed Aug 31, 2022 3:40 pm

hi Mino21, in the end what matters is whether it works or not, you can experiment, write some code with your idea and see what happens.
P.O.
 
Posts: 1386
Joined: 07 June 2021

Re: X-Cycles questions

Postby StrmCkr » Wed Aug 31, 2022 4:19 pm

Why am I focused on order so much And It's on/off

Our chains on this forum are written in terms of logic gates just like the propogation rules of x-cyles

(true or not true) aka the strong links (A or B)

we have propositions of " off " indicated by the weak links. (which is the effect of B being truth)
The easiest for me to explain a weak link is they are used between full sector changes and represents computer function (Not)
reading as not (true OR not true) (not A or b)

( À and B) and ( not c and d) and (not e and f) and not.... etc.

when read the gates open and it reads as 1 node (A or F)

The way you are writing dosent show that the previous link is effected by the node choice befor it or changes its perception

To being a different style of starting point ie a weak link

They also compltly break down once it hits a string of mutiple same symbols in a row ends up bing unreadable for us and had no meaning.

That's the importance
to communicate a chain to verify its correct usage we need to use the same meaning behind the symbols.

So far your method seems to be working based on markups and the eliminations presented

"
So is my approach equivalent to the "official" one? Or not? I still haven't figured it out! :lol:",
as currently presented you don't use the propogation rules(symbols) correctly and you have ignored all of saying it.

Which is what's aided mutiple pages of reiterations.

That bein said it is plausible you could generate errors eliminations: (based on your construction outline)
but the way it communicates chains we couldn't figure out where it went wrong.

My previous posts indicated a method that easily fixes what your writing and it does match us and follows the accepted method of symbol meaning which indicates potentially its actually working the same as us.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1426
Joined: 05 September 2006

Re: X-Cycles questions

Postby creint » Wed Aug 31, 2022 5:53 pm

StrmCkr:
A Discontinuous 'loop' has forcing chains exclusions (3 truths + 4 links)
Code: Select all
 ------------------------------
    | X  X  X  | . . . |-X -X / |
    | /  X  /  | . . . | . . / |
    | /  -X  /  | . . . | . . x |
    ------------------------------
    | .  .  .  | . . . | . . / |
    | .  .  .  | . . . | . . / |
    | .  .  .  | . . . | . . / |
    ------------------------------
    | /  x  /  | . . . | . . / |
    | /  X  /  | . . . | . . / |
    | x  x  x  | . . . | . . x |
    ------------------------------

A Continues loop has different exclusions (3 truths + 3 links)
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 -x x |
    ------------------------------

Scenario where a shorter chain is first found before the longer loop which excludes more.
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 / / |
    | /  x  /  | . . . | x / / |
    | x  x  x  | . . . | x x x |
    ------------------------------

How I am going to implement this: fill the net, link and color the groups. Without my implementation I don't know if a countradiction like box 3 prevents me from coloring. The advantage is that you don't need recusive loops. But if I need to check every group as startnode for coloring it will be slower, but could be still faster then the recusive implementation.
Prevent self looping and contradictions are the real problems. Don't know if it is possible to have a contradiction inside a loop.

For me a loop = cycle = ring = rank 0 (like sk-loop)
And a chain = rank > 0
Discontinuous Loop is a special version of a forcing chain where all nodes are (a|b) except the end which is not necessary.

Mino21:
If you make your solver with pencil marks and a scan all cycles. Then you can manually verify if everything is working.
Please don't copy SudokuWiki. It is better to generalize some things and implement it better. It's like the UR rule naming on that site and missing a lot of similar exclusions because of those rules.
creint
 
Posts: 393
Joined: 20 January 2018

Re: X-Cycles questions

Postby Mino21 » Wed Aug 31, 2022 6:26 pm

@StrmCkr
As already mentioned, concepts of "alternating strong_link-weak_link", "discontinuity" and "strong links acting as weak links" are completely absent in my approach, and the same goes for "propogation rules" too.
My loop notation is very simple:
- if in the same unit two nodes (single-nodes or group-nodes) includes all the possible candidates of that same unit, then we have a strong link (symbol "=");
- if not, then we have a weak link (symbol "-").
So no "strange" convention and the loop can be written starting from any node.

I can safely recognize that some misunderstandings were caused by my lack of clarity, but it is also true that on the other side there was very little desire and effort to fully understand the logic behind my approach.
“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 eleven » Wed Aug 31, 2022 8:58 pm

Mino, there is a 16-year old definition of a "strong link", which since has been used by all.
So DON'T USE the term "strong link", if you mean something different.
If you call your link different, e.g. Mino-strong-link, you are free to work with it and make things unnecessarily complicated.
eleven
 
Posts: 3099
Joined: 10 February 2008

Re: X-Cycles questions

Postby StrmCkr » Wed Aug 31, 2022 8:59 pm

- if in the same unit two nodes (single-nodes or group-nodes) includes all the possible candidates of that same unit, then we have a strong link (symbol "=");
- if not, then we have a weak link (symbol "-").

i get all of that, however i was just making a point that we see "-" as Not( A or not a) where the small is "a" replaced with the linking component B {as we know a strong link is either ( Mini sector A or Mini sector B : just not which cell specifically, where by the Not A implies B is true)

and we read "=" as (A or not a) where the small is "a" replaced with the linking component B

forming logic gates. {ie network nodes under computer syntax}

r8c123-r8c789=r79c8-r1c8-r1c123=r23c2-r79c2=r8c123
L.R.3: r1c8


reading this would be
R8C123 ( indicates a truth )
not(r8c789 or r79c8)
not(r1c8)
not(r1c123 or r23c2)
not(r79c2 or r8c123)

we hang up on the not( r1c8 ) how does this link to the next not gate: r1c123 ? when r1c8 is off it cannot turn r1c123 on or off.
your code description answered this it builds the other direction from R8C123 in reverse and tags that reversion on moving forward to close the loop

all i did to translate it to was re order your output to put the reverse function where it goes to make the gate readable.

the code functions:Eliminations so far are valid... output is different then how we would normally read it.

if you happen to have a list of test puzzles data base to verify your code along with a DLX code and run the two and see if it pops up any anomalies where it deletes a solution value .

post those and we'll try to help fix the problem.
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 » Wed Aug 31, 2022 11:18 pm

@StrmCkr
Thanks for the explanation, but obviously these are concepts that I should deepen to understand them fully.

When I finish the grouped-x-cycles algorithm I will let you know if it works correctly.



@eleven
Thanks for the idea about name of the new link! =)
“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 Mino21 » Tue Oct 18, 2022 4:49 pm

Hi all, lately I have had some free time and I have finished implementing my own grouped-x-cycles algorithm, and, for what little I have been able to test, it seems to work fine (so my logical approach to the problem was perhaps not just a bunch of nonsense, but evidently it was based on thoughtful reasoning :roll:).

In any case, the reason for this post is to understand how to test my alghorithm in depth. Someone in previous messages wrote that there are puzzle databases on the net, but honestly I don't know where to find them or how to use them precisely to test my code about x-cycles. For example, my solver does not have all the solving techniques, so it could also happen that it does not ever get to the candidates configuration that generates a possible loop.
“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 creint » Tue Oct 18, 2022 5:35 pm

If you make your solver with pencil marks and a scan all cycles. Then you can manually verify if everything is working. If you publish you solver then I can do that for you.
You can also try to generate x-cycles with Hodoku but that implementation is missing cycles.
creint
 
Posts: 393
Joined: 20 January 2018

Re: X-Cycles questions

Postby Mino21 » Tue Oct 18, 2022 9:43 pm

creint wrote:If you make your solver with pencil marks and a scan all cycles. Then you can manually verify if everything is working. If you publish you solver then I can do that for you.

Hi, I don't understand what you mean with "pencil marks", but yes, I can publish my code, give me some time to translate it into english and post 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: X-Cycles questions

Postby StrmCkr » Wed Oct 19, 2022 2:06 am

the small grids we shown on here with x's or 1's
are pencil mark ups
taking a blank grid with samples scenario marked in the pm's loading these into program to test for errors.
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 » Wed Oct 19, 2022 8:00 pm

StrmCkr wrote:the small grids we shown on here with x's or 1's
are pencil mark ups
taking a blank grid with samples scenario marked in the pm's loading these into program to test for errors.

Thanks, i think i understand.


@creint
here my code: https://github.com/Min021/sudoku_solver

Notes:
- windows.h header is only for marginal issue about output on windows console, so if you have a different OS you can safely remove the header and the functions connected to it;
- some of the code is quite old and as soon as I have some time I need to make some optimizations, in any case it seems to work correctly;
- the code for the moment has no comments, as soon as I have time I will add them;
- I hope that english translation and use of sudoku terms are at least acceptable;
- if you find any bugs let me know.
“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 creint » Thu Oct 20, 2022 7:02 pm

I have tested some pencil mark scenarios. Grouped X cycles seems to work.
creint
 
Posts: 393
Joined: 20 January 2018

Re: X-Cycles questions

Postby Mino21 » Thu Oct 20, 2022 11:09 pm

OK, thanks!
“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

Previous

Return to Help with puzzles and solving techniques