Every Sunday morning, Alice and Beth bake a huge pie together. After it is ready, Alice chooses a positive integer less than 10 and declares it to Beth, then Beth chooses a positive integer less than 10 and declares it to Alice. They slice the pie by making straight cuts with a knife. The number of straight cuts they make is equal to the sum of the two numbers they have chosen. They slice it carefully in order to get the maximum number of slices possible.

After slicing, Alice and Beth take turns eating a few slices of the pie. The number of slices each eats in her turn is never more than 6.

Beth ensures that she gets to eat the last slices on the plate. How does she ensure this?



Ilan Mayer solved this puzzle:

n cuts yield at most n(n + 1)/2 + 1 slices (see http://oeis.org/A000124).

For n (the sum of the 2 integers) between 2 and 18 the number of slices is divisible by 7 only for n = 3, n = 10 and n = 17.

Whatever number Alice chooses, Beth chooses a number so that the sum is one of these 3 values, which is always possible.

Afterwards, on each of her turns, if Alice ate m slices, Beth eats 7 − m slices.

Ted Schuerzinger solved this puzzle:

This should be fairly simple, as the pie eating part is a nim variant. Beth just has to make certain that the number of pie pieces is 0 (mod 7).

Each cut after the first cut produces one additional piece, plus one piece for each of the other cuts it goes through.

  • 2 cuts: 4 pieces
  • 3 cuts: 7 pieces
  • 4 cuts: 11 pieces
  • 5 cuts: 16 pieces
  • 6 cuts: 22 pieces
  • 7 cuts: 29 pieces
  • 8 cuts: 37 pieces
  • 9 cuts: 46 pieces
  • 10 cuts: 56 pieces

Since both players pick a number of cuts less than 10, Beth simply picks 10 minus Alice's pick, and then eats 7 minus however many pieces of pie Alice ate on her previous turn.

Ryan Batterman solved this puzzle:

The first thing to notice about this problem is that the maximum number of pieces of pie is determined by an arithmetic series involving the number of cuts. For each cut (except for the first), the number of new slices is equal to the number of intersections that cut makes with previous cuts + 1. Thus, the formula for the maximum number of slices that can be made with n cuts is 1 + 1 + 2 + 3 + … + n.

Let A = Alice's chosen number, B = Beth's chosen number, and n = A + B. Let the number of slices be S = 1 + 1 + 2 + 3 + … + n.

In the eating stage, there is a strategy Beth can follow to ensure that she is the last one to consume a piece of pie. The tactic hinges upon the fact that, in each turn, between 1 and 6 pieces of pie must be eaten. Beth needs to make sure that it is Alice's turn to eat whenever the number of remaining pieces of pie is divisible by 7.

If Alice is the first to eat a slice, then Beth needs to ensure that S mod 7 = 0. Otherwise, she needs S mod 7 ≠ 0. Fortunately, Beth is the second person to decide her number, so she can force this.

We can see that S ≡ 0 (mod 7) for n ∈ {3, 10, 17, …} It occurs at n = 3.

S ≡ 0 (mod 7) ⇔ n ≡ 3 (mod 7)

If Alice is the first to eat, Beth needs to make sure A + B ≡ 3 (mod 7). Fortunately, she can accomplish this because she chooses second and has a choice of integers from 1 to 9.

If Beth is the first to eat, she needs to make sure A + B ≢ 3 (mod 7).

Therefore, since Beth wins regardless of who eats first, she can force a win.