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 5 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). <HR> 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.