# Google Interview Question – Gold for 7 days of Work - Videos

1
178

Gold for 7 days of Work Puzzle:
You’ve got someone working for you for seven days and a gold bar to pay them. You must pay the worker for their work 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? (Assuming equal amount of work is done during each day thus requiring equal amount of pay for each day)

As this question is a bit vague, here is a more precise version you can solve.

In this video: Google Interview Question –

The trick is not to try and how to cut in such a way to make 7 equal pieces but rather to make transactions with the worker. Make two cuts on the gold bar such that you have the following sizes of bars.

1/7, 2/7 and 4/7. For convenience sake, I would just refer to the bars as 1, 2 and 4., I have tried to simplify the problem statement of ” Gold for 7 days work” which is a “Google Interview Question”
At the 2nd part of the video i have discussed one of many wrong solutions to the ” Gold for 7 days work”
At the 3rd part of the video i have discussed the solution to this “Google interview question”
I tried to simplify as much as possible to give a insight to solve similar problems like “Gold for 7 days work”
I will upload similar videos in my channel soon.
As 7 = 1 + 2 + 4, this implies there are only 2 divisions (cuts).

Day 1: Give  and you have [2+4]

Day 2: Give  and take back . You have [1+4]

Day 3: Give [1+2] and you have 

Day 4: Give  and take back [1+2]. You have [1+2].

Day 5: Give [1+4] and you have 

Day 6: Give [2+4] and take back . You have 

Day 7: Give [1+2+4] and you have nothing!

The same trick can be applied to:

15 Days = 1 + 2 + 4 + 8

31 Days = 1 + 2 + 4 + 8 + 16

And so on.

The main point of division is:

1 = 2^0

2 = 2^1

4 = 2^2

8 = 2^3

16= 2^4

And so on…