作者: Tsutomu Hiroshima
日時: 2003/5/13(12:02)
> > [ 5, 2, 1, 4, 3, 0], だと、
> > ★ と ☆ がつながっていることになりそうな気が…。
> > 
> >  -------------------
> >  |★|  5|   |☆|
> >  -------------------
> 
> そうです。つながっているものとして扱わないとダメでしょ? のつもりでした。
> 


そうか,気づかなかった!!

Scheme 版に組み込んでみると,
オリジナルの問題は Trial & Error の過程を経ずに解けました.


自作の初期設定
+-----------------------------------------------+
|       |           1   |               |       |
+-----------------------------------------------+
|           3   |               |               |
+-----------------------------------------------+
|   4   |               |               |       |
+-----------------------------------------------+
|               |               |           5   |
+-----------------------------------------------+
|       |               |           6   |       |
+-----------------------------------------------+
|               |           5   |           2   |
+-----------------------------------------------+
では,

改良前:

Possibilities...
+-----------------------------------------------+
|  2356 |  246      1   |  2346    2345 |  346  |
+-----------------------------------------------+
|   26      3   |  2456    1246 |  1245    146  |
+-----------------------------------------------+
|   4   |  1256    2356 |  1236    1235 |  136  |
+-----------------------------------------------+
|  1236    1246 |  2346   12346 |   24      5   |
+-----------------------------------------------+
|  1235 |  1245    2345 |   13      6   |  134  |
+-----------------------------------------------+
|  136     146  |   46      5   |   13      2   |
+-----------------------------------------------+
0:Possibility: Cell(0, 0) = 2,3,5,6
0:Contradiction: Cell(0, 0) != 2
0:Assume: Cell(0, 0) = 3
 1:Possibility: Cell(0, 1) = 2,4,6
 1:Contradiction: Cell(0, 1) != 2
 1:Assume: Cell(0, 1) = 4

Solution 1
+-----------------------------------------------+
|   3   |   4       1   |   2       5   |   6   |
+-----------------------------------------------+
|   6       3   |   5       4   |   2       1   |
+-----------------------------------------------+
|   4   |   5       2   |   6       1   |   3   |
+-----------------------------------------------+
|   2       1   |   6       3   |   4       5   |
+-----------------------------------------------+
|   5   |   2       3   |   1       6   |   4   |
+-----------------------------------------------+
|   1       6   |   4       5   |   3       2   |
+-----------------------------------------------+
 1:Assume: Cell(0, 1) = 6
  2:Possibility: Cell(1, 0) = 2,6
  2:Assume: Cell(1, 0) = 2
   3:Possibility: Cell(1, 3) = 4,6
   3:Contradiction: Cell(1, 3) != 4
   3:Contradiction: Cell(1, 3) != 4,6
  2:Contradiction: Cell(1, 0) != 2
  2:Contradiction: Cell(1, 0) != 2,6
 1:Contradiction: Cell(0, 1) != 6
0:Assume: Cell(0, 0) = 5
 1:Possibility: Cell(0, 1) = 2,4,6
 1:Assume: Cell(0, 1) = 2
  2:Possibility: Cell(0, 3) = 3,4,6
  2:Contradiction: Cell(0, 3) != 3
  2:Assume: Cell(0, 3) = 4
   3:Possibility: Cell(1, 0) = 2,6
   3:Contradiction: Cell(1, 0) != 2
   3:Assume: Cell(1, 0) = 6
    4:Possibility: Cell(1, 2) = 2,4,5
    4:Contradiction: Cell(1, 2) != 2
    4:Contradiction: Cell(1, 2) != 4
    4:Contradiction: Cell(1, 2) != 2,4,5
   3:Contradiction: Cell(1, 0) != 6
   3:Contradiction: Cell(1, 0) != 2,6
  2:Contradiction: Cell(0, 3) != 4
  2:Assume: Cell(0, 3) = 6
   3:Possibility: Cell(1, 0) = 2,6
   3:Contradiction: Cell(1, 0) != 2
   3:Contradiction: Cell(1, 0) != 2,6
  2:Contradiction: Cell(0, 3) != 6
  2:Contradiction: Cell(0, 3) != 3,4,6
 1:Contradiction: Cell(0, 1) != 2
 1:Assume: Cell(0, 1) = 4
  2:Possibility: Cell(0, 3) = 2,3,6
  2:Contradiction: Cell(0, 3) != 2
  2:Contradiction: Cell(0, 3) != 2,3,6
 1:Contradiction: Cell(0, 1) != 4
 1:Assume: Cell(0, 1) = 6
  2:Possibility: Cell(0, 3) = 2,3,4
  2:Contradiction: Cell(0, 3) != 2
  2:Contradiction: Cell(0, 3) != 2,3,4
 1:Contradiction: Cell(0, 1) != 6
 1:Contradiction: Cell(0, 1) != 2,4,6
0:Contradiction: Cell(0, 0) != 5
0:Contradiction: Cell(0, 0) != 6

Total: 1 Solution

だったのが,改良後:

Possibilities...
+-----------------------------------------------+
|  2356 |  246      1   |  2346    2345 |  346  |
+-----------------------------------------------+
|   26      3   |  2456    1246 |  1245    146  |
+-----------------------------------------------+
|   4   |  1256    2356 |  1236    1235 |   13  |
+-----------------------------------------------+
|  1236    1246 |  2346   12346 |   24      5   |
+-----------------------------------------------+
|  1235 |  1245    2345 |   13      6   |  134  |
+-----------------------------------------------+
|  136     146  |   46      5   |   13      2   |
+-----------------------------------------------+
0:Possibility: Cell(0, 0) = 2,3,5,6
0:Contradiction: Cell(0, 0) != 2
0:Assume: Cell(0, 0) = 3
 1:Possibility: Cell(0, 1) = 2,4
 1:Contradiction: Cell(0, 1) != 2
 1:Assume: Cell(0, 1) = 4

Solution 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Solution 1 の図は同じ ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0:Assume: Cell(0, 0) = 5
 1:Possibility: Cell(0, 1) = 2,4,6
 1:Assume: Cell(0, 1) = 2
  2:Possibility: Cell(0, 3) = 3,4,6
  2:Contradiction: Cell(0, 3) != 3
  2:Assume: Cell(0, 3) = 4
   3:Possibility: Cell(1, 0) = 2,6
   3:Contradiction: Cell(1, 0) != 2
   3:Assume: Cell(1, 0) = 6
    4:Possibility: Cell(1, 2) = 2,4,5
    4:Contradiction: Cell(1, 2) != 2
    4:Contradiction: Cell(1, 2) != 4
    4:Contradiction: Cell(1, 2) != 2,4,5
   3:Contradiction: Cell(1, 0) != 6
   3:Contradiction: Cell(1, 0) != 2,6
  2:Contradiction: Cell(0, 3) != 4
  2:Contradiction: Cell(0, 3) != 3,4,6
 1:Contradiction: Cell(0, 1) != 2
 1:Contradiction: Cell(0, 1) != 4
 1:Contradiction: Cell(0, 1) != 2,4,6
0:Contradiction: Cell(0, 0) != 5
0:Contradiction: Cell(0, 0) != 6

Total: 1 Solution

となり,
Trial & Error の過程が短くなりました. 
-----------------------------
	廣島 勉
	(tsutomu@...)