Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How on earth do you create a puzzle like that? Coming up with the rules it's presumably simple to generate solutions with a computer program, but how do you then work out the cells which need to be filled in order to not only minimally describe a single correct solution, but also leave a reasonable deductive pathway to that solution?

I think that's what boggles me most about this, the deductive pathway that's been created by the puzzle creator is a complete joy in its unfolding.



Sudoku at its heart is a graph colouring problem. When you add the new constraints, it changes the connectivity of the graph. This sudoku, with all of its extra constraints, becomes a highly connected graph which greatly reduces the number of possible valid puzzles. Throw in the fact that the grid is already symmetric about both axes of reflection and rotationally symmetric about the centre and that further constrains the set of valid puzzles.

I'm sure you could write a program to take all these constraints and generate a ton of puzzles and then scroll through them to find ones that look great. It also wouldn't be too difficult to sort them in ascending order of givens.


Speaking of great-looking puzzles, this youtube channel covered a visually stunning pi day sudoku some time ago. As you said, it uses extra constraints to reduce connectivity, but still, I find it amazing that the digits of pi can fit so well into a puzzle. (Pi begins at the top and moves clockwise.)

    +-----v-----+
    |   |431|   |
    |  8|   |4  |
    | 3 |   | 1 |
    |---+---+---|
    |2  |   |  5|
    |3  | 6 |  9|
    |9  |   |  2|
    |---+---+---|
    | 7 |   | 6 |
    |  9|   |5  |
    |   |853|   |
    +-----------+
https://www.youtube.com/watch?v=N41yZsxIsK8


+1 for the great formatting.


There is a pattern in the solution: Consecutive numbers are separated by one field and enumerated horizontally from the left to the right, wrapping around the edges, i.e. ..._4_3_2_1.

Every line of the solution has the same sequence of numbers, shifted by 4 places to the left relative to the line above it.

This makes me believe the construction is based on a clever observation and repetition of a pattern.


Alternatively, count up by 4 left to right (aka your -1 every two squares), and count up by 3 top to bottom within a box.


I don’t have the math background to assess the accuracy of these replies, but they might explain it.

https://twitter.com/NikhilBukowski/status/126262285333933670...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: