Clueless Kakuro

For fans of Killer Sudoku, Samurai Sudoku and other variants

Clueless Kakuro

Postby Mathimagics » Fri May 29, 2020 2:11 pm

CK-001.jpg
Clueless Kakuro #001
CK-001.jpg (17.32 KiB) Viewed 146 times

Definitions:

  • Each white cell is to be filled in with 1 to 9, so that each "word" has no digit repeating.
  • Words exist in rows, columns, and diagonals. Thus, each white cell belongs to 3 or 4 different words.
  • Constraints for each puzzle come in two flavours, Cell Constraints affect all cells in the grid, and Word Constraints apply to all words of a given size.
  • Word exclusions: sometimes a list of "forbidden" word values is given as a constraint. The order of digits in a word is fairly obvious for words in a row or column. In diagonal words, the word always begins in the left-most column, ie: like a word in a row, it is interpreted left-to-right.

Example:
Code: Select all
. 2 5
3 4 .
7 8 9
. 1 3

In this little grid, the following diagonal word values are found: {32, 19, 49, 383, 745}.

Cell constraints:

  • Cell pairs that are a knight's move apart must have different digits (anti-Knight)
  • Cell pairs that are adjacent (in any direction) can't have consecutive digits (Non-consecutive).

Word Constraints (2-digit words)

  • these word values do not appear: {24, 25, 91, 92}

Word Constraints (6-digit words)

  • the sum of the digits is a prime (ie: 23, 29, 31, or 37)
  • no word contains a 5

That's it! 8-)

SolutionCK-001: Show
Code: Select all
.618.13
4935.68
27.792.
..314..
168.827
9425.59
..79.13
Last edited by Mathimagics on Sat May 30, 2020 3:26 pm, edited 1 time in total.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1583
Joined: 27 May 2015
Location: Canberra

Re: Clueless Kakuro

Postby creint » Sat May 30, 2020 1:56 pm

The word constraint for 2-digit was a bit unclear. But after viewing your solution..
Do not appear in given order when sorted by x then by y.

After entering the right constraints (word constraints manually in code) Z3 found the same single solution in 1 second.
creint
 
Posts: 210
Joined: 20 January 2018

Re: Clueless Kakuro

Postby Mathimagics » Sat May 30, 2020 4:09 pm

creint wrote:The word constraint for 2-digit was a bit unclear. But after viewing your solution..
Do not appear in given order when sorted by x then by y.


Think of words just like those formed by letters. In a crossword puzzle if you were told "the word FRED is excluded", then you would understand that no word in the puzzle can be "FRED" - but "FREDA" and "ALFRED" would be allowed (unless, of course, you were also told that no word could contain FRED).

So excluding "27" and "31" means only that words of length 2 can't be 27 or 31. But 72 and 31 are ok, and so are 275 and 312.

(I do actually have a single-digit-exclusion constraint type, eg "no 4-digit word can contain a 7". It will feature in the next puzzle!).

Crosswords don't normally have diagonal words, but if they did, then the natural interpretation would be that a diagonal word is always ordered from left-to-right. I have made this clear above (at least, I hope I have :roll: ), and provided a simple example.

creint wrote:After entering the right constraints (word constraints manually in code) Z3 found the same single solution in 1 second.

Great, thanks! I had no means of independently confirming the uniqueness of the solution.

I hope to have further examples to test your solver soon!
User avatar
Mathimagics
2017 Supporter
 
Posts: 1583
Joined: 27 May 2015
Location: Canberra

Clueless Kakuro #2

Postby Mathimagics » Sat May 30, 2020 5:39 pm

CK-002.jpg
Clueless Kakuro #2
CK-002.jpg (14.13 KiB) Viewed 112 times

Grid/Cell constraints

  • Non-Consecutive (no cells adjacent in any direction have consecutive digits)
  • Unique words (no word appears twice)

Word constraints

  • 2-digit words:
    • the word 29 is excluded

  • 3-digit words:
    • the sum of the digits is prime

  • 6-digit words:
    • no word contains a 2

Solution CK-002: Show
Code: Select all
.59..96
8273.31
64.917.
..173..
175.913
4931.68
.179.42
Last edited by Mathimagics on Sun May 31, 2020 4:43 pm, edited 3 times in total.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1583
Joined: 27 May 2015
Location: Canberra

Re: Clueless Kakuro

Postby creint » Sat May 30, 2020 8:17 pm

Your solution for Kakuro 2 is incorrect.
-Unique words (no word appears twice)

59 appears 2 times, x marks the spots.
Code: Select all
.24..71
5861.94
13.461.
..928..
93x.517
x71x.35
.x37.91


Same for 95 and 91


Z3 gives multiple solutions:
Code: Select all
  4 8     5 8
9 6 1 4   2 6
5 3   8 1 4 
    1 5 7   
7 2 4   9 5 3
4 9 7 1   1 6
  6 3 8   7 2

Code: Select all
  4 8     5 8
9 6 1 4   2 6
5 3   8 1 4 
    1 5 7   
7 2 4   9 2 6
4 9 7 1   7 9
  6 3 8   4 2
creint
 
Posts: 210
Joined: 20 January 2018

Re: Clueless Kakuro

Postby Mathimagics » Sun May 31, 2020 5:51 am

Thanks, creint!

I have fixed the bug, and have adjusted the word constraints list above.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1583
Joined: 27 May 2015
Location: Canberra

Re: Clueless Kakuro

Postby creint » Sun May 31, 2020 7:29 am

After repairs your solution is still incorrect
47 appears 2 times

Marked with x:
Code: Select all
  5 9     2 6
8 2 x 3   4 9
6 x   9 7 1 
    7 1 3   
7 1 5   9 1 3
x 9 3 7   6 8
  x 1 9   4 2



Here an valid solution one of many:
Code: Select all
  4 2     7 5
3 8 6 9   4 8
7 1   3 6 2
    9 7 1
7 1 3   4 8 5
4 9 5 2   2 9
  3 1 7   7 3
creint
 
Posts: 210
Joined: 20 January 2018

Re: Clueless Kakuro

Postby Mathimagics » Sun May 31, 2020 9:58 am

Ok, thanks!

My repair crew is clearly incompetent! I am investigating ... :?
User avatar
Mathimagics
2017 Supporter
 
Posts: 1583
Joined: 27 May 2015
Location: Canberra

Re: Clueless Kakuro

Postby Mathimagics » Sun May 31, 2020 11:16 am

I just noticed that your sample solution for CK-002 is itself invalid - it isn't NC (it has consecutive adjacent digits) ...
User avatar
Mathimagics
2017 Supporter
 
Posts: 1583
Joined: 27 May 2015
Location: Canberra

Re: Clueless Kakuro

Postby creint » Sun May 31, 2020 11:35 am

Non consecutive only adjacent, not in diagonals. With your constraints it has not even a solution.
creint
 
Posts: 210
Joined: 20 January 2018

Re: Clueless Kakuro

Postby Mathimagics » Sun May 31, 2020 3:44 pm

Ok, try CK-002 again but change the excluded word from 19 to 29? You should get a unique solution ...
User avatar
Mathimagics
2017 Supporter
 
Posts: 1583
Joined: 27 May 2015
Location: Canberra

Re: Clueless Kakuro

Postby creint » Sun May 31, 2020 4:32 pm

Yes, this time a single solution (7 seconds):
Hidden Text: Show
Code: Select all
  5 9     9 6
8 2 7 3   3 1
6 4   9 1 7 
    1 7 3   
1 7 5   9 1 3
4 9 3 1   6 8
  1 7 9   4 2
creint
 
Posts: 210
Joined: 20 January 2018

Re: Clueless Kakuro

Postby Mathimagics » Sun May 31, 2020 4:47 pm

Good. I found and fixed the bug, and updated the puzzle specs.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1583
Joined: 27 May 2015
Location: Canberra


Return to Sudoku variants