Post Reply 
Vietnamese snake puzzle - Closed
05-20-2015, 01:24 PM
Post: #5
RE: Vietnamese snake puzzle - Closed
Let's assume the 10 variables are named A through I, and that we're doing the standard order of operations here (multiplication and division together from left to right, then addition and subtraction together from left to right).

If we assume that non-integer intermediate results are allowable (e.g. G * H / I can be 1 * 4 / 8), then there are 120 valid solutions (verified via brute force with Heap's algorithm in C# - no, I'm not going to generate 362,880 permutations with a 9-level recursive algorithm on my 48*).

If we stipulate that 13 * B / C and G * H / I must have integer results, then there are 20 valid solutions.


*Although, there is a 3-day weekend coming up...
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 - Dave Britten - 05-20-2015 01:24 PM



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