Gold Bars

Logic Level 3

A worker is to work for you for seven days. Every day, you must pay him 1 7 \frac 17 of a gold bar at the end of the day. You must pay the worker 1 7 \frac 17 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?

2 4 6 3 1 5

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.

2 solutions

Daniel Oh
May 11, 2015

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.

Moderator note:

Ingenious! Bonus question: Can you express the answer in terms of n n if I replace all the fractions 1 7 \frac 17 by 1 15 \frac1{15} ?

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

Satyen Nabar - 6 years ago

This works because binary.

Raghav Vaidyanathan - 6 years ago

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 \text{From the worker's point of view}

Having the bar fraction means ..... 1 \text{Having the bar fraction means ..... 1}

Not having the bar fraction means .. 0 \text{Not having the bar fraction means .. 0}

So \color{#D61F06}{\textbf{So}}

7 10 = 11 1 2 \large\color{#3D99F6}{7_{10}=111_2}

Which means 3 pieces or 2 cuts

So as a generalization it’ll be \color{maroon}{\textbf{So as a generalization it'll be}}

S = 2 n \large S=2^n

n = R o u n d u p ( L o g 2 ( S ) ) \large n=Roundup(Log_2(S))

c = n 1 \large c=n-1

where: \color{#D61F06}{\textbf{where:}}

S : is the whole fee \color{#3D99F6}{S:}\text{is the whole fee}

n : is the number of pieces that fee cut into \color{#3D99F6}{n:}\text{is the number of pieces that fee cut into}

c : is the number of cuts \color{#3D99F6}{c:}\text{is the number of cuts}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...