# Ernie and the Cake Cutting

Ernie had spent most of the afternoon at my place, helping me with the tile grouting in my new bathroom. It had been a difficult and messy job, so when he asked if I could do him a "small favour" I felt I could not refuse.

Ernie went on to explain. "My family are all great fans of the Downton Abbey TV series, and as it is getting into birthday season I thought I would kill several birds with one stone and have a stately home birthday celebration for some of my nieces and nephews. I’ve already organised a catering company to provide appropriately dressed maids and footmen for the occasion, but I thought you might like to act as butler. All you would have to do is dress appropriately and at the right time cut the birthday cakes.” I replied that I would be honoured to accept, so Ernie went on to explain what was required in a little more detail.

"At 10:00am my oldest sister's twins, Fritz and Donaldo, will be celebrating their 10th birthday. I have made them a lovely orange-strawberry short-cake in the shape of a perfect equilateral triangle. As long as they get half each they will be happy." "So just a single cut?" I replied. "A single cut is just right", Ernie replied. "Of course, you need to make sure you keep the Great Aunt happy!" "The Great Aunt?", I asked. "Yes", Ernie explained, "Great Aunt Bismarkia will be arriving with the twins. She was a Time and Motion Manager back in the 1960s, and she always insists on efficiency. She will want you to make sure you use the shortest possible total length of cuts required to divide up the cake appropriately at any cake cutting she witnesses."

"At 11:00am my middle sister's triplets, Maude, Loretta and Gwendolyn, will be celebrating their 11th birthday. I have made them a lovely chocolate cake with mint icing in the shape of a perfect square. It has a small round red marshmallow in the exact middle of the top. Maude and Loretta love marshmallows so will want even shares of the one in the cake, but Gwendolyn hates marshmallows so she will want a piece with no marshmallow. But none of them will be fussed regarding how big or small their piece of cake is." "So just two cuts?" I asked. "Two cuts will be just right", Ernie replied. "Of course, you need to make sure you keep both Great Aunts happy!". "Both Great Aunts!?", I asked. "Yes", Ernie explained, "Great Aunt Lusitania will be arriving with the triplets. She was an Equal Opportunity Advocate back in the 1950s, and she always insists on equality. She will want you to make sure that each of the cuts required to divide up the cake appropriately are of precisely the same length at any cake cutting she witnesses."

"And at 12:00am my youngest sister's quadruplets, Bob, Rob, Jan and Sue will be celebrating their 12th birthday. I have made them a lovely Battenberg cake, with blackberry icing and a liquorish lattice set into the side walls, in the shape of a perfect pentagon. Bob, Rob and Jan love liquorish so they will want equal shares of the perimeter of the cake, while Sue hates liquorish and will want a piece of cake that doesn't touch the perimeter at any point. Oh - and while the first three don't care how big or small their pieces are, Sue will want her piece to be at least half as big as the next larger piece." "So just three cuts?" I asked. "Three cuts will be just right", Ernie replied. "Of course, you need to make sure you keep all three Great Aunts happy!". "Three Great Aunts!!?", I asked. "Yes", Ernie explained, "Great Aunt Titania will be arriving with the quads. She was a Group Theorist back in the 1940s, and she always insists on symmetry. She will want you to make sure that at least one of the final pieces has a mirror symmetry plane at any cake cutting she witnesses."

By now I was feeling a bit concerned – all those rules and requirements. So I made a few more enquiries and Ernie confirmed that there should be no extra pieces of cake cut other than those the children required after the cutting; that each cut had to be straight and could not cut across more than one piece of cake (but a single cut could divide a piece of cake onto one, two or three pieces depending on the shape of the piece and the positions of the previous cuts); that each cake had a side length of exactly 100 mm; and that the old ladies still had great eyesight and could tell if a cut was incorrect by more than a tenth of a degree in angle or a tenth of a mm in length or position. He also confirmed that Great Aunt Bismarkia chooses the shortest-length solution that satisfies all other cake-cutting participants that are present at the time.

Now I’m terrified that I will disappoint some of the children or make the some of the aunts unhappy and ruin the celebrations. Can anyone help me? A set of diagrams showing where and how to cut the cakes would be of great help.

• Regarding the requirement for Great Aunt Lusitania, does she require the cut length of the cuts in the second cake be the same as the cut length of the cuts in the third cake? – justhalf Dec 21 '15 at 6:19
• No, she only requires that in any single cake the cuts are all equal length. – Penguino Dec 21 '15 at 21:30
• Are cuts assumed to be straight lines? I don't know whether it would be relevant in this challenge, but I know that minimizing total cut length for equal area slices does not in general lead to straight cuts (in general, it leads to cuts being either circular arcs or line segments) – Milo Brandt Dec 22 '15 at 6:07
• Yes - cuts must be straight (as pointed out in the extra rules that Ernie confirms in the 2nd to last paragraph) – Penguino Dec 22 '15 at 23:07

This question has 3 very different parts:

1) The equilateral triangle must be cut exactly once such that the length of such cut is minimize and the areas of the two parts are equal. The result is to cut the cake such that:

the length of the cut is $50\sqrt{2}$mm which is parallel to one side and $25\sqrt{6}$mm from the opposing corner. If the angle of this cut changes, it will necessarily increase until it reaches $50\sqrt{3}$mm which is the cut from corner to base.

2) The square must be cut into 3 pieces with one cut bisecting the center point and all cuts being of the same minimum length. The two cuts should be:

$83.82$mm units in length. The first should be a $37.63$ degree angle removing a corner of the cake that is a right triangle with a side lengths of $66.39$mm and $51.18$mm. The second cut should go from the side opposite the starting angle, through the marshmallow, and ending at the first cut to the first cut. To get the right length start $36.68$mm from the opposite corner. As these numbers are not neat and were from simulation, I would not be surprised if it can be optimized further.

3) The pentagon is definitely evil. It must be cut with 3 cuts such that the cuts are of equal length, there is an enclosed area with a minimum of .5 the next largest piece in area, the three pieces not enclosed have equal portions of the original perimeter, and at least one piece has mirror symmetry. Again, all cuts should be of minimum length.

Sue's complaining can be quieted and the Great Aunt B can be more satisfied by having all three cuts only touch the perimeter one time. This is done by drawing (or imagining as someone would complain about messing up the icing) a triangle on the pentagonal cake such that the corners rest exactly on the perimeter and all three outer pieces have the same portion of the perimeter. This will simplify the pentagon down into a single triangle. All properties of this triangle (angles and side lengths) are defined by the distance between the closest triangle corner and pentagon corner. In the cases where this distance is $0$ or $50/3 mm$, this outer triangle will be isosceles. The corners of this triangle are the three points where each cut touchs the perimeter of the cake the single time. Each cut should terminate immediatly at the point where it will intersect another cut. This will result in a triangle isolated in the center of the cake without touching any side. Following an annoying simulation, I found the cuts should be between 108.0 and 108.1mm in length and that an outer triangle corner should be $50/3 mm$ from the closest pentagon corner. If this cut length is altered in either direction, the central triangle will diviate from the required isosceles shape by more than the .1mm requirement. If a different corner distance is used, the required length to meet the area requirements will increase. The angles of the cuts should be 13.3 degrees, 17.26 degrees, and 9.24 degrees relative to the triangle. If this is followed, Sue will receive 13.44% of the cake while the next largest will receive 26.1% of the cake. This difference from the expected 2x area is either due to rounding error within the simulation or required to meet Titania's specifications. The sides of Sue's piece will be 69.45mm, 69.45mm, and 83.1mm in length.

Due to the apparent rounding error and simulated (rather than hand calculated) result, I am still not convinced there is not a combination of corner distance and cut length that would be better. Note that the picture is outdated for part 2.

• The first two look excellent, but note that for the evil pentagonal cake "Sue hates liquorish and will want a piece of cake that doesn't touch the perimeter at any point" so maybe your assumption is flawed. – Penguino Dec 21 '15 at 23:45
• @Penguino the assumption is flawed (I found another way) but her pieces must touch the perimeter at a solitary point such that no licorice is on her piece but it doesn't result in an additional chunk of cake that isn't assigned to anyone. – kaine Dec 21 '15 at 23:57
• I think you can turn each cut slightly, resulting in an isolated middle triangle. I guess the middle triangle must be exactly half of the next larger piece in order for the cut length to be minimum. – justhalf Dec 22 '15 at 2:31
• An internal triangle is the way to go. – Penguino Dec 22 '15 at 2:52
• @kaine I haven't checked with Great Aunt B, but Sue will be horrified that the pointy corner of her piece of cake touches the perimeter and might be contaminated by a few atoms of liquorish. – Penguino Dec 22 '15 at 2:54