Seeking the shortest route

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

Methods being perceived as "trial and error"

Postby Joe Wey » Tue Feb 20, 2007 1:21 am

udosuk, I assume you scan your Sudoku fort he patterns you perceive as acceptable. So, actually you “try” to find for instance X-wings, since there is no guarantee to find one … and you will “try” the next pattern after that, won’t you?
The discussion what is trying and what is not is completely pointless. The true point is what is worth trying and what is not!
Let me put some more thoughts into this.
We call a hypothesis what obviously is one, i.e. an unproved fact in a Sudoku (a placement of a digit is a trivial example, an exclusion of a digit at a certain place is another trivial one, any fact that adds knowledge relevant to the Sudoku is an acceptable hypothesis as such). Let’s call a “good hypothesis” one that gives you immediate inferences to other facts. A digit in a cell entails another one in another cell, which entails another one etc.. Is it worth following such a ”good” hypothesis? No! It eventually might solve your Sudoku, but this is is very unprobable and it just burns your time trying to go forward, or it may yield a contradiction, which may be a little more probable, but unfortunately you do not know your chance to find one, and, even if you happen to find the contradiction, it may be of little value. Normally it takes you into a time consuming exercise without any conclusion. So this is trying in the true sense.
Let’s call a bi-valued hypothesis a pair of hypothesis that is mutually exclusive. Again, a bi-valued cell is a trivial example. Let’s finally call a strong bi-valued hypothesis a pair of mutually exclusive, good hypothesis.
Following any one out of such a hypothesis pair will give you for sure good information if it “ends” (meaning lands into a solution, perfect (!), or a contradiction, less perfect but good information since it validates the conjugate, good hypothesis).
What if it does not end that easily, which you normally expect to happen? It then does establish a strong inference net, and that is what is the true interesting point about all this. There is a simple but powerful law associated with this: any fact that may be inferred by a pair of conditionally true facts a (true under hypothesis A) and b (true under hypothesis B) is true anyway and may be concluded as an unconditionally true fact for the Sudoku. Using this law, the net, if it happens to be a “good” one, generates clues without the need to take it to an “end”!

Let’s take an example to illustrate this. Take the Daily Nightmare of yesterday, 19th Feb 2007. The Sudoku, after the basics, ends to be the following one:

16 8 34 |9 35 16 |25 7 2345
2 56 13 |8 4 7 |156 136 9
9 456 7 56 135 2 |8 136 3456
--------------------------+-----------------------------+--------------------------------
13 34 6 |14 29 8 |29 5 7
5 2 19 |16 7 3 |169 4 8
8 7 149 |1456 1259 169 |3 126 26
--------------------------+-----------------------------+--------------------------------
7 36 5 |2 19 19 |4 8 36
4 9 8 |37 6 5 |27 23 1
36 1 2 |37 8 4 |567 9 356


Now take the strong hypothesis pair (r4c2 = 3, r4c2 = 4) and look at the corresponding inference chains which come very easily (I label the conditional facts for ease of reasoning):

(r4c2 = 4) (1a) --> (r3c2 <> 4) (2a)--> (r1c1 = 1) (3a)--> (r1c6 = 6) (4a)--> (r3c4 = 5) (5a)

(r4c2 = 3) (1b--> (r4c1 = 1) (2b) --> (r1c1 = 6) (3b) --> (r2c2 = 5) (4b) --> (r3c2 = 4) (5b) --> (r1c3 = 3) (6b) --> (r1c5 = 5) (7b)

Take fact (5a) and (7b). Both infer (r3c5 <> 5), since r3c5 sees a 5 in each chain, so this is a true fact and you may eliminate from that cell the 5.
And now take (5a) and (5b). Both infer (r3c2 <> 5), so you may eliminate 5 from that cell, which by the way, gives you (r2c2 = 5) and yields a naked triple in box 3 and so on!

This is not the end of inferences you may get out of this inference net, just go on extending it as long as it is easy and look carefully at the combination of your conditional fact chains. Marking the chains visually will easily disclose the clues.

Partially convinced?

Let’s take another strong hypothesis, just for the sake of the exercise:
(r2c2 = 6, r2c2 = 5).

(r2c2 = 6) --> (r1c1 = 1) --> (r1c6 = 6)
(r2c2 = 6) --> (r3c2 = 5) --> (r3c4 = 6)

Oops, this is a contradiction! Too bad my chain just luckily generated that contradiction and it is not out of a known pattern that I got it … Well, if there is no known pattern for your clue, go and construct one! This has been so immediate that we can actually easily do so.

Looking at the contradiction carefully you construct the following nice, regular law:
Given 2 same digits in a box a, if you can find a box b with two facts in b inferring each one of these digits, if, in addition, one single fact in box b yields these two inferring facts, this later one must be wrong.

In our example the one 6 in box 2 is inferred from (r1c1 = 1) in box 1, the other 6 in box 2 is inferred from (r3c2 = 5) in box 1, both of these are inferred from (r2c2 = 6), so we can eliminate 6 from r2c2.

It is, from a pure logical point of view, of course unnecessary to require the 2 inferring conditions to be in one box. Looking at this law it is somehow like an inverse XY-wing. Now, what is the interesting point about the XY-wings? They are a special case of a much more generic law but they are easy to find because they are that specific! So, let’s keep the restriction to have the inferences in one box, and let’s see if we can use our pattern in our daily nightmare example. Look at box 5 with two 9 in 2 rows. One of them may be inferred by (r4c7 = 2) in box 6, the other one by (r6c7 and r6c8 do contain 1 and 6) in box 6. Both of these are trivially entailed by (r5c7 = 9), so we may eliminate the 9 in this cell! Lucky strike? Look at two 6 in box 9. One may be inferred by a 3 in box 3, the other one by a 5 in the same box (in the corresponding rows). Assume (r3c9 = 3), and look at that, it yields also (r2c7 = 5). So we can eliminate, by our pattern, both 3 in r1c9 and r3c9!

So, we have discovered a new pattern! I call it JoBIP (Joe’s backward inference pattern). Is it a special case of a pattern long known before? Maybe, I do not care. Is it a good pattern? I do not know. It is my personal one, I may do with it whatever I want, I may breed it, enhance it, change it, or throw it away if it does not really generate that many clues at the end! It has been great in this one Sudoku. But for sure it gave me a nice, very valid insight into the intrinsics of a Sudoku as such. And all this came from “trying” …

So, _m_k, please do not refrain from “trying”. Anyone in the Sudoku community who managed to be an expert has gained its insights via trying (and they never will tell you how they exactly got their clues they nicely pack into patterns when published). You might be sure to be perceived as logically elegant if you dogmatically stick to the accepted patterns, but you will be constrained to them until the end of your life, and unfortunately you may be sure that it is a random choice of a potentially infinite set of logical patterns, all others just not being disclosed due to randomness of Sudoku history! And please, if you want to distribute the tasks among your computer and you, let him do the systematic scans, and you go trying and be creative. With one restriction: do it the clever way!
Joe Wey
 
Posts: 2
Joined: 08 February 2007

Postby re'born » Tue Feb 20, 2007 2:02 am

Hi Joe,

Welcome to the forum.

Reading your post, I thought you might enjoy the following thread from a couple of years ago. It discusses a technique called tabling that is very similar to what you are doing.
re'born
 
Posts: 551
Joined: 31 May 2007

Previous

Return to Help with puzzles and solving techniques