For the sake of this exercise, let's generalize the rules of the popular
Sudoku game.
The game revolves around a
n2 x
n2 matrix (that's
n-squared) divided into
n x
n squares (called
subregions). The matrix must be filled such as each row, each column and each subregion is filled with each integer ranging from 1 to
n2 (appearing exactly only
once).
For the record, the classical Sudoku you're probably familiar with is a
3-Sudoku.
Easy problem
What is the total number of valid solutions for a 2-Sudoku?
Hard problem
What is the total number of valid solutions for a 3-Sudoku?
Very hard problem
Generalize the solution. Write a function that returns the total number of solutions for a n-Sudoku.
Remarks
I believe there are still no known solutions for the general solution.
But I'd love to exchange ideas on how we could do this.
EDIT: After some Googling (is
Wikipedia-ing a word?) I came across
a paper showing that the general solution is a NP-Complete problem. It doesn't really change much ... or does it?