Solve Sudoku - Coloring Technique with Examples

Get out the Crayola! Try and stay within the lines.

Despite the childish name, this technique is VERY powerful.

This technique is called by a few names. Amongst them are simple coloring, multi-coloring, colors. I prefer just coloring. I also prefer to extend this idea to include any technique that is performed on just one type of candidate - or just one number, if you prefer.

Xwings, Swordfish, Jellyfish, Finned Xwings, Finned Swordfish, Locked Candidates, and many other techniques involving just one type of candidate can be placed under the tag, coloring.

Simple Coloring Example


First Coloring Example

In this example, all the possible locations for 3's are highlighted by some sort of color. In column g, the 3's are limited to two locations, g4 and g8. If g8=3, then clearly e8 cannot be 3. If however g4=3, then h5<>3, thus e5=3. In this case, again e8 cannot be 3. The term, coloring is derived from the common illustration of this technique using colors to deduce the possible eliminations. In a proof, I would present this idea as:

  • fc on 3's: g8 == g4 -- h5 == e5 forbids e8=3
Whoa! What did I just write?!

Here is a brief key to terminology above:
fc
forbidding chain
A == B
A OR B, equivalent to A Union B
A -- B
(not A) OR (not B), equivalent to A forbids B
g8
shorthand for g8=number, in this case: g8=3
The reason that I introduce forbidding chains at this time is quite simple:

All the sudoku solving techniques, except perhaps those involving uniqueness of solution, fit 
under one umbrella,  Forbidding Chains and Forbidding Matrices.

Blog pages currently under construction will discuss forbidding chains in some detail.

More Complex Coloring


Second Coloring Example

This example is from the same puzzle as the first, after preforming the previously prescribed exclusion. The logic is colorfully highlighted, but here is an explanation:

  • If c6=3, then clearly d6 cannot be 3
  • Since 3's in column c are limited to c2,c6 - If c6<>3 then c2=3
  • If c2=3, then without even looking at the grid, e2 cannot be 3
  • Since 3's in column e are limited to e2,e4,e5 - If e2<>3 then 3's must exist within e45
  • Either one of e4, e5 being 3 prevents d6 from being 3
Conclude therefor that in every event, d6=3 is impossible and therefor forbidden. In a proof, this step could look like this:
  • fc on 3's: c6 == c2 -- e2 == e45 forbids d6=3
Again, do not be disheartened by the forbidding chain language. It is not required to understand this idea - it will help though, both in clear communication and thought once fully explained.

Technique names are almost as much fun as the puzzles. The example above is a Finned X wing. However, if one generalizes the idea of coloring, then learning each specific technique involving just one number is superfluous. The elimination above is missed by programs such as the solver in Simple Sudoku merely because of the grouping of e45=3. In my humble opinion, such a grouping adds little complexity.

Coloring Example From Tough Puzzle of 12/23/06


Third Coloring Example

This example is one step deeper then the previous two. Here we have:

  • 1's in box e8 limited to two locations: d8,f9
  • 1's in column g limited to two locations: g9,g3
  • 1's in row 1 limited to two locations:i1,a1
  • Clearly: d8=1 or f9=1
  • If f9=1, then g9<>1 thus g3=1
  • If g3=1, then i1<>1 thus a1=1
  • Thus, sans further grid examination, we know that a8<>1
This step could be written as:
 fc on 1's: d8 == f9 -- g9 == g3 -- i1 == a1 forbids a8=1

Interesting coloring example


Complex Coloring Example

In this example, think of the blue cell at c6 as the starting point.

  • If c6=1, then c3<>1
  • If c6<>1, then both a4=1 and h6=1
  • If a4=1 and h6=1, then neither a8=1 nor h8=1
  • If neither a8=1 nor h8=1, then e8=1
  • If e8=1, then e2<>1
  • If e2<>1, then d3=1
  • Conclude: If c6=1, then c3<>1. If c6<>1, then still c3<>1. Thus, c3=1 is not possible
This complex coloring idea could be presented in a proof as:
fc on 1's: d3 == e2 -- e8 =={fc on 1's: c6 == a4 -- a8 == h8 -- h6 == c6} forbids c3=1
 Do not be discouraged - most coloring that is needed to solve puzzles is not nearly
as difficult. Nevertheless, understanding an idea such as this one is certainly needed
to tame the monster puzzles without guessing.

Many solvers would use multi-coloring for the elimination above. In most cases, two colors is quite enough. In fact, one color is enough for the elimination above. Thinking clearly about coloring involves thoughtful partioning of native strong sets.

 Native strong set: Any grouping of puzzle possibilities that contains
at least one item that  must be true.

Diabolic Coloring Example


Diabolic coloring on 5's

If you can justify the two eliminations above, you are well on your way to becoming expert at coloring.

 fc on 5's: e7== f8 -- ai8,e7 =={swordfish on 5's at a237,e23,i23} forbids bg7=5

Symmetrical presentation


Diabolic coloring on 5's alternate conditional swordfish

The following puzzle links are provided for practice in coloring:

19 Comments
Indicate which comments you would like to be able to see
Steve  From Ohio    Supporting Member
Check out my page
Hopefully, all of you had a wonderful !
Steve  From Ohio    Supporting Member
Check out my page
With some regularity, proofs for the tough puzzles are posted on the tough puzzle page.

Sadly, I tend to be grandiose and disparage some of the less difficult puzzles. Please forbear my arrogance.

I searched my portfolio of such proofs, and have compiled the following list of:
Tough sudoku puzzles solved with COLORING and/or locked sets, ntuples.

All in 2006

June 31
July 18
July 24
August 30
August 31
September 13 coloring only
September 15
September 23
September 25
October 11
October 12 coloring only
October 27
November 09

One can access these puzzles by clicking on Archives, then the puzzle date, then Tough. For each of these, if you cannot find the coloring elimination, a proof detailing the coloring elimination(s) exists on that page.

Let me know if a list such as this is helpful!
Susan  From so cal
I just made it through the first example - is there a typo in the proof? the text refers to 'e8 cannot be 3', but the proof says 'forbids 'g8=3' (i think s/b 'forbids e8=3').

Thanks for the great explanations, though - very enlightening!
Soozn  From NZ
This is totally awesome. I love learning the techniques. Thanks a million.
Steve  From Ohio    Supporting Member
Check out my page
Thanks Susan!
You are correct, I did commit one of my frequent typo's. The page will be corrected.
Steve  From Ohio    Supporting Member
Check out my page
The tough puzzle of March 16, 2006 is one of my all time favorite examples of coloring.
The proof on that page was written in my sudoku infancy - and not as well presented as later proofs. I think the suggestions for proof discussed on that day on that page helped significantly to open my eyes on how to solve these puzzles well - especially the help from Andrei.
pChu  From Hong Kong
Don’t quite follow you terminology.

For g8 == g4 -- h5 == e5
Does it mean (g8 == g4) -- (h5 == e5)
or g8 == (g4 -- h5) == e5
or something else?

Any precedence for the operators == and --
Steve  From Ohio    Supporting Member
Check out my page
Hi pChu!
It means:
g8 == g4, g4 -- h5, h5 == e5.
No precedence is required.
Note: -- links are provided as a courtesy. They are obvious without grid consideration. The list:
{g8,g4}, {h5,e5} is all that is really required.
Steve  From Ohio    Supporting Member
Check out my page
Eventually, the blog will give a full explanation of forbidding chains.
pChu  From Hong Kong
Thank you.
It makes sense now.
jyrki  From Finland
Thank you, Steve!

I had been somewhat discouraged from the study
of fc:s - until now. Coloring (together with practice) will undoubtedly make spotting these chains 'easier'. May be I should say 'possible'?

Hope you all enjoyed your Xmas. Gotta go and install the broadband! Hopefully I can play from home more easily in the future. Happy New Year to all in case we won't meet here b4 2007.
Steve  From Ohio    Supporting Member
Check out my page
I wonder which calender I consulted when I wrote June 31?
Susan  From New York
Steve, is there a way to put use Simple Sudoku to put in one's own puzzle so that you can color them? I am able to put in numbers, but then can't eliminate or color.
Steve  From Ohio    Supporting Member
Check out my page
Hi Susan!
Yes - I do it all the time.
After entering in the numbers, under the file heading, you should see 'start'. After 'start', you can now manipulate/solve the puzzle as you wish. You can also save the puzzle. I do that all the time. Using Simple Sudoku, I have a sizable archive of not only puzzles, but also of puzzle states as I solved them. Without such information, making this blog would be much more difficult.
Susan  From New York
Thanks Steve,
I knew I must be missing something.
kateblu  From Madison WI    Supporting Member
Check out my page
Steve, I am still working my way through this stuff - it provides a rationale for some of my intuitions/guesses. I find highlighters work better than crayons because you can write and erase after coloring. Thanks for taking the time to write all this out.
Soozn  From NZ
What is 'simple sudoku' that you refer to?? I thought I would have to print the puzzle out and then colour it which seemed a little tedious. Is there a better way to learn this?
Steve  From Ohio    Supporting Member
Check out my page
Try this link: (for Simple Sudoku)
http://angusj.com/sudoku/

If you paste the link, you may have to remove spaces - spaces seem to creep into links posted in these comments....
elsie  From strath
Steve, you rock!
Some of these things I have worked out through your proofs posted throughout last year, but it is awesome that you've taken the time to put it in a blog. Thankyou.
Please Log in to post a comment.

Not a member? Joining is quick and free. As a member you get heaps of benefits.

Join Now Login