Post Reply 
Vietnamese snake puzzle - Closed
05-21-2015, 01:18 PM (This post was last modified: 05-21-2015 01:23 PM by fhub.)
Post: #20
RE: Vietnamese snake puzzle - Closed
(05-21-2015 11:53 AM)Tugdual Wrote:  I think there are 128 in my list and this is what Haskell returned.
Do you expect more?
Yes, I do expect more. Wink

Your list is missing 8 additional solutions (due to rounding errors), there are 136 solutions in total - here the missing 8:
183745269
183745629
269851473
269851743
783145269
783145629
869251473
869251743

If you rewrite your equation (avoiding the 2 divisions by multiplying with the 2 denominators), then your program will give you all 136 solutions.
Edit: Or change the test to something like abs(expr-66)<1e-3 ...

Franz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Vietnamese snake puzzle - Dave Britten - 05-20-2015, 11:27 AM
RE: Vietnamese snake puzzle - Gerald H - 05-20-2015, 11:33 AM
RE: Vietnamese snake puzzle - Gerald H - 05-20-2015, 12:58 PM
RE: Vietnamese snake puzzle - Closed - fhub - 05-21-2015 01:18 PM



User(s) browsing this thread: 1 Guest(s)