Figure out which region of sudoku the item is in

122 Views Asked by At

Suppose we have hyper sudoku.

enter image description here

In the dark gray areas, we can have 1-9 only once. Therefore, when solving a sudoku graph, I need to figure out what region to look over, to see if any repeats occur.

What is the mathematical expression I can use to find this "region"?

For example, given that the top left $1$ is $(0,0)$, the circled $9$ is at $(2,2)$, where row is $2$, col is $2$.

This region spans from $(1,1)$ to $(3,3)$.

Similarly, the $1$ circled in the bottom left located at $(6,5)$ is spanning region $(5,5)$ to $(7,7)$.

This is clear from visual, but for a mathematical expression, what can be used to figure out the region?

I assume mod must be used, but cannot think of the expression that would work for all cases.

1

There are 1 best solutions below

2
On BEST ANSWER

For a problem this small it is probably easier to just list the four regions. The bottom left would be row in $[5,7]$ column in $[1,3]$

If you want a fancy looking math formula or have a larger grid it would be $[4k+1,4k+3]$ in each direction.