Uniqueness etc

Advanced methods and approaches for solving Sudoku puzzles

Uniqueness etc

Postby stuartn » Mon Nov 07, 2005 3:32 pm

Just downloaded 1954228 from Menneske and after the usual stuff and an X-Wing on 2's in R3 and R8 have got to this stage.



Code: Select all
1465 [27] 8 [79] 3 [279]
572936184
39814 [27]  [67]  [267] 5
6213 [78] 945 [78]
935 [78] 642 [17]  [178]
784251396
21 [379]  [478]  [789] 5 [679]  [467]  [379]
45 [39] 61 [27] 8 [27]  [39]
86 [79]  [47]  [279] 35 [147]  [1279]


Are we correct in saying, that because we are assured of the uniqueness of the grid, that R3C8 HAS to be a 6?

How many different endgrids exist AT THIS STAGE?

stuartn
stuartn
 
Posts: 211
Joined: 18 June 2005

Postby Nick67 » Mon Nov 07, 2005 4:35 pm

[Edit: I'm sorry ... this post is wrong. I'll explain in another post.]

Are we correct in saying, that because we are assured of the uniqueness of the grid, that R3C8 HAS to be a 6?


Right.

Using the uniqueness logic is like doing a proof by
contradiction. In this case, assume the final
value of R3C8 is not 6. Then any solution to
the puzzle will have 2's and 7's in some combination
in R3C6,8 and R8C6,8.

After finding such a solution, we could then switch the 2's and 7's
in those cells, and there would still be one 2 and one 7
in each row, column, and box. We would have a
second solution. This is a contradiction, because it is a fact (established
by the puzzle-maker) that there is only one solution.
So our original assumption must be false, and
so we see that the final value of R3C8 must be 6.

How many different endgrids exist AT THIS STAGE?


Even at this stage, just 1. Using the uniqueness logic
just helps us get there quicker.

I hope I interpreted your questions in the right way!
Last edited by Nick67 on Mon Nov 07, 2005 1:08 pm, edited 1 time in total.
Nick67
 
Posts: 113
Joined: 24 August 2007

Postby stuartn » Mon Nov 07, 2005 4:59 pm

Spot on Nick. - I was having my usual doubts about uniqueness being a 'kosher' method until I found this one - Is the grid unique at the initial starting point aswell?

Code: Select all
..6..8.3.
..293...4
.9.......
.....9.5.
.....42..
.8.2...96
21...5...
45.61....
.....35..


Just to absolutely certain....... this will clear the question up for me and I'm sure make it quite clear for our newbie friends.

stuartn

(edited to put the R3 '9' in the right place)
Last edited by stuartn on Mon Nov 07, 2005 2:29 pm, edited 1 time in total.
stuartn
 
Posts: 211
Joined: 18 June 2005

Postby CathyW » Mon Nov 07, 2005 5:09 pm

With the 9 in row 3 in the right place (c2 not c1!), this puzzle definitely only has one solution. I pasted it into Sadman Software which counts the solutions for you if you need to. With the 9 in the wrong place there were 66 solutions!!
CathyW
 
Posts: 316
Joined: 20 June 2005

Postby Nick67 » Mon Nov 07, 2005 5:13 pm

Hi Stuartn,

I'm sorry, I just realized my first post was incorrect.

I was thinking of R3C6,8 and R8C6,8 as a "unique rectangle".
But, alas .. it's not. In a uniquenss rectangle, each corner
cell has to share a box with another corner cell.
Otherwise, the logic doesn't hold up.

Sorry about that!
Nick67
 
Posts: 113
Joined: 24 August 2007

Postby stuartn » Mon Nov 07, 2005 5:14 pm

Thanks Cathy - must sort my export routine out! - I reckon this is probably one of the clearest examples I've come across - and you don't need a centrifuge and dummy cells to see the strategy works.:)

stuartn
stuartn
 
Posts: 211
Joined: 18 June 2005

Postby CathyW » Mon Nov 07, 2005 5:26 pm

Interestingly, the Sadman Software doesn't seem to recognise the uniqueness test in order to solve this puzzle. Having got to the point where this was required it couldn't do the single step. I'll have to mail Simes about that!
CathyW
 
Posts: 316
Joined: 20 June 2005

Postby stuartn » Mon Nov 07, 2005 5:40 pm

Nick said;

I'm sorry, I just realized my first post was incorrect.

I was thinking of R3C6,8 and R8C6,8 as a "unique rectangle".
But, alas .. it's not. In a uniquenss rectangle, each corner
cell has to share a box with another corner cell.
Otherwise, the logic doesn't hold up.


Now as I see it (CMIIW), if R3C8 is a 2, R8C8 =7, R8C6 = 2 and R3C6 = 7.

If R3C8 is a 7 it does the alternative exclusions. Either way it looks like a uniqueness test to me.... or am I missing something? - why does this logic fail - or does it?

stuartn

stuartn
stuartn
 
Posts: 211
Joined: 18 June 2005

Postby QBasicMac » Mon Nov 07, 2005 6:02 pm

I fail to see the difference between all the "uniqueness" talk recently and the old T&E.

That is just what T&E is: Take a cell and test all candidates and ensure all but one lead to an impossible condidion. (Recursive, if necessary)

Mac
QBasicMac
 
Posts: 441
Joined: 13 July 2005

Postby stuartn » Mon Nov 07, 2005 6:10 pm

Mac - basically we've got a square of identical pairs - you dont need T&E to realize that this will lead to more than one possible endgrid. As there's an interloper in in one of the cells, I deduce that in order for the grid to be unique, the interloper must be the true candidate. - no T&E there.

stuartn
stuartn
 
Posts: 211
Joined: 18 June 2005

Postby cho » Mon Nov 07, 2005 6:20 pm

stuartn wrote:Either way it looks like a uniqueness test to me.... or am I missing something? - why does this logic fail - or does it?

stuartn

I don't think it fails. The only place I recall seing boxes mentioned in the uniqeness description is that you can't use them as connectors. For example the cells marked B could not have uniqeness applied to them because C5 or C6 might force a placement of one of the candidates. A and C would be basic uniqeness rectangles.
Code: Select all
+-------+-------+
| A . . | . A . |
| . . B | . B . |
| . . B | C C B |
+-------+-------+
| . . . | . . . |
| . . . | C C . |
| A . . | . A . |
+-------+-------+

Of course I could be all wet.

edit: Pass the soap.

cho
Last edited by cho on Tue Nov 08, 2005 2:39 am, edited 1 time in total.
cho
 
Posts: 18
Joined: 07 August 2005

Postby Nick67 » Mon Nov 07, 2005 9:00 pm

Let me see if I can redeem myself a bit, for my
earlier mistake in this thread. I hope to clarify
when you can use the "uniqueness logic", and
when you can't.

Let's say that the candidates for r3c7,8 and
r8c7,8 in a certain puzzle look like this:
Code: Select all
 . . . | . . .  | .  .  .
 . . . | . . .  | .  .  .
 . . . | . .    | 27 27 .
 ------+-------+----------
 . . . | . . .  | .  .  .
 . . . | . . .  | .  .  .
 . . . | . . .  | .  .  .
 ------+-------+----------
 . . . | . . .  | .  .  .
 . . . | . .    | 27 27 .
 . . . | . . .  | .  .  .


If this puzzle has any solutions, then
it must have multiple solutions. Why?
Let's start with one solution. Clearly,
there must be 2's and 7's in r3c7,8 and
r8c7,8 (as they were the only candidates).
We can then swap the 2's and 7's in these 4 cells.
We will still have one 2 and one 7 in rows 3 and 8,
one 2 and one 7 in columns 7 and 8, and one 2 and
one 7 in boxes 3 and 9. And we didn't disturb
any of the other numbers. So we have created
a second solution!

On the other hand, let's say that the candidates for
r3c6,8 and r8c6,8 in a certain puzzle look like this:

Code: Select all
 . . . | . . .  | . . .
 . . . | . . .  | . . .
 . . . | . . 27 | . 27.
 ------+-------+------
 . . . | . . .  | . . .
 . . . | . . .  | . . .
 . . . | . . .  | . . .
 ------+-------+------
 . . . | . . .  | . . .
 . . . | . . 27 | . 27.
 . . . | . . .  | . . .


The critical difference is that now each "27 cell"
is in its own box.

Here, we can't say the same thing!
This puzzle will not necessarily have
multiple solutions. Let's say we
found 1 solution, and tried to
swap the 2's and 7's again. The result
is not another solution. The rows
are still OK (one 2 and one 7 each), and
the columns are OK (one 2 and one 7 each)...
but now the boxes are messed up!
Two of them will have two 2's and two will
have two 7's.

Let's go back to the first example, and
add a 6 as a candidate to 1 of the cells:
Code: Select all
 . . . | . . .  | .  .   .
 . . . | . . .  | .  .   .
 . . . | . .    | 27 276 .
 ------+-------+----------
 . . . | . . .  | .  .   .
 . . . | . . .  | .  .   .
 . . . | . . .  | .  .   .
 ------+-------+----------
 . . . | . . .  | .  .   .
 . . . | . .    | 27 27  .
 . . . | . . .  | .  .   .


On a puzzle like this, we can use the
"uniqueness logic". Assume we know
ahead of time that the puzzle has a
unique solution because the puzzle-maker
guaranteed this.

If 6 is not the final value of r3c8, then
this puzzle will have multiple solutions
(as explained above). That would contradict
the fact that the puzzle has 1 solution.
So 6 must be the final value of r3c8, and
we can drop the other 2 candidates for that cell.

Now let's return to the 2nd example, and again
add a 6 as a candidate to 1 of the cells:

Code: Select all
 . . . | . . .  | . .   .
 . . . | . . .  | . .   .
 . . . | . . 27 | . 276 .
 ------+-------+---------
 . . . | . . .  | . .   .
 . . . | . . .  | . .   .
 . . . | . . .  | . .   .
 ------+-------+----------
 . . . | . . .  | . .   .
 . . . | . . 27 | . 27  .
 . . . | . . .  | . .   .


Here we can't do anything! If the final
value of r3c8 is not 6, that does not
imply that there will be multiple solutions,
as explained above. So we have to leave all
candidates just as they are, and look for other
ways to solve the puzzle.

There is an intense discussion of uniqueness
in this thread . Using the language of that thread, the pattern in the 3rd diagram
is called a "unique rectangle". The pattern in the 4th
diagram is not a unique rectangle.

That thread also identifies several other patterns for which
the uniqueness logic can be used.
Nick67
 
Posts: 113
Joined: 24 August 2007

Postby QBasicMac » Mon Nov 07, 2005 9:35 pm

stuartn wrote:Mac - basically we've got a square of identical pairs ...


Hmmm, don't follow yet.

Say I got as far as shown below.

In box 7, 9 is locked in column 3. One of those three must be a nine.

r7c3=9 leads to an impossible case
r8c3=9 leads to an impossible case
r9c3=9 leads to a solution

Therefore r9c3=9

This is clearly T&E.

Please explain to me, starting from where I am below, what technique is different from this, not related to T&E and thus deserving of another jargon term "uniqueness" and somehow superior to T&E.

Mac


Solution So Far
Code: Select all
146 5-8 -3-
572 936 184
398 14- --5
621 3-9 45-
935 -64 2--
784 251 396
21- --5 ---
45- 61- 8--
86- --3 5--

Pencilmarks So Far
Code: Select all
-         -         -         -         27        -         79        -         279     
-         -         -         -         -         -         -         -         -       
-         -         -         -         -         27        67        267       -       
-         -         -         -         78        -         -         -         78       
-         -         -         78        -         -         -         17        178     
-         -         -         -         -         -         -         -         -       
-         -         379       478       789       -         679       467       379     
-         -         39        -         -         27        -         27        39       
-         -         79        47        279       -         -         1247      1279     
QBasicMac
 
Posts: 441
Joined: 13 July 2005

Postby CathyW » Mon Nov 07, 2005 11:44 pm

I'm confused now:(

Think I'll have to study the thread on defining the uniqueness descriptions a bit more.

Placing the 6 in r3c8 by apparently erroneously applying the uniqueness test allows you to solve the puzzle. How would you solve it without that? Sadman Sudoku gets stuck at this point so I guess it's something horribly complicated:!:
CathyW
 
Posts: 316
Joined: 20 June 2005

Postby rubylips » Tue Nov 08, 2005 12:50 am

CathyW wrote:Placing the 6 in r3c8 by apparently erroneously applying the uniqueness test allows you to solve the puzzle. How would you solve it without that? Sadman Sudoku gets stuck at this point so I guess it's something horribly complicated:!:

You're right! - there's a six-link chain in the 7s:
Code: Select all
Consider the chain r3c8-2-r3c6-2-r8c6-2-r8c8.
The cell r8c8 must contain the value 2 if the cell r3c8 doesn't.
Therefore, these two cells are the only candidates for the value 2 in Column 8.
- The move r9c8:=2 has been eliminated.
Consider the chain r4c9-7-r4c5~7~r1c5-7-r3c6-7-r8c6-7-r8c8~7~r5c8.
When the cell r5c8 contains the value 7, so does the cell r4c9 - a contradiction.
Therefore, the cell r5c8 cannot contain the value 7.

- The move r5c8:=7 has been eliminated.
The value 1 is the only candidate for the cell r5c8.

rubylips
 
Posts: 149
Joined: 01 November 2005

Next

Return to Advanced solving techniques

cron