×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Cutting A Gold Bar3

## Cutting A Gold Bar

(OP)
If I have 1 gold bar, equally divided into 7 pieces as such:
|=|=|=|=|=|=|=|
I need to pay an employee each day for one week.  His wages are 1 piece of the gold bar per day.  How can I cut the bar to allow for fair payment using only 2 cuts.  You can not fold the bar because it is gold.
Replies continue below

### RE: Cutting A Gold Bar

2
I would imagine a binary cut would be appropriate here.

End result would be:

|=|
|=|=|
|=|=|=|=|

mmerlinn

"Political correctness is the BADGE of a COWARD!"

### RE: Cutting A Gold Bar

So how will you use that to pay me on Tuesday after I spent the 1 unit piece you gave me on Monday?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill

### RE: Cutting A Gold Bar

He gives you the two gold piece and you give him the one gold piece back.

-V

### RE: Cutting A Gold Bar

I can see how that's likely the solution, but doesn't that present a problem if he spends the gold piece?  Seems much more efficient to pay him weekly.  Then I only need to cut the bar one time if he doesnt work a 7 day week.

### RE: Cutting A Gold Bar

Going by a normal working week is 5 days, I'll go with:

#### Quote:

Two curve lines:
___________
| \      ____      /|
|   \  /          \   / |
|   X            X   |
|  /   \ ____ /  \  |
| /__________\|

### RE: Cutting A Gold Bar

I assume binary cuts are meant to be the right answer.  But as traingamer says, this depends on the employee keeping their wages and having the bars ready to give as change.  So why not just cut once and give them five bars at the end of the week?

------------------------------
An old man who lives in the UK

### RE: Cutting A Gold Bar

GwydionM

Reasonable assumption, but what happens when there is a holiday some time during the week?  Depending on the job, this could be a major obstacle since there tends to be here about 1 week per month that is short or split because of days off, sometimes paid, sometimes not.

mmerlinn

"Political correctness is the BADGE of a COWARD!"

### RE: Cutting A Gold Bar

Maybe back in the good old days, when people were paid with gold bars, they didn't need to worry about such things

----signature below----
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom

### RE: Cutting A Gold Bar

indeed, they'd just hire someone to make more cuts as needed...
Or they made sure they ordered gold bars from the gold bar maker that were the right size for paying exactly the amount needed.

### RE: Cutting A Gold Bar

Give the employee all seven pieces on the first day.

My alarm clock causes time travel. When I hit snooze, no apparent time passes before the alarm sounds again, but the universe has in fact moved forward through time by ten minutes!

### RE: Cutting A Gold Bar

But, if you can cut it only twice, would it not be 3 pieces?

----signature below----
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom

### RE: Cutting A Gold Bar

4 pieces max. Cut in half, put pieces on top of each other, cut the stack.
But that might be bending the rules a bit :)

### RE: Cutting A Gold Bar

I was wondering...
I get paid only once a week!
Maybe this guy gets paid only once a week also...
then 0 cuts would be needed!

:)

SG

### RE: Cutting A Gold Bar

Just cut two small pieces off the bar. One goes to the employee as severance pay. One goes to some offshore country that you've outsourced his job to. You keep the rest.

At least I think that's how it works.

Or, you tell him he's paid once a week and give him the whole bar at the end of the week (after cutting a third of it off for taxes and health insurance and so forth).

### RE: Cutting A Gold Bar

My Thought... If it's already divided into 7 pieces, then why cut it at all?  Just give him one piece per day.  LOL!

Senior Software Developer
http://www.scoutsft.com

### RE: Cutting A Gold Bar

Sorry, I can only figure out how to do it with one.

### RE: Cutting A Gold Bar

Well, come to think of it, that means I can do it with two as well.  So:

Ignore the "equal division into 7 cuts" as this suggests that no cuts need to be made to distribute properly.  Now, make one cut in the shape of a sine wave, such that there are 3.5 waves in the gold bar.  This will break the bar into 8 pieces; the two end pieces will be the same size taken together as any of the inner pieces.  Make sure, of course, that the apex of each wave is the exact tangent of the edge of the bar, so that the fact of a single cut will be preserved while still breaking the bar into pieces.

To make a second cut, make a random cut in the bar that doesn't alter the pieces in any way.

Done.

### RE: Cutting A Gold Bar

I know I am not allowed 3 cuts but...
1st cut |=|=|=|=|X|=|=|=|
giving you |=|=|=|=|   |=|=|=|
Then stack the block of 3 on TOP of the block of 4
2nd cut |=|=|X|=|=| through 2 layers
giving you |=|=| |=|=| |=|=| |=|
Then stack the 3 blocks of 2 on TOP of each other
3rd cut |=|X|=| through 3 layers
giving you |=| |=| |=| |=| |=| |=| |=|
DONE!
(I am stumped as to how it could ever be done in 2cuts!)

http://commtechau.bravehost.com

### RE: Cutting A Gold Bar

BobRodes,

So something like my suggestion, but with another curve?

### RE: Cutting A Gold Bar

I'm going to be the prick and add more details.  Since I have been involved with payroll duties at a prior job, I know we are forgetting that overtime must be paid.

The problem states that for one week of work, the bar was cut into 7 even pieces, and the wages for 1 day was one piece. So the worker was working all 7 days of the week, and most companies allot for overtime after 5 or 6 consecutive days of work.

Therefore, for days of overtime, the worker earns 1.5 pieces.  Therefore, we need at least 1 bar, and 1/2 piece to pay the worker for the work on the day(s) that s/he should have been paid overtime.

Just a thought.

"If it's stupid but works, it isn't stupid."
-Murphy's Military Laws

### RE: Cutting A Gold Bar

One cut (although this method would require outsourcing and eliminates the overtime calculations)

|=|  |=|=|=|=|=|=|

Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.

### RE: Cutting A Gold Bar

Drat the OP states "fair payment" which I believe excludes outsourcing.

Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.

### RE: Cutting A Gold Bar

I checked the National Institute of Standards, Weights and Measures Division and the National Conference on Weights and Measures, looking for piece as a linear (such as board foot), two dimensional, cubic, or even as a unit of weight, and, frankly, I came up short.

I am reminded of the fellow who, when ordering a pizza, when asked, "Want me to cu'cher pie into sixteen pieces?" replied, after a short pause, "Naauu. Can't eat that many."

And my Dad, who suddenly got smarter, the moment I left home, who told Mom, the instant after the first piece of cake went to little sister, "There's only one piece of cake left.  Guess I'll finish it off!"

So with that, here's my stab.

|=|

|=|=|

|=|=|=|=|

Day one he gets piece 1
Day 2 he gives back piece 1 & gets piece 2
Day 3 he gets piece 1 along with piece 2 he laready has
Day 4 he gives back piece all the pieces and gets piece 3
Day 5 he gets piece 1 along with piece 3 that he already has

Skip,

When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd!  and
Many are Cold, but Few are Frozen!

### RE: Cutting A Gold Bar

I can't believe this thread is still going since the first poster answered the question.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill

### RE: Cutting A Gold Bar

Greg,

Puzzlers, read the challenge, go off and work on a solution, come back back and post...

...and THEN read the other posts.

It has a life of its own!

Skip,

When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd!  and
Many are Cold, but Few are Frozen!

### RE: Cutting A Gold Bar

Or they read the posts, realize they're to late to be the first with the correct answer and then try to find other unorthadox/humorous attempts to solve the problem.  :)  Either way it's all in the name of fun.

Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.

### RE: Cutting A Gold Bar

I quite understand. I've rarely met a rhetorical question that I didn't like.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill

### RE: Cutting A Gold Bar

Well, if you wind up, just spinning your wheels in your driveway...

Skip,

When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd!  and
Many are Cold, but Few are Frozen!

### RE: Cutting A Gold Bar

<So something like my suggestion, but with another curve?

Yeah, something like, except you haven't shown that your pieces are equal in size, and you only have 5 of them and need 7.

### RE: Cutting A Gold Bar

<So something like my suggestion, but with another curve?

Yeah, something like, except you haven't shown that your pieces are equal in size, and you only have 5 pieces and need 7.

<I can't believe this thread is still going since the first poster answered the question.

I didn't see the first poster as answering the question, because it seemed to me a function of "payment" that one SHOULD be able to spend the money!  As far as I'm concerned, it isn't payment if you have to give it back.

Bob

### RE: Cutting A Gold Bar

BobRhodes is getting there.

Make one cut that is roughly the shape of a standard bell curve.  Keeping the two peices together make another bell curve cut that is inverted. This will yeild 7 peices.  Someone would have to do some math to figure the correct shape of the curve so each peice would be equal.

### RE: Cutting A Gold Bar

Just thinking outside the box a little here. The original post says you can't fold the bar. It says nothing about folding the saw. What if you bent the saw into an "S" shape. Something like this when viewed from above...

_
/ \ |
| | |
| | |
H \_/
H
H

...with the "H"s being the handle. It's spaced so the first "cut" takes three pieces off one side, and the second "cut" takes three off the other side, leaving a seventh middle piece from the center. If planned out correctlt, that would give you seven equal pieces.

(BTW, I think the first reply by mmerlinn was the correct one.)

### RE: Cutting A Gold Bar

In that case, why not just bend the saw 6 times to cut all 7 pieces in one cut?

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

### RE: Cutting A Gold Bar

<BobRhodes is getting there.
Falling short somehow?  Please explain.  :P

<roughly the shape of a standard bell curve
You mean as in like maybe a sine wave?  (A sine wave is a representation over time of a periodic oscillation between two points, such may be seen in the variation of amplitude in an alternating current.  For more information, see http://simple.wikipedia.org/wiki/Sine_wave.)

<Someone would have to do some math
Well, the math was done about 1000 years ago, by one Abu Nasr Mansur back in Persia.  One may refer to any standard work on trigonometry to get the details.

However: one may draw a sine wave on the gold bar, such that the wavelength is 2/7 the length of the bar, the amplitude is 1/2 the width of the bar, the apex of any single wave iteration is tangent to one long side of the bar, and the phase is such that the apex of a wave iteration passes through a corner of the bar.  Make the one cut along the wave, and you will have six equal pieces, and two more which are exactly half the size of the others.

### RE: Cutting A Gold Bar

You can also punch the bar until it breaks without any cut ...

Cheers,
Dian

### RE: Cutting A Gold Bar

#### Quote:

In that case, why not just bend the saw 6 times to cut all 7 pieces in one cut?

What if you only have scissors?

----signature below----
I can't compete with you physically, and you're no match for my brains.
You're that smart?
Let me put it this way. Have you ever heard of Plato, Aristotle, Socrates?
Yes.
Morons!

### RE: Cutting A Gold Bar

bobrhodes, u kept going on bout ur sine wave, but if u think about it, when cut the bar so there is 3.5 waves, as soon as cut and the first small piece falls off, thats 1 cut cos u stopped cutting (why, theres nothing more to cut, need to start cutting the other way), so not bein to harsh (like u kept quoting others) but ur way wudnt work for 2 cuts

### RE: Cutting A Gold Bar

Well, I did think about it sky, and I came to an alternative conclusion.  Maybe you could think about it some more.

My position (which if you had read my post a little more carefully, you would have already seen) is that if one cuts a line tangential to the edge one preserves the fact of a single cut, while simultaneously breaking into two pieces.  Contemplate this: the cut touches the edge at a single point, which has no dimensions.  So, does the cut end when it continues past a point with no dimensions, which point also serves to divide some medium into two pieces?  I feel quite comfortable saying it does.  I also feel quite comfortable being disagreed with on the matter.

However, if you wish to suggest that you are capable of categorically refuting my point of view with less mental effort than it takes to spell my name correctly, I'm afraid that I'll have to disagree with you there.

Bob

### RE: Cutting A Gold Bar

Alternate 2 cut solution:
Provided the top and bottom of the prior cut leaves 1/7th of the bar on the top and 1/7th of the bar on the bottom.  Do this wave cut:

|     |
|/\/\/|
|     |

Place the two pieces on top of each other and cut the 1/7th pieces off like so:
|_____|
|/\/\/|

Giving you 6 pieces that are 1/7th pieces and 2 pieces that are 1/14th.

### RE: Cutting A Gold Bar

#### Quote (traingamer):

I can't believe this thread is still going since the first poster answered the question.

I can't either.  LOL.

#### Quote (SamBones):

(BTW, I think the first reply by mmerlinn was the correct one.)

I won't claim my answer is the correct one, but I do think that it is the answer bam720 was looking for.  Would be nice if he would comment on all of these comments.

I also notice that SkipVought has the same answer I had, just spelled out a bit more.

mmerlinn

"Political correctness is the BADGE of a COWARD!"

### RE: Cutting A Gold Bar

Well, I stated the position that providing a gold piece that one isn't able to spend doesn't constitute payment, and if one has to give it back one can't spend it.  So it may be the answer bam720 was looking for, but MY answer was an improvement.

### RE: Cutting A Gold Bar

Well my fiances surname is spelt rhodes, theres is an island called rhodes, and as im not interested in the exact spelling of ur name and just merely glanced at what ur name was i spelt it that way.

I also dont no whether to agree or disagree with the cutting.  As I said previously, if you are cutting and you get to the edge, that first small piece will break off.  If you are then still cutting (counting this as one cut), then you must be shaving some of the gold off to have it counting as a single cut must you not, and if this is then true, there wont be equal cuts at all as there will be bits of gold shavings on whatever your cutting the gold bar on.  Unless what you are stating is that picture the sine wave, with a tangent at its amplitude.  When you are cutting and you get to the tangent, you are infact not cutting the first small piece off, but leaving a hairline piece of gold on, which connects it to the rest of the gold bar.  This will count as a single cut.

### RE: Cutting A Gold Bar

option 1: assuming the gold bar is divided into 7 pieces like a chocolate bar, break gold bits off like Hershey's, mmmmm... chocolate... cut it once for shits

if that's not the case...

option 2: cut the gold twice longways to expose more surface area, melt the gold, poor into 7 molds each able to hold 1/7th the volume of the original bar, let cool, remove from mold and use for payment.

akalinowski
www.nofear.com
MCSE 2000, A+, N+, LCP, CNE

### RE: Cutting A Gold Bar

<im not interested in the exact spelling of ur name and just merely glanced
Some of us are more meticulous thinkers than others...

<leaving a hairline piece of gold [etc]
This is hardly a refutation of my point of view.  I again point out that a tangent is the point at which two lines, at least one of them curved, intersect.  If there is a "hairline piece of gold left" it isn't a tangent.  Furthermore, if you leave said "hairline piece" there, you aren't in fact cutting off a piece of gold, either.

### RE: Cutting A Gold Bar

(OP)
My apologies for not responding.  It has in fact been so long that I do not recall looking for a specific answer.  If I recall correctly, I heard the puzzle and felt like sharing.  I admit I do not read the forums as often as I should (I drop in unannounced time to time), I never responded because the multiple solutions continued to intrigue me.  Without saying a "correct" solution has been found I like reading other "alternate and equally valid"  solutions :)

mmerlinn I think that your answer solves the problem at hand in the most direct and straight forward manner.  I really like the sine wave solution as well, BobRodes

### RE: Cutting A Gold Bar

<mmerlinn I think that your answer solves the problem at hand in the most direct and straight forward manner.

### RE: Cutting A Gold Bar

BobRodes:

#### Quote:

I really like the sine wave solution as well, BobRodes

Glad I didn't need to twist my brain to come up with your solution.

mmerlinn

http://mmerlinn.com

"Political correctness is the BADGE of a COWARD!"

### RE: Cutting A Gold Bar

<Glad I didn't need to twist my brain to come up with your solution.

Yes, I'm glad too.  I didn't have to twist my brain either, and the fact that you found it as simple to envision as I did gives it a certain validity it wouldn't otherwise have.

### RE: Cutting A Gold Bar

Hi all, I have pondered this for about 5 years. I was asked this once by a student who was stuck on this word problem in some class or another, and I have come up with more than one solution, and although he didn't like any of them, it was a good way to kill a couple of beers.

I found this board and thought I would share, and probably stick around as there is a lot of info here.

BobRodes, I originally envisioned the solution you proposed, but I had to discard it, simply because it creates too many pieces. I'm pretty sure that the original question was designed to elicit a similar answer regarding sine wave measurement though. You could stretch the semantics to say you would melt the two ends together, because that is not specifically prohibited in the problem, but then you could melt it into 7 smaller ingots and not make any cuts, so I'm going to push the "fail" buzzer on that one too.

I guess I should start by making an assumption on the wording of the problem. "Equal Pieces" has to be quantifiable. I'm going to assume that volume, or mass, or for our purposes weight, is keeping within the guidelines. This is very important. We'll assume the bar is 1 ounce for reference below.

Solution 1, we can modify your solution slightly, by cutting it in a sine wave, but in the middle, limiting the frequency to 1.5 wavelengths. That gives us 3 equal pieces of 1/7 oz and two ends of 2/7 oz each, if we've dome it correctly. Then we can stack the two ends and make one cut through them to divide them into 4 pieces of 1/7 oz each. 7 * 1/7 oz = 1 oz.

That was discarded because the stack-and-cut could be considered two cuts by itself depending on how you read it. No problem.

Solution 2, we don't cut all the way through, but more like we etch through the ingot or bar almost all the way. We still use our sine wave pattern, but this time 3 wavelengths so that we have 6 full "sine-pieces" with extra on the end. Now here is the tricky part, we turn the ingot in its edge, and slice down only in the middle, freeing the 6 pieces from the ingot, 1/7 oz each, and leaving a flat sheet with two partial pieces attached. If we calculated our cut depth and our sine frequency correctly by making it slightly longer, the two ends will be connected by a flattish sheet of leftover gold, still technically one piece, and weighing 1/7 oz total.

I liked that better but couldn't come up with enough math to convince my bud to use it, so I came up with yet another way.

Solution 3, the gold is in a cylindrical bar shape. Shape is critical here as I'll get to in a moment. We take our magic gold knife and start a cut only halfway through the bar to the centerline, and rotate the bar as we cut so that we get a spiral cut. The bar will still be in one piece at this point. Then we cut lengthwise, again halfway through to centerline, which causes the pieces to separate. It is not too different from cutting a spring across the coils; you end up with a bunch of rings at the end. I said shape was critical here, but it can be done. I spent awhile later on playing with modeling clay and a sharp knife. Try it.

Solution 4 came from solution 3, and assumes we start with a spring, or a thickish wire we can coil into a spring. Simply cut down the edge, one cut does it.

Those are what I came up with at the spur of the moment in June of 2000. It has haunted me ever since, LOL!

### RE: Cutting A Gold Bar

Sorry I meant 2003 above. But if it compiles it goes, pre-editing is not a requirement for programmers, right?

### RE: Cutting A Gold Bar

I think I have the solution:

you first cut the bar into 2 piece slice + 5 piece slice

|=|=| + |=|=|=|=|=|
Then you put them on top of each other like so:

|=|=|
|=|=|=|=|=|

Then you cut your second cut between first & second and third and fourth, wich gives you:

|=| + |=| + |=| + |=|=|=|=|

day 1 |=|
day 2 |=| + |=|
day 3 |=| + |=| + |=|
day 4 |=|=|=|=| - 3 *(|=|)
day 5 |=|=|=|=| + |=|
day 6 |=|=|=|=| + |=| + |=|
day 7 |=|=|=|=| + |=| + |=| + |=|

It is solved

### RE: Cutting A Gold Bar

#### Quote:

Solution 3, the gold is in a cylindrical bar shape. Shape is critical here as I'll get to in a moment. We take our magic gold knife and start a cut only halfway through the bar to the centerline, and rotate the bar as we cut so that we get a spiral cut. The bar will still be in one piece at this point. Then we cut lengthwise, again halfway through to centerline, which causes the pieces to separate. It is not too different from cutting a spring across the coils; you end up with a bunch of rings at the end. I said shape was critical here, but it can be done. I spent awhile later on playing with modeling clay and a sharp knife. Try it.

Why does it have to be cylinder?  Provided it's a rectangular prism, this same method should work.  It may work for other shapes, but I'd hate to figure the math to confirm it.

For ease, we'll imagine the bar has 24 sections to make cutting easier.  Starting from the bottom right of the second section, cut diagonally from there to the top left of the same section.  Turn, and cut from the bottom right of section 3 to the top left of section 3.  So on, until the last cut going to the top left of section 22 (ending at the bottom right of 23) where you stop.

Then cutting from top to bottom, start in the corner you started from (should be same you ended in) and cut to the middle of the cube slicing through the entire bar.

If the size of the bar is 1" x 1" x 24", then you need only cut the middle sections in half to see you can make a cube with a volume of 3 cubic inches (1/7 total volume).  With the ends you can do similar (you just cut it at 2/3s) to make a cube with a volume of 3 cubic inches (1/7 total volume).

I also did the actual math (incase my cube visualizations were incorrect) for volume (which was a pain considering all the triangles), but it does equal out into 7 equal pieces.

### RE: Cutting A Gold Bar

<it creates too many pieces

#### Quote:

How can I cut the bar to allow for fair payment using only 2 cuts.
I don't believe my solution fails to accomplish this, given that two halves have the same amount of gold as one whole and would therefore constitute fair payment.
However, if you wish to change the requirements document after seeing the solution (which never really happens, of course, but we're just having fun here), amending it to say "divide into 7 equally sized pieces" I concede that my solution fails, unless as some have said the two ends of the initial ingot are joined into a cylinder.  I do NOT concede that my solution fails to solve the problem as stated above.

### RE: Cutting A Gold Bar

The way I have heard this problem expressed (and it helps clarify the origins of the original post's comment about "equally divided into 7 pieces", which in the version in the post doesn't make a lot of sense or add information to the problem) is:

#### Quote:

Microsoft Interview Question
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?

In this version it is pretty clear that the only way you can divide the bar is by physically breaking the connections between the segments. At which point the binary cut solution becomes the only viable one (ignoring the real world issue, rasied by several, that this would prevent the worker spending any of his money until the end of the week)

### RE: Cutting A Gold Bar

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!