Post Reply 
Interesting little loop optimization exercise
05-15-2015, 01:09 PM (This post was last modified: 05-15-2015 01:09 PM by Katie Wasserman.)
Post: #6
RE: Interesting little loop optimization exercise
(05-15-2015 01:41 AM)Paul Dale Wrote:  Well, we can place an immediate restriction on some of the coins.
.....
I think we're down to the unique solution without any searching or looping Smile


I did this similarly but didn't want to post too soon:


a+b+c+d+e = 100
- Since the sum of three of these must be 40, they must all be 20 or one must be 50.
- Since the sum of three of these must be 30, they can't all be 20, so there's one 50.
- Now a+b+c+d = 50, and the sum of three must be 30 so there must be at least one 20. and the sum of three must be 40 so there must be at least one 10.
- Now a+b = 20, which only has one solution.

-katie

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


Messages In This Thread
RE: Interesting little loop optimization exercise - Katie Wasserman - 05-15-2015 01:09 PM



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