Piece of Cake for King Solomon

Today (7th of July, 2018) marks 40 years of independence for the Solomon Islands.

To celebrate, I have decided to bake a cake! And what a pretty cake it's going to be:

• When viewed from the top, the cake will be shaped like a regular five pointed star, just like the ones on the Solomon Islands' flag.
• The sides will be perfectly vertical, the top (and bottom) perfectly horizontal
• To get the right colour, there'll be a thin layer of white frosting covering the top and the sides
• To top everything off, there's going to be a miniature flagpole with the flag of Solomon Islands standing smack in the middle of the cake.

Here's an early prototype (with star decorations instead of the flagpole) to give you the basic idea:

Now then, as you probably knew (or at least guessed) already, the Solomon Islands were named after King Solomon, the undisputed champion of splitting stuff into equal parts.

Therefore, a proper plan for cutting the cake is definitely in order here:

1. Each piece should have an equal amount of cake.
2. There shouldn't be any cake left over.
3. Each piece should also have an equal amount of frosting.
4. I'm expecting to cut the cake into seven pieces, but it would be nice if the plan could account for other numbers of pieces too.
5. A most perfect plan would work even if I chose any other regular star as the cake's shape.

Can you help me come up with a cake cutting plan worthy of the occasion?

This is an adaptation of an age-old puzzle. I decorated it a little for the occasion; hopefully not too much to lose the beautiful point in the original.

• Must our solution be independent of the cake's proportions (width vs. height)? – Riley Jul 7 '18 at 1:29
• @Riley the intended solution doesn't depend on those proportions, but if you figure out an exceptionally clever way to cut the cake given a particular height/width ratio, I'll be happy to bake the cake to that ratio. :-) – Bass Jul 7 '18 at 1:33
• Won't one cake have a flag while the others do not? That won't be equal. – PotatoLatte Jul 7 '18 at 1:39
• @ZaniXu It's possible to cut the cake in such a way that the flagpole won't end up in any of the pieces. – Bass Jul 7 '18 at 1:43
• @Bass Does that mean the flag can be ignored if no piece includes it? – Lawrence Jul 7 '18 at 12:41

To divide the cake into n equal pieces,

simply divide the perimeter of the star into n equal lengths and cut from those points to the centre.

Proof:

Each part of the perimeter can be seen as the base of a triangle with its apex at the centre of the star. Because of the symmetry of the cake, the heights of these triangles is the same. When you cut the cake into pieces by radial lines from the centre, each piece is made up of such triangles, so their top surface area is proportional to the total length of the bases of these triangles, which is equal to the part of the outer perimeter that the piece covers.

For each piece, not only is their top surface frosting area proportional to the outer perimeter used by the piece, so is the volume, as well as the area of the frosting on the side of the piece.
(At least to a first approximation, as it ignores the thickness of the frosting. This makes a small difference at the edges of the cake. In a pointy star, the tips of the stars will be all frosting and no cake, so a piece with a tip will actually have a little more frosting than a piece without).

Here is a drawing to illustrate how it works:

• This is, indeed, a most perfect plan! I actually tried a couple of ideas for taking care of the frosting thickness problem you mention, but then I realised there's frosting "overlap" in the concave corners too, and that made everything very complicated, so I decided to use the physics teacher's cop-out, and just called the layer "thin". I really liked your descriptive image; I made a version with another colour scheme (and labels for perimeter lengths), but I'm a bit too tired to judge whether it's any better or worse than your original, so here's just a link: imgur.com/9newTZv – Bass Jul 8 '18 at 2:05
• Thanks @Bass, I've tweaked your picture slightly and used it in my post. – Jaap Scherphuis Jul 8 '18 at 5:19
• You really shouldn't make your entire answer a spoiler tag. Could you add some information outside of the tag? – dcfyj Jul 11 '18 at 15:21

Cut the slices horizontally so that each piece of cake is a thin but complete star pattern.

You can cut it into almost any number of pieces (including seven) assuming your cutting skills are good enough. Just make each piece the same height and they all will be equal in volume.

The failing here is that the top-most piece will have more frosting than all the others, so your requirement of equal frosting can't be met using this strategy. (Unless perhaps some naughty child came by and licked off all the top frosting before the cake was cut and served.)