Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

What kind of coloring is this?

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku
View previous topic :: View next topic  
Author Message
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Wed Sep 28, 2005 8:25 pm    Post subject: What kind of coloring is this? Reply with quote

I've been using a technique that's new to me, an advanced extension of coloring, but from what I've been reading I have yet to find a name for this method. I've been calling it multicoloring on the assumption that someone would have to have found this technique already, and it's clearly not the same as ultracoloring (which is also called supercoloring, is it not?).

Basically I was pondering coloring and thinking that I could extend conjugates into the 3rd dimension (or rather the 4th, when you consider the box constraint in sudoku). Instead of coloring for a single digit I'd color them all. Then of course I'd compute full transitivity (which my simple coloring algorithm doesn't even do, settling instead for finding just basic paired weak links) because the number of colors would be higher. With this method I should be able to make inferences such as: Either (1,5)=1 or (4,5)=7; therefore (1,5)<>7 and (4,5)<>1.

After finally implementing this in my solver I found that it's most common for a color to be eliminated rather than for conjugates to eliminate an intersecting cell. This method seems to solve about 2/3 to 3/4 of the puzzles that my solver--which does not implement forcing chains or Nishio--had deemed unsolvable with its previous set of methods. As for the remaining boards, usually Nishio alone won't solve them, but more advanced methods of the trial and error set will. (Ultracoloring may also work.)

The nice thing about this method is that it can be done by hand. The main thing is that you need to be sure to place all conjugates and find the implications for each. Usually a contradiction will jump right out at you, but sometimes it requires some tricks with transitivity. However this technique seems to be limited to boards where a lot of conjugates exist, either in houses or in cell candidates. Because it operates best where cells with only 2 candidates exist, I also realized this is a superset of forcing chains.

I've also finally realized that the one thing that keeps fishy cycles from being a form of coloring is a certain kind of transitive subset. That is, if you use coloring and deduce that for each of a set of colors, they imply all the others in that set but nothing else, you can consider them to be the same color, and likewise all their conjugates are the same. This rule I haven't yet implemented, and I'm wondering if it will further improve the results of this 4D coloring algorithm.

I'm sure something like this has to have been done before, but what is it called? From what I've read on multicoloring, that seems to be something else.
Back to top
View user's profile Send private message
AMcK

Joined: 07 Apr 2005
Posts: 89
:
Location: Cambridge

Items
PostPosted: Thu Sep 29, 2005 12:48 pm    Post subject: Re: What kind of coloring is this? Reply with quote

Lummox JR wrote:
I've been using a technique that's new to me, an advanced extension of coloring, but from what I've been reading I have yet to find a name for this method.

Sounds like you're independently following the same route that Nick70 and I travelled earlier in the year. I used the term "multicolouring" for the pairing of conjugates across all possibles and Nick70 introduced the term "advanced coloring" when he added colour contradictons. I then used the term "ultracolouring" for the transitive analysis of all implications together with positive/negative verities/veracities, which brings the matrix analysis technique closely analgous to Mad Overlord's "tabling"
I agree with you that advanced coloring is the best form of colouring suitable for manual use. The complex implication chains of ultracoloring are sometimes hard to understand - even when the computer explains them - and are mostly intractable for manual use.
Keep searching - I'm sure there's more to be discovered
Andrew
Back to top
View user's profile Send private message Send e-mail
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Sun Oct 02, 2005 2:50 am    Post subject: Reply with quote

On the player's forum Jeff seems to be of the opinion that this should be called advanced coloring, so I guess we'll go with that.

Over there I've also been honing the technique. If you use Nick70's method of just marking exclusions and propagating using the rule ex(x,y) + ex(y^1,z) -> ex(x,z), then you can make another interesting leap which also applies to simple coloring. If colors a and A are conjugates, b and B, and so on, and a excludes b (a!b), then you can say that since a and b cannot both be true, at least one of A or B must be true. Any placement which intersects A and B is invalid.

Jeff posted one grid where using advanced coloring I actually found two cases that could have been handled this way with simple coloring. Observe this layout in the 7's:
Code:
. . .|. . .|. . .
a . .|. A .|. . .
. * *|b * .|. . .
-----------------
* * *|.*. .|. * .
* * .|B . .|. * .
* * *|. * .|. * .
-----------------
* * *|. . .|. . .
. . .|. . .|. . .
. . .|. . .|. . .

Colors A and b are mutually exclusive. It needn't be the case that one of them is true, but they can't both be true, so either a or B or both is true. Cell (1,5) cannot be a 7.

I'm going to have to update my solver with this new tactic. It's truly fascinating.
Back to top
View user's profile Send private message
DHallman

Joined: 09 Aug 2005
Posts: 24
:
Location: Inglewood, CA 90302 USA

Items
PostPosted: Mon Oct 03, 2005 1:21 am    Post subject: colors Reply with quote

Lummox JR wrote:
If colors a and A are conjugates, b and B, and so on, and a excludes b (a!b), then you can say that since a and b cannot both be true, at least one of A or B must be true. Any placement which intersects A and B is invalid.


WOW Surprised

That makes a lot of puzzles Simpler. Very Happy
Back to top
View user's profile Send private message Send e-mail
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Mon Oct 03, 2005 5:15 am    Post subject: Reply with quote

Indeed this does simplify many puzzles, and it makes coloring dominant over fishy cycles. Nick70's concept of using exclusions is listed more thoroughly here, but he never made mention of using the conjugates of mutually exclusive colors. I'm wondering now if I'm the first person to have stumbled onto this or if someone else had picked it up before now.
Back to top
View user's profile Send private message
Scott H

Joined: 29 Jul 2005
Posts: 2
:
Location: Oregon, USA

Items
PostPosted: Mon Oct 03, 2005 8:53 am    Post subject: Reply with quote

Lummox JR wrote:

Jeff posted one grid where using advanced coloring I actually found two cases that could have been handled this way with simple coloring. Observe this layout in the 7's:
Code:
. . .|. . .|. . .
a . .|. A .|. . .
. * *|b * .|. . .
-----------------
* * *|.*. .|. * .
* * .|B . .|. * .
* * *|. * .|. * .
-----------------
* * *|. . .|. . .
. . .|. . .|. . .
. . .|. . .|. . .

Colors A and b are mutually exclusive. It needn't be the case that one of them is true, but they can't both be true, so either a or B or both is true. Cell (1,5) cannot be a 7.

I'm going to have to update my solver with this new tactic. It's truly fascinating.

This is a "Turbot fish" pattern. I think Nick70 coined the term and introduced the pattern (apologies if my attribution is wrong). A forum search will give more background.
Back to top
View user's profile Send private message
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Mon Oct 03, 2005 7:29 pm    Post subject: Reply with quote

Yes, it can also be found by turbot fish. However turbot fish is really just a subset of coloring when using this exclusion rule, just as fishy cycles is. I don't even bother with it.

Interestingly, aside from coloring being a superset of fishy cycles, I've also realized that it supercedes Nishio as well. Andrew appeared to be onto that track when he realized that supercoloring covers Nishio, but in fact simple coloring using this exclusion rule will work as well.

I really think this is the first time that simple coloring has been extended so far, in that it uses some of the rules of supercoloring--albeit differently--for a single color. And with coloring extended this far, it catches turbot fish and fishy cycles easily. You don't have to assign dummy colors for non-conjugates, although this may be a good way to handle it in a program.

And I found an answer to my question in my previous post: The "conjugates of mutually exclusive colors" rule was already in used, but formalized in a very different way, in supercoloring. Once I realized that, I realized colors were only being assigned to non-conjugate choices as a filler for applying this rule; in other words, the advanced coloring I posted in this thread is identical to supercoloring; it just uses a slightly different route to reach its conclusions. Previously, I don't think anybody ever said "Any placement that intersects the conjugates of two mutually exclusive choices must be false." With Nick's observation rephrased in this way, though, it's clear that it applies very well to simple coloring, so much so that I think the use of this method should be called "complete simple coloring".
Back to top
View user's profile Send private message
Lummox JR

Joined: 07 Sep 2005
Posts: 202
:

Items
PostPosted: Thu Oct 06, 2005 2:40 am    Post subject: Reply with quote

Well, another charming theory bites the dust. Supercoloring may still supercede Nishio, but complete simple coloring does not. The proof is here:
Code:
. 5 .|2 7 .|. . .
2 8 .|. . 1|. . 5
. . 7|. 3 .|. . .
-----------------
8 . .|. . .|9 . .
. . 2|. . .|4 . .
. 3 9|. 4 8|. . 7
-----------------
. . 8|. . 2|5 . 9
. 9 .|1 . .|. 6 3
. . .|. . .|. 8 .

A point is reached where you can do an XYZ-wing to remove 6 from (1,3), and coloring on the 4's removes 4 at (4,9), then you can find a lot of possibilities via coloring on the 6's. But at that point, complete simple coloring is exhausted while Nishio will eliminate 1 at (7,3). Eh.
Back to top
View user's profile Send private message
rkral

Joined: 21 Oct 2005
Posts: 233
:

Items
PostPosted: Sun Jan 01, 2006 12:03 pm    Post subject: Reply with quote

Lummox JR wrote:
Code:

. 5 .|2 7 .|. . .
2 8 .|. . 1|. . 5
. . 7|. 3 .|. . .
-----------------
8 . .|. . .|9 . .
. . 2|. . .|4 . .
. 3 9|. 4 8|. . 7
-----------------
. . 8|. . 2|5 . 9
. 9 .|1 . .|. 6 3
. . .|. . .|. 8 .

A point is reached where you can do an XYZ-wing to remove 6 from (1,3), and coloring on the 4's removes 4 at (4,9), then you can find a lot of possibilities via coloring on the 6's. But at that point, complete simple coloring is exhausted while Nishio will eliminate 1 at (7,3). Eh.

"Complete simple coloring" could certainly be redefined to pick up that elimination. At the point you describe, the 1s coloring looks like ...
Code:

 1 . 1 | . . . | . 1 1
 . . . | . . . | . . .
 1 1 . | . . . | A 1 .
 - - - + - - - + - - -
 . 1 1 | . . . | . . A
 . . . | . . . | . . .
 A . . | . . . | a . .
 - - - + - - - + - - -
 1 1 . | . . . | . B .
 . . . | . . . | . . .
 1 . 1 | . . . | . . b

Since A true excludes b true, when A is true B must also be true. Thus if A were true, all 1s candidates in column 2 would be eliminated. Therefore, A must be false.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron