[FUN] Cheryl's birthday; solved using Haskell/SBV

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[FUN] Cheryl's birthday; solved using Haskell/SBV

Levent Erkok
For those of us who'd rather have Haskell do the thinking for us:


Honestly, this is more an exercise in how to formalize such puzzles as opposed to demonstrating the capabilities of SBV or SMT-solvers in general; but fun nonetheless. The backend SMT solver (I used Z3) solves the puzzle instantly.



PS. Thanks to Amit Goel for suggesting the formalization strategy used in the encoding.

Haskell-Cafe mailing list
[hidden email]