# Piece of cake

Warning: I do not know the answer to this one. If this will keep you up at night, do not read on. I was asked this in a job interview a long time ago. They did like my answers, even though they were "wrong".

Still here? OK.

You are presented with a rectangular cake.

Somewhere at an arbitrary location in this rectangular cake, an arbitrarily sized rectangle of cake is missing.

The missing rectangle does not touch the edge, though it may be very close to it. In other words, the cake is not missing a corner.

Using two separate cuts, divide the cake into two equal (volume) pieces.

Wrong solution #1 (hidden text):
Using one cut, slice the cake horizontally, the top half is the same volume as the bottom half.

Wrong solution #2 (hidden text):
Use two knives. Balance the cake on one knife, then cut once along the line of balance using the second knife. Each half has the same volume. Note that there are an infinite number of solutions with this method

What are your thoughts? Every two-cut method I come up with has a case that does not work.

The first solution that came to mind was your wrong solution #1. It's kind of like the trick where you go up to a jock with a telephone book and say "I bet you 20\$ that i can rip this telephone book in half faster than you can".

yeah i have heard something like this before ....its a math trick i think something to do with when u bisect a rectangle you always end up halfing it ... or something like that ,,,well something that makes sense ...look into mathematics of rectangles you would find something there . ....I THINK

Are there any constraints on the rectangular slice cut out? Is it in the same plane (are the planes parallel to the planes of the cake)? Can we use symmetry (is the damn slice symmetrical)?

The pieces dont have to be together. We just have to divide the volume in such a was so as to get two equal parts right? So, you divide the slice symmetrically with one cut. The remaining part is also a rectangle, so you can cut that in several ways to get equal volumes. One of one part and another of the other and you have your equal volumes. What do you think?

All angles are right angles. The planes of the sides of the missing rectangle are parallel to the planes of the sides of the cake. The cuts to make are vertical, but are not necessarily parallel to the sides of the cake. The cuts are straight lines.

No measuring and calculating, the solution must be general so it works for all possible rectangular shapes and locations.

No measuring and calculating

This makes me think that there is some key piece of information missing. If there's no measuring, that means cuts MUST be made from and to pre-determined points. This leaves cut starting points restricted to one of 8 places on the cake (effectively *2* places, since this is the general case), those being the corners of the cake and the corners of the rectangular piece that's been cut out. Ending places could be other corners, or perhaps we're granting the cutter enough skill to cut parallel to one of the cake's sides. Maybe we could even grant that the 2nd cut could be parallel and/or perpendicular to the 1st cut.

But still, this would appear to leave us with very few possibilities (relatively speaking).

Now... I have to ask-- the way you've phrased the question, it sounds like someone might have taken a cut arbitrarily out of the *CENTER* of the cake, surrounded on all 4 sides by cake. But you also give hints in your phrasing that the slice taken out *is* on an edge, just not on a corner. Could you clarify?

DaveE

Micheal,

You just gave me an idea for a third wrong solution.

Dave,

I think that you are on the right track, somehow.

I do think that the only points that matter are the eight corners.

The missing rectangle is surrounded by cake. There may not be much cake, but it is a finite amount.

Since I see no reason to disallow your suggestion, I will grant that parallel and perpendicular cuts are within the skill of the knife wielder, if they are based on an existing edge and/or an existing set of points.

My problem with all of the two-cut solutions I considered is having them fail when I "moved" the missing piece around, or made it very wide or skinny relative to the cake, or very large or small.

Last edited:
How is this:

A line that passes through the center of a rectangle divides it into two equal halves. We want to divide both the cake AND the empty area into two equal halves, so cut along a line that passes through the center of both rectangles to end up with equal volumes of cake. It's only one line, but it makes two cuts if you count each side of the missing rectangle as a separate cut.

A line that passes through the center of a rectangle

I think the solution works, but wouldn't that entail measuring?

DaveE

I think the solution works, but wouldn't that entail measuring?

DaveE

Not with a measuring tape or ruler. Just aligning with an X on a rectangle should be allowed. You do need to define a specific direction for the cut, and you cannot do so without using any reference point at all.

Out of whack,

It counts as one cut. Other than that, it is good a good answer. Thinking about the points you are using (centers of areas), they can be derived from the existing points using geometry. I don't think using geometry is "measuring".

Here is another wrong solution I based on Michaels thought...:

Identify two intersecting lines, one that divides the cake diagonally, and one that divides the missing rectangle diagonally.
Cut on these two intersecting lines.
There are now four pieces of cake.
(I think) the sums of the pairs of opposing pieces have equal volume.

While this is two cuts, the problem is that there are now two equal servings. the problem calls for two equal pieces.

And I think I have the solution, need to think some more to decide if it is true for all cases...

Not with a measuring tape or ruler. Just aligning with an X on a rectangle should be allowed.

Oh, ok-- I figured that was expressly forbidden. I was assuming that "measuring" could only be done by making a cut-- hence, if you wanted to (say) find the midpoint of the cake, you could do so by making two cuts along the diagonals of the cake. Which of course reveals your midpoint, but wastes your two cuts.

Certainly if you allow that you can make marks on the cake by way of tracing lines and whatnot, I think that your solution works very well. In fact, it will work as a solution no matter WHAT the angle of the slice is, even if it's at a rakish angle in the middle or towards the edge of the cake. And... it only uses *one* cut.

Hm. Makes me think that there really is a different solution that necessitates two cuts, but does not require making marks or measuring of any kind-- just requires the cutter to be able to accurately cut in a straight line.

DaveE

Identify two intersecting lines, one that divides the cake diagonally, and one that divides the missing rectangle diagonally.
Cut on these two intersecting lines.
There are now four pieces of cake.
(I think) the sums of the pairs of opposing pieces have equal volume.

Hm, I don't think that one quite works-- try this with an inordinately wide but skinny slice, cut out near one side. IE, something like this:

Code:
+------------------------------------------+
|                                          |
|                                     +--+ |
|                                     |  | |
|                                     |  | |
|                                     |  | |
|                                     |  | |
|                                     |  | |
|                                     |  | |
|                                     |  | |
|                                     |  | |
|                                     |  | |
|                                     |  | |
|                                     +--+ |
|                                          |
+------------------------------------------+

DaveE

Dave,

You are correct, my third solution does not work.

My fourth idea did not work either.

If there are two such holes in the cake, you can cut the cake into two pieces of equal volume with a single cut and you do not need to measure anything to determine how the cut is to be made. It doesn't matter whether the holes touch the edge of the cake or whether the holes intersect each other or whether the edges of the holes are parallel to the edges of the cake. The only assumption is that the cake and the holes are right rectangular prisms. The solution is hidden:

Determine the three points which are the centers of the cake, and of each of the two holes. This is done by finding the intersection points of the diagonals. Given three points, there is a plane that contains all three. Cut the cake along this plane.

eom

Hehe This one is fun. I think this is the answer (hiden text):

The first solution was really close. ok first of all you need 2 cuts to make 2 equal volumes. So each cut will only make a line in the cake. Put the cuts together to make a strait line through the cake of 2 equal volumes. The cake is not cut it horizontally, but vertically (through the side of the cake.) This will leave you with an identical top and bottom half ;).

Last edited:
The first solution was really close. ok first of all you need 2 cuts to make 2 equal volumes. So each cut will only make a line in the cake. Put the cuts together to make a strait line through the cake of 2 equal volumes. The cake is not cut it horizontally, but vertically (through the side of the cake.) This will leave you with an identical top and bottom half ;).

How is this different from the first "wrong" solution that jim.nastics posted?

DaveE

Basicly you have to use 2 cuts, "Using two separate cuts, divide the cake into two equal (volume) pieces". The first wrong solution states only 1 cut. I also must admit I missed (did not read) the first 2 wrong answers before I posted.

DaveC426913
Gold Member
Is it safe to make the following deduction?

The cuts must result in only TWO pieces of cake.

The only possible way to meet both these criteria is that the cuts, while they may START at an edge of the cake, they cannot END at an edge. This leaves only two possible end-points for each cut. They must end either in the hole or each other (or a combo of the two).

Hm. Maybe the opposite is more succinct: No cut can begin AND end on a cake edge.

Last edited:
DaveC426913
Gold Member
There is an ambiguity in the question IMO.

When you have the cake in two equal volume pieces, is that NO MORE THAN two pieces? You can't recombine smaller pieces to make one larger piece?

Is it safe to make the following deduction?

The cuts must result in only TWO pieces of cake.

The only possible way to meet both these criteria is that the cuts, while they may START at an edge of the cake, they cannot END at an edge. This leaves only two possible end-points for each cut. They must end either in the hole or each other (or a combo of the two).

Hm. Maybe the opposite is more succinct: No cut can begin AND end on a cake edge.

The cuts can both start and end on an edge. Take a knife put the point in the middle of a Cake now press down. You should have a line in the cake. Change your angle (probably want to change by 180 degrees) put the point in the middle again and press down. You have cut the cake in half with 2 cuts both started on top and went through to the bottom.

Change your angle (probably want to change by 180 degrees) put the point in the middle again and press down.
I like this solution. Since the cake can easily be cut into two pieces of equal volume with a single cut, all that remains is to split that single cut into two cuts.

DaveC426913
Gold Member
The cuts can both start and end on an edge. Take a knife put the point in the middle of a Cake now press down. You should have a line in the cake. Change your angle (probably want to change by 180 degrees) put the point in the middle again and press down. You have cut the cake in half with 2 cuts both started on top and went through to the bottom.