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   

Block/block interaction

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

Joined: 02 Sep 2005
Posts: 27
:

Items
PostPosted: Fri Nov 04, 2005 2:13 pm    Post subject: Block/block interaction Reply with quote

The technique block/block interaction essentially says:
If there are two blocks which have the same candidate
in two, shared columns, but not in the 3rd column, then
in a 3rd block this candidate can be removed for those
shared columns.
(The technique is also valid when columns are replaced by rows.)

But there is also another technique saying that if a block (A) has
a candidate in one of its columns and this candidate do
not exist in that column for the other blocks, then the same candidate
in other columns of block A can be removed.

If this latter technique is used, it will always find the candidates to
remove by the block/block interaction technique, because:
1. In block/block interaction, the third column of the blocks having
the common candidate, does not have the candidate (that was in the
prerequisite).
2. In the 3rd column of the 3rd block, this candidate must exist (there
is no other alternative.)

Provided that this latter technique is used (name?) then the
block/block interaction technique is really superflous.
It is not the other way around, the latter technique is not superflous
if block/block interaction is used.

It would be nice if this relationsship between the techniques could be
reflected in the descriptions of solving techniques.

Regards
Bo
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Fri Nov 04, 2005 2:47 pm    Post subject: Reply with quote

The 2 techniques you describe are 2 complementary forms of the same technique. There are other techniques that have complementary counterparts, like subset.

I think the best common name would be: Line-Box Interactions.

The definition could be: When all candidates for a given digit within a house are confined to the intersection with another house, all candidates for that digit can be eliminated from the intersecting house, except those that lie within the intersection.

Ruud.
Back to top
View user's profile Send private message Visit poster's website
Bob Hanson

Joined: 05 Oct 2005
Posts: 187
:
Location: St. Olaf College

Items
PostPosted: Sat Nov 05, 2005 3:17 am    Post subject: Reply with quote

Yes, I agree, these are two aspects of the same thing, and they are both accounted for with no special treatment by "hypothesis and proof":

Code:
Case I

[ ----X1----]  [ -----X3-----] [ ----------]
[ ----------]  [ -----X4-----] [ ----X5----]
[ ----------]  [ -----X6-----] [ ----X7----]

Hypothesis: X3 can be eliminated.

1. X3 can be eliminated if X1 is TRUE
2. X1 must be TRUE
3. Therefore X3 may be eliminated


Case 2

[ ----X1----]  [ -----X3-----] [ ----X8----]
[ ----X2----]  [ -----X4-----] [ ----X5----]
[ ----------]  [ -----X6-----] [ ----------]

Hypothesis: X3 can be eliminated.

1. X3 can be eliminated if X6 is TRUE
2. X6 must be TRUE
3. Therefore X3 may be eliminated


It's really no more than that. Here the Xs stand for "any number of occurances of a certain candidate" in a given row (or column, of course)
of a block.
_________________
Bob Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bob Hanson

Joined: 05 Oct 2005
Posts: 187
:
Location: St. Olaf College

Items
PostPosted: Sat Nov 05, 2005 4:09 am    Post subject: Reply with quote

By the way, the forward logic for this would be:

Code:

Case I

[ ----X1----]  [ -----X3-----] [ ----------]
[ ----------]  [ -----X4-----] [ ----X5----]
[ ----------]  [ -----X6-----] [ ----X7----]

Hypothesis: X3 is not eliminated.

1. If X3 is not eliminated, then X1 must be eliminated
2. X1 canot be eliminated.
3. Therefore the statement "X3 is not eliminated" is false, and X3 must be eliminated.


Case 2

[ ----X1----]  [ -----X3-----] [ ----X8----]
[ ----X2----]  [ -----X4-----] [ ----X5----]
[ ----------]  [ -----X6-----] [ ----------]

Hypothesis: X3 is not eliminated.

1. If X3 is not eliminated, then X6 imust be eliminated
2. But X6 cannot be eliminated.
3. Therefore the statement "X3 is not eliminated" is FALSE, and X3 must be eliminated.


One way is just as good as the other, I think.
_________________
Bob Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dukuso

Joined: 14 Jul 2005
Posts: 424
:
Location: germany

Items
PostPosted: Sat Nov 05, 2005 9:39 am    Post subject: Reply with quote

>If there are two blocks which have the same candidate
>in two, shared columns, but not in the 3rd column, then
>in a 3rd block this candidate can be removed for those
>shared columns.
>(The technique is also valid when columns are replaced by rows.)



>a candidate in one of its columns and this candidate do
>not exist in that column for the other blocks, then the same
>candidate in other columns of block A can be removed.



>When all candidates for a given digit within a house are
>confined to the intersection with another house, all candidates
>for that digit can be eliminated from the intersecting house,
>except those that lie within the intersection.



in exact-cover-speak:
r in R;c in C-N(r);N(N(r))>N(c) => Sol(A)=Sol(A-r)

this is shorter, more exact, covers all the above cases and some others.

see:
http://www.setbb.com/phpbb/viewtopic.php?t=395&sid=42618d4be0d03b99a98f53809ed4bb13&mforum=sudoku
Back to top
View user's profile Send private message Send e-mail Visit poster's website
xyzzy

Joined: 24 Aug 2005
Posts: 80
:

Items
PostPosted: Sat Nov 05, 2005 3:45 pm    Post subject: Reply with quote

Bob Hanson wrote:

Hypothesis: X3 is not eliminated.


Instead of "is not elminated" why not just say "is true"? It's the exact same thing, but clearer without the double negative. For instance:

Hypothese: X3 is true
1. If X3 is tue, then X1 must be eliminated
2. X1 canot be eliminated. [causes contradiction]
3. Therefore the statement "X3 is true" is false, and X3 must be eliminated.

Isn't it easier to follow the logic in this example of trial and error without all the extra double negatives?
Back to top
View user's profile Send private message Visit poster's website
Bob Hanson

Joined: 05 Oct 2005
Posts: 187
:
Location: St. Olaf College

Items
PostPosted: Sat Nov 05, 2005 9:37 pm    Post subject: Reply with quote

sure, I like that. It's also nice to remember what we are trying to do -- eliminate nodes.
Thanks -- as I prepared this message, using

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

http://www.stolaf.edu/people/hansonr/sudoku/?LOAD=DEFAULTPROOF

(a very nice little puzzle!)

I noticed that the logical statements it was spitting out were not consistent with what was actually being done. Too many binary possibilities for my brain! But it's fixed.
_________________
Bob Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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