Results 1 to 7 of 7

Thread: A sweet puzzle I can't finish: Spend exactly 10 on exactly 14 sweets, given that...

  1. #1
    New Member
    Join Date
    Feb 2018
    Posts
    1

    A sweet puzzle I can't finish: Spend exactly 10 on exactly 14 sweets, given that...

    I am trying to work out the answer to a puzzle. I must so exactly 10 on exactly 14 sweets. I must buy at least 1 of every sweet.
    The sweets cost a1.50 b1 c0.10 and d 0.05.

    I need to find three answers but can only find 2.
    I've found 5a+2b+3c+4d and 3a+5b+4c+2d.

    I've found lots of 10 with 13 or 15 sweets and some 10.05 etc with 14. What am I missing in trying to figure this out please?

    Is there a way I should be using to find the latest one?

  2. #2
    Full Member
    Join Date
    Nov 2017
    Location
    Rochester, NY
    Posts
    567
    Quote Originally Posted by Dottyd View Post
    I am trying to work out the answer to a puzzle. I must so exactly 10 on exactly 14 sweets. I must buy at least 1 of every sweet.
    The sweets cost a1.50 b1 c0.10 and d 0.05.

    I need to find three answers but can only find 2.
    I've found 5a+2b+3c+4d and 3a+5b+4c+2d.

    I've found lots of 10 with 13 or 15 sweets and some 10.05 etc with 14. What am I missing in trying to figure this out please?

    Is there a way I should be using to find the latest one?
    Can you show what you did to find these solutions? I can probably recognize something you are missing, if I see what you didn't miss!

  3. #3
    Elite Member
    Join Date
    Feb 2004
    Location
    Ottawa, Ontario
    Posts
    16,808
    So equations are:
    1.5a + b + .1c + .05d = 10

    a + b + c + d = 14 (where a>0, b>0, c>0, d>0)

    Agree with your 2 solutions.
    However, like you, I can't find a 3rd solution.

    Can you check with whoever gave you this puzzle...
    Let us know....curious
    I'm just an imagination of your figment !

  4. #4
    New Member
    Join Date
    Jan 2018
    Location
    Boston
    Posts
    34
    How I would do it:

    Use spreadsheet software (excel or google sheets) to avoid mistakes in calculations.

    Systematically go through all possible values of a and b calculating how much left for 0.1c + 0.05d. For each such remainder try to find suitable c and d so that the 2 sums are correct.

    To speed up skip some of the smaller values of b since it would leave too much for c and d. E.g. with a = 1 we need pretty high b to get the remainder low enough to get c at least under 14.

    Sorry, don't see anything other than this brute force approach.

    P.S. Couldn't find the 3rd solution either.

  5. #5
    Elite Member
    Join Date
    Feb 2004
    Location
    Ottawa, Ontario
    Posts
    16,808
    Thanks for confirming Lev.

    Easier to use 150a + 100b + 10c + 5d = 1000
    I'm just an imagination of your figment !

  6. #6
    Elite Member
    Join Date
    Apr 2005
    Location
    USA
    Posts
    9,078
    Quote Originally Posted by Dottyd View Post
    I am trying to work out the answer to a puzzle. I must so exactly 10 on exactly 14 sweets. I must buy at least 1 of every sweet.
    The sweets cost a1.50 b1 c0.10 and d 0.05.

    I need to find three answers but can only find 2.
    I've found 5a+2b+3c+4d and 3a+5b+4c+2d.

    I've found lots of 10 with 13 or 15 sweets and some 10.05 etc with 14. What am I missing in trying to figure this out please?

    Is there a way I should be using to find the latest one?
    Personally, I'd go with Generating Polynomials for a complete count.

    Buy one of each: 10.00 - 1.50 - 1.00 - 0.10 - 0.05 = 7.35
    Let's do it in Pence, shall we?
    (1 + x^150 + x^300 + x^450 + x^600)
    (1 + x^100 + x^200 + ... x^600 + x^700)
    (1 + x^10 + x^20 + x^30 + ... + x^730)
    (1 + x^2 + x^4 + x^6 + ... + x^734)

    Multiply those and check the coefficient on x^735.

    Come on. It will be fun!
    "Unique Answers Don't Care How You Find Them." - Many may have said it, but I hear it most from me.

  7. #7
    Elite Member stapel's Avatar
    Join Date
    Feb 2004
    Posts
    15,656

    Cool

    Quote Originally Posted by Dottyd View Post
    I am trying to work out the answer to a puzzle. I must so exactly 10 on exactly 14 sweets. I must buy at least 1 of every sweet.
    The sweets cost a1.50 b1 c0.10 and d 0.05.

    I need to find three answers but can only find 2.
    I've found 5a+2b+3c+4d and 3a+5b+4c+2d.

    I've found lots of 10 with 13 or 15 sweets and some 10.05 etc with 14. What am I missing in trying to figure this out please?

    Is there a way I should be using to find the latest one?
    I suspect "the" (intended) solution method will involve some guess-n-check, just as in the case of similar exercises. (To locate these similar exercises, enter "farmer buys animals", without the quote-marks, into the "Search" box in the upper right-hand corner of the page.) Give yourself some time, and have fun!
    Last edited by stapel; 02-11-2018 at 06:06 PM. Reason: Explaining how to do search for relevant threads, since forum's link doesn't actually work. Grrrr!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •