Nickleaton / sudoku

0 stars 0 forks source link

2x2 Entropy #254

Open Nickleaton opened 1 month ago

Nickleaton commented 1 month ago

https://www.youtube.com/watch?v=yYg3b2x2xxg

https://sudokupad.app/sqjj2jwvbz

Entropy[low, x, y] = Cell [x, y, 1] + cell [x, y, 2] + cell [x, y, 3] Entropy[mid, x, y] = Cell [x, y, 4] + cell [x, y, 5] + cell [x, y, 6] Entropy[high, x, y] = Cell [x, y, 7] + cell [x, y, 8] + cell [x, y, 9]

1 <= Entropy[low, x, y] + Entropy [low, x+1, y] + Entropy [low, x, y+1] + Entropy [low, x+1, y+1] <= 2 1 <= Entropy[mid, x, y] + Entropy [mid, x+1, y] + Entropy [mid, x, y+1] + Entropy [mid, x+1, y+1] <= 2 1 <= Entropy[high, x, y] + Entropy [high, x+1, y] + Entropy [high, x, y+1] + Entropy [high, x+1, y+1] <= 2

for x in range(1,max-1), y in range (1, max-1)

The >= 1 constraint is sufficient. The <= 2 is extra because you could have two lows, one mid, one high. It's an extra restriction

Nickleaton commented 1 month ago

There is probably a modulo version of it too.