phil1882 Posted May 13, 2012 Report Share Posted May 13, 2012 so plasmids problem got me to thinking; given a set of integers, smallest being 1, can you always find the optimal change (fewest number of coins)? consider the following set. 1 4 9 25 49 121 169... where you have every prime number squared. try finding the optimal change for... 288 and 1368 and 9408 Quote Link to comment Share on other sites More sharing options...
0 superprismatic Posted May 14, 2012 Report Share Posted May 14, 2012 Here's a couple of answers for each one. They each use the optimal change of 7 coins. 288: 121 121 25 9 4 4 4 169 49 49 9 4 4 4 1368: 961 361 25 9 4 4 4 529 529 289 9 4 4 4 9408: 6889 2209 289 9 4 4 4 5329 2209 1849 9 4 4 4 1 Quote Link to comment Share on other sites More sharing options...
0 phil1882 Posted May 15, 2012 Author Report Share Posted May 15, 2012 nicely done super, somehow i had a feeling you would be the one to solve this :-) Quote Link to comment Share on other sites More sharing options...
Question
phil1882
so plasmids problem got me to thinking; given a set of integers, smallest being 1, can you always find the optimal change (fewest number of coins)?
consider the following set.
1 4 9 25 49 121 169...
where you have every prime number squared.
try finding the optimal change for...
288 and
1368 and
9408
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.