simple colouring

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

simple colouring

Postby speter » Sat Jan 27, 2018 2:00 am

G'Day Folks,

I was using Andrew Stuart's online solver http://www.sudokuwiki.org/sudoku.htm to study a problem I was having and came across something unexpected (and totally unrelated to my problem). :)

This is the puzzle:
Code: Select all
459 89 1 3 78 6 578 479 2
34 58 7 1 2 9 6 34 58
69 2 36 47 5 48 378 1 89
2 4 39 5 89 1 38 6 7
36 1 5 47 678 48 9 2 38
8 7 69 2 69 3 4 5 1
57 3 4 9 1 2 57 8 6
1 59 8 6 4 7 2 39 359
79 6 2 8 3 5 1 79 4


The solver finds a candidate discard at r1c8 as shown in the image below:
Image

Can this be extended to also discard r3c1 & r8c9; since r1c8 is part of a chain and these candidates would have the same colour as r1c8!?
Or would discarding r1c8 simply eliminate that 'arm' of the other chain!?

cheers
Steve
speter
 
Posts: 19
Joined: 30 March 2017
Location: Bomaderry, NSW, Australia

Re: simple colouring

Postby Leren » Sat Jan 27, 2018 7:07 am

speter wrote : Can this be extended to also discard r3c1 & r8c9; since r1c8 is part of a chain and these candidates would have the same colour as r1c8!?

In theory you are correct but the point is somewhat moot. Eliminating 9 in r1c8 leaves 9 in r3c9 as a hidden single in Box 3, so of course you can then eliminate any 9's it sees, as well as 8 in r3c9.

The colouring move can also be thought of as an X Chain, Turbot Fish, a Kite or an Empty Rectangle, but I don't think Andrew has these last three moves in his solver.

Leren
Leren
 
Posts: 5123
Joined: 03 June 2012

Re: simple colouring

Postby 200e200w » Sat Jan 27, 2018 7:30 am

The colouring move can also be thought of as an X Chain, Turbot Fish, a Kite or an Empty Rectangle, but I don't think Andrew has these last three moves in his solver.

Andrew has X-Chains (under the name 'X-Cycles', and including these with Grouped nodes) and Empty Rectangles. Turbot Fish, Kite and Empty Rectangle are all cases of X-Chains.

200e200w
200e200w
 
Posts: 208
Joined: 20 January 2018

Re: simple colouring

Postby SpAce » Sat Jan 27, 2018 8:13 am

200e200w wrote:Andrew has X-Chains (under the name 'X-Cycles', and including these with Grouped nodes) and Empty Rectangles. Turbot Fish, Kite and Empty Rectangle are all cases of X-Chains.


Actually he doesn't have true X-Chains at all. X-Cycles only cover the Nice Loop variants of X-Chains. It means, for example, that multiple discontinuous X-Cycles are needed to get all potential Skyscraper eliminations (which you would get with a single X-Chain move). The same is true for generic AICs as well (Nice Loops only). Only his XY-Chains and some named patterns work like real chains.
-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: simple colouring

Postby speter » Sat Jan 27, 2018 10:39 am

Thanks very much, everyone.

I've updated my program's (single chain / simple colouring) rule 4 so it would remove r1c8, r3c1 & r9c8 and set r3c9=9. :)
speter
 
Posts: 19
Joined: 30 March 2017
Location: Bomaderry, NSW, Australia

Re: simple colouring

Postby SpAce » Sat Jan 27, 2018 3:40 pm

speter wrote:Thanks very much, everyone.

I've updated my program's (single chain / simple colouring) rule 4 so it would remove r1c8, r3c1 & r9c8 and set r3c9=9. :)


Why would you do that? Only the first elimination is valid for the one and only Simple Coloring move you have available here. The others happen as a direct result of it (through a hidden single move). You can no longer call your move standard Simple Coloring if you mix other effects into it. The same is true if you view it as an X-Chain (a 2-String Kite in this case), which I think is preferable anyway. Only the first elimination (r1c8) is part of the move, and everything else happens after it's actually performed.

If you want to set r3c9=9 in one move, you could use a Discontinuous X-Cycle:

(9)r3c9 = r8c9 - r8c2 = r1c2 - r1c8 = (9)r3c9 => 9r3c9

...which *then* eliminates 9 from r1c8 and r8c9.

Or, if you want to eliminate 9s from both r1c8 and r3c1 in one move, you could use a Skyscraper (another named X-Chain pattern) which is not available in Andrew's solver:

(9)r1c1 = r8c2 - r8c9 = (9)r3c2 => -9 r1c8, r3c1

...either of which *then* sets r3c9=9 through a Hidden Single move.

In this case, the end result is the same through any of these moves (Simple Coloring, X-Chain::2-String Kite, X-Chain::Skyscraper, either kind of Discontinuous X-Cycle).

Personally I'd discard Simple Coloring and discontinuous X-Cycles altogether. X-Chains and their truly looping variants (== continuous X-Cycles) are all you really need to implement for your program, as far as these kinds of single-digit techniques go. Everything else is just unnecessary and confusing clutter.

PS. If you're really interested in a more powerful single-digit coloring technique, try X-Colors:

http://www.sudoku9981.com/sudoku-solving/x-colors.php

Just don't call those moves Simple Coloring :)
-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: simple colouring

Postby speter » Sat Jan 27, 2018 11:58 pm

OK, point taken. ;)

Thanks again.
speter
 
Posts: 19
Joined: 30 March 2017
Location: Bomaderry, NSW, Australia

Re: simple colouring

Postby Leren » Sun Jan 28, 2018 2:51 am

My solver and Hodoku both had the same solution. After some intersections and an X Wing in 3's to get to the published position, one move solves the puzzle : A Skyscraper in 9's => - 9 r1c8, r8c9; stte

I'm pretty sure Andrew doesn't do Skyscrapers. No idea why. Leren

<edit> Fixed solution, Leren
Last edited by Leren on Sun Jan 28, 2018 11:48 pm, edited 3 times in total.
Leren
 
Posts: 5123
Joined: 03 June 2012

Re: simple colouring

Postby 200e200w » Sun Jan 28, 2018 8:27 am

I'm pretty sure Andrew doesn't do Skyscrapers. No idea why.

I think Andrew will not add Skyscrapers because of 2 reasons:
First, a Skyscraper is a case of X-Chain (X-Cycle).
Second, a Skyscraper is a case of Multi-Coloring (which has been deprecated in Andrew's solver).

200e200w
200e200w
 
Posts: 208
Joined: 20 January 2018

Re: simple colouring

Postby SpAce » Sun Jan 28, 2018 9:08 pm

200e200w wrote:I think Andrew will not add Skyscrapers because of 2 reasons:
First, a Skyscraper is a case of X-Chain (X-Cycle).


You're right about the first part -- that Skyscraper is an X-Chain -- but X-Chains and X-Cycles are not the same thing. Andrew's solver only has X-Cycles, hence no Skyscraper functionality (with or without that name). It must use (at least) two discontinuous X-Cycle moves to get all possible eliminations when a Skyscraper-like X-Chain would need just one. Similarly its so called AICs only work as Nice Loops, not as chains, so it may need more such moves than say Hodoku which has true AICs. Only XY-Chains work like real chains in Andrew's solver.
-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: simple colouring

Postby 200e200w » Sun Jan 28, 2018 9:43 pm

...X-Chains and X-Cycles are not the same thing. Andrew's solver only has X-Cycles, hence no Skyscraper functionality (with or without that name). It must use (at least) two discontinuous X-Cycle moves to get all possible eliminations when a Skyscraper-like X-Chain would need just one. Similarly its so called AICs only work as Nice Loops, not as chains, so it may need more such moves than say Hodoku which has true AICs. Only XY-Chains work like real chains in Andrew's solver.


I agree with everything you wrote, SpAce. X-Cycles are like X-Chains, but they only include their Nice Loop variant. His AIC's also include only its Nice Loop variant. Only XY-Chains (which are the case of an AIC) use the full power of an AIC.

200e200w
200e200w
 
Posts: 208
Joined: 20 January 2018

Re: simple colouring

Postby SpAce » Sun Jan 28, 2018 11:14 pm

200e200w wrote:X-Cycles are like X-Chains, but they only include their Nice Loop variant. His AIC's also include only its Nice Loop variant. Only XY-Chains (which are the case of an AIC) use the full power of an AIC.


Exactly! That's why Andrew's site is not necessarily the best place to start studying chaining concepts. I know because I did start there, and it took me a while to get over the confusion it caused. Then again, a bit of initial confusion is often good for deeper learning :) (And to be fair, his site has good stuff too, and I like the online solver despite its shortcomings.)
-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


Return to Help with puzzles and solving techniques