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

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 a£1.50 b£1 c£0.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. Originally Posted by Dottyd
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 a£1.50 b£1 c£0.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. 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.

4. Originally Posted by Dottyd
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 a£1.50 b£1 c£0.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!

5. Originally Posted by Dottyd
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 a£1.50 b£1 c£0.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!

#### Posting Permissions

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