Can you fill a 16x16 sudoku grid such that adjacent numbers have compatible binary layouts?

61 Views Asked by At

I had the thought about a year ago, but I still haven't come up with a solution for it yet.

Every number from $0$ to $15$ can be expressed in binary with four digits, but arrange the digits in a $2 \times 2$ grid where the 8s place is top left, 4s is top right, 2s is bottom left and 1s is bottom right.

Putting two of them side by side, whether or not the left number has 4s or 1s must correspond with whether the right number has 8s or 2s, respectively. (The last number must also wrap to the first number as well, though I feel this is guaranteed if all others match.)

One such row, as an example, is: 0 1 2 4 8 5 11 3 6 9 7 15 14 12 13 10

And vertically, the top number's 2s and 1s must correspond with the bottom number's 8s and 4s, respectively.

Do you feel that it's possible to fill a 16x16 grid, where each number from 0-15 is present exactly once in every row and column? I've gotten close with using a genetic algorithm, but it eventually begins repeating numbers. My other thought has been to produce every permutation of a string from 0-15, gather all that follow horizontal adjency rules, and insert them below one another hoping for a match. I'm fine if it's a bust, but I've been searching for answers for a while now. Thank you for any input!

1

There are 1 best solutions below

1
On BEST ANSWER

By brute force, I came across this solution (among others):

a b c d e f g h i j k l m n o p
0 1 2 4 9 3 6 12 8 5 11 7 15 14 13 10
2 4 8 0 5 15 10 1 3 6 12 13 14 9 7 11
9 2 1 3 6 12 8 4 13 10 0 5 11 7 15 14
5 11 7 15 10 1 2 0 4 9 3 6 12 13 14 8
6 12 13 14 8 4 9 2 1 7 15 10 0 5 11 3
10 0 5 11 3 2 4 9 7 15 14 8 1 6 12 13
11 3 6 12 13 10 0 5 15 14 9 2 4 8 1 7
14 13 10 1 7 11 3 6 12 8 4 9 2 0 5 15
8 5 11 7 15 14 13 10 0 1 2 4 9 3 6 12
3 6 12 13 14 9 7 11 2 4 8 0 5 15 10 1
13 10 0 5 11 7 15 14 9 2 1 3 6 12 8 4
4 9 3 6 12 13 14 8 5 11 7 15 10 1 2 0
1 7 15 10 0 5 11 3 6 12 13 14 8 4 9 2
7 15 14 8 1 6 12 13 10 0 5 11 3 2 4 9
15 14 9 2 4 8 1 7 11 3 6 12 13 10 0 5
12 8 4 9 2 0 5 15 14 13 10 1 7 11 3 6

Each row and each column is a permutation of $0..15$ and the binary constraints between adjacent values are satisfied.