# Can you solve this math problem (details inside)?

Asked by Mimishu1995 (13344) June 6th, 2014

Just something I found on the internet.

There is a candy shop. A candy is worth 2 cents. And in this shop 2 candy wraps can be exchanged for one candy.

You have twenty cents. How many candies can you buy there?

Assume that this is an ideal world.

Observing members: 0 Composing members: 0

17 in an ideal world.

But just because something is worth 2¢, that won’t keep people from selling it for \$2, so it presumes that the original purchase was at 2¢ each, something I’m too cynical to assume.

jerv (31025)

@jerv Have changed the description a bit :p

Mimishu1995 (13344)

You can ‘get’ 18, but you can only ‘buy’ 10.

bossob (5899)

@bossob That too, but I didn’t feel like adding semantics to cynicism.

jerv (31025)

You can eat up to 19 candies. First, you buy 10 candies with your 20 cents. Then, the following steps occur:

10 candies, 0 wrappers
0 candies, 10 wrappers
5 candies, 0 wrappers
0 candies, 5 wrappers
2 candies, 1 wrapper
0 candies, 3 wrappers
1 candy, 1 wrapper
0 candies, 2 wrappers
1 candy, 0 wrappers
0 candies, 1 wrapper

This is the end, since you only have a single wrapper. Add up the number of candies and you get 19.

PhiNotPi (12611)

@PhiNotPi Oops! I forgot the “remainders”.

jerv (31025)

Also, the general answer is 2N-1, where N is the number of candies you start out with (which was 10 in this case).

PhiNotPi (12611)

Leave it to our resident mathematician to beat me to the punch!

Strauss (19037)

20—split the last wrapper in half.

dxs (14330)

I’m not starting any argument here, since I can’t find the answer to the problem on the original website, but I think I agree more with @bossob‘s idea of buying 10 candies. The question is “How many candies can you buy” not get. You can only buy 10 candies, and the other ones can only be obtained by “exchanging”.

Well, for someone who is hopeless at math and into wordplay like me, 10 is a reasonable answer.

Mimishu1995 (13344)

I myself wondered where the “gotcha” here was; whether it was the leftover wrappers that I missed and @PhiNotPi got, or the word “BUY”.

jerv (31025)

@Mimishu1995 “Buying” does not necessarily have to involve money. Thus, you are also technically “buying” a candy with the two wrappers.

dxs (14330)

@dxs Enough people think otherwise that it’s a semantic minefield.

jerv (31025)

@jerv In that case, we must establish a definition for the term buy in order to solve this problem.

dxs (14330)