Fog Creek Software
Discussion Board




brain teaser

A piggy bank contains only coins.  All of the coins are half-dollars except two; all the coins are quarters except two; and all of the coins are dimes except two.  What is the total amount of money in the piggy bank.

Nancy Cahn
Monday, September 30, 2002

Suppose the bag contains only two coins which are two 1 dollar coins. Then all the conditions are satisfied and the total amount is 2 dollars.

Vincent Chittilappilly
Tuesday, October 01, 2002

That's why aha:!!!!! questions are pointless in an interview...  If the intereviewer asked this, and got the dollar coin answer, he'd think you were wrong instead of realizing how unconventionally correct your answer really is...

Michael H. Pryor
Tuesday, October 01, 2002

I think a more important question is how much interest are you earning by storing your savings in a piggy bank.  By my calculation, none.

Guy Incognito
Tuesday, October 01, 2002

the total is 85 cents with one dime, one quater and 1 half dollar

Maggie
Wednesday, October 02, 2002

Is there a general solution for this?

Say you have 3 coins in the bank

# half dollar coins = 3 - 2 = 1
# quarter coins = 3 - 2 = 1
# dime coins = 3 - 2 = 1

What about 4 coins
# half dollar coins = 4 - 2 = 2
# quarter coins = 4 - 2 = 2
# dime coins = 4 - 2 = 2

which would result in 6 coins total (which is greater than the four coins)

Tim
Wednesday, October 02, 2002

Or as my 14 year-old said, "It just has 2 pennies"

Wayne
Friday, October 04, 2002

From what I can see, all means one.
So there are 3 coins in the bank; .50, .25, .10.
All my coins are .50 except 2, gives you .25 and .10.
All my coins are .25 except 2, gives you .50 and .10.
All my coins are .10 except 2, gives you .50 and .25.

So the total will give you:  .50 + .25 + .10 = .85

Joel C. Taitt
Tuesday, October 08, 2002

So this question is incomplete.  In order for there to be one solution, there needs to be a statement like "There are three coins in the bank." Or "What is the most money can you get from this piggy bank, under these constraints?"

Otherwise it's an AHA, and it tests personality, not problem solving.

PS.
There should also be a statement about it being American currency.  I would want two Sumerian coins in the piggybank, so I can sell them to a museum!

Fred
Tuesday, October 29, 2002

Fred, it is complete.

There can only be one solution that satisfies the three premises, and the answer is $0.85

tapiwa
Monday, November 11, 2002

*  Recent Topics

*  Fog Creek Home