# Maximum Pieces of Cake in Four Cuts

I had read somewhere that the if we cut a cake four times (Two horizontal cuts and two vertical cuts, in whichever order), the maximum number of pieces we can get is 27. No solution was given there.

I am unable to figure out how it can be done.

Is it possible and how?

• Could you maybe give us the location where you found this? This is, because it matters whether you look at this from 2D or 3D and if you would like for the pieces to have the same size... – Foitn Sep 19 '16 at 9:56
• You haven't specified that the cuts have to be straight, in which case we can get as many pieces as we want from a single sufficiently wiggly cut. And If the cake's shape is sufficiently uneven we can get as many pieces as we want from a straight cut. You might want to edit your question to specify the shapes of the cuts and the cake. – Mike Scott Sep 19 '16 at 12:19
• @Foitn There's a whole class of puzzle that involves finding and reversing an assumption you've made by not reading the question carefully. Such answers are thus perfectly valid solutions to any puzzle, and if they're not intended as answers then they need to be ruled out by wording the question so that it doesn't depend on any such assumptions. – Mike Scott Sep 19 '16 at 13:27
• @MikeScott If that's the case the upper bound is certainly not 27. – Gorchestopher H Sep 19 '16 at 18:41
• Is it at all possible that you are mis-remembering something from your CAT's? Option (4) from this study guide is answer "27" for "what is the max number of parts a cube can be divided into given 6 cuts. preview.tinyurl.com/hpsdo5r – Gorchestopher H Sep 19 '16 at 18:43

If all cuts are straight cuts and the cake is a rectangular prism or cylinder, it's not possible. From Wikipedia's page on the Cake Number:

In mathematics, the cake number, denoted by Cn, is the maximum number of regions into which a 3-dimensional cube can be partitioned by exactly n planes. The cake number is so-called because one may imagine each partition of the cube by a plane as a slice made by a knife through a cube-shaped cake.

When $n$ is the number of cuts you make and $C_n$ is the number of resulting pieces, the formula is:

$$C_n=\frac{1}{6}(n^3+5n+6)$$

For four cuts, then, $C_4=\frac{1}{6}(64+20+6)=15$

There's even a sequence in OEIS that describes this series. 5 cuts can only get you 26 pieces so even that won't achieve the 27 claimed.

For reference, the optimal four cuts would look like this: Here's one more interesting property of the sequence: It is sum of the first four terms in the $n^{th}$ row of Pascal's Triangle • Wow it looks like a tetrahedron!!!! – Always Confused Sep 8 '19 at 12:59

Depending on what you mean by "horizontal" and "vertical", you can do much better than 27, even in 2D, even without folding and stacking. Make the cuts like this (the cake is grey, first cut black, second one red):

12 pieces, with only two cuts - you get the idea.

• Reminds me of this video. – Wiles Sep 19 '16 at 19:00
• Alternatively, bake an irregular-shaped cake and get as many pieces as you like with 1 straight cut. – A E Sep 19 '16 at 19:30

It is possible - imagine you have a very flexible cake. You fold it(x-axis) to half when first vertical cut, and fold it again(y-axis) when second cut. Then you will get a cake looks like the image below, which is 9 pieces. After that you cut two horizontal cuts then you will get 9 x 3 = 27 pieces of cake

Easy peasy lemon squeezy!

For 3 straight cuts, we can get 8 pieces. After that, the fourth cut can at most dissect each of the 8 regions once... So at most 16, and I'm not even sure if that is possible.

I think another factor to consider is shape of the cake. An angel food cake is typically shaped like a doughnut (hole in the middle) in which case the answers are discussed here

One comment in particular

I saw this question in The Second Scientific American Book of Mathematical Puzzles and Diversions On page 149 is a formula for the maximal number of pieces obtainable with n cuts, (n3+3n2+8n)/6. (It has the same picture, but with better quality and probably with expired copyright) – DenDenDo Nov 8 '14 at 16:57

The link is to here with the answer being shown on page 148.

Using the formula gives 24 pieces could be cut with 4 slices (although it only shows the cuts for 3 slices into 13 pieces. It also mentions if the pieces could be moved you could cut it into 18 pieces instead of 13 pieces but again doesn't show how and I haven't explored it. But >24 pieces is possible with a torus shaped cake with 4 cuts.

With one plane you divide space into two.

With a second plane you divide those two subspaces into four. The intersection of the two planes is a line.

With a third plane you can divide all four subspaces into eight. The intersection of the line and the third plane is a point.

So you have three planes, three lines (one for each pair of planes), and a point.

The fourth plane can intersect the previous three planes. So that's three more lines and four more points.

In fact, every plane intersects every other. This is optimal.

Now three planes cut the fourth into a triangle surrounded by unbounded regions of the fourth plane. All four planes are thus cut into triangles because every plane intersects every other.

Each triangle meets each other at a line segment, and each group of three meets at a point. This is a tetrahedron.

So space is cut into a tetrahedron surrounded by unbounded regions. There is an unbounded region for every face, line segment, and point.

From each face extends a region bounded by the plane that includes that face, and the three other planes, and otherwise reaches to infinity.

From each line segment extends a region bounded by the two planes that include that line segment, and the two other planes, each of which cuts the first two. It otherwise reaches to infinity.

From each point extends a region bounded by the three planes that include that point, and otherwise reaches to infinity. The fourth plane opposes this point just like the base of a pyramid opposes the apex.

So that's a region for each face, line, and point, plus the tetrahedron. That's 4+6+4+1 = 15.

As far as I understand the question, it is not possible.

The first cut divides it into two pieces, the second cut divides it into four pieces. The third cut cannot cut all the 4 pieces, it can cut only 3. Hence we have 7 pieces. The fourth cut also can't cut all the 7 pieces, so the final answer is surely less than 14.