## Hunting Hidden Houses

For fans of Killer Sudoku, Samurai Sudoku and other variants

### Hunting Hidden Houses

HH.JPG (25.81 KiB) Viewed 223 times

This is a solved normal Sudoku with 4 extra blue boxes.
The extra boxes must be around the number 9 in Normal Box 1,3,7 and 9.
And than pulled to the center of the puzzle.
So the 9 is always in the most far corner of the extra box.

It is possible that a 9 is in the uttermost corner itself, eg in r1c1.
The extra blue box cannot be pulled towards the center of the puzzle.
The extra blue box is the same as the normal box in that case.
Not useful but valid.

Now the fun part.

In the puzzle below there are no 9's. So where are the blue boxes?
They are hidden. Can you find them and solve the puzzle?
Only basic methods are needed.
Code: Select all
`   +--'--'--+--'--'--+--'--'--+     |        |        |        |     | 5     2|        | 6     3|     |        | 1     2|        |     +--'--'--+--'--'--+--'--'--+     | 3      |        |       4|     |    4   | 8  1  7|    6   |     | 8      |        |       7|     +--'--'--+--'--'--+--'--'--+     |        | 2     8|        |     | 6     8|    7   |       2|     |        |        |        |     +--'--'--'--'--'--'--'--'--+                                   .........5.2...6.3...1.2...3.......4.4.817.6.8.......7...2.8...6.8.7...2.........`

I am not 100% sure that it has a unique solution. A confirmation is highly appreciated.
Happy hunting, Hajime

Hajime

Posts: 230
Joined: 20 April 2018
Location: Netherlands

### Re: Hunting Hidden Houses

Hi Hajime!

Well done with your novel idea! "Which Windoku" ??

I think your test case has 3 solutions, however:
Code: Select all
`194536728582794613763182495379625184245817369816943257937268541658471932421359876419356728582749613736182495397625184245817369861934257973268541658471932124593876419386725582749613736152498397625184245817369861934257973268541658471932124593876`

Code: Select all
` +-------+-------+-------+   +-------+-------+-------+   +-------+-------+-------+ | 1 9 4 | 5 3 6 | 7 2 8 |   | 4 1 9 | 3 5 6 | 7 2 8 |   | 4 1 9 | 3 8 6 | 7 2 5 | | 5 8 2 | 7 9 4 | 6 1 3 |   | 5 8 2 | 7 4 9 | 6 1 3 |   | 5 8 2 | 7 4 9 | 6 1 3 | | 7 6 3 | 1 8 2 | 4 9 5 |   | 7 3 6 | 1 8 2 | 4 9 5 |   | 7 3 6 | 1 5 2 | 4 9 8 | +-------+-------+-------+   +-------+-------+-------+   +-------+-------+-------+ | 3 7 9 | 6 2 5 | 1 8 4 |   | 3 9 7 | 6 2 5 | 1 8 4 |   | 3 9 7 | 6 2 5 | 1 8 4 | | 2 4 5 | 8 1 7 | 3 6 9 |   | 2 4 5 | 8 1 7 | 3 6 9 |   | 2 4 5 | 8 1 7 | 3 6 9 | | 8 1 6 | 9 4 3 | 2 5 7 |   | 8 6 1 | 9 3 4 | 2 5 7 |   | 8 6 1 | 9 3 4 | 2 5 7 | +-------+-------+-------+   +-------+-------+-------+   +-------+-------+-------+ | 9 3 7 | 2 6 8 | 5 4 1 |   | 9 7 3 | 2 6 8 | 5 4 1 |   | 9 7 3 | 2 6 8 | 5 4 1 | | 6 5 8 | 4 7 1 | 9 3 2 |   | 6 5 8 | 4 7 1 | 9 3 2 |   | 6 5 8 | 4 7 1 | 9 3 2 | | 4 2 1 | 3 5 9 | 8 7 6 |   | 1 2 4 | 5 9 3 | 8 7 6 |   | 1 2 4 | 5 9 3 | 8 7 6 | +-------+-------+-------+   +-------+-------+-------+   +-------+-------+-------+`

Adding one clue nails it to the first solution above:
Code: Select all
`.........5.2...6.3...1.2...3.......4.4.817.6.8.......7...2.8...6.8.7...2...3.....`

Cheers,
MM

Mathimagics
2017 Supporter

Posts: 1585
Joined: 27 May 2015
Location: Canberra

### Re: Hunting Hidden Houses

Same results here.
creint

Posts: 222
Joined: 20 January 2018

### Re: Hunting Hidden Houses

Well done for a novel restriction ...

Can the extra windows overlap in row 5 or column5?

tarek

tarek

Posts: 3747
Joined: 05 January 2006

### Re: Hunting Hidden Houses

Thank you Mathimagics and crient for checking the uniqueness of the solution. Did you try all possible positions of the 9 in the 4 corner boxes en then check for a solution? I did not but with sad result.
And yes tarek, overlapping windows in row 5 and column 5 is possible.

Hajime

Posts: 230
Joined: 20 April 2018
Location: Netherlands

### Re: Hunting Hidden Houses

I used brute-force. I simply enumerated all solutions to the given puzzle (there are 124,402) and looked at each solution grid to see if the sub-windows defined by the 4 relevant 9's had distinct digits. Unsubtle but effective ...

Mathimagics
2017 Supporter

Posts: 1585
Joined: 27 May 2015
Location: Canberra

### Re: Hunting Hidden Houses

Mathimagics wrote:I used brute-force. I simply enumerated all solutions to the given puzzle (there are 124,402) and looked at each solution grid to see if the sub-windows defined by the 4 relevant 9's had distinct digits. Unsubtle but effective ...

Trying to think of how this is done ...

Code: Select all
`For each Sudoku solution:    The location of the 9 cells of each hidden box are constant relative to where the 9 is in boxes 1,3,5,9    if each of these cells has 9 bit key representing the value:    For each box:        A simple OR to all of these  cells will filter them out.     Count only the valid solutionsYou should have 1 solution at the end for a unique puzzle`

tarek

Posts: 3747
Joined: 05 January 2006

### Re: Hunting Hidden Houses

That's basically it ...

Mathimagics
2017 Supporter

Posts: 1585
Joined: 27 May 2015
Location: Canberra

### Re: Hunting Hidden Houses

There are only 9 positions for each hidden box. So 9^4=6561 max. And there are already givens in box 1,3,7,9 and those 4 9's must be on 4 different rows and 4 different columns. So a lot less then 6561, and you have 4 givens 9 in place. Solve those and count the solutions.

Hajime

Posts: 230
Joined: 20 April 2018
Location: Netherlands

### Re: Hunting Hidden Houses

Generating should be easy, first fill randomly the 9s in all the corners and then tell the solver that is must use that as offset for a box constraint. Then find a random solution, does not give always a solution:
Code: Select all
`.......9...........9..................................9..............9...........`

Remove the extra constraints to generate a solution and use the Or constraint.
Then reduce it till after you removed the 9 from the corners you find a minimal single solution:
Code: Select all
`...4......8..95........81...1.....6.2....9...968....7..5...1.....1......8....4...`

Solving: easiest for me was to use an Or constraint for every corner using Z3.
Because of this solver above example puzzle has an unknown rating, probably very hard.
creint

Posts: 222
Joined: 20 January 2018

### Re: Hunting Hidden Houses

Hmmm, if this novel puzzle is far from human solvable (pencil & paper) my mission fails. I try to create with my generator and solver puzzles for humans, not for bits&bytes solvers. They will always succeed.

Hajime

Posts: 230
Joined: 20 April 2018
Location: Netherlands

### Re: Hunting Hidden Houses

The question is. How would rate the puzzle? Creating & solving the puzzle are easy!

tarek

Posts: 3747
Joined: 05 January 2006

### Re: Hunting Hidden Houses

I think HHH puzzles can be rated using SE plus 4 Dynamic Constraints, i.e. when the 9 is solved in B1379 the corresponding constraint will be activated.
1to9only

Posts: 2119
Joined: 04 April 2018

### Re: Hunting Hidden Houses

1to9only wrote:I think HHH puzzles can be rated using SE plus 4 Dynamic Constraints, i.e. when the 9 is solved in B1379 the corresponding constraint will be activated.
From the point where all the 9s are known. The puzzle has to be easy enough to get the 9s with vanilla techniques. What if that fails?

tarek

Posts: 3747
Joined: 05 January 2006

### Re: Hunting Hidden Houses

OP allows 9 in the corner cells (r1c1, etc.), I would probably choose to not allow this so b1379 .ne. h1379.
It is also possible to eliminate some pencilmarks if 9 is solved in b24568, e.g. if 9r4c4 then -9r23c23.
Code: Select all
`+-----------+------| .    .  . | .   .|   +-----------+| . | -9 -9 | . || . | -9 -9 | . |+---|-------+---|| . |  .  . | 9 ||   +-----------+| .`
1to9only

Posts: 2119
Joined: 04 April 2018

Next