[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:

https://gist.github.com/LeventErkok/654a86a3ec7d3799b624

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.

Enjoy..

-Levent.

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



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe