# Sharing a Cake with 7, 8, or 9

There may be 7, 8, or 9 guests at a party. The guests will share a round cake (shaped like a cylinder). Define a cut to be any plane or half plane that intersects the cake, i.e. straight cuts only. The pieces may not be moved between making cuts. What is the minimum number of cuts, to be made in advance, so that the entire cake can be shared equally between 7, 8, or 9 guests?

• Are we allowed to rearrange the pieces between cuts? – Bass Dec 21 '19 at 8:18
• Does this answer your question? Nine gangsters and a gold bar – Jaap Scherphuis Dec 21 '19 at 11:01
• @JaapScherphuis Not quite a duplicate, I think. That question is definitely useful for answering this one, but for a cake dissection, answering "how many cuts needed" is a bit more complex than just "how many pieces to cut into". – Rand al'Thor Dec 21 '19 at 12:45
• @JaapScherphuis Working on a version of the problem you mention was how I came up with this problem. But knowing the answer to one won't help with the other. – gyancey Dec 21 '19 at 16:10
• @athin Thanks man! This was a fun puzzle to come up with. – gyancey Dec 24 '19 at 4:08

## 4 Answers

Edited answer(2)

We need two horizontal cuts (parallel to the surface), these make thirds. We need one perpendicular cut to the surface making halves. And we need three more cuts perpendicular to the surface and also perpendicular to the halving cut. One cut makes 1/3 and 2/3, the second one 1/7 and 6/7 and the third one 1/4 and 3/4. And this is only 6 cuts indeed.

Why is this enough? Consider the fractions I mentioned. Because of the halving and thirding cuts made in two different perpendicular planes, it will be possible to either divide numerators or multiply denominators by 2, 3 or both (if needed). That enables us to make 7*1/7, 8*1/8 and 9*1/9 according to the needs. Obviously, the planes can be swapped. To the frosting/filling dilemma: it is impossible to remain fair with 6 cuts if the cake has only surface frosting, but it is possible, if the cake has 2 or 3 equal filling layers inside.

Here's a picture: (click to enlarge)

Previous answer:

I just realized that you are asking the number of cuts and not the resulting pieces and cutting is possible in any plane that intersects the cylinder.

If I do 3 cuts parallel to the surface making thirds and halves, then halve the cake perpendicular to the surface with 2 cuts (these cuts being also perpendicular to each other), and do 2 more cuts, one that is perpendicular to the surface and divides the cake to 1/3 and 2/3 parts and one also perpendicular to the surface that divides the cake to 3/7 and 4/7 in a similar way (the smaller portions should be opposite to each other) it is 7 cuts altogether.

Checking: What we need here is to have 7*1/7, 8*1/8 9*1/9 parts at the same time. The 8 equal pieces are easy to imagine. From the 1/3 part we will have 3*1/9 because of cutting parralel of the surface making thirds. The 2/3 part is halved by a cut (used already to generate the 8 equal parts), so it will be 2*1/3 and these also have their thirds. We have the remaning 6*1/9 parts. Similarly we will have 3*1/7 parts from the 3/7 part and 4*1/7 from the 4/7 part.

Whether this is the smallest number, I don't know.

• This is very close. However, it can be done with less cuts than your answer. – gyancey Dec 21 '19 at 18:19
• If cut 6 (the 1/3 - 2/3 cut) is not parallel with either the fourth or the fifth cut (the instructions say to position cut 6 "regardless of the other cuts"), then there's no available "halving cut" to use in the 2/3 portion. (Well, there is one, but it is parallel with the surface, and the trisecting cuts used later, so you wouldn't get 6 equal pieces from the 2/3 part, you'd get 4 pieces instead.) Similarly, splitting the 4/7 part only succeeds if the seventh cut (4/7 - 3/7) is parallel to either cut 4 or cut 5. Or maybe I'm missing something? – Bass Dec 22 '19 at 6:47
• I seriously doubt that 6 cuts is possible. Maybe I am just too weak to find it, and I am not a mathematician either... – FIreCase Dec 22 '19 at 14:55
• @FireCase I have a six but solution and I am sure it works. I am new here so not sure when one is supposed to reveal the solution. Or, if there was a way to private message you, I could do that. – gyancey Dec 22 '19 at 17:13
• @Firecase *six cut solution – gyancey Dec 22 '19 at 17:19

My second answer is

6 cuts if the peices can be moved before each cut.

Suppose the cake is first cut into 9 equal pieces.
If only 8 guests arrive, one spare piece must also be cut into 8 equal portions.
If only 7 guests arrive, two spare pieces must also be cut into 7 portions each.

The first 3 cuts are (not always through the centre):
1 $$\frac{4}{9} \frac{5}{9}$$
2 $$\frac{2}{9} \frac{2}{9} \frac{2}{9} \frac{3}{9}$$
3 $$\frac{1}{9} \frac{1}{9} \frac{1}{9} \frac{1}{9} \frac{1}{9} \frac{1}{9} \frac{1}{9} \frac{2}{9}$$

Put 4 of the pieces to one side, and work with the 4 remaining pieces. The largest needs to be cut into 2 portions, another into 8 portions and the other two into 7 portions.
After cut 4 you can put the two $$\frac{1}{9}$$ pieces to one side, leaving (as fractions of those parts):
4 $$\frac{4}{8} \frac{4}{8} \frac{4}{7} \frac{3}{7} \frac{4}{7} \frac{3}{7}$$
5 $$\frac{2}{8} \frac{2}{8} \frac{2}{8} \frac{2}{8} \frac{2}{7} \frac{2}{7} \frac{2}{7} \frac{1}{7} \frac{2}{7} \frac{2}{7} \frac{2}{7} \frac{1}{7}$$

Put the two $$\frac{1}{7}$$ pieces to one side, and halve the remaining ones:
6 $$\frac{1}{8} \frac{1}{8} \frac{1}{8} \frac{1}{8} \frac{1}{8} \frac{1}{8} \frac{1}{8} \frac{1}{8} \frac{1}{7} \frac{1}{7} \frac{1}{7} \frac{1}{7} \frac{1}{7} \frac{1}{7} \frac{1}{7} \frac{1}{7} \frac{1}{7} \frac{1}{7} \frac{1}{7} \frac{1}{7}$$

This produces:
6 pieces of size $$\frac{1}{9}$$
8 pieces of size $$\frac{1}{72}$$
14 pieces of size $$\frac{1}{63}$$
28 pieces in total with $$\frac{6}{9} + \frac{8}{72} + \frac{14}{63} = 1$$

If 9 guests arrive, 6 get $$(\frac{1}{9})$$, 2 each $$( \frac{7}{63} = \frac{1}{9})$$, and 1 gets $$( \frac{8}{72} = \frac{1}{9})$$ (28 pieces).

If 8 guests arrive, 6 get $$(\frac{1}{9} + \frac{1}{72} = \frac{1}{8})$$, 2 get $$(\frac{7}{63} + \frac{1}{72} = \frac{1}{8})$$ (28 pieces).

If 7 guests arrive, 6 get $$(\frac{1}{9} + \frac{2}{63} = \frac{1}{7})$$, 1 gets $$( \frac{2}{63} + \frac{8}{72} = \frac{1}{7})$$ (28 pieces).

But how is the cake to be divided in the ratio 4/5 with the first cut? It's possible, but other every cut will be an awkward calculation too. But with 1 extra cut and a protractor, every piece can be a regular shaped slice. If the first division is made from 2 half cuts, at an angle of 160° then every piece can be a true sector shape. In that case it needs
7 cuts.

My first answer was

9 cuts

The lowest common multiple of the possible guests is $$7 \times 8 \times 9 = 504$$.
If you move pieces so that every cut halves every piece, 9 cuts will make $$2^9 = 512$$ pieces.

If $$8$$ guests arrive, you serve $$8 \times 64 = 512$$ pieces.

The others are more tricky. Based on the assumption that cake is soft and crumbly, and it is not possible to cut pieces exactly in half, then:

For $$7$$ guests, if you serve $$7 \times 73 = 511$$ pieces, there would be one piece remaining. So serve the $$74$$ smallest pieces to one guest, and $$73$$ at random to each of the other guests.

For $$9$$ guests, if you serve $$9 \times 57 = 513$$ pieces, there would be one piece short. So serve the $$56$$ largest pieces to one guest, and $$57$$ at random to each of the other guests.

To make it easy when the guests arrive, you can already have sorted out the $$74$$ smallest pieces into one pile and the $$56$$ largest pieces into another pile. Depending on how many guests arrive, you dump one or both of these piles into the main heap.

• I had not considered rearranging the pieces between cuts when I wrote the problem. – gyancey Dec 21 '19 at 15:42
• This is a great answer. However, your second answer is possible without moving the pieces. – gyancey Dec 21 '19 at 18:41
• I was trying to visualise a cake with slices shaped such that the typical party guest could be served a helping that still looks like a slice of cake; when two parts can be pressed together. There is another answer which party guests who enjoy unusally shaped food will find wildly satisfying! – Weather Vane Dec 21 '19 at 18:47
• OK. I can match your second answer without moving the pieces and also every piece will be wedge shaped. – gyancey Dec 21 '19 at 19:19

I'll start with a couple of assumptions:

1. we cannot rearrange the pieces between cuts (confirmed by OP in the comments)
2. each guest needs to get the same amount of cake and frosting, else the split isn't equal.

With these assumptions, we are best off by keeping each cut vertical, and running through the center of the cake.

So let's see what we can get. Seems like the obvious place to start is the "split to eight", because we get that with only four cuts. To keep the math in integers, let's decide the cake's size is 504 units. Since we need to be able to split the cake into 9 pieces of 56 too, we'll have at least one cut running though each of the pieces. We should probably try to make 56 the biggest piece too, so we'll cut 7 off one of the pieces. Since it costs nothing extra, we'll run the cut all the way through the cake; even though we aren't likely to be able to use the other 56, having the extra pieces might be useful in some other way. Then we should probably make a 49, so we can build another 56 with the 7. Let's cut it from the piece next to the seven for clarity: Continuing in the same manner, let's make a "friend" for 14, and then for the resulting 21 too:

Now would you look at that! We are left with exactly two 28s, which sum up to exactly the required amount for the 9th person! (This probably didn't come as a surprise to you, if you were paying attention to what we were doing.) So with 8 cuts we have accommodated both 8 and 9 persons:

Then, let's see what we need in order to combine these into pieces of size 72.

Our "numbers of interest" are whatever's needed to complete the other pieces to 72, so let's list them all. We'll not need all of them, since we are going to split some to fill the others.

Piece Needs
56    16
49    23
42    30
35    37
28    44
21    51
14    58
7    65


Looking at the list, we have multiples of 7 on the left, and 2 more than multiples of 7 on the right, and if we match the lists to each other, it becomes clear that we get the list on the right by adding 9 to the list on the left and reversing it.

A simple way to turn the list on the left to the list on the right is to pair the pieces up to 70 sized chunks (we can make exactly 7 such pairs), and then split the 7 sized bits into {2,2,2,1}s, giving us exactly the required 7 lots of 2. That would bring us to

11 cuts in total

If there's a better method, I couldn't find it right now.

So here's the final cake:

It has

22 pieces: 1,1,2,2,2,2,2,2,14,14,21,21,28,28,35,35,42,42,49,49,56 and 56

which combine in the three required ways:

7 equal portions: $$56+14+2 = 56+14+2 = 49+21+2 = 49+21+2$$ $$= 42+28+2 = 42+28+2 = 35+35+1+1$$ 8 equal portions: $$56+2+2+2+1 = 56+2+2+2+1 = 49+14 = 49+14$$ $$= 42+21 = 42+21 = 35+28 = 35+28$$ 9 equal portions: $$56 = 56 = 49+2+2+2+1 = 49+2+2+2+1 = 42+14$$ $$= 42+14 = 35+21 = 35+21 = 28+28$$

• Wow, not bad. If there were frosting...and probability tag...but there is no frosting and there is geometry tag. – FIreCase Dec 21 '19 at 21:36
• Well, if I were one of the 9 guests, and got no frosting at all, I'd be pretty unhappy. Where on earth did that "probability tag" nonsense come from, though? – Bass Dec 21 '19 at 21:41
• "Cake is a form of sweet food made from flour, sugar, and other ingredients, that is usually baked." (source: wikipedia). Your preferences and imaginations are not included in the question phrasing :D Not probability, you are right in that, I wanted to say "combinatorics" :) – FIreCase Dec 21 '19 at 22:02
• Frosting is not part of the puzzle but very nice. – gyancey Dec 21 '19 at 22:16
• @FIreCase Combinatorics doesn't enter the picture either, this is a dissection puzzle, tagged as such, and it applies to shapes of any dimensionality, including 2. Also I'm not quite certain you (as not being the OP) are entirely qualified to tell me what assumptions OP intended to include, but didn't mention. Furthermore, to question your information source's validity for judging my assumptions to be "imaginations", maybe you could do a google image search for "cake", and count how many times you had to click "next page" in order to find a cylindrical cake without layers or frosting.</rant> – Bass Dec 22 '19 at 0:27

Here is my alternative answer that uses wedges:

(1) Make a vertical cut through the center that divides the cake in half. (2) Make another vertical cut that leaves wedges of 3/7, 1/14, 3/7, 1/14. (3) Make another vertical cut that leaves wedges of 3/8, 1/8, 3/8, 1/8. (4) Make another vertical cut that leaves wedges of 1/3, 1/6, 1/3, 1/6. (5) & (6) Make two horizontal cuts that divide the cake into thirds.

This was the answer I had in mind when I wrote the puzzle.

Congratulations to @FireCase for solving the puzzle and showing there are at least two solutions.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9250849,"math_prob":0.9923379,"size":13624,"snap":"2021-04-2021-17","text_gpt3_token_len":4115,"char_repetition_ratio":0.15565345,"word_repetition_ratio":0.040923826,"special_character_ratio":0.32956547,"punctuation_ratio":0.10127431,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99205506,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,3,null,3,null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-04-20T13:34:17Z\",\"WARC-Record-ID\":\"<urn:uuid:18213458-c969-4cce-808b-27ee894b17f3>\",\"Content-Length\":\"223707\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fcb84223-677c-49c7-8108-7437c3fcdbc1>\",\"WARC-Concurrent-To\":\"<urn:uuid:eac9b920-b92e-4336-b215-8c3c7e326143>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://puzzling.stackexchange.com/questions/92168/sharing-a-cake-with-7-8-or-9\",\"WARC-Payload-Digest\":\"sha1:WGT5FD3WEEXR5JRH22AJ2MAYQO4VQZBJ\",\"WARC-Block-Digest\":\"sha1:AY4O467WRMRXJZQSUBUPYUFF7J7IFL7B\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-17/CC-MAIN-2021-17_segments_1618039398307.76_warc_CC-MAIN-20210420122023-20210420152023-00212.warc.gz\"}"}