Hacker News new | ask | show | jobs
by foota 500 days ago
Sigh. My friend did this problem on pen and paper and made me feel stupid. Their solution was so wildly clever! It relied on the observation that the sum of the rows of the sudoku board (given the digits in use) is a known fixed value, and went from there (I'll leave the rest as an exercise to the reader to avoid spoilers).
2 comments

The Jane Street page explains the (a?) number theory approach.
This isn't exactly a sudoku board, because they allow for 0.
While it's not a true sudoku board, that invariant still holds. Whichever set of digits you end up using (it'll be the same 9 for rows, columns, and blocks) the sum will be same for all of them. It's also unique to the set of 9 numbers you end up using to solve the puzzle.

If you use 1-9, sum is 45. For anything else, it's 45 - (the unused number).

Yep, I'm aware, hence the given digits part. The whole board is still drawn from 9 digits, it's just that precisely which 9 digits is unknown.