Thursday, August 28, 2008

gold bar problem

Q: You've got someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?

A: you need 1 for the first day
you need 2 for the second day.
so you have 1, 2, 4
and can pay 1, 2, 1+2, 4, 4+1, 4+2, and 4+1+2 for the seven days.

No comments: