A worker is to work for you for seven days. Every day, you must pay him 7 1 of a gold bar at the end of the day. You must pay the worker 7 1 every day, without skipping any days. He cannot have more gold than he has to have the end of a day. However, the worker is saving up for a new house so he will not spend the gold bars (therefore, he can return them).
What is the minimum number of cuts needed so that you can pay the worker so that he has the amount of gold he needs at the end of each day?
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.
Ingenious! Bonus question: Can you express the answer in terms of n if I replace all the fractions 7 1 by 1 5 1 ?
If the value of denominator in the fraction is expressed as any value greater than or equal to 2^n but lesser than 2^(n+1) the minimum number of cuts needed would be n
This works because binary.
Since the worker won't spend the gold till he finishes his 7 working days, then there will be 2 cases/states for the bar fractions you cut .. either with you or with him
From the worker’s point of view
Having the bar fraction means ..... 1
Not having the bar fraction means .. 0
So
7 1 0 = 1 1 1 2
Which means 3 pieces or 2 cuts
So as a generalization it’ll be
S = 2 n
n = R o u n d u p ( L o g 2 ( S ) )
c = n − 1
where:
S : is the whole fee
n : is the number of pieces that fee cut into
c : is the number of cuts
Problem Loading...
Note Loading...
Set Loading...
Cut the bar so that it is cut into 1/7, 2/7, and 4/7 pieces [this should take two cuts].
On the first day, pay him the 1/7.
On the second day, pay him the 2/7 bar and get the 1/7 as change from the worker.
On the third day, give him the 1/7 bar that you received as change yesterday.
On the fourth day, give him the 4/7 bar and receive the 1/7 and 2/7 bar as change.
On the fifth day, give him the 1/7 bar.
On the sixth day, give him the 2/7 bar and receive the 1/7 bar as change.
On the seventh fay, give him the 1/7 bar.
Everyone should be happy.