Upward Diagonals Sudoku (UDS) - an NP Problem
There are two types of Sudoku games: the standard one, and the Diagonal Sudoku. For the latter, it includes the standard rules plus the additional rule that the two main diagonals must also only contain unique numbers. I'd like to propose a third type: Upward Diagonals Sudoku, or UDS. In an UDS, the standard Sudoku rules apply, but we add one more rule: all the upward diagonals, all of them, must also only have unique numbers. The solution to this problem is again using Backtracking, but I liked to create a specific easy, scalable function to add new rules, which I highlight here . This way, if we want to add a different rule in the future, all we need is to craftly modify this function. This seems to be (arguably) an NP problem. When I asked for solutions using both Claude.ai and ChatGPT o1, they really struggle and can't really find a solution for me. It is interesting that eventually they give up and produce a code (without me asking for a code) that would arguably generate ...