Eleven's variable replacement method and its complexity
AFAIK, the method to be discussed here was first introduced by eleven in this thread: http://forum.enjoysudoku.com/an-alternative-way-to-solve-the-hard-17-clue-t30022.html#p200126, at a time when I wasn't very present on the forum.
I became aware of it only here: http://forum.enjoysudoku.com/endor-fins-1-2-ser-8-3-8-9-t38805.html#p301646
Since then, I've been busy with extending CSP-Rules with new features (mainly related to allowing some control over the number of steps and with the Pandiag variant of Latin Squares) and I haven't had too much time to think about it. But this question of complexity remained in the background of my thoughts and it was revived by a new application of it here: http://forum.enjoysudoku.com/post308008.html#p308008
Generally speaking the method consists of replacing sets of undecided values in some house by supposedly decided variables x, y, ..., the real value of which is unknown.
The method is smart and mathematically valid; validity is not the point of discussion here. My interest is about its logical complexity.
Let me introduce my questioning by recalling Mith's example (in the second mentioned thread):
- Code: Select all
Resolution state after Singles:
+--------------+----------------+-----------------+
! 9 8 6 ! 5 3 124 ! 1247 124 1247 !
! 7 24 3 ! 124 9 6 ! 5 124 8 !
! 24 5 1 ! 24 7 8 ! 9 6 3 !
+--------------+----------------+-----------------+
! 12 126 4 ! 9 8 5 ! 1267 3 127 !
! 123 1236 9 ! 124 1246 7 ! 8 5 124 !
! 8 7 5 ! 3 1246 124 ! 1246 124 9 !
+--------------+----------------+-----------------+
! 134 134 8 ! 7 5 124 ! 124 9 6 !
! 5 14 7 ! 6 124 9 ! 3 8 124 !
! 6 9 2 ! 8 14 3 ! 14 7 5 !
+--------------+----------------+-----------------+
mith wrote:The key is to note that, after singles, the digits 124 only appear once each, while almost all of the other digits are placed. Whatever the solution, the digits 124 will appear in some order in other houses. Let's pick column 4, for example, and we'll relabel r235c4 as ABC. We don't know how the digits 124 map to ABC, but let's look at a grid with ABC in place of all the 124s:
- Code: Select all
+-----------------+-------------+------------------+
! 9 8 6 ! 5 3 C ! ABC7 ABC ABC7 !
! 7 BC 3 ! A 9 6 ! 5 BC 8 !
! AC 5 AC ! B 7 8 ! 9 6 3 !
+-----------------+-------------+------------------+
! ABC ABC6 ABC ! 9 8 5 ! ABC67 3 ABC7 !
! AB3 AB36 9 ! C AB6 7 ! 8 5 AB !
! 8 7 5 ! 3 AB6 AB ! ABC6 ABC 9 !
+-----------------+-------------+------------------+
! AB3C AB3C 8 ! 7 5 ABC ! ABC 9 6 !
! 5 ABC 7 ! 6 ABC 9 ! 3 8 ABC !
! 6 9 ABC ! 8 ABC 3 ! ABC 7 5 !
+-----------------+-------------+------------------+
mith wrote:But this grid just solves with singles. [...]And now we can match this to the original puzzle to find C=1, A=4, B=2
denis_berthier wrote:From a theoretical point of view, there is some interesting (pseudo-)mystery here:
- you start by deleting some information (stating that B=1or2or4 instead of B=2or4 in r3c4), which should make the puzzle harder;
- but then you find a solution with Singles only, whereas the original puzzle required whips[4].
I think this example is enough motivation for the complexity pseudo-mystery.