Arun has a gold bar of mass 63 grams. He hired a daily worker, and promised to pay 1 gram of gold for each day of work. The worker will be working for 63 days, which means he will end up with the entire gold bar at the end. However, Arun cannot simply pay the worker at the end of the time period, but has to adhere to union laws.
Local union laws require that the worker must be paid daily, meaning that after X days of working, the worker must posses X grams of gold. What is the minimum number of pieces that Arun has to divide the gold bar into, to ensure that he can pay the daily working in accordance with union laws?
Note: Arun has full control over the size of the pieces, and may be divide the gold bar in any manner. For example, he can divide the gold bar into pieces of 5 , 6 and 52.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
If he pays daily 1g, there will have to be 1g each day, each gram representing a piece broken. Don't understand your problem sir.
Log in to reply
Actually, the first day he will give the 1g piece, the second day he will take back the 1g piece and give him the 2g piece, the third day he will give both . . . and so on. Finally, he will give all the pieces which add up to 63 grams.
Log in to reply
Oh, right, didn't think about the worker's giveaway
Log in to reply
@João Arruda – You shouldn't have because that is a ridiculous scenario. Problem was not set up correctly to give correct answer.
i thought 63 pieces, and not 6 steps...
Log in to reply
It meant the number of pieces Arun had to break the block to pay.
it is just a question based on the fact that any no. can be shown as sum of non negative powers of 2
So the expression can be defined as 2 n − 1 , where n is the number of pieces and the expression gives the total quantity. Putting the values of 0 to n in the expression gives the parts.
Log in to reply
Wonderful. But could you please explain how you defined the expression? Mathematically/Algorithmically, anything is fine
The answer is correct but can you please explain How you get that answer??
Log in to reply
As someone had earlier mentioned . . . . By dividing the number into binary digits (base 2) . . .
the worker will sell the gold for his living. :D. The problem could have been explained by other means.
Drat...I made a careless mistake, I answered 5.
2 lakh INR in 2 moths ?? No one will work for that low a wage.
The solution to this problem is 63. If you want the answer you be 6, you have to remove the part of it that says "Local union laws require that the worker must be paid daily." In the solution where 6 is the answer, the worker is not paid daily (only paid 6 times out of the 63 days.)
Log in to reply
No, he's still paid daily. With six fingers, you can (binarily) count to 63, which is pretty much what is happening here. E.g. on the tenth day, he will have to possess 10 grams of gold, which is realized by Arun taking the 8+1 grams the worker already had and giving back 8+2. On the eleventh day: 8+2+1, twelfth: 8+4, ..., 62rd: 32+16+8+4+2 and so on.
Just use binary, as the gold piece has 2 stats either with the worker our Arun (as Member Wilcox said)
2 0 + 2 1 + 2 2 + 2 3 + 2 4 + 2 5
1 g + 2 g + 4 g + 8 g + 1 6 g + 3 2 g = 6 3 g
Minimum # of pieces= 6
Information theory - each gram of gold can only have 2 states: with Arun or with the worker. So the minimum number of pieces is reached by making pieces that are powers of 2. And you can know what pieces to give the worker by converting any number into binary. Example: on the 21st day we see that 21 in binary is 101010. That means that Arun holds the 32, 8, and 2 gram pieces, while the worker holds the 16, 4, and 1 gram pieces.
Of course this problem's solution is a bit silly since it requires the worker to keep the gold and to be able to trade it back. In real life, a worker cannot afford to wait 63 days to spend his wages. So in that case the boss better make 64 pieces.
Problem Loading...
Note Loading...
Set Loading...
the pieces will be 1g , 2g , 4g , 8g , 16g , 32g
this problem is basically just dividing the number 63 into binary digits ( base 2 ).