▲ | fjfaase 6 days ago | ||||||||||||||||
Solving this kind of puzzles is equal to solving an exact cover. Exact cover is known to be NP-complete. | |||||||||||||||||
▲ | OskarS 3 days ago | parent | next [-] | ||||||||||||||||
Indeed it is, and Donald Knuth spends a substantial part of the latest volume (4B) of The Art of Computer Programming on solving exact cover problems like this using Dancing Links! He presented an earlier version of the algorithm in this legendary article [1], but as good as that article is, the book is even better (and the algorithm improved!). It also has tons of exercises like this. Cannot recommend it highly enough. | |||||||||||||||||
| |||||||||||||||||
▲ | 3 days ago | parent | prev [-] | ||||||||||||||||
[deleted] |