My Photo
Blog powered by TypePad

May 2008

Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Recent Comments

« Where do Sudoku boards come from? | Main | X-Wings »

August 18, 2005

Two and Three in a Bed

So far, I've discussed rules that take place within a single group — a row, column, or box. All of these rules can be summarized as follows:

  • If N cells together contain exactly N values, remove those values from the other cells of the group
  • If N values can only appear in exactly N calls, remove the other values from those cells

When N is 1, the first rule is the rule of elimination; when N is 2, it's the rule of pairs, when N is three it's the rule of (interlocking) triples, etc.

When N is 1, the second rule is the rule of uniqueness. I don‘t have a good name for the second rule when N is larger than 1. Any suggestions? (Someone suggested biniques.)

Now we are ready to look at rules that look outside a single group, and deal with the interactions between groups. In particular, today's rule deals with the interaction between a box and the rows and columns that intersect it.

Consider the lower-right box (box 9) in the grid below. I've outlined the right part of the box in red. Notice that the only places that can contain a 2 are along the right side of the box. While we don‘t know which cell of the box actually contains the 2, we can be certain that it will be one of the cells in column 9. So, we can remove 2's from the rest of column 9 (the blue rectangle).

Similarly, the only places in cell 3 that can hold a 7 are in column 7 (inside the green oval). So, we can remove the rest of the 7's in that column (inside the orange rectangle).

Bed1

Some Sudoku enthusiasts refer to this technique as “2 in a bed“ and “3 in a bed“ (for the case where there are three possible cells for a value within a box, all in the same row or column).

The rule can be reversed: if there are only two or three places in a row (or column) that can contain a value, and those places all live inside the same box, the value may be removed from the rest of the box.

Here‘s an example of a “reverse bed”:

Bed2

In row 5 (highlighted in red), there are two cells (circled) that can hold a 3, and both happen to be in box 6. This allows us to remove the 3 from the rest of box 6 — cells (7,6) and (9,6), circled in blue.

Here are some puzzles that use “beds“ and “reverse beds”:

Sudoku20050724224656clue_1

Sudoku20050730124427clue

Sudoku20050730124253clue

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/488073/3022787

Listed below are links to weblogs that reference Two and Three in a Bed:

Comments

In "Here‘s an example of a “reverse bed”:" (with the red line across row 5), why can't (2,5) hold a 3?

Hi John - great observation! (2, 5) can't hold a 3 due to a (regular) "bed" in box 1. The 3's in boxes 2 and 7 limit the places in box 1 where a 3 can appear. In fact, the 3 in box 1 can only appear in column 2. This eliminates 3 as a candidate for cell (2, 5). -Dan

Hi Dan,
What you are calling uniqueness, I had been thinking of as an exclusion principle, similar to the Pauli Exclusion Principle that says that two electron orbiting an atom cannot have the same quantum state. That works better with plural forms, and doesn't damage the language as much as biniques!
-Chuck

I have programmed a sudoku solver and have noticed that N-elimination and N-uniqueness (where N-uniqueness is the same as (9-N)-elimination and therefore one only needs to loop N=1..4) together with (reverse) beds is enough to solve all puzzles. Yet I wonder whether it is easy to prove this analytically.

Mmm, I've found a counterexample...

Hi Erik -

I'm not surprised you've found a counterexample, since I tend to doubt that such a small set of rules can solve every puzzle. I don't know how you would prove that a given set of rules solves every puzzle, but it's not hard to prove the opposite. Add another rule to your solver (say, X-Wings) and only invoke it when all the other rules have failed. Then try the solver on random grids. Eventually you may find a grid where the first set of rules don't help any more, but the new rule does give you some information. Then, if the solver is able to continue from there and eventually solves the puzzle you will have proved that the first set of rules are _not_ sufficient.

This could take a bit of computing time, but on a modern PC I expect you would find such a grid in no more than a few hours of computation.

Wow some great information, I think I am addicted to So Du Ku. I understand your rules you have posted although I did not know they had such thoughtful names. All I know is that with practice I am getting better, I am fairly new to the So du ku. It just poped up in the local papers here in Detroit MI this summer. My co-worker and I have issues with the puzzles, I swear he cheats (joking only) he can just solve them particularly fast in comparison to me, so we are in constant so du ku battle at break and lunch. Great way to keep the brain working

I am trying to find out what are the minimum number of seed numbers in a Sudoku puzzle for a unique solution.

I developed a technique of solving any Sudoku puzzle I have come across and now wonder if there is a minimum number of seed numbers required for a unique solution.

I thought I would share my general solution technique. Comments are welcome.

http://www.photocrazy.com/SolvingSudoku.pdf

Also, I just started my own blog at http://www.photocrazy.com/wordpress

Dan said:
When N is 1, the second rule is the rule of uniqueness. I don‘t have a good name for the second rule when N is larger than 1. Any suggestions? (Someone suggested biniques.)
***
Dilemma? Trilemma? N-Lemma?

Maybe that's too melodramatic.

Dichotomy? Trichotomy? N-chotomy?

I think I like that better.

Bill

moi j arrive pa le lava l1
;)

I enjoy your site very much! THANK YOU
;)

I glad too see this interest site, I tell my friends about it! They like sites like that: site

Beautiful site!

I can't be bothered with anything lately, but that's how it is. Nothing seems important, but what can I say? Shrug.

Very cool!

I don't see anything about what I call INDEXES. This is a super fast way of checking candidates for a row or column. (We'll use a row here.)
Create an INDEX - a list of candidates or possibles for the row.
For each cell in the row, match the index list against the corresponding column plus the surrounding 3x3 box. If you get a match on all but one of the index, you put that number in the cell. If you are two short, these are your pencil markings. Similarly for three or more.
Once you have written a number in, go back and cross that number off your index, and run the row again.
This is a lot faster than checking the row for each individual number separately.
If you have a question,write me at obnoxiousmonk@yahoo.com

kjlvchgb wbtp uivl afgj nlezbi ltrbyih sognb

qxikv sqli sngtq gxhwj rudsq eudwy ehcotn http://www.bjdkzms.noat.com

Post a comment

If you have a TypeKey or TypePad account, please Sign In