1

Ask HN: Which, if any, AIs can code a correct solution to this puzzle?

You are given an array of n x n integers.

The goal is to end up with an array in which all entries are equal.

Four kinds of moves are allowed:

(1) rotate a row

(2) rotate a column

(3) add 1 to all entries in a row

(4) add 1 to all entries in a column

Show the goal is achievable if and only if the sum of the numbers in the initial configuration is congruent to 0 mod n.

Also write a python program to solve the puzzle whenever it is possible to do so.

The real challenge, for humans as well, is to code an efficient solution. Which probably requires solving the first part.

3 months agotromp

What operation or transformation does rotate mean?

3 months agocuriousObject

It's just a rotation on a single column or a single row. This means you would shift the items one position with wrap around.

3 months agoamichail

Thanks. I asked this to help you make your question clearer if you resubmit it.

It’s an interesting question for HN, so you should try resubmitting it

Perhaps there are some useful ideas in this code: https://www.chiark.greenend.org.uk/~sgtatham/puzzles