[Exact Cover]killer sudoku cage without sum,How to convert ?

For fans of Killer Sudoku, Samurai Sudoku and other variants

[Exact Cover]killer sudoku cage without sum,How to convert ?

Postby dyguests » Sun Aug 22, 2021 9:36 am

I try to convert a Sudoku puzzle to a Exact Cover, It works.
Convert a Killer Sudoku, It works to.
But a Killer Sudoku that have not sum of cage. How to convert to a Exact Cover?

--------------------------------------------------------------------------------------------------------

For a Killer Sudoku, like:
-------------
AA. ... ...
... ... ...
... ... ...
... ... ...
... ... ...
... ... ...
... ... ...

AA=3
-------------

The AA cage can be convert to Exact Cover like:
100
011

--------------------------------------------------------------------------------------------------------

For a Killer Sudoku that have not sum of cage, like:
-------------
AA. ... ...
... ... ...
... ... ...
... ... ...
... ... ...
... ... ...
... ... ...

(no hint of sum of AA)
-------------

How to convert AA cage to Exact Cover?

:)
dyguests
 
Posts: 4
Joined: 20 August 2021

Re: [Exact Cover]killer sudoku cage without sum,How to conve

Postby creint » Mon Aug 23, 2021 8:09 pm

killer cage = all different + sum cage
If you don't know the sum you can't apply the sum cage.
Your example does not give more constraints than a regular sudoku.
What do you want? More details help.
creint
 
Posts: 393
Joined: 20 January 2018

Re: [Exact Cover]killer sudoku cage without sum,How to conve

Postby dyguests » Tue Aug 24, 2021 4:56 pm

Problem solved, thinks.

I found it can be solved by dlx with secondary columns.

-------------------------------------
some details:
1. DLX. https://en.wikipedia.org/wiki/Dancing_Links
secondary columns: show "Optional constraints".
2. Convert sudoku to a DLX. https://blog.csdn.net/mu399/article/details/7627862
dyguests
 
Posts: 4
Joined: 20 August 2021

Re: [Exact Cover]killer sudoku cage without sum,How to conve

Postby dyguests » Fri Oct 25, 2024 8:41 am

I forget how to use "secondary columns" to slove the problem. What happened 3 years ago???

My new solution:

例:二个格子,总和5。

可能结果:
1,4 2,3 3,2 4,1

精确匹配:

格子索引(主列) | 数字1~4(辅助列)
10 | 1000
01 | 0001

10 | 0100
01 | 0010

很明显上面是两组解:1,4 和 2,3。
但是
10 | 1000
01 | 0010
也是精确匹配的一组解:1,3。不是杀手框的解。

---------------------------------

新的方案:
对于第一个格子,不采用`10 1000`的格式。
而是采用`10 1110`的格式。

其中 `10 1110` 表示
1... :数字2
.11. :禁止2,3

------------

我不确认这个方案是否能解决 多组解中出现重复数字 的问题
dyguests
 
Posts: 4
Joined: 20 August 2021


Return to Sudoku variants