Puzzle
4 minute read

Ponder This Challenge - September 2025 - Cake flip-cutting

Let’s say we have a round strawberry cake with chocolate icing on top and an angle θ\theta with the range 0<θ<2π0<\theta<2\pi. We then perform the following procedure: We successively cut wedges of angle θ\theta from the cake, and each time we cut a wedge, we flip it and re-insert it upside down into the cake, at first with the icing at the bottom (we can picture it as if the wedge magically re-attaches it to the cake).

For example, if θ=π2\theta = \frac{\pi}{2}, then the following image displays the various stages the cake goes through

In this example, after four steps, all the icing is now at the bottom of the cake, and after eight steps, all the icing has now returned to the top of the cake.

Your goal: For θ=e10\theta = e^{-10} where e=2.718e=2.718\ldots is the usual constant, find the number of steps it will take for all the icing to return simultaneously to the top of the cake for the first time, or provide an explanation why this will never happen.

A bonus "*" will be given for finding the number of steps that will take for all the icing to simultaneously get to the bottom for the first time, or provide an explanation why this will never happen, for the same value of θ\theta.

Solution

  • September 2025 Solution:

    The solution to the main puzzle is 38307182424. The solution to the bonus is "never".

    This puzzle is more tricky than most, in the sense that experienced math puzzle solvers are more likely to fall into its trap: It seems that since the step is of irrational length, we will never return to the starting point, and so there's no hope to re-flip everything. The even more sophisticated solvers note that since we use the angle 12πe10\frac{1}{2\pi e^{10}} the solution hinges on the unproven claim that πe10\pi e^{10} is irrational. These intuitive (for the seasoned math problem solver) ideas are completely irrelevant to the solution.

    The key observation here is that when we flip a wedge, we do not simply change its status from "icing up" to "icing down" and vice versa; we mirror the cuts currently present in the wedge. This can be seen easily if we look at an example where the cuts do not return to the origin after one spin, e.g. when θ=3π2\theta=\frac{3\pi}{2}:

    One easy way to perform the bookkeeping of the current location of the cuts is to think of the following equivalent formulation: The knife always cuts a line at the angle 00 (e.g. horizontal line going right from the center). After each cut and flip, the cake is rotated by θ\theta degrees. So an algorithm for generating the set AA of the angles of all the current cuts in the cake is

    1. Initialize A ← {0}
    2. For x ∈ A:
      1. If 0 ≤ x < θ: x ← (θ - x)
      2. A = A ∪ {(x + θ) % 2π}
    3. Goto 2 if A changed, else return A.

    Let k=2πθk=\lceil\frac{2\pi}{\theta}\rceil be the smallest number of steps required to perform at least a full circle. Than δ=kθ2π\delta=k\theta-2\pi is how much we "overshoot" a full circle each time. It is now easy to check that in the above algorithm, the resulting AA would be

    A={0,θ,2θ,,(k1)θ,δ,2θδ,3θδ,,(k1)θδ}A = \{0, \theta, 2\theta, \ldots, (k-1)\theta, \delta, 2\theta-\delta, 3\theta-\delta, \ldots, (k-1)\theta-\delta\}

    Where the elemnts of AA are presented in the order in which they are obtained from the previous one. After rotating (k1)θδ(k-1)\theta-\delta by θ\theta we arrive at (kθδ) mod 2π=0(k\theta-\delta) \text{ mod } 2\pi = 0, hence in this sense we "complete a full circle" even though θ\theta may be irrational.

    Since A=2k1|A|=2k-1 we can picture the cake at the beginning as being comprised from 2k12k-1 wedges, of which kk have an angle of δ\delta and k1k-1 have an angle of θδ\theta-\delta:

    [0,δ],[δ,θ],[θ,2θδ],[2θδ,2θ],,[(k1)θ,0][0,\delta], [\delta,\theta], [\theta,2\theta-\delta], [2\theta-\delta, 2\theta],\ldots,[(k-1)\theta,0]

    Each time we cut and flip the cake, we flip exactly one δ\delta-wedge and one θδ\theta-\delta-wedge while switching the order between those two wedges but keeping the original order between all δ\delta-wedges and θδ\theta-\delta-wedges. Hence, after kk cuts we completely flip all the δ\delta-wedges and after 2k2k cuts we return them all to their original orientation, and similarly with the θδ\theta-\delta-wedges and k1k-1 cuts.

    In general, for the δ\delta-wedges to be all down we need the number of cuts to be an odd multiple of kk, and for up we need an even multiple. Similarily with θδ\theta-\delta-wedges and multiples of k1k-1. This leads to the solutions:

    1. The icing returns to the top when the number of cuts is an even multiple of both kk and k1k-1. Since lcm(k,k1)=k(k1)\text{lcm}(k,k-1)=k(k-1), and since when kk is even k1k-1 is odd and vice versa, the smallest number which is an even multiple of both these numbers is 2k(k1)2k(k-1). When θ=e10\theta=e^{-10} we have k=138397k=138397 and 2k(k1)=383071824242k(k-1)=38307182424.

    2. Since one of the numbers kk,k1k-1 is always even, there is no joint odd multiple of both of them, hence the icing will never be completely at the bottom (again, contrary to the intuition that it should happen at the middle point before everything returns to the top).

Solvers

  • *Lazar Ilic (31/8/2025 11:06 AM IDT)
  • Paul Revenant (31/8/2025 6:50 PM IDT)
  • King Pig (31/8/2025 7:56 PM IDT)
  • Bert Dobbelaere (31/8/2025 10:47 PM IDT)
  • *Prashant Wankhede (31/8/2025 10:57 PM IDT)
  • Stephen Ebert (1/9/2025 12:04 AM IDT)
  • *Bertram Felgenhauer (1/9/2025 12:17 AM IDT)
  • *Guangxi Liu (1/9/2025 8:11 AM IDT)
  • *Sanandan Swaminathan (1/9/2025 11:47 AM IDT)
  • *Nadir S. (1/9/2025 5:31 PM IDT)
  • *Daniel Bitin (2/9/2025 2:04 PM IDT)
  • *Paul Lupascu (2/9/2025 2:58 PM IDT)
  • *John Tromp (2/9/2025 4:05 PM IDT)
  • *Dominik Reichl (2/9/2025 6:27 PM IDT)
  • Lorenz Reichel (2/9/2025 8:05 PM IDT)
  • *Vladimir Volevich (3/9/2025 10:29 AM IDT)
  • *Alper Halbutogullari (3/9/2025 2:25 PM IDT)
  • *Jordan Payette (3/9/2025 6:21 PM IDT)
  • *Hakan Summakoğlu (8/9/2025 6:02 PM IDT)
  • Stéphane Higueret (16/9/2025 9:26 AM IDT)
  • *Shirish Chinchalkar (16/9/2025 3:19 PM IDT)
  • *Motty Porat (16/9/2025 4:49 PM IDT)
  • *Shouky Dan & Tamir Ganor (21/9/2025 11:03 AM IDT)
  • *David Greer (24/9/2025 7:09 PM IDT)
  • *Jan Fricke (26/9/2025 2:14 PM IDT)
  • *Daniel Chong Jyh Tar (27/9/2025 10:27 AM IDT)
  • *Dieter Beckerle (30/9/2025 12:57 PM IDT)
  • *Jackson La Vallee (30/9/2025 11:16 PM IDT)
  • *Krainer Elias (30/9/2025 11:44 PM IDT)
  • Marco Bellocchi (1/10/2025 7:34 PM IDT)
  • *Li Li (4/10/2025 8:24 PM IDT)
  • *Nyles Heise (5/10/2025 5:54 AM IDT)
  • *Ankit Chakraborty (5/10/2025 1:10 PM IDT)

Related posts