Here is a puzzle that I have been having difficulty with. Let me know what you think.
Your friend and you are in a standard American mall and see a vending machine. Your friend pulls out a crisp $1 bill to buy a 95 cent candy bar, but then realizes that the machine takes exact change only. Your friend turns to you and asks if you could break a dollar. You reach into your pocket and fish out 6 coins, which add up to $1.15 saying, "Well, with this amount I should be able to break a bill ... but it appears that I cannot!" Upon further examination, you see that you cannot give change for a 50 cent piece, a quarter, a dime, or even a nickel with the 6 coins you have.
Frusturated, your friend asks you to just buy him the candy bar and you realize... you cannot buy the 95 cent candy bar.
What are the 6 coins that you have?
My attempt is in the spoiler. Only read the spoiler if you attempted the puzzle by yourself to garuntee a fresh mind!
Spoiler
What I thought was that it is a 50 cent piece, a quarter, and four dimes. The only way this could work (for him not to be able to buy the 95 cent candy bar) is if at least 3 of the dimes are Canadian currency.
I'm not sure this is even possible.
You can't have more than 1 $.50, because then you'd be able to break $1.
You can't have more than 1 $.25, because then you'd be able to break $.50.
With 1 $.50 and 1 $.25, you need $.40 more in four coins. The only way this is possible is with 4 $.10. This, however, allows you to add up to $.95.
Without one of the $.50 or $.25 (or both of them), it's impossible to add up to $1.15 in only six coins.
Am I interpreting the question incorrectly?..
You reach into your pocket and fish out 6 coins, which add up to $1.15 saying, "Well, with this amount I should be able to break a bill ... but it appears that I cannot!" Upon further examination, you see that you cannot give change for a 50 cent piece, a quarter, a dime, or even a nickel with the 6 coins you have.
conditions:
total = 1.15
6 coins
no subset of more than 1 totals $1
no subset of more than 1 totals $0.50
no subset of more than 1 totals $0.25
no subset of more than 1 totals $0.10
no subset of more than 1 totals $0.05
ok.
I am going to assume that, given the question refers to a 50 cent piece, the possible coin values are
0.01 0.05 0.10 0.25 0.50
Basically I start with the largest single coin satisfying the conditions
0.50
Then add the next largest while considering the conditions
0.25
Then the next...
0.10 + 0.10 + 0.10 + 0.10
test it:
total = 1.15
6 coins = true
no subset totals $1
no subset totals $0.50 (except a single 50c coin, which doesn't count)
no subset totals $0.25 (again except the single coin)
no subset of $0.10
of course no subset of $0.05
So:
1 50 cent piece
1 quarter
4 dimes
Unfortunately in doing this I missed the last condition:
No subset can total $0.95
As far as I can tell, this makes the question unsolvable.
With (0.50, 0.25, 0.10) as the first 3 coins:
- another 50 cent coin fails the $1 rule
- another 25 cent coin fails the $0.50 rule
- another 10 cent coin fails the $0.95 rule
- as the current total is 0.85, you cannot make up the rest with 3 nickels
There's no solution unless there's a coin denomination other than $1, $0.25, $0.10, $0.05 and $0.01.
Here's proof.
Observation 1: $1 coin is not one of the 6 coins. Because adding up to exactly $0.15 from 5 coins is impossible.
Observation 2: You can have at most 1 $0.50 coin. Because if you had more than 1 $0.50 coin then you could change for $1 bill.
Observation 3: You can have at most 1 $0.25 coin. Because if you had more than 1 $0.25 coin then you could change for $0.5.
Theory A: One of the 6 coins is a $0.50 coin.
Implication: The other 5 coins add up to exactly $0.65.
Theory a: One of the 5 coins is a $0.25 coin.
Implication: The other 4 coins add up to exactly $0.40.
Then the 4 remaining coins must be all $0.10 coins. Because if they were a lesser demonination they would add up to less than $0.40.
However this combination can produce exact change for $0.95 with 1 $0.50, 1 $0.25 and 2 $0.10 and therefore is wrong.
Conclusion a: None of the 5 coins is a $0.25 coin.
Implication: The highest possible denomination for the 5 coins is $0.10. However 5 * $0.10 < $0.65.
Conclusion A: None of the 6 coins is a $0.50 coin.
Theory B: One of the 6 coins is a $0.25 coin.
Implication: The other 5 coins add up to exactly $0.90. Since there cannot be more than 1 $0.25, the highest possible denomination of these 5 coins is $0.10.
However 5 * $0.10 < $0.90.
Conclusion B: None of the 6 coins is a $0.25 coin.
Therefore the highest possible denomination for the 6 coins is $0.10.
Canadian dimes are thinner than American ones, and won't work in American vending machines, so if you have 3 of those, plus american $0.50, 0.25, 0.10 it works.
Or they realize they're Canadians and all the coins they have are Canadian. In an American mall.
The currency type possessed is never mentioned. And looking at user flags...
Anyway, the six coins are a 50 cent piece, a quarter, and 4 dimes.
95 cents is just the goal. The challenge is to exchange the $1 bill for coins (Can't do it).
Figured out the actual reason you can't buy it.
American vending machines don't accept coins larger than quarters.
Considering how uncommon 50 cent pieces are anymore, it makes sense.