Hacker Newsnew | past | comments | ask | show | jobs | submit | smtross's commentslogin

The following should be all the smallest solutions for [7, 5, 3]:

753 7512 34512 3462 34152 3417 357

753 7512 762 7152 34152 3417 357

753 7512 762 3462 34152 3417 357

753 7143 25143 2643 21543 2157 357

753 7143 25143 2643 267 2157 357

753 7143 25143 2517 267 2157 357

Discovered using SAT/SMT


I encoded it in SMT (source code https://github.com/rdaly525/hnpuzzle). Fun little challenge!

Turns out there are 6 unique solutions for [7,5,3] in 6 steps


I created a solver using a SAT/SMT solver that guesses a solution that is consistent with all the previous guesses and their corresponding feedback. It always returns a solution in a small number of guesses. I don’t think it is the optimal solving algorithm but it was a fun exercise!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: